@ctrl/dom 0.0.0-stage → 0.1.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.
Files changed (380) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +338 -0
  3. package/README.md +362 -2
  4. package/dist/aria/_chunks/roles-list-CYZF-l9K.js +1503 -0
  5. package/dist/aria/_chunks/roles-list-D4WCyRO_.cjs +1754 -0
  6. package/dist/aria/index.cjs +232 -0
  7. package/dist/aria/index.js +198 -0
  8. package/dist/aria/internal.cjs +69 -0
  9. package/dist/aria/internal.js +30 -0
  10. package/dist/aria/types/accname.d.ts +40 -0
  11. package/dist/aria/types/data/aria-query.d.ts +61 -0
  12. package/dist/aria/types/data/aria-query.generated.d.ts +2 -0
  13. package/dist/aria/types/forms.d.ts +25 -0
  14. package/dist/aria/types/hidden.d.ts +38 -0
  15. package/dist/aria/types/index.d.ts +46 -0
  16. package/dist/aria/types/internal.d.ts +15 -0
  17. package/dist/aria/types/role.d.ts +27 -0
  18. package/dist/aria/types/roles-list.d.ts +18 -0
  19. package/dist/aria/types/states.d.ts +29 -0
  20. package/dist/aria/types/style.d.ts +18 -0
  21. package/dist/aria/types/tree.d.ts +20 -0
  22. package/dist/bridge/index.cjs +3 -0
  23. package/dist/bridge/index.js +4 -0
  24. package/dist/bridge/internal.cjs +3 -0
  25. package/dist/bridge/internal.js +4 -0
  26. package/dist/cli/_chunks/report-DdncYfuJ.js +93 -0
  27. package/dist/cli/ctrl-dom.js +199 -0
  28. package/dist/cli/jest-reporter.js +55 -0
  29. package/dist/cli/vitest-reporter.js +81 -0
  30. package/dist/dom/_chunks/src-Hv_BAHIV.js +47537 -0
  31. package/dist/dom/index.js +3 -0
  32. package/dist/dom/internal.js +434 -0
  33. package/dist/dom/types/collections/DOMStringMap.d.ts +8 -0
  34. package/dist/dom/types/collections/DOMTokenList.d.ts +33 -0
  35. package/dist/dom/types/collections/HTMLCollection.d.ts +62 -0
  36. package/dist/dom/types/collections/NamedNodeMap.d.ts +22 -0
  37. package/dist/dom/types/collections/NodeList.d.ts +43 -0
  38. package/dist/dom/types/collections/indexed.d.ts +8 -0
  39. package/dist/dom/types/collections/iterator.d.ts +8 -0
  40. package/dist/dom/types/css/CSS.d.ts +21 -0
  41. package/dist/dom/types/css/CSSStyleDeclaration.d.ts +57 -0
  42. package/dist/dom/types/css/cascade.d.ts +159 -0
  43. package/dist/dom/types/css/colors.d.ts +28 -0
  44. package/dist/dom/types/css/computed.d.ts +22 -0
  45. package/dist/dom/types/css/cssom.d.ts +363 -0
  46. package/dist/dom/types/css/data/properties.d.ts +1 -0
  47. package/dist/dom/types/css/declarations.d.ts +40 -0
  48. package/dist/dom/types/css/index.d.ts +5 -0
  49. package/dist/dom/types/css/inline-count.d.ts +2 -0
  50. package/dist/dom/types/css/internal.d.ts +11 -0
  51. package/dist/dom/types/css/layout-mode.d.ts +4 -0
  52. package/dist/dom/types/css/layout.d.ts +63 -0
  53. package/dist/dom/types/css/media.d.ts +55 -0
  54. package/dist/dom/types/css/parser.d.ts +93 -0
  55. package/dist/dom/types/css/properties.d.ts +28 -0
  56. package/dist/dom/types/css/resize-observer.d.ts +19 -0
  57. package/dist/dom/types/css/selector-info.d.ts +13 -0
  58. package/dist/dom/types/css/shorthands.d.ts +33 -0
  59. package/dist/dom/types/css/stylesheets.d.ts +93 -0
  60. package/dist/dom/types/css/supports.d.ts +4 -0
  61. package/dist/dom/types/css/tokenizer.d.ts +91 -0
  62. package/dist/dom/types/css/values.d.ts +91 -0
  63. package/dist/dom/types/css/view.d.ts +44 -0
  64. package/dist/dom/types/events/DataTransfer.d.ts +62 -0
  65. package/dist/dom/types/events/Event.d.ts +115 -0
  66. package/dist/dom/types/events/EventTarget.d.ts +22 -0
  67. package/dist/dom/types/events/UIEvents.d.ts +308 -0
  68. package/dist/dom/types/events/activation.d.ts +7 -0
  69. package/dist/dom/types/events/convert.d.ts +16 -0
  70. package/dist/dom/types/events/createEvent.d.ts +3 -0
  71. package/dist/dom/types/events/dispatch.d.ts +39 -0
  72. package/dist/dom/types/events/events.d.ts +200 -0
  73. package/dist/dom/types/events/fire.d.ts +21 -0
  74. package/dist/dom/types/events/handlers.d.ts +14 -0
  75. package/dist/dom/types/events/listeners.d.ts +32 -0
  76. package/dist/dom/types/events/report.d.ts +10 -0
  77. package/dist/dom/types/html/HTMLElement.d.ts +126 -0
  78. package/dist/dom/types/html/MathMLElement.d.ts +6 -0
  79. package/dist/dom/types/html/SVGElement.d.ts +145 -0
  80. package/dist/dom/types/html/anchor.d.ts +16 -0
  81. package/dist/dom/types/html/aria-reflection.d.ts +14 -0
  82. package/dist/dom/types/html/collection.d.ts +5 -0
  83. package/dist/dom/types/html/custom-elements.d.ts +129 -0
  84. package/dist/dom/types/html/elements.d.ts +202 -0
  85. package/dist/dom/types/html/events.d.ts +22 -0
  86. package/dist/dom/types/html/focus.d.ts +63 -0
  87. package/dist/dom/types/html/forms/FileList.d.ts +1 -0
  88. package/dist/dom/types/html/forms/FormData.d.ts +7 -0
  89. package/dist/dom/types/html/forms/HTMLButtonElement.d.ts +36 -0
  90. package/dist/dom/types/html/forms/HTMLFieldSetElement.d.ts +29 -0
  91. package/dist/dom/types/html/forms/HTMLFormElement.d.ts +61 -0
  92. package/dist/dom/types/html/forms/HTMLInputElement.d.ts +204 -0
  93. package/dist/dom/types/html/forms/HTMLLabelElement.d.ts +15 -0
  94. package/dist/dom/types/html/forms/HTMLOptionElement.d.ts +61 -0
  95. package/dist/dom/types/html/forms/HTMLOutputElement.d.ts +74 -0
  96. package/dist/dom/types/html/forms/HTMLSelectElement.d.ts +96 -0
  97. package/dist/dom/types/html/forms/HTMLTextAreaElement.d.ts +82 -0
  98. package/dist/dom/types/html/forms/autofill.d.ts +10 -0
  99. package/dist/dom/types/html/forms/collections.d.ts +112 -0
  100. package/dist/dom/types/html/forms/common.d.ts +36 -0
  101. package/dist/dom/types/html/forms/face.d.ts +59 -0
  102. package/dist/dom/types/html/forms/form-associated.d.ts +46 -0
  103. package/dist/dom/types/html/forms/form-submission.d.ts +55 -0
  104. package/dist/dom/types/html/forms/index.d.ts +17 -0
  105. package/dist/dom/types/html/forms/input-type.d.ts +50 -0
  106. package/dist/dom/types/html/forms/microsyntaxes.d.ts +52 -0
  107. package/dist/dom/types/html/forms/state.d.ts +54 -0
  108. package/dist/dom/types/html/forms/ui.d.ts +35 -0
  109. package/dist/dom/types/html/forms/user-validity.d.ts +19 -0
  110. package/dist/dom/types/html/forms/validation.d.ts +76 -0
  111. package/dist/dom/types/html/index.d.ts +13 -0
  112. package/dist/dom/types/html/innerText.d.ts +9 -0
  113. package/dist/dom/types/html/interactive.d.ts +43 -0
  114. package/dist/dom/types/html/invokers.d.ts +39 -0
  115. package/dist/dom/types/html/media.d.ts +86 -0
  116. package/dist/dom/types/html/reflect.d.ts +67 -0
  117. package/dist/dom/types/html/registry.d.ts +9 -0
  118. package/dist/dom/types/html/resources.d.ts +55 -0
  119. package/dist/dom/types/html/shared.d.ts +22 -0
  120. package/dist/dom/types/html/slot.d.ts +15 -0
  121. package/dist/dom/types/html/template.d.ts +18 -0
  122. package/dist/dom/types/html/top-layer.d.ts +73 -0
  123. package/dist/dom/types/index.d.ts +50 -0
  124. package/dist/dom/types/internal.d.ts +61 -0
  125. package/dist/dom/types/keys.d.ts +209 -0
  126. package/dist/dom/types/nodes/Attr.d.ts +25 -0
  127. package/dist/dom/types/nodes/CharacterData.d.ts +35 -0
  128. package/dist/dom/types/nodes/Document.d.ts +169 -0
  129. package/dist/dom/types/nodes/DocumentFragment.d.ts +12 -0
  130. package/dist/dom/types/nodes/DocumentType.d.ts +17 -0
  131. package/dist/dom/types/nodes/Element.d.ts +142 -0
  132. package/dist/dom/types/nodes/Node.d.ts +112 -0
  133. package/dist/dom/types/nodes/NodeImpl.d.ts +90 -0
  134. package/dist/dom/types/nodes/ShadowRoot.d.ts +43 -0
  135. package/dist/dom/types/nodes/attr-nodes.d.ts +8 -0
  136. package/dist/dom/types/nodes/attributes.d.ts +46 -0
  137. package/dist/dom/types/nodes/cache.d.ts +38 -0
  138. package/dist/dom/types/nodes/character-data.d.ts +5 -0
  139. package/dist/dom/types/nodes/clone.d.ts +5 -0
  140. package/dist/dom/types/nodes/constants.d.ts +52 -0
  141. package/dist/dom/types/nodes/create.d.ts +42 -0
  142. package/dist/dom/types/nodes/derived.d.ts +26 -0
  143. package/dist/dom/types/nodes/inspect.d.ts +2 -0
  144. package/dist/dom/types/nodes/mixins.d.ts +41 -0
  145. package/dist/dom/types/nodes/names.d.ts +15 -0
  146. package/dist/dom/types/nodes/slots.d.ts +38 -0
  147. package/dist/dom/types/nodes/tags.d.ts +8 -0
  148. package/dist/dom/types/nodes/traverse.d.ts +21 -0
  149. package/dist/dom/types/nodes/tree.d.ts +47 -0
  150. package/dist/dom/types/observers/MutationObserver.d.ts +33 -0
  151. package/dist/dom/types/observers/MutationRecord.d.ts +17 -0
  152. package/dist/dom/types/observers/queue.d.ts +45 -0
  153. package/dist/dom/types/parser/entities-data.d.ts +3 -0
  154. package/dist/dom/types/parser/entities.d.ts +11 -0
  155. package/dist/dom/types/parser/index.d.ts +34 -0
  156. package/dist/dom/types/parser/tags.d.ts +182 -0
  157. package/dist/dom/types/parser/tokenizer.d.ts +109 -0
  158. package/dist/dom/types/parser/treebuilder.d.ts +271 -0
  159. package/dist/dom/types/parser/xml.d.ts +14 -0
  160. package/dist/dom/types/selectors/compile.d.ts +154 -0
  161. package/dist/dom/types/selectors/filter.d.ts +21 -0
  162. package/dist/dom/types/selectors/html-predicates.d.ts +1 -0
  163. package/dist/dom/types/selectors/index.d.ts +16 -0
  164. package/dist/dom/types/selectors/internal.d.ts +87 -0
  165. package/dist/dom/types/selectors/parser.d.ts +310 -0
  166. package/dist/dom/types/selectors/serialize.d.ts +20 -0
  167. package/dist/dom/types/selectors/state.d.ts +43 -0
  168. package/dist/dom/types/serializer/index.d.ts +29 -0
  169. package/dist/dom/types/trace.d.ts +51 -0
  170. package/dist/dom/types/traversal/Range.d.ts +113 -0
  171. package/dist/dom/types/traversal/Selection.d.ts +45 -0
  172. package/dist/dom/types/traversal/TreeWalker.d.ts +77 -0
  173. package/dist/dom/types/traversal/live.d.ts +46 -0
  174. package/dist/dom/types/webidl-runtime.d.ts +18 -0
  175. package/dist/dom/types/webidl.d.ts +34 -0
  176. package/dist/dom/types/window/DOMStringList.d.ts +14 -0
  177. package/dist/dom/types/window/FileList.d.ts +11 -0
  178. package/dist/dom/types/window/FileReader.d.ts +27 -0
  179. package/dist/dom/types/window/History.d.ts +43 -0
  180. package/dist/dom/types/window/Location.d.ts +46 -0
  181. package/dist/dom/types/window/Navigator.d.ts +79 -0
  182. package/dist/dom/types/window/Screen.d.ts +27 -0
  183. package/dist/dom/types/window/Storage.d.ts +28 -0
  184. package/dist/dom/types/window/Window.d.ts +329 -0
  185. package/dist/dom/types/window/abort.d.ts +4 -0
  186. package/dist/dom/types/window/browsing-context.d.ts +12 -0
  187. package/dist/dom/types/window/clock.d.ts +163 -0
  188. package/dist/dom/types/window/compat.d.ts +34 -0
  189. package/dist/dom/types/window/cookies.d.ts +21 -0
  190. package/dist/dom/types/window/current.d.ts +7 -0
  191. package/dist/dom/types/window/document.d.ts +19 -0
  192. package/dist/dom/types/window/events.d.ts +11 -0
  193. package/dist/dom/types/window/fallbacks.d.ts +20 -0
  194. package/dist/dom/types/window/geometry.d.ts +133 -0
  195. package/dist/dom/types/window/globals.d.ts +7 -0
  196. package/dist/dom/types/window/hooks.d.ts +22 -0
  197. package/dist/dom/types/window/host-originals.d.ts +9 -0
  198. package/dist/dom/types/window/interfaces.d.ts +13 -0
  199. package/dist/dom/types/window/isolation.d.ts +20 -0
  200. package/dist/dom/types/window/media.d.ts +33 -0
  201. package/dist/dom/types/window/not-implemented.d.ts +23 -0
  202. package/dist/dom/types/window/observers.d.ts +42 -0
  203. package/dist/dom/types/window/origin.d.ts +3 -0
  204. package/dist/dom/types/window/timers.d.ts +28 -0
  205. package/dist/dom/types/window/xhr.d.ts +108 -0
  206. package/dist/jest-dom/_chunks/matchers-CDnnXUfG.js +2211 -0
  207. package/dist/jest-dom/_chunks/matchers-D988Ducb.cjs +2516 -0
  208. package/dist/jest-dom/index.cjs +5 -0
  209. package/dist/jest-dom/index.js +6 -0
  210. package/dist/jest-dom/jest-globals.cjs +6 -0
  211. package/dist/jest-dom/jest-globals.js +7 -0
  212. package/dist/jest-dom/matchers.cjs +53 -0
  213. package/dist/jest-dom/matchers.js +3 -0
  214. package/dist/jest-dom/types/bun.d.ts +13 -0
  215. package/dist/jest-dom/types/index.d.ts +3 -0
  216. package/dist/jest-dom/types/jest-globals.d.ts +13 -0
  217. package/dist/jest-dom/types/jest.d.ts +15 -0
  218. package/dist/jest-dom/types/matchers-standalone.d.ts +32 -0
  219. package/dist/jest-dom/types/matchers.d.ts +1079 -0
  220. package/dist/jest-dom/types/package.json +1 -0
  221. package/dist/jest-dom/types/vitest.d.ts +16 -0
  222. package/dist/jest-dom/vitest.cjs +6 -0
  223. package/dist/jest-dom/vitest.js +7 -0
  224. package/dist/react/_chunks/pure-DZ97z2oT.cjs +498 -0
  225. package/dist/react/_chunks/pure-PtE2hivW.js +420 -0
  226. package/dist/react/dont-cleanup-after-each.cjs +3 -0
  227. package/dist/react/dont-cleanup-after-each.js +4 -0
  228. package/dist/react/index.cjs +47 -0
  229. package/dist/react/index.js +35 -0
  230. package/dist/react/pure.cjs +17 -0
  231. package/dist/react/pure.js +5 -0
  232. package/dist/react/types/act-compat.d.ts +6 -0
  233. package/dist/react/types/config.d.ts +9 -0
  234. package/dist/react/types/dont-cleanup-after-each.d.ts +1 -0
  235. package/dist/react/types/dtl.d.ts +1 -0
  236. package/dist/react/types/fire-event.d.ts +3 -0
  237. package/dist/react/types/index.d.ts +1 -0
  238. package/dist/react/types/pure.d.ts +136 -0
  239. package/dist/register/index.js +11 -0
  240. package/dist/register/pure.js +147 -0
  241. package/dist/register/types/index.d.ts +1 -0
  242. package/dist/register/types/pure.d.ts +36 -0
  243. package/dist/testing-library/_chunks/aria-snapshot-diff-D7PzpXew.cjs +1170 -0
  244. package/dist/testing-library/_chunks/aria-snapshot-diff-Q8Wj33K0.js +985 -0
  245. package/dist/testing-library/agent.cjs +721 -0
  246. package/dist/testing-library/agent.js +713 -0
  247. package/dist/testing-library/index.cjs +2469 -0
  248. package/dist/testing-library/index.js +2390 -0
  249. package/dist/testing-library/types/agent.d.ts +56 -0
  250. package/dist/testing-library/types/aria-role.d.ts +99 -0
  251. package/dist/testing-library/types/aria-snapshot.d.ts +43 -0
  252. package/dist/testing-library/types/config.d.ts +27 -0
  253. package/dist/testing-library/types/events.d.ts +118 -0
  254. package/dist/testing-library/types/get-node-text.d.ts +1 -0
  255. package/dist/testing-library/types/get-queries-for-element.d.ts +182 -0
  256. package/dist/testing-library/types/index.d.ts +24 -0
  257. package/dist/testing-library/types/matches.d.ts +46 -0
  258. package/dist/testing-library/types/pretty-dom.d.ts +37 -0
  259. package/dist/testing-library/types/queries.d.ts +315 -0
  260. package/dist/testing-library/types/query-helpers.d.ts +112 -0
  261. package/dist/testing-library/types/role-helpers.d.ts +19 -0
  262. package/dist/testing-library/types/screen.d.ts +30 -0
  263. package/dist/testing-library/types/suggestions.d.ts +46 -0
  264. package/dist/testing-library/types/wait-for-element-to-be-removed.d.ts +6 -0
  265. package/dist/testing-library/types/wait-for.d.ts +12 -0
  266. package/dist/user-event/index.cjs +3923 -0
  267. package/dist/user-event/index.js +3898 -0
  268. package/dist/user-event/types/clipboard/copy.d.ts +2 -0
  269. package/dist/user-event/types/clipboard/cut.d.ts +2 -0
  270. package/dist/user-event/types/clipboard/index.d.ts +3 -0
  271. package/dist/user-event/types/clipboard/paste.d.ts +3 -0
  272. package/dist/user-event/types/convenience/click.d.ts +5 -0
  273. package/dist/user-event/types/convenience/hover.d.ts +4 -0
  274. package/dist/user-event/types/convenience/index.d.ts +3 -0
  275. package/dist/user-event/types/convenience/tab.d.ts +4 -0
  276. package/dist/user-event/types/ctrl-dom.d.ts +55 -0
  277. package/dist/user-event/types/document/UI.d.ts +35 -0
  278. package/dist/user-event/types/document/copySelection.d.ts +2 -0
  279. package/dist/user-event/types/document/getValueOrTextContent.d.ts +2 -0
  280. package/dist/user-event/types/document/index.d.ts +5 -0
  281. package/dist/user-event/types/document/interceptor.d.ts +20 -0
  282. package/dist/user-event/types/document/patchFocus.d.ts +7 -0
  283. package/dist/user-event/types/document/prepareDocument.d.ts +2 -0
  284. package/dist/user-event/types/document/trackValue.d.ts +13 -0
  285. package/dist/user-event/types/dom-types.d.ts +56 -0
  286. package/dist/user-event/types/event/behavior/click.d.ts +1 -0
  287. package/dist/user-event/types/event/behavior/cut.d.ts +1 -0
  288. package/dist/user-event/types/event/behavior/index.d.ts +8 -0
  289. package/dist/user-event/types/event/behavior/keydown.d.ts +1 -0
  290. package/dist/user-event/types/event/behavior/keypress.d.ts +1 -0
  291. package/dist/user-event/types/event/behavior/keyup.d.ts +1 -0
  292. package/dist/user-event/types/event/behavior/paste.d.ts +1 -0
  293. package/dist/user-event/types/event/behavior/registry.d.ts +9 -0
  294. package/dist/user-event/types/event/createEvent.d.ts +8 -0
  295. package/dist/user-event/types/event/dispatchEvent.d.ts +6 -0
  296. package/dist/user-event/types/event/eventMap.d.ts +265 -0
  297. package/dist/user-event/types/event/focus.d.ts +6 -0
  298. package/dist/user-event/types/event/index.d.ts +7 -0
  299. package/dist/user-event/types/event/input.d.ts +3 -0
  300. package/dist/user-event/types/event/radio.d.ts +5 -0
  301. package/dist/user-event/types/event/selection/getInputRange.d.ts +6 -0
  302. package/dist/user-event/types/event/selection/getTargetTypeAndSelection.d.ts +11 -0
  303. package/dist/user-event/types/event/selection/index.d.ts +15 -0
  304. package/dist/user-event/types/event/selection/modifySelection.d.ts +9 -0
  305. package/dist/user-event/types/event/selection/modifySelectionPerMouse.d.ts +8 -0
  306. package/dist/user-event/types/event/selection/moveSelection.d.ts +5 -0
  307. package/dist/user-event/types/event/selection/resolveCaretPosition.d.ts +9 -0
  308. package/dist/user-event/types/event/selection/selectAll.d.ts +6 -0
  309. package/dist/user-event/types/event/selection/setSelection.d.ts +11 -0
  310. package/dist/user-event/types/event/selection/setSelectionPerMouse.d.ts +9 -0
  311. package/dist/user-event/types/event/selection/setSelectionRange.d.ts +7 -0
  312. package/dist/user-event/types/event/selection/updateSelectionOnFocus.d.ts +6 -0
  313. package/dist/user-event/types/event/types.d.ts +21 -0
  314. package/dist/user-event/types/event/wrapEvent.d.ts +2 -0
  315. package/dist/user-event/types/index.d.ts +6 -0
  316. package/dist/user-event/types/keyboard/index.d.ts +3 -0
  317. package/dist/user-event/types/keyboard/keyMap.d.ts +5 -0
  318. package/dist/user-event/types/keyboard/parseKeyDef.d.ts +17 -0
  319. package/dist/user-event/types/options.d.ts +121 -0
  320. package/dist/user-event/types/pointer/index.d.ts +29 -0
  321. package/dist/user-event/types/pointer/keyMap.d.ts +2 -0
  322. package/dist/user-event/types/pointer/parseKeyDef.d.ts +6 -0
  323. package/dist/user-event/types/setup/api.d.ts +23 -0
  324. package/dist/user-event/types/setup/directApi.d.ts +25 -0
  325. package/dist/user-event/types/setup/dtl.d.ts +20 -0
  326. package/dist/user-event/types/setup/index.d.ts +22 -0
  327. package/dist/user-event/types/setup/setup.d.ts +45 -0
  328. package/dist/user-event/types/setup/wrapAsync.d.ts +4 -0
  329. package/dist/user-event/types/system/index.d.ts +13 -0
  330. package/dist/user-event/types/system/keyLocation.d.ts +11 -0
  331. package/dist/user-event/types/system/keyboard.d.ts +46 -0
  332. package/dist/user-event/types/system/pointer/buttons.d.ts +25 -0
  333. package/dist/user-event/types/system/pointer/device.d.ts +8 -0
  334. package/dist/user-event/types/system/pointer/index.d.ts +21 -0
  335. package/dist/user-event/types/system/pointer/mouse.d.ts +31 -0
  336. package/dist/user-event/types/system/pointer/pointer.d.ts +32 -0
  337. package/dist/user-event/types/system/pointer/shared.d.ts +21 -0
  338. package/dist/user-event/types/utility/clear.d.ts +3 -0
  339. package/dist/user-event/types/utility/index.d.ts +4 -0
  340. package/dist/user-event/types/utility/selectOptions.d.ts +4 -0
  341. package/dist/user-event/types/utility/type.d.ts +10 -0
  342. package/dist/user-event/types/utility/upload.d.ts +6 -0
  343. package/dist/user-event/types/utils/click/isClickableInput.d.ts +17 -0
  344. package/dist/user-event/types/utils/dataTransfer/Blob.d.ts +4 -0
  345. package/dist/user-event/types/utils/dataTransfer/Clipboard.d.ts +12 -0
  346. package/dist/user-event/types/utils/dataTransfer/DataTransfer.d.ts +3 -0
  347. package/dist/user-event/types/utils/dataTransfer/FileList.d.ts +2 -0
  348. package/dist/user-event/types/utils/edit/isContentEditable.d.ts +8 -0
  349. package/dist/user-event/types/utils/edit/isEditable.d.ts +26 -0
  350. package/dist/user-event/types/utils/edit/maxLength.d.ts +16 -0
  351. package/dist/user-event/types/utils/edit/setFiles.d.ts +11 -0
  352. package/dist/user-event/types/utils/edit/timeValue.d.ts +5 -0
  353. package/dist/user-event/types/utils/focus/cursor.d.ts +5 -0
  354. package/dist/user-event/types/utils/focus/getActiveElement.d.ts +3 -0
  355. package/dist/user-event/types/utils/focus/getTabDestination.d.ts +2 -0
  356. package/dist/user-event/types/utils/focus/isFocusable.d.ts +2 -0
  357. package/dist/user-event/types/utils/focus/selection.d.ts +9 -0
  358. package/dist/user-event/types/utils/focus/selector.d.ts +1 -0
  359. package/dist/user-event/types/utils/index.d.ts +29 -0
  360. package/dist/user-event/types/utils/keyDef/readNextDescriptor.d.ts +21 -0
  361. package/dist/user-event/types/utils/misc/cloneEvent.d.ts +2 -0
  362. package/dist/user-event/types/utils/misc/findClosest.d.ts +2 -0
  363. package/dist/user-event/types/utils/misc/getDocumentFromNode.d.ts +2 -0
  364. package/dist/user-event/types/utils/misc/getTreeDiff.d.ts +2 -0
  365. package/dist/user-event/types/utils/misc/getWindow.d.ts +2 -0
  366. package/dist/user-event/types/utils/misc/isDescendantOrSelf.d.ts +2 -0
  367. package/dist/user-event/types/utils/misc/isDisabled.d.ts +2 -0
  368. package/dist/user-event/types/utils/misc/isElementType.d.ts +6 -0
  369. package/dist/user-event/types/utils/misc/isVisible.d.ts +2 -0
  370. package/dist/user-event/types/utils/misc/level.d.ts +9 -0
  371. package/dist/user-event/types/utils/misc/wait.d.ts +6 -0
  372. package/dist/user-event/types/utils/pointer/cssPointerEvents.d.ts +4 -0
  373. package/dist/vitest-environment/failure-snapshot.js +42 -0
  374. package/dist/vitest-environment/index.js +185 -0
  375. package/dist/vitest-environment/plugin.js +90 -0
  376. package/dist/vitest-environment/types/failure-snapshot.d.ts +1 -0
  377. package/dist/vitest-environment/types/index.d.ts +29 -0
  378. package/dist/vitest-environment/types/plugin.d.ts +33 -0
  379. package/jest-preset.cjs +17 -0
  380. package/package.json +178 -4
