Skip to content

Commit

Permalink
v0.71.0
Browse files Browse the repository at this point in the history
  • Loading branch information
siteimprove-builduser committed Dec 18, 2023
1 parent a6024eb commit 23789a3
Show file tree
Hide file tree
Showing 181 changed files with 1,711 additions and 1,496 deletions.
7 changes: 0 additions & 7 deletions .changeset/few-ravens-shave.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/four-parents-jog.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/pink-walls-remain.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/tiny-eyes-attack.md

This file was deleted.

14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Alfa changelog

## [0.71.0](../../compare/v0.70.0...v0.71.0) (2023-12-18)

### Breaking

- [@siteimprove/alfa-rules](packages/alfa-rules/CHANGELOG.md#0710): Diagnostic `WithAccessibleName` has been renamed to `WithName` and the property `accessibleName` to `name`. ([#1537](https://github.com/Siteimprove/alfa/pull/1537))

- [@siteimprove/alfa-cascade](packages/alfa-cascade/CHANGELOG.md#0710): `RuleTree.add` and `RuleTree.Node.add` have been made internal. ([#1534](https://github.com/Siteimprove/alfa/pull/1534))

- [@siteimprove/alfa-cascade](packages/alfa-cascade/CHANGELOG.md#0710): `Cascade.get()` now returns a `RuleTree.Node` instead of an `Option`. ([#1534](https://github.com/Siteimprove/alfa/pull/1534))

### Added

- [@siteimprove/alfa-selector](packages/alfa-selector/CHANGELOG.md#0710): Selectors now contain a "key selector" which is the leftmost simple selector in a compound one, or the rightmost in a complex one. ([#1534](https://github.com/Siteimprove/alfa/pull/1534))

## [0.70.0](../../compare/v0.69.0...v0.70.0) (2023-12-13)

### Breaking
Expand Down
4 changes: 2 additions & 2 deletions docs/api/alfa-cascade.cascade.get.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**Signature:**

```typescript
get(element: Element, context?: Context, filter?: Option<AncestorFilter>): Option<RuleTree.Node>;
get(element: Element, context?: Context, filter?: Option<AncestorFilter>): RuleTree.Node;
```

## Parameters
Expand All @@ -20,5 +20,5 @@ get(element: Element, context?: Context, filter?: Option<AncestorFilter>): Optio

**Returns:**

Option&lt;[RuleTree.Node](./alfa-cascade.ruletree.node.md)<!-- -->&gt;
[RuleTree.Node](./alfa-cascade.ruletree.node.md)

4 changes: 2 additions & 2 deletions docs/api/alfa-cascade.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

| Class | Description |
| --- | --- |
| [Cascade](./alfa-cascade.cascade.md) | [https://drafts.csswg.org/css-cascade/](https://drafts.csswg.org/css-cascade/) |
| [RuleTree](./alfa-cascade.ruletree.md) | <p>The rule tree is a data structure used for storing the rules that match each element when computing cascade for a document. Rules are stored in order from most to least specific; rules lower in the tree are therefore more specific than rules higher in the tree. Each element gets a pointer to the most specific rule it matched and can then follow pointers up the rule tree to locate decreasingly specific rules that the element also matches. This allows elements that share matched rules to also share a path in the rule tree.</p><p>As an example, consider elements A and B. Element A matches rules <code>div</code>, <code>.foo</code> and <code>.foo[href]</code> whereas element B matches rules <code>div</code>, <code>.foo</code> and <code>.bar</code>. The naïve approach to associating these matched rules with elements would be to associate an array of <code>[&quot;.foo[href]&quot;, &quot;.foo&quot;, &quot;div&quot;]</code> with element A and an array of <code>[&quot;.foo&quot;, &quot;div&quot;]</code> with element B. With the rule tree, we instead start by inserting the matched rules for element A into the tree:</p><p>"div" +-- ".foo" +-- ".foo\[href\]"</p><p>We then associate rule <code>&quot;.foo[href]&quot;</code> with element A and insert the matched rules for element B into the tree:</p><p>"div" +-- ".foo" +-- ".foo\[href\]" +-- ".bar"</p><p>We then associate the rule <code>&quot;.bar&quot;</code> with element B and we're done. Notice how the tree branches at rule <code>&quot;.foo&quot;</code>, allowing the two elements to share the path in the rule tree that they have in common. This approach is conceptually similar to associating arrays of matched rules with elements with the difference being that we use linked lists instead of arrays, allowing us to share parts of the list between elements. This allows for a much more memory efficient way of associating matched rules with elements, in particular for rules that match most elements, such as the universal selector or <code>html</code> and <code>body</code>.</p><p>[http://doc.servo.org/style/rule\_tree/struct.RuleTree.html](http://doc.servo.org/style/rule_tree/struct.RuleTree.html)</p> |
| [Cascade](./alfa-cascade.cascade.md) | [https://drafts.csswg.org/css-cascade-5/](https://drafts.csswg.org/css-cascade-5/) |
| [RuleTree](./alfa-cascade.ruletree.md) | The rule tree is a data structure used for storing the rules that match each element when computing cascade for a document. |

## Namespaces

Expand Down
26 changes: 0 additions & 26 deletions docs/api/alfa-cascade.ruletree.add.md

This file was deleted.

11 changes: 11 additions & 0 deletions docs/api/alfa-cascade.ruletree.item.json.declarations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@siteimprove/alfa-cascade](./alfa-cascade.md) &gt; [RuleTree](./alfa-cascade.ruletree.md) &gt; [Item](./alfa-cascade.ruletree.item.md) &gt; [JSON](./alfa-cascade.ruletree.item.json.md) &gt; [declarations](./alfa-cascade.ruletree.item.json.declarations.md)

## RuleTree.Item.JSON.declarations property

**Signature:**

```typescript
declarations: Array<Declaration.JSON>;
```
20 changes: 20 additions & 0 deletions docs/api/alfa-cascade.ruletree.item.json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@siteimprove/alfa-cascade](./alfa-cascade.md) &gt; [RuleTree](./alfa-cascade.ruletree.md) &gt; [Item](./alfa-cascade.ruletree.item.md) &gt; [JSON](./alfa-cascade.ruletree.item.json.md)

## RuleTree.Item.JSON interface

**Signature:**

```typescript
interface JSON
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [declarations](./alfa-cascade.ruletree.item.json.declarations.md) | | Array&lt;[Declaration.JSON](./alfa-dom.declaration.json.md)<!-- -->&gt; | |
| [rule](./alfa-cascade.ruletree.item.json.rule.md) | | [Rule.JSON](./alfa-dom.rule.json.md) | |
| [selector](./alfa-cascade.ruletree.item.json.selector.md) | | [Selector.JSON](./alfa-selector.selector.json.md) | |

11 changes: 11 additions & 0 deletions docs/api/alfa-cascade.ruletree.item.json.rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@siteimprove/alfa-cascade](./alfa-cascade.md) &gt; [RuleTree](./alfa-cascade.ruletree.md) &gt; [Item](./alfa-cascade.ruletree.item.md) &gt; [JSON](./alfa-cascade.ruletree.item.json.md) &gt; [rule](./alfa-cascade.ruletree.item.json.rule.md)

## RuleTree.Item.JSON.rule property

**Signature:**

```typescript
rule: Rule.JSON;
```
11 changes: 11 additions & 0 deletions docs/api/alfa-cascade.ruletree.item.json.selector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@siteimprove/alfa-cascade](./alfa-cascade.md) &gt; [RuleTree](./alfa-cascade.ruletree.md) &gt; [Item](./alfa-cascade.ruletree.item.md) &gt; [JSON](./alfa-cascade.ruletree.item.json.md) &gt; [selector](./alfa-cascade.ruletree.item.json.selector.md)

## RuleTree.Item.JSON.selector property

**Signature:**

```typescript
selector: Selector.JSON;
```
18 changes: 18 additions & 0 deletions docs/api/alfa-cascade.ruletree.item.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@siteimprove/alfa-cascade](./alfa-cascade.md) &gt; [RuleTree](./alfa-cascade.ruletree.md) &gt; [Item](./alfa-cascade.ruletree.item.md)

## RuleTree.Item namespace

**Signature:**

```typescript
namespace Item
```
## Interfaces
| Interface | Description |
| --- | --- |
| [JSON](./alfa-cascade.ruletree.item.json.md) | |
1 change: 1 addition & 0 deletions docs/api/alfa-cascade.ruletree.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export declare namespace RuleTree
| Namespace | Description |
| --- | --- |
| [Item](./alfa-cascade.ruletree.item.md) | |
| [Node](./alfa-cascade.ruletree.node.md) | |
## Type Aliases
Expand Down
26 changes: 0 additions & 26 deletions docs/api/alfa-cascade.ruletree.node.add.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/api/alfa-cascade.ruletree.node.json.declarations.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@siteimprove/alfa-cascade](./alfa-cascade.md) &gt; [RuleTree](./alfa-cascade.ruletree.md) &gt; [Node](./alfa-cascade.ruletree.node.md) &gt; [JSON](./alfa-cascade.ruletree.node.json.md) &gt; [rule](./alfa-cascade.ruletree.node.json.rule.md)
[Home](./index.md) &gt; [@siteimprove/alfa-cascade](./alfa-cascade.md) &gt; [RuleTree](./alfa-cascade.ruletree.md) &gt; [Node](./alfa-cascade.ruletree.node.md) &gt; [JSON](./alfa-cascade.ruletree.node.json.md) &gt; [item](./alfa-cascade.ruletree.node.json.item.md)

## RuleTree.Node.JSON.rule property
## RuleTree.Node.JSON.item property

**Signature:**

```typescript
rule: Rule.JSON;
item: Item.JSON;
```
4 changes: 1 addition & 3 deletions docs/api/alfa-cascade.ruletree.node.json.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,5 @@ interface JSON
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [children](./alfa-cascade.ruletree.node.json.children.md) | | Array&lt;[Node.JSON](./alfa-cascade.ruletree.node.json.md)<!-- -->&gt; | |
| [declarations](./alfa-cascade.ruletree.node.json.declarations.md) | | Array&lt;[Declaration.JSON](./alfa-dom.declaration.json.md)<!-- -->&gt; | |
| [rule](./alfa-cascade.ruletree.node.json.rule.md) | | [Rule.JSON](./alfa-dom.rule.json.md) | |
| [selector](./alfa-cascade.ruletree.node.json.selector.md) | | [Selector.JSON](./alfa-selector.selector.json.md) | |
| [item](./alfa-cascade.ruletree.node.json.item.md) | | [Item.JSON](./alfa-cascade.ruletree.item.json.md) | |

11 changes: 0 additions & 11 deletions docs/api/alfa-cascade.ruletree.node.json.selector.md

This file was deleted.

6 changes: 2 additions & 4 deletions docs/api/alfa-cascade.ruletree.node.of.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
**Signature:**

```typescript
static of(rule: Rule, selector: Selector, declarations: Iterable<Declaration>, children: Array<Node>, parent: Option<Node>): Node;
static of({ rule, selector, declarations }: Item, children: Array<Node>, parent: Option<Node>): Node;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| rule | Rule | |
| selector | Selector | |
| declarations | Iterable&lt;Declaration&gt; | |
| { rule, selector, declarations } | Item | |
| children | Array&lt;[Node](./alfa-cascade.ruletree.node.md)<!-- -->&gt; | |
| parent | Option&lt;[Node](./alfa-cascade.ruletree.node.md)<!-- -->&gt; | |

Expand Down
11 changes: 11 additions & 0 deletions docs/api/alfa-selector.class._key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@siteimprove/alfa-selector](./alfa-selector.md) &gt; [Class](./alfa-selector.class.md) &gt; [\_key](./alfa-selector.class._key.md)

## Class.\_key property

**Signature:**

```typescript
protected readonly _key: Option<Class>;
```
11 changes: 11 additions & 0 deletions docs/api/alfa-selector.complex._key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@siteimprove/alfa-selector](./alfa-selector.md) &gt; [Complex](./alfa-selector.complex.md) &gt; [\_key](./alfa-selector.complex._key.md)

## Complex.\_key property

**Signature:**

```typescript
protected readonly _key: Option<Id | Class | Type>;
```
11 changes: 11 additions & 0 deletions docs/api/alfa-selector.compound._key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@siteimprove/alfa-selector](./alfa-selector.md) &gt; [Compound](./alfa-selector.compound.md) &gt; [\_key](./alfa-selector.compound._key.md)

## Compound.\_key property

**Signature:**

```typescript
protected readonly _key: Option<Id | Class | Type>;
```
11 changes: 11 additions & 0 deletions docs/api/alfa-selector.id._key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@siteimprove/alfa-selector](./alfa-selector.md) &gt; [Id](./alfa-selector.id.md) &gt; [\_key](./alfa-selector.id._key.md)

