@ariakit/test 0.3.13 → 0.3.15

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/cjs/__chunks/{DWIHFDL3.cjs → 22RRPVHJ.cjs} +2 -2
  3. package/cjs/__chunks/{GIKCTITR.cjs → 3BQXN3A5.cjs} +3 -3
  4. package/cjs/__chunks/{W53ATX47.cjs → BIB7E6LN.cjs} +28 -15
  5. package/cjs/__chunks/{KFHFWZQN.cjs → DJWEA66K.cjs} +20 -18
  6. package/cjs/__chunks/{ISKAHQPC.cjs → IWPK655Z.cjs} +2 -2
  7. package/cjs/__chunks/{YH2W6C46.cjs → IZMYJH6V.cjs} +5 -2
  8. package/cjs/__chunks/{7U3THWRS.cjs → LBY37VXL.cjs} +6 -6
  9. package/cjs/__chunks/{K2XRALNE.cjs → ZNASNKOZ.cjs} +2 -2
  10. package/cjs/blur.d.cts +1 -1
  11. package/cjs/blur.d.ts +1 -1
  12. package/cjs/click.cjs +4 -4
  13. package/cjs/focus.cjs +2 -2
  14. package/cjs/index.cjs +9 -9
  15. package/cjs/index.d.cts +14 -14
  16. package/cjs/index.d.ts +14 -14
  17. package/cjs/mouse-down.cjs +3 -3
  18. package/cjs/playwright.d.cts +1 -1
  19. package/cjs/playwright.d.ts +1 -1
  20. package/cjs/press.cjs +4 -4
  21. package/cjs/query.cjs +2 -2
  22. package/cjs/query.d.cts +2 -0
  23. package/cjs/query.d.ts +2 -0
  24. package/cjs/react.cjs +9 -9
  25. package/cjs/react.d.cts +1 -1
  26. package/cjs/react.d.ts +1 -1
  27. package/cjs/select.cjs +4 -4
  28. package/cjs/tap.cjs +5 -5
  29. package/cjs/type.cjs +3 -3
  30. package/cjs/type.d.cts +1 -1
  31. package/cjs/type.d.ts +1 -1
  32. package/esm/__chunks/{2L7BSF5A.js → 6GDQHEBE.js} +28 -15
  33. package/esm/__chunks/{SCOSW7X5.js → 7Y66O5SI.js} +5 -5
  34. package/esm/__chunks/{V6672LI4.js → AVTGTEGG.js} +1 -1
  35. package/esm/__chunks/{YRF6BLTM.js → DMIPXMWG.js} +15 -13
  36. package/esm/__chunks/{2TVULPB4.js → MLBZISHH.js} +1 -1
  37. package/esm/__chunks/{AMV7YAJV.js → QDVGEIL5.js} +1 -1
  38. package/esm/__chunks/{HZKYXBIJ.js → VD2VFA32.js} +5 -2
  39. package/esm/__chunks/{H2ALBSTH.js → VVYOYAEF.js} +1 -1
  40. package/esm/blur.d.ts +1 -1
  41. package/esm/click.js +3 -3
  42. package/esm/focus.js +1 -1
  43. package/esm/index.d.ts +14 -14
  44. package/esm/index.js +8 -8
  45. package/esm/mouse-down.js +2 -2
  46. package/esm/playwright.d.ts +1 -1
  47. package/esm/press.js +3 -3
  48. package/esm/query.d.ts +2 -0
  49. package/esm/query.js +1 -1
  50. package/esm/react.d.ts +1 -1
  51. package/esm/react.js +8 -8
  52. package/esm/select.js +3 -3
  53. package/esm/tap.js +4 -4
  54. package/esm/type.d.ts +1 -1
  55. package/esm/type.js +2 -2
  56. package/package.json +4 -4
package/cjs/react.cjs CHANGED
@@ -5,39 +5,39 @@ require('./__chunks/I2BROIQW.cjs');
5
5
  var _LG7B6NOGcjs = require('./__chunks/LG7B6NOG.cjs');
6
6
 
7
7
 
