@ctrl/dom 0.3.13 → 0.4.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.
Files changed (81) hide show
  1. package/dist/aria/_chunks/aria-query.generated-B6BAyxT7.js +4 -0
  2. package/dist/aria/_chunks/aria-query.generated-DK1XMP7F.cjs +4 -0
  3. package/dist/aria/index.cjs +1 -1
  4. package/dist/aria/index.js +1 -1
  5. package/dist/aria/internal.cjs +1 -1
  6. package/dist/aria/internal.js +1 -1
  7. package/dist/aria/types/data/aria-query.generated.d.ts +1 -1
  8. package/dist/bridge/internal.js +1 -1
  9. package/dist/dom/_chunks/src-BISULkzm.js +50 -0
  10. package/dist/dom/index.js +1 -1
  11. package/dist/dom/internal.js +1 -1
  12. package/dist/dom/types/collections/iterator.d.ts +9 -0
  13. package/dist/dom/types/css/data/properties.d.ts +1 -1
  14. package/dist/dom/types/css/tokenizer.d.ts +8 -1
  15. package/dist/dom/types/css/values.d.ts +2 -2
  16. package/dist/dom/types/css/view.d.ts +0 -8
  17. package/dist/dom/types/events/Event.d.ts +13 -1
  18. package/dist/dom/types/events/handlers.d.ts +2 -0
  19. package/dist/dom/types/html/HTMLElement.d.ts +7 -5
  20. package/dist/dom/types/html/aria-reflection.d.ts +5 -0
  21. package/dist/dom/types/html/custom-elements.d.ts +0 -1
  22. package/dist/dom/types/html/elements.d.ts +0 -4
  23. package/dist/dom/types/html/forms/HTMLButtonElement.d.ts +2 -9
  24. package/dist/dom/types/html/forms/HTMLFieldSetElement.d.ts +0 -4
  25. package/dist/dom/types/html/forms/HTMLInputElement.d.ts +11 -30
  26. package/dist/dom/types/html/forms/HTMLOutputElement.d.ts +4 -13
  27. package/dist/dom/types/html/forms/HTMLSelectElement.d.ts +2 -3
  28. package/dist/dom/types/html/forms/HTMLTextAreaElement.d.ts +11 -11
  29. package/dist/dom/types/html/forms/collections.d.ts +5 -0
  30. package/dist/dom/types/html/forms/common.d.ts +7 -0
  31. package/dist/dom/types/html/forms/selection.d.ts +43 -0
  32. package/dist/dom/types/html/forms/validation.d.ts +7 -2
  33. package/dist/dom/types/html/shared.d.ts +4 -0
  34. package/dist/dom/types/html/svg-types.d.ts +1 -1
  35. package/dist/dom/types/internal.d.ts +2 -1
  36. package/dist/dom/types/nodes/Document.d.ts +1 -1
  37. package/dist/dom/types/nodes/Element.d.ts +16 -20
  38. package/dist/dom/types/nodes/Node.d.ts +1 -1
  39. package/dist/dom/types/nodes/attributes.d.ts +2 -0
  40. package/dist/dom/types/nodes/tree.d.ts +1 -1
  41. package/dist/dom/types/parser/entities-data.d.ts +3 -3
  42. package/dist/dom/types/parser/tokenizer.d.ts +1 -0
  43. package/dist/dom/types/parser/treebuilder.d.ts +7 -2
  44. package/dist/dom/types/selectors/parser.d.ts +0 -63
  45. package/dist/dom/types/serializer/index.d.ts +4 -1
  46. package/dist/dom/types/traversal/Range.d.ts +3 -0
  47. package/dist/dom/types/window/Window.d.ts +2 -2
  48. package/dist/dom/types/window/clock.d.ts +6 -2
  49. package/dist/dom/types/window/fallbacks.d.ts +0 -8
  50. package/dist/dom/types/window/hooks.d.ts +1 -2
  51. package/dist/dom/types/window/interfaces.d.ts +0 -2
  52. package/dist/dom/types/window/media.d.ts +1 -6
  53. package/dist/dom/types/window/xhr.d.ts +4 -0
  54. package/dist/jest-dom/_chunks/{matchers-DGsBvtWC.js → matchers-D7d49HIF.js} +7 -7
  55. package/dist/jest-dom/_chunks/{matchers-DJmRgUYG.cjs → matchers-lhGtjS66.cjs} +7 -7
  56. package/dist/jest-dom/index.cjs +1 -1
  57. package/dist/jest-dom/index.js +1 -1
  58. package/dist/jest-dom/jest-globals.cjs +1 -1
  59. package/dist/jest-dom/jest-globals.js +1 -1
  60. package/dist/jest-dom/matchers.cjs +1 -1
  61. package/dist/jest-dom/matchers.js +1 -1
  62. package/dist/jest-dom/vitest.cjs +1 -1
  63. package/dist/jest-dom/vitest.js +1 -1
  64. package/dist/testing-library/_chunks/{aria-snapshot-diff-DbtSqGLH.cjs → aria-snapshot-diff-DKpjI9CA.cjs} +3 -3
  65. package/dist/testing-library/_chunks/aria-snapshot-diff-DdhypD1z.js +16 -0
  66. package/dist/testing-library/agent.cjs +2 -2
  67. package/dist/testing-library/agent.js +7 -7
  68. package/dist/testing-library/index.cjs +4 -4
  69. package/dist/testing-library/index.js +8 -8
  70. package/dist/user-event/index.cjs +15 -15
  71. package/dist/user-event/index.js +16 -16
  72. package/dist/user-event/types/clipboard/copy.d.ts +6 -0
  73. package/dist/user-event/types/ctrl-dom.d.ts +17 -16
  74. package/dist/user-event/types/event/eventMap.d.ts +99 -99
  75. package/dist/user-event/types/setup/dtl.d.ts +0 -6
  76. package/dist/user-event/types/system/index.d.ts +1 -0
  77. package/package.json +1 -1
  78. package/dist/aria/_chunks/aria-query.generated-BNKXKFqd.cjs +0 -4
  79. package/dist/aria/_chunks/aria-query.generated-CU4-Yw6V.js +0 -4
  80. package/dist/dom/_chunks/src-Dgmm77XJ.js +0 -50
  81. package/dist/testing-library/_chunks/aria-snapshot-diff-VoXekyfV.js +0 -16
