@siteimprove/alfa-dom 0.114.2 → 0.114.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +15 -0
  3. package/dist/h.d.ts +3 -3
  4. package/dist/index.d.ts +6 -6
  5. package/dist/jsx-runtime.d.ts +2 -2
  6. package/dist/jsx.d.ts +1 -1
  7. package/dist/native.d.ts +1 -1
  8. package/dist/node/attribute/predicate/has-name.d.ts +1 -1
  9. package/dist/node/attribute/predicate.d.ts +1 -1
  10. package/dist/node/attribute.d.ts +5 -5
  11. package/dist/node/comment.d.ts +1 -1
  12. package/dist/node/document.d.ts +4 -4
  13. package/dist/node/element/augment.d.ts +1 -1
  14. package/dist/node/element/predicate/has-attribute.d.ts +2 -2
  15. package/dist/node/element/predicate/has-display-size.d.ts +1 -1
  16. package/dist/node/element/predicate/has-id.d.ts +1 -1
  17. package/dist/node/element/predicate/has-input-type.d.ts +2 -2
  18. package/dist/node/element/predicate/has-name.d.ts +1 -1
  19. package/dist/node/element/predicate/has-namespace.d.ts +2 -2
  20. package/dist/node/element/predicate/has-tab-index.d.ts +1 -1
  21. package/dist/node/element/predicate/has-unique-id.d.ts +1 -1
  22. package/dist/node/element/predicate/index.d.ts +18 -18
  23. package/dist/node/element/predicate/is-actually-disabled.d.ts +1 -1
  24. package/dist/node/element/predicate/is-browsing-context-container.d.ts +1 -1
  25. package/dist/node/element/predicate/is-content.d.ts +2 -2
  26. package/dist/node/element/predicate/is-document-element.d.ts +1 -1
  27. package/dist/node/element/predicate/is-draggable.d.ts +1 -1
  28. package/dist/node/element/predicate/is-editing-host.d.ts +1 -1
  29. package/dist/node/element/predicate/is-fallback.d.ts +2 -2
  30. package/dist/node/element/predicate/is-replaced.d.ts +1 -1
  31. package/dist/node/element/predicate/is-scoped-to.d.ts +1 -1
  32. package/dist/node/element/predicate/is-suggested-focusable.d.ts +1 -1
  33. package/dist/node/fragment.d.ts +2 -2
  34. package/dist/node/index.d.ts +17 -17
  35. package/dist/node/node.d.ts +1 -1
  36. package/dist/node/predicate/has-box.d.ts +1 -1
  37. package/dist/node/predicate/has-child.d.ts +1 -1
  38. package/dist/node/predicate/has-descendant.d.ts +1 -1
  39. package/dist/node/predicate/has-inclusive-descendant.d.ts +1 -1
  40. package/dist/node/predicate/has-text-content.d.ts +1 -1
  41. package/dist/node/predicate/index.d.ts +6 -6
  42. package/dist/node/predicate/is-root.d.ts +1 -1
  43. package/dist/node/query/descendants.d.ts +1 -1
  44. package/dist/node/query/element-id-map.d.ts +2 -2
  45. package/dist/node/query/index.d.ts +4 -4
  46. package/dist/node/shadow.d.ts +4 -4
  47. package/dist/node/slotable/element.d.ts +11 -11
  48. package/dist/node/slotable/index.d.ts +4 -4
  49. package/dist/node/slotable/slot.d.ts +2 -2
  50. package/dist/node/slotable/slotable.d.ts +2 -2
  51. package/dist/node/slotable/text.d.ts +3 -3
  52. package/dist/node/traversal/get-nodes-between.d.ts +1 -1
  53. package/dist/node/traversal/index.d.ts +1 -1
  54. package/dist/node/type.d.ts +1 -1
  55. package/dist/style/block.d.ts +1 -1
  56. package/dist/style/declaration.d.ts +2 -2
  57. package/dist/style/index.d.ts +4 -4
  58. package/dist/style/rule/condition.d.ts +2 -2
  59. package/dist/style/rule/font-face.d.ts +3 -3
  60. package/dist/style/rule/grouping.d.ts +2 -2
  61. package/dist/style/rule/import.d.ts +3 -3
  62. package/dist/style/rule/index.d.ts +12 -12
  63. package/dist/style/rule/keyframe.d.ts +3 -3
  64. package/dist/style/rule/keyframes.d.ts +2 -2
  65. package/dist/style/rule/layer.d.ts +3 -3
  66. package/dist/style/rule/media.d.ts +2 -2
  67. package/dist/style/rule/namespace.d.ts +1 -1
  68. package/dist/style/rule/page.d.ts +3 -3
  69. package/dist/style/rule/rule.d.ts +2 -2
  70. package/dist/style/rule/style.d.ts +3 -3
  71. package/dist/style/rule/supports.d.ts +2 -2
  72. package/dist/style/sheet.d.ts +1 -1
  73. package/package.json +30 -27
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @siteimprove/alfa-dom
2
2
 