8
- var _DWIHFDL3cjs = require('./__chunks/DWIHFDL3.cjs');
8
+ var _22RRPVHJcjs = require('./__chunks/22RRPVHJ.cjs');
9
9
 
10
10
 
11
- var _7U3THWRScjs = require('./__chunks/7U3THWRS.cjs');
11
+ var _LBY37VXLcjs = require('./__chunks/LBY37VXL.cjs');
12
12
 
13
13
 
14
- var _ISKAHQPCcjs = require('./__chunks/ISKAHQPC.cjs');
14
+ var _IWPK655Zcjs = require('./__chunks/IWPK655Z.cjs');
15
15
 
16
16
 
17
17
  var _QCXNVFD7cjs = require('./__chunks/QCXNVFD7.cjs');
18
18
 
19
19
 
20
- var _GIKCTITRcjs = require('./__chunks/GIKCTITR.cjs');
20
+ var _3BQXN3A5cjs = require('./__chunks/3BQXN3A5.cjs');
21
21
 
22
22
 
23
23
  var _UWCNB4SRcjs = require('./__chunks/UWCNB4SR.cjs');
24
24
 
25
25
 
26
26
 
27
- var _W53ATX47cjs = require('./__chunks/W53ATX47.cjs');
27
+ var _BIB7E6LNcjs = require('./__chunks/BIB7E6LN.cjs');
28
28
  require('./__chunks/ERFCHS75.cjs');
29
29
 
30
30
 
31
- var _KFHFWZQNcjs = require('./__chunks/KFHFWZQN.cjs');
31
+ var _DJWEA66Kcjs = require('./__chunks/DJWEA66K.cjs');
32
32
 
33
33
 
34
- var _K2XRALNEcjs = require('./__chunks/K2XRALNE.cjs');
34
+ var _ZNASNKOZcjs = require('./__chunks/ZNASNKOZ.cjs');
35
35
 
36
36
 
37
37
  var _CYMYDRLScjs = require('./__chunks/CYMYDRLS.cjs');
38
38
 
39
39
 
40
- var _YH2W6C46cjs = require('./__chunks/YH2W6C46.cjs');
40
+ var _IZMYJH6Vcjs = require('./__chunks/IZMYJH6V.cjs');
41
41
 
42
42
 
43
43
  var _VD3ERVOFcjs = require('./__chunks/VD3ERVOF.cjs');
