@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.
- 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-Hv_BAHIV.js +47537 -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 +163 -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 +3923 -0
- package/dist/user-event/index.js +3898 -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 +55 -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 +178 -4
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { HTMLElement } from "./HTMLElement.js";
|
|
2
|
+
/** https://html.spec.whatwg.org/#timeranges */
|
|
3
|
+
export declare class TimeRanges {
|
|
4
|
+
get length(): number;
|
|
5
|
+
start(index: number): number;
|
|
6
|
+
end(index: number): number;
|
|
7
|
+
}
|
|
8
|
+
export declare class MediaError {
|
|
9
|
+
static readonly MEDIA_ERR_ABORTED = 1;
|
|
10
|
+
static readonly MEDIA_ERR_NETWORK = 2;
|
|
11
|
+
static readonly MEDIA_ERR_DECODE = 3;
|
|
12
|
+
static readonly MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
|
|
13
|
+
}
|
|
14
|
+
export declare class HTMLMediaElement extends HTMLElement {
|
|
15
|
+
static readonly NETWORK_EMPTY = 0;
|
|
16
|
+
static readonly NETWORK_IDLE = 1;
|
|
17
|
+
static readonly NETWORK_LOADING = 2;
|
|
18
|
+
static readonly NETWORK_NO_SOURCE = 3;
|
|
19
|
+
static readonly HAVE_NOTHING = 0;
|
|
20
|
+
static readonly HAVE_METADATA = 1;
|
|
21
|
+
static readonly HAVE_CURRENT_DATA = 2;
|
|
22
|
+
static readonly HAVE_FUTURE_DATA = 3;
|
|
23
|
+
static readonly HAVE_ENOUGH_DATA = 4;
|
|
24
|
+
get error(): MediaError | null;
|
|
25
|
+
get currentSrc(): string;
|
|
26
|
+
get srcObject(): unknown;
|
|
27
|
+
set srcObject(v: unknown);
|
|
28
|
+
get networkState(): number;
|
|
29
|
+
get buffered(): TimeRanges;
|
|
30
|
+
get readyState(): number;
|
|
31
|
+
get seeking(): boolean;
|
|
32
|
+
get currentTime(): number;
|
|
33
|
+
set currentTime(v: number);
|
|
34
|
+
fastSeek(time: number): void;
|
|
35
|
+
get duration(): number;
|
|
36
|
+
getStartDate(): Date;
|
|
37
|
+
get paused(): boolean;
|
|
38
|
+
get defaultPlaybackRate(): number;
|
|
39
|
+
set defaultPlaybackRate(v: number);
|
|
40
|
+
get playbackRate(): number;
|
|
41
|
+
set playbackRate(v: number);
|
|
42
|
+
get preservesPitch(): boolean;
|
|
43
|
+
set preservesPitch(v: boolean);
|
|
44
|
+
get played(): TimeRanges;
|
|
45
|
+
get seekable(): TimeRanges;
|
|
46
|
+
get ended(): boolean;
|
|
47
|
+
get volume(): number;
|
|
48
|
+
set volume(v: number);
|
|
49
|
+
/** https://html.spec.whatwg.org/#dom-media-muted — initially the `muted` attribute's presence. */
|
|
50
|
+
get muted(): boolean;
|
|
51
|
+
set muted(v: boolean);
|
|
52
|
+
/** https://html.spec.whatwg.org/#dom-navigator-canplaytype */
|
|
53
|
+
canPlayType(_type: string): string;
|
|
54
|
+
/** https://html.spec.whatwg.org/#dom-media-load */
|
|
55
|
+
load(): void;
|
|
56
|
+
/** https://html.spec.whatwg.org/#dom-media-play */
|
|
57
|
+
play(): Promise<void>;
|
|
58
|
+
/** https://html.spec.whatwg.org/#dom-media-pause */
|
|
59
|
+
pause(): void;
|
|
60
|
+
get textTracks(): unknown[];
|
|
61
|
+
get audioTracks(): unknown[];
|
|
62
|
+
get videoTracks(): unknown[];
|
|
63
|
+
addTextTrack(): never;
|
|
64
|
+
setMediaKeys(): Promise<void>;
|
|
65
|
+
get mediaKeys(): null;
|
|
66
|
+
setSinkId(): Promise<void>;
|
|
67
|
+
get sinkId(): string;
|
|
68
|
+
}
|
|
69
|
+
export declare class HTMLAudioElement extends HTMLMediaElement {
|
|
70
|
+
}
|
|
71
|
+
export declare class HTMLVideoElement extends HTMLMediaElement {
|
|
72
|
+
get videoWidth(): number;
|
|
73
|
+
get videoHeight(): number;
|
|
74
|
+
getVideoPlaybackQuality(): object;
|
|
75
|
+
requestPictureInPicture(): Promise<never>;
|
|
76
|
+
requestVideoFrameCallback(_cb: unknown): number;
|
|
77
|
+
cancelVideoFrameCallback(_handle: number): void;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* https://html.spec.whatwg.org/#dom-audio — `new Audio(src?)` creates an <audio preload=auto>
|
|
81
|
+
* in the current window's document.
|
|
82
|
+
*/
|
|
83
|
+
export declare const Audio: {
|
|
84
|
+
new (src?: string): HTMLAudioElement;
|
|
85
|
+
prototype: HTMLAudioElement;
|
|
86
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { NodeImpl } from "../nodes/NodeImpl.js";
|
|
2
|
+
import { $impl } from "../keys.js";
|
|
3
|
+
type Ctor = {
|
|
4
|
+
prototype: object;
|
|
5
|
+
};
|
|
6
|
+
type Wrapper = {
|
|
7
|
+
[$impl]: NodeImpl;
|
|
8
|
+
};
|
|
9
|
+
/** Value of the null-namespace attribute `localName`, or null. Allocation-free. */
|
|
10
|
+
export declare function contentAttr(el: NodeImpl, localName: string): string | null;
|
|
11
|
+
/** https://dom.spec.whatwg.org/#concept-element-attributes-set-value (null namespace). */
|
|
12
|
+
export declare function setContentAttr(el: NodeImpl, localName: string, value: string): void;
|
|
13
|
+
export declare function removeContentAttr(el: NodeImpl, localName: string): void;
|
|
14
|
+
export declare function defineAccessor(C: Ctor, name: string, get: (this: Wrapper) => unknown, set?: (this: Wrapper, v: any) => void): void;
|
|
15
|
+
/**
|
|
16
|
+
* https://html.spec.whatwg.org/#rules-for-parsing-integers — returns NaN on error.
|
|
17
|
+
* Values outside the safe range saturate to ±Infinity so range checks fail as they should.
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseInteger(input: string): number;
|
|
20
|
+
/** https://html.spec.whatwg.org/#rules-for-parsing-non-negative-integers — NaN on error. */
|
|
21
|
+
export declare function parseNonNegativeInteger(input: string): number;
|
|
22
|
+
/** https://html.spec.whatwg.org/#rules-for-parsing-floating-point-number-values — NaN on error. */
|
|
23
|
+
export declare function parseFloatingPoint(input: string): number;
|
|
24
|
+
/** DOMString reflection. */
|
|
25
|
+
export declare function str(C: Ctor, list: string): void;
|
|
26
|
+
/** `[LegacyNullToEmptyString] DOMString` reflection: setting null stores "". */
|
|
27
|
+
export declare function strNullEmpty(C: Ctor, list: string): void;
|
|
28
|
+
/** Nullable DOMString reflection (`DOMString?`): null when absent; setting null removes. */
|
|
29
|
+
export declare function nullableStr(C: Ctor, list: string): void;
|
|
30
|
+
/** boolean reflection: true iff the attribute is present. */
|
|
31
|
+
export declare function bool(C: Ctor, list: string): void;
|
|
32
|
+
/** USVString URL reflection: resolved against the document base URL, raw value on failure. */
|
|
33
|
+
export declare function url(C: Ctor, list: string): void;
|
|
34
|
+
/** https://html.spec.whatwg.org/#encoding-parsing-a-url relative to the node document's base URL. */
|
|
35
|
+
export declare function resolveURL(impl: NodeImpl, value: string): string | null;
|
|
36
|
+
/** `long` reflection. */
|
|
37
|
+
export declare function long(C: Ctor, list: string, def?: number): void;
|
|
38
|
+
/** `long` limited to only non-negative numbers (e.g. maxLength). */
|
|
39
|
+
export declare function nonNegativeLong(C: Ctor, list: string, def?: number): void;
|
|
40
|
+
/** `unsigned long` reflection; `positive` = limited to only positive numbers (with fallback). */
|
|
41
|
+
export declare function ulong(C: Ctor, list: string, def?: number, positive?: boolean): void;
|
|
42
|
+
/** `unsigned long` clamped to [min, max] (e.g. colSpan, rowSpan). */
|
|
43
|
+
export declare function clampedUlong(C: Ctor, idl: string, content: string, def: number, min: number, max: number): void;
|
|
44
|
+
/** `double` reflection; `positive` = limited to only positive numbers. */
|
|
45
|
+
export declare function double(C: Ctor, list: string, def?: number, positive?: boolean): void;
|
|
46
|
+
export interface EnumSpec {
|
|
47
|
+
/** Canonical keywords (lowercase). Aliases: "alias:canonical". */
|
|
48
|
+
keywords: string[];
|
|
49
|
+
/** Missing value default; null for nullable reflection (`DOMString?`). Default "". */
|
|
50
|
+
missing?: string | null;
|
|
51
|
+
/** Invalid value default. Default "". */
|
|
52
|
+
invalid?: string;
|
|
53
|
+
/** Empty value default (attribute present with value ""). Default: same as invalid. */
|
|
54
|
+
empty?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Enumerated attribute reflection (limited to only known values). */
|
|
57
|
+
export declare function enumerated(C: Ctor, list: string, spec: EnumSpec): void;
|
|
58
|
+
/** Shared enumerated specs. */
|
|
59
|
+
export declare const CROSS_ORIGIN: EnumSpec;
|
|
60
|
+
export declare const REFERRER_POLICY: EnumSpec;
|
|
61
|
+
export declare const LOADING: EnumSpec;
|
|
62
|
+
export declare const FETCH_PRIORITY: EnumSpec;
|
|
63
|
+
/** Reflect a DOMTokenList-valued IDL attribute (`relList`, `sandbox`, `sizes`, ...) — [SameObject, PutForwards=value]. */
|
|
64
|
+
export declare function tokenList(C: Ctor, idl: string, content: string, supported?: readonly string[] | null): void;
|
|
65
|
+
/** Whether `impl` is an HTML-namespace element. */
|
|
66
|
+
export declare function isHTMLElement(impl: NodeImpl): boolean;
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ElementConstructor } from "../nodes/create.js";
|
|
2
|
+
type Ctor = ElementConstructor;
|
|
3
|
+
/** https://html.spec.whatwg.org/#element-interface */
|
|
4
|
+
export declare function elementClassFor(localName: string, ns: string | null): Ctor;
|
|
5
|
+
/** Whether `C` is one of the HTML element interfaces in the table (or HTMLElement/HTMLUnknownElement). */
|
|
6
|
+
export declare function isBuiltinInterface(C: Function): boolean;
|
|
7
|
+
/** Local names whose element interface is `C` (https://html.spec.whatwg.org/#html-element-constructors step 5). */
|
|
8
|
+
export declare function localNamesForInterface(C: Function): string[];
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { HTMLElement } from "./HTMLElement.js";
|
|
2
|
+
import { Document } from "../nodes/Document.js";
|
|
3
|
+
import type { NodeImpl } from "../nodes/NodeImpl.js";
|
|
4
|
+
import type { Element } from "../nodes/Element.js";
|
|
5
|
+
export interface StyleSheetHooks {
|
|
6
|
+
/** Create the CSS style sheet for a <style> element (or SVG <style>) from its child text. */
|
|
7
|
+
createSheet: ((owner: NodeImpl, text: string, media: string) => object) | null;
|
|
8
|
+
/** The element's sheet is going away (disconnected, emptied, type changed). */
|
|
9
|
+
removeSheet: ((owner: NodeImpl, sheet: object) => void) | null;
|
|
10
|
+
/** Optional: a sheet for <link rel=stylesheet> (no fetching happens here). */
|
|
11
|
+
createLinkSheet: ((owner: NodeImpl, href: string, media: string) => object | null) | null;
|
|
12
|
+
}
|
|
13
|
+
export declare const styleSheetHooks: StyleSheetHooks;
|
|
14
|
+
/** The CSS style sheet associated with a <style>/<link> element (for document.styleSheets). */
|
|
15
|
+
export declare function associatedSheet(impl: NodeImpl): object | null;
|
|
16
|
+
/** https://html.spec.whatwg.org/#child-text-content */
|
|
17
|
+
export declare function childTextContent(impl: NodeImpl): string;
|
|
18
|
+
/** https://html.spec.whatwg.org/#update-a-style-block */
|
|
19
|
+
export declare function updateStyleBlock(el: Element): void;
|
|
20
|
+
export declare class HTMLStyleElement extends HTMLElement {
|
|
21
|
+
constructor(doc?: Document, localName?: string, ns?: string | null, prefix?: string | null);
|
|
22
|
+
_connectedSteps(): void;
|
|
23
|
+
_disconnectedSteps(): void;
|
|
24
|
+
_childrenChangedSteps(): void;
|
|
25
|
+
_attributeChangedSteps(localName: string, oldValue: string | null, value: string | null, namespace: string | null): void;
|
|
26
|
+
get sheet(): object | null;
|
|
27
|
+
/** https://html.spec.whatwg.org/#dom-style-disabled */
|
|
28
|
+
get disabled(): boolean;
|
|
29
|
+
set disabled(v: boolean);
|
|
30
|
+
}
|
|
31
|
+
export declare class HTMLLinkElement extends HTMLElement {
|
|
32
|
+
constructor(doc?: Document, localName?: string, ns?: string | null, prefix?: string | null);
|
|
33
|
+
_connectedSteps(): void;
|
|
34
|
+
_disconnectedSteps(): void;
|
|
35
|
+
_attributeChangedSteps(localName: string, oldValue: string | null, value: string | null, namespace: string | null): void;
|
|
36
|
+
get sheet(): object | null;
|
|
37
|
+
}
|
|
38
|
+
/** https://html.spec.whatwg.org/#htmlscriptelement — inert: never fetched or executed. */
|
|
39
|
+
export declare class HTMLScriptElement extends HTMLElement {
|
|
40
|
+
static supports(type: string): boolean;
|
|
41
|
+
/** https://html.spec.whatwg.org/#dom-script-text */
|
|
42
|
+
get text(): string;
|
|
43
|
+
set text(value: string);
|
|
44
|
+
/** https://html.spec.whatwg.org/#dom-script-async */
|
|
45
|
+
get async(): boolean;
|
|
46
|
+
set async(v: boolean);
|
|
47
|
+
}
|
|
48
|
+
export declare class HTMLTitleElement extends HTMLElement {
|
|
49
|
+
/** https://html.spec.whatwg.org/#dom-title-text */
|
|
50
|
+
get text(): string;
|
|
51
|
+
set text(value: string);
|
|
52
|
+
}
|
|
53
|
+
/** https://html.spec.whatwg.org/#document.title */
|
|
54
|
+
export declare function getDocumentTitle(doc: Document): string;
|
|
55
|
+
export declare function setDocumentTitle(doc: Document, value: string): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { NodeImpl } from "../nodes/NodeImpl.js";
|
|
2
|
+
/**
|
|
3
|
+
* "Not being rendered" for focus (https://html.spec.whatwg.org/#being-rendered): display:none on
|
|
4
|
+
* the element or a flat-tree ancestor, from the css area's cached fast path (UA defaults such as
|
|
5
|
+
* [hidden] and <head> included; author style sheets and inline styles when present).
|
|
6
|
+
*/
|
|
7
|
+
export declare function isRenderingHidden(impl: NodeImpl): boolean;
|
|
8
|
+
/** The element's own computed display is none (ancestors not considered). */
|
|
9
|
+
export declare function isOwnDisplayNone(impl: NodeImpl): boolean;
|
|
10
|
+
/** https://html.spec.whatwg.org/#attr-contenteditable state of an element's own attribute. */
|
|
11
|
+
export declare function contentEditableState(impl: NodeImpl): number;
|
|
12
|
+
/** https://html.spec.whatwg.org/#dom-document-designmode (getter). */
|
|
13
|
+
export declare function isDesignModeEnabled(doc: object): boolean;
|
|
14
|
+
/** https://html.spec.whatwg.org/#dom-document-designmode (setter steps 1–2). */
|
|
15
|
+
export declare function setDesignModeEnabled(doc: object, enabled: boolean): void;
|
|
16
|
+
/**
|
|
17
|
+
* https://html.spec.whatwg.org/#editable — the element is an editing host or inside one (what
|
|
18
|
+
* isContentEditable reports).
|
|
19
|
+
*/
|
|
20
|
+
export declare function isEditable(impl: NodeImpl): boolean;
|
|
21
|
+
/** https://html.spec.whatwg.org/#editing-host */
|
|
22
|
+
export declare function isEditingHost(impl: NodeImpl): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HTMLElement } from "./HTMLElement.js";
|
|
2
|
+
import type { Element } from "../nodes/Element.js";
|
|
3
|
+
import type { Node } from "../nodes/Node.js";
|
|
4
|
+
export declare class HTMLSlotElement extends HTMLElement {
|
|
5
|
+
/** https://html.spec.whatwg.org/#dom-slot-assignednodes */
|
|
6
|
+
assignedNodes(options?: {
|
|
7
|
+
flatten?: boolean;
|
|
8
|
+
}): Node[];
|
|
9
|
+
/** https://html.spec.whatwg.org/#dom-slot-assignedelements */
|
|
10
|
+
assignedElements(options?: {
|
|
11
|
+
flatten?: boolean;
|
|
12
|
+
}): Element[];
|
|
13
|
+
/** https://html.spec.whatwg.org/#dom-slot-assign */
|
|
14
|
+
assign(...nodes: (Element | Node)[]): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HTMLElement } from "./HTMLElement.js";
|
|
2
|
+
import { Document } from "../nodes/Document.js";
|
|
3
|
+
import { DocumentFragment } from "../nodes/DocumentFragment.js";
|
|
4
|
+
import type { NodeImpl } from "../nodes/NodeImpl.js";
|
|
5
|
+
import type { Element } from "../nodes/Element.js";
|
|
6
|
+
/** https://html.spec.whatwg.org/#appropriate-template-contents-owner-document */
|
|
7
|
+
export declare function templateContentsOwner(doc: Document): Document;
|
|
8
|
+
/** The template contents fragment of a template element (created on first use). */
|
|
9
|
+
export declare function templateContents(impl: NodeImpl): NodeImpl;
|
|
10
|
+
export declare class HTMLTemplateElement extends HTMLElement {
|
|
11
|
+
constructor(doc?: Document, localName?: string, ns?: string | null, prefix?: string | null);
|
|
12
|
+
/** https://html.spec.whatwg.org/#dom-template-content */
|
|
13
|
+
get content(): DocumentFragment;
|
|
14
|
+
/** https://html.spec.whatwg.org/#the-template-element:concept-node-clone-ext (deep clones copy the contents). */
|
|
15
|
+
_cloningSteps(copy: Element, subtree?: boolean): void;
|
|
16
|
+
/** @internal https://html.spec.whatwg.org/#the-template-element:concept-node-adopt-ext */
|
|
17
|
+
_adoptingSteps(oldDocument: Document): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { NodeImpl } from "../nodes/NodeImpl.js";
|
|
2
|
+
import type { Document } from "../nodes/Document.js";
|
|
3
|
+
/** https://html.spec.whatwg.org/#close-watcher */
|
|
4
|
+
export interface CloseWatcher {
|
|
5
|
+
/** https://html.spec.whatwg.org/#close-watcher-cancel-action — false prevents closing. */
|
|
6
|
+
cancelAction: (canPreventClose: boolean) => boolean;
|
|
7
|
+
/** https://html.spec.whatwg.org/#close-watcher-close-action */
|
|
8
|
+
closeAction: () => void;
|
|
9
|
+
/** https://html.spec.whatwg.org/#close-watcher-get-enabled-state */
|
|
10
|
+
getEnabledState: () => boolean;
|
|
11
|
+
/** https://html.spec.whatwg.org/#close-watcher-is-running-cancel-action */
|
|
12
|
+
isRunningCancelAction: boolean;
|
|
13
|
+
doc: Document;
|
|
14
|
+
}
|
|
15
|
+
export declare function addToTopLayer(el: NodeImpl): void;
|
|
16
|
+
/** https://drafts.csswg.org/css-position-4/#remove-an-element-from-the-top-layer-immediately */
|
|
17
|
+
export declare function removeFromTopLayer(el: NodeImpl): void;
|
|
18
|
+
export declare function isInTopLayer(el: NodeImpl): boolean;
|
|
19
|
+
export declare function getPreviouslyFocused(el: NodeImpl): NodeImpl | null;
|
|
20
|
+
export declare function setPreviouslyFocused(el: NodeImpl, focused: NodeImpl | null): void;
|
|
21
|
+
/** Sets `is modal` (and blocks the document by the dialog); the dialog joins the top layer. */
|
|
22
|
+
export declare function setModal(el: NodeImpl, modal: boolean): void;
|
|
23
|
+
/** `is modal` (https://html.spec.whatwg.org/#is-modal); also :modal (https://drafts.csswg.org/selectors-4/#modal-state). */
|
|
24
|
+
export declare function matchesModal(el: NodeImpl): boolean;
|
|
25
|
+
/** https://html.spec.whatwg.org/#open-dialogs-list */
|
|
26
|
+
export declare function openDialogsList(doc: Document): NodeImpl[];
|
|
27
|
+
/**
|
|
28
|
+
* https://html.spec.whatwg.org/#blocked-by-a-modal-dialog — while a modal dialog is open,
|
|
29
|
+
* nodes outside the topmost one are inert. Elements above it in the top layer (e.g. a popover
|
|
30
|
+
* opened from within the dialog) are not blocked.
|
|
31
|
+
*/
|
|
32
|
+
export declare function inertByModal(el: NodeImpl): boolean;
|
|
33
|
+
/** Parent in the flat tree (https://drafts.csswg.org/css-scoping/#flat-tree): assigned slot, shadow host, or parent. */
|
|
34
|
+
export declare function flatParent(n: NodeImpl): NodeImpl | null;
|
|
35
|
+
/** https://html.spec.whatwg.org/#fully-active (approximation: the document has a browsing context). */
|
|
36
|
+
export declare function isFullyActive(doc: Document): boolean;
|
|
37
|
+
/** https://html.spec.whatwg.org/#establish-a-close-watcher */
|
|
38
|
+
export declare function establishCloseWatcher(doc: Document, cancelAction: CloseWatcher["cancelAction"], closeAction: () => void, getEnabledState: () => boolean): CloseWatcher;
|
|
39
|
+
/** https://html.spec.whatwg.org/#close-watcher-destroy */
|
|
40
|
+
export declare function destroyCloseWatcher(w: CloseWatcher): void;
|
|
41
|
+
/**
|
|
42
|
+
* https://html.spec.whatwg.org/#close-watcher-request-close — returns false when the cancel
|
|
43
|
+
* action prevented closing. Without user activation tracking, `canPreventClose` is always true
|
|
44
|
+
* (as if the page had history-action activation).
|
|
45
|
+
*/
|
|
46
|
+
export declare function requestCloseWatcher(w: CloseWatcher, _requireHistoryActionActivation: boolean): boolean;
|
|
47
|
+
export declare const P_NONE = 0;
|
|
48
|
+
export declare const P_AUTO = 1;
|
|
49
|
+
export declare const P_MANUAL = 2;
|
|
50
|
+
export declare const P_HINT = 3;
|
|
51
|
+
/** https://html.spec.whatwg.org/#attr-popover state. */
|
|
52
|
+
export declare function popoverState(el: NodeImpl): number;
|
|
53
|
+
export declare function isPopoverShowing(el: NodeImpl): boolean;
|
|
54
|
+
/** :popover-open — https://html.spec.whatwg.org/#selector-popover-open */
|
|
55
|
+
export declare function matchesPopoverOpen(el: NodeImpl): boolean;
|
|
56
|
+
/** https://html.spec.whatwg.org/#check-popover-validity — throws, or returns whether the operation may proceed. */
|
|
57
|
+
export declare function checkPopoverValidity(el: NodeImpl, expectedToBeShowing: boolean, expectedDocument: Document | null): boolean;
|
|
58
|
+
/** https://html.spec.whatwg.org/#topmost-popover-ancestor */
|
|
59
|
+
export declare function topmostPopoverAncestor(newPopoverOrTopLayerElement: NodeImpl, source: NodeImpl | null, _isPopover: boolean): NodeImpl | null;
|
|
60
|
+
/** https://html.spec.whatwg.org/#hide-all-popovers-until */
|
|
61
|
+
export declare function hidePopoversUntil(doc: Document, endpoint: NodeImpl | null, focusPreviousElement: boolean, fireEvents: boolean): void;
|
|
62
|
+
/** https://html.spec.whatwg.org/#show-popover */
|
|
63
|
+
export declare function showPopover(el: NodeImpl, throwExceptions: boolean, source: NodeImpl | null): void;
|
|
64
|
+
/** https://html.spec.whatwg.org/#hide-popover-algorithm */
|
|
65
|
+
export declare function hidePopover(el: NodeImpl, focusPreviousElement: boolean, fireEvents: boolean, throwExceptions: boolean, source: NodeImpl | null): void;
|
|
66
|
+
export declare function setTopLayerFocusHooks(focus: (el: NodeImpl) => void, autofocusDelegate: (el: NodeImpl) => NodeImpl | null): void;
|
|
67
|
+
export declare function setTopLayerDialogHooks(focusing: (el: NodeImpl) => void, lightDismiss: (doc: Document, target: NodeImpl, type: string) => void): void;
|
|
68
|
+
/** Popover part of the HTML element removing steps (https://html.spec.whatwg.org/#the-popover-attribute:html-element-removing-steps). */
|
|
69
|
+
export declare function topLayerRemovingSteps(el: NodeImpl): void;
|
|
70
|
+
/** Popover attribute change steps (https://html.spec.whatwg.org/#the-popover-attribute:concept-element-attributes-change-ext). */
|
|
71
|
+
export declare function popoverAttributeChanged(el: NodeImpl, oldValue: string | null, value: string | null): void;
|
|
72
|
+
/** https://html.spec.whatwg.org/#dialog-pointerdown-target accessor for interactive.ts. */
|
|
73
|
+
export declare function dialogPointerdownTarget(doc: Document, value?: NodeImpl | null): NodeImpl | null;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import "./nodes/Node.js";
|
|
2
|
+
import "./html/registry.js";
|
|
3
|
+
export { createWindow, Window, type WindowOptions } from "./window/Window.js";
|
|
4
|
+
export type { CompatProfile } from "./window/compat.js";
|
|
5
|
+
export { setCurrentWindow, currentWindow, currentDocument } from "./window/current.js";
|
|
6
|
+
export { EventTarget } from "./events/EventTarget.js";
|
|
7
|
+
export { Node } from "./nodes/Node.js";
|
|
8
|
+
export { Element } from "./nodes/Element.js";
|
|
9
|
+
export { Document, DOMImplementation, XMLDocument } from "./nodes/Document.js";
|
|
10
|
+
export { Document as HTMLDocument } from "./nodes/Document.js";
|
|
11
|
+
export { DocumentFragment } from "./nodes/DocumentFragment.js";
|
|
12
|
+
export { DocumentType } from "./nodes/DocumentType.js";
|
|
13
|
+
export { CharacterData, Text, CDATASection, Comment, ProcessingInstruction } from "./nodes/CharacterData.js";
|
|
14
|
+
export { Attr } from "./nodes/Attr.js";
|
|
15
|
+
export { ShadowRoot } from "./nodes/ShadowRoot.js";
|
|
16
|
+
export { NodeList } from "./collections/NodeList.js";
|
|
17
|
+
export { HTMLCollection } from "./collections/HTMLCollection.js";
|
|
18
|
+
export { HTMLElement } from "./html/HTMLElement.js";
|
|
19
|
+
export { SVGElement } from "./html/SVGElement.js";
|
|
20
|
+
export * from "./html/index.js";
|
|
21
|
+
export { installGlobals } from "./window/globals.js";
|
|
22
|
+
export { currentWindowOrNull } from "./window/current.js";
|
|
23
|
+
export { Location } from "./window/Location.js";
|
|
24
|
+
export { History } from "./window/History.js";
|
|
25
|
+
export { Navigator, Clipboard, ClipboardItem } from "./window/Navigator.js";
|
|
26
|
+
export { Screen, VisualViewport } from "./window/Screen.js";
|
|
27
|
+
export { Storage } from "./window/Storage.js";
|
|
28
|
+
export { MediaQueryList } from "./window/media.js";
|
|
29
|
+
export { XMLHttpRequest, XMLHttpRequestEventTarget, XMLHttpRequestUpload } from "./window/xhr.js";
|
|
30
|
+
export { FileReader } from "./window/FileReader.js";
|
|
31
|
+
export { FileList } from "./window/FileList.js";
|
|
32
|
+
export { MediaQueryListEvent } from "./window/events.js";
|
|
33
|
+
export { DOMParser, XMLSerializer } from "./window/fallbacks.js";
|
|
34
|
+
export { ResizeObserver, IntersectionObserver } from "./window/observers.js";
|
|
35
|
+
export { DOMPointReadOnly, DOMPoint, DOMRectReadOnly, DOMRect, DOMRectList, DOMMatrixReadOnly, DOMMatrix, type DOMRectInit, } from "./window/geometry.js";
|
|
36
|
+
export { Event } from "./events/Event.js";
|
|
37
|
+
export { UIEvent, FocusEvent, MouseEvent, PointerEvent, WheelEvent, DragEvent, KeyboardEvent, InputEvent, CompositionEvent, TextEvent, Touch, TouchList, TouchEvent, ClipboardEvent, } from "./events/UIEvents.js";
|
|
38
|
+
export { CustomEvent, ErrorEvent, PromiseRejectionEvent, MessageEvent, ProgressEvent, AnimationEvent, TransitionEvent, PopStateEvent, HashChangeEvent, PageTransitionEvent, StorageEvent, SubmitEvent, FormDataEvent, ToggleEvent, BeforeUnloadEvent, CloseEvent, } from "./events/events.js";
|
|
39
|
+
export { DataTransfer, DataTransferItemList, DataTransferItem } from "./events/DataTransfer.js";
|
|
40
|
+
export { HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement, HTMLOptionElement, HTMLOptGroupElement, Option, HTMLButtonElement, HTMLLabelElement, HTMLFieldSetElement, HTMLLegendElement, HTMLOutputElement, HTMLProgressElement, HTMLMeterElement, HTMLDataListElement, HTMLFormElement, ValidityState, FormData, HTMLFormControlsCollection, HTMLOptionsCollection, RadioNodeList, } from "./html/forms/index.js";
|
|
41
|
+
export { DOMTokenList } from "./collections/DOMTokenList.js";
|
|
42
|
+
export { DOMStringMap } from "./collections/DOMStringMap.js";
|
|
43
|
+
export { NamedNodeMap } from "./collections/NamedNodeMap.js";
|
|
44
|
+
export { MutationObserver, type MutationObserverInit, type MutationCallback } from "./observers/MutationObserver.js";
|
|
45
|
+
export { MutationRecord } from "./observers/MutationRecord.js";
|
|
46
|
+
export { AbstractRange, Range, StaticRange, type StaticRangeInit } from "./traversal/Range.js";
|
|
47
|
+
export { Selection } from "./traversal/Selection.js";
|
|
48
|
+
export { NodeFilter, NodeIterator, TreeWalker } from "./traversal/TreeWalker.js";
|
|
49
|
+
import "./selectors/html-predicates.js";
|
|
50
|
+
export { CSSStyleDeclaration, CSSRule, CSSRuleList, CSSGroupingRule, CSSConditionRule, CSSStyleRule, CSSNestedDeclarations, CSSMediaRule, CSSSupportsRule, CSSContainerRule, CSSLayerBlockRule, CSSLayerStatementRule, CSSScopeRule, CSSStartingStyleRule, CSSImportRule, CSSNamespaceRule, CSSFontFaceRule, CSSPageRule, CSSPropertyRule, CSSKeyframesRule, CSSKeyframeRule, StyleSheet, CSSStyleSheet, StyleSheetList, MediaList, CSS, getComputedStyle, } from "./css/index.js";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import "./index.js";
|
|
2
|
+
export * from "./nodes/constants.js";
|
|
3
|
+
export { NodeImpl, AttrRecord } from "./nodes/NodeImpl.js";
|
|
4
|
+
import type { NodeImpl as NodeImplType } from "./nodes/NodeImpl.js";
|
|
5
|
+
export { NodeCache, nodeCache } from "./nodes/cache.js";
|
|
6
|
+
export { derivedCache, peekDerivedCache } from "./nodes/derived.js";
|
|
7
|
+
export { T, tagId, tagName } from "./nodes/tags.js";
|
|
8
|
+
export { nextInTree, nextSkippingChildren, previousInTree, nextElementInTree, firstElementChild, lastElementChild, nextElementSibling, previousElementSibling, treeRoot, isInclusiveAncestor, indexOf, childAt, } from "./nodes/traverse.js";
|
|
9
|
+
export { attr, hasAttr, getAttribute, setAttribute, removeAttribute, classTokens, asciiLowercase, splitOnAsciiWhitespace, isAsciiWhitespace, } from "./nodes/attributes.js";
|
|
10
|
+
export { matches, closest, querySelector, querySelectorAll } from "./selectors/index.js";
|
|
11
|
+
export { serializeChildren, serializeNode } from "./serializer/index.js";
|
|
12
|
+
export { parseFragment } from "./parser/index.js";
|
|
13
|
+
export { windowHooks, type WindowHooks, type MediaFeatureEnvironment } from "./window/hooks.js";
|
|
14
|
+
export { createFileList } from "./window/FileList.js";
|
|
15
|
+
export { evaluateMediaQueryList, mediaEnvironment } from "./window/media.js";
|
|
16
|
+
export { windowInterfaces } from "./window/Window.js";
|
|
17
|
+
export { captureInterfaceBaseline, guardInterfaceDefinitions, restoreInterfaces } from "./window/isolation.js";
|
|
18
|
+
export { COMPAT, COMPAT_PROFILES, DEFAULT_COMPAT, compatExposes, deferredCompatMembers, hiddenGlobals, resolveCompat, type CompatEntry, type CompatProfile, } from "./window/compat.js";
|
|
19
|
+
export { trackGlobalTimers } from "./window/timers.js";
|
|
20
|
+
export { VirtualClock, VirtualTimeout, installClock, clockNow, clockStats, foreignImmediatesPending, skipIdleTime, virtualDate, virtualPerformance, type InstalledClock, type VirtualClockOptions, } from "./window/clock.js";
|
|
21
|
+
export { FAILURE_CHANNEL, SPAN_CHANNEL, describeCall, describeNode, quote, setFailureSnapshot, setNodeDescriber, spanChannel, subscribeTestFailures, tracePromise, traceSync, tracing, type SpanContext, } from "./trace.js";
|
|
22
|
+
export { dispatch, getCurrentEvent, retarget, nodeGetTheParent, setAssignedSlotLookup } from "./events/dispatch.js";
|
|
23
|
+
export { fireAnEvent, dispatchTrusted, fireSyntheticPointerEvent } from "./events/fire.js";
|
|
24
|
+
export { setTrusted, EventState } from "./events/Event.js";
|
|
25
|
+
export { reportException, setUncaughtExceptionHandler, type UncaughtExceptionHandler } from "./events/report.js";
|
|
26
|
+
export { setNotImplementedHandler, type NotImplementedError, type NotImplementedHandler, } from "./window/not-implemented.js";
|
|
27
|
+
export { createEvent } from "./events/createEvent.js";
|
|
28
|
+
export { installEventHandlers, getEventHandler, setEventHandler, GLOBAL_EVENT_HANDLER_EVENTS, WINDOW_EVENT_HANDLER_EVENTS, type EventHandlersKind, } from "./events/handlers.js";
|
|
29
|
+
export { hasListeners, removeAllEventListeners } from "./events/listeners.js";
|
|
30
|
+
export type { ActivationTarget } from "./events/activation.js";
|
|
31
|
+
export { NodeList } from "./collections/NodeList.js";
|
|
32
|
+
export { HTMLCollection, withNamedProperties, ensureCollectionIndexGetters, type ElementFilter, } from "./collections/HTMLCollection.js";
|
|
33
|
+
export { indexGetterTable, ensureIndexGetters, type IndexGetterTable } from "./collections/indexed.js";
|
|
34
|
+
export { notifyMutationObservers, activeObservers } from "./observers/queue.js";
|
|
35
|
+
export { compareBoundaryPoints, nodeLength } from "./traversal/Range.js";
|
|
36
|
+
export { findSlot, assignedNodes, assignedElements, assignManually, findFlattenedSlottables, assignedSlot, } from "./nodes/slots.js";
|
|
37
|
+
export { attachShadowRoot, getElementsByTagName, getElementsByTagNameNS, getElementsByClassName, } from "./nodes/Element.js";
|
|
38
|
+
export { attrNode } from "./nodes/attr-nodes.js";
|
|
39
|
+
export { replaceData, splitText } from "./nodes/character-data.js";
|
|
40
|
+
export { inspectNode } from "./nodes/inspect.js";
|
|
41
|
+
export { validateAndExtract, isValidElementLocalName, isValidNamespacePrefix, isValidDoctypeName, } from "./nodes/names.js";
|
|
42
|
+
export { inputType, inputTypeFromAttr, INPUT_TYPE_NAMES, valueMode, supportsSelectionType, isTextualType, isNumericType, } from "./html/forms/input-type.js";
|
|
43
|
+
export { isDisabled, isEnabled, isMutable, isReadOnly, isReadWrite, hasReadonlyAttribute, isRequired, isOptional, isValid, isInvalid, isInRange, isOutOfRange, isChecked, isIndeterminate, isDefault, isPlaceholderShown, isAutofilled, isTextControl, controlValue, inputChecked, inputIndeterminate, optionSelected, } from "./html/forms/state.js";
|
|
44
|
+
export { formOwner, labeledControl, labelsFor, isLabelable, isListed, isSubmittable, isResettable, isActuallyDisabled, } from "./html/forms/form-associated.js";
|
|
45
|
+
export { listOfOptions } from "./html/forms/collections.js";
|
|
46
|
+
export { implicitSubmission, constructEntryList, defaultButton, isSubmitButton } from "./html/forms/form-submission.js";
|
|
47
|
+
export { isEditable as isEditableControl, supportsSelection, hasUIValue, getUIValue, setUIValue, clearUIValue, getUISelection, setUISelection, setFilesFromUI, setOptionSelectedFromUI, setCheckedFromUI, type UISelection, } from "./html/forms/ui.js";
|
|
48
|
+
export * from "./css/internal.js";
|
|
49
|
+
export { isFACE, faceState } from "./html/forms/face.js";
|
|
50
|
+
export { attrAssociatedElement, attrAssociatedElements, hasExplicitAttrElements } from "./html/aria-reflection.js";
|
|
51
|
+
export * from "./keys.js";
|
|
52
|
+
import type { Element } from "./nodes/Element.js";
|
|
53
|
+
import type { CSSStyleDeclaration } from "./css/CSSStyleDeclaration.js";
|
|
54
|
+
/** A user-installed `getComputedStyle`, bound to its window (called like `window.getComputedStyle(el)`). */
|
|
55
|
+
export type ComputedStyleOverride = (element: Element, pseudoElement?: string) => CSSStyleDeclaration;
|
|
56
|
+
/**
|
|
57
|
+
* The user-replaced `getComputedStyle` of `node`'s window (`ownerDocument.defaultView`), bound
|
|
58
|
+
* to that window, or null when it is @ctrl/dom's own (the prototype method, or the bound copy
|
|
59
|
+
* installGlobals put on a host global) or there is no window / no function.
|
|
60
|
+
*/
|
|
61
|
+
export declare function getComputedStyleOverride(node: NodeImplType): ComputedStyleOverride | null;
|