@ariakit/test 0.4.12 → 0.4.14
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/{5USXAKSO.cjs → 2IN4H4R6.cjs} +2 -2
- package/cjs/__chunks/{72WSX5BL.cjs → 6QOONVMF.cjs} +4 -4
- package/cjs/__chunks/{JBTD632X.cjs → DSQOZQEG.cjs} +13 -13
- package/cjs/__chunks/{YHTBQKQP.cjs → F73PRXNA.cjs} +25 -25
- package/cjs/__chunks/{GN27CO5F.cjs → MBCGZGHZ.cjs} +2 -2
- package/cjs/__chunks/{E652CU4S.cjs → NPMMMFBZ.cjs} +16 -16
- package/cjs/__chunks/{PSUVKPBQ.cjs → O4APJR6T.cjs} +8 -8
- package/cjs/__chunks/{SMHVZDHR.cjs → SG6WEFN4.cjs} +2 -2
- package/cjs/__chunks/{PU4UTGCJ.cjs → T3BVTVZS.cjs} +11 -12
- package/cjs/__chunks/{6RS5IIND.cjs → UW25SJAG.cjs} +13 -13
- package/cjs/__chunks/{FXNLNUN4.cjs → ZKHHPDFP.cjs} +3 -3
- package/cjs/__tests__/use-all-events.d.cts +1 -1
- package/cjs/__tests__/use-all-events.d.ts +1 -1
- package/cjs/blur.cjs +3 -3
- package/cjs/click.cjs +8 -8
- package/cjs/dispatch.cjs +2 -2
- package/cjs/focus.cjs +3 -3
- package/cjs/hover.cjs +3 -3
- package/cjs/index.cjs +12 -12
- package/cjs/mouse-down.cjs +5 -5
- package/cjs/mouse-up.cjs +3 -3
- package/cjs/playwright.cjs +5 -1
- package/cjs/playwright.d.cts +87 -3
- package/cjs/playwright.d.ts +87 -3
- package/cjs/press.cjs +6 -6
- package/cjs/react.cjs +15 -15
- package/cjs/select.cjs +8 -8
- package/cjs/tap.cjs +9 -9
- package/cjs/type.cjs +4 -4
- package/esm/__chunks/{3NBNNSLU.js → 2FBLN3UR.js} +6 -6
- package/esm/__chunks/{22KDRPLA.js → 3NGJUWNA.js} +4 -5
- package/esm/__chunks/{4SG6SLGL.js → 5U5BJCVZ.js} +1 -1
- package/esm/__chunks/{SU4WSQ6S.js → BQHO6MWF.js} +3 -3
- package/esm/__chunks/{XHCPZXKA.js → BYTNK3ZM.js} +10 -10
- package/esm/__chunks/{LK25WCYN.js → HODMXKAI.js} +3 -3
- package/esm/__chunks/{CLGZ6LZL.js → IUYQ4ULP.js} +1 -1
- package/esm/__chunks/{CLBHQ7IU.js → ODJLIQ7E.js} +5 -5
- package/esm/__chunks/{SOWA2DKF.js → PKHBOCZ2.js} +1 -1
- package/esm/__chunks/{LFDLFIXJ.js → UCWFNZO5.js} +1 -1
- package/esm/__chunks/{DHY47Z5Z.js → VYKLOQJB.js} +1 -1
- package/esm/__tests__/use-all-events.d.ts +1 -1
- package/esm/blur.js +2 -2
- package/esm/click.js +7 -7
- package/esm/dispatch.js +1 -1
- package/esm/focus.js +2 -2
- package/esm/hover.js +2 -2
- package/esm/index.js +11 -11
- package/esm/mouse-down.js +4 -4
- package/esm/mouse-up.js +2 -2
- package/esm/playwright.d.ts +87 -3
- package/esm/playwright.js +5 -1
- package/esm/press.js +5 -5
- package/esm/react.js +14 -14
- package/esm/select.js +7 -7
- package/esm/tap.js +8 -8
- package/esm/type.js +3 -3
- package/package.json +26 -23
- package/tsconfig.build.json +7 -2
- package/tsconfig.node.json +5 -0
- package/tsconfig.react.json +5 -0
- package/tsconfig.test.json +5 -0
- package/tsconfig.test.react.json +5 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
type
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./3NGJUWNA.js";
|
|
5
5
|
import {
|
|
6
6
|
sleep
|
|
7
7
|
} from "./DZ24E43J.js";
|
|
8
8
|
import {
|
|
9
9
|
blur
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./PKHBOCZ2.js";
|
|
11
11
|
import {
|
|
12
12
|
focus
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./5U5BJCVZ.js";
|
|
14
14
|
import {
|
|
15
15
|
dispatch
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./HODMXKAI.js";
|
|
17
17
|
import {
|
|
18
18
|
wrapAsync
|
|
19
19
|
} from "./HFG3HB6M.js";
|
|
@@ -79,21 +79,21 @@ var keyDownMap = {
|
|
|
79
79
|
async Home(element, { shiftKey }) {
|
|
80
80
|
if (isTextField(element)) {
|
|
81
81
|
const { value, selectionEnd } = element;
|
|
82
|
-
const end = Math.min(value.length, shiftKey ? selectionEnd
|
|
82
|
+
const end = Math.min(value.length, shiftKey ? selectionEnd ?? 0 : 0);
|
|
83
83
|
setSelectionRange(element, 0, end, "backward");
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
async End(element, { shiftKey }) {
|
|
87
87
|
if (isTextField(element)) {
|
|
88
88
|
const { value, selectionStart } = element;
|
|
89
|
-
const start = shiftKey ? selectionStart
|
|
89
|
+
const start = shiftKey ? selectionStart ?? 0 : value.length;
|
|
90
90
|
setSelectionRange(element, start, value.length, "forward");
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
async ArrowLeft(element, { shiftKey }) {
|
|
94
94
|
if (isTextField(element)) {
|
|
95
95
|
const { value, selectionStart, selectionEnd, selectionDirection } = element;
|
|
96
|
-
const [start, end] = [selectionStart
|
|
96
|
+
const [start, end] = [selectionStart ?? 0, selectionEnd ?? 0];
|
|
97
97
|
const collapsing = !shiftKey && start !== end;
|
|
98
98
|
const nextStart = Math.max(0, collapsing ? start : start - 1);
|
|
99
99
|
const nextEnd = Math.min(value.length, shiftKey ? end : nextStart);
|
|
@@ -108,7 +108,7 @@ var keyDownMap = {
|
|
|
108
108
|
async ArrowRight(element, { shiftKey }) {
|
|
109
109
|
if (isTextField(element)) {
|
|
110
110
|
const { value, selectionStart, selectionEnd, selectionDirection } = element;
|
|
111
|
-
const [start, end] = [selectionStart
|
|
111
|
+
const [start, end] = [selectionStart ?? 0, selectionEnd ?? 0];
|
|
112
112
|
const collapsing = !shiftKey && start !== end;
|
|
113
113
|
const nextEnd = Math.min(value.length, collapsing ? end : end + 1);
|
|
114
114
|
const nextStart = Math.max(0, shiftKey ? start : nextEnd);
|
|
@@ -126,7 +126,7 @@ var keyDownMap = {
|
|
|
126
126
|
return setSelectionRange(element, 0, 0);
|
|
127
127
|
}
|
|
128
128
|
const { selectionStart, selectionEnd, selectionDirection } = element;
|
|
129
|
-
const [start, end] = [selectionStart
|
|
129
|
+
const [start, end] = [selectionStart ?? 0, selectionEnd ?? 0];
|
|
130
130
|
if (selectionDirection === "forward") {
|
|
131
131
|
setSelectionRange(element, start, start);
|
|
132
132
|
} else {
|
|
@@ -143,7 +143,7 @@ var keyDownMap = {
|
|
|
143
143
|
setSelectionRange(element, length, length);
|
|
144
144
|
} else {
|
|
145
145
|
const { selectionStart, selectionEnd, selectionDirection } = element;
|
|
146
|
-
const [start, end] = [selectionStart
|
|
146
|
+
const [start, end] = [selectionStart ?? 0, selectionEnd ?? 0];
|
|
147
147
|
if (selectionDirection === "backward") {
|
|
148
148
|
setSelectionRange(element, end, end);
|
|
149
149
|
} else {
|
|
@@ -9,11 +9,11 @@ import { getKeys, invariant } from "@ariakit/core/utils/misc";
|
|
|
9
9
|
import { createEvent, fireEvent } from "@testing-library/dom";
|
|
10
10
|
function assignProps(obj, props) {
|
|
11
11
|
for (const [key, value] of Object.entries(props)) {
|
|
12
|
-
Object.defineProperty(obj, key, { get: () => value
|
|
12
|
+
Object.defineProperty(obj, key, { get: () => value ?? null });
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
function sanitizeNumber(n) {
|
|
16
|
-
return Number(n
|
|
16
|
+
return Number(n ?? 0);
|
|
17
17
|
}
|
|
18
18
|
function initClipboardEvent(event, { clipboardData }) {
|
|
19
19
|
assignProps(event, {
|
|
@@ -30,7 +30,7 @@ function initInputEvent(event, { data, inputType, isComposing }) {
|
|
|
30
30
|
function initUIEvent(event, { view, detail }) {
|
|
31
31
|
assignProps(event, {
|
|
32
32
|
view,
|
|
33
|
-
detail: sanitizeNumber(detail
|
|
33
|
+
detail: sanitizeNumber(detail ?? 0)
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
function initUIEventModififiers(event, {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
hover
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./IUYQ4ULP.js";
|
|
5
5
|
import {
|
|
6
6
|
sleep
|
|
7
7
|
} from "./DZ24E43J.js";
|
|
8
8
|
import {
|
|
9
9
|
mouseDown
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./BQHO6MWF.js";
|
|
11
11
|
import {
|
|
12
12
|
focus
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./5U5BJCVZ.js";
|
|
14
14
|
import {
|
|
15
15
|
mouseUp
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./VYKLOQJB.js";
|
|
17
17
|
import {
|
|
18
18
|
dispatch
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./HODMXKAI.js";
|
|
20
20
|
import {
|
|
21
21
|
wrapAsync
|
|
22
22
|
} from "./HFG3HB6M.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useAllEvents(ref: React.RefObject<Element>, stack: string[]): void;
|
|
1
|
+
export declare function useAllEvents(ref: React.RefObject<Element | null>, stack: string[]): void;
|
package/esm/blur.js
CHANGED
package/esm/click.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
click
|
|
4
|
-
} from "./__chunks/
|
|
5
|
-
import "./__chunks/
|
|
4
|
+
} from "./__chunks/ODJLIQ7E.js";
|
|
5
|
+
import "./__chunks/IUYQ4ULP.js";
|
|
6
6
|
import "./__chunks/DZ24E43J.js";
|
|
7
|
-
import "./__chunks/
|
|
8
|
-
import "./__chunks/
|
|
9
|
-
import "./__chunks/
|
|
10
|
-
import "./__chunks/
|
|
11
|
-
import "./__chunks/
|
|
7
|
+
import "./__chunks/BQHO6MWF.js";
|
|
8
|
+
import "./__chunks/PKHBOCZ2.js";
|
|
9
|
+
import "./__chunks/5U5BJCVZ.js";
|
|
10
|
+
import "./__chunks/VYKLOQJB.js";
|
|
11
|
+
import "./__chunks/HODMXKAI.js";
|
|
12
12
|
import "./__chunks/HFG3HB6M.js";
|
|
13
13
|
export {
|
|
14
14
|
click
|
package/esm/dispatch.js
CHANGED
package/esm/focus.js
CHANGED
package/esm/hover.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
hover
|
|
4
|
-
} from "./__chunks/
|
|
4
|
+
} from "./__chunks/IUYQ4ULP.js";
|
|
5
5
|
import "./__chunks/DZ24E43J.js";
|
|
6
|
-
import "./__chunks/
|
|
6
|
+
import "./__chunks/HODMXKAI.js";
|
|
7
7
|
import "./__chunks/HFG3HB6M.js";
|
|
8
8
|
export {
|
|
9
9
|
hover
|
package/esm/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./__chunks/SB7WYA2U.js";
|
|
6
6
|
import {
|
|
7
7
|
press
|
|
8
|
-
} from "./__chunks/
|
|
8
|
+
} from "./__chunks/BYTNK3ZM.js";
|
|
9
9
|
import {
|
|
10
10
|
q,
|
|
11
11
|
query
|
|
@@ -13,37 +13,37 @@ import {
|
|
|
13
13
|
import "./__chunks/CWTUOQ5Z.js";
|
|
14
14
|
import {
|
|
15
15
|
select
|
|
16
|
-
} from "./__chunks/
|
|
16
|
+
} from "./__chunks/2FBLN3UR.js";
|
|
17
17
|
import {
|
|
18
18
|
tap
|
|
19
|
-
} from "./__chunks/
|
|
19
|
+
} from "./__chunks/UCWFNZO5.js";
|
|
20
20
|
import {
|
|
21
21
|
type
|
|
22
|
-
} from "./__chunks/
|
|
22
|
+
} from "./__chunks/3NGJUWNA.js";
|
|
23
23
|
import {
|
|
24
24
|
click
|
|
25
|
-
} from "./__chunks/
|
|
25
|
+
} from "./__chunks/ODJLIQ7E.js";
|
|
26
26
|
import {
|
|
27
27
|
hover
|
|
28
|
-
} from "./__chunks/
|
|
28
|
+
} from "./__chunks/IUYQ4ULP.js";
|
|
29
29
|
import {
|
|
30
30
|
sleep
|
|
31
31
|
} from "./__chunks/DZ24E43J.js";
|
|
32
32
|
import {
|
|
33
33
|
mouseDown
|
|
34
|
-
} from "./__chunks/
|
|
34
|
+
} from "./__chunks/BQHO6MWF.js";
|
|
35
35
|
import {
|
|
36
36
|
blur
|
|
37
|
-
} from "./__chunks/
|
|
37
|
+
} from "./__chunks/PKHBOCZ2.js";
|
|
38
38
|
import {
|
|
39
39
|
focus
|
|
40
|
-
} from "./__chunks/
|
|
40
|
+
} from "./__chunks/5U5BJCVZ.js";
|
|
41
41
|
import {
|
|
42
42
|
mouseUp
|
|
43
|
-
} from "./__chunks/
|
|
43
|
+
} from "./__chunks/VYKLOQJB.js";
|
|
44
44
|
import {
|
|
45
45
|
dispatch
|
|
46
|
-
} from "./__chunks/
|
|
46
|
+
} from "./__chunks/HODMXKAI.js";
|
|
47
47
|
import "./__chunks/HFG3HB6M.js";
|
|
48
48
|
export {
|
|
49
49
|
blur,
|
package/esm/mouse-down.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
mouseDown
|
|
4
|
-
} from "./__chunks/
|
|
5
|
-
import "./__chunks/
|
|
6
|
-
import "./__chunks/
|
|
7
|
-
import "./__chunks/
|
|
4
|
+
} from "./__chunks/BQHO6MWF.js";
|
|
5
|
+
import "./__chunks/PKHBOCZ2.js";
|
|
6
|
+
import "./__chunks/5U5BJCVZ.js";
|
|
7
|
+
import "./__chunks/HODMXKAI.js";
|
|
8
8
|
import "./__chunks/HFG3HB6M.js";
|
|
9
9
|
export {
|
|
10
10
|
mouseDown
|
package/esm/mouse-up.js
CHANGED
package/esm/playwright.d.ts
CHANGED
|
@@ -1,6 +1,90 @@
|
|
|
1
1
|
import type { FrameLocator, Locator, Page } from "@playwright/test";
|
|
2
|
-
import type { AriaRole } from "./__aria-role.ts";
|
|
3
2
|
type RoleQuery = (name?: string | RegExp, options?: Parameters<Page["getByRole"]>[1]) => Locator;
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare function query(locator: Page | Locator | FrameLocator): {
|
|
4
|
+
text: (text: string | RegExp, options?: {
|
|
5
|
+
exact?: boolean;
|
|
6
|
+
} | undefined) => Locator;
|
|
7
|
+
alert: RoleQuery;
|
|
8
|
+
alertdialog: RoleQuery;
|
|
9
|
+
application: RoleQuery;
|
|
10
|
+
article: RoleQuery;
|
|
11
|
+
banner: RoleQuery;
|
|
12
|
+
blockquote: RoleQuery;
|
|
13
|
+
button: RoleQuery;
|
|
14
|
+
caption: RoleQuery;
|
|
15
|
+
cell: RoleQuery;
|
|
16
|
+
checkbox: RoleQuery;
|
|
17
|
+
code: RoleQuery;
|
|
18
|
+
columnheader: RoleQuery;
|
|
19
|
+
combobox: RoleQuery;
|
|
20
|
+
complementary: RoleQuery;
|
|
21
|
+
contentinfo: RoleQuery;
|
|
22
|
+
definition: RoleQuery;
|
|
23
|
+
deletion: RoleQuery;
|
|
24
|
+
dialog: RoleQuery;
|
|
25
|
+
directory: RoleQuery;
|
|
26
|
+
document: RoleQuery;
|
|
27
|
+
emphasis: RoleQuery;
|
|
28
|
+
feed: RoleQuery;
|
|
29
|
+
figure: RoleQuery;
|
|
30
|
+
form: RoleQuery;
|
|
31
|
+
generic: RoleQuery;
|
|
32
|
+
grid: RoleQuery;
|
|
33
|
+
gridcell: RoleQuery;
|
|
34
|
+
group: RoleQuery;
|
|
35
|
+
heading: RoleQuery;
|
|
36
|
+
img: RoleQuery;
|
|
37
|
+
insertion: RoleQuery;
|
|
38
|
+
link: RoleQuery;
|
|
39
|
+
list: RoleQuery;
|
|
40
|
+
listbox: RoleQuery;
|
|
41
|
+
listitem: RoleQuery;
|
|
42
|
+
log: RoleQuery;
|
|
43
|
+
main: RoleQuery;
|
|
44
|
+
marquee: RoleQuery;
|
|
45
|
+
math: RoleQuery;
|
|
46
|
+
menu: RoleQuery;
|
|
47
|
+
menubar: RoleQuery;
|
|
48
|
+
menuitem: RoleQuery;
|
|
49
|
+
menuitemcheckbox: RoleQuery;
|
|
50
|
+
menuitemradio: RoleQuery;
|
|
51
|
+
meter: RoleQuery;
|
|
52
|
+
navigation: RoleQuery;
|
|
53
|
+
none: RoleQuery;
|
|
54
|
+
note: RoleQuery;
|
|
55
|
+
option: RoleQuery;
|
|
56
|
+
paragraph: RoleQuery;
|
|
57
|
+
presentation: RoleQuery;
|
|
58
|
+
progressbar: RoleQuery;
|
|
59
|
+
radio: RoleQuery;
|
|
60
|
+
radiogroup: RoleQuery;
|
|
61
|
+
region: RoleQuery;
|
|
62
|
+
row: RoleQuery;
|
|
63
|
+
rowgroup: RoleQuery;
|
|
64
|
+
rowheader: RoleQuery;
|
|
65
|
+
scrollbar: RoleQuery;
|
|
66
|
+
search: RoleQuery;
|
|
67
|
+
searchbox: RoleQuery;
|
|
68
|
+
separator: RoleQuery;
|
|
69
|
+
slider: RoleQuery;
|
|
70
|
+
spinbutton: RoleQuery;
|
|
71
|
+
status: RoleQuery;
|
|
72
|
+
strong: RoleQuery;
|
|
73
|
+
subscript: RoleQuery;
|
|
74
|
+
superscript: RoleQuery;
|
|
75
|
+
switch: RoleQuery;
|
|
76
|
+
tab: RoleQuery;
|
|
77
|
+
table: RoleQuery;
|
|
78
|
+
tablist: RoleQuery;
|
|
79
|
+
tabpanel: RoleQuery;
|
|
80
|
+
term: RoleQuery;
|
|
81
|
+
textbox: RoleQuery;
|
|
82
|
+
time: RoleQuery;
|
|
83
|
+
timer: RoleQuery;
|
|
84
|
+
toolbar: RoleQuery;
|
|
85
|
+
tooltip: RoleQuery;
|
|
86
|
+
tree: RoleQuery;
|
|
87
|
+
treegrid: RoleQuery;
|
|
88
|
+
treeitem: RoleQuery;
|
|
89
|
+
};
|
|
6
90
|
export * from "@playwright/test";
|
package/esm/playwright.js
CHANGED
|
@@ -10,7 +10,11 @@ function query(locator) {
|
|
|
10
10
|
acc[role] = (name, options) => locator.getByRole(role, { name, ...options });
|
|
11
11
|
return acc;
|
|
12
12
|
}, {});
|
|
13
|
-
|
|
13
|
+
const text = (...args) => locator.getByText(...args);
|
|
14
|
+
return {
|
|
15
|
+
...roleQueries,
|
|
16
|
+
text
|
|
17
|
+
};
|
|
14
18
|
}
|
|
15
19
|
export {
|
|
16
20
|
query
|
package/esm/press.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
press
|
|
4
|
-
} from "./__chunks/
|
|
5
|
-
import "./__chunks/
|
|
4
|
+
} from "./__chunks/BYTNK3ZM.js";
|
|
5
|
+
import "./__chunks/3NGJUWNA.js";
|
|
6
6
|
import "./__chunks/DZ24E43J.js";
|
|
7
|
-
import "./__chunks/
|
|
8
|
-
import "./__chunks/
|
|
9
|
-
import "./__chunks/
|
|
7
|
+
import "./__chunks/PKHBOCZ2.js";
|
|
8
|
+
import "./__chunks/5U5BJCVZ.js";
|
|
9
|
+
import "./__chunks/HODMXKAI.js";
|
|
10
10
|
import "./__chunks/HFG3HB6M.js";
|
|
11
11
|
export {
|
|
12
12
|
press
|
package/esm/react.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./__chunks/SB7WYA2U.js";
|
|
6
6
|
import {
|
|
7
7
|
press
|
|
8
|
-
} from "./__chunks/
|
|
8
|
+
} from "./__chunks/BYTNK3ZM.js";
|
|
9
9
|
import {
|
|
10
10
|
q,
|
|
11
11
|
query
|
|
@@ -13,37 +13,37 @@ import {
|
|
|
13
13
|
import "./__chunks/CWTUOQ5Z.js";
|
|
14
14
|
import {
|
|
15
15
|
select
|
|
16
|
-
} from "./__chunks/
|
|
16
|
+
} from "./__chunks/2FBLN3UR.js";
|
|
17
17
|
import {
|
|
18
18
|
tap
|
|
19
|
-
} from "./__chunks/
|
|
19
|
+
} from "./__chunks/UCWFNZO5.js";
|
|
20
20
|
import {
|
|
21
21
|
type
|
|
22
|
-
} from "./__chunks/
|
|
22
|
+
} from "./__chunks/3NGJUWNA.js";
|
|
23
23
|
import {
|
|
24
24
|
click
|
|
25
|
-
} from "./__chunks/
|
|
25
|
+
} from "./__chunks/ODJLIQ7E.js";
|
|
26
26
|
import {
|
|
27
27
|
hover
|
|
28
|
-
} from "./__chunks/
|
|
28
|
+
} from "./__chunks/IUYQ4ULP.js";
|
|
29
29
|
import {
|
|
30
30
|
sleep
|
|
31
31
|
} from "./__chunks/DZ24E43J.js";
|
|
32
32
|
import {
|
|
33
33
|
mouseDown
|
|
34
|
-
} from "./__chunks/
|
|
34
|
+
} from "./__chunks/BQHO6MWF.js";
|
|
35
35
|
import {
|
|
36
36
|
blur
|
|
37
|
-
} from "./__chunks/
|
|
37
|
+
} from "./__chunks/PKHBOCZ2.js";
|
|
38
38
|
import {
|
|
39
39
|
focus
|
|
40
|
-
} from "./__chunks/
|
|
40
|
+
} from "./__chunks/5U5BJCVZ.js";
|
|
41
41
|
import {
|
|
42
42
|
mouseUp
|
|
43
|
-
} from "./__chunks/
|
|
43
|
+
} from "./__chunks/VYKLOQJB.js";
|
|
44
44
|
import {
|
|
45
45
|
dispatch
|
|
46
|
-
} from "./__chunks/
|
|
46
|
+
} from "./__chunks/HODMXKAI.js";
|
|
47
47
|
import {
|
|
48
48
|
flushMicrotasks,
|
|
49
49
|
nextFrame,
|
|
@@ -53,7 +53,6 @@ import {
|
|
|
53
53
|
// src/react.tsx
|
|
54
54
|
import * as ReactTestingLibrary from "@testing-library/react";
|
|
55
55
|
import { StrictMode } from "react";
|
|
56
|
-
import { jsx } from "react/jsx-runtime";
|
|
57
56
|
function wrapRender(renderFn) {
|
|
58
57
|
return wrapAsync(async () => {
|
|
59
58
|
const output = renderFn();
|
|
@@ -66,13 +65,14 @@ function wrapRender(renderFn) {
|
|
|
66
65
|
async function render2(ui, options) {
|
|
67
66
|
const wrapper = (props) => {
|
|
68
67
|
const Wrapper = options == null ? void 0 : options.wrapper;
|
|
69
|
-
const element = Wrapper ? /* @__PURE__ */
|
|
68
|
+
const element = Wrapper ? /* @__PURE__ */ React.createElement(Wrapper, { ...props }) : props.children;
|
|
70
69
|
if (!(options == null ? void 0 : options.strictMode)) return element;
|
|
71
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ React.createElement(StrictMode, null, element);
|
|
72
71
|
};
|
|
73
72
|
return wrapRender(() => {
|
|
74
73
|
const { unmount, rerender } = ReactTestingLibrary.render(ui, {
|
|
75
74
|
...options,
|
|
75
|
+
// @ts-ignore - We have mismatching types between React and React Testing Library, so we need to ignore this error.
|
|
76
76
|
wrapper
|
|
77
77
|
});
|
|
78
78
|
return {
|
package/esm/select.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
select
|
|
4
|
-
} from "./__chunks/
|
|
5
|
-
import "./__chunks/
|
|
4
|
+
} from "./__chunks/2FBLN3UR.js";
|
|
5
|
+
import "./__chunks/IUYQ4ULP.js";
|
|
6
6
|
import "./__chunks/DZ24E43J.js";
|
|
7
|
-
import "./__chunks/
|
|
8
|
-
import "./__chunks/
|
|
9
|
-
import "./__chunks/
|
|
10
|
-
import "./__chunks/
|
|
11
|
-
import "./__chunks/
|
|
7
|
+
import "./__chunks/BQHO6MWF.js";
|
|
8
|
+
import "./__chunks/PKHBOCZ2.js";
|
|
9
|
+
import "./__chunks/5U5BJCVZ.js";
|
|
10
|
+
import "./__chunks/VYKLOQJB.js";
|
|
11
|
+
import "./__chunks/HODMXKAI.js";
|
|
12
12
|
import "./__chunks/HFG3HB6M.js";
|
|
13
13
|
export {
|
|
14
14
|
select
|
package/esm/tap.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
tap
|
|
4
|
-
} from "./__chunks/
|
|
5
|
-
import "./__chunks/
|
|
6
|
-
import "./__chunks/
|
|
4
|
+
} from "./__chunks/UCWFNZO5.js";
|
|
5
|
+
import "./__chunks/ODJLIQ7E.js";
|
|
6
|
+
import "./__chunks/IUYQ4ULP.js";
|
|
7
7
|
import "./__chunks/DZ24E43J.js";
|
|
8
|
-
import "./__chunks/
|
|
9
|
-
import "./__chunks/
|
|
10
|
-
import "./__chunks/
|
|
11
|
-
import "./__chunks/
|
|
12
|
-
import "./__chunks/
|
|
8
|
+
import "./__chunks/BQHO6MWF.js";
|
|
9
|
+
import "./__chunks/PKHBOCZ2.js";
|
|
10
|
+
import "./__chunks/5U5BJCVZ.js";
|
|
11
|
+
import "./__chunks/VYKLOQJB.js";
|
|
12
|
+
import "./__chunks/HODMXKAI.js";
|
|
13
13
|
import "./__chunks/HFG3HB6M.js";
|
|
14
14
|
export {
|
|
15
15
|
tap
|
package/esm/type.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
type
|
|
4
|
-
} from "./__chunks/
|
|
4
|
+
} from "./__chunks/3NGJUWNA.js";
|
|
5
5
|
import "./__chunks/DZ24E43J.js";
|
|
6
|
-
import "./__chunks/
|
|
7
|
-
import "./__chunks/
|
|
6
|
+
import "./__chunks/5U5BJCVZ.js";
|
|
7
|
+
import "./__chunks/HODMXKAI.js";
|
|
8
8
|
import "./__chunks/HFG3HB6M.js";
|
|
9
9
|
export {
|
|
10
10
|
type
|