@aw-webflow/pricing_page_js 1.1.0 → 1.2.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/.claude/settings.local.json +4 -1
- package/package.json +1 -1
- package/script.js +23 -1
|
@@ -20,7 +20,10 @@
|
|
|
20
20
|
"Bash(curl -sL \"https://atomicwork.webflow.io/pricing-new?cb=$\\(date +%s\\)\" -o live.html)",
|
|
21
21
|
"Bash(curl -sL \"https://cdn.prod.website-files.com/64f08da4e7effe6dcb06d456/css/atomicwork.6a195ea2d503d973ad3d9f0b.6d732586d.opt.min.css\" -o page.css)",
|
|
22
22
|
"Bash(gh release create v1.0.1 --title v1.0.1 --notes ' *)",
|
|
23
|
-
"Bash(gh release create v1.1.0 --title v1.1.0 --notes ' *)"
|
|
23
|
+
"Bash(gh release create v1.1.0 --title v1.1.0 --notes ' *)",
|
|
24
|
+
"Bash(npm view *)",
|
|
25
|
+
"mcp__chrome-devtools__evaluate_script",
|
|
26
|
+
"Bash(git commit -m ' *)"
|
|
24
27
|
]
|
|
25
28
|
}
|
|
26
29
|
}
|
package/package.json
CHANGED
package/script.js
CHANGED
|
@@ -249,6 +249,9 @@
|
|
|
249
249
|
var VISIBLE_CLASS = 'is-visible';
|
|
250
250
|
var OPEN_CLASS = 'is-open';
|
|
251
251
|
var INIT_FLAG = 'awTooltipBound';
|
|
252
|
+
// grace period (ms) for the cursor to travel from the trigger across any
|
|
253
|
+
// gap onto the bubble before it closes — lets users reach links inside.
|
|
254
|
+
var HIDE_DELAY = 250;
|
|
252
255
|
|
|
253
256
|
// Hover devices use mouseenter/leave; touch devices use tap-to-toggle.
|
|
254
257
|
var hoverCapable = !(
|
|
@@ -316,6 +319,22 @@
|
|
|
316
319
|
else hide(wrap);
|
|
317
320
|
}
|
|
318
321
|
|
|
322
|
+
// delayed-close helpers so the cursor can cross the gap onto the bubble
|
|
323
|
+
function cancelHide(wrap) {
|
|
324
|
+
if (wrap.awHideTimer) {
|
|
325
|
+
window.clearTimeout(wrap.awHideTimer);
|
|
326
|
+
wrap.awHideTimer = null;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
function scheduleHide(wrap) {
|
|
331
|
+
cancelHide(wrap);
|
|
332
|
+
wrap.awHideTimer = window.setTimeout(function () {
|
|
333
|
+
wrap.awHideTimer = null;
|
|
334
|
+
hide(wrap);
|
|
335
|
+
}, HIDE_DELAY);
|
|
336
|
+
}
|
|
337
|
+
|
|
319
338
|
function bind(wrap) {
|
|
320
339
|
if (wrap[INIT_FLAG]) return;
|
|
321
340
|
var trigger = wrap.querySelector(TRIGGER_SELECTOR);
|
|
@@ -335,11 +354,14 @@
|
|
|
335
354
|
}
|
|
336
355
|
|
|
337
356
|
if (hoverCapable) {
|
|
357
|
+
// mouseenter/leave on the wrap treat the trigger + bubble (a descendant)
|
|
358
|
+
// as one region; the delayed hide bridges any visual gap between them.
|
|
338
359
|
wrap.addEventListener('mouseenter', function () {
|
|
360
|
+
cancelHide(wrap);
|
|
339
361
|
show(wrap);
|
|
340
362
|
});
|
|
341
363
|
wrap.addEventListener('mouseleave', function () {
|
|
342
|
-
|
|
364
|
+
scheduleHide(wrap);
|
|
343
365
|
});
|
|
344
366
|
} else {
|
|
345
367
|
trigger.addEventListener('click', function (e) {
|