@@ -1,261 +1,261 @@
1
1
  import { type EventType } from './types.js';
2
2
  export declare const eventMap: {
3
- readonly auxclick: {
4
- readonly EventType: 'PointerEvent';
5
- readonly defaultInit: {
3
+ auxclick: {
4
+ EventType: "PointerEvent";
5
+ defaultInit: {
6
6
  readonly bubbles: true;
7
7
  readonly cancelable: true;
8
8
  readonly composed: true;
9
9
  };
10
10
  };
11
- readonly beforeinput: {
12
- readonly EventType: 'InputEvent';
13
- readonly defaultInit: {
11
+ beforeinput: {
12
+ EventType: "InputEvent";
13
+ defaultInit: {
14
14
  readonly bubbles: true;
15
15
  readonly cancelable: true;
16
16
  readonly composed: true;
17
17
  };
18
18
  };
19
- readonly blur: {
20
- readonly EventType: 'FocusEvent';
21
- readonly defaultInit: {
19
+ blur: {
20
+ EventType: "FocusEvent";
21
+ defaultInit: {
22
22
  readonly bubbles: false;
23
23
  readonly cancelable: false;
24
24
  readonly composed: true;
25
25
  };
26
26
  };
27
- readonly click: {
28
- readonly EventType: 'PointerEvent';
29
- readonly defaultInit: {
27
+ click: {
28
+ EventType: "PointerEvent";
29
+ defaultInit: {
30
30
  readonly bubbles: true;
31
31
  readonly cancelable: true;
32
32
  readonly composed: true;
33
33
  };
34
34
  };
35
- readonly contextmenu: {
36
- readonly EventType: 'PointerEvent';
37
- readonly defaultInit: {
35
+ contextmenu: {
36
+ EventType: "PointerEvent";
37
+ defaultInit: {
38
38
  readonly bubbles: true;
39
39
  readonly cancelable: true;
40
40
  readonly composed: true;
41
41
  };
42
42
  };
43
- readonly copy: {
44
- readonly EventType: 'ClipboardEvent';
45
- readonly defaultInit: {
43
+ copy: {
44
+ EventType: "ClipboardEvent";
45
+ defaultInit: {
46
46
  readonly bubbles: true;
47
47
  readonly cancelable: true;
48
48
  readonly composed: true;
49
49
  };
50
50
  };
51
- readonly change: {
52
- readonly EventType: 'Event';
53
- readonly defaultInit: {
51
+ change: {
52
+ EventType: "Event";
53
+ defaultInit: {
54
54
  readonly bubbles: true;
55
55
  readonly cancelable: false;
56
56
  };
57
57
  };
58
- readonly cut: {
59
- readonly EventType: 'ClipboardEvent';
60
- readonly defaultInit: {
58
+ cut: {
59
+ EventType: "ClipboardEvent";
60
+ defaultInit: {
61
61
  readonly bubbles: true;
62
62
  readonly cancelable: true;
63
63
  readonly composed: true;
64
64
  };
65
65
  };
66
- readonly dblclick: {
67
- readonly EventType: 'MouseEvent';
68
- readonly defaultInit: {
66
+ dblclick: {
67
+ EventType: "MouseEvent";
68
+ defaultInit: {
69
69
  readonly bubbles: true;
70
70
  readonly cancelable: true;
71
71
  readonly composed: true;
72
72
  };
73
73
  };
74
- readonly focus: {
75
- readonly EventType: 'FocusEvent';
76
- readonly defaultInit: {
74
+ focus: {
75
+ EventType: "FocusEvent";
76
+ defaultInit: {
77
77
  readonly bubbles: false;
78
78
  readonly cancelable: false;
79
79
  readonly composed: true;
80
80
  };
81
81
  };
82
- readonly focusin: {
83
- readonly EventType: 'FocusEvent';
84
- readonly defaultInit: {
82
+ focusin: {
83
+ EventType: "FocusEvent";
84
+ defaultInit: {
85
85
  readonly bubbles: true;
86
86
  readonly cancelable: false;
87
87
  readonly composed: true;
88
88
  };
89
89
  };
90
- readonly focusout: {
91
- readonly EventType: 'FocusEvent';
92
- readonly defaultInit: {
90
+ focusout: {
91
+ EventType: "FocusEvent";
92
+ defaultInit: {
93
93
  readonly bubbles: true;
94
94
  readonly cancelable: false;
95
95
  readonly composed: true;
96
96
  };
97
97
  };
98
- readonly keydown: {
99
- readonly EventType: 'KeyboardEvent';
100
- readonly defaultInit: {
98
+ keydown: {
99
+ EventType: "KeyboardEvent";
100
+ defaultInit: {
101
101
  readonly bubbles: true;
102
102
  readonly cancelable: true;
103
103
  readonly composed: true;
104
104
  };
105
105
  };
106
- readonly keypress: {
107
- readonly EventType: 'KeyboardEvent';
108
- readonly defaultInit: {
106
+ keypress: {
107
+ EventType: "KeyboardEvent";
108
+ defaultInit: {
109
109
  readonly bubbles: true;
110
110
  readonly cancelable: true;
111
111
  readonly composed: true;
112
112
  };
113
113
  };
114
- readonly keyup: {
115
- readonly EventType: 'KeyboardEvent';
116
- readonly defaultInit: {
114
+ keyup: {
115
+ EventType: "KeyboardEvent";
116
+ defaultInit: {
117
117
  readonly bubbles: true;
118
118
  readonly cancelable: true;
119
119
  readonly composed: true;
120
120
  };
121
121
  };
122
- readonly paste: {
123
- readonly EventType: 'ClipboardEvent';
124
- readonly defaultInit: {
122
+ paste: {
123
+ EventType: "ClipboardEvent";
124
+ defaultInit: {
125
125
  readonly bubbles: true;
126
126
  readonly cancelable: true;
127
127
  readonly composed: true;
128
128
  };
129
129
  };
130
- readonly input: {
131
- readonly EventType: 'InputEvent';
132
- readonly defaultInit: {
130
+ input: {
131
+ EventType: "InputEvent";
132
+ defaultInit: {
133
133
  readonly bubbles: true;
134
134
  readonly cancelable: false;
135
135
  readonly composed: true;
136
136
  };
137
137
  };
138
- readonly mousedown: {
139
- readonly EventType: 'MouseEvent';
140
- readonly defaultInit: {
138
+ mousedown: {
139
+ EventType: "MouseEvent";
140
+ defaultInit: {
141
141
  readonly bubbles: true;
142
142
  readonly cancelable: true;
143
143
  readonly composed: true;
144
144
  };
145
145
  };
146
- readonly mouseenter: {
147
- readonly EventType: 'MouseEvent';
148
- readonly defaultInit: {
146
+ mouseenter: {
147
+ EventType: "MouseEvent";
148
+ defaultInit: {
149
149
  readonly bubbles: false;
150
150
  readonly cancelable: false;
151
151
  readonly composed: true;
152
152
  };
153
153
  };
154
- readonly mouseleave: {
155
- readonly EventType: 'MouseEvent';
156
- readonly defaultInit: {
154
+ mouseleave: {
155
+ EventType: "MouseEvent";
156
+ defaultInit: {
157
157
  readonly bubbles: false;
158
158
  readonly cancelable: false;
159
159
  readonly composed: true;
160
160
  };
161
161
  };
162
- readonly mousemove: {
163
- readonly EventType: 'MouseEvent';
164
- readonly defaultInit: {
162
+ mousemove: {
163
+ EventType: "MouseEvent";
164
+ defaultInit: {
165
165
  readonly bubbles: true;
166
166
  readonly cancelable: true;
167
167
  readonly composed: true;
168
168
  };
169
169
  };
170
- readonly mouseout: {
171
- readonly EventType: 'MouseEvent';
172
- readonly defaultInit: {
170
+ mouseout: {
171
+ EventType: "MouseEvent";
172
+ defaultInit: {
173
173
  readonly bubbles: true;
174
174
  readonly cancelable: true;
175
175
  readonly composed: true;
176
176
  };
177
177
  };
178
- readonly mouseover: {
179
- readonly EventType: 'MouseEvent';
180
- readonly defaultInit: {
178
+ mouseover: {
179
+ EventType: "MouseEvent";
180
+ defaultInit: {
181
181
  readonly bubbles: true;
182
182
  readonly cancelable: true;
183
183
  readonly composed: true;
184
184
  };
185
185
  };
186
- readonly mouseup: {
187
- readonly EventType: 'MouseEvent';
188
- readonly defaultInit: {
186
+ mouseup: {
187
+ EventType: "MouseEvent";
188
+ defaultInit: {
189
189
  readonly bubbles: true;
190
190
  readonly cancelable: true;
191
191
  readonly composed: true;
192
192
  };
193
193
  };
194
- readonly pointerover: {
195
- readonly EventType: 'PointerEvent';
196
- readonly defaultInit: {
194
+ pointerover: {
195
+ EventType: "PointerEvent";
196
+ defaultInit: {
197
197
  readonly bubbles: true;
198
198
  readonly cancelable: true;
199
199
  readonly composed: true;
200
200
  };
201
201
  };
202
- readonly pointerenter: {
203
- readonly EventType: 'PointerEvent';
204
- readonly defaultInit: {
202
+ pointerenter: {
203
+ EventType: "PointerEvent";
204
+ defaultInit: {
205
205
  readonly bubbles: false;
206
206
  readonly cancelable: false;
207
207
  };
208
208
  };
209
- readonly pointerdown: {
210
- readonly EventType: 'PointerEvent';
211
- readonly defaultInit: {
209
+ pointerdown: {
210
+ EventType: "PointerEvent";
211
+ defaultInit: {
212
212
  readonly bubbles: true;
213
213
  readonly cancelable: true;
214
214
  readonly composed: true;
215
215
  };
216
216
  };
217
- readonly pointermove: {
218
- readonly EventType: 'PointerEvent';
219
- readonly defaultInit: {
217
+ pointermove: {
218
+ EventType: "PointerEvent";
219
+ defaultInit: {
220
220
  readonly bubbles: true;
221
221
  readonly cancelable: true;
222
222
  readonly composed: true;
223
223
  };
224
224
  };
225
- readonly pointerup: {
226
- readonly EventType: 'PointerEvent';
227
- readonly defaultInit: {
225
+ pointerup: {
226
+ EventType: "PointerEvent";
227
+ defaultInit: {
228
228
  readonly bubbles: true;
229
229
  readonly cancelable: true;
230
230
  readonly composed: true;
231
231
  };
232
232
  };
233
- readonly pointercancel: {
234
- readonly EventType: 'PointerEvent';
235
- readonly defaultInit: {
233
+ pointercancel: {
234
+ EventType: "PointerEvent";
235
+ defaultInit: {
236
236
  readonly bubbles: true;
237
237
  readonly cancelable: false;
238
238
  readonly composed: true;
239
239
  };
240
240
  };
241
- readonly pointerout: {
242
- readonly EventType: 'PointerEvent';
243
- readonly defaultInit: {
241
+ pointerout: {
242
+ EventType: "PointerEvent";
243
+ defaultInit: {
244
244
  readonly bubbles: true;
245
245
  readonly cancelable: true;
246
246
  readonly composed: true;
247
247
  };
248
248
  };
249
- readonly pointerleave: {
250
- readonly EventType: 'PointerEvent';
251
- readonly defaultInit: {
249
+ pointerleave: {
250
+ EventType: "PointerEvent";
251
+ defaultInit: {
252
252
  readonly bubbles: false;
253
253
  readonly cancelable: false;
254
254
  };
255
255
  };
256
- readonly submit: {
257
- readonly EventType: 'Event';
258
- readonly defaultInit: {
256
+ submit: {
257
+ EventType: "Event";
258
+ defaultInit: {
259
259
  readonly bubbles: true;
260
260
  readonly cancelable: true;
261
261
  };
@@ -4,12 +4,6 @@ export interface DTLConfig {
4
4
  eventWrapper: <R>(cb: () => R) => R;
5
5
  getElementError: (message: string | null, container: Element) => Error;
6
6
  }
7
- export interface DTLModule {
8
- getConfig(): DTLConfig;
9
- configure(config: Partial<DTLConfig> | ((existing: DTLConfig) => Partial<DTLConfig>)): void;
10
- }
11
- /** The Testing Library DOM module user-event reads its config from, or null (built-in defaults). */
12
- export declare const dtlModule: DTLModule | null;
13
7
  /**
14
8
  * A promise to await before the first API call of a mixed setup; undefined otherwise (and on
15
9
  * every later call, so calls stay synchronous up to their first await, like upstream).
@@ -10,5 +10,6 @@ export declare class System {
10
10
  get pointer(): PointerHost;
11
11
  /** Write the modifier members into `init` (no intermediate object; see createEvent). */
12
12
  assignUIEventModifiers(init: Record<string, unknown>): void;
13
+ /** Upstream's API (dispatchUIEvent no longer uses it): the members above, in the same order. */
13
14
  getUIEventModifiers(): EventModifierInit;
14
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctrl/dom",
3
- "version": "0.3.13",
3
+ "version": "0.4.0",
4
4
  "description": "A fast DOM for testing React components: a drop-in replacement for jsdom and happy-dom, with Testing Library, user-event and jest-dom built in.",
5
5
  "keywords": [
6
6
  "dom",