@ctrl/dom 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/NOTICE +338 -0
- package/README.md +362 -2
- package/dist/aria/_chunks/roles-list-CYZF-l9K.js +1503 -0
- package/dist/aria/_chunks/roles-list-D4WCyRO_.cjs +1754 -0
- package/dist/aria/index.cjs +232 -0
- package/dist/aria/index.js +198 -0
- package/dist/aria/internal.cjs +69 -0
- package/dist/aria/internal.js +30 -0
- package/dist/aria/types/accname.d.ts +40 -0
- package/dist/aria/types/data/aria-query.d.ts +61 -0
- package/dist/aria/types/data/aria-query.generated.d.ts +2 -0
- package/dist/aria/types/forms.d.ts +25 -0
- package/dist/aria/types/hidden.d.ts +38 -0
- package/dist/aria/types/index.d.ts +46 -0
- package/dist/aria/types/internal.d.ts +15 -0
- package/dist/aria/types/role.d.ts +27 -0
- package/dist/aria/types/roles-list.d.ts +18 -0
- package/dist/aria/types/states.d.ts +29 -0
- package/dist/aria/types/style.d.ts +18 -0
- package/dist/aria/types/tree.d.ts +20 -0
- package/dist/bridge/index.cjs +3 -0
- package/dist/bridge/index.js +4 -0
- package/dist/bridge/internal.cjs +3 -0
- package/dist/bridge/internal.js +4 -0
- package/dist/cli/_chunks/report-DdncYfuJ.js +93 -0
- package/dist/cli/ctrl-dom.js +199 -0
- package/dist/cli/jest-reporter.js +55 -0
- package/dist/cli/vitest-reporter.js +81 -0
- package/dist/dom/_chunks/src-DWP2w3IQ.js +47516 -0
- package/dist/dom/index.js +3 -0
- package/dist/dom/internal.js +434 -0
- package/dist/dom/types/collections/DOMStringMap.d.ts +8 -0
- package/dist/dom/types/collections/DOMTokenList.d.ts +33 -0
- package/dist/dom/types/collections/HTMLCollection.d.ts +62 -0
- package/dist/dom/types/collections/NamedNodeMap.d.ts +22 -0
- package/dist/dom/types/collections/NodeList.d.ts +43 -0
- package/dist/dom/types/collections/indexed.d.ts +8 -0
- package/dist/dom/types/collections/iterator.d.ts +8 -0
- package/dist/dom/types/css/CSS.d.ts +21 -0
- package/dist/dom/types/css/CSSStyleDeclaration.d.ts +57 -0
- package/dist/dom/types/css/cascade.d.ts +159 -0
- package/dist/dom/types/css/colors.d.ts +28 -0
- package/dist/dom/types/css/computed.d.ts +22 -0
- package/dist/dom/types/css/cssom.d.ts +363 -0
- package/dist/dom/types/css/data/properties.d.ts +1 -0
- package/dist/dom/types/css/declarations.d.ts +40 -0
- package/dist/dom/types/css/index.d.ts +5 -0
- package/dist/dom/types/css/inline-count.d.ts +2 -0
- package/dist/dom/types/css/internal.d.ts +11 -0
- package/dist/dom/types/css/layout-mode.d.ts +4 -0
- package/dist/dom/types/css/layout.d.ts +63 -0
- package/dist/dom/types/css/media.d.ts +55 -0
- package/dist/dom/types/css/parser.d.ts +93 -0
- package/dist/dom/types/css/properties.d.ts +28 -0
- package/dist/dom/types/css/resize-observer.d.ts +19 -0
- package/dist/dom/types/css/selector-info.d.ts +13 -0
- package/dist/dom/types/css/shorthands.d.ts +33 -0
- package/dist/dom/types/css/stylesheets.d.ts +93 -0
- package/dist/dom/types/css/supports.d.ts +4 -0
- package/dist/dom/types/css/tokenizer.d.ts +91 -0
- package/dist/dom/types/css/values.d.ts +91 -0
- package/dist/dom/types/css/view.d.ts +44 -0
- package/dist/dom/types/events/DataTransfer.d.ts +62 -0
- package/dist/dom/types/events/Event.d.ts +115 -0
- package/dist/dom/types/events/EventTarget.d.ts +22 -0
- package/dist/dom/types/events/UIEvents.d.ts +308 -0
- package/dist/dom/types/events/activation.d.ts +7 -0
- package/dist/dom/types/events/convert.d.ts +16 -0
- package/dist/dom/types/events/createEvent.d.ts +3 -0
- package/dist/dom/types/events/dispatch.d.ts +39 -0
- package/dist/dom/types/events/events.d.ts +200 -0
- package/dist/dom/types/events/fire.d.ts +21 -0
- package/dist/dom/types/events/handlers.d.ts +14 -0
- package/dist/dom/types/events/listeners.d.ts +32 -0
- package/dist/dom/types/events/report.d.ts +10 -0
- package/dist/dom/types/html/HTMLElement.d.ts +126 -0
- package/dist/dom/types/html/MathMLElement.d.ts +6 -0
- package/dist/dom/types/html/SVGElement.d.ts +145 -0
- package/dist/dom/types/html/anchor.d.ts +16 -0
- package/dist/dom/types/html/aria-reflection.d.ts +14 -0
- package/dist/dom/types/html/collection.d.ts +5 -0
- package/dist/dom/types/html/custom-elements.d.ts +129 -0
- package/dist/dom/types/html/elements.d.ts +202 -0
- package/dist/dom/types/html/events.d.ts +22 -0
- package/dist/dom/types/html/focus.d.ts +63 -0
- package/dist/dom/types/html/forms/FileList.d.ts +1 -0
- package/dist/dom/types/html/forms/FormData.d.ts +7 -0
- package/dist/dom/types/html/forms/HTMLButtonElement.d.ts +36 -0
- package/dist/dom/types/html/forms/HTMLFieldSetElement.d.ts +29 -0
- package/dist/dom/types/html/forms/HTMLFormElement.d.ts +61 -0
- package/dist/dom/types/html/forms/HTMLInputElement.d.ts +204 -0
- package/dist/dom/types/html/forms/HTMLLabelElement.d.ts +15 -0
- package/dist/dom/types/html/forms/HTMLOptionElement.d.ts +61 -0
- package/dist/dom/types/html/forms/HTMLOutputElement.d.ts +74 -0
- package/dist/dom/types/html/forms/HTMLSelectElement.d.ts +96 -0
- package/dist/dom/types/html/forms/HTMLTextAreaElement.d.ts +82 -0
- package/dist/dom/types/html/forms/autofill.d.ts +10 -0
- package/dist/dom/types/html/forms/collections.d.ts +112 -0
- package/dist/dom/types/html/forms/common.d.ts +36 -0
- package/dist/dom/types/html/forms/face.d.ts +59 -0
- package/dist/dom/types/html/forms/form-associated.d.ts +46 -0
- package/dist/dom/types/html/forms/form-submission.d.ts +55 -0
- package/dist/dom/types/html/forms/index.d.ts +17 -0
- package/dist/dom/types/html/forms/input-type.d.ts +50 -0
- package/dist/dom/types/html/forms/microsyntaxes.d.ts +52 -0
- package/dist/dom/types/html/forms/state.d.ts +54 -0
- package/dist/dom/types/html/forms/ui.d.ts +35 -0
- package/dist/dom/types/html/forms/user-validity.d.ts +19 -0
- package/dist/dom/types/html/forms/validation.d.ts +76 -0
- package/dist/dom/types/html/index.d.ts +13 -0
- package/dist/dom/types/html/innerText.d.ts +9 -0
- package/dist/dom/types/html/interactive.d.ts +43 -0
- package/dist/dom/types/html/invokers.d.ts +39 -0
- package/dist/dom/types/html/media.d.ts +86 -0
- package/dist/dom/types/html/reflect.d.ts +67 -0
- package/dist/dom/types/html/registry.d.ts +9 -0
- package/dist/dom/types/html/resources.d.ts +55 -0
- package/dist/dom/types/html/shared.d.ts +22 -0
- package/dist/dom/types/html/slot.d.ts +15 -0
- package/dist/dom/types/html/template.d.ts +18 -0
- package/dist/dom/types/html/top-layer.d.ts +73 -0
- package/dist/dom/types/index.d.ts +50 -0
- package/dist/dom/types/internal.d.ts +61 -0
- package/dist/dom/types/keys.d.ts +209 -0
- package/dist/dom/types/nodes/Attr.d.ts +25 -0
- package/dist/dom/types/nodes/CharacterData.d.ts +35 -0
- package/dist/dom/types/nodes/Document.d.ts +169 -0
- package/dist/dom/types/nodes/DocumentFragment.d.ts +12 -0
- package/dist/dom/types/nodes/DocumentType.d.ts +17 -0
- package/dist/dom/types/nodes/Element.d.ts +142 -0
- package/dist/dom/types/nodes/Node.d.ts +112 -0
- package/dist/dom/types/nodes/NodeImpl.d.ts +90 -0
- package/dist/dom/types/nodes/ShadowRoot.d.ts +43 -0
- package/dist/dom/types/nodes/attr-nodes.d.ts +8 -0
- package/dist/dom/types/nodes/attributes.d.ts +46 -0
- package/dist/dom/types/nodes/cache.d.ts +38 -0
- package/dist/dom/types/nodes/character-data.d.ts +5 -0
- package/dist/dom/types/nodes/clone.d.ts +5 -0
- package/dist/dom/types/nodes/constants.d.ts +52 -0
- package/dist/dom/types/nodes/create.d.ts +42 -0
- package/dist/dom/types/nodes/derived.d.ts +26 -0
- package/dist/dom/types/nodes/inspect.d.ts +2 -0
- package/dist/dom/types/nodes/mixins.d.ts +41 -0
- package/dist/dom/types/nodes/names.d.ts +15 -0
- package/dist/dom/types/nodes/slots.d.ts +38 -0
- package/dist/dom/types/nodes/tags.d.ts +8 -0
- package/dist/dom/types/nodes/traverse.d.ts +21 -0
- package/dist/dom/types/nodes/tree.d.ts +47 -0
- package/dist/dom/types/observers/MutationObserver.d.ts +33 -0
- package/dist/dom/types/observers/MutationRecord.d.ts +17 -0
- package/dist/dom/types/observers/queue.d.ts +45 -0
- package/dist/dom/types/parser/entities-data.d.ts +3 -0
- package/dist/dom/types/parser/entities.d.ts +11 -0
- package/dist/dom/types/parser/index.d.ts +34 -0
- package/dist/dom/types/parser/tags.d.ts +182 -0
- package/dist/dom/types/parser/tokenizer.d.ts +109 -0
- package/dist/dom/types/parser/treebuilder.d.ts +271 -0
- package/dist/dom/types/parser/xml.d.ts +14 -0
- package/dist/dom/types/selectors/compile.d.ts +154 -0
- package/dist/dom/types/selectors/filter.d.ts +21 -0
- package/dist/dom/types/selectors/html-predicates.d.ts +1 -0
- package/dist/dom/types/selectors/index.d.ts +16 -0
- package/dist/dom/types/selectors/internal.d.ts +87 -0
- package/dist/dom/types/selectors/parser.d.ts +310 -0
- package/dist/dom/types/selectors/serialize.d.ts +20 -0
- package/dist/dom/types/selectors/state.d.ts +43 -0
- package/dist/dom/types/serializer/index.d.ts +29 -0
- package/dist/dom/types/trace.d.ts +51 -0
- package/dist/dom/types/traversal/Range.d.ts +113 -0
- package/dist/dom/types/traversal/Selection.d.ts +45 -0
- package/dist/dom/types/traversal/TreeWalker.d.ts +77 -0
- package/dist/dom/types/traversal/live.d.ts +46 -0
- package/dist/dom/types/webidl-runtime.d.ts +18 -0
- package/dist/dom/types/webidl.d.ts +34 -0
- package/dist/dom/types/window/DOMStringList.d.ts +14 -0
- package/dist/dom/types/window/FileList.d.ts +11 -0
- package/dist/dom/types/window/FileReader.d.ts +27 -0
- package/dist/dom/types/window/History.d.ts +43 -0
- package/dist/dom/types/window/Location.d.ts +46 -0
- package/dist/dom/types/window/Navigator.d.ts +79 -0
- package/dist/dom/types/window/Screen.d.ts +27 -0
- package/dist/dom/types/window/Storage.d.ts +28 -0
- package/dist/dom/types/window/Window.d.ts +329 -0
- package/dist/dom/types/window/abort.d.ts +4 -0
- package/dist/dom/types/window/browsing-context.d.ts +12 -0
- package/dist/dom/types/window/clock.d.ts +153 -0
- package/dist/dom/types/window/compat.d.ts +34 -0
- package/dist/dom/types/window/cookies.d.ts +21 -0
- package/dist/dom/types/window/current.d.ts +7 -0
- package/dist/dom/types/window/document.d.ts +19 -0
- package/dist/dom/types/window/events.d.ts +11 -0
- package/dist/dom/types/window/fallbacks.d.ts +20 -0
- package/dist/dom/types/window/geometry.d.ts +133 -0
- package/dist/dom/types/window/globals.d.ts +7 -0
- package/dist/dom/types/window/hooks.d.ts +22 -0
- package/dist/dom/types/window/host-originals.d.ts +9 -0
- package/dist/dom/types/window/interfaces.d.ts +13 -0
- package/dist/dom/types/window/isolation.d.ts +20 -0
- package/dist/dom/types/window/media.d.ts +33 -0
- package/dist/dom/types/window/not-implemented.d.ts +23 -0
- package/dist/dom/types/window/observers.d.ts +42 -0
- package/dist/dom/types/window/origin.d.ts +3 -0
- package/dist/dom/types/window/timers.d.ts +28 -0
- package/dist/dom/types/window/xhr.d.ts +108 -0
- package/dist/jest-dom/_chunks/matchers-CDnnXUfG.js +2211 -0
- package/dist/jest-dom/_chunks/matchers-D988Ducb.cjs +2516 -0
- package/dist/jest-dom/index.cjs +5 -0
- package/dist/jest-dom/index.js +6 -0
- package/dist/jest-dom/jest-globals.cjs +6 -0
- package/dist/jest-dom/jest-globals.js +7 -0
- package/dist/jest-dom/matchers.cjs +53 -0
- package/dist/jest-dom/matchers.js +3 -0
- package/dist/jest-dom/types/bun.d.ts +13 -0
- package/dist/jest-dom/types/index.d.ts +3 -0
- package/dist/jest-dom/types/jest-globals.d.ts +13 -0
- package/dist/jest-dom/types/jest.d.ts +15 -0
- package/dist/jest-dom/types/matchers-standalone.d.ts +32 -0
- package/dist/jest-dom/types/matchers.d.ts +1079 -0
- package/dist/jest-dom/types/package.json +1 -0
- package/dist/jest-dom/types/vitest.d.ts +16 -0
- package/dist/jest-dom/vitest.cjs +6 -0
- package/dist/jest-dom/vitest.js +7 -0
- package/dist/react/_chunks/pure-DZ97z2oT.cjs +498 -0
- package/dist/react/_chunks/pure-PtE2hivW.js +420 -0
- package/dist/react/dont-cleanup-after-each.cjs +3 -0
- package/dist/react/dont-cleanup-after-each.js +4 -0
- package/dist/react/index.cjs +47 -0
- package/dist/react/index.js +35 -0
- package/dist/react/pure.cjs +17 -0
- package/dist/react/pure.js +5 -0
- package/dist/react/types/act-compat.d.ts +6 -0
- package/dist/react/types/config.d.ts +9 -0
- package/dist/react/types/dont-cleanup-after-each.d.ts +1 -0
- package/dist/react/types/dtl.d.ts +1 -0
- package/dist/react/types/fire-event.d.ts +3 -0
- package/dist/react/types/index.d.ts +1 -0
- package/dist/react/types/pure.d.ts +136 -0
- package/dist/register/index.js +11 -0
- package/dist/register/pure.js +147 -0
- package/dist/register/types/index.d.ts +1 -0
- package/dist/register/types/pure.d.ts +36 -0
- package/dist/testing-library/_chunks/aria-snapshot-diff-D7PzpXew.cjs +1170 -0
- package/dist/testing-library/_chunks/aria-snapshot-diff-Q8Wj33K0.js +985 -0
- package/dist/testing-library/agent.cjs +721 -0
- package/dist/testing-library/agent.js +713 -0
- package/dist/testing-library/index.cjs +2469 -0
- package/dist/testing-library/index.js +2390 -0
- package/dist/testing-library/types/agent.d.ts +56 -0
- package/dist/testing-library/types/aria-role.d.ts +99 -0
- package/dist/testing-library/types/aria-snapshot.d.ts +43 -0
- package/dist/testing-library/types/config.d.ts +27 -0
- package/dist/testing-library/types/events.d.ts +118 -0
- package/dist/testing-library/types/get-node-text.d.ts +1 -0
- package/dist/testing-library/types/get-queries-for-element.d.ts +182 -0
- package/dist/testing-library/types/index.d.ts +24 -0
- package/dist/testing-library/types/matches.d.ts +46 -0
- package/dist/testing-library/types/pretty-dom.d.ts +37 -0
- package/dist/testing-library/types/queries.d.ts +315 -0
- package/dist/testing-library/types/query-helpers.d.ts +112 -0
- package/dist/testing-library/types/role-helpers.d.ts +19 -0
- package/dist/testing-library/types/screen.d.ts +30 -0
- package/dist/testing-library/types/suggestions.d.ts +46 -0
- package/dist/testing-library/types/wait-for-element-to-be-removed.d.ts +6 -0
- package/dist/testing-library/types/wait-for.d.ts +12 -0
- package/dist/user-event/index.cjs +3910 -0
- package/dist/user-event/index.js +3885 -0
- package/dist/user-event/types/clipboard/copy.d.ts +2 -0
- package/dist/user-event/types/clipboard/cut.d.ts +2 -0
- package/dist/user-event/types/clipboard/index.d.ts +3 -0
- package/dist/user-event/types/clipboard/paste.d.ts +3 -0
- package/dist/user-event/types/convenience/click.d.ts +5 -0
- package/dist/user-event/types/convenience/hover.d.ts +4 -0
- package/dist/user-event/types/convenience/index.d.ts +3 -0
- package/dist/user-event/types/convenience/tab.d.ts +4 -0
- package/dist/user-event/types/ctrl-dom.d.ts +50 -0
- package/dist/user-event/types/document/UI.d.ts +35 -0
- package/dist/user-event/types/document/copySelection.d.ts +2 -0
- package/dist/user-event/types/document/getValueOrTextContent.d.ts +2 -0
- package/dist/user-event/types/document/index.d.ts +5 -0
- package/dist/user-event/types/document/interceptor.d.ts +20 -0
- package/dist/user-event/types/document/patchFocus.d.ts +7 -0
- package/dist/user-event/types/document/prepareDocument.d.ts +2 -0
- package/dist/user-event/types/document/trackValue.d.ts +13 -0
- package/dist/user-event/types/dom-types.d.ts +56 -0
- package/dist/user-event/types/event/behavior/click.d.ts +1 -0
- package/dist/user-event/types/event/behavior/cut.d.ts +1 -0
- package/dist/user-event/types/event/behavior/index.d.ts +8 -0
- package/dist/user-event/types/event/behavior/keydown.d.ts +1 -0
- package/dist/user-event/types/event/behavior/keypress.d.ts +1 -0
- package/dist/user-event/types/event/behavior/keyup.d.ts +1 -0
- package/dist/user-event/types/event/behavior/paste.d.ts +1 -0
- package/dist/user-event/types/event/behavior/registry.d.ts +9 -0
- package/dist/user-event/types/event/createEvent.d.ts +8 -0
- package/dist/user-event/types/event/dispatchEvent.d.ts +6 -0
- package/dist/user-event/types/event/eventMap.d.ts +265 -0
- package/dist/user-event/types/event/focus.d.ts +6 -0
- package/dist/user-event/types/event/index.d.ts +7 -0
- package/dist/user-event/types/event/input.d.ts +3 -0
- package/dist/user-event/types/event/radio.d.ts +5 -0
- package/dist/user-event/types/event/selection/getInputRange.d.ts +6 -0
- package/dist/user-event/types/event/selection/getTargetTypeAndSelection.d.ts +11 -0
- package/dist/user-event/types/event/selection/index.d.ts +15 -0
- package/dist/user-event/types/event/selection/modifySelection.d.ts +9 -0
- package/dist/user-event/types/event/selection/modifySelectionPerMouse.d.ts +8 -0
- package/dist/user-event/types/event/selection/moveSelection.d.ts +5 -0
- package/dist/user-event/types/event/selection/resolveCaretPosition.d.ts +9 -0
- package/dist/user-event/types/event/selection/selectAll.d.ts +6 -0
- package/dist/user-event/types/event/selection/setSelection.d.ts +11 -0
- package/dist/user-event/types/event/selection/setSelectionPerMouse.d.ts +9 -0
- package/dist/user-event/types/event/selection/setSelectionRange.d.ts +7 -0
- package/dist/user-event/types/event/selection/updateSelectionOnFocus.d.ts +6 -0
- package/dist/user-event/types/event/types.d.ts +21 -0
- package/dist/user-event/types/event/wrapEvent.d.ts +2 -0
- package/dist/user-event/types/index.d.ts +6 -0
- package/dist/user-event/types/keyboard/index.d.ts +3 -0
- package/dist/user-event/types/keyboard/keyMap.d.ts +5 -0
- package/dist/user-event/types/keyboard/parseKeyDef.d.ts +17 -0
- package/dist/user-event/types/options.d.ts +121 -0
- package/dist/user-event/types/pointer/index.d.ts +29 -0
- package/dist/user-event/types/pointer/keyMap.d.ts +2 -0
- package/dist/user-event/types/pointer/parseKeyDef.d.ts +6 -0
- package/dist/user-event/types/setup/api.d.ts +23 -0
- package/dist/user-event/types/setup/directApi.d.ts +25 -0
- package/dist/user-event/types/setup/dtl.d.ts +20 -0
- package/dist/user-event/types/setup/index.d.ts +22 -0
- package/dist/user-event/types/setup/setup.d.ts +45 -0
- package/dist/user-event/types/setup/wrapAsync.d.ts +4 -0
- package/dist/user-event/types/system/index.d.ts +13 -0
- package/dist/user-event/types/system/keyLocation.d.ts +11 -0
- package/dist/user-event/types/system/keyboard.d.ts +46 -0
- package/dist/user-event/types/system/pointer/buttons.d.ts +25 -0
- package/dist/user-event/types/system/pointer/device.d.ts +8 -0
- package/dist/user-event/types/system/pointer/index.d.ts +21 -0
- package/dist/user-event/types/system/pointer/mouse.d.ts +31 -0
- package/dist/user-event/types/system/pointer/pointer.d.ts +32 -0
- package/dist/user-event/types/system/pointer/shared.d.ts +21 -0
- package/dist/user-event/types/utility/clear.d.ts +3 -0
- package/dist/user-event/types/utility/index.d.ts +4 -0
- package/dist/user-event/types/utility/selectOptions.d.ts +4 -0
- package/dist/user-event/types/utility/type.d.ts +10 -0
- package/dist/user-event/types/utility/upload.d.ts +6 -0
- package/dist/user-event/types/utils/click/isClickableInput.d.ts +17 -0
- package/dist/user-event/types/utils/dataTransfer/Blob.d.ts +4 -0
- package/dist/user-event/types/utils/dataTransfer/Clipboard.d.ts +12 -0
- package/dist/user-event/types/utils/dataTransfer/DataTransfer.d.ts +3 -0
- package/dist/user-event/types/utils/dataTransfer/FileList.d.ts +2 -0
- package/dist/user-event/types/utils/edit/isContentEditable.d.ts +8 -0
- package/dist/user-event/types/utils/edit/isEditable.d.ts +26 -0
- package/dist/user-event/types/utils/edit/maxLength.d.ts +16 -0
- package/dist/user-event/types/utils/edit/setFiles.d.ts +11 -0
- package/dist/user-event/types/utils/edit/timeValue.d.ts +5 -0
- package/dist/user-event/types/utils/focus/cursor.d.ts +5 -0
- package/dist/user-event/types/utils/focus/getActiveElement.d.ts +3 -0
- package/dist/user-event/types/utils/focus/getTabDestination.d.ts +2 -0
- package/dist/user-event/types/utils/focus/isFocusable.d.ts +2 -0
- package/dist/user-event/types/utils/focus/selection.d.ts +9 -0
- package/dist/user-event/types/utils/focus/selector.d.ts +1 -0
- package/dist/user-event/types/utils/index.d.ts +29 -0
- package/dist/user-event/types/utils/keyDef/readNextDescriptor.d.ts +21 -0
- package/dist/user-event/types/utils/misc/cloneEvent.d.ts +2 -0
- package/dist/user-event/types/utils/misc/findClosest.d.ts +2 -0
- package/dist/user-event/types/utils/misc/getDocumentFromNode.d.ts +2 -0
- package/dist/user-event/types/utils/misc/getTreeDiff.d.ts +2 -0
- package/dist/user-event/types/utils/misc/getWindow.d.ts +2 -0
- package/dist/user-event/types/utils/misc/isDescendantOrSelf.d.ts +2 -0
- package/dist/user-event/types/utils/misc/isDisabled.d.ts +2 -0
- package/dist/user-event/types/utils/misc/isElementType.d.ts +6 -0
- package/dist/user-event/types/utils/misc/isVisible.d.ts +2 -0
- package/dist/user-event/types/utils/misc/level.d.ts +9 -0
- package/dist/user-event/types/utils/misc/wait.d.ts +6 -0
- package/dist/user-event/types/utils/pointer/cssPointerEvents.d.ts +4 -0
- package/dist/vitest-environment/failure-snapshot.js +42 -0
- package/dist/vitest-environment/index.js +185 -0
- package/dist/vitest-environment/plugin.js +90 -0
- package/dist/vitest-environment/types/failure-snapshot.d.ts +1 -0
- package/dist/vitest-environment/types/index.d.ts +29 -0
- package/dist/vitest-environment/types/plugin.d.ts +33 -0
- package/jest-preset.cjs +17 -0
- package/package.json +177 -3
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Node } from "../nodes/Node.js";
|
|
2
|
+
import type { NodeImpl } from "../nodes/NodeImpl.js";
|
|
3
|
+
import { type IteratorState } from "./live.js";
|
|
4
|
+
import { $active, $current, $filter, $inflight, $pointerBeforeReference, $reference, $root, $whatToShow } from "../keys.js";
|
|
5
|
+
/** https://dom.spec.whatwg.org/#interface-nodefilter (constants; the interface object is a plain namespace-like object). */
|
|
6
|
+
export declare const NodeFilter: Readonly<{
|
|
7
|
+
FILTER_ACCEPT: 1;
|
|
8
|
+
FILTER_REJECT: 2;
|
|
9
|
+
FILTER_SKIP: 3;
|
|
10
|
+
SHOW_ALL: 4294967295;
|
|
11
|
+
SHOW_ELEMENT: 1;
|
|
12
|
+
SHOW_ATTRIBUTE: 2;
|
|
13
|
+
SHOW_TEXT: 4;
|
|
14
|
+
SHOW_CDATA_SECTION: 8;
|
|
15
|
+
SHOW_ENTITY_REFERENCE: 16;
|
|
16
|
+
SHOW_ENTITY: 32;
|
|
17
|
+
SHOW_PROCESSING_INSTRUCTION: 64;
|
|
18
|
+
SHOW_COMMENT: 128;
|
|
19
|
+
SHOW_DOCUMENT: 256;
|
|
20
|
+
SHOW_DOCUMENT_TYPE: 512;
|
|
21
|
+
SHOW_DOCUMENT_FRAGMENT: 1024;
|
|
22
|
+
SHOW_NOTATION: 2048;
|
|
23
|
+
}>;
|
|
24
|
+
export type NodeFilterCallback = (node: Node) => number;
|
|
25
|
+
export type NodeFilterArg = NodeFilterCallback | {
|
|
26
|
+
acceptNode(node: Node): number;
|
|
27
|
+
} | null;
|
|
28
|
+
/** Shared state + https://dom.spec.whatwg.org/#concept-node-filter */
|
|
29
|
+
declare abstract class Traverser {
|
|
30
|
+
[$root]: NodeImpl;
|
|
31
|
+
[$whatToShow]: number;
|
|
32
|
+
[$filter]: NodeFilterArg;
|
|
33
|
+
[$active]: boolean;
|
|
34
|
+
constructor(root: NodeImpl, whatToShow: number, filter: NodeFilterArg);
|
|
35
|
+
get root(): Node;
|
|
36
|
+
get whatToShow(): number;
|
|
37
|
+
get filter(): NodeFilterArg;
|
|
38
|
+
/** https://dom.spec.whatwg.org/#concept-node-filter */
|
|
39
|
+
_filterNode(n: NodeImpl): number;
|
|
40
|
+
}
|
|
41
|
+
/** https://dom.spec.whatwg.org/#interface-nodeiterator */
|
|
42
|
+
export declare class NodeIterator extends Traverser implements IteratorState {
|
|
43
|
+
#private;
|
|
44
|
+
/** https://dom.spec.whatwg.org/#nodeiterator-reference */
|
|
45
|
+
[$reference]: NodeImpl;
|
|
46
|
+
/** https://dom.spec.whatwg.org/#nodeiterator-pointer-before-reference */
|
|
47
|
+
[$pointerBeforeReference]: boolean;
|
|
48
|
+
[$inflight]: IteratorState | null;
|
|
49
|
+
/** @internal Use document.createNodeIterator(). */
|
|
50
|
+
constructor(root: Node, whatToShow?: number, filter?: NodeFilterArg);
|
|
51
|
+
get referenceNode(): Node;
|
|
52
|
+
get pointerBeforeReferenceNode(): boolean;
|
|
53
|
+
nextNode(): Node | null;
|
|
54
|
+
previousNode(): Node | null;
|
|
55
|
+
/** https://dom.spec.whatwg.org/#dom-nodeiterator-detach — does nothing. */
|
|
56
|
+
detach(): void;
|
|
57
|
+
}
|
|
58
|
+
/** https://dom.spec.whatwg.org/#interface-treewalker */
|
|
59
|
+
export declare class TreeWalker extends Traverser {
|
|
60
|
+
#private;
|
|
61
|
+
[$current]: NodeImpl;
|
|
62
|
+
/** @internal Use document.createTreeWalker(). */
|
|
63
|
+
constructor(root: Node, whatToShow?: number, filter?: NodeFilterArg);
|
|
64
|
+
get currentNode(): Node;
|
|
65
|
+
set currentNode(node: Node);
|
|
66
|
+
/** https://dom.spec.whatwg.org/#dom-treewalker-parentnode */
|
|
67
|
+
parentNode(): Node | null;
|
|
68
|
+
firstChild(): Node | null;
|
|
69
|
+
lastChild(): Node | null;
|
|
70
|
+
nextSibling(): Node | null;
|
|
71
|
+
previousSibling(): Node | null;
|
|
72
|
+
/** https://dom.spec.whatwg.org/#dom-treewalker-previousnode */
|
|
73
|
+
previousNode(): Node | null;
|
|
74
|
+
/** https://dom.spec.whatwg.org/#dom-treewalker-nextnode */
|
|
75
|
+
nextNode(): Node | null;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { NodeImpl } from "../nodes/NodeImpl.js";
|
|
2
|
+
import { $ec, $eo, $home, $inflight, $pointerBeforeReference, $reference, $root, $sc, $so } from "../keys.js";
|
|
3
|
+
/** Boundary points of a live range, as NodeImpls. Implemented by `AbstractRange`. */
|
|
4
|
+
export interface LiveBoundaries {
|
|
5
|
+
[$sc]: NodeImpl;
|
|
6
|
+
[$so]: number;
|
|
7
|
+
[$ec]: NodeImpl;
|
|
8
|
+
[$eo]: number;
|
|
9
|
+
/** Document whose `_ranges` list holds this range. */
|
|
10
|
+
[$home]: object | null;
|
|
11
|
+
}
|
|
12
|
+
/** State of a NodeIterator relevant to the pre-removing steps. */
|
|
13
|
+
export interface IteratorState {
|
|
14
|
+
[$root]: NodeImpl;
|
|
15
|
+
[$reference]: NodeImpl;
|
|
16
|
+
[$pointerBeforeReference]: boolean;
|
|
17
|
+
/** Candidate position of an in-flight traversal while the filter runs (kept up to date too). */
|
|
18
|
+
[$inflight]: IteratorState | null;
|
|
19
|
+
}
|
|
20
|
+
/** Number of registered (possibly already collected) live ranges. */
|
|
21
|
+
export declare let liveRangeCount: number;
|
|
22
|
+
/** Number of registered (possibly already collected) NodeIterators. */
|
|
23
|
+
export declare let nodeIteratorCount: number;
|
|
24
|
+
export declare function registerLiveRange(r: LiveBoundaries): void;
|
|
25
|
+
/** Re-file `r` after its boundary points moved to another document. */
|
|
26
|
+
export declare function refileRange(r: LiveBoundaries): void;
|
|
27
|
+
export declare function registerNodeIterator(it: IteratorState): void;
|
|
28
|
+
/**
|
|
29
|
+
* Adopting `node` from `oldDoc`: ranges filed under the old document whose boundary points are
|
|
30
|
+
* inside the adopted subtree move to the new document's list.
|
|
31
|
+
*/
|
|
32
|
+
export declare function rangesAdopt(node: NodeImpl, oldDoc: object): void;
|
|
33
|
+
/** https://dom.spec.whatwg.org/#concept-node-insert step 2 */
|
|
34
|
+
export declare function rangesAfterInsert(parent: NodeImpl, index: number, count: number): void;
|
|
35
|
+
/** https://dom.spec.whatwg.org/#concept-node-remove steps 4-7 */
|
|
36
|
+
export declare function rangesBeforeRemove(node: NodeImpl, parent: NodeImpl, index: number): void;
|
|
37
|
+
/** https://dom.spec.whatwg.org/#concept-cd-replace steps 8-11 */
|
|
38
|
+
export declare function rangesReplaceData(node: NodeImpl, offset: number, count: number, dataLength: number): void;
|
|
39
|
+
/** https://dom.spec.whatwg.org/#concept-text-split steps 7.2-7.5 */
|
|
40
|
+
export declare function rangesSplitText(node: NodeImpl, newNode: NodeImpl, offset: number, parent: NodeImpl): void;
|
|
41
|
+
/** https://dom.spec.whatwg.org/#dom-node-normalize steps 6.4.1-6.4.4 for one merged sibling. */
|
|
42
|
+
export declare function rangesNormalizeMerge(node: NodeImpl, current: NodeImpl, length: number): void;
|
|
43
|
+
/** https://dom.spec.whatwg.org/#nodeiterator-pre-removing-steps (for every iterator in node's document). */
|
|
44
|
+
export declare function iteratorsBeforeRemove(toBeRemoved: NodeImpl): void;
|
|
45
|
+
/** @internal For tests: drop every registration. */
|
|
46
|
+
export declare function _resetLiveRegistries(): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type Ctor = {
|
|
2
|
+
prototype: object;
|
|
3
|
+
};
|
|
4
|
+
/** Make the public members of each interface prototype enumerable (one-time, at module load). */
|
|
5
|
+
export declare function exposeMembers(...ctors: Ctor[]): void;
|
|
6
|
+
/**
|
|
7
|
+
* Make an instance's internal own fields (`_`-prefixed or symbol-keyed, see keys.ts)
|
|
8
|
+
* non-enumerable, so spreads and Jest's symbol-aware equality skip them too. Call at the end of
|
|
9
|
+
* a constructor.
|
|
10
|
+
*/
|
|
11
|
+
export declare function hideInternals(obj: object): void;
|
|
12
|
+
/**
|
|
13
|
+
* Throw the TypeError WebIDL requires when an operation is called with fewer than its required
|
|
14
|
+
* arguments (https://webidl.spec.whatwg.org/#dfn-overload-resolution-algorithm step 4), worded
|
|
15
|
+
* like jsdom/Chromium.
|
|
16
|
+
*/
|
|
17
|
+
export declare function argumentsRequired(method: string, iface: string, required: number, given: number): never;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Event } from "./events/Event.js";
|
|
2
|
+
export interface EventListener {
|
|
3
|
+
(event: Event): void;
|
|
4
|
+
}
|
|
5
|
+
export interface EventListenerObject {
|
|
6
|
+
handleEvent(event: Event): void;
|
|
7
|
+
}
|
|
8
|
+
export type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
|
9
|
+
export interface EventListenerOptions {
|
|
10
|
+
capture?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface AddEventListenerOptions extends EventListenerOptions {
|
|
13
|
+
once?: boolean;
|
|
14
|
+
passive?: boolean;
|
|
15
|
+
signal?: AbortSignal;
|
|
16
|
+
}
|
|
17
|
+
export interface EventInit {
|
|
18
|
+
bubbles?: boolean;
|
|
19
|
+
cancelable?: boolean;
|
|
20
|
+
composed?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ElementCreationOptions {
|
|
23
|
+
is?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ShadowRootInit {
|
|
26
|
+
mode: "open" | "closed";
|
|
27
|
+
delegatesFocus?: boolean;
|
|
28
|
+
slotAssignment?: "manual" | "named";
|
|
29
|
+
clonable?: boolean;
|
|
30
|
+
serializable?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface GetRootNodeOptions {
|
|
33
|
+
composed?: boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class DOMStringList {
|
|
2
|
+
#private;
|
|
3
|
+
constructor(token?: symbol, strings?: readonly string[]);
|
|
4
|
+
/** https://html.spec.whatwg.org/#dom-domstringlist-length */
|
|
5
|
+
get length(): number;
|
|
6
|
+
/** https://html.spec.whatwg.org/#dom-domstringlist-item */
|
|
7
|
+
item(index: number): string | null;
|
|
8
|
+
/** https://html.spec.whatwg.org/#dom-domstringlist-contains */
|
|
9
|
+
contains(string: string): boolean;
|
|
10
|
+
[Symbol.iterator](): IterableIterator<string>;
|
|
11
|
+
get [Symbol.toStringTag](): string;
|
|
12
|
+
}
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare function createDOMStringList(strings: readonly string[]): DOMStringList;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** https://w3c.github.io/FileAPI/#filelist-section */
|
|
2
|
+
export declare class FileList {
|
|
3
|
+
readonly length: number;
|
|
4
|
+
[index: number]: File;
|
|
5
|
+
constructor(token?: symbol, files?: readonly File[]);
|
|
6
|
+
item(index: number): File | null;
|
|
7
|
+
[Symbol.iterator](): IterableIterator<File>;
|
|
8
|
+
get [Symbol.toStringTag](): string;
|
|
9
|
+
}
|
|
10
|
+
/** Create a FileList (for <input type=file>, DataTransfer, ...). */
|
|
11
|
+
export declare function createFileList(files: readonly File[]): FileList;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventTarget } from "../events/EventTarget.js";
|
|
2
|
+
import { $error, $generation, $readyState, $result } from "../keys.js";
|
|
3
|
+
type ReadKind = "ArrayBuffer" | "BinaryString" | "Text" | "DataURL";
|
|
4
|
+
export declare class FileReader extends EventTarget {
|
|
5
|
+
static readonly EMPTY = 0;
|
|
6
|
+
static readonly LOADING = 1;
|
|
7
|
+
static readonly DONE = 2;
|
|
8
|
+
[$readyState]: number;
|
|
9
|
+
[$result]: string | ArrayBuffer | null;
|
|
10
|
+
[$error]: DOMException | null;
|
|
11
|
+
/** Incremented by abort() and every new read so stale completions are dropped. */
|
|
12
|
+
[$generation]: number;
|
|
13
|
+
constructor();
|
|
14
|
+
get readyState(): number;
|
|
15
|
+
get result(): string | ArrayBuffer | null;
|
|
16
|
+
get error(): DOMException | null;
|
|
17
|
+
readAsArrayBuffer(blob: Blob): void;
|
|
18
|
+
readAsBinaryString(blob: Blob): void;
|
|
19
|
+
readAsText(blob: Blob, encoding?: string): void;
|
|
20
|
+
readAsDataURL(blob: Blob): void;
|
|
21
|
+
/** https://w3c.github.io/FileAPI/#dfn-abort */
|
|
22
|
+
abort(): void;
|
|
23
|
+
/** https://w3c.github.io/FileAPI/#readOperation */
|
|
24
|
+
_read(blob: Blob, kind: ReadKind, encoding?: string): void;
|
|
25
|
+
_fire(type: string, loaded?: number, total?: number): void;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Window } from "./Window.js";
|
|
2
|
+
import { $entries, $index, $scrollRestoration, $window } from "../keys.js";
|
|
3
|
+
interface SessionHistoryEntry {
|
|
4
|
+
url: string;
|
|
5
|
+
/** StructuredSerialize(data) result; we keep the structured clone itself. */
|
|
6
|
+
state: unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare class History {
|
|
9
|
+
[$window]: Window;
|
|
10
|
+
[$entries]: SessionHistoryEntry[];
|
|
11
|
+
[$index]: number;
|
|
12
|
+
[$scrollRestoration]: "auto" | "manual";
|
|
13
|
+
constructor(window: Window);
|
|
14
|
+
/** https://html.spec.whatwg.org/#dom-history-length */
|
|
15
|
+
get length(): number;
|
|
16
|
+
/** https://html.spec.whatwg.org/#dom-history-state */
|
|
17
|
+
get state(): unknown;
|
|
18
|
+
get scrollRestoration(): "auto" | "manual";
|
|
19
|
+
set scrollRestoration(value: string);
|
|
20
|
+
/** https://html.spec.whatwg.org/#dom-history-go */
|
|
21
|
+
go(delta?: number): void;
|
|
22
|
+
/** https://html.spec.whatwg.org/#dom-history-back */
|
|
23
|
+
back(): void;
|
|
24
|
+
/** https://html.spec.whatwg.org/#dom-history-forward */
|
|
25
|
+
forward(): void;
|
|
26
|
+
/** https://html.spec.whatwg.org/#dom-history-pushstate */
|
|
27
|
+
pushState(data: unknown, unused: string, url?: string | URL | null): void;
|
|
28
|
+
/** https://html.spec.whatwg.org/#dom-history-replacestate */
|
|
29
|
+
replaceState(data: unknown, unused: string, url?: string | URL | null): void;
|
|
30
|
+
/** https://html.spec.whatwg.org/#shared-history-push/replace-state-steps */
|
|
31
|
+
_sharedPushReplaceState(data: unknown, url: string | URL | null | undefined, replace: boolean, method: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Location navigations (https://html.spec.whatwg.org/#navigate): no document is loaded. A
|
|
34
|
+
* navigation that only changes the fragment is a fragment navigation and fires
|
|
35
|
+
* `hashchange`; any other navigation just updates the URL (docs/deviations.md).
|
|
36
|
+
*/
|
|
37
|
+
_navigate(url: URL, replace: boolean): void;
|
|
38
|
+
/** https://html.spec.whatwg.org/#update-document-for-history-step-application (same-document case) */
|
|
39
|
+
_traverseTo(target: number): void;
|
|
40
|
+
_queueHashChange(oldURL: string, newURL: string): void;
|
|
41
|
+
get [Symbol.toStringTag](): string;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Window } from "./Window.js";
|
|
2
|
+
import { type DOMStringList } from "./DOMStringList.js";
|
|
3
|
+
import { $window } from "../keys.js";
|
|
4
|
+
export declare class Location {
|
|
5
|
+
#private;
|
|
6
|
+
[$window]: Window;
|
|
7
|
+
constructor(window: Window);
|
|
8
|
+
/** https://html.spec.whatwg.org/#dom-location-href */
|
|
9
|
+
get href(): string;
|
|
10
|
+
set href(value: string);
|
|
11
|
+
get origin(): string;
|
|
12
|
+
get protocol(): string;
|
|
13
|
+
/** https://html.spec.whatwg.org/#dom-location-protocol (setter steps 4-6) */
|
|
14
|
+
set protocol(value: string);
|
|
15
|
+
get host(): string;
|
|
16
|
+
set host(value: string);
|
|
17
|
+
get hostname(): string;
|
|
18
|
+
set hostname(value: string);
|
|
19
|
+
get port(): string;
|
|
20
|
+
set port(value: string);
|
|
21
|
+
get pathname(): string;
|
|
22
|
+
set pathname(value: string);
|
|
23
|
+
get search(): string;
|
|
24
|
+
set search(value: string);
|
|
25
|
+
get hash(): string;
|
|
26
|
+
/** https://html.spec.whatwg.org/#dom-location-hash */
|
|
27
|
+
set hash(value: string);
|
|
28
|
+
/**
|
|
29
|
+
* https://html.spec.whatwg.org/#dom-location-ancestororigins — the list is created once (the
|
|
30
|
+
* Location's [[AncestorOriginsList]], https://html.spec.whatwg.org/#concept-location-ancestor-origins-list):
|
|
31
|
+
* the origins of the parent, grandparent, ... browsing contexts. Once the browsing context is
|
|
32
|
+
* gone (the window closed) a new, empty list is returned (step 1), also cached.
|
|
33
|
+
*/
|
|
34
|
+
get ancestorOrigins(): DOMStringList;
|
|
35
|
+
/** https://html.spec.whatwg.org/#dom-location-assign */
|
|
36
|
+
assign(url: string): void;
|
|
37
|
+
/** https://html.spec.whatwg.org/#dom-location-replace */
|
|
38
|
+
replace(url: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* https://html.spec.whatwg.org/#dom-location-reload — no-op: there is nothing to reload.
|
|
41
|
+
* jsdom navigates with reloadTriggered, which always reports.
|
|
42
|
+
*/
|
|
43
|
+
reload(): void;
|
|
44
|
+
_set(component: "host" | "hostname" | "port" | "pathname" | "search", value: string): void;
|
|
45
|
+
get [Symbol.toStringTag](): string;
|
|
46
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { EventTarget } from "../events/EventTarget.js";
|
|
2
|
+
import type { Window } from "./Window.js";
|
|
3
|
+
import { $clipboard, $data, $items, $presentationStyle, $userActivation, $window } from "../keys.js";
|
|
4
|
+
type ClipboardItemData = string | Blob | PromiseLike<string | Blob>;
|
|
5
|
+
/** https://w3c.github.io/clipboard-apis/#clipboarditem */
|
|
6
|
+
export declare class ClipboardItem {
|
|
7
|
+
[$items]: Map<string, ClipboardItemData>;
|
|
8
|
+
[$presentationStyle]: string;
|
|
9
|
+
constructor(items: Record<string, ClipboardItemData>, options?: {
|
|
10
|
+
presentationStyle?: string;
|
|
11
|
+
});
|
|
12
|
+
get types(): readonly string[];
|
|
13
|
+
get presentationStyle(): string;
|
|
14
|
+
getType(type: string): Promise<Blob>;
|
|
15
|
+
static supports(type: string): boolean;
|
|
16
|
+
}
|
|
17
|
+
/** https://w3c.github.io/clipboard-apis/#clipboard-interface — the system clipboard is a per-window array. */
|
|
18
|
+
export declare class Clipboard extends EventTarget {
|
|
19
|
+
[$data]: ClipboardItem[];
|
|
20
|
+
constructor();
|
|
21
|
+
read(): Promise<ClipboardItem[]>;
|
|
22
|
+
readText(): Promise<string>;
|
|
23
|
+
write(data: ClipboardItem[]): Promise<void>;
|
|
24
|
+
writeText(data: string): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
export declare class Navigator {
|
|
27
|
+
[$window]: Window;
|
|
28
|
+
[$clipboard]: Clipboard | null;
|
|
29
|
+
[$userActivation]: {
|
|
30
|
+
hasBeenActive: boolean;
|
|
31
|
+
isActive: boolean;
|
|
32
|
+
} | null;
|
|
33
|
+
constructor(window: Window);
|
|
34
|
+
get appCodeName(): string;
|
|
35
|
+
get appName(): string;
|
|
36
|
+
get appVersion(): string;
|
|
37
|
+
get platform(): string;
|
|
38
|
+
get product(): string;
|
|
39
|
+
get productSub(): string;
|
|
40
|
+
get userAgent(): string;
|
|
41
|
+
get vendor(): string;
|
|
42
|
+
get vendorSub(): string;
|
|
43
|
+
get oscpu(): undefined;
|
|
44
|
+
get language(): string;
|
|
45
|
+
get languages(): readonly string[];
|
|
46
|
+
get onLine(): boolean;
|
|
47
|
+
get cookieEnabled(): boolean;
|
|
48
|
+
get hardwareConcurrency(): number;
|
|
49
|
+
get pdfViewerEnabled(): boolean;
|
|
50
|
+
get plugins(): readonly unknown[];
|
|
51
|
+
get mimeTypes(): readonly unknown[];
|
|
52
|
+
javaEnabled(): boolean;
|
|
53
|
+
get maxTouchPoints(): number;
|
|
54
|
+
get webdriver(): boolean;
|
|
55
|
+
get doNotTrack(): null;
|
|
56
|
+
get deviceMemory(): number;
|
|
57
|
+
/** https://w3c.github.io/clipboard-apis/#navigator-interface */
|
|
58
|
+
get clipboard(): Clipboard;
|
|
59
|
+
/**
|
|
60
|
+
* Deliberate deviation (docs/deviations.md): the spec attribute is readonly, so assignment
|
|
61
|
+
* throws in strict mode, but jsdom has no `navigator.clipboard` and suites stub it with
|
|
62
|
+
* `Object.assign(navigator, { clipboard })`. [Replaceable]-style
|
|
63
|
+
* (https://webidl.spec.whatwg.org/#Replaceable): assigning shadows the accessor with an own
|
|
64
|
+
* data property; deleting it brings the real clipboard back.
|
|
65
|
+
*/
|
|
66
|
+
set clipboard(value: unknown);
|
|
67
|
+
/** https://html.spec.whatwg.org/#the-useractivation-interface */
|
|
68
|
+
get userActivation(): {
|
|
69
|
+
hasBeenActive: boolean;
|
|
70
|
+
isActive: boolean;
|
|
71
|
+
};
|
|
72
|
+
/** https://w3c.github.io/beacon/ — nothing is sent. */
|
|
73
|
+
sendBeacon(_url: string, _data?: unknown): boolean;
|
|
74
|
+
vibrate(_pattern: number | number[]): boolean;
|
|
75
|
+
registerProtocolHandler(): void;
|
|
76
|
+
unregisterProtocolHandler(): void;
|
|
77
|
+
get [Symbol.toStringTag](): string;
|
|
78
|
+
}
|
|
79
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventTarget } from "../events/EventTarget.js";
|
|
2
|
+
import type { Window } from "./Window.js";
|
|
3
|
+
import { $window } from "../keys.js";
|
|
4
|
+
export declare class Screen extends EventTarget {
|
|
5
|
+
[$window]: Window;
|
|
6
|
+
constructor(window: Window);
|
|
7
|
+
get width(): number;
|
|
8
|
+
get height(): number;
|
|
9
|
+
get availWidth(): number;
|
|
10
|
+
get availHeight(): number;
|
|
11
|
+
get availLeft(): number;
|
|
12
|
+
get availTop(): number;
|
|
13
|
+
get colorDepth(): number;
|
|
14
|
+
get pixelDepth(): number;
|
|
15
|
+
get isExtended(): boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare class VisualViewport extends EventTarget {
|
|
18
|
+
[$window]: Window;
|
|
19
|
+
constructor(window: Window);
|
|
20
|
+
get offsetLeft(): number;
|
|
21
|
+
get offsetTop(): number;
|
|
22
|
+
get pageLeft(): number;
|
|
23
|
+
get pageTop(): number;
|
|
24
|
+
get width(): number;
|
|
25
|
+
get height(): number;
|
|
26
|
+
get scale(): number;
|
|
27
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Window } from "./Window.js";
|
|
2
|
+
/** https://storage.spec.whatwg.org/#storage-shed */
|
|
3
|
+
export interface StorageShed {
|
|
4
|
+
/** origin → local storage area (a "storage bottle map") */
|
|
5
|
+
areas: Map<string, Map<string, string>>;
|
|
6
|
+
windows: Set<Window>;
|
|
7
|
+
}
|
|
8
|
+
export declare function createStorageShed(): StorageShed;
|
|
9
|
+
export declare class Storage {
|
|
10
|
+
constructor(token?: symbol, window?: Window, type?: "local" | "session", map?: Map<string, string>);
|
|
11
|
+
/** https://html.spec.whatwg.org/#dom-storage-length */
|
|
12
|
+
get length(): number;
|
|
13
|
+
/** https://html.spec.whatwg.org/#dom-storage-key */
|
|
14
|
+
key(index: number): string | null;
|
|
15
|
+
/** https://html.spec.whatwg.org/#dom-storage-getitem */
|
|
16
|
+
getItem(key: string): string | null;
|
|
17
|
+
/** https://html.spec.whatwg.org/#dom-storage-setitem */
|
|
18
|
+
setItem(key: string, value: string): void;
|
|
19
|
+
/** https://html.spec.whatwg.org/#dom-storage-removeitem */
|
|
20
|
+
removeItem(key: string): void;
|
|
21
|
+
/** https://html.spec.whatwg.org/#dom-storage-clear */
|
|
22
|
+
clear(): void;
|
|
23
|
+
get [Symbol.toStringTag](): string;
|
|
24
|
+
}
|
|
25
|
+
/** @internal Create a window's localStorage (area shared per origin within the shed). */
|
|
26
|
+
export declare function createLocalStorage(window: Window): Storage;
|
|
27
|
+
/** @internal Create a window's sessionStorage: shared with same-origin frames of its top-level window. */
|
|
28
|
+
export declare function createSessionStorage(window: Window): Storage;
|