@ariakit/test 0.3.6 → 0.3.7
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 +5 -0
- package/cjs/__chunks/{PJWPDIUX.cjs → 7U3THWRS.cjs} +21 -21
- package/cjs/__chunks/{ZMMVJ3OT.cjs → BXOTZFAK.cjs} +20 -0
- package/cjs/__chunks/{KVNENCXT.cjs → CYMYDRLS.cjs} +5 -5
- package/cjs/__chunks/{SDUGTL2N.cjs → DWIHFDL3.cjs} +2 -2
- package/cjs/__chunks/{T5KVOIJT.cjs → GIKCTITR.cjs} +10 -10
- package/cjs/__chunks/HQ3KUD6F.cjs +20 -0
- package/cjs/__chunks/{DAHHEUOU.cjs → ISKAHQPC.cjs} +15 -15
- package/cjs/__chunks/{VZINRVVH.cjs → K2XRALNE.cjs} +13 -13
- package/cjs/__chunks/{PRDOHIPO.cjs → KFHFWZQN.cjs} +24 -24
- package/cjs/__chunks/{SEWCIANI.cjs → LG7B6NOG.cjs} +2 -2
- package/cjs/__chunks/{747HORQZ.cjs → QCXNVFD7.cjs} +5 -5
- package/cjs/__chunks/{LYOKT276.cjs → UWCNB4SR.cjs} +18 -18
- package/cjs/__chunks/VD3ERVOF.cjs +202 -0
- package/cjs/__chunks/{A5IFXY4J.cjs → YH2W6C46.cjs} +5 -5
- package/cjs/blur.cjs +4 -4
- package/cjs/click.cjs +10 -10
- package/cjs/dispatch.cjs +3 -3
- package/cjs/focus.cjs +4 -4
- package/cjs/hover.cjs +5 -5
- package/cjs/index.cjs +15 -15
- package/cjs/mouse-down.cjs +6 -6
- package/cjs/mouse-up.cjs +4 -4
- package/cjs/press.cjs +8 -8
- package/cjs/query.d.cts +10 -10
- package/cjs/query.d.ts +10 -10
- package/cjs/react.cjs +19 -19
- package/cjs/select.cjs +10 -10
- package/cjs/sleep.cjs +3 -3
- package/cjs/tap.cjs +11 -11
- package/cjs/type.cjs +6 -6
- package/cjs/wait-for.cjs +3 -3
- package/esm/__chunks/{MKNCAN2F.js → 2TVULPB4.js} +1 -1
- package/esm/__chunks/{YNAZUNNE.js → 3EIGH73D.js} +1 -1
- package/esm/__chunks/{LHKK7Y5F.js → 7I2TICIC.js} +20 -0
- package/esm/__chunks/{H3BXHZTZ.js → AMV7YAJV.js} +6 -6
- package/esm/__chunks/{WLDGXXGP.js → G2JU2LVB.js} +1 -1
- package/esm/__chunks/{HVRX3U4O.js → H2ALBSTH.js} +4 -4
- package/esm/__chunks/{WAYMNUAF.js → HZKYXBIJ.js} +2 -2
- package/esm/__chunks/JIRMKL2I.js +202 -0
- package/esm/__chunks/{ANPGABTJ.js → LRKW54RD.js} +3 -3
- package/esm/__chunks/{ZIWQZF7I.js → QE2YCTHV.js} +2 -2
- package/esm/__chunks/{5DPK2YAQ.js → SCOSW7X5.js} +7 -7
- package/esm/__chunks/{LSH2PT34.js → V36IYEJN.js} +2 -2
- package/esm/__chunks/{RG2JKALK.js → V6672LI4.js} +4 -4
- package/esm/__chunks/{YGV4P2D2.js → YRF6BLTM.js} +6 -6
- package/esm/blur.js +3 -3
- package/esm/click.js +9 -9
- package/esm/dispatch.js +2 -2
- package/esm/focus.js +3 -3
- package/esm/hover.js +4 -4
- package/esm/index.js +14 -14
- package/esm/mouse-down.js +5 -5
- package/esm/mouse-up.js +3 -3
- package/esm/press.js +7 -7
- package/esm/query.d.ts +10 -10
- package/esm/react.js +14 -14
- package/esm/select.js +9 -9
- package/esm/sleep.js +2 -2
- package/esm/tap.js +10 -10
- package/esm/type.js +5 -5
- package/esm/wait-for.js +2 -2
- package/package.json +2 -2
- package/cjs/__chunks/FU2U6RZL.cjs +0 -57
- package/cjs/__chunks/NIEATM7R.cjs +0 -20
- package/esm/__chunks/7JP5HWUW.js +0 -57
package/cjs/query.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export declare const query: {
|
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
button: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
|
|
52
52
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
|
|
53
53
|
all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
|
|
54
54
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[];
|
|
@@ -72,7 +72,7 @@ export declare const query: {
|
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
|
-
|
|
75
|
+
code: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
|
|
76
76
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
|
|
77
77
|
all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
|
|
78
78
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[];
|
|
@@ -96,7 +96,7 @@ export declare const query: {
|
|
|
96
96
|
};
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
|
-
|
|
99
|
+
article: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
|
|
100
100
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
|
|
101
101
|
all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
|
|
102
102
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[];
|
|
@@ -120,7 +120,7 @@ export declare const query: {
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
|
-
|
|
123
|
+
blockquote: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
|
|
124
124
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
|
|
125
125
|
all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
|
|
126
126
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[];
|
|
@@ -144,7 +144,7 @@ export declare const query: {
|
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
146
|
};
|
|
147
|
-
|
|
147
|
+
caption: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
|
|
148
148
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
|
|
149
149
|
all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
|
|
150
150
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[];
|
|
@@ -2042,7 +2042,7 @@ export declare const q: {
|
|
|
2042
2042
|
};
|
|
2043
2043
|
};
|
|
2044
2044
|
};
|
|
2045
|
-
|
|
2045
|
+
button: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
|
|
2046
2046
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
|
|
2047
2047
|
all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
|
|
2048
2048
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[];
|
|
@@ -2066,7 +2066,7 @@ export declare const q: {
|
|
|
2066
2066
|
};
|
|
2067
2067
|
};
|
|
2068
2068
|
};
|
|
2069
|
-
|
|
2069
|
+
code: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
|
|
2070
2070
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
|
|
2071
2071
|
all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
|
|
2072
2072
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[];
|
|
@@ -2090,7 +2090,7 @@ export declare const q: {
|
|
|
2090
2090
|
};
|
|
2091
2091
|
};
|
|
2092
2092
|
};
|
|
2093
|
-
|
|
2093
|
+
article: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
|
|
2094
2094
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
|
|
2095
2095
|
all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
|
|
2096
2096
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[];
|
|
@@ -2114,7 +2114,7 @@ export declare const q: {
|
|
|
2114
2114
|
};
|
|
2115
2115
|
};
|
|
2116
2116
|
};
|
|
2117
|
-
|
|
2117
|
+
blockquote: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
|
|
2118
2118
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
|
|
2119
2119
|
all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
|
|
2120
2120
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[];
|
|
@@ -2138,7 +2138,7 @@ export declare const q: {
|
|
|
2138
2138
|
};
|
|
2139
2139
|
};
|
|
2140
2140
|
};
|
|
2141
|
-
|
|
2141
|
+
caption: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
|
|
2142
2142
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
|
|
2143
2143
|
all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
|
|
2144
2144
|
includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[];
|
package/cjs/react.cjs
CHANGED
|
@@ -2,52 +2,52 @@
|
|
|
2
2
|
require('./__chunks/I2BROIQW.cjs');
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _LG7B6NOGcjs = require('./__chunks/LG7B6NOG.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _DWIHFDL3cjs = require('./__chunks/DWIHFDL3.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _7U3THWRScjs = require('./__chunks/7U3THWRS.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _ISKAHQPCcjs = require('./__chunks/ISKAHQPC.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _QCXNVFD7cjs = require('./__chunks/QCXNVFD7.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _GIKCTITRcjs = require('./__chunks/GIKCTITR.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _UWCNB4SRcjs = require('./__chunks/UWCNB4SR.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
var _2KXSRUIVcjs = require('./__chunks/2KXSRUIV.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _KFHFWZQNcjs = require('./__chunks/KFHFWZQN.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _K2XRALNEcjs = require('./__chunks/K2XRALNE.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _CYMYDRLScjs = require('./__chunks/CYMYDRLS.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _YH2W6C46cjs = require('./__chunks/YH2W6C46.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _VD3ERVOFcjs = require('./__chunks/VD3ERVOF.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var
|
|
45
|
+
var _HQ3KUD6Fcjs = require('./__chunks/HQ3KUD6F.cjs');
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
var
|
|
50
|
+
var _BXOTZFAKcjs = require('./__chunks/BXOTZFAK.cjs');
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
@@ -65,11 +65,11 @@ async function render2(ui, options) {
|
|
|
65
65
|
return element;
|
|
66
66
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.StrictMode, { children: element });
|
|
67
67
|
};
|
|
68
|
-
return
|
|
68
|
+
return _BXOTZFAKcjs.wrapAsync.call(void 0, async () => {
|
|
69
69
|
const { unmount } = ReactTestingLibrary.render(ui, _OVN5OYWKcjs.__spreadProps.call(void 0, _OVN5OYWKcjs.__spreadValues.call(void 0, {}, options), { wrapper }));
|
|
70
|
-
await
|
|
71
|
-
await
|
|
72
|
-
await
|
|
70
|
+
await _BXOTZFAKcjs.flushMicrotasks.call(void 0, );
|
|
71
|
+
await _BXOTZFAKcjs.nextFrame.call(void 0, );
|
|
72
|
+
await _BXOTZFAKcjs.flushMicrotasks.call(void 0, );
|
|
73
73
|
return unmount;
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -90,4 +90,4 @@ async function render2(ui, options) {
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
exports.blur =
|
|
93
|
+
exports.blur = _CYMYDRLScjs.blur; exports.click = _7U3THWRScjs.click; exports.dispatch = _VD3ERVOFcjs.dispatch; exports.focus = _YH2W6C46cjs.focus; exports.hover = _UWCNB4SRcjs.hover; exports.mouseDown = _GIKCTITRcjs.mouseDown; exports.mouseUp = _QCXNVFD7cjs.mouseUp; exports.press = _KFHFWZQNcjs.press; exports.q = _2KXSRUIVcjs.q; exports.query = _2KXSRUIVcjs.query; exports.render = render2; exports.select = _ISKAHQPCcjs.select; exports.sleep = _HQ3KUD6Fcjs.sleep; exports.tap = _DWIHFDL3cjs.tap; exports.type = _K2XRALNEcjs.type; exports.waitFor = _LG7B6NOGcjs.waitFor;
|
package/cjs/select.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./__chunks/
|
|
6
|
-
require('./__chunks/
|
|
7
|
-
require('./__chunks/
|
|
8
|
-
require('./__chunks/
|
|
9
|
-
require('./__chunks/
|
|
10
|
-
require('./__chunks/
|
|
11
|
-
require('./__chunks/
|
|
12
|
-
require('./__chunks/
|
|
4
|
+
var _ISKAHQPCcjs = require('./__chunks/ISKAHQPC.cjs');
|
|
5
|
+
require('./__chunks/QCXNVFD7.cjs');
|
|
6
|
+
require('./__chunks/GIKCTITR.cjs');
|
|
7
|
+
require('./__chunks/UWCNB4SR.cjs');
|
|
8
|
+
require('./__chunks/CYMYDRLS.cjs');
|
|
9
|
+
require('./__chunks/YH2W6C46.cjs');
|
|
10
|
+
require('./__chunks/VD3ERVOF.cjs');
|
|
11
|
+
require('./__chunks/HQ3KUD6F.cjs');
|
|
12
|
+
require('./__chunks/BXOTZFAK.cjs');
|
|
13
13
|
require('./__chunks/OVN5OYWK.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.select =
|
|
16
|
+
exports.select = _ISKAHQPCcjs.select;
|
package/cjs/sleep.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./__chunks/
|
|
4
|
+
var _HQ3KUD6Fcjs = require('./__chunks/HQ3KUD6F.cjs');
|
|
5
|
+
require('./__chunks/BXOTZFAK.cjs');
|
|
6
6
|
require('./__chunks/OVN5OYWK.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.sleep =
|
|
9
|
+
exports.sleep = _HQ3KUD6Fcjs.sleep;
|
package/cjs/tap.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./__chunks/
|
|
6
|
-
require('./__chunks/
|
|
7
|
-
require('./__chunks/
|
|
8
|
-
require('./__chunks/
|
|
9
|
-
require('./__chunks/
|
|
10
|
-
require('./__chunks/
|
|
11
|
-
require('./__chunks/
|
|
12
|
-
require('./__chunks/
|
|
13
|
-
require('./__chunks/
|
|
4
|
+
var _DWIHFDL3cjs = require('./__chunks/DWIHFDL3.cjs');
|
|
5
|
+
require('./__chunks/7U3THWRS.cjs');
|
|
6
|
+
require('./__chunks/QCXNVFD7.cjs');
|
|
7
|
+
require('./__chunks/GIKCTITR.cjs');
|
|
8
|
+
require('./__chunks/UWCNB4SR.cjs');
|
|
9
|
+
require('./__chunks/CYMYDRLS.cjs');
|
|
10
|
+
require('./__chunks/YH2W6C46.cjs');
|
|
11
|
+
require('./__chunks/VD3ERVOF.cjs');
|
|
12
|
+
require('./__chunks/HQ3KUD6F.cjs');
|
|
13
|
+
require('./__chunks/BXOTZFAK.cjs');
|
|
14
14
|
require('./__chunks/OVN5OYWK.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.tap =
|
|
17
|
+
exports.tap = _DWIHFDL3cjs.tap;
|
package/cjs/type.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./__chunks/
|
|
6
|
-
require('./__chunks/
|
|
7
|
-
require('./__chunks/
|
|
8
|
-
require('./__chunks/
|
|
4
|
+
var _K2XRALNEcjs = require('./__chunks/K2XRALNE.cjs');
|
|
5
|
+
require('./__chunks/YH2W6C46.cjs');
|
|
6
|
+
require('./__chunks/VD3ERVOF.cjs');
|
|
7
|
+
require('./__chunks/HQ3KUD6F.cjs');
|
|
8
|
+
require('./__chunks/BXOTZFAK.cjs');
|
|
9
9
|
require('./__chunks/OVN5OYWK.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.type =
|
|
12
|
+
exports.type = _K2XRALNEcjs.type;
|
package/cjs/wait-for.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./__chunks/
|
|
4
|
+
var _LG7B6NOGcjs = require('./__chunks/LG7B6NOG.cjs');
|
|
5
|
+
require('./__chunks/BXOTZFAK.cjs');
|
|
6
6
|
require('./__chunks/OVN5OYWK.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.waitFor =
|
|
9
|
+
exports.waitFor = _LG7B6NOGcjs.waitFor;
|
|
@@ -48,6 +48,26 @@ function applyBrowserPolyfills() {
|
|
|
48
48
|
return [];
|
|
49
49
|
return [{ width: 1, height: 1 }];
|
|
50
50
|
};
|
|
51
|
+
if (!Element.prototype.scrollIntoView) {
|
|
52
|
+
Element.prototype.scrollIntoView = noop;
|
|
53
|
+
}
|
|
54
|
+
if (!Element.prototype.hasPointerCapture) {
|
|
55
|
+
Element.prototype.hasPointerCapture = noop;
|
|
56
|
+
}
|
|
57
|
+
if (!Element.prototype.setPointerCapture) {
|
|
58
|
+
Element.prototype.setPointerCapture = noop;
|
|
59
|
+
}
|
|
60
|
+
if (!Element.prototype.releasePointerCapture) {
|
|
61
|
+
Element.prototype.releasePointerCapture = noop;
|
|
62
|
+
}
|
|
63
|
+
if (typeof window.ClipboardEvent === "undefined") {
|
|
64
|
+
window.ClipboardEvent = class ClipboardEvent extends Event {
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (typeof window.PointerEvent === "undefined") {
|
|
68
|
+
window.PointerEvent = class PointerEvent extends MouseEvent {
|
|
69
|
+
};
|
|
70
|
+
}
|
|
51
71
|
return () => {
|
|
52
72
|
HTMLElement.prototype.focus = originalFocus;
|
|
53
73
|
Element.prototype.getClientRects = originalGetClientRects;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
mouseUp
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./V36IYEJN.js";
|
|
5
5
|
import {
|
|
6
6
|
mouseDown
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./V6672LI4.js";
|
|
8
8
|
import {
|
|
9
9
|
hover
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./LRKW54RD.js";
|
|
11
11
|
import {
|
|
12
12
|
dispatch
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./JIRMKL2I.js";
|
|
14
14
|
import {
|
|
15
15
|
sleep
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./3EIGH73D.js";
|
|
17
17
|
import {
|
|
18
18
|
wrapAsync
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./7I2TICIC.js";
|
|
20
20
|
import {
|
|
21
21
|
__spreadValues
|
|
22
22
|
} from "./Q65FZOE2.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
focus
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./HZKYXBIJ.js";
|
|
5
5
|
import {
|
|
6
6
|
dispatch
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./JIRMKL2I.js";
|
|
8
8
|
import {
|
|
9
9
|
sleep
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./3EIGH73D.js";
|
|
11
11
|
import {
|
|
12
12
|
wrapAsync
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./7I2TICIC.js";
|
|
14
14
|
import {
|
|
15
15
|
__spreadValues
|
|
16
16
|
} from "./Q65FZOE2.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
dispatch
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./JIRMKL2I.js";
|
|
5
5
|
import {
|
|
6
6
|
flushMicrotasks,
|
|
7
7
|
wrapAsync
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./7I2TICIC.js";
|
|
9
9
|
|
|
10
10
|
// src/focus.ts
|
|
11
11
|
import { getActiveElement } from "@ariakit/core/utils/dom";
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
flushMicrotasks,
|
|
4
|
+
wrapAsync
|
|
5
|
+
} from "./7I2TICIC.js";
|
|
6
|
+
|
|
7
|
+
// src/dispatch.ts
|
|
8
|
+
import { getKeys, invariant } from "@ariakit/core/utils/misc";
|
|
9
|
+
import { createEvent, fireEvent } from "@testing-library/dom";
|
|
10
|
+
function assignProps(obj, props) {
|
|
11
|
+
for (const [key, value] of Object.entries(props)) {
|
|
12
|
+
Object.defineProperty(obj, key, { get: () => value != null ? value : null });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function sanitizeNumber(n) {
|
|
16
|
+
return Number(n != null ? n : 0);
|
|
17
|
+
}
|
|
18
|
+
function initClipboardEvent(event, { clipboardData }) {
|
|
19
|
+
assignProps(event, {
|
|
20
|
+
clipboardData
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function initInputEvent(event, { data, inputType, isComposing }) {
|
|
24
|
+
assignProps(event, {
|
|
25
|
+
data,
|
|
26
|
+
isComposing: !!isComposing,
|
|
27
|
+
inputType: String(inputType)
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function initUIEvent(event, { view, detail }) {
|
|
31
|
+
assignProps(event, {
|
|
32
|
+
view,
|
|
33
|
+
detail: sanitizeNumber(detail != null ? detail : 0)
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function initUIEventModififiers(event, {
|
|
37
|
+
altKey,
|
|
38
|
+
ctrlKey,
|
|
39
|
+
metaKey,
|
|
40
|
+
shiftKey,
|
|
41
|
+
modifierAltGraph,
|
|
42
|
+
modifierCapsLock,
|
|
43
|
+
modifierFn,
|
|
44
|
+
modifierFnLock,
|
|
45
|
+
modifierNumLock,
|
|
46
|
+
modifierScrollLock,
|
|
47
|
+
modifierSymbol,
|
|
48
|
+
modifierSymbolLock
|
|
49
|
+
}) {
|
|
50
|
+
assignProps(event, {
|
|
51
|
+
altKey: !!altKey,
|
|
52
|
+
ctrlKey: !!ctrlKey,
|
|
53
|
+
metaKey: !!metaKey,
|
|
54
|
+
shiftKey: !!shiftKey,
|
|
55
|
+
getModifierState(k) {
|
|
56
|
+
return Boolean(
|
|
57
|
+
{
|
|
58
|
+
Alt: altKey,
|
|
59
|
+
AltGraph: modifierAltGraph,
|
|
60
|
+
CapsLock: modifierCapsLock,
|
|
61
|
+
Control: ctrlKey,
|
|
62
|
+
Fn: modifierFn,
|
|
63
|
+
FnLock: modifierFnLock,
|
|
64
|
+
Meta: metaKey,
|
|
65
|
+
NumLock: modifierNumLock,
|
|
66
|
+
ScrollLock: modifierScrollLock,
|
|
67
|
+
Shift: shiftKey,
|
|
68
|
+
Symbol: modifierSymbol,
|
|
69
|
+
SymbolLock: modifierSymbolLock
|
|
70
|
+
}[k]
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function initKeyboardEvent(event, { key, code, location, repeat, isComposing }) {
|
|
76
|
+
assignProps(event, {
|
|
77
|
+
key: String(key),
|
|
78
|
+
code: String(code),
|
|
79
|
+
location: sanitizeNumber(location),
|
|
80
|
+
repeat: !!repeat,
|
|
81
|
+
isComposing: !!isComposing
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function initMouseEvent(event, {
|
|
85
|
+
x,
|
|
86
|
+
y,
|
|
87
|
+
screenX,
|
|
88
|
+
screenY,
|
|
89
|
+
clientX = x,
|
|
90
|
+
clientY = y,
|
|
91
|
+
button,
|
|
92
|
+
buttons,
|
|
93
|
+
relatedTarget
|
|
94
|
+
}) {
|
|
95
|
+
assignProps(event, {
|
|
96
|
+
screenX: sanitizeNumber(screenX),
|
|
97
|
+
screenY: sanitizeNumber(screenY),
|
|
98
|
+
clientX: sanitizeNumber(clientX),
|
|
99
|
+
x: sanitizeNumber(clientX),
|
|
100
|
+
clientY: sanitizeNumber(clientY),
|
|
101
|
+
y: sanitizeNumber(clientY),
|
|
102
|
+
button: sanitizeNumber(button),
|
|
103
|
+
buttons: sanitizeNumber(buttons),
|
|
104
|
+
relatedTarget
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function initPointerEvent(event, {
|
|
108
|
+
pointerId,
|
|
109
|
+
width,
|
|
110
|
+
height,
|
|
111
|
+
pressure,
|
|
112
|
+
tangentialPressure,
|
|
113
|
+
tiltX,
|
|
114
|
+
tiltY,
|
|
115
|
+
twist,
|
|
116
|
+
pointerType,
|
|
117
|
+
isPrimary
|
|
118
|
+
}) {
|
|
119
|
+
assignProps(event, {
|
|
120
|
+
pointerId: sanitizeNumber(pointerId),
|
|
121
|
+
width: sanitizeNumber(width),
|
|
122
|
+
height: sanitizeNumber(height),
|
|
123
|
+
pressure: sanitizeNumber(pressure),
|
|
124
|
+
tangentialPressure: sanitizeNumber(tangentialPressure),
|
|
125
|
+
tiltX: sanitizeNumber(tiltX),
|
|
126
|
+
tiltY: sanitizeNumber(tiltY),
|
|
127
|
+
twist: sanitizeNumber(twist),
|
|
128
|
+
pointerType: String(pointerType),
|
|
129
|
+
isPrimary: !!isPrimary
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function initEvent(event, options = {}) {
|
|
133
|
+
if (event instanceof ClipboardEvent) {
|
|
134
|
+
initClipboardEvent(event, options);
|
|
135
|
+
}
|
|
136
|
+
if (event instanceof InputEvent) {
|
|
137
|
+
initInputEvent(event, options);
|
|
138
|
+
}
|
|
139
|
+
if (event instanceof UIEvent) {
|
|
140
|
+
initUIEvent(event, options);
|
|
141
|
+
}
|
|
142
|
+
if (event instanceof KeyboardEvent) {
|
|
143
|
+
initKeyboardEvent(event, options);
|
|
144
|
+
initUIEventModififiers(event, options);
|
|
145
|
+
}
|
|
146
|
+
if (event instanceof MouseEvent) {
|
|
147
|
+
initMouseEvent(event, options);
|
|
148
|
+
initUIEventModififiers(event, options);
|
|
149
|
+
}
|
|
150
|
+
if (event instanceof PointerEvent) {
|
|
151
|
+
initPointerEvent(event, options);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
var pointerEvents = [
|
|
155
|
+
"mousemove",
|
|
156
|
+
"mouseover",
|
|
157
|
+
"mouseenter",
|
|
158
|
+
"mouseout",
|
|
159
|
+
"mouseleave",
|
|
160
|
+
"mousedown",
|
|
161
|
+
"mouseup",
|
|
162
|
+
"pointermove",
|
|
163
|
+
"pointerover",
|
|
164
|
+
"pointerenter",
|
|
165
|
+
"pointerout",
|
|
166
|
+
"pointerleave",
|
|
167
|
+
"pointerdown",
|
|
168
|
+
"pointerup",
|
|
169
|
+
"click"
|
|
170
|
+
];
|
|
171
|
+
function baseDispatch(element, event) {
|
|
172
|
+
return wrapAsync(async () => {
|
|
173
|
+
invariant(element, `Unable to dispatch ${event.type} on null element`);
|
|
174
|
+
const eventName = event.type.toLowerCase();
|
|
175
|
+
if (pointerEvents.includes(eventName) && "classList" in element) {
|
|
176
|
+
const { pointerEvents: pointerEvents2 } = getComputedStyle(element);
|
|
177
|
+
if (pointerEvents2 === "none") {
|
|
178
|
+
if (element.parentElement) {
|
|
179
|
+
return baseDispatch(element.parentElement, event);
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
const defaultAllowed = fireEvent(element, event);
|
|
185
|
+
await flushMicrotasks();
|
|
186
|
+
return defaultAllowed;
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
var events = getKeys(fireEvent).reduce((events2, eventName) => {
|
|
190
|
+
events2[eventName] = (element, options) => {
|
|
191
|
+
invariant(element, `Unable to dispatch ${eventName} on null element`);
|
|
192
|
+
const event = createEvent[eventName](element, options);
|
|
193
|
+
initEvent(event, options);
|
|
194
|
+
return baseDispatch(element, event);
|
|
195
|
+
};
|
|
196
|
+
return events2;
|
|
197
|
+
}, {});
|
|
198
|
+
var dispatch = Object.assign(baseDispatch, events);
|
|
199
|
+
|
|
200
|
+
export {
|
|
201
|
+
dispatch
|
|
202
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
dispatch
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./JIRMKL2I.js";
|
|
5
5
|
import {
|
|
6
6
|
sleep
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./3EIGH73D.js";
|
|
8
8
|
import {
|
|
9
9
|
wrapAsync
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./7I2TICIC.js";
|
|
11
11
|
import {
|
|
12
12
|
__spreadProps,
|
|
13
13
|
__spreadValues
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
dispatch
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./JIRMKL2I.js";
|
|
5
5
|
import {
|
|
6
6
|
flushMicrotasks,
|
|
7
7
|
wrapAsync
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./7I2TICIC.js";
|
|
9
9
|
|
|
10
10
|
// src/blur.ts
|
|
11
11
|
import { getActiveElement } from "@ariakit/core/utils/dom";
|