@@ -91,4 +91,4 @@ async function render2(ui, options) {
91
91
 
92
92
 
93
93
 
94
- 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 = _W53ATX47cjs.q; exports.query = _W53ATX47cjs.query; exports.render = render2; exports.select = _ISKAHQPCcjs.select; exports.sleep = _HQ3KUD6Fcjs.sleep; exports.tap = _DWIHFDL3cjs.tap; exports.type = _K2XRALNEcjs.type; exports.waitFor = _LG7B6NOGcjs.waitFor;
94
+ exports.blur = _CYMYDRLScjs.blur; exports.click = _LBY37VXLcjs.click; exports.dispatch = _VD3ERVOFcjs.dispatch; exports.focus = _IZMYJH6Vcjs.focus; exports.hover = _UWCNB4SRcjs.hover; exports.mouseDown = _3BQXN3A5cjs.mouseDown; exports.mouseUp = _QCXNVFD7cjs.mouseUp; exports.press = _DJWEA66Kcjs.press; exports.q = _BIB7E6LNcjs.q; exports.query = _BIB7E6LNcjs.query; exports.render = render2; exports.select = _IWPK655Zcjs.select; exports.sleep = _HQ3KUD6Fcjs.sleep; exports.tap = _22RRPVHJcjs.tap; exports.type = _ZNASNKOZcjs.type; exports.waitFor = _LG7B6NOGcjs.waitFor;
package/cjs/react.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  import * as ReactTestingLibrary from "@testing-library/react";
3
- export * from "./index.js";
3
+ export * from "./index.ts";
4
4
  export interface RenderOptions extends Omit<ReactTestingLibrary.RenderOptions, "queries"> {
5
5
  strictMode?: boolean;
6
6
  }
package/cjs/react.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  import * as ReactTestingLibrary from "@testing-library/react";
3
- export * from "./index.js";
3
+ export * from "./index.ts";
4
4
  export interface RenderOptions extends Omit<ReactTestingLibrary.RenderOptions, "queries"> {
5
5
  strictMode?: boolean;
6
6
  }
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 _ISKAHQPCcjs = require('./__chunks/ISKAHQPC.cjs');
4
+ var _IWPK655Zcjs = require('./__chunks/IWPK655Z.cjs');
5
5
  require('./__chunks/QCXNVFD7.cjs');
6
- require('./__chunks/GIKCTITR.cjs');
6
+ require('./__chunks/3BQXN3A5.cjs');
7
7
  require('./__chunks/UWCNB4SR.cjs');
8
8
  require('./__chunks/CYMYDRLS.cjs');
9
- require('./__chunks/YH2W6C46.cjs');
9
+ require('./__chunks/IZMYJH6V.cjs');
10
10
  require('./__chunks/VD3ERVOF.cjs');
11
11
  require('./__chunks/HQ3KUD6F.cjs');
12
12
  require('./__chunks/BXOTZFAK.cjs');
13
13
  require('./__chunks/OVN5OYWK.cjs');
14
14
 
15
15
 
16
- exports.select = _ISKAHQPCcjs.select;
16
+ exports.select = _IWPK655Zcjs.select;
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 _DWIHFDL3cjs = require('./__chunks/DWIHFDL3.cjs');
5
- require('./__chunks/7U3THWRS.cjs');
4
+ var _22RRPVHJcjs = require('./__chunks/22RRPVHJ.cjs');
5
+ require('./__chunks/LBY37VXL.cjs');
6
6
  require('./__chunks/QCXNVFD7.cjs');
7
- require('./__chunks/GIKCTITR.cjs');
7
+ require('./__chunks/3BQXN3A5.cjs');
8
8
  require('./__chunks/UWCNB4SR.cjs');
9
9
  require('./__chunks/CYMYDRLS.cjs');
10
- require('./__chunks/YH2W6C46.cjs');
10
+ require('./__chunks/IZMYJH6V.cjs');
11
11
  require('./__chunks/VD3ERVOF.cjs');
12
12
  require('./__chunks/HQ3KUD6F.cjs');
13
13
  require('./__chunks/BXOTZFAK.cjs');
14
14
  require('./__chunks/OVN5OYWK.cjs');
15
15
 
16
16
 
17
- exports.tap = _DWIHFDL3cjs.tap;
17
+ exports.tap = _22RRPVHJcjs.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 _K2XRALNEcjs = require('./__chunks/K2XRALNE.cjs');
5
- require('./__chunks/YH2W6C46.cjs');
4
+ var _ZNASNKOZcjs = require('./__chunks/ZNASNKOZ.cjs');
5
+ require('./__chunks/IZMYJH6V.cjs');
6
6
  require('./__chunks/VD3ERVOF.cjs');
7
7
  require('./__chunks/HQ3KUD6F.cjs');
8
8
  require('./__chunks/BXOTZFAK.cjs');
9
9
  require('./__chunks/OVN5OYWK.cjs');
10
10
 
11
11
 
12
- exports.type = _K2XRALNEcjs.type;
12
+ exports.type = _ZNASNKOZcjs.type;
package/cjs/type.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import type { DirtiableElement } from "./__utils.js";
1
+ import type { DirtiableElement } from "./__utils.ts";
2
2
  export declare function type(text: string, element?: (DirtiableElement & HTMLElement) | null, options?: InputEventInit | KeyboardEventInit): Promise<void>;
package/cjs/type.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import type { DirtiableElement } from "./__utils.js";
1
+ import type { DirtiableElement } from "./__utils.ts";
2
2
  export declare function type(text: string, element?: (DirtiableElement & HTMLElement) | null, options?: InputEventInit | KeyboardEventInit): Promise<void>;
@@ -8,11 +8,15 @@ import {
8
8
  } from "./Q65FZOE2.js";
9
9
 
10
10
  // src/query.ts
11
+ import { invariant } from "@ariakit/core/utils/misc";
11
12
  import { queries as baseQueries } from "@testing-library/dom";
12
- var queries = Object.entries(baseQueries).reduce((queries2, [key, query2]) => {
13
- queries2[key] = (...args) => query2(document.body, ...args);
14
- return queries2;
15
- }, {});
13
+ function createQueries(container = document.body) {
14
+ return Object.entries(baseQueries).reduce((queries, [key, query2]) => {
15
+ queries[key] = (...args) => query2(container, ...args);
16
+ return queries;
17
+ }, {});
18
+ }
19
+ var documentQueries = createQueries();
16
20
  function matchName(name, accessibleName) {
17
21
  if (accessibleName == null)
18
22
  return false;
@@ -42,7 +46,7 @@ function getNameOption(name, includesHidden) {
42
46
  return matchName(name, label.textContent);
43
47
  };
44
48
  }
45
- function createRoleQuery(role) {
49
+ function createRoleQuery(role, queries = documentQueries) {
46
50
  const createQuery = (query3) => {
47
51
  return (name, options) => {
48
52
  return query3(role, __spreadValues({
@@ -85,7 +89,13 @@ function createRoleQuery(role) {
85
89
  ensure
86
90
  });
87
91
  }
88
- function createTextQuery() {
92
+ function createRoleQueries(queries = documentQueries) {
93
+ return roles.reduce((acc, role) => {
94
+ acc[role] = createRoleQuery(role, queries);
95
+ return acc;
96
+ }, {});
97
+ }
98
+ function createTextQuery(queries = documentQueries) {
89
99
  const all = Object.assign(queries.queryAllByText, {
90
100
  wait: queries.findAllByText,
91
101
  ensure: queries.getAllByText
@@ -98,7 +108,7 @@ function createTextQuery() {
98
108
  });
99
109
  return Object.assign(queries.queryByText, { all, wait, ensure });
100
110
  }
101
- function createLabeledQuery() {
111
+ function createLabeledQuery(queries = documentQueries) {
102
112
  const all = Object.assign(queries.queryAllByLabelText, {
103
113
  wait: queries.findAllByLabelText,
104
114
  ensure: queries.getAllByLabelText
@@ -111,14 +121,17 @@ function createLabeledQuery() {
111
121
  });
112
122
  return Object.assign(queries.queryByLabelText, { all, wait, ensure });
113
123
  }
114
- var roleQueries = roles.reduce((acc, role) => {
115
- acc[role] = createRoleQuery(role);
116
- return acc;
117
- }, {});
118
- var query = __spreadProps(__spreadValues({}, roleQueries), {
119
- text: createTextQuery(),
120
- labeled: createLabeledQuery()
121
- });
124
+ function createQueryObject(queries = documentQueries) {
125
+ return __spreadProps(__spreadValues({}, createRoleQueries(queries)), {
126
+ text: createTextQuery(queries),
127
+ labeled: createLabeledQuery(queries),
128
+ within: (element) => {
129
+ invariant(element, "Unable to create queries for null element");
130
+ return createQueryObject(createQueries(element));
131
+ }
132
+ });
133
+ }
134
+ var query = createQueryObject();
122
135
  var q = query;
123
136
 
124
137
  export {
@@ -4,13 +4,13 @@ import {
4
4
  } from "./V36IYEJN.js";
5
5
  import {
6
6
  mouseDown
7
- } from "./V6672LI4.js";
7
+ } from "./AVTGTEGG.js";
8
8
  import {
9
9
  hover
10
10
  } from "./LRKW54RD.js";
11
11
  import {
12
12
  focus
13
- } from "./HZKYXBIJ.js";
13
+ } from "./VD2VFA32.js";
14
14
  import {
15
15
  dispatch
16
16
  } from "./JIRMKL2I.js";
@@ -25,12 +25,12 @@ import {
25
25
  } from "./Q65FZOE2.js";
26
26
 
27
27
  // src/click.ts
28
- import { closest, isVisible } from "@ariakit/core/utils/dom";
28
+ import { isVisible } from "@ariakit/core/utils/dom";
29
29
  import { isFocusable } from "@ariakit/core/utils/focus";
30
30
  import { invariant } from "@ariakit/core/utils/misc";
31
31
  function getClosestLabel(element) {
32
32
  if (!isFocusable(element)) {
33
- return closest(element, "label");
33
+ return element.closest("label");
34
34
  }
35
35
  return null;
36
36
  }
@@ -59,7 +59,7 @@ function setSelected(element, selected) {
59
59
  element.selected = selected;
60
60
  }
61
61
  async function clickOption(element, eventOptions) {
62
- const select = closest(element, "select");
62
+ const select = element.closest("select");
63
63
  if (!select) {
64
64
  await dispatch.click(element, eventOptions);
65
65
  return;
@@ -4,7 +4,7 @@ import {
4
4
  } from "./QE2YCTHV.js";
5
5
  import {
6
6
  focus
7
- } from "./HZKYXBIJ.js";
7
+ } from "./VD2VFA32.js";
8
8
  import {
9
9
  dispatch
10
10
  } from "./JIRMKL2I.js";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  type
4
- } from "./H2ALBSTH.js";
4
+ } from "./VVYOYAEF.js";
5
5
  import {
6
6
  blur
7
7
  } from "./QE2YCTHV.js";
8
8
  import {
9
9
  focus
10
- } from "./HZKYXBIJ.js";
10
+ } from "./VD2VFA32.js";
11
11
  import {
12
12
  dispatch
13
13
  } from "./JIRMKL2I.js";
@@ -22,7 +22,7 @@ import {
22
22
  } from "./Q65FZOE2.js";
23
23
 
24
24
  // src/press.ts
25
- import { isTextField } from "@ariakit/core/utils/dom";
25
+ import { isTextField, setSelectionRange } from "@ariakit/core/utils/dom";
26
26
  import {
27
27
  getNextTabbable,
28
28
  getPreviousTabbable,
@@ -85,14 +85,14 @@ var keyDownMap = {
85
85
  if (isTextField(element)) {
86
86
  const { value, selectionEnd } = element;
87
87
  const end = Math.min(value.length, shiftKey ? selectionEnd != null ? selectionEnd : 0 : 0);
88
- element.setSelectionRange(0, end, "backward");
88
+ setSelectionRange(element, 0, end, "backward");
89
89
  }
90
90
  },
91
91
  async End(element, { shiftKey }) {
92
92
  if (isTextField(element)) {
93
93
  const { value, selectionStart } = element;
94
94
  const start = shiftKey ? selectionStart != null ? selectionStart : 0 : value.length;
95
- element.setSelectionRange(start, value.length, "forward");
95
+ setSelectionRange(element, start, value.length, "forward");
96
96
  }
97
97
  },
98
98
  async ArrowLeft(element, { shiftKey }) {
@@ -102,7 +102,8 @@ var keyDownMap = {
102
102
  const collapsing = !shiftKey && start !== end;
103
103
  const nextStart = Math.max(0, collapsing ? start : start - 1);
104
104
  const nextEnd = Math.min(value.length, shiftKey ? end : nextStart);
105
- element.setSelectionRange(
105
+ setSelectionRange(
106
+ element,
106
107
  nextStart,
107
108
  nextEnd,
108
109
  selectionDirection || "backward"
@@ -116,7 +117,8 @@ var keyDownMap = {
116
117
  const collapsing = !shiftKey && start !== end;
117
118
  const nextEnd = Math.min(value.length, collapsing ? end : end + 1);
118
119
  const nextStart = Math.max(0, shiftKey ? start : nextEnd);
119
- element.setSelectionRange(
120
+ setSelectionRange(
121
+ element,
120
122
  nextStart,
121
123
  nextEnd,
122
124
  selectionDirection || "forward"
@@ -126,14 +128,14 @@ var keyDownMap = {
126
128
  async ArrowUp(element, { shiftKey }) {
127
129
  if (isTextField(element)) {
128
130
  if (!shiftKey) {
129
- return element.setSelectionRange(0, 0);
131
+ return setSelectionRange(element, 0, 0);
130
132
  } else {
131
133
  const { selectionStart, selectionEnd, selectionDirection } = element;
132
134
  const [start, end] = [selectionStart != null ? selectionStart : 0, selectionEnd != null ? selectionEnd : 0];
133
135
  if (selectionDirection === "forward") {
134
- element.setSelectionRange(start, start);
136
+ setSelectionRange(element, start, start);
135
137
  } else {
136
- element.setSelectionRange(0, end, "backward");
138
+ setSelectionRange(element, 0, end, "backward");
137
139
  }
138
140
  }
139
141
  } else if (isNumberInput(element)) {
@@ -144,14 +146,14 @@ var keyDownMap = {
144
146
  if (isTextField(element)) {
145
147
  const length = element.value.length;
146
148
  if (!shiftKey) {
147
- element.setSelectionRange(length, length);
149
+ setSelectionRange(element, length, length);
148
150
  } else {
149
151
  const { selectionStart, selectionEnd, selectionDirection } = element;
150
152
  const [start, end] = [selectionStart != null ? selectionStart : 0, selectionEnd != null ? selectionEnd : 0];
151
153
  if (selectionDirection === "backward") {
152
- element.setSelectionRange(end, end);
154
+ setSelectionRange(element, end, end);
153
155
  } else {
154
- element.setSelectionRange(start, length, "forward");
156
+ setSelectionRange(element, start, length, "forward");
155
157
  }
156
158
  }
157
159
  } else if (isNumberInput(element)) {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  click
4
- } from "./SCOSW7X5.js";
4
+ } from "./7Y66O5SI.js";
5
5
 
6
6
  // src/tap.ts
7
7
  function tap(element, options) {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./V36IYEJN.js";
5
5
  import {
6
6
  mouseDown
7
- } from "./V6672LI4.js";
7
+ } from "./AVTGTEGG.js";
8
8
  import {
9
9
  hover
10
10
  } from "./LRKW54RD.js";
@@ -18,12 +18,15 @@ function focus(element) {
18
18
  return;
19
19
  if (!isFocusable(element))
20
20
  return;
21
- const activeElement = getActiveElement(element);
21
+ const htmlElement = element;
22
+ const activeElement = getActiveElement(
23
+ htmlElement
24
+ );
22
25
  if (activeElement == null ? void 0 : activeElement.dirty) {
23
26
  await dispatch.change(activeElement);
24
27
  activeElement.dirty = false;
25
28
  }
26
- element.focus();
29
+ htmlElement.focus();
27
30
  await flushMicrotasks();
28
31
  });
29
32
  }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  focus
4
- } from "./HZKYXBIJ.js";
4
+ } from "./VD2VFA32.js";
5
5
  import {
6
6
  dispatch
7
7
  } from "./JIRMKL2I.js";
package/esm/blur.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import type { DirtiableElement } from "./__utils.js";
1
+ import type { DirtiableElement } from "./__utils.ts";
2
2
  export declare function blur(element?: DirtiableElement | null): Promise<void>;
package/esm/click.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import {
3
3
  click
4
- } from "./__chunks/SCOSW7X5.js";
4
+ } from "./__chunks/7Y66O5SI.js";
5
5
  import "./__chunks/V36IYEJN.js";
6
- import "./__chunks/V6672LI4.js";
6
+ import "./__chunks/AVTGTEGG.js";
7
7
  import "./__chunks/LRKW54RD.js";
8
8
  import "./__chunks/QE2YCTHV.js";
9
- import "./__chunks/HZKYXBIJ.js";
9
+ import "./__chunks/VD2VFA32.js";
10
10
  import "./__chunks/JIRMKL2I.js";
11
11
  import "./__chunks/3EIGH73D.js";
12
12
  import "./__chunks/7I2TICIC.js";
package/esm/focus.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  focus
4
- } from "./__chunks/HZKYXBIJ.js";
4
+ } from "./__chunks/VD2VFA32.js";
5
5
  import "./__chunks/JIRMKL2I.js";
6
6
  import "./__chunks/7I2TICIC.js";
7
7
  import "./__chunks/Q65FZOE2.js";
package/esm/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- export * from "./blur.js";
2
- export * from "./click.js";
3
- export * from "./dispatch.js";
4
- export * from "./focus.js";
5
- export * from "./hover.js";
6
- export * from "./mouse-down.js";
7
- export * from "./mouse-up.js";
8
- export * from "./press.js";
9
- export * from "./query.js";
10
- export * from "./select.js";
11
- export * from "./sleep.js";
12
- export * from "./tap.js";
13
- export * from "./type.js";
14
- export * from "./wait-for.js";
1
+ export * from "./blur.ts";
2
+ export * from "./click.ts";
3
+ export * from "./dispatch.ts";
4
+ export * from "./focus.ts";
5
+ export * from "./hover.ts";
6
+ export * from "./mouse-down.ts";
7
+ export * from "./mouse-up.ts";
8
+ export * from "./press.ts";
9
+ export * from "./query.ts";
10
+ export * from "./select.ts";
11
+ export * from "./sleep.ts";
12
+ export * from "./tap.ts";
13
+ export * from "./type.ts";
14
+ export * from "./wait-for.ts";
package/esm/index.js CHANGED
@@ -5,39 +5,39 @@ import {
5
5
  } from "./__chunks/G2JU2LVB.js";
6
6
  import {
7
7
  tap
8
- } from "./__chunks/2TVULPB4.js";
8
+ } from "./__chunks/MLBZISHH.js";
9
9
  import {
10
10
  click
11
- } from "./__chunks/SCOSW7X5.js";
11
+ } from "./__chunks/7Y66O5SI.js";
12
12
  import {
13
13
  select
14
- } from "./__chunks/AMV7YAJV.js";
14
+ } from "./__chunks/QDVGEIL5.js";
15
15
  import {
16
16
  mouseUp
17
17
  } from "./__chunks/V36IYEJN.js";
18
18
  import {
19
19
  mouseDown
20
- } from "./__chunks/V6672LI4.js";
20
+ } from "./__chunks/AVTGTEGG.js";
21
21
  import {
22
22
  hover
23
23
  } from "./__chunks/LRKW54RD.js";
24
24
  import {
25
25
  q,
26
26
  query
27
- } from "./__chunks/2L7BSF5A.js";
27
+ } from "./__chunks/6GDQHEBE.js";
28
28
  import "./__chunks/CWTUOQ5Z.js";
29
29
  import {
30
30
  press
31
- } from "./__chunks/YRF6BLTM.js";
31
+ } from "./__chunks/DMIPXMWG.js";
32
32
  import {
33
33
  type
34
- } from "./__chunks/H2ALBSTH.js";
34
+ } from "./__chunks/VVYOYAEF.js";
35
35
  import {
36
36
  blur
37
37
  } from "./__chunks/QE2YCTHV.js";
38
38
  import {
39
39
  focus
40
- } from "./__chunks/HZKYXBIJ.js";
40
+ } from "./__chunks/VD2VFA32.js";
41
41
  import {
42
42
  dispatch
43
43
  } from "./__chunks/JIRMKL2I.js";
package/esm/mouse-down.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  mouseDown
4
- } from "./__chunks/V6672LI4.js";
4
+ } from "./__chunks/AVTGTEGG.js";
5
5
  import "./__chunks/QE2YCTHV.js";
6
- import "./__chunks/HZKYXBIJ.js";
6
+ import "./__chunks/VD2VFA32.js";
7
7
  import "./__chunks/JIRMKL2I.js";
8
8
  import "./__chunks/7I2TICIC.js";
9
9
  import "./__chunks/Q65FZOE2.js";
@@ -1,5 +1,5 @@
1
1
  import type { FrameLocator, Locator, Page } from "@playwright/test";
2
- import type { AriaRole } from "./__aria-role.js";
2
+ import type { AriaRole } from "./__aria-role.ts";
3
3
  type RoleQuery = (name?: string | RegExp, options?: Parameters<Page["getByRole"]>[1]) => Locator;
4
4
  type RoleQueries = Record<AriaRole, RoleQuery>;
5
5
  export declare function query(locator: Page | Locator | FrameLocator): RoleQueries;
package/esm/press.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  press
4
- } from "./__chunks/YRF6BLTM.js";
5
- import "./__chunks/H2ALBSTH.js";
4
+ } from "./__chunks/DMIPXMWG.js";
5
+ import "./__chunks/VVYOYAEF.js";
6
6
  import "./__chunks/QE2YCTHV.js";