3
+ ## 0.114.3
4
+
5
+ ### Patch Changes
6
+
7
+ - **Changed:** Internal overhaul of the code structure with no outside impact. ([`6371d0a`](https://github.com/Siteimprove/alfa/commit/6371d0a1ad09fc5260c05e4b43c90efdfb86b87d))
8
+
3
9
  ## 0.114.2
4
10
 
5
11
  ### Patch Changes
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # Alfa DOM
2
+
3
+ Implementation of the DOM and CSSOM specifications.
4
+
5
+ ## Test specificities
6
+
7
+ Because this is the package that defines Alfa's custom JSX transformation, the tests that use JSX syntax need to do some magic.
8
+
9
+ From other packages, setting `jsxImportSource: "@siteimprove/alfa-dom"` in the `compilerOptions` of the `tsconfig.json` file is enough to make the tests work.
10
+
11
+ However, this points to the **compiled** version of the JSX transformation (in the `dist` directory). This means that the resulting `Element`, … will be from the classes defined there. Which, in turns, means that if we point the test files to the **uncomplied** `src` directory, Vitest will make its own compilation resulting in **different** `Element`, … classes and breaking every `instanceof`, … checks (used, notably, in the `isElement`, … guards).
12
+
13
+ It seems that it is not possible to point the `jsxImportSource` to the `src` directory, which makes sense as Vitest needs a compiled version of it to run during its own compilation process.
14
+
15
+ Hence, the only way to use the same class for both the tests and the JSX transformation is to also have the tests import from `dist`, instead of doing it from `src` as usual; which also means importing from the `.js` compiled files instead of the `.ts` source files.
package/dist/h.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Device } from "@siteimprove/alfa-device";
2
2
  import type { Rectangle } from "@siteimprove/alfa-rectangle";
3
- import { Namespace } from "./namespace.js";
4
- import { Attribute, Document, Element, Fragment, type Node, Shadow, Text, Type } from "./node/index.js";
5
- import { Block, Declaration, Rule, Sheet } from "./style/index.js";
3
+ import { Namespace } from "./namespace.ts";
4
+ import { Attribute, Document, Element, Fragment, type Node, Shadow, Text, Type } from "./node/index.ts";
5
+ import { Block, Declaration, Rule, Sheet } from "./style/index.ts";
6
6
  /**
7
7
  * @public
8
8
  */
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from "./namespace.js";
2
- export * from "./style/index.js";
3
- export * from "./node/index.js";
4
- export * from "./node/query/index.js";
5
- export { h } from "./h.js";
6
- export * from "./jsx.js";
1
+ export * from "./namespace.ts";
2
+ export * from "./style/index.ts";
3
+ export * from "./node/index.ts";
4
+ export * from "./node/query/index.ts";
5
+ export { h } from "./h.ts";
6
+ export * from "./jsx.ts";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx } from "./jsx.js";
2
- import type { Element } from "./index.js";
1
+ import { jsx as _jsx } from "./jsx.ts";
2
+ import type { Element } from "./index.ts";
3
3
  export declare namespace JSX {
4
4
  type Element<N extends string = string> = _jsx.JSX.Element<N>;
5
5
  interface IntrinsicElements extends _jsx.JSX.IntrinsicElements {
package/dist/jsx.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type * as dom from "./index.js";
1
+ import type * as dom from "./index.ts";
2
2
  /**
3
3
  * @public
4
4
  */
package/dist/native.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="dom" preserve="true" />
2
- import type { Attribute, Comment, Document, Element, Node, Text, Type } from "./index.js";
2
+ import type { Attribute, Comment, Document, Element, Node, Text, Type } from "./index.ts";
3
3
  /**
4
4
  * The type of logs.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import type { Refinement } from "@siteimprove/alfa-refinement";
2
- import type { Attribute } from "../../attribute.js";
2
+ import type { Attribute } from "../../attribute.ts";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -1,2 +1,2 @@
1
- export * from "./predicate/has-name.js";
1
+ export * from "./predicate/has-name.ts";
2
2
  //# sourceMappingURL=predicate.d.ts.map
@@ -2,11 +2,11 @@ import { Option } from "@siteimprove/alfa-option";
2
2
  import { Sequence } from "@siteimprove/alfa-sequence";
3
3
  import { Trampoline } from "@siteimprove/alfa-trampoline";
4
4
  import * as json from "@siteimprove/alfa-json";
5
- import { Namespace } from "../namespace.js";
6
- import { BaseNode } from "./node.js";
7
- import type { Element } from "./slotable/element.js";
8
- import * as predicate from "./attribute/predicate.js";
9
- import * as autocomplete from "./attribute/autocomplete.js";
5
+ import { Namespace } from "../namespace.ts";
6
+ import { BaseNode } from "./node.ts";
7
+ import type { Element } from "./slotable/element.ts";
8
+ import * as predicate from "./attribute/predicate.ts";
9
+ import * as autocomplete from "./attribute/autocomplete.ts";
10
10
  /**
11
11
  * @public
12
12
  */
@@ -1,6 +1,6 @@
1
1
  import { Trampoline } from "@siteimprove/alfa-trampoline";
2
2
  import * as json from "@siteimprove/alfa-json";
3
- import { BaseNode } from "./node.js";
3
+ import { BaseNode } from "./node.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -4,10 +4,10 @@ import { Iterable } from "@siteimprove/alfa-iterable";
4
4
  import { Option } from "@siteimprove/alfa-option";
5
5
  import { Trampoline } from "@siteimprove/alfa-trampoline";
6
6
  import * as json from "@siteimprove/alfa-json";
7
- import { BaseNode } from "./node.js";
8
- import { Sheet } from "../style/sheet.js";
9
- import type { Element } from "./slotable/index.js";
10
- import type { Node } from "./index.js";
7
+ import { BaseNode } from "./node.ts";
8
+ import { Sheet } from "../style/sheet.ts";
9
+ import type { Element } from "./slotable/index.ts";
10
+ import type { Node } from "./index.ts";
11
11
  /**
12
12
  * @public
13
13
  */
@@ -1,5 +1,5 @@
1
1
  import { Sequence } from "@siteimprove/alfa-sequence";
2
- import type { InputType } from "./input-type.js";
2
+ import type { InputType } from "./input-type.ts";
3
3
  declare module "../slotable/element.js" {
4
4
  interface Element<N extends string> {
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import { Predicate } from "@siteimprove/alfa-predicate";
2
- import type { Attribute } from "../../attribute.js";
3
- import type { Element } from "../../slotable/element.js";
2
+ import type { Attribute } from "../../attribute.ts";
3
+ import type { Element } from "../../slotable/element.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -1,5 +1,5 @@
1
1
  import type { Predicate } from "@siteimprove/alfa-predicate";
2
- import type { Element } from "../../slotable/element.js";
2
+ import type { Element } from "../../slotable/element.ts";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import { Iterable } from "@siteimprove/alfa-iterable";
2
2
  import { Predicate } from "@siteimprove/alfa-predicate";
3
- import type { Element } from "../../slotable/element.js";
3
+ import type { Element } from "../../slotable/element.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { Predicate } from "@siteimprove/alfa-predicate";
2
- import type { Element } from "../../slotable/element.js";
3
- import { type InputType } from "../input-type.js";
2
+ import type { Element } from "../../slotable/element.ts";
3
+ import { type InputType } from "../input-type.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -1,5 +1,5 @@
1
1
  import type { Refinement } from "@siteimprove/alfa-refinement";
2
- import type { Element } from "../../slotable/element.js";
2
+ import type { Element } from "../../slotable/element.ts";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import { Predicate } from "@siteimprove/alfa-predicate";
2
- import type { Namespace } from "../../../namespace.js";
3
- import type { Element } from "../../slotable/element.js";
2
+ import type { Namespace } from "../../../namespace.ts";
3
+ import type { Element } from "../../slotable/element.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { Array } from "@siteimprove/alfa-array";
2
2
  import type { Predicate } from "@siteimprove/alfa-predicate";
3
- import type { Element } from "../../slotable/element.js";
3
+ import type { Element } from "../../slotable/element.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { Predicate } from "@siteimprove/alfa-predicate";
2
2
  import type { Refinement } from "@siteimprove/alfa-refinement";
3
- import type { Element } from "../../slotable/element.js";
3
+ import type { Element } from "../../slotable/element.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -1,19 +1,19 @@
1
- export * from "./has-attribute.js";
2
- export * from "./has-display-size.js";
3
- export * from "./has-id.js";
4
- export * from "./has-input-type.js";
5
- export * from "./has-name.js";
6
- export * from "./has-namespace.js";
7
- export * from "./has-tab-index.js";
8
- export * from "./has-unique-id.js";
9
- export * from "./is-actually-disabled.js";
10
- export * from "./is-browsing-context-container.js";
11
- export * from "./is-content.js";
12
- export * from "./is-document-element.js";
13
- export * from "./is-draggable.js";
14
- export * from "./is-editing-host.js";
15
- export * from "./is-fallback.js";
16
- export * from "./is-replaced.js";
17
- export * from "./is-scoped-to.js";
18
- export * from "./is-suggested-focusable.js";
1
+ export * from "./has-attribute.ts";
2
+ export * from "./has-display-size.ts";
3
+ export * from "./has-id.ts";
4
+ export * from "./has-input-type.ts";
5
+ export * from "./has-name.ts";
6
+ export * from "./has-namespace.ts";
7
+ export * from "./has-tab-index.ts";
8
+ export * from "./has-unique-id.ts";
9
+ export * from "./is-actually-disabled.ts";
10
+ export * from "./is-browsing-context-container.ts";
11
+ export * from "./is-content.ts";
12
+ export * from "./is-document-element.ts";
13
+ export * from "./is-draggable.ts";
14
+ export * from "./is-editing-host.ts";
15
+ export * from "./is-fallback.ts";
16
+ export * from "./is-replaced.ts";
17
+ export * from "./is-scoped-to.ts";
18
+ export * from "./is-suggested-focusable.ts";
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { Predicate } from "@siteimprove/alfa-predicate";
2
2
  import type { Refinement } from "@siteimprove/alfa-refinement";
3
- import type { Element } from "../../slotable/element.js";
3
+ import type { Element } from "../../slotable/element.ts";
4
4
  /**
5
5
  * {@link https://html.spec.whatwg.org/multipage#concept-element-disabled}
6
6
  *
@@ -1,4 +1,4 @@
1
- import type { Element } from "../../slotable/element.js";
1
+ import type { Element } from "../../slotable/element.ts";
2
2
  /**
3
3
  * {@link https://html.spec.whatwg.org/#browsing-context-container}
4
4
  *
@@ -1,8 +1,8 @@
1
1
  import { Predicate } from "@siteimprove/alfa-predicate";
2
2
  import { Refinement } from "@siteimprove/alfa-refinement";
3
- import type { Element } from "../../slotable/element.js";
3
+ import type { Element } from "../../slotable/element.ts";
4
4
  import type { Node } from "../../index.js";
5
- import { BaseNode } from "../../node.js";
5
+ import { BaseNode } from "../../node.ts";
6
6
  /**
7
7
  * A node is actual content (not just a container) if it has no children,
8
8
  * or if it is a replaced element (assumed to be replaced by actual content).
@@ -1,5 +1,5 @@
1
1
  import { Refinement } from "@siteimprove/alfa-refinement";
2
- import type { Element } from "../../slotable/element.js";
2
+ import type { Element } from "../../slotable/element.ts";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -1,4 +1,4 @@
1
- import type { Element } from "../../slotable/element.js";
1
+ import type { Element } from "../../slotable/element.ts";
2
2
  /**
3
3
  * {@link https://html.spec.whatwg.org/#dom-draggable}
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Element } from "../../slotable/element.js";
1
+ import type { Element } from "../../slotable/element.ts";
2
2
  /**
3
3
  * {@link https://html.spec.whatwg.org/#editing-host}
4
4
  *
@@ -1,7 +1,7 @@
1
1
  import { Predicate } from "@siteimprove/alfa-predicate";
2
2
  import { Refinement } from "@siteimprove/alfa-refinement";
3
- import type { Element } from "../../slotable/element.js";
4
- import type { BaseNode } from "../../node.js";
3
+ import type { Element } from "../../slotable/element.ts";
4
+ import type { BaseNode } from "../../node.ts";
5
5
  /**
6
6
  * Children of <iframe>, <audio>, <video> elements act as fallback content in
7
7
  * legacy user agents.
@@ -1,4 +1,4 @@
1
- import type { Element } from "../../slotable/element.js";
1
+ import type { Element } from "../../slotable/element.ts";
2
2
  /**
3
3
  * {@link https://html.spec.whatwg.org/#replaced-elements}
4
4
  *
@@ -1,6 +1,6 @@
1
1
  import type { Predicate } from "@siteimprove/alfa-predicate";
2
2
  import type { Refinement } from "@siteimprove/alfa-refinement";
3
- import type { Element } from "../../slotable/element.js";
3
+ import type { Element } from "../../slotable/element.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -1,4 +1,4 @@
1
- import type { Element } from "../../slotable/element.js";
1
+ import type { Element } from "../../slotable/element.ts";
2
2
  /**
3
3
  * {@link https://html.spec.whatwg.org/multipage/#tabindex-value}
4
4
  *
@@ -1,8 +1,8 @@
1
1
  import type { Device } from "@siteimprove/alfa-device";
2
2
  import { Iterable } from "@siteimprove/alfa-iterable";
3
3
  import { Trampoline } from "@siteimprove/alfa-trampoline";
4
- import { BaseNode } from "./node.js";
5
- import type { Node } from "./index.js";
4
+ import { BaseNode } from "./node.ts";
5
+ import type { Node } from "./index.ts";
6
6
  /**
7
7
  * @public
8
8
  */
@@ -1,24 +1,24 @@
1
1
  import type { Device } from "@siteimprove/alfa-device";
2
2
  import { Refinement } from "@siteimprove/alfa-refinement";
3
3
  import type { Trampoline } from "@siteimprove/alfa-trampoline";
4
- import { BaseNode as BaseNode } from "./node.js";
5
- import { Attribute } from "./attribute.js";
6
- import { Comment } from "./comment.js";
7
- import { Document } from "./document.js";
8
- import { Shadow } from "./shadow.js";
9
- import { Element, Text } from "./slotable/index.js";
10
- import { Fragment } from "./fragment.js";
11
- import { Type } from "./type.js";
12
- import * as predicate from "./predicate/index.js";
13
- import * as traversal from "./traversal/index.js";
14
- export * from "./attribute.js";
15
- export * from "./comment.js";
16
- export * from "./document.js";
17
- export * from "./shadow.js";
18
- export * from "./slotable/index.js";
4
+ import { BaseNode as BaseNode } from "./node.ts";
5
+ import { Attribute } from "./attribute.ts";
6
+ import { Comment } from "./comment.ts";
7
+ import { Document } from "./document.ts";
8
+ import { Shadow } from "./shadow.ts";
9
+ import { Element, Text } from "./slotable/index.ts";
10
+ import { Fragment } from "./fragment.ts";
11
+ import { Type } from "./type.ts";
12
+ import * as predicate from "./predicate/index.ts";
13
+ import * as traversal from "./traversal/index.ts";
14
+ export * from "./attribute.ts";
15
+ export * from "./comment.ts";
16
+ export * from "./document.ts";
17
+ export * from "./shadow.ts";
18
+ export * from "./slotable/index.ts";
19
19
  import "./element/augment.js";
20
- export * from "./fragment.js";
21
- export * from "./type.js";
20
+ export * from "./fragment.ts";
21
+ export * from "./type.ts";
22
22
  /** @public */
23
23
  export type Node = Attribute | Comment | Document | Element | Fragment | Shadow | Type | Text;
24
24
  /**
@@ -9,7 +9,7 @@ import type * as earl from "@siteimprove/alfa-earl";
9
9
  import * as json from "@siteimprove/alfa-json";
10
10
  import type * as sarif from "@siteimprove/alfa-sarif";
11
11
  import * as tree from "@siteimprove/alfa-tree";
12
- import type { Element, Node } from "./index.js";
12
+ import type { Element, Node } from "./index.ts";
13
13
  /**
14
14
  * @public
15
15
  */
@@ -1,7 +1,7 @@
1
1
  import type { Device } from "@siteimprove/alfa-device";
2
2
  import type { Predicate } from "@siteimprove/alfa-predicate";
3
3
  import type { Rectangle } from "@siteimprove/alfa-rectangle";
4
- import type { Element, Text } from "../index.js";
4
+ import type { Element, Text } from "../index.ts";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -1,5 +1,5 @@
1
1
  import type { Predicate } from "@siteimprove/alfa-predicate";
2
- import type { Node } from "../index.js";
2
+ import type { Node } from "../index.ts";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import type { Predicate } from "@siteimprove/alfa-predicate";
2
- import type { Node } from "../index.js";
2
+ import type { Node } from "../index.ts";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import type { Predicate } from "@siteimprove/alfa-predicate";
2
- import type { Node } from "../index.js";
2
+ import type { Node } from "../index.ts";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { Predicate } from "@siteimprove/alfa-predicate";
2
- import type { Node } from "../index.js";
2
+ import type { Node } from "../index.ts";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -1,7 +1,7 @@
1
- export * from "./has-box.js";
2
- export * from "./has-child.js";
3
- export * from "./has-descendant.js";
4
- export * from "./has-inclusive-descendant.js";
5
- export * from "./has-text-content.js";
6
- export * from "./is-root.js";
1
+ export * from "./has-box.ts";
2
+ export * from "./has-child.ts";
3
+ export * from "./has-descendant.ts";
4
+ export * from "./has-inclusive-descendant.ts";
5
+ export * from "./has-text-content.ts";
6
+ export * from "./is-root.ts";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { Predicate } from "@siteimprove/alfa-predicate";
2
- import type { Node } from "../index.js";
2
+ import type { Node } from "../index.ts";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -2,7 +2,7 @@ import type { Predicate } from "@siteimprove/alfa-predicate";
2
2
  import type { Refinement } from "@siteimprove/alfa-refinement";
3
3
  import { Sequence } from "@siteimprove/alfa-sequence";
4
4
  import type { Node } from "../index.js";
5
- import { Element, Text } from "../slotable/index.js";
5
+ import { Element, Text } from "../slotable/index.ts";
6
6
  /**
7
7
  * Get all descendants of a node that satisfy a given refinement.
8
8
  *
@@ -1,6 +1,6 @@
1
1
  import { Map } from "@siteimprove/alfa-map";
2
- import type { Node } from "../index.js";
3
- import type { Element } from "../slotable/element.js";
2
+ import type { Node } from "../index.ts";
3
+ import type { Element } from "../slotable/element.ts";
4
4
  /**
5
5
  * Returns a map from id to elements, in the subtree rooted at a given node.
6
6
  *
@@ -1,12 +1,12 @@
1
- import * as descendants from "./descendants.js";
2
- import * as elementIdMap from "./element-id-map.js";
3
- import type { Node } from "../index.js";
1
+ import * as descendants from "./descendants.ts";
2
+ import * as elementIdMap from "./element-id-map.ts";
3
+ import type { Node } from "../index.ts";
4
4
  /**
5
5
  * @public
6
6
  */
7
7
  export declare namespace Query {
8
8
  const getDescendants: typeof descendants.getDescendants;
9
- const getElementDescendants: (node: Node, options?: Node.Traversal) => import("@siteimprove/alfa-sequence").Sequence<import("../index.js").Element<string>>;
9
+ const getElementDescendants: (node: Node, options?: Node.Traversal) => import("@siteimprove/alfa-sequence").Sequence<import("../index.ts").Element<string>>;
10
10
  const getInclusiveElementDescendants: typeof descendants.getInclusiveElementDescendants;
11
11
  const getTextDescendants: typeof descendants.getTextDescendants;
12
12
  const getElementIdMap: typeof elementIdMap.getElementIdMap;
@@ -3,10 +3,10 @@ import { Trampoline } from "@siteimprove/alfa-trampoline";
3
3
  import type { Device } from "@siteimprove/alfa-device";
4
4
  import { Iterable } from "@siteimprove/alfa-iterable";
5
5
  import * as json from "@siteimprove/alfa-json";
6
- import { Sheet } from "../style/sheet.js";
7
- import { BaseNode } from "./node.js";
8
- import type { Element } from "./slotable/index.js";
9
- import type { Node } from "./index.js";
6
+ import { Sheet } from "../style/sheet.ts";
7
+ import { BaseNode } from "./node.ts";
8
+ import type { Element } from "./slotable/index.ts";
9
+ import type { Node } from "./index.ts";
10
10
  /**
11
11
  * @public
12
12
  */
@@ -6,17 +6,17 @@ import { Rectangle } from "@siteimprove/alfa-rectangle";
6
6
  import { Sequence } from "@siteimprove/alfa-sequence";
7
7
  import { Trampoline } from "@siteimprove/alfa-trampoline";
8
8
  import * as json from "@siteimprove/alfa-json";
9
- import type { Namespace } from "../../namespace.js";
10
- import { BaseNode } from "../node.js";
11
- import { Block } from "../../style/index.js";
12
- import { Attribute } from "../attribute.js";
13
- import { Document } from "../document.js";
14
- import { Shadow } from "../shadow.js";
15
- import type { Slot } from "./slot.js";
16
- import { Slotable } from "./slotable.js";
17
- import type { Node } from "../index.js";
18
- import type * as helpers from "../element/input-type.js";
19
- import * as predicate from "../element/predicate/index.js";
9
+ import type { Namespace } from "../../namespace.ts";
10
+ import { BaseNode } from "../node.ts";
11
+ import { Block } from "../../style/index.ts";
12
+ import { Attribute } from "../attribute.ts";
13
+ import { Document } from "../document.ts";
14
+ import { Shadow } from "../shadow.ts";
15
+ import type { Slot } from "./slot.ts";
16
+ import { Slotable } from "./slotable.ts";
17
+ import type { Node } from "../index.ts";
18
+ import type * as helpers from "../element/input-type.ts";
19
+ import * as predicate from "../element/predicate/index.ts";
20
20
  /**
21
21
  * @public
22
22
  */
@@ -1,8 +1,8 @@
1
- export * from "./element.js";
1
+ export * from "./element.ts";
2
2
  import "./slot.js";
3
- export * from "./text.js";
4
- import { Element } from "./element.js";
5
- import { Text } from "./text.js";
3
+ export * from "./text.ts";
4
+ import { Element } from "./element.ts";
5
+ import { Text } from "./text.ts";
6
6
  /** @public */
7
7
  export type Slotable = Element | Text;
8
8
  /** @public */
@@ -1,6 +1,6 @@
1
1
  import { Iterable } from "@siteimprove/alfa-iterable";
2
- import { Element } from "./element.js";
3
- import type { Slotable } from "./index.js";
2
+ import { Element } from "./element.ts";
3
+ import type { Slotable } from "./index.ts";
4
4
  /** @public */
5
5
  export type Slot = Element<"slot">;
6
6
  declare module "./element.js" {
@@ -1,6 +1,6 @@
1
1
  import type { Option } from "@siteimprove/alfa-option";
2
- import { BaseNode } from "../node.js";
3
- import type { Slot } from "./slot.js";
2
+ import { BaseNode } from "../node.ts";
3
+ import type { Slot } from "./slot.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -4,9 +4,9 @@ import { Predicate } from "@siteimprove/alfa-predicate";
4
4
  import { Rectangle } from "@siteimprove/alfa-rectangle";
5
5
  import { Trampoline } from "@siteimprove/alfa-trampoline";
6
6
  import * as json from "@siteimprove/alfa-json";
7
- import { BaseNode } from "../node.js";
8
- import type { Slot } from "./slot.js";
9
- import { Slotable } from "./slotable.js";
7
+ import { BaseNode } from "../node.ts";
8
+ import type { Slot } from "./slot.ts";
9
+ import { Slotable } from "./slotable.ts";
10
10
  /**
11
11
  * @public
12
12
  */
@@ -1,5 +1,5 @@
1
1
  import { Sequence } from "@siteimprove/alfa-sequence";
2
- import type { Node } from "../index.js";
2
+ import type { Node } from "../index.ts";
3
3
  /**
4
4
  * Get content between two nodes. The relative order of the nodes is unknown.
5
5
  * Options let it choose whether the first or second node (in tree order)
@@ -1,2 +1,2 @@
1
- export * from "./get-nodes-between.js";
1
+ export * from "./get-nodes-between.ts";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { Option } from "@siteimprove/alfa-option";
2
2
  import { Trampoline } from "@siteimprove/alfa-trampoline";
3
3
  import * as json from "@siteimprove/alfa-json";
4
- import { BaseNode } from "./node.js";
4
+ import { BaseNode } from "./node.ts";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -3,7 +3,7 @@ import { Iterable } from "@siteimprove/alfa-iterable";
3
3
  import type { Serializable } from "@siteimprove/alfa-json";
4
4
  import { Option } from "@siteimprove/alfa-option";
5
5
  import type { Predicate } from "@siteimprove/alfa-predicate";
6
- import { Declaration } from "./declaration.js";
6
+ import { Declaration } from "./declaration.ts";
7
7
  /**
8
8
  * @public
9
9
  */
@@ -2,8 +2,8 @@ import type { Equatable } from "@siteimprove/alfa-equatable";
2
2
  import type { Serializable } from "@siteimprove/alfa-json";
3
3
  import { Option } from "@siteimprove/alfa-option";
4
4
  import type * as json from "@siteimprove/alfa-json";
5
- import type { Element } from "../node/slotable/element.js";
6
- import type { Rule } from "./rule/index.js";
5
+ import type { Element } from "../node/slotable/element.ts";
6
+ import type { Rule } from "./rule/index.ts";
7
7
  /**
8
8
  * @public
9
9
  */
@@ -1,5 +1,5 @@
1
- export * from "./block.js";
2
- export * from "./declaration.js";
3
- export * from "./rule/index.js";
4
- export * from "./sheet.js";
1
+ export * from "./block.ts";
2
+ export * from "./declaration.ts";
3
+ export * from "./rule/index.ts";
4
+ export * from "./sheet.ts";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import type { Rule } from "./index.js";
2
- import { GroupingRule } from "./grouping.js";
1
+ import type { Rule } from "./index.ts";
2
+ import { GroupingRule } from "./grouping.ts";
3
3
  /**
4
4
  * @public
5
5
  */
@@ -1,7 +1,7 @@
1
1
  import { Trampoline } from "@siteimprove/alfa-trampoline";
2
- import { Block } from "../block.js";
3
- import type { Declaration } from "../declaration.js";
4
- import { BaseRule } from "./rule.js";
2
+ import { Block } from "../block.ts";
3
+ import type { Declaration } from "../declaration.ts";
4
+ import { BaseRule } from "./rule.ts";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -1,6 +1,6 @@
1
1
  import { Array } from "@siteimprove/alfa-array";
2
- import type { Rule } from "./index.js";
3
- import { BaseRule } from "./rule.js";
2
+ import type { Rule } from "./index.ts";
3
+ import { BaseRule } from "./rule.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -4,9 +4,9 @@ import { Iterable } from "@siteimprove/alfa-iterable";
4
4
  import { Option } from "@siteimprove/alfa-option";
5
5
  import { Predicate } from "@siteimprove/alfa-predicate";
6
6
  import { Trampoline } from "@siteimprove/alfa-trampoline";
7
- import type { Rule } from "./index.js";
8
- import type { Sheet } from "../sheet.js";
9
- import { ConditionRule } from "./condition.js";
7
+ import type { Rule } from "./index.ts";
8
+ import type { Sheet } from "../sheet.ts";
9
+ import { ConditionRule } from "./condition.ts";
10
10
  /**
11
11
  * @public
12
12
  */
@@ -1,16 +1,16 @@
1
1
  import type { Trampoline } from "@siteimprove/alfa-trampoline";
2
- import type { Sheet } from "../sheet.js";
3
- import { FontFaceRule } from "./font-face.js";
4
- import { GroupingRule } from "./grouping.js";
5
- import { ImportRule } from "./import.js";
6
- import { KeyframeRule } from "./keyframe.js";
7
- import { KeyframesRule } from "./keyframes.js";
8
- import { Layer as LayerRules } from "./layer.js";
9
- import { MediaRule } from "./media.js";
10
- import { NamespaceRule } from "./namespace.js";
11
- import { PageRule } from "./page.js";
12
- import { StyleRule } from "./style.js";
13
- import { SupportsRule } from "./supports.js";
2
+ import type { Sheet } from "../sheet.ts";
3
+ import { FontFaceRule } from "./font-face.ts";
4
+ import { GroupingRule } from "./grouping.ts";
5
+ import { ImportRule } from "./import.ts";
6
+ import { KeyframeRule } from "./keyframe.ts";
7
+ import { KeyframesRule } from "./keyframes.ts";
8
+ import { Layer as LayerRules } from "./layer.ts";
9
+ import { MediaRule } from "./media.ts";
10
+ import { NamespaceRule } from "./namespace.ts";
11
+ import { PageRule } from "./page.ts";
12
+ import { StyleRule } from "./style.ts";
13
+ import { SupportsRule } from "./supports.ts";
14
14
  /**
15
15
  * @public
16
16
  */
@@ -1,7 +1,7 @@
1
1
  import { Trampoline } from "@siteimprove/alfa-trampoline";
2
- import { Block } from "../block.js";
3
- import type { Declaration } from "../declaration.js";
4
- import { BaseRule } from "./rule.js";
2
+ import { Block } from "../block.ts";
3
+ import type { Declaration } from "../declaration.ts";
4
+ import { BaseRule } from "./rule.ts";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -1,6 +1,6 @@
1
1
  import { Trampoline } from "@siteimprove/alfa-trampoline";
2
- import type { Rule } from "./index.js";
3
- import { GroupingRule } from "./grouping.js";
2
+ import type { Rule } from "./index.ts";
3
+ import { GroupingRule } from "./grouping.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -1,9 +1,9 @@
1
1
  import { Array } from "@siteimprove/alfa-array";
2
2
  import { Option } from "@siteimprove/alfa-option";
3
3
  import { Trampoline } from "@siteimprove/alfa-trampoline";
4
- import type { Rule } from "./index.js";
5
- import { BaseRule } from "./rule.js";
6
- import { GroupingRule } from "./grouping.js";
4
+ import type { Rule } from "./index.ts";
5
+ import { BaseRule } from "./rule.ts";
6
+ import { GroupingRule } from "./grouping.ts";
7
7
  /**
8
8
  * Model for CSS layers
9
9
  *
@@ -3,8 +3,8 @@ import type { Device } from "@siteimprove/alfa-device";
3
3
  import type { Iterable } from "@siteimprove/alfa-iterable";
4
4
  import type { Predicate } from "@siteimprove/alfa-predicate";
5
5
  import { Trampoline } from "@siteimprove/alfa-trampoline";
6
- import type { Rule } from "./index.js";
7
- import { ConditionRule } from "./condition.js";
6
+ import type { Rule } from "./index.ts";
7
+ import { ConditionRule } from "./condition.ts";
8
8
  /**
9
9
  * @public
10
10
  */
@@ -1,6 +1,6 @@
1
1
  import { Option } from "@siteimprove/alfa-option";
2
2
  import { Trampoline } from "@siteimprove/alfa-trampoline";
3
- import { BaseRule } from "./rule.js";
3
+ import { BaseRule } from "./rule.ts";
4
4
  /**
5
5
  * @public
6
6
  */
@@ -1,7 +1,7 @@
1
1
  import { Trampoline } from "@siteimprove/alfa-trampoline";
2
- import { Block } from "../block.js";
3
- import type { Declaration } from "../declaration.js";
4
- import { BaseRule } from "./rule.js";
2
+ import { Block } from "../block.ts";
3
+ import type { Declaration } from "../declaration.ts";
4
+ import { BaseRule } from "./rule.ts";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -3,8 +3,8 @@ import { Iterable } from "@siteimprove/alfa-iterable";
3
3
  import type { Serializable } from "@siteimprove/alfa-json";
4
4
  import { Option } from "@siteimprove/alfa-option";
5
5
  import * as json from "@siteimprove/alfa-json";
6
- import type { Sheet } from "../sheet.js";
7
- import type { Rule } from "./index.js";
6
+ import type { Sheet } from "../sheet.ts";
7
+ import type { Rule } from "./index.ts";
8
8
  /**
9
9
  * @public
10
10
  */
@@ -1,7 +1,7 @@
1
1
  import { Trampoline } from "@siteimprove/alfa-trampoline";
2
- import { Block } from "../block.js";
3
- import type { Declaration } from "../declaration.js";
4
- import { BaseRule } from "./rule.js";
2
+ import { Block } from "../block.ts";
3
+ import type { Declaration } from "../declaration.ts";
4
+ import { BaseRule } from "./rule.ts";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -1,8 +1,8 @@
1
1
  import { Feature } from "@siteimprove/alfa-css-feature";
2
2
  import type { Option } from "@siteimprove/alfa-option";
3
3
  import { Trampoline } from "@siteimprove/alfa-trampoline";
4
- import type { Rule } from "./index.js";
5
- import { ConditionRule } from "./condition.js";
4
+ import type { Rule } from "./index.ts";
5
+ import { ConditionRule } from "./condition.ts";
6
6
  import type { Device } from "@siteimprove/alfa-device";
7
7
  import type { Predicate } from "@siteimprove/alfa-predicate";
8
8
  /**
@@ -2,7 +2,7 @@ import type { Equatable } from "@siteimprove/alfa-equatable";
2
2
  import type { Serializable } from "@siteimprove/alfa-json";
3
3
  import { Option } from "@siteimprove/alfa-option";
4
4
  import type * as json from "@siteimprove/alfa-json";
5
- import { Rule } from "./rule/index.js";
5
+ import { Rule } from "./rule/index.ts";
6
6
  /**
7
7
  * @public
8
8
  */
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json.schemastore.org/package",
3
3
  "name": "@siteimprove/alfa-dom",
4
4
  "homepage": "https://alfa.siteimprove.com",
5
- "version": "0.114.2",
5
+ "version": "0.114.3",
6
6
  "license": "MIT",
7
7
  "description": "Implementations of the core DOM and CSSOM node types",
8
8
  "repository": {
@@ -29,40 +29,43 @@
29
29
  "./native": "./dist/native.js",
30
30
  "./native.js": "./dist/native.js"
31
31
  },
32
+ "imports": {
33
+ "@/jsx-dev-runtime": "./src/jsx-runtime.ts"
34
+ },
32
35
  "types": "dist/index.d.ts",
33
36
  "files": [
34
37
  "dist/**/*.js",
35
38
  "dist/**/*.d.ts"
36
39
  ],
37
40
  "dependencies": {
38
- "@siteimprove/alfa-array": "^0.114.2",
39
- "@siteimprove/alfa-cache": "^0.114.2",
40
- "@siteimprove/alfa-comparable": "^0.114.2",
41
- "@siteimprove/alfa-css": "^0.114.2",
42
- "@siteimprove/alfa-css-feature": "^0.114.2",
43
- "@siteimprove/alfa-device": "^0.114.2",
44
- "@siteimprove/alfa-earl": "^0.114.2",
45
- "@siteimprove/alfa-equatable": "^0.114.2",
46
- "@siteimprove/alfa-flags": "^0.114.2",
47
- "@siteimprove/alfa-iterable": "^0.114.2",
48
- "@siteimprove/alfa-json": "^0.114.2",
49
- "@siteimprove/alfa-lazy": "^0.114.2",
50
- "@siteimprove/alfa-map": "^0.114.2",
51
- "@siteimprove/alfa-option": "^0.114.2",
52
- "@siteimprove/alfa-parser": "^0.114.2",
53
- "@siteimprove/alfa-predicate": "^0.114.2",
54
- "@siteimprove/alfa-rectangle": "^0.114.2",
55
- "@siteimprove/alfa-refinement": "^0.114.2",
56
- "@siteimprove/alfa-result": "^0.114.2",
57
- "@siteimprove/alfa-sarif": "^0.114.2",
58
- "@siteimprove/alfa-sequence": "^0.114.2",
59
- "@siteimprove/alfa-slice": "^0.114.2",
60
- "@siteimprove/alfa-string": "^0.114.2",
61
- "@siteimprove/alfa-trampoline": "^0.114.2",
62
- "@siteimprove/alfa-tree": "^0.114.2"
41
+ "@siteimprove/alfa-array": "^0.114.3",
42
+ "@siteimprove/alfa-cache": "^0.114.3",
43
+ "@siteimprove/alfa-comparable": "^0.114.3",
44
+ "@siteimprove/alfa-css": "^0.114.3",
45
+ "@siteimprove/alfa-css-feature": "^0.114.3",
46
+ "@siteimprove/alfa-device": "^0.114.3",
47
+ "@siteimprove/alfa-earl": "^0.114.3",
48
+ "@siteimprove/alfa-equatable": "^0.114.3",
49
+ "@siteimprove/alfa-flags": "^0.114.3",
50
+ "@siteimprove/alfa-iterable": "^0.114.3",
51
+ "@siteimprove/alfa-json": "^0.114.3",
52
+ "@siteimprove/alfa-lazy": "^0.114.3",
53
+ "@siteimprove/alfa-map": "^0.114.3",
54
+ "@siteimprove/alfa-option": "^0.114.3",
55
+ "@siteimprove/alfa-parser": "^0.114.3",
56
+ "@siteimprove/alfa-predicate": "^0.114.3",
57
+ "@siteimprove/alfa-rectangle": "^0.114.3",
58
+ "@siteimprove/alfa-refinement": "^0.114.3",
59
+ "@siteimprove/alfa-result": "^0.114.3",
60
+ "@siteimprove/alfa-sarif": "^0.114.3",
61
+ "@siteimprove/alfa-sequence": "^0.114.3",
62
+ "@siteimprove/alfa-slice": "^0.114.3",
63
+ "@siteimprove/alfa-string": "^0.114.3",
64
+ "@siteimprove/alfa-trampoline": "^0.114.3",
65
+ "@siteimprove/alfa-tree": "^0.114.3"
63
66
  },
64
67
  "devDependencies": {
65
- "@siteimprove/alfa-test": "^0.114.2",
68
+ "@siteimprove/alfa-test": "^0.114.3",
66
69
  "@types/jsdom": "^28.0.1",
67
70
  "jsdom": "^29.0.2"
68
71
  },