## Id.\_key property

**Signature:**

```typescript
protected readonly _key: Option<Id>;
```
11 changes: 11 additions & 0 deletions docs/api/alfa-selector.type._key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@siteimprove/alfa-selector](./alfa-selector.md) &gt; [Type](./alfa-selector.type.md) &gt; [\_key](./alfa-selector.type._key.md)

## Type.\_key property

**Signature:**

```typescript
protected readonly _key: Option<Type>;
```
6 changes: 6 additions & 0 deletions docs/api/alfa-style.style.from.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## Style.from() function

Build the style of an element.

**Signature:**

```typescript
Expand All @@ -22,3 +24,7 @@ function from(element: Element, device: Device, context?: Context): Style;

[Style](./alfa-style.style.md)

## Remarks

This gather all style declarations that apply to the element, in decreasing precedence (according to cascade sort order) and delegate the rest of the work to `Style.of`<!-- -->.

2 changes: 1 addition & 1 deletion docs/api/alfa-style.style.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export declare namespace Style
| Function | Description |
| --- | --- |
| [from(element, device, context)](./alfa-style.style.from.md) | |
| [from(element, device, context)](./alfa-style.style.from.md) | Build the style of an element. |
## Interfaces
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@changesets/cli": "^2.26.2",
"@microsoft/api-documenter": "^7.19.9",
"@microsoft/api-extractor": "^7.29.5",
"@siteimprove/alfa-toolchain": "workspace:^0.70.0",
"@siteimprove/alfa-toolchain": "workspace:^0.71.0",
"@types/async": "^3.2.20",
"@types/node": "^20.5.9",
"async": "^3.2.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/alfa-act/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @siteimprove/alfa-act

## 0.71.0

## 0.70.0

## 0.69.0
Expand Down
Loading

0 comments on commit 23789a3

Please sign in to comment.