7
- import "./__chunks/HZKYXBIJ.js";
7
+ import "./__chunks/VD2VFA32.js";
8
8
  import "./__chunks/JIRMKL2I.js";
9
9
  import "./__chunks/3EIGH73D.js";
10
10
  import "./__chunks/7I2TICIC.js";
package/esm/query.d.ts CHANGED
@@ -24,6 +24,7 @@ export declare const query: {
24
24
  all: (<T_9 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => T_9[]) & ((id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[]);
25
25
  };
26
26
  };
27
+ within: (element?: HTMLElement | null) => any;
27
28
  alert: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
28
29
  includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
29
30
  all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
@@ -2018,6 +2019,7 @@ export declare const q: {
2018
2019
  all: (<T_9 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => T_9[]) & ((id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[]);
2019
2020
  };
2020
2021
  };
2022
+ within: (element?: HTMLElement | null) => any;
2021
2023
  alert: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null) & {
2022
2024
  includesHidden: (name?: string | RegExp, options?: ByRoleOptions) => HTMLElement | null;
2023
2025
  all: ((name?: string | RegExp, options?: ByRoleOptions) => HTMLElement[]) & {
package/esm/query.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  q,
4
4
  query
5
- } from "./__chunks/2L7BSF5A.js";
5
+ } from "./__chunks/6GDQHEBE.js";
6
6
  import "./__chunks/CWTUOQ5Z.js";
