@supermousejs/labs 2.3.1 → 2.4.0
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/README.md +16 -16
- package/dist/index.d.ts +9 -4
- package/dist/index.mjs +270 -168
- package/dist/index.umd.js +9 -9
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @supermousejs/labs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Experimentental state machines and effects for supermouse
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -31,10 +31,10 @@ app.use(SmartIcon({ icons: { ... } }));
|
|
|
31
31
|
| transitionDuration | number | 200 | Morph transition time in ms. |
|
|
32
32
|
| switchDelay | number | 80 | Minimum ms a state must be requested before committing to the next icon. |
|
|
33
33
|
| size | number | 24 | Size of the icon container. |
|
|
34
|
-
| color | string | '
|
|
35
|
-
| offset | [number, number] | [0, 0] | Fixed offset. |
|
|
36
|
-
| anchor | string | 'center' | Alignment (center, top-left,
|
|
37
|
-
| followStrategy | 'smooth' | 'raw' | 'smooth' | Whether the icon
|
|
34
|
+
| color | string | 'currentColor' | Color applied to the icon container. SVGs that use `currentColor` will inherit it. If empty, the icon keeps its original fill. |
|
|
35
|
+
| offset | [number, number] | [0, 0] | Fixed offset from the pointer position. |
|
|
36
|
+
| anchor | string | 'center' | Alignment (center, top-left, top-right, bottom-left, bottom-right). |
|
|
37
|
+
| followStrategy | 'smooth' | 'raw' | 'smooth' | Whether the icon smoothly follows the pointer or snaps to it. |
|
|
38
38
|
| rotateWithVelocity | boolean | false | Rotate the icon based on movement velocity. |
|
|
39
39
|
|
|
40
40
|
## SmartRing
|
|
@@ -55,12 +55,12 @@ app.use(SmartRing({ size: 24, color: '#f59e0b', enableSkew: true }));
|
|
|
55
55
|
| Name | Type | Default | Description |
|
|
56
56
|
| --- | --- | --- | --- |
|
|
57
57
|
| size | number | 20 | Base diameter. |
|
|
58
|
-
| hoverSize | number | 40 | Diameter
|
|
59
|
-
| color | string | '#ffffff' | Border color
|
|
60
|
-
| fill | string | 'transparent' | Background fill color
|
|
58
|
+
| hoverSize | number | 40 | Diameter when hovering interactive elements. |
|
|
59
|
+
| color | string | '#ffffff' | Border color. |
|
|
60
|
+
| fill | string | 'transparent' | Background fill color. |
|
|
61
61
|
| borderWidth | number | 2 | Border thickness in pixels. |
|
|
62
62
|
| mixBlendMode | string | 'difference' | CSS mix-blend-mode applied to the ring element. |
|
|
63
|
-
| enableSkew | boolean | false | Distort
|
|
63
|
+
| enableSkew | boolean | false | Distort the ring based on velocity (stretch and rotate). |
|
|
64
64
|
|
|
65
65
|
## Sparkles
|
|
66
66
|
|
|
@@ -80,9 +80,9 @@ app.use(Sparkles({ color: '#f59e0b', frequency: 10 }));
|
|
|
80
80
|
| Name | Type | Default | Description |
|
|
81
81
|
| --- | --- | --- | --- |
|
|
82
82
|
| color | string | '#ff00ff' | Particle color. |
|
|
83
|
-
| count | number | 30 | Number of particles
|
|
84
|
-
| frequency | number | 10 | Pixels
|
|
85
|
-
| decay | number |
|
|
83
|
+
| count | number | 30 | Number of particles in the pool. |
|
|
84
|
+
| frequency | number | 10 | Pixels of movement required to spawn a particle. Lower values for a denser trail. |
|
|
85
|
+
| decay | number | 2.5 | Fade rate (0-1 per second). Higher values make for faster fading. |
|
|
86
86
|
| scatter | number | 5 | Random position offset for particle spawning. |
|
|
87
87
|
|
|
88
88
|
## TextRing
|
|
@@ -103,13 +103,13 @@ app.use(TextRing({ text: 'LOADING • ', radius: 40 }));
|
|
|
103
103
|
| Name | Type | Default | Description |
|
|
104
104
|
| --- | --- | --- | --- |
|
|
105
105
|
| text | string | 'SUPERMOUSE • SUPERMOUSE • ' | Text content. |
|
|
106
|
-
| radius | number | 60 | Ring radius. |
|
|
106
|
+
| radius | number | 60 | Ring radius in pixels. |
|
|
107
107
|
| fontSize | number | 12 | Text size in pixels. |
|
|
108
|
-
| speed | number |
|
|
109
|
-
| color | string | 'currentColor' | Text color
|
|
108
|
+
| speed | number | 30 | Rotation speed in degrees per second. |
|
|
109
|
+
| color | string | 'currentColor' | Text color. |
|
|
110
110
|
| opacity | number | 1 | Opacity of the rendered ring container. |
|
|
111
111
|
| className | string | '' | Optional CSS class added to the container. |
|
|
112
|
-
| spread | boolean |
|
|
112
|
+
| spread | boolean | true | Stretch the text to fit the entire circle using cross-browser letter-spacing. |
|
|
113
113
|
|
|
114
114
|
## Documentation
|
|
115
115
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { ValueOrGetter } from '../packages/core/src';
|
|
|
3
3
|
|
|
4
4
|
export declare const SmartIcon: (options: SmartIconOptions) => SupermousePlugin;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
declare type SmartIconAnchor = "center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
declare interface SmartIconMap {
|
|
9
9
|
[key: string]: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -19,6 +19,7 @@ export declare interface SmartIconOptions {
|
|
|
19
19
|
/** Minimum ms a state must be requested before committing. Default 80. */
|
|
20
20
|
switchDelay?: number;
|
|
21
21
|
size?: ValueOrGetter<number>;
|
|
22
|
+
/** Color applied to icons that use `currentColor` in their SVG. */
|
|
22
23
|
color?: ValueOrGetter<string>;
|
|
23
24
|
offset?: [number, number];
|
|
24
25
|
anchor?: ValueOrGetter<SmartIconAnchor>;
|
|
@@ -46,9 +47,9 @@ export declare interface SparklesOptions {
|
|
|
46
47
|
name?: string;
|
|
47
48
|
isEnabled?: boolean;
|
|
48
49
|
color?: ValueOrGetter<string>;
|
|
49
|
-
/** Number of particles
|
|
50
|
+
/** Number of particles in the pool. Default 30. */
|
|
50
51
|
count?: number;
|
|
51
|
-
/** How fast particles fade out (0
|
|
52
|
+
/** How fast particles fade out (0–1 per second). Default 2.5 (matches old 0.05 per frame at 50fps). */
|
|
52
53
|
decay?: number;
|
|
53
54
|
/** Pixels of movement required to spawn a particle. Lower = denser trail. Default 10. */
|
|
54
55
|
frequency?: number;
|
|
@@ -56,6 +57,10 @@ export declare interface SparklesOptions {
|
|
|
56
57
|
scatter?: number;
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
/**
|
|
61
|
+
* The SVG `textlength`/`lengthAdjust` attributes don't work/work reliably on Firefox-based browsers.
|
|
62
|
+
* So this implementation uses a workaround. Report: https://bugzilla.mozilla.org/show_bug.cgi?id=569722
|
|
63
|
+
*/
|
|
59
64
|
export declare const TextRing: (options?: TextRingOptions) => SupermousePlugin;
|
|
60
65
|
|
|
61
66
|
export declare interface TextRingOptions {
|
package/dist/index.mjs
CHANGED
|
@@ -1,36 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (a.pointer)
|
|
1
|
+
import { normalizeAll as X, definePlugin as N, css as x, math as M, createActor as j, Layers as U, injectStyles as tt, damp as V, effects as et, lerpAngle as rt, setTransform as D, createCircle as _, normalize as nt, circlePath as st, circumference as ot, createSVGElement as G, path as it, text as at, textPath as lt } from "@supermousejs/utils";
|
|
2
|
+
function ct(t, e) {
|
|
3
|
+
const f = t.tagName.toLowerCase();
|
|
4
|
+
if (f === "input" || f === "textarea" || t.isContentEditable) {
|
|
5
|
+
const a = t.type;
|
|
6
|
+
if (["button", "submit", "checkbox", "radio", "range", "color"].includes(a)) {
|
|
7
|
+
if (e.pointer)
|
|
9
8
|
return "pointer";
|
|
10
|
-
} else if (
|
|
11
|
-
} else if ((
|
|
9
|
+
} else if (e.text) return "text";
|
|
10
|
+
} else if ((f === "a" || f === "button" || t.closest("a") || t.closest("button")) && e.pointer)
|
|
12
11
|
return "pointer";
|
|
12
|
+
if (e.text && ["p", "span", "h1", "h2", "h3", "h4", "h5", "h6", "li", "blockquote", "code", "pre"].includes(
|
|
13
|
+
f
|
|
14
|
+
))
|
|
15
|
+
return "text";
|
|
16
|
+
if (e.text || e.grab) {
|
|
17
|
+
const a = window.getComputedStyle(t).cursor;
|
|
18
|
+
if (e.text && a === "text") return "text";
|
|
19
|
+
if (e.grab && a === "grab") return "grab";
|
|
20
|
+
}
|
|
13
21
|
return null;
|
|
14
22
|
}
|
|
15
|
-
const
|
|
16
|
-
let
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
const xt = (t) => {
|
|
24
|
+
let e, f = t.defaultState ?? "default", a = null, i, g = "idle", c = 0, C = f, u = null, n = 0, o = 0, z = 0;
|
|
25
|
+
const d = X(t, {
|
|
26
|
+
size: 24,
|
|
27
|
+
color: "",
|
|
28
|
+
followStrategy: "smooth",
|
|
29
|
+
anchor: "center",
|
|
30
|
+
rotateWithVelocity: !1
|
|
31
|
+
}), p = t.useSemanticTags ?? !0, m = t.transitionDuration ?? 200, r = t.switchDelay ?? 80, h = t.offset?.[0] ?? 0, y = t.offset?.[1] ?? 0, A = t.defaultState ?? "default", b = m / 2;
|
|
20
32
|
function v(s) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, A / 2);
|
|
33
|
+
x(e, { transform: `scale(${s})` });
|
|
34
|
+
}
|
|
35
|
+
function S(s) {
|
|
36
|
+
f = s, e.innerHTML = t.icons[s] ?? "";
|
|
26
37
|
}
|
|
27
|
-
|
|
38
|
+
let l;
|
|
39
|
+
return N(
|
|
28
40
|
{
|
|
29
|
-
name: t.name
|
|
41
|
+
name: t.name ?? "smart-icon",
|
|
30
42
|
selector: "[data-supermouse-icon]",
|
|
31
|
-
create: () => {
|
|
32
|
-
const
|
|
33
|
-
return
|
|
43
|
+
create: (s) => {
|
|
44
|
+
const w = j("div");
|
|
45
|
+
return x(w, { zIndex: U.CURSOR }), p && s.registerHoverTarget("p, span, h1, h2, h3, h4, h5, h6, li, blockquote, code, pre"), e = j("div"), x(e, {
|
|
34
46
|
width: "100%",
|
|
35
47
|
height: "100%",
|
|
36
48
|
display: "flex",
|
|
@@ -38,116 +50,169 @@ const Q = (t) => {
|
|
|
38
50
|
justifyContent: "center",
|
|
39
51
|
transformOrigin: "center center",
|
|
40
52
|
transform: "scale(1)",
|
|
41
|
-
transition: `transform ${
|
|
42
|
-
}),
|
|
53
|
+
transition: `transform ${b}ms cubic-bezier(0.16, 1, 0.3, 1)`
|
|
54
|
+
}), e.innerHTML = t.icons[f] ?? "", tt(
|
|
43
55
|
"supermouse-smart-icon-styles",
|
|
44
56
|
`
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
), s.appendChild(
|
|
54
|
-
},
|
|
55
|
-
styles: {
|
|
56
|
-
color: "color"
|
|
57
|
+
@keyframes sm {
|
|
58
|
+
0% { transform: rotate(0deg); }
|
|
59
|
+
100% { transform: rotate(360deg); }
|
|
60
|
+
}
|
|
61
|
+
.supermouse-spin {
|
|
62
|
+
animation: sm 1s linear infinite;
|
|
63
|
+
}
|
|
64
|
+
`
|
|
65
|
+
), l = s.state.cursorMode, s.setCursor("custom"), w.appendChild(e), w;
|
|
57
66
|
},
|
|
58
|
-
update: (s, w,
|
|
59
|
-
const
|
|
60
|
-
let
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
} else
|
|
66
|
-
f = null, T = null;
|
|
67
|
-
E !== o && !C ? !z[E] && E !== (t.defaultState || "default") ? (u = null, m = 0) : E !== u ? (u = E, m = 0) : (m += g, m >= M && (v(E), u = null, m = 0)) : E === o && (u = null, m = 0);
|
|
68
|
-
const k = x(s.state);
|
|
69
|
-
l.setStyle(w, "width", `${k}px`), l.setStyle(w, "height", `${k}px`);
|
|
70
|
-
let $ = 0, P = 0;
|
|
71
|
-
const I = k / 2, O = c(s.state);
|
|
72
|
-
O !== "center" && (O.includes("left") && ($ = I), O.includes("right") && ($ = -I), O.includes("top") && (P = I), O.includes("bottom") && (P = -I));
|
|
73
|
-
const X = o === "pointer" || o === "text";
|
|
74
|
-
if (r(s.state) && !X && !s.state.reducedMotion) {
|
|
75
|
-
const { x: N, y: H } = s.state.velocity;
|
|
76
|
-
b.dist(N, H) > 1 && (y = b.angle(N, H)), e = b.lerpAngle(e, y, 0.15);
|
|
67
|
+
update: (s, w, $) => {
|
|
68
|
+
const T = performance.now(), F = $ / 1e3, O = t.icons, k = s.state.hoverTarget, H = !!k, I = H && k !== a;
|
|
69
|
+
let R = A;
|
|
70
|
+
if (H) {
|
|
71
|
+
I && (a = k, i = p ? ct(k, O) : null);
|
|
72
|
+
const L = s.state.interaction?.icon;
|
|
73
|
+
L && O[L] ? R = L : i && (R = i);
|
|
77
74
|
} else
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
);
|
|
75
|
+
a && (a = null, i = null);
|
|
76
|
+
R !== f && g === "idle" ? !!O[R] || R === A ? I ? (S(R), v(1), u = null, n = 0) : R !== u ? (u = R, n = 0) : (n += $, n >= r && (C = R, g = "out", c = T, v(0), u = null, n = 0)) : (u = null, n = 0) : R === f && (u = null, n = 0), g === "out" && T - c >= b && (S(C), g = "in", c = T, v(0)), g === "in" && T - c >= b && (g = "idle", v(1));
|
|
77
|
+
const E = d.size(s.state), J = d.color(s.state);
|
|
78
|
+
x(w, {
|
|
79
|
+
width: `${E}px`,
|
|
80
|
+
height: `${E}px`,
|
|
81
|
+
color: J || "inherit"
|
|
82
|
+
});
|
|
83
|
+
let P = 0, W = 0;
|
|
84
|
+
const Y = E / 2;
|
|
85
|
+
switch (d.anchor(s.state)) {
|
|
86
|
+
case "center":
|
|
87
|
+
P = -Y, W = -Y;
|
|
88
|
+
break;
|
|
89
|
+
case "top-left":
|
|
90
|
+
P = 0, W = 0;
|
|
91
|
+
break;
|
|
92
|
+
case "top-right":
|
|
93
|
+
P = -E, W = 0;
|
|
94
|
+
break;
|
|
95
|
+
case "bottom-left":
|
|
96
|
+
P = 0, W = -E;
|
|
97
|
+
break;
|
|
98
|
+
case "bottom-right":
|
|
99
|
+
P = -E, W = -E;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
const K = f === "pointer" || f === "text";
|
|
103
|
+
if (d.rotateWithVelocity(s.state) && !K && !s.state.reducedMotion) {
|
|
104
|
+
const { x: L, y: B } = s.state.velocity;
|
|
105
|
+
M.dist(L, B) > 1 && (z = M.angle(L, B));
|
|
106
|
+
const Z = 1 - Math.exp(-20 * F);
|
|
107
|
+
o = M.lerpAngle(o, z, Z);
|
|
108
|
+
} else {
|
|
109
|
+
const L = 1 - Math.exp(-20 * F);
|
|
110
|
+
o = M.lerpAngle(o, 0, L);
|
|
111
|
+
}
|
|
112
|
+
const q = d.followStrategy(s.state) === "raw" ? s.state.pointer : s.state.smooth, Q = `translate3d(${q.x + h + P}px, ${q.y + y + W}px, 0) rotate(${o}deg)`;
|
|
113
|
+
w.style.transform = Q;
|
|
86
114
|
},
|
|
87
|
-
cleanup() {
|
|
88
|
-
|
|
115
|
+
cleanup(s) {
|
|
116
|
+
s.setCursor(l);
|
|
89
117
|
}
|
|
90
118
|
},
|
|
91
119
|
t
|
|
92
120
|
);
|
|
93
|
-
},
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
121
|
+
}, gt = (t = {}) => {
|
|
122
|
+
const e = X(t, {
|
|
123
|
+
size: 20,
|
|
124
|
+
hoverSize: 40,
|
|
125
|
+
color: "#ffffff",
|
|
126
|
+
fill: "transparent",
|
|
127
|
+
borderWidth: 2
|
|
128
|
+
});
|
|
129
|
+
let f = 20, a = 20, i = 0, g = 1, c = 1;
|
|
130
|
+
const C = 150;
|
|
131
|
+
let u = null;
|
|
132
|
+
return N(
|
|
97
133
|
{
|
|
98
|
-
name: t.name
|
|
134
|
+
name: t.name ?? "smart-ring",
|
|
99
135
|
selector: "[data-supermouse-color]",
|
|
100
|
-
create: (
|
|
101
|
-
const
|
|
102
|
-
return
|
|
103
|
-
zIndex:
|
|
104
|
-
mixBlendMode: t.mixBlendMode
|
|
105
|
-
transition: "
|
|
106
|
-
borderStyle: "solid"
|
|
107
|
-
|
|
136
|
+
create: (n) => {
|
|
137
|
+
const o = _(e.size(n.state), e.fill(n.state));
|
|
138
|
+
return x(o, {
|
|
139
|
+
zIndex: U.FOLLOWER,
|
|
140
|
+
mixBlendMode: t.mixBlendMode ?? "difference",
|
|
141
|
+
transition: "border-radius 0.2s ease",
|
|
142
|
+
borderStyle: "solid",
|
|
143
|
+
opacity: "0"
|
|
144
|
+
}), o;
|
|
145
|
+
},
|
|
146
|
+
onEnable(n, o) {
|
|
147
|
+
const z = e.size(n.state);
|
|
148
|
+
f = z * 0.5, a = z * 0.5, i = 0, g = 1, c = 1, clearTimeout(u ?? void 0), o.style.display = "block", o.style.opacity = "1", o.style.transition = "border-radius 0.2s ease";
|
|
108
149
|
},
|
|
109
|
-
|
|
110
|
-
const x
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
150
|
+
beforeDisable(n, o) {
|
|
151
|
+
const { x: z, y: d } = n.state.smooth;
|
|
152
|
+
return o.style.transition = `opacity ${C}ms ease, transform ${C}ms ease`, o.style.opacity = "0", D(o, z, d, 0, 0.2, 0.2), new Promise((p) => {
|
|
153
|
+
u = setTimeout(() => {
|
|
154
|
+
o.style.transition = "border-radius 0.2s ease", p();
|
|
155
|
+
}, C);
|
|
156
|
+
});
|
|
157
|
+
},
|
|
158
|
+
update: (n, o, z) => {
|
|
159
|
+
if (o.style.display === "none") return;
|
|
160
|
+
const d = z / 1e3, p = e.size(n.state), m = n.state.shape;
|
|
161
|
+
let r = p, h = p, y = "50%", A = e.color(n.state);
|
|
162
|
+
m ? (r = m.width, h = m.height, y = `${m.borderRadius}px`) : (n.state.isHover && (r = e.hoverSize(n.state), h = e.hoverSize(n.state)), n.state.isDown && (r *= 0.9, h *= 0.9)), n.state.interaction.color && (A = n.state.interaction.color), f = V(f, r, 20, d), a = V(a, h, 20, d), x(o, {
|
|
163
|
+
width: `${f}px`,
|
|
164
|
+
height: `${a}px`,
|
|
165
|
+
borderRadius: y,
|
|
166
|
+
borderColor: A,
|
|
167
|
+
backgroundColor: e.fill(n.state),
|
|
168
|
+
borderWidth: `${e.borderWidth(n.state)}px`,
|
|
169
|
+
opacity: "1"
|
|
170
|
+
});
|
|
171
|
+
let b = 0, v = 1, S = 1;
|
|
172
|
+
if (!m && t.enableSkew && !n.state.reducedMotion) {
|
|
173
|
+
const { displacement: w } = n.state, $ = et.getVelocityDistortion(w.x, w.y);
|
|
174
|
+
b = $.rotation, v = $.scaleX, S = $.scaleY;
|
|
175
|
+
const T = 1 - Math.exp(-20 * d);
|
|
176
|
+
i = rt(i, b, T);
|
|
117
177
|
} else
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const { x:
|
|
121
|
-
|
|
178
|
+
i = 0;
|
|
179
|
+
g = V(g, v, 20, d), c = V(c, S, 20, d);
|
|
180
|
+
const { x: l, y: s } = n.state.smooth;
|
|
181
|
+
D(o, l, s, i, g, c);
|
|
122
182
|
}
|
|
123
183
|
},
|
|
124
184
|
t
|
|
125
185
|
);
|
|
126
|
-
},
|
|
127
|
-
const
|
|
128
|
-
let
|
|
129
|
-
const
|
|
130
|
-
const r =
|
|
186
|
+
}, yt = (t = {}) => {
|
|
187
|
+
const e = t.count ?? 30, f = t.decay ?? 2.5, a = t.frequency ?? 10, i = t.scatter ?? 5, g = nt(t.color, "#ff00ff"), c = [];
|
|
188
|
+
let C = 0, u = 0, n = !1, o = 0;
|
|
189
|
+
const z = (d, p, m) => {
|
|
190
|
+
const r = c.find((b) => !b.isActive);
|
|
131
191
|
if (!r) return;
|
|
132
|
-
r.isActive = !0, r.life = 1, r.x =
|
|
133
|
-
const
|
|
134
|
-
r.vx = Math.cos(
|
|
135
|
-
const
|
|
136
|
-
|
|
192
|
+
r.isActive = !0, r.life = 1, r.x = d + M.random(-i, i), r.y = p + M.random(-i, i);
|
|
193
|
+
const h = M.random(0, Math.PI * 2), y = M.random(0.5, 1.5);
|
|
194
|
+
r.vx = Math.cos(h) * y, r.vy = Math.sin(h) * y, r.scale = M.random(0.5, 1.2), r.color = m;
|
|
195
|
+
const A = M.random(2, 5);
|
|
196
|
+
x(r.el, {
|
|
197
|
+
width: `${A}px`,
|
|
198
|
+
height: `${A}px`,
|
|
199
|
+
backgroundColor: m,
|
|
200
|
+
opacity: "1"
|
|
201
|
+
}), D(r.el, r.x, r.y, 0, r.scale, r.scale);
|
|
137
202
|
};
|
|
138
|
-
return
|
|
203
|
+
return N(
|
|
139
204
|
{
|
|
140
|
-
name: t.name
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
205
|
+
name: t.name ?? "sparkles",
|
|
206
|
+
create: () => {
|
|
207
|
+
const d = j("div");
|
|
208
|
+
x(d, { zIndex: U.TRACE });
|
|
209
|
+
for (let p = 0; p < e; p++) {
|
|
210
|
+
const m = _(0, "transparent");
|
|
211
|
+
x(m, {
|
|
146
212
|
opacity: "0",
|
|
147
|
-
willChange: "transform, opacity"
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
el: c,
|
|
213
|
+
willChange: "transform, opacity"
|
|
214
|
+
}), d.appendChild(m), c.push({
|
|
215
|
+
el: m,
|
|
151
216
|
isActive: !1,
|
|
152
217
|
x: 0,
|
|
153
218
|
y: 0,
|
|
@@ -158,52 +223,62 @@ const Q = (t) => {
|
|
|
158
223
|
color: ""
|
|
159
224
|
});
|
|
160
225
|
}
|
|
226
|
+
return d;
|
|
161
227
|
},
|
|
162
|
-
update(
|
|
163
|
-
const { x:
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
if (
|
|
167
|
-
const S =
|
|
168
|
-
for (let
|
|
169
|
-
const
|
|
170
|
-
|
|
228
|
+
update: (d, p, m) => {
|
|
229
|
+
const r = m / 1e3, { x: h, y } = d.state.pointer;
|
|
230
|
+
n || (C = h, u = y, n = !0);
|
|
231
|
+
const A = h - C, b = y - u, v = Math.hypot(A, b);
|
|
232
|
+
if (o += v, o > a) {
|
|
233
|
+
const S = g(d.state), l = Math.floor(o / a);
|
|
234
|
+
for (let s = 0; s < l; s++) {
|
|
235
|
+
const w = s / l;
|
|
236
|
+
z(C + A * w, u + b * w, S);
|
|
171
237
|
}
|
|
172
|
-
|
|
238
|
+
o = o % a;
|
|
173
239
|
}
|
|
174
|
-
|
|
175
|
-
for (let S = 0; S <
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
178
|
-
if (
|
|
179
|
-
|
|
240
|
+
C = h, u = y;
|
|
241
|
+
for (let S = 0; S < e; S++) {
|
|
242
|
+
const l = c[S];
|
|
243
|
+
if (l.isActive)
|
|
244
|
+
if (l.x += l.vx * r * 60, l.y += l.vy * r * 60, l.life -= f * r, l.life <= 0)
|
|
245
|
+
l.isActive = !1, x(l.el, { opacity: "0" });
|
|
180
246
|
else {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
l.setTransform(n.el, n.x, n.y, 0, v, v);
|
|
247
|
+
const s = l.scale * l.life;
|
|
248
|
+
x(l.el, { opacity: String(l.life) }), D(l.el, l.x, l.y, 0, s, s);
|
|
184
249
|
}
|
|
185
250
|
}
|
|
186
251
|
},
|
|
187
|
-
destroy() {
|
|
188
|
-
|
|
252
|
+
destroy: () => {
|
|
253
|
+
c.length = 0;
|
|
189
254
|
}
|
|
190
255
|
},
|
|
191
256
|
t
|
|
192
257
|
);
|
|
193
258
|
};
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
259
|
+
function dt(t, e) {
|
|
260
|
+
return e ? t + " " : t;
|
|
261
|
+
}
|
|
262
|
+
let ft = 0;
|
|
263
|
+
const pt = (t = {}) => {
|
|
264
|
+
let e, f, a, i, g, c;
|
|
265
|
+
const C = `supermouse-text-ring-path-${ft++}`, u = X(t, {
|
|
266
|
+
text: "SUPERMOUSE • SUPERMOUSE • ",
|
|
267
|
+
radius: 60,
|
|
268
|
+
fontSize: 12,
|
|
269
|
+
speed: 30,
|
|
270
|
+
opacity: 1,
|
|
271
|
+
color: "currentColor"
|
|
272
|
+
}), n = t.className ?? "", o = t.spread ?? !0;
|
|
273
|
+
let z = 0, d = "", p = 0, m = 0;
|
|
274
|
+
return N(
|
|
200
275
|
{
|
|
201
|
-
name: "text-ring",
|
|
276
|
+
name: t.name ?? "text-ring",
|
|
202
277
|
selector: "[data-supermouse-text-ring]",
|
|
203
|
-
create: (
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
zIndex:
|
|
278
|
+
create: (r) => {
|
|
279
|
+
const h = j("div");
|
|
280
|
+
x(h, {
|
|
281
|
+
zIndex: U.FOLLOWER,
|
|
207
282
|
transition: "opacity 0.2s ease",
|
|
208
283
|
opacity: "1",
|
|
209
284
|
width: "0px",
|
|
@@ -212,34 +287,61 @@ const tt = (t = {}) => {
|
|
|
212
287
|
display: "flex",
|
|
213
288
|
alignItems: "center",
|
|
214
289
|
justifyContent: "center"
|
|
215
|
-
}),
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
290
|
+
}), n && h.classList.add(...n.split(" ").filter(Boolean)), e = G("svg"), x(e, {
|
|
291
|
+
overflow: "visible",
|
|
292
|
+
position: "absolute",
|
|
293
|
+
left: "0",
|
|
294
|
+
top: "0"
|
|
295
|
+
}), f = it(void 0, { id: C, fill: "none" });
|
|
296
|
+
const y = u.fontSize(r.state);
|
|
297
|
+
return m = y, i = at({ "font-size": `${y}px`, fill: "currentColor" }), x(i, {
|
|
298
|
+
textTransform: "uppercase",
|
|
299
|
+
letterSpacing: "2px"
|
|
300
|
+
}), a = lt(`#${C}`, { startOffset: "0%" }), g = document.createTextNode(""), a.appendChild(g), i.appendChild(a), e.appendChild(f), e.appendChild(i), c = G("text"), x(c, {
|
|
301
|
+
visibility: "hidden",
|
|
302
|
+
position: "absolute",
|
|
303
|
+
pointerEvents: "none",
|
|
304
|
+
whiteSpace: "nowrap"
|
|
305
|
+
}), c.setAttribute("font-size", `${y}px`), c.setAttribute("font-family", getComputedStyle(i).fontFamily || "sans-serif"), c.setAttribute("font-weight", getComputedStyle(i).fontWeight || "normal"), c.setAttribute("font-style", getComputedStyle(i).fontStyle || "normal"), e.appendChild(c), h.appendChild(e), h;
|
|
221
306
|
},
|
|
222
|
-
update: (
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
l.
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
307
|
+
update: (r, h, y) => {
|
|
308
|
+
const A = y / 1e3;
|
|
309
|
+
let b = u.text(r.state);
|
|
310
|
+
const v = u.radius(r.state), S = u.fontSize(r.state), l = u.speed(r.state), s = u.opacity(r.state), w = u.color(r.state);
|
|
311
|
+
x(h, { color: w, opacity: String(s) });
|
|
312
|
+
const $ = r.state.interaction;
|
|
313
|
+
if ($.textRing && typeof $.textRing == "string" ? b = $.textRing : $.text && typeof $.text == "string" && (b = $.text), v !== p) {
|
|
314
|
+
f.setAttribute("d", st(v));
|
|
315
|
+
const k = v * 2;
|
|
316
|
+
x(e, {
|
|
317
|
+
width: `${k}px`,
|
|
318
|
+
height: `${k}px`
|
|
319
|
+
}), p = v;
|
|
320
|
+
}
|
|
321
|
+
const T = dt(b, o);
|
|
322
|
+
if (S !== m && (i.setAttribute("font-size", `${S}px`), c.setAttribute("font-size", `${S}px`), m = S), T !== d && (g.textContent = T, d = T), o) {
|
|
323
|
+
const k = ot(v);
|
|
324
|
+
c.textContent = T;
|
|
325
|
+
const H = c.getComputedTextLength(), I = T.length;
|
|
326
|
+
if (I > 1) {
|
|
327
|
+
const E = (k - H) / (I - 1);
|
|
328
|
+
x(i, { letterSpacing: `${E}px` });
|
|
329
|
+
} else
|
|
330
|
+
x(i, { letterSpacing: "0px" });
|
|
331
|
+
i.removeAttribute("textLength"), a.removeAttribute("textLength"), a.removeAttribute("lengthAdjust");
|
|
230
332
|
} else
|
|
231
|
-
i.removeAttribute("textLength"),
|
|
232
|
-
|
|
233
|
-
const { x:
|
|
234
|
-
|
|
333
|
+
x(i, { letterSpacing: "2px" }), i.removeAttribute("textLength"), a.removeAttribute("textLength"), a.removeAttribute("lengthAdjust");
|
|
334
|
+
z += l * A;
|
|
335
|
+
const { x: F, y: O } = r.state.smooth;
|
|
336
|
+
D(h, F, O, z);
|
|
235
337
|
}
|
|
236
338
|
},
|
|
237
339
|
t
|
|
238
340
|
);
|
|
239
341
|
};
|
|
240
342
|
export {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
343
|
+
xt as SmartIcon,
|
|
344
|
+
gt as SmartRing,
|
|
345
|
+
yt as Sparkles,
|
|
346
|
+
pt as TextRing
|
|
245
347
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
(function(L,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("@supermousejs/utils")):typeof define=="function"&&define.amd?define(["exports","@supermousejs/utils"],e):(L=typeof globalThis<"u"?globalThis:L||self,e(L.SupermouseLabs={},L.SupermouseUtils))})(this,(function(L,e){"use strict";function U(t,r){const m=t.tagName.toLowerCase();if(m==="input"||m==="textarea"||t.isContentEditable){const i=t.type;if(["button","submit","checkbox","radio","range","color"].includes(i)){if(r.pointer)return"pointer"}else if(r.text)return"text"}else if((m==="a"||m==="button"||t.closest("a")||t.closest("button"))&&r.pointer)return"pointer";if(r.text&&["p","span","h1","h2","h3","h4","h5","h6","li","blockquote","code","pre"].includes(m))return"text";if(r.text||r.grab){const i=window.getComputedStyle(t).cursor;if(r.text&&i==="text")return"text";if(r.grab&&i==="grab")return"grab"}return null}const q=t=>{let r,m=t.defaultState??"default",i=null,c,x="idle",d=0,C=m,h=null,o=0,a=0,z=0;const f=e.normalizeAll(t,{size:24,color:"",followStrategy:"smooth",anchor:"center",rotateWithVelocity:!1}),p=t.useSemanticTags??!0,g=t.transitionDuration??200,n=t.switchDelay??80,u=t.offset?.[0]??0,y=t.offset?.[1]??0,T=t.defaultState??"default",b=g/2;function v(s){e.css(r,{transform:`scale(${s})`})}function S(s){m=s,r.innerHTML=t.icons[s]??""}let l;return e.definePlugin({name:t.name??"smart-icon",selector:"[data-supermouse-icon]",create:s=>{const A=e.createActor("div");return e.css(A,{zIndex:e.Layers.CURSOR}),p&&s.registerHoverTarget("p, span, h1, h2, h3, h4, h5, h6, li, blockquote, code, pre"),r=e.createActor("div"),e.css(r,{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",transformOrigin:"center center",transform:"scale(1)",transition:`transform ${b}ms cubic-bezier(0.16, 1, 0.3, 1)`}),r.innerHTML=t.icons[m]??"",e.injectStyles("supermouse-smart-icon-styles",`
|
|
2
|
+
@keyframes sm {
|
|
3
|
+
0% { transform: rotate(0deg); }
|
|
4
|
+
100% { transform: rotate(360deg); }
|
|
5
|
+
}
|
|
6
|
+
.supermouse-spin {
|
|
7
|
+
animation: sm 1s linear infinite;
|
|
8
|
+
}
|
|
9
|
+
`),l=s.state.cursorMode,s.setCursor("custom"),A.appendChild(r),A},update:(s,A,w)=>{const $=performance.now(),j=w/1e3,W=t.icons,M=s.state.hoverTarget,D=!!M,I=D&&M!==i;let R=T;if(D){I&&(i=M,c=p?U(M,W):null);const E=s.state.interaction?.icon;E&&W[E]?R=E:c&&(R=c)}else i&&(i=null,c=null);R!==m&&x==="idle"?!!W[R]||R===T?I?(S(R),v(1),h=null,o=0):R!==h?(h=R,o=0):(o+=w,o>=n&&(C=R,x="out",d=$,v(0),h=null,o=0)):(h=null,o=0):R===m&&(h=null,o=0),x==="out"&&$-d>=b&&(S(C),x="in",d=$,v(0)),x==="in"&&$-d>=b&&(x="idle",v(1));const k=f.size(s.state),_=f.color(s.state);e.css(A,{width:`${k}px`,height:`${k}px`,color:_||"inherit"});let P=0,O=0;const F=k/2;switch(f.anchor(s.state)){case"center":P=-F,O=-F;break;case"top-left":P=0,O=0;break;case"top-right":P=-k,O=0;break;case"bottom-left":P=0,O=-k;break;case"bottom-right":P=-k,O=-k;break}const J=m==="pointer"||m==="text";if(f.rotateWithVelocity(s.state)&&!J&&!s.state.reducedMotion){const{x:E,y:H}=s.state.velocity;e.math.dist(E,H)>1&&(z=e.math.angle(E,H));const Q=1-Math.exp(-20*j);a=e.math.lerpAngle(a,z,Q)}else{const E=1-Math.exp(-20*j);a=e.math.lerpAngle(a,0,E)}const V=f.followStrategy(s.state)==="raw"?s.state.pointer:s.state.smooth,K=`translate3d(${V.x+u+P}px, ${V.y+y+O}px, 0) rotate(${a}deg)`;A.style.transform=K},cleanup(s){s.setCursor(l)}},t)},N=(t={})=>{const r=e.normalizeAll(t,{size:20,hoverSize:40,color:"#ffffff",fill:"transparent",borderWidth:2});let m=20,i=20,c=0,x=1,d=1;const C=150;let h=null;return e.definePlugin({name:t.name??"smart-ring",selector:"[data-supermouse-color]",create:o=>{const a=e.createCircle(r.size(o.state),r.fill(o.state));return e.css(a,{zIndex:e.Layers.FOLLOWER,mixBlendMode:t.mixBlendMode??"difference",transition:"border-radius 0.2s ease",borderStyle:"solid",opacity:"0"}),a},onEnable(o,a){const z=r.size(o.state);m=z*.5,i=z*.5,c=0,x=1,d=1,clearTimeout(h??void 0),a.style.display="block",a.style.opacity="1",a.style.transition="border-radius 0.2s ease"},beforeDisable(o,a){const{x:z,y:f}=o.state.smooth;return a.style.transition=`opacity ${C}ms ease, transform ${C}ms ease`,a.style.opacity="0",e.setTransform(a,z,f,0,.2,.2),new Promise(p=>{h=setTimeout(()=>{a.style.transition="border-radius 0.2s ease",p()},C)})},update:(o,a,z)=>{if(a.style.display==="none")return;const f=z/1e3,p=r.size(o.state),g=o.state.shape;let n=p,u=p,y="50%",T=r.color(o.state);g?(n=g.width,u=g.height,y=`${g.borderRadius}px`):(o.state.isHover&&(n=r.hoverSize(o.state),u=r.hoverSize(o.state)),o.state.isDown&&(n*=.9,u*=.9)),o.state.interaction.color&&(T=o.state.interaction.color),m=e.damp(m,n,20,f),i=e.damp(i,u,20,f),e.css(a,{width:`${m}px`,height:`${i}px`,borderRadius:y,borderColor:T,backgroundColor:r.fill(o.state),borderWidth:`${r.borderWidth(o.state)}px`,opacity:"1"});let b=0,v=1,S=1;if(!g&&t.enableSkew&&!o.state.reducedMotion){const{displacement:A}=o.state,w=e.effects.getVelocityDistortion(A.x,A.y);b=w.rotation,v=w.scaleX,S=w.scaleY;const $=1-Math.exp(-20*f);c=e.lerpAngle(c,b,$)}else c=0;x=e.damp(x,v,20,f),d=e.damp(d,S,20,f);const{x:l,y:s}=o.state.smooth;e.setTransform(a,l,s,c,x,d)}},t)},X=(t={})=>{const r=t.count??30,m=t.decay??2.5,i=t.frequency??10,c=t.scatter??5,x=e.normalize(t.color,"#ff00ff"),d=[];let C=0,h=0,o=!1,a=0;const z=(f,p,g)=>{const n=d.find(b=>!b.isActive);if(!n)return;n.isActive=!0,n.life=1,n.x=f+e.math.random(-c,c),n.y=p+e.math.random(-c,c);const u=e.math.random(0,Math.PI*2),y=e.math.random(.5,1.5);n.vx=Math.cos(u)*y,n.vy=Math.sin(u)*y,n.scale=e.math.random(.5,1.2),n.color=g;const T=e.math.random(2,5);e.css(n.el,{width:`${T}px`,height:`${T}px`,backgroundColor:g,opacity:"1"}),e.setTransform(n.el,n.x,n.y,0,n.scale,n.scale)};return e.definePlugin({name:t.name??"sparkles",create:()=>{const f=e.createActor("div");e.css(f,{zIndex:e.Layers.TRACE});for(let p=0;p<r;p++){const g=e.createCircle(0,"transparent");e.css(g,{opacity:"0",willChange:"transform, opacity"}),f.appendChild(g),d.push({el:g,isActive:!1,x:0,y:0,vx:0,vy:0,life:0,scale:1,color:""})}return f},update:(f,p,g)=>{const n=g/1e3,{x:u,y}=f.state.pointer;o||(C=u,h=y,o=!0);const T=u-C,b=y-h,v=Math.hypot(T,b);if(a+=v,a>i){const S=x(f.state),l=Math.floor(a/i);for(let s=0;s<l;s++){const A=s/l;z(C+T*A,h+b*A,S)}a=a%i}C=u,h=y;for(let S=0;S<r;S++){const l=d[S];if(l.isActive)if(l.x+=l.vx*n*60,l.y+=l.vy*n*60,l.life-=m*n,l.life<=0)l.isActive=!1,e.css(l.el,{opacity:"0"});else{const s=l.scale*l.life;e.css(l.el,{opacity:String(l.life)}),e.setTransform(l.el,l.x,l.y,0,s,s)}}},destroy:()=>{d.length=0}},t)};function Y(t,r){return r?t+" ":t}let B=0;const G=(t={})=>{let r,m,i,c,x,d;const C=`supermouse-text-ring-path-${B++}`,h=e.normalizeAll(t,{text:"SUPERMOUSE • SUPERMOUSE • ",radius:60,fontSize:12,speed:30,opacity:1,color:"currentColor"}),o=t.className??"",a=t.spread??!0;let z=0,f="",p=0,g=0;return e.definePlugin({name:t.name??"text-ring",selector:"[data-supermouse-text-ring]",create:n=>{const u=e.createActor("div");e.css(u,{zIndex:e.Layers.FOLLOWER,transition:"opacity 0.2s ease",opacity:"1",width:"0px",height:"0px",overflow:"visible",display:"flex",alignItems:"center",justifyContent:"center"}),o&&u.classList.add(...o.split(" ").filter(Boolean)),r=e.createSVGElement("svg"),e.css(r,{overflow:"visible",position:"absolute",left:"0",top:"0"}),m=e.path(void 0,{id:C,fill:"none"});const y=h.fontSize(n.state);return g=y,c=e.text({"font-size":`${y}px`,fill:"currentColor"}),e.css(c,{textTransform:"uppercase",letterSpacing:"2px"}),i=e.textPath(`#${C}`,{startOffset:"0%"}),x=document.createTextNode(""),i.appendChild(x),c.appendChild(i),r.appendChild(m),r.appendChild(c),d=e.createSVGElement("text"),e.css(d,{visibility:"hidden",position:"absolute",pointerEvents:"none",whiteSpace:"nowrap"}),d.setAttribute("font-size",`${y}px`),d.setAttribute("font-family",getComputedStyle(c).fontFamily||"sans-serif"),d.setAttribute("font-weight",getComputedStyle(c).fontWeight||"normal"),d.setAttribute("font-style",getComputedStyle(c).fontStyle||"normal"),r.appendChild(d),u.appendChild(r),u},update:(n,u,y)=>{const T=y/1e3;let b=h.text(n.state);const v=h.radius(n.state),S=h.fontSize(n.state),l=h.speed(n.state),s=h.opacity(n.state),A=h.color(n.state);e.css(u,{color:A,opacity:String(s)});const w=n.state.interaction;if(w.textRing&&typeof w.textRing=="string"?b=w.textRing:w.text&&typeof w.text=="string"&&(b=w.text),v!==p){m.setAttribute("d",e.circlePath(v));const M=v*2;e.css(r,{width:`${M}px`,height:`${M}px`}),p=v}const $=Y(b,a);if(S!==g&&(c.setAttribute("font-size",`${S}px`),d.setAttribute("font-size",`${S}px`),g=S),$!==f&&(x.textContent=$,f=$),a){const M=e.circumference(v);d.textContent=$;const D=d.getComputedTextLength(),I=$.length;if(I>1){const k=(M-D)/(I-1);e.css(c,{letterSpacing:`${k}px`})}else e.css(c,{letterSpacing:"0px"});c.removeAttribute("textLength"),i.removeAttribute("textLength"),i.removeAttribute("lengthAdjust")}else e.css(c,{letterSpacing:"2px"}),c.removeAttribute("textLength"),i.removeAttribute("textLength"),i.removeAttribute("lengthAdjust");z+=l*T;const{x:j,y:W}=n.state.smooth;e.setTransform(u,j,W,z)}},t)};L.SmartIcon=q,L.SmartRing=N,L.Sparkles=X,L.TextRing=G,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supermousejs/labs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"main": "dist/index.umd.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
|
+
"description": "Experimentental state machines and effects for supermouse",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
7
8
|
"files": [
|
|
8
9
|
"dist",
|
|
@@ -12,14 +13,13 @@
|
|
|
12
13
|
"url": "https://github.com/Whitestar14/supermouse-js",
|
|
13
14
|
"license": "MIT",
|
|
14
15
|
"dependencies": {
|
|
15
|
-
"@supermousejs/
|
|
16
|
-
"@supermousejs/utils": "2.3.1"
|
|
16
|
+
"@supermousejs/utils": "2.4.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@supermousejs/core": "2.
|
|
19
|
+
"@supermousejs/core": "2.4.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@supermousejs/core": "2.
|
|
22
|
+
"@supermousejs/core": "2.4.0"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|