@@ -0,0 +1,209 @@
1
+ export declare const $_proto__: unique symbol;
2
+ export declare const $aboutBase: unique symbol;
3
+ export declare const $active: unique symbol;
4
+ export declare const $assocGen: unique symbol;
5
+ export declare const $attr: unique symbol;
6
+ export declare const $attributes: unique symbol;
7
+ export declare const $availableToElementInternals: unique symbol;
8
+ export declare const $badInput: unique symbol;
9
+ export declare const $baseFor: unique symbol;
10
+ export declare const $baseOverride: unique symbol;
11
+ export declare const $baseURL: unique symbol;
12
+ export declare const $baseVersion: unique symbol;
13
+ export declare const $block: unique symbol;
14
+ export declare const $byCtor: unique symbol;
15
+ export declare const $byName: unique symbol;
16
+ export declare const $cache: unique symbol;
17
+ export declare const $callback: unique symbol;
18
+ export declare const $checked: unique symbol;
19
+ export declare const $checkedSet: unique symbol;
20
+ export declare const $childNodes: unique symbol;
21
+ export declare const $childWindows: unique symbol;
22
+ export declare const $children: unique symbol;
23
+ export declare const $classList: unique symbol;
24
+ export declare const $clipboard: unique symbol;
25
+ export declare const $clonable: unique symbol;
26
+ export declare const $closed: unique symbol;
27
+ export declare const $compiled: unique symbol;
28
+ export declare const $compiledFor: unique symbol;
29
+ export declare const $condition: unique symbol;
30
+ export declare const $constructed: unique symbol;
31
+ export declare const $constructingEntryList: unique symbol;
32
+ export declare const $contentType: unique symbol;
33
+ export declare const $controlsCache: unique symbol;
34
+ export declare const $controlsDoc: unique symbol;
35
+ export declare const $coll: unique symbol;
36
+ export declare const $controlsVersion: unique symbol;
37
+ export declare const $cookieJar: unique symbol;
38
+ export declare const $cookies: unique symbol;
39
+ export declare const $css: unique symbol;
40
+ export declare const $current: unique symbol;
41
+ export declare const $customElements: unique symbol;
42
+ export declare const $customValidity: unique symbol;
43
+ export declare const $cx: unique symbol;
44
+ export declare const $data: unique symbol;
45
+ export declare const $dataset: unique symbol;
46
+ export declare const $declarative: unique symbol;
47
+ export declare const $defaultNamespace: unique symbol;
48
+ export declare const $defaultValueOverride: unique symbol;
49
+ export declare const $delegatesFocus: unique symbol;
50
+ export declare const $devicePixelRatio: unique symbol;
51
+ export declare const $dirtiness: unique symbol;
52
+ export declare const $dirtyChecked: unique symbol;
53
+ export declare const $dirtyValue: unique symbol;
54
+ export declare const $disabled: unique symbol;
55
+ export declare const $disallowModification: unique symbol;
56
+ export declare const $derived: unique symbol;
57
+ export declare const $doc: unique symbol;
58
+ export declare const $dropEffect: unique symbol;
59
+ export declare const $ec: unique symbol;
60
+ export declare const $effectAllowed: unique symbol;
61
+ export declare const $el: unique symbol;
62
+ export declare const $elements: unique symbol;
63
+ export declare const $entries: unique symbol;
64
+ export declare const $eo: unique symbol;
65
+ export declare const $error: unique symbol;
66
+ export declare const $file: unique symbol;
67
+ export declare const $files: unique symbol;
68
+ export declare const $fill: unique symbol;
69
+ export declare const $filter: unique symbol;
70
+ export declare const $firingSubmissionEvents: unique symbol;
71
+ export declare const $focused: unique symbol;
72
+ export declare const $form: unique symbol;
73
+ export declare const $forms: unique symbol;
74
+ export declare const $frameCallbacks: unique symbol;
75
+ export declare const $frameElement: unique symbol;
76
+ export declare const $frameId: unique symbol;
77
+ export declare const $frameTask: unique symbol;
78
+ export declare const $frameTime: unique symbol;
79
+ export declare const $generation: unique symbol;
80
+ export declare const $globalObject: unique symbol;
81
+ export declare const $hasTransients: unique symbol;
82
+ export declare const $height: unique symbol;
83
+ export declare const $history: unique symbol;
84
+ export declare const $home: unique symbol;
85
+ export declare const $host: unique symbol;
86
+ export declare const $href: unique symbol;
87
+ export declare const $id: unique symbol;
88
+ export declare const $idleCallbacks: unique symbol;
89
+ export declare const $idleId: unique symbol;
90
+ export declare const $ids: unique symbol;
91
+ export declare const $impl: unique symbol;
92
+ export declare const $implementation: unique symbol;
93
+ export declare const $indeterminate: unique symbol;
94
+ export declare const $index: unique symbol;
95
+ export declare const $indexed: unique symbol;
96
+ export declare const $inflight: unique symbol;
97
+ export declare const $info: unique symbol;
98
+ export declare const $innerHeight: unique symbol;
99
+ export declare const $innerWidth: unique symbol;
100
+ export declare const $is2D: unique symbol;
101
+ export declare const $isHTML: unique symbol;
102
+ export declare const $items: unique symbol;
103
+ export declare const $keyText: unique symbol;
104
+ export declare const $kind: unique symbol;
105
+ export declare const $labels: unique symbol;
106
+ export declare const $layerName: unique symbol;
107
+ export declare const $list: unique symbol;
108
+ export declare const $listeners: unique symbol;
109
+ export declare const $localStorage: unique symbol;
110
+ export declare const $location: unique symbol;
111
+ export declare const $lockedForReset: unique symbol;
112
+ export declare const $m: unique symbol;
113
+ export declare const $matches: unique symbol;
114
+ export declare const $media: unique symbol;
115
+ export declare const $mediaQueryLists: unique symbol;
116
+ export declare const $mode: unique symbol;
117
+ export declare const $name: unique symbol;
118
+ export declare const $names: unique symbol;
119
+ export declare const $namespaces: unique symbol;
120
+ export declare const $navigator: unique symbol;
121
+ export declare const $nodes: unique symbol;
122
+ export declare const $onchange: unique symbol;
123
+ export declare const $options: unique symbol;
124
+ export declare const $owner: unique symbol;
125
+ export declare const $ownerNode: unique symbol;
126
+ export declare const $ownerRule: unique symbol;
127
+ export declare const $parent: unique symbol;
128
+ export declare const $parentRule: unique symbol;
129
+ export declare const $parentWindow: unique symbol;
130
+ export declare const $pastNames: unique symbol;
131
+ export declare const $pointerBeforeReference: unique symbol;
132
+ export declare const $preApplied: unique symbol;
133
+ export declare const $preChecked: unique symbol;
134
+ export declare const $preCheckedRadio: unique symbol;
135
+ export declare const $preIndeterminate: unique symbol;
136
+ export declare const $prefix: unique symbol;
137
+ export declare const $prelude: unique symbol;
138
+ export declare const $presentationStyle: unique symbol;
139
+ export declare const $pseudo: unique symbol;
140
+ export declare const $queries: unique symbol;
141
+ export declare const $ranges: unique symbol;
142
+ export declare const $rawValue: unique symbol;
143
+ export declare const $readonly: unique symbol;
144
+ export declare const $readyState: unique symbol;
145
+ export declare const $record: unique symbol;
146
+ export declare const $records: unique symbol;
147
+ export declare const $rects: unique symbol;
148
+ export declare const $reference: unique symbol;
149
+ export declare const $result: unique symbol;
150
+ export declare const $root: unique symbol;
151
+ export declare const $rules: unique symbol;
152
+ export declare const $running: unique symbol;
153
+ export declare const $runningFrame: unique symbol;
154
+ export declare const $sc: unique symbol;
155
+ export declare const $screen: unique symbol;
156
+ export declare const $scrollRestoration: unique symbol;
157
+ export declare const $scrollX: unique symbol;
158
+ export declare const $scrollY: unique symbol;
159
+ export declare const $selDir: unique symbol;
160
+ export declare const $selEnd: unique symbol;
161
+ export declare const $selSet: unique symbol;
162
+ export declare const $selStart: unique symbol;
163
+ export declare const $selectedOptions: unique symbol;
164
+ export declare const $selectedness: unique symbol;
165
+ export declare const $selection: unique symbol;
166
+ export declare const $selector: unique symbol;
167
+ export declare const $serializable: unique symbol;
168
+ export declare const $sessionStorage: unique symbol;
169
+ export declare const $settled: unique symbol;
170
+ export declare const $shadowRoot: unique symbol;
171
+ export declare const $shed: unique symbol;
172
+ export declare const $sheet: unique symbol;
173
+ export declare const $sheets: unique symbol;
174
+ export declare const $slotAssignment: unique symbol;
175
+ export declare const $so: unique symbol;
176
+ export declare const $states: unique symbol;
177
+ export declare const $style: unique symbol;
178
+ export declare const $styleVersion: unique symbol;
179
+ export declare const $supportsText: unique symbol;
180
+ export declare const $systemId: unique symbol;
181
+ export declare const $target: unique symbol;
182
+ export declare const $targets: unique symbol;
183
+ export declare const $tasks: unique symbol;
184
+ export declare const $timers: unique symbol;
185
+ export declare const $title: unique symbol;
186
+ export declare const $type: unique symbol;
187
+ export declare const $types: unique symbol;
188
+ export declare const $uiValue: unique symbol;
189
+ export declare const $updating: unique symbol;
190
+ export declare const $updatingSelectedContent: unique symbol;
191
+ export declare const $uri: unique symbol;
192
+ export declare const $url: unique symbol;
193
+ export declare const $userActivation: unique symbol;
194
+ export declare const $userEdited: unique symbol;
195
+ export declare const $userValidity: unique symbol;
196
+ export declare const $validity: unique symbol;
197
+ export declare const $value: unique symbol;
198
+ export declare const $version: unique symbol;
199
+ export declare const $visualViewport: unique symbol;
200
+ export declare const $w: unique symbol;
201
+ export declare const $whatToShow: unique symbol;
202
+ export declare const $whenDefined: unique symbol;
203
+ export declare const $width: unique symbol;
204
+ export declare const $window: unique symbol;
205
+ export declare const $writeBuffer: unique symbol;
206
+ export declare const $x: unique symbol;
207
+ export declare const $xhr: unique symbol;
208
+ export declare const $y: unique symbol;
209
+ export declare const $z: unique symbol;
@@ -0,0 +1,25 @@
1
+ import type { Document } from "./Document.js";
2
+ import type { Element } from "./Element.js";
3
+ import { Node } from "./Node.js";
4
+ import type { AttrRecord } from "./NodeImpl.js";
5
+ import { $owner, $record } from "../keys.js";
6
+ export declare class Attr extends Node {
7
+ /** Backing record while attached to an element; null for a detached Attr. */
8
+ [$record]: AttrRecord | null;
9
+ [$owner]: Element | null;
10
+ /** @internal */
11
+ constructor(doc: Document, localName: string, value: string, ns: string | null, prefix: string | null, owner: Element | null, record?: AttrRecord | null);
12
+ get namespaceURI(): string | null;
13
+ get prefix(): string | null;
14
+ get localName(): string;
15
+ get name(): string;
16
+ /** https://dom.spec.whatwg.org/#dom-attr-value */
17
+ get value(): string;
18
+ set value(value: string);
19
+ get ownerElement(): Element | null;
20
+ get specified(): boolean;
21
+ /** @internal Attach to `owner` with backing `record` (record.value is the value from now on). */
22
+ _attach(owner: Element, record: AttrRecord): void;
23
+ /** @internal Detach from the element, keeping the current value. */
24
+ _detach(): void;
25
+ }
@@ -0,0 +1,35 @@
1
+ import type { Document } from "./Document.js";
2
+ import { Node } from "./Node.js";
3
+ import { type ChildNode, type NonDocumentTypeChildNode } from "./mixins.js";
4
+ import type { Element } from "./Element.js";
5
+ export declare abstract class CharacterData extends Node {
6
+ get data(): string;
7
+ set data(value: string);
8
+ get length(): number;
9
+ substringData(offset: number, count: number): string;
10
+ appendData(data: string): void;
11
+ insertData(offset: number, data: string): void;
12
+ deleteData(offset: number, count: number): void;
13
+ replaceData(offset: number, count: number, data: string): void;
14
+ }
15
+ export interface CharacterData extends ChildNode, NonDocumentTypeChildNode {
16
+ }
17
+ export declare class Text extends CharacterData {
18
+ constructor(data?: string, doc?: Document);
19
+ /** https://dom.spec.whatwg.org/#dom-text-splittext */
20
+ splitText(offset: number): Text;
21
+ /** https://dom.spec.whatwg.org/#dom-text-wholetext */
22
+ get wholeText(): string;
23
+ /** https://dom.spec.whatwg.org/#dom-slotable-assignedslot */
24
+ get assignedSlot(): Element | null;
25
+ }
26
+ export declare class CDATASection extends Text {
27
+ constructor(data?: string, doc?: Document);
28
+ }
29
+ export declare class Comment extends CharacterData {
30
+ constructor(data?: string, doc?: Document);
31
+ }
32
+ export declare class ProcessingInstruction extends CharacterData {
33
+ constructor(target: string, data: string, doc?: Document);
34
+ get target(): string;
35
+ }
@@ -0,0 +1,169 @@
1
+ import { Node } from "./Node.js";
2
+ import type { NodeImpl } from "./NodeImpl.js";
3
+ import type { Element } from "./Element.js";
4
+ import { Text, Comment, CDATASection, ProcessingInstruction } from "./CharacterData.js";
5
+ import { DocumentFragment } from "./DocumentFragment.js";
6
+ import { DocumentType } from "./DocumentType.js";
7
+ import { Attr } from "./Attr.js";
8
+ import { type NonElementParentNode, type ParentNode } from "./mixins.js";
9
+ import { Range } from "../traversal/Range.js";
10
+ import { TreeWalker, NodeIterator, type NodeFilterArg } from "../traversal/TreeWalker.js";
11
+ import { Selection } from "../traversal/Selection.js";
12
+ import { type HTMLCollection } from "../collections/HTMLCollection.js";
13
+ import type { Window } from "../window/Window.js";
14
+ import type { NodeList } from "../collections/NodeList.js";
15
+ import type { ElementCreationOptions } from "../webidl.js";
16
+ import type { Event } from "../events/Event.js";
17
+ import { $aboutBase, $baseFor, $baseOverride, $baseURL, $baseVersion, $contentType, $css, $derived, $doc, $focused, $forms, $ids, $implementation, $isHTML, $mode, $ranges, $selection, $styleVersion, $url, $version, $window, $writeBuffer } from "../keys.js";
18
+ export declare class Document extends Node {
19
+ /** Browsing context's window, or null for documents created via DOMImplementation / new Document(). */
20
+ [$window]: Window | null;
21
+ /** Bumped on every tree, attribute and character-data mutation of nodes owned by this document. */
22
+ [$version]: number;
23
+ /** Bumped when author style sheets change (src/css). */
24
+ [$styleVersion]: number;
25
+ /** Connected elements by id. A value is an array only when several connected elements share an id. */
26
+ [$ids]: Map<string, NodeImpl | NodeImpl[]>;
27
+ /** Focused element (https://html.spec.whatwg.org/#focused-area-of-the-document), null = viewport/body. */
28
+ [$focused]: NodeImpl | null;
29
+ [$isHTML]: boolean;
30
+ [$contentType]: string;
31
+ [$url]: string;
32
+ [$mode]: "no-quirks" | "quirks" | "limited-quirks";
33
+ [$implementation]: DOMImplementation | null;
34
+ /** Opaque per-document state owned by src/css (style sheet list, rule index). */
35
+ [$css]: object | null;
36
+ /** Markup written since document.open() (null when no open() is in effect). */
37
+ [$writeBuffer]: string | null;
38
+ /** https://w3c.github.io/selection-api/#dfn-selection — created on first getSelection(). */
39
+ [$selection]: Selection | null;
40
+ /** Live ranges whose boundary points are in this document (traversal/live.ts); null when none. */
41
+ [$ranges]: WeakRef<object>[] | null;
42
+ /**
43
+ * Derived per-document caches (selector results, label index, ...) keyed by owner token; see
44
+ * nodes/derived.ts. Dropped whenever a node is removed from a tree of this document, so caches
45
+ * never keep removed subtrees alive.
46
+ */
47
+ [$derived]: Map<object, unknown> | null;
48
+ /** document.forms (named-properties proxy), created on first read. */
49
+ [$forms]: HTMLCollection | null;
50
+ /** https://html.spec.whatwg.org/#concept-document-about-base-url (about:blank / about:srcdoc documents of nested browsing contexts). */
51
+ [$aboutBase]: string | null;
52
+ /** https://dom.spec.whatwg.org/#document-base-url-override (set when cloning a document). */
53
+ [$baseOverride]: string | null;
54
+ /** Cached document base URL, valid while `[$baseVersion] === [$version]` and `[$baseFor] === [$url]`. */
55
+ [$baseURL]: string;
56
+ [$baseVersion]: number;
57
+ [$baseFor]: string;
58
+ constructor();
59
+ /** @internal Create an HTML document (what a Window and DOMImplementation.createHTMLDocument use). */
60
+ static _createHTML(window: Window | null, url?: string): Document;
61
+ /** @internal */
62
+ _idAdd(el: NodeImpl): void;
63
+ /** @internal */
64
+ _idRemove(el: NodeImpl): void;
65
+ /** @internal First connected element in tree order with this id. */
66
+ _idLookup(id: string): NodeImpl | null;
67
+ get URL(): string;
68
+ get documentURI(): string;
69
+ /**
70
+ * https://html.spec.whatwg.org/#document-base-url — version-stamped, so repeated reads (every
71
+ * `a.href`) cost one compare between mutations.
72
+ */
73
+ get baseURI(): string;
74
+ get compatMode(): string;
75
+ get characterSet(): string;
76
+ get charset(): string;
77
+ get inputEncoding(): string;
78
+ get contentType(): string;
79
+ get defaultView(): Window | null;
80
+ get implementation(): DOMImplementation;
81
+ get doctype(): DocumentType | null;
82
+ get documentElement(): Element | null;
83
+ /** https://html.spec.whatwg.org/#dom-document-head */
84
+ get head(): Element | null;
85
+ /** https://html.spec.whatwg.org/#dom-document-body */
86
+ get body(): Element | null;
87
+ /** https://html.spec.whatwg.org/#dom-document-body (setter) */
88
+ set body(value: Element | null);
89
+ /** https://dom.spec.whatwg.org/#dom-document-createelement */
90
+ createElement(localName: string, _options?: string | ElementCreationOptions): Element;
91
+ /** https://dom.spec.whatwg.org/#dom-document-createelementns */
92
+ createElementNS(namespace: string | null, qualifiedName: string, _options?: string | ElementCreationOptions): Element;
93
+ createDocumentFragment(): DocumentFragment;
94
+ createTextNode(data: string): Text;
95
+ createCDATASection(data: string): CDATASection;
96
+ createComment(data: string): Comment;
97
+ /** https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction */
98
+ createProcessingInstruction(target: string, data: string): ProcessingInstruction;
99
+ createAttribute(localName: string): Attr;
100
+ createAttributeNS(namespace: string | null, qualifiedName: string): Attr;
101
+ /** https://dom.spec.whatwg.org/#dom-document-importnode */
102
+ importNode<T extends Node>(node: T, deep?: boolean): T;
103
+ /** https://dom.spec.whatwg.org/#dom-document-adoptnode */
104
+ adoptNode<T extends Node>(node: T): T;
105
+ getElementsByTagName(qualifiedName: string): HTMLCollection;
106
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollection;
107
+ getElementsByClassName(classNames: string): HTMLCollection;
108
+ /** https://html.spec.whatwg.org/#dom-document-getelementsbyname */
109
+ getElementsByName(elementName: string): NodeList;
110
+ /** document.forms supports named access (`document.forms.login`), so it is the Proxy-wrapped variant. */
111
+ get forms(): HTMLCollection;
112
+ get images(): HTMLCollection;
113
+ get embeds(): HTMLCollection;
114
+ get plugins(): HTMLCollection;
115
+ get scripts(): HTMLCollection;
116
+ /** a and area elements with an href attribute. */
117
+ get links(): HTMLCollection;
118
+ /** a elements with a name attribute. */
119
+ get anchors(): HTMLCollection;
120
+ get applets(): HTMLCollection;
121
+ /** https://dom.spec.whatwg.org/#dom-document-createrange */
122
+ createRange(): Range;
123
+ /** https://dom.spec.whatwg.org/#dom-document-createtreewalker */
124
+ createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilterArg): TreeWalker;
125
+ /** https://dom.spec.whatwg.org/#dom-document-createnodeiterator */
126
+ createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilterArg): NodeIterator;
127
+ /** https://w3c.github.io/selection-api/#dom-document-getselection */
128
+ getSelection(): Selection | null;
129
+ /**
130
+ * https://html.spec.whatwg.org/#dom-document-open — simplified for tests: there is no
131
+ * script-inserted parser, so open() empties the document and starts a write buffer that each
132
+ * write() re-parses synchronously (content is queryable right after write(), as in browsers).
133
+ * `open(url, name, features)` is window.open.
134
+ */
135
+ open(...args: unknown[]): Document | Window | null;
136
+ /** https://html.spec.whatwg.org/#dom-document-write */
137
+ write(...text: string[]): void;
138
+ /** https://html.spec.whatwg.org/#dom-document-writeln */
139
+ writeln(...text: string[]): void;
140
+ /** https://html.spec.whatwg.org/#dom-document-close */
141
+ close(): void;
142
+ /** @internal Clone steps for Document nodes (cloneNode on a document). */
143
+ _cloneDocument(): Document;
144
+ /** https://dom.spec.whatwg.org/#dom-document-createevent (table and algorithm in events/createEvent.ts) */
145
+ createEvent(interfaceName: string): Event;
146
+ /** https://dom.spec.whatwg.org/#get-the-parent — a document's parent is its window for non-load events. */
147
+ _getTheParent(event: Event): import("../events/EventTarget.js").EventTarget | null;
148
+ }
149
+ export interface Document extends ParentNode, NonElementParentNode {
150
+ }
151
+ /**
152
+ * https://dom.spec.whatwg.org/#xmldocument — what DOMImplementation.createDocument() returns
153
+ * (https://dom.spec.whatwg.org/#dom-domimplementation-createdocument step 1). No members of its
154
+ * own (the HTML `load()` extension is not implemented: no network).
155
+ */
156
+ export declare class XMLDocument extends Document {
157
+ }
158
+ /** https://dom.spec.whatwg.org/#interface-domimplementation */
159
+ export declare class DOMImplementation {
160
+ [$doc]: Document;
161
+ /** @internal Use document.implementation. */
162
+ constructor(doc: Document);
163
+ /** https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype */
164
+ createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;
165
+ createHTMLDocument(title?: string): Document;
166
+ /** https://dom.spec.whatwg.org/#dom-domimplementation-createdocument */
167
+ createDocument(namespace: string | null, qualifiedName: string | null, doctype?: DocumentType | null): XMLDocument;
168
+ hasFeature(): boolean;
169
+ }
@@ -0,0 +1,12 @@
1
+ import type { Document } from "./Document.js";
2
+ import type { Element } from "./Element.js";
3
+ import { Node } from "./Node.js";
4
+ import { type NonElementParentNode, type ParentNode } from "./mixins.js";
5
+ import { $host } from "../keys.js";
6
+ export declare class DocumentFragment extends Node {
7
+ /** Host for shadow roots and template contents (https://dom.spec.whatwg.org/#concept-documentfragment-host). */
8
+ [$host]: Element | null;
9
+ constructor(doc?: Document);
10
+ }
11
+ export interface DocumentFragment extends ParentNode, NonElementParentNode {
12
+ }
@@ -0,0 +1,17 @@
1
+ import type { Document } from "./Document.js";
2
+ import { Node } from "./Node.js";
3
+ import { type ChildNode } from "./mixins.js";
4
+ import { $systemId } from "../keys.js";
5
+ export declare class DocumentType extends Node {
6
+ [$systemId]: string;
7
+ /** @internal Use DOMImplementation.createDocumentType. */
8
+ constructor(doc: Document, name: string, publicId: string, systemId: string);
9
+ /** https://dom.spec.whatwg.org/#dom-documenttype-name */
10
+ get name(): string;
11
+ /** https://dom.spec.whatwg.org/#dom-documenttype-publicid */
12
+ get publicId(): string;
13
+ /** https://dom.spec.whatwg.org/#dom-documenttype-systemid */
14
+ get systemId(): string;
15
+ }
16
+ export interface DocumentType extends ChildNode {
17
+ }
@@ -0,0 +1,142 @@
1
+ import type { Document } from "./Document.js";
2
+ import { Node } from "./Node.js";
3
+ import type { NodeImpl } from "./NodeImpl.js";
4
+ import { type ChildNode, type NonDocumentTypeChildNode, type ParentNode } from "./mixins.js";
5
+ import { type GetHTMLOptions } from "../serializer/index.js";
6
+ import { HTMLCollection } from "../collections/HTMLCollection.js";
7
+ import { ShadowRoot } from "./ShadowRoot.js";
8
+ import { DOMTokenList } from "../collections/DOMTokenList.js";
9
+ import { type DOMStringMap } from "../collections/DOMStringMap.js";
10
+ import { NamedNodeMap } from "../collections/NamedNodeMap.js";
11
+ import type { Attr } from "./Attr.js";
12
+ import { DOMRect, DOMRectList } from "../window/geometry.js";
13
+ import type { CSSStyleDeclaration } from "../css/CSSStyleDeclaration.js";
14
+ import type { ShadowRootInit } from "../webidl.js";
15
+ import { $attributes, $children, $classList, $dataset, $shadowRoot, $style } from "../keys.js";
16
+ export declare class Element extends Node {
17
+ [$children]?: HTMLCollection | null;
18
+ [$shadowRoot]?: ShadowRoot | null;
19
+ /** Inline style declaration (src/css owns the class); null until `style` is read. */
20
+ [$style]?: CSSStyleDeclaration | null;
21
+ [$classList]?: DOMTokenList | null;
22
+ [$dataset]?: DOMStringMap | null;
23
+ [$attributes]?: NamedNodeMap | null;
24
+ /** @internal Use Document.createElement / createElementNS. */
25
+ constructor(doc: Document, localName: string, ns: string | null, prefix: string | null);
26
+ get namespaceURI(): string | null;
27
+ get prefix(): string | null;
28
+ get localName(): string;
29
+ /** https://dom.spec.whatwg.org/#element-html-uppercased-qualified-name */
30
+ /** https://dom.spec.whatwg.org/#dom-element-tagname */
31
+ get tagName(): string;
32
+ get id(): string;
33
+ set id(value: string);
34
+ get className(): string;
35
+ set className(value: string);
36
+ /** https://dom.spec.whatwg.org/#dom-element-classlist */
37
+ get classList(): DOMTokenList;
38
+ set classList(value: string);
39
+ /** https://html.spec.whatwg.org/#dom-dataset (HTMLOrSVGElement; installed here so SVG/MathML share it). */
40
+ get dataset(): DOMStringMap;
41
+ /** https://drafts.csswg.org/css-shadow-parts/#dom-element-part */
42
+ get part(): DOMTokenList;
43
+ set part(value: string);
44
+ /** https://dom.spec.whatwg.org/#dom-element-attributes */
45
+ get attributes(): NamedNodeMap;
46
+ /** https://dom.spec.whatwg.org/#dom-element-slot — reflects the null-namespace `slot` attribute. */
47
+ get slot(): string;
48
+ set slot(value: string);
49
+ hasAttributes(): boolean;
50
+ getAttributeNames(): string[];
51
+ getAttribute(qualifiedName: string): string | null;
52
+ getAttributeNS(namespace: string | null, localName: string): string | null;
53
+ setAttribute(qualifiedName: string, value: string): void;
54
+ /** https://dom.spec.whatwg.org/#dom-element-setattributens */
55
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
56
+ /** https://dom.spec.whatwg.org/#dom-element-getattributenode */
57
+ getAttributeNode(qualifiedName: string): Attr | null;
58
+ /** https://dom.spec.whatwg.org/#dom-element-getattributenodens */
59
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
60
+ /** https://dom.spec.whatwg.org/#dom-element-setattributenode */
61
+ setAttributeNode(attr: Attr): Attr | null;
62
+ setAttributeNodeNS(attr: Attr): Attr | null;
63
+ /** https://dom.spec.whatwg.org/#dom-element-removeattributenode */
64
+ removeAttributeNode(attr: Attr): Attr;
65
+ removeAttribute(qualifiedName: string): void;
66
+ removeAttributeNS(namespace: string | null, localName: string): void;
67
+ /** https://dom.spec.whatwg.org/#dom-element-toggleattribute */
68
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
69
+ hasAttribute(qualifiedName: string): boolean;
70
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
71
+ matches(selectors: string): boolean;
72
+ webkitMatchesSelector(selectors: string): boolean;
73
+ closest(selectors: string): Element | null;
74
+ getElementsByTagName(qualifiedName: string): HTMLCollection;
75
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollection;
76
+ getElementsByClassName(classNames: string): HTMLCollection;
77
+ get innerHTML(): string;
78
+ /** https://html.spec.whatwg.org/#dom-element-innerhtml */
79
+ set innerHTML(value: string);
80
+ /** https://html.spec.whatwg.org/#dom-element-gethtml */
81
+ getHTML(options?: GetHTMLOptions): string;
82
+ /** https://html.spec.whatwg.org/#dom-element-sethtmlunsafe */
83
+ setHTMLUnsafe(html: string): void;
84
+ get outerHTML(): string;
85
+ set outerHTML(value: string);
86
+ /** https://html.spec.whatwg.org/#dom-element-insertadjacenthtml */
87
+ insertAdjacentHTML(position: string, text: string): void;
88
+ insertAdjacentElement(where: string, element: Element): Element | null;
89
+ insertAdjacentText(where: string, data: string): void;
90
+ get shadowRoot(): ShadowRoot | null;
91
+ /** https://dom.spec.whatwg.org/#dom-element-attachshadow */
92
+ attachShadow(init: ShadowRootInit): ShadowRoot;
93
+ /** https://dom.spec.whatwg.org/#dom-slotable-assignedslot */
94
+ get assignedSlot(): Element | null;
95
+ /** https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect */
96
+ getBoundingClientRect(): DOMRect;
97
+ getClientRects(): DOMRectList;
98
+ /** https://drafts.csswg.org/cssom-view/#dom-element-checkvisibility — without layout: connected and not hidden by `hidden` / display:none ancestors is unknowable, so connectedness. */
99
+ checkVisibility(_options?: object): boolean;
100
+ get scrollTop(): number;
101
+ set scrollTop(_v: number);
102
+ get scrollLeft(): number;
103
+ set scrollLeft(_v: number);
104
+ get scrollWidth(): number;
105
+ get scrollHeight(): number;
106
+ get clientTop(): number;
107
+ get clientLeft(): number;
108
+ get clientWidth(): number;
109
+ get clientHeight(): number;
110
+ scroll(_x?: unknown, _y?: number): void;
111
+ scrollTo(_x?: unknown, _y?: number): void;
112
+ scrollBy(_x?: unknown, _y?: number): void;
113
+ scrollIntoView(_arg?: unknown): void;
114
+ /** Runs when this element becomes connected. Only called when F_CONNECT_HOOK is set. */
115
+ _connectedSteps(): void;
116
+ /** Runs when this element becomes disconnected. Only called when F_CONNECT_HOOK is set. */
117
+ _disconnectedSteps(): void;
118
+ /** https://dom.spec.whatwg.org/#concept-element-attributes-change-ext — only when F_ATTR_HOOK is set. */
119
+ _attributeChangedSteps(_localName: string, _oldValue: string | null, _value: string | null, _namespace: string | null): void;
120
+ /** https://dom.spec.whatwg.org/#concept-node-children-changed-ext — only when F_CHILDREN_HOOK is set. */
121
+ _childrenChangedSteps(): void;
122
+ /** https://dom.spec.whatwg.org/#concept-node-adopt-ext — only when F_ADOPT_HOOK is set. */
123
+ _adoptingSteps(_oldDocument: Document): void;
124
+ /**
125
+ * https://dom.spec.whatwg.org/#concept-node-move-ext (moveBefore) — only when F_CONNECT_HOOK is
126
+ * set. Moving runs neither the removing nor the insertion steps, so connected state is kept.
127
+ */
128
+ _movingSteps(_isSubtreeRoot: boolean, _oldParent: NodeImpl): void;
129
+ /** https://dom.spec.whatwg.org/#concept-node-clone-ext — always called on clone. */
130
+ _cloningSteps(_copy: Element, _subtree?: boolean): void;
131
+ }
132
+ export interface Element extends ParentNode, ChildNode, NonDocumentTypeChildNode {
133
+ }
134
+ /** https://dom.spec.whatwg.org/#concept-attach-a-shadow-root */
135
+ export declare function attachShadowRoot(element: Element, mode: "open" | "closed", clonable: boolean, serializable: boolean, delegatesFocus: boolean, slotAssignment: "named" | "manual"): ShadowRoot;
136
+ export declare function cachedCollection(root: NodeImpl, key: string, filter: ((el: NodeImpl) => boolean) | null): HTMLCollection;
137
+ /** https://dom.spec.whatwg.org/#concept-getelementsbytagname */
138
+ export declare function getElementsByTagName(root: NodeImpl, qualifiedName: string): HTMLCollection;
139
+ /** https://dom.spec.whatwg.org/#concept-getelementsbytagnamens */
140
+ export declare function getElementsByTagNameNS(root: NodeImpl, namespace: string | null, localName: string): HTMLCollection;
141
+ /** https://dom.spec.whatwg.org/#concept-getelementsbyclassname */
142
+ export declare function getElementsByClassName(root: NodeImpl, classNames: string): HTMLCollection;