@ariakit/test 0.3.16 → 0.4.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/cjs/__chunks/{2PZMNP6W.cjs → 4TS37S3Q.cjs} +27 -30
- package/cjs/__chunks/{LG7B6NOG.cjs → 6LDGWG7T.cjs} +2 -2
- package/cjs/__chunks/{CYMYDRLS.cjs → 6UE2XSIU.cjs} +8 -11
- package/cjs/__chunks/AGLSU3Q2.cjs +68 -0
- package/cjs/__chunks/{BXOTZFAK.cjs → AV5N3TNH.cjs} +7 -14
- package/cjs/__chunks/{VD3ERVOF.cjs → ELVRZW56.cjs} +3 -3
- package/cjs/__chunks/{7KITCMSC.cjs → GFFCFEOC.cjs} +12 -13
- package/cjs/__chunks/{IL4UOQ5U.cjs → JFCVJ4KU.cjs} +20 -24
- package/cjs/__chunks/{BIB7E6LN.cjs → KRKGFFBK.cjs} +10 -16
- package/cjs/__chunks/{QCXNVFD7.cjs → LJ2IERQF.cjs} +8 -10
- package/cjs/__chunks/{IZ5UGCXW.cjs → QOXIFOCW.cjs} +2 -2
- package/cjs/__chunks/{ZNASNKOZ.cjs → QRXZHH5L.cjs} +22 -29
- package/cjs/__chunks/{DJWEA66K.cjs → RKZYK2KK.cjs} +30 -34
- package/cjs/__chunks/WO6I3N3U.cjs +20 -0
- package/cjs/__chunks/{IZMYJH6V.cjs → Z3RYFL2T.cjs} +7 -9
- package/cjs/blur.cjs +5 -5
- package/cjs/click.cjs +11 -11
- package/cjs/dispatch.cjs +4 -4
- package/cjs/focus.cjs +5 -5
- package/cjs/hover.cjs +6 -6
- package/cjs/index.cjs +17 -17
- package/cjs/mouse-down.cjs +7 -7
- package/cjs/mouse-up.cjs +5 -5
- package/cjs/playwright.cjs +2 -2
- package/cjs/press.cjs +9 -9
- package/cjs/press.d.cts +15 -15
- package/cjs/press.d.ts +15 -15
- package/cjs/query.cjs +3 -3
- package/cjs/query.d.cts +33 -32
- package/cjs/query.d.ts +33 -32
- package/cjs/react.cjs +36 -26
- package/cjs/react.d.cts +4 -1
- package/cjs/react.d.ts +4 -1
- package/cjs/select.cjs +11 -11
- package/cjs/sleep.cjs +4 -4
- package/cjs/tap.cjs +12 -12
- package/cjs/type.cjs +7 -7
- package/cjs/wait-for.cjs +4 -4
- package/esm/__chunks/{YGSLLIRN.js → 2TPVB4MR.js} +6 -7
- package/esm/__chunks/{JIRMKL2I.js → 7NQ5CXYI.js} +1 -1
- package/esm/__chunks/{HKMYG3ZJ.js → DHZBG4QM.js} +11 -14
- package/esm/__chunks/{3EIGH73D.js → DZ24E43J.js} +1 -1
- package/esm/__chunks/{U5OPLWAZ.js → EMPG4BYT.js} +11 -15
- package/esm/__chunks/{6GDQHEBE.js → G32GEXRJ.js} +7 -13
- package/esm/__chunks/{7I2TICIC.js → HFG3HB6M.js} +7 -14
- package/esm/__chunks/{QE2YCTHV.js → HI4LQVNU.js} +5 -8
- package/esm/__chunks/{VD2VFA32.js → HO5N5GTX.js} +4 -6
- package/esm/__chunks/{64UIOMYC.js → NSFKY4TP.js} +1 -1
- package/esm/__chunks/{G2JU2LVB.js → SB7WYA2U.js} +1 -1
- package/esm/__chunks/{VVYOYAEF.js → UQRVXJ7Z.js} +13 -20
- package/esm/__chunks/{LRKW54RD.js → VMVRY4TL.js} +5 -6
- package/esm/__chunks/{DMIPXMWG.js → W46IR3LA.js} +11 -15
- package/esm/__chunks/{V36IYEJN.js → ZPXIP5WW.js} +5 -7
- package/esm/blur.js +4 -4
- package/esm/click.js +10 -10
- package/esm/dispatch.js +3 -3
- package/esm/focus.js +4 -4
- package/esm/hover.js +5 -5
- package/esm/index.js +16 -16
- package/esm/mouse-down.js +6 -6
- package/esm/mouse-up.js +4 -4
- package/esm/playwright.js +1 -1
- package/esm/press.d.ts +15 -15
- package/esm/press.js +8 -8
- package/esm/query.d.ts +33 -32
- package/esm/query.js +2 -2
- package/esm/react.d.ts +4 -1
- package/esm/react.js +34 -24
- package/esm/select.js +10 -10
- package/esm/sleep.js +3 -3
- package/esm/tap.js +11 -11
- package/esm/type.js +6 -6
- package/esm/wait-for.js +3 -3
- package/package.json +3 -3
- package/readme.md +18 -0
- package/cjs/__chunks/HQ3KUD6F.cjs +0 -20
- package/cjs/__chunks/UWCNB4SR.cjs +0 -69
- /package/cjs/__chunks/{OVN5OYWK.cjs → DOXEES2I.cjs} +0 -0
- /package/esm/__chunks/{Q65FZOE2.js → SM5ASDQ3.js} +0 -0
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _VD3ERVOFcjs = require('./VD3ERVOF.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _HQ3KUD6Fcjs = require('./HQ3KUD6F.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _BXOTZFAKcjs = require('./BXOTZFAK.cjs');
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _OVN5OYWKcjs = require('./OVN5OYWK.cjs');
|
|
15
|
-
|
|
16
|
-
// src/hover.ts
|
|
17
|
-
var _dom = require('@ariakit/core/utils/dom');
|
|
18
|
-
var _misc = require('@ariakit/core/utils/misc');
|
|
19
|
-
function isPointerEventsEnabled(element) {
|
|
20
|
-
return getComputedStyle(element).pointerEvents !== "none";
|
|
21
|
-
}
|
|
22
|
-
function hover(element, options) {
|
|
23
|
-
return _BXOTZFAKcjs.wrapAsync.call(void 0, async () => {
|
|
24
|
-
_misc.invariant.call(void 0, element, "Unable to hover on null element");
|
|
25
|
-
if (!_dom.isVisible.call(void 0, element))
|
|
26
|
-
return;
|
|
27
|
-
const document = element.ownerDocument;
|
|
28
|
-
const { lastHovered } = document;
|
|
29
|
-
const { disabled } = element;
|
|
30
|
-
const pointerEventsEnabled = isPointerEventsEnabled(element);
|
|
31
|
-
if (lastHovered && lastHovered !== element && _dom.isVisible.call(void 0, lastHovered)) {
|
|
32
|
-
await _VD3ERVOFcjs.dispatch.pointerMove(lastHovered, options);
|
|
33
|
-
await _VD3ERVOFcjs.dispatch.mouseMove(lastHovered, options);
|
|
34
|
-
if (isPointerEventsEnabled(lastHovered)) {
|
|
35
|
-
const isElementWithinLastHovered = lastHovered.contains(element);
|
|
36
|
-
const relatedTarget = pointerEventsEnabled ? element : null;
|
|
37
|
-
const leaveOptions = _OVN5OYWKcjs.__spreadProps.call(void 0, _OVN5OYWKcjs.__spreadValues.call(void 0, {}, options), { relatedTarget });
|
|
38
|
-
await _VD3ERVOFcjs.dispatch.pointerOut(lastHovered, leaveOptions);
|
|
39
|
-
if (!isElementWithinLastHovered) {
|
|
40
|
-
await _VD3ERVOFcjs.dispatch.pointerLeave(lastHovered, leaveOptions);
|
|
41
|
-
}
|
|
42
|
-
await _VD3ERVOFcjs.dispatch.mouseOut(lastHovered, leaveOptions);
|
|
43
|
-
if (!isElementWithinLastHovered) {
|
|
44
|
-
await _VD3ERVOFcjs.dispatch.mouseLeave(lastHovered, leaveOptions);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
await _HQ3KUD6Fcjs.sleep.call(void 0, );
|
|
49
|
-
if (pointerEventsEnabled) {
|
|
50
|
-
const enterOptions = lastHovered ? _OVN5OYWKcjs.__spreadValues.call(void 0, { relatedTarget: lastHovered }, options) : options;
|
|
51
|
-
await _VD3ERVOFcjs.dispatch.pointerOver(element, enterOptions);
|
|
52
|
-
await _VD3ERVOFcjs.dispatch.pointerEnter(element, enterOptions);
|
|
53
|
-
if (!disabled) {
|
|
54
|
-
await _VD3ERVOFcjs.dispatch.mouseOver(element, enterOptions);
|
|
55
|
-
await _VD3ERVOFcjs.dispatch.mouseEnter(element, enterOptions);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
await _VD3ERVOFcjs.dispatch.pointerMove(element, options);
|
|
59
|
-
if (!disabled) {
|
|
60
|
-
await _VD3ERVOFcjs.dispatch.mouseMove(element, options);
|
|
61
|
-
}
|
|
62
|
-
document.lastHovered = element;
|
|
63
|
-
await _HQ3KUD6Fcjs.sleep.call(void 0, );
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
exports.hover = hover;
|
|
File without changes
|
|
File without changes
|