Skip to content

Commit 99f2546

Browse files
committed
Merge branch 'main' into hyphenation-properties
2 parents b525723 + 3767bbd commit 99f2546

31 files changed

+1226
-12
lines changed

.changeset/eight-experts-know.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@siteimprove/alfa-css": minor
3+
---
4+
5+
**Added:** `List.some` is now available.

.changeset/five-rocks-join.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@siteimprove/alfa-style": minor
3+
---
4+
5+
**Added:** A new predicate `isFlexOrGridChild` is available.

.changeset/friendly-pots-destroy.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@siteimprove/alfa-device": minor
3+
---
4+
5+
**Added:** `Device.isDevice` is now available.

.changeset/proud-apples-promise.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@siteimprove/alfa-painting-order": minor
3+
---
4+
5+
**Added:** A new package has been added for computing the painting order of HTML elements.

docs/review/api/alfa-css.api.md

+2
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,8 @@ export class List<V extends Value> extends Value<"list", Value.HasCalculation<[V
12981298
// (undocumented)
12991299
get size(): number;
13001300
// (undocumented)
1301+
some(predicate: Predicate<V, [index: number]>): boolean;
1302+
// (undocumented)
13011303
toJSON(): List.JSON<V>;
13021304
// (undocumented)
13031305
toString(): string;

docs/review/api/alfa-device.api.md

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ export namespace Device {
4242
// (undocumented)
4343
export function from(json: JSON): Device;
4444
// (undocumented)
45+
export function isDevice(value: unknown): value is Device;
46+
// (undocumented)
4547
export interface JSON {
4648
// (undocumented)
4749
[key: string]: json.JSON;
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## API Report File for "@siteimprove/alfa-painting-order"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { Array as Array_2 } from '@siteimprove/alfa-array';
8+
import type { Device } from '@siteimprove/alfa-device';
9+
import { Element } from '@siteimprove/alfa-dom';
10+
import type { Equatable } from '@siteimprove/alfa-equatable';
11+
import type { Hash } from '@siteimprove/alfa-hash';
12+
import type { Hashable } from '@siteimprove/alfa-hash';
13+
import { Iterable as Iterable_2 } from '@siteimprove/alfa-iterable';
14+
import * as json from '@siteimprove/alfa-json';
15+
import type { Serializable } from '@siteimprove/alfa-json';
16+
17+
// @public (undocumented)
18+
export class PaintingOrder implements Equatable, Hashable, Serializable<PaintingOrder.JSON> {
19+
protected constructor(elements: Array_2<Element>);
20+
// (undocumented)
21+
get elements(): Iterable_2<Element>;
22+
// (undocumented)
23+
equals(value: this): boolean;
24+
// (undocumented)
25+
equals(value: unknown): value is this;
26+
// (undocumented)
27+
hash(hash: Hash): void;
28+
// (undocumented)
29+
static of(elements: Iterable_2<Element>): PaintingOrder;
30+
// (undocumented)
31+
toJSON(options?: Serializable.Options): PaintingOrder.JSON;
32+
}
33+
34+
// @public (undocumented)
35+
export namespace PaintingOrder {
36+
// (undocumented)
37+
export function isPaintingOrder(value: unknown): value is PaintingOrder;
38+
// (undocumented)
39+
export type JSON = {
40+
[key: string]: json.JSON;
41+
type: "painting-order";
42+
elements: Array_2<Element.JSON>;
43+
};
44+
const from: (this: unknown, root: Element<string>, device: Device) => PaintingOrder;
45+
}
46+
47+
// (No @packageDocumentation comment for this package)
48+
49+
```

docs/review/api/alfa-style.api.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export namespace Shorthands {
349349
readonly border: Shorthand<"border-bottom-color" | "border-bottom-style" | "border-bottom-width" | "border-left-color" | "border-left-style" | "border-left-width" | "border-right-color" | "border-right-style" | "border-right-width" | "border-top-color" | "border-top-style" | "border-top-width">;
350350
readonly "border-width": Shorthand<"border-bottom-width" | "border-left-width" | "border-right-width" | "border-top-width">;
351351
readonly "flex-flow": Shorthand<"flex-direction" | "flex-wrap">;
352-
readonly font: Shorthand<"font-family" | "font-size" | "font-stretch" | "font-style" | "font-variant-caps" | "font-variant-east-asian" | "font-variant-ligatures" | "font-variant-numeric" | "font-variant-position" | "font-weight" | "line-height">;
352+
readonly font: Shorthand<"font-size" | "font-family" | "font-stretch" | "font-style" | "font-variant-caps" | "font-variant-east-asian" | "font-variant-ligatures" | "font-variant-numeric" | "font-variant-position" | "font-weight" | "line-height">;
353353
readonly "font-variant": Shorthand<"font-variant-caps" | "font-variant-east-asian" | "font-variant-ligatures" | "font-variant-numeric">;
354354
readonly "inset-block": Shorthand<"inset-block-end" | "inset-block-start">;
355355
readonly "inset-inline": Shorthand<"inset-inline-end" | "inset-inline-start">;
@@ -440,12 +440,14 @@ export namespace Style {
440440
hasBoxShadow: typeof element.hasBoxShadow, // (undocumented)
441441
hasCascadedStyle: typeof element.hasCascadedStyle, // (undocumented)
442442
hasComputedStyle: typeof element.hasComputedStyle, // (undocumented)
443+
hasInitialComputedStyle: typeof element.hasInitialComputedStyle, // (undocumented)
443444
hasPositioningParent: typeof element.hasPositioningParent, // (undocumented)
444445
hasOutline: typeof element.hasOutline, // (undocumented)
445446
hasSpecifiedStyle: typeof element.hasSpecifiedStyle, // (undocumented)
446447
hasTextDecoration: typeof element.hasTextDecoration, // (undocumented)
447448
hasTransparentBackground: typeof element.hasTransparentBackground, // (undocumented)
448449
hasUsedStyle: typeof element.hasUsedStyle, // (undocumented)
450+
isFlexOrGridChild: typeof element.isFlexOrGridChild, // (undocumented)
449451
isFocusable: typeof element.isFocusable, // (undocumented)
450452
isImportant: typeof element.isImportant, // (undocumented)
451453
isInert: typeof element.isInert, // (undocumented)

packages/alfa-css/src/value/collection/list.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import type { Hash } from "@siteimprove/alfa-hash";
2-
import type { Iterable } from "@siteimprove/alfa-iterable";
2+
import { Iterable } from "@siteimprove/alfa-iterable";
33
import type { Serializable } from "@siteimprove/alfa-json";
44
import type { Mapper } from "@siteimprove/alfa-mapper";
55
import { Parser } from "@siteimprove/alfa-parser";
6+
import type { Predicate } from "@siteimprove/alfa-predicate";
67

78
import { type Parser as CSSParser, Token } from "../../syntax/index.js";
89

@@ -48,6 +49,10 @@ export class List<V extends Value>
4849
return this._values.length;
4950
}
5051

52+
public some(predicate: Predicate<V, [index: number]>) {
53+
return Iterable.some(this._values, predicate);
54+
}
55+
5156
public resolve(
5257
resolver?: Resolvable.Resolver<V>,
5358
): List<Resolvable.Resolved<V>> {

packages/alfa-device/src/device.ts

+4
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,8 @@ export namespace Device {
164164
export function standard(): Device {
165165
return Device.of(Type.Screen, Viewport.standard(), Display.standard());
166166
}
167+
168+
export function isDevice(value: unknown): value is Device {
169+
return value instanceof Device;
170+
}
167171
}

packages/alfa-painting-order/CHANGELOG.md

Whitespace-only changes.
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Alfa painting order
2+
3+
Support for computing painting order of elements.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3+
"extends": "../../../config/api-extractor.json",
4+
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts"
5+
}
+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"$schema": "http://json.schemastore.org/package",
3+
"name": "@siteimprove/alfa-painting-order",
4+
"homepage": "https://alfa.siteimprove.com",
5+
"version": "0.97.0",
6+
"license": "MIT",
7+
"description": "Support for computing painting order of elements.",
8+
"repository": {
9+
"type": "git",
10+
"url": "github:Siteimprove/alfa",
11+
"directory": "packages/alfa-painting-order"
12+
},
13+
"bugs": "https://github.com/siteimprove/alfa/issues",
14+
"engines": {
15+
"node": ">=20.0.0"
16+
},
17+
"type": "module",
18+
"main": "dist/index.js",
19+
"types": "dist/index.d.ts",
20+
"files": [
21+
"dist/**/*.js",
22+
"dist/**/*.d.ts"
23+
],
24+
"dependencies": {
25+
"@siteimprove/alfa-array": "workspace:^",
26+
"@siteimprove/alfa-cache": "workspace:^",
27+
"@siteimprove/alfa-comparable": "workspace:^",
28+
"@siteimprove/alfa-css": "workspace:^",
29+
"@siteimprove/alfa-device": "workspace:^",
30+
"@siteimprove/alfa-dom": "workspace:^",
31+
"@siteimprove/alfa-equatable": "workspace:^",
32+
"@siteimprove/alfa-hash": "workspace:^",
33+
"@siteimprove/alfa-iterable": "workspace:^",
34+
"@siteimprove/alfa-json": "workspace:^",
35+
"@siteimprove/alfa-predicate": "workspace:^",
36+
"@siteimprove/alfa-refinement": "workspace:^",
37+
"@siteimprove/alfa-sequence": "workspace:^",
38+
"@siteimprove/alfa-style": "workspace:^"
39+
},
40+
"devDependencies": {
41+
"@siteimprove/alfa-test": "workspace:^"
42+
},
43+
"publishConfig": {
44+
"access": "public",
45+
"registry": "https://npm.pkg.github.com/"
46+
}
47+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./painting-order.js";

0 commit comments

Comments
 (0)