@supermousejs/ring 2.4.4-beta.4 → 2.4.4-beta.5
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 +31 -0
- package/dist/index.mjs +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @supermousejs/ring
|
|
2
2
|
|
|
3
|
+
## 2.4.4-beta.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d82c62d: ---
|
|
8
|
+
|
|
9
|
+
Beta.5 — cursor policy flattening, suppression simplification, and API renames.
|
|
10
|
+
|
|
11
|
+
## Changed — breaking
|
|
12
|
+
- `cursorPolicy` option renamed to `nativeCursorSelectors` and flattened to a plain `string[]`. Migration: `cursorPolicy: { native: [".x"] }` → `nativeCursorSelectors: [".x"]`. The `hide` key is gone; cursor suppression is unconditional and no longer configurable.
|
|
13
|
+
- `CursorPolicy` and `CursorPolicyInput` types removed from the public export surface. Code importing them fails at compile time. The only remaining shape is `string[]`.
|
|
14
|
+
- `DEFAULT_CURSOR_POLICY` renamed to `DEFAULT_NATIVE_CURSOR_SELECTORS`. Value reduced to `["select", "[contenteditable]"]`.
|
|
15
|
+
- `registerHoverTarget(selector)` renamed to `addHoverSelectors(selectors)`. Same behavior — comma-separated selectors are added to the current scope's shared hover set. The new name matches `hoverSelectors` and reflects that it mutates a set rather than registering a single element.
|
|
16
|
+
- `@supermousejs/utils`: `VisualConfig.selector` renamed to `hoverSelector`. Update `definePlugin({ ..., selector: "x" })` to `definePlugin({ ..., hoverSelector: "x" })`.
|
|
17
|
+
|
|
18
|
+
## Changed — behavior
|
|
19
|
+
- `input` and `textarea` removed from the default native cursor list. Text inputs and textareas are unaffected — their UA cursor is `text`, which the probe reads and treats as a fallback trigger. Button-like inputs (`<input type="button">`, `<input type="submit">`) and checkboxes/radios change: their UA cursor is `default`, which the probe classifies as non-fallback, so the custom cursor now shows over them. This matches the pre-existing treatment of `<button>`.
|
|
20
|
+
- Cursor suppression is now a single wildcard rule per scope instead of a wildcard plus per-selector rules. Behavior is unchanged — verified in Chromium and Firefox against `<a>`, `<button>`, `<input>` (all types), `<textarea>`, `<select>`, `[contenteditable]`, `[role="button"]`, `[tabindex]`, `<label>`, and a `<canvas>` with site CSS. Range slider thumb pseudo-elements retain their explicit rules (`*` does not match pseudo-elements).
|
|
21
|
+
|
|
22
|
+
## Fixed
|
|
23
|
+
- `handleMouseOut` no longer leaves `state.isHover` and `state.isNative` stale when the pointer leaves from a descendant of the tracked element. Moving from `<span>` inside `<button>` directly outside the button previously failed to clear `hoverTarget` — the containment check was inverted.
|
|
24
|
+
|
|
25
|
+
## Internal
|
|
26
|
+
- `policy.ts` removed from `@supermousejs/core`. The default moved to `constants.ts`; `normalizePolicy` dissolved into `??` fallbacks at the call sites.
|
|
27
|
+
- `Scope.hideSelectors` field removed.
|
|
28
|
+
- Size budget re-tightened to 6.2 kB gzip / 5.5 kB brotli.
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [d82c62d]
|
|
31
|
+
- @supermousejs/utils@2.4.4-beta.5
|
|
32
|
+
- @supermousejs/core@2.5.0-beta.5
|
|
33
|
+
|
|
3
34
|
## 2.4.4-beta.4
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/dist/index.mjs
CHANGED
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("@supermousejs/utils")):typeof define=="function"&&define.amd?define(["exports","@supermousejs/utils"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.SupermouseRing={},t.SupermouseUtils))})(this,(function(t,e){"use strict";const d=(i={})=>{const r=e.normalizeAll(i,{size:20,color:"#ffffff",borderWidth:2,opacity:1});return e.definePlugin({name:i.name||"ring",
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("@supermousejs/utils")):typeof define=="function"&&define.amd?define(["exports","@supermousejs/utils"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.SupermouseRing={},t.SupermouseUtils))})(this,(function(t,e){"use strict";const d=(i={})=>{const r=e.normalizeAll(i,{size:20,color:"#ffffff",borderWidth:2,opacity:1});return e.definePlugin({name:i.name||"ring",hoverSelector:"[data-supermouse-color]",create:o=>{const s=e.dom.createCircle(r.size(o.state),"transparent");return e.dom.css(s,{zIndex:e.Layers.FOLLOWER,mixBlendMode:i.mixBlendMode||"difference",borderStyle:"solid",transition:"opacity 0.2s ease",boxSizing:"border-box"}),s},update:(o,s)=>{const n=r.size(o.state),c=o.state.interaction.color||r.color(o.state);e.dom.css(s,{width:`${n}px`,height:`${n}px`,borderColor:c,borderWidth:`${r.borderWidth(o.state)}px`,opacity:String(r.opacity(o.state)),borderRadius:"50%"});const{x:f,y:a}=o.state.smooth;e.dom.setTransform(s,f,a)}},i)};t.Ring=d,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supermousejs/ring",
|
|
3
|
-
"version": "2.4.4-beta.
|
|
3
|
+
"version": "2.4.4-beta.5",
|
|
4
4
|
"main": "dist/index.umd.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"url": "https://github.com/Whitestar14/supermouse-js",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@supermousejs/utils": "2.4.4-beta.
|
|
17
|
+
"@supermousejs/utils": "2.4.4-beta.5"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@supermousejs/core": "2.5.0-beta.
|
|
20
|
+
"@supermousejs/core": "2.5.0-beta.5"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@supermousejs/core": "2.5.0-beta.
|
|
23
|
+
"@supermousejs/core": "2.5.0-beta.5"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|