7
7
  import "./__chunks/Q65FZOE2.js";
8
8
  export {
package/esm/react.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  import * as ReactTestingLibrary from "@testing-library/react";
3
- export * from "./index.js";
3
+ export * from "./index.ts";
4
4
  export interface RenderOptions extends Omit<ReactTestingLibrary.RenderOptions, "queries"> {
5
5
  strictMode?: boolean;
6
6
  }
package/esm/react.js CHANGED
@@ -5,39 +5,39 @@ import {
5
5
  } from "./__chunks/G2JU2LVB.js";
6
6
  import {
7
7
  tap
8
- } from "./__chunks/2TVULPB4.js";
8
+ } from "./__chunks/MLBZISHH.js";
9
9
  import {
10
10
  click
11
- } from "./__chunks/SCOSW7X5.js";
11
+ } from "./__chunks/7Y66O5SI.js";
12
12
  import {
13
13
  select
14
- } from "./__chunks/AMV7YAJV.js";
14
+ } from "./__chunks/QDVGEIL5.js";
15
15
  import {
16
16
  mouseUp
17
17
  } from "./__chunks/V36IYEJN.js";
18
18
  import {
19
19
  mouseDown
20
- } from "./__chunks/V6672LI4.js";
20
+ } from "./__chunks/AVTGTEGG.js";
21
21
  import {
22
22
  hover
23
23
  } from "./__chunks/LRKW54RD.js";
24
24
  import {
25
25
  q,
26
26
  query
27
- } from "./__chunks/2L7BSF5A.js";
27
+ } from "./__chunks/6GDQHEBE.js";
28
28
  import "./__chunks/CWTUOQ5Z.js";
29
29
  import {
30
30
  press
31
- } from "./__chunks/YRF6BLTM.js";
31
+ } from "./__chunks/DMIPXMWG.js";
32
32
  import {
33
33
  type
34
- } from "./__chunks/H2ALBSTH.js";
34
+ } from "./__chunks/VVYOYAEF.js";
35
35
  import {
36
36
  blur
37
37
  } from "./__chunks/QE2YCTHV.js";
38
38
  import {
39
39
  focus
40
- } from "./__chunks/HZKYXBIJ.js";
40
+ } from "./__chunks/VD2VFA32.js";
41
41
  import {
42
42
  dispatch
43
43
  } from "./__chunks/JIRMKL2I.js";