@motionstudies/web 0.1.0-alpha.31 → 0.1.0-alpha.32
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.
|
@@ -126,6 +126,14 @@ export function ButtonTooltips() {
|
|
|
126
126
|
window.addEventListener('resize', hide);
|
|
127
127
|
window.addEventListener('blur', hide);
|
|
128
128
|
capability.addEventListener('change', hide);
|
|
129
|
+
// Lazy loading may finish after the first hover or keyboard focus event.
|
|
130
|
+
// Recover the current target instead of requiring the user to leave and return.
|
|
131
|
+
const focused = buttonAt(document.activeElement);
|
|
132
|
+
const hovered = document.querySelector('button:hover');
|
|
133
|
+
if (focused?.matches(':focus-visible'))
|
|
134
|
+
show(focused, 0);
|
|
135
|
+
else if (hovered && !window.matchMedia('(any-pointer: coarse)').matches)
|
|
136
|
+
show(hovered, 400);
|
|
129
137
|
return () => {
|
|
130
138
|
hide();
|
|
131
139
|
observer.disconnect();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motionstudies/web",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.32",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Browser controls and loaders for Motion Studies.",
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"**/*.css"
|
|
184
184
|
],
|
|
185
185
|
"dependencies": {
|
|
186
|
-
"@motionstudies/core": "0.1.0-alpha.
|
|
186
|
+
"@motionstudies/core": "0.1.0-alpha.32"
|
|
187
187
|
},
|
|
188
188
|
"peerDependencies": {
|
|
189
189
|
"react": "^19.3.0",
|