@siteimprove/alfa-dom 0.114.1 → 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.
- package/CHANGELOG.md +12 -0
- package/README.md +15 -0
- package/dist/h.d.ts +3 -3
- package/dist/index.d.ts +6 -6
- package/dist/jsx-runtime.d.ts +2 -2
- package/dist/jsx.d.ts +1 -1
- package/dist/native.d.ts +1 -1
- package/dist/node/attribute/predicate/has-name.d.ts +1 -1
- package/dist/node/attribute/predicate.d.ts +1 -1
- package/dist/node/attribute.d.ts +5 -5
- package/dist/node/comment.d.ts +1 -1
- package/dist/node/document.d.ts +4 -4
- package/dist/node/element/augment.d.ts +1 -1
- package/dist/node/element/predicate/has-attribute.d.ts +2 -2
- package/dist/node/element/predicate/has-display-size.d.ts +1 -1
- package/dist/node/element/predicate/has-id.d.ts +1 -1
- package/dist/node/element/predicate/has-input-type.d.ts +2 -2
- package/dist/node/element/predicate/has-name.d.ts +1 -1
- package/dist/node/element/predicate/has-namespace.d.ts +2 -2
- package/dist/node/element/predicate/has-tab-index.d.ts +1 -1
- package/dist/node/element/predicate/has-unique-id.d.ts +1 -1
- package/dist/node/element/predicate/index.d.ts +18 -18
- package/dist/node/element/predicate/is-actually-disabled.d.ts +1 -1
- package/dist/node/element/predicate/is-browsing-context-container.d.ts +1 -1
- package/dist/node/element/predicate/is-content.d.ts +2 -2
- package/dist/node/element/predicate/is-document-element.d.ts +1 -1
- package/dist/node/element/predicate/is-draggable.d.ts +1 -1
- package/dist/node/element/predicate/is-editing-host.d.ts +1 -1
- package/dist/node/element/predicate/is-fallback.d.ts +2 -2
- package/dist/node/element/predicate/is-replaced.d.ts +1 -1
- package/dist/node/element/predicate/is-scoped-to.d.ts +1 -1
- package/dist/node/element/predicate/is-suggested-focusable.d.ts +1 -1
- package/dist/node/fragment.d.ts +2 -2
- package/dist/node/index.d.ts +17 -17
- package/dist/node/node.d.ts +1 -1
- package/dist/node/predicate/has-box.d.ts +1 -1
- package/dist/node/predicate/has-child.d.ts +1 -1
- package/dist/node/predicate/has-descendant.d.ts +1 -1
- package/dist/node/predicate/has-inclusive-descendant.d.ts +1 -1
- package/dist/node/predicate/has-text-content.d.ts +1 -1
- package/dist/node/predicate/index.d.ts +6 -6
- package/dist/node/predicate/is-root.d.ts +1 -1
- package/dist/node/query/descendants.d.ts +1 -1
- package/dist/node/query/element-id-map.d.ts +2 -2
- package/dist/node/query/index.d.ts +4 -4
- package/dist/node/shadow.d.ts +4 -4
- package/dist/node/slotable/element.d.ts +11 -11
- package/dist/node/slotable/index.d.ts +4 -4
- package/dist/node/slotable/slot.d.ts +2 -2
- package/dist/node/slotable/slotable.d.ts +2 -2
- package/dist/node/slotable/text.d.ts +3 -3
- package/dist/node/traversal/get-nodes-between.d.ts +1 -1
- package/dist/node/traversal/get-nodes-between.js +1 -1
- package/dist/node/traversal/index.d.ts +1 -1
- package/dist/node/type.d.ts +1 -1
- package/dist/style/block.d.ts +1 -1
- package/dist/style/declaration.d.ts +2 -2
- package/dist/style/index.d.ts +4 -4
- package/dist/style/rule/condition.d.ts +2 -2
- package/dist/style/rule/font-face.d.ts +3 -3
- package/dist/style/rule/grouping.d.ts +2 -2
- package/dist/style/rule/import.d.ts +3 -3
- package/dist/style/rule/index.d.ts +12 -12
- package/dist/style/rule/keyframe.d.ts +3 -3
- package/dist/style/rule/keyframes.d.ts +2 -2
- package/dist/style/rule/layer.d.ts +3 -3
- package/dist/style/rule/media.d.ts +2 -2
- package/dist/style/rule/namespace.d.ts +1 -1
- package/dist/style/rule/page.d.ts +3 -3
- package/dist/style/rule/rule.d.ts +2 -2
- package/dist/style/rule/style.d.ts +3 -3
- package/dist/style/rule/supports.d.ts +2 -2
- package/dist/style/sheet.d.ts +1 -1
- package/package.json +30 -27
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
9
|
+
## 0.114.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- **Fixed:** `getNodesInclusivelyBetween` now again correctly passes `treeOptions` to `lowestCommonAncestor`. ([#2056](https://github.com/Siteimprove/alfa/pull/2056))
|
|
14
|
+
|
|
3
15
|
## 0.114.1
|
|
4
16
|
|
|
5
17
|
### 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.
|
|
4
|
-
import { Attribute, Document, Element, Fragment, type Node, Shadow, Text, Type } from "./node/index.
|
|
5
|
-
import { Block, Declaration, Rule, Sheet } from "./style/index.
|
|
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.
|
|
2
|
-
export * from "./style/index.
|
|
3
|
-
export * from "./node/index.
|
|
4
|
-
export * from "./node/query/index.
|
|
5
|
-
export { h } from "./h.
|
|
6
|
-
export * from "./jsx.
|
|
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
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "./jsx.
|
|
2
|
-
import type { Element } from "./index.
|
|
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
package/dist/native.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./predicate/has-name.
|
|
1
|
+
export * from "./predicate/has-name.ts";
|
|
2
2
|
//# sourceMappingURL=predicate.d.ts.map
|
package/dist/node/attribute.d.ts
CHANGED
|
@@ -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.
|
|
6
|
-
import { BaseNode } from "./node.
|
|
7
|
-
import type { Element } from "./slotable/element.
|
|
8
|
-
import * as predicate from "./attribute/predicate.
|
|
9
|
-
import * as autocomplete from "./attribute/autocomplete.
|
|
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
|
*/
|
package/dist/node/comment.d.ts
CHANGED
package/dist/node/document.d.ts
CHANGED
|
@@ -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.
|
|
8
|
-
import { Sheet } from "../style/sheet.
|
|
9
|
-
import type { Element } from "./slotable/index.
|
|
10
|
-
import type { Node } from "./index.
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import { Predicate } from "@siteimprove/alfa-predicate";
|
|
2
|
-
import type { Attribute } from "../../attribute.
|
|
3
|
-
import type { Element } from "../../slotable/element.
|
|
2
|
+
import type { Attribute } from "../../attribute.ts";
|
|
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.
|
|
3
|
-
import { type InputType } from "../input-type.
|
|
2
|
+
import type { Element } from "../../slotable/element.ts";
|
|
3
|
+
import { type InputType } from "../input-type.ts";
|
|
4
4
|
/**
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Predicate } from "@siteimprove/alfa-predicate";
|
|
2
|
-
import type { Namespace } from "../../../namespace.
|
|
3
|
-
import type { Element } from "../../slotable/element.
|
|
2
|
+
import type { Namespace } from "../../../namespace.ts";
|
|
3
|
+
import type { Element } from "../../slotable/element.ts";
|
|
4
4
|
/**
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from "./has-attribute.
|
|
2
|
-
export * from "./has-display-size.
|
|
3
|
-
export * from "./has-id.
|
|
4
|
-
export * from "./has-input-type.
|
|
5
|
-
export * from "./has-name.
|
|
6
|
-
export * from "./has-namespace.
|
|
7
|
-
export * from "./has-tab-index.
|
|
8
|
-
export * from "./has-unique-id.
|
|
9
|
-
export * from "./is-actually-disabled.
|
|
10
|
-
export * from "./is-browsing-context-container.
|
|
11
|
-
export * from "./is-content.
|
|
12
|
-
export * from "./is-document-element.
|
|
13
|
-
export * from "./is-draggable.
|
|
14
|
-
export * from "./is-editing-host.
|
|
15
|
-
export * from "./is-fallback.
|
|
16
|
-
export * from "./is-replaced.
|
|
17
|
-
export * from "./is-scoped-to.
|
|
18
|
-
export * from "./is-suggested-focusable.
|
|
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.
|
|
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,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.
|
|
3
|
+
import type { Element } from "../../slotable/element.ts";
|
|
4
4
|
import type { Node } from "../../index.js";
|
|
5
|
-
import { BaseNode } from "../../node.
|
|
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,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.
|
|
4
|
-
import type { BaseNode } from "../../node.
|
|
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,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.
|
|
3
|
+
import type { Element } from "../../slotable/element.ts";
|
|
4
4
|
/**
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
package/dist/node/fragment.d.ts
CHANGED
|
@@ -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.
|
|
5
|
-
import type { Node } from "./index.
|
|
4
|
+
import { BaseNode } from "./node.ts";
|
|
5
|
+
import type { Node } from "./index.ts";
|
|
6
6
|
/**
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
package/dist/node/index.d.ts
CHANGED
|
@@ -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.
|
|
5
|
-
import { Attribute } from "./attribute.
|
|
6
|
-
import { Comment } from "./comment.
|
|
7
|
-
import { Document } from "./document.
|
|
8
|
-
import { Shadow } from "./shadow.
|
|
9
|
-
import { Element, Text } from "./slotable/index.
|
|
10
|
-
import { Fragment } from "./fragment.
|
|
11
|
-
import { Type } from "./type.
|
|
12
|
-
import * as predicate from "./predicate/index.
|
|
13
|
-
import * as traversal from "./traversal/index.
|
|
14
|
-
export * from "./attribute.
|
|
15
|
-
export * from "./comment.
|
|
16
|
-
export * from "./document.
|
|
17
|
-
export * from "./shadow.
|
|
18
|
-
export * from "./slotable/index.
|
|
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.
|
|
21
|
-
export * from "./type.
|
|
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
|
/**
|
package/dist/node/node.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
4
|
+
import type { Element, Text } from "../index.ts";
|
|
5
5
|
/**
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./has-box.
|
|
2
|
-
export * from "./has-child.
|
|
3
|
-
export * from "./has-descendant.
|
|
4
|
-
export * from "./has-inclusive-descendant.
|
|
5
|
-
export * from "./has-text-content.
|
|
6
|
-
export * from "./is-root.
|
|
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
|
|
@@ -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.
|
|
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.
|
|
3
|
-
import type { Element } from "../slotable/element.
|
|
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.
|
|
2
|
-
import * as elementIdMap from "./element-id-map.
|
|
3
|
-
import type { Node } from "../index.
|
|
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.
|
|
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;
|
package/dist/node/shadow.d.ts
CHANGED
|
@@ -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.
|
|
7
|
-
import { BaseNode } from "./node.
|
|
8
|
-
import type { Element } from "./slotable/index.
|
|
9
|
-
import type { Node } from "./index.
|
|
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.
|
|
10
|
-
import { BaseNode } from "../node.
|
|
11
|
-
import { Block } from "../../style/index.
|
|
12
|
-
import { Attribute } from "../attribute.
|
|
13
|
-
import { Document } from "../document.
|
|
14
|
-
import { Shadow } from "../shadow.
|
|
15
|
-
import type { Slot } from "./slot.
|
|
16
|
-
import { Slotable } from "./slotable.
|
|
17
|
-
import type { Node } from "../index.
|
|
18
|
-
import type * as helpers from "../element/input-type.
|
|
19
|
-
import * as predicate from "../element/predicate/index.
|
|
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.
|
|
1
|
+
export * from "./element.ts";
|
|
2
2
|
import "./slot.js";
|
|
3
|
-
export * from "./text.
|
|
4
|
-
import { Element } from "./element.
|
|
5
|
-
import { Text } from "./text.
|
|
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.
|
|
3
|
-
import type { Slotable } from "./index.
|
|
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" {
|
|
@@ -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.
|
|
8
|
-
import type { Slot } from "./slot.
|
|
9
|
-
import { Slotable } from "./slotable.
|
|
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.
|
|
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)
|
|
@@ -52,7 +52,7 @@ export function getNodesBetween(node1, node2, includeOptions = { includeFirst: f
|
|
|
52
52
|
*/
|
|
53
53
|
function getNodesInclusivelyBetween(node1, node2, treeOptions) {
|
|
54
54
|
const isFrontier = or(equals(node1), equals(node2));
|
|
55
|
-
return lowestCommonAncestor(node1, node2)
|
|
55
|
+
return lowestCommonAncestor(node1, node2, treeOptions)
|
|
56
56
|
.map((context) => context
|
|
57
57
|
.inclusiveDescendants(treeOptions)
|
|
58
58
|
.skipUntil(isFrontier)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./get-nodes-between.
|
|
1
|
+
export * from "./get-nodes-between.ts";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/type.d.ts
CHANGED
package/dist/style/block.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
6
|
-
import type { Rule } from "./rule/index.
|
|
5
|
+
import type { Element } from "../node/slotable/element.ts";
|
|
6
|
+
import type { Rule } from "./rule/index.ts";
|
|
7
7
|
/**
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
package/dist/style/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./block.
|
|
2
|
-
export * from "./declaration.
|
|
3
|
-
export * from "./rule/index.
|
|
4
|
-
export * from "./sheet.
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import { Trampoline } from "@siteimprove/alfa-trampoline";
|
|
2
|
-
import { Block } from "../block.
|
|
3
|
-
import type { Declaration } from "../declaration.
|
|
4
|
-
import { BaseRule } from "./rule.
|
|
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
|
*/
|
|
@@ -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.
|
|
8
|
-
import type { Sheet } from "../sheet.
|
|
9
|
-
import { ConditionRule } from "./condition.
|
|
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.
|
|
3
|
-
import { FontFaceRule } from "./font-face.
|
|
4
|
-
import { GroupingRule } from "./grouping.
|
|
5
|
-
import { ImportRule } from "./import.
|
|
6
|
-
import { KeyframeRule } from "./keyframe.
|
|
7
|
-
import { KeyframesRule } from "./keyframes.
|
|
8
|
-
import { Layer as LayerRules } from "./layer.
|
|
9
|
-
import { MediaRule } from "./media.
|
|
10
|
-
import { NamespaceRule } from "./namespace.
|
|
11
|
-
import { PageRule } from "./page.
|
|
12
|
-
import { StyleRule } from "./style.
|
|
13
|
-
import { SupportsRule } from "./supports.
|
|
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.
|
|
3
|
-
import type { Declaration } from "../declaration.
|
|
4
|
-
import { BaseRule } from "./rule.
|
|
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,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.
|
|
5
|
-
import { BaseRule } from "./rule.
|
|
6
|
-
import { GroupingRule } from "./grouping.
|
|
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.
|
|
7
|
-
import { ConditionRule } from "./condition.
|
|
6
|
+
import type { Rule } from "./index.ts";
|
|
7
|
+
import { ConditionRule } from "./condition.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.
|
|
3
|
-
import type { Declaration } from "../declaration.
|
|
4
|
-
import { BaseRule } from "./rule.
|
|
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.
|
|
7
|
-
import type { Rule } from "./index.
|
|
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.
|
|
3
|
-
import type { Declaration } from "../declaration.
|
|
4
|
-
import { BaseRule } from "./rule.
|
|
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.
|
|
5
|
-
import { ConditionRule } from "./condition.
|
|
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
|
/**
|
package/dist/style/sheet.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
39
|
-
"@siteimprove/alfa-cache": "^0.114.
|
|
40
|
-
"@siteimprove/alfa-comparable": "^0.114.
|
|
41
|
-
"@siteimprove/alfa-css": "^0.114.
|
|
42
|
-
"@siteimprove/alfa-css-feature": "^0.114.
|
|
43
|
-
"@siteimprove/alfa-device": "^0.114.
|
|
44
|
-
"@siteimprove/alfa-earl": "^0.114.
|
|
45
|
-
"@siteimprove/alfa-equatable": "^0.114.
|
|
46
|
-
"@siteimprove/alfa-flags": "^0.114.
|
|
47
|
-
"@siteimprove/alfa-iterable": "^0.114.
|
|
48
|
-
"@siteimprove/alfa-json": "^0.114.
|
|
49
|
-
"@siteimprove/alfa-lazy": "^0.114.
|
|
50
|
-
"@siteimprove/alfa-map": "^0.114.
|
|
51
|
-
"@siteimprove/alfa-option": "^0.114.
|
|
52
|
-
"@siteimprove/alfa-parser": "^0.114.
|
|
53
|
-
"@siteimprove/alfa-predicate": "^0.114.
|
|
54
|
-
"@siteimprove/alfa-rectangle": "^0.114.
|
|
55
|
-
"@siteimprove/alfa-refinement": "^0.114.
|
|
56
|
-
"@siteimprove/alfa-result": "^0.114.
|
|
57
|
-
"@siteimprove/alfa-sarif": "^0.114.
|
|
58
|
-
"@siteimprove/alfa-sequence": "^0.114.
|
|
59
|
-
"@siteimprove/alfa-slice": "^0.114.
|
|
60
|
-
"@siteimprove/alfa-string": "^0.114.
|
|
61
|
-
"@siteimprove/alfa-trampoline": "^0.114.
|
|
62
|
-
"@siteimprove/alfa-tree": "^0.114.
|
|
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.
|
|
68
|
+
"@siteimprove/alfa-test": "^0.114.3",
|
|
66
69
|
"@types/jsdom": "^28.0.1",
|
|
67
70
|
"jsdom": "^29.0.2"
|
|
68
71
|
},
|