@orkestrel/test 0.0.30 → 0.0.32
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/README.md +5 -5
- package/dist/src/browser/index.d.ts +140 -76
- package/dist/src/browser/index.js +445 -386
- package/dist/src/browser/index.js.map +1 -1
- package/dist/src/core/index.cjs +156 -80
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +43 -0
- package/dist/src/core/index.d.ts +43 -0
- package/dist/src/core/index.js +154 -81
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +70 -22
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +32 -0
- package/dist/src/server/index.d.ts +32 -0
- package/dist/src/server/index.js +69 -23
- package/dist/src/server/index.js.map +1 -1
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -109,8 +109,8 @@ const root = resolveRoot(import.meta)
|
|
|
109
109
|
const sources = readInventory(root, ['src/core', 'src/server'], { extensions: ['.ts'] })
|
|
110
110
|
|
|
111
111
|
Object.keys(sources)
|
|
112
|
-
// ['src/core/constants.ts', 'src/core/factories.ts', 'src/core/helpers.ts', 'src/core/index.ts',
|
|
113
|
-
// 'src/core/types.ts', 'src/core/validators.ts', 'src/server/constants.ts',
|
|
112
|
+
// ['src/core/Production.ts', 'src/core/Teardown.ts', 'src/core/constants.ts', 'src/core/factories.ts', 'src/core/helpers.ts', 'src/core/index.ts',
|
|
113
|
+
// 'src/core/types.ts', 'src/core/validators.ts', 'src/server/Loopback.ts', 'src/server/constants.ts',
|
|
114
114
|
// 'src/server/factories.ts', 'src/server/helpers.ts', 'src/server/index.ts',
|
|
115
115
|
// 'src/server/types.ts']
|
|
116
116
|
|
|
@@ -121,21 +121,21 @@ sources['src/core/index.ts']
|
|
|
121
121
|
|
|
122
122
|
// A target is a file or a directory. A named file is read whatever the extension filter says.
|
|
123
123
|
Object.keys(readInventory(root, ['package.json', 'src/core'], { extensions: ['.ts'] }))
|
|
124
|
-
// ['package.json', 'src/core/constants.ts', 'src/core/factories.ts', 'src/core/helpers.ts',
|
|
124
|
+
// ['package.json', 'src/core/Production.ts', 'src/core/Teardown.ts', 'src/core/constants.ts', 'src/core/factories.ts', 'src/core/helpers.ts',
|
|
125
125
|
// 'src/core/index.ts', 'src/core/types.ts', 'src/core/validators.ts']
|
|
126
126
|
|
|
127
127
|
// An `exclude` entry matches whole key segments. A file key drops that file.
|
|
128
128
|
Object.keys(
|
|
129
129
|
readInventory(root, ['src/core'], { extensions: ['.ts'], exclude: ['src/core/index.ts'] }),
|
|
130
130
|
)
|
|
131
|
-
// ['src/core/constants.ts', 'src/core/factories.ts', 'src/core/helpers.ts', 'src/core/types.ts',
|
|
131
|
+
// ['src/core/Production.ts', 'src/core/Teardown.ts', 'src/core/constants.ts', 'src/core/factories.ts', 'src/core/helpers.ts', 'src/core/types.ts',
|
|
132
132
|
// 'src/core/validators.ts']
|
|
133
133
|
|
|
134
134
|
// A directory key prunes its whole subtree.
|
|
135
135
|
Object.keys(
|
|
136
136
|
readInventory(root, ['src'], { extensions: ['.ts'], exclude: ['src/server', 'src/browser'] }),
|
|
137
137
|
)
|
|
138
|
-
// ['src/core/constants.ts', 'src/core/factories.ts', 'src/core/helpers.ts', 'src/core/index.ts',
|
|
138
|
+
// ['src/core/Production.ts', 'src/core/Teardown.ts', 'src/core/constants.ts', 'src/core/factories.ts', 'src/core/helpers.ts', 'src/core/index.ts',
|
|
139
139
|
// 'src/core/types.ts', 'src/core/validators.ts']
|
|
140
140
|
```
|
|
141
141
|
|
|
@@ -97,7 +97,7 @@ export declare interface AnimationResult {
|
|
|
97
97
|
* blendColor([255, 255, 255, 0.5], [0, 0, 0, 1]) // [127.5, 127.5, 127.5, 1]
|
|
98
98
|
* ```
|
|
99
99
|
*/
|
|
100
|
-
export declare function blendColor(front:
|
|
100
|
+
export declare function blendColor(front: RGBA, back: RGBA): RGBA;
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
103
|
* Builds one unmounted element of a known tag, wearing the classes, text, and attributes asked for.
|
|
@@ -240,7 +240,7 @@ export declare function buildEscapes(permitted: string): EscapeFixture;
|
|
|
240
240
|
* assumed. `readBackdrop` takes its floor as an argument rather than reaching for this one, so a
|
|
241
241
|
* measurement over a surface the canvas never shows through names the color it actually sits on.
|
|
242
242
|
*/
|
|
243
|
-
export declare const CANVAS_COLOR:
|
|
243
|
+
export declare const CANVAS_COLOR: RGBA;
|
|
244
244
|
|
|
245
245
|
/**
|
|
246
246
|
* Names the attribute marking the runner's tester pane, and the rule that sizes it, while a frame
|
|
@@ -603,6 +603,18 @@ export declare function collectClippingAncestors(element: Element): readonly Ele
|
|
|
603
603
|
*/
|
|
604
604
|
export declare function collectScrollRegions(root: Element, axis?: 'inline' | 'block'): readonly HTMLElement[];
|
|
605
605
|
|
|
606
|
+
/**
|
|
607
|
+
* Collects an element and the successive hosts of its containing shadow roots.
|
|
608
|
+
*
|
|
609
|
+
* @param element - The element that opens the collected chain.
|
|
610
|
+
* @param root - The root already read by an outer traversal step, or the element's current root.
|
|
611
|
+
* @example
|
|
612
|
+
* ```ts
|
|
613
|
+
* collectShadowHosts(document.body) // [document.body]
|
|
614
|
+
* ```
|
|
615
|
+
*/
|
|
616
|
+
export declare function collectShadowHosts(element: Element, root?: Node): readonly Element[];
|
|
617
|
+
|
|
606
618
|
/**
|
|
607
619
|
* Collects the elements of a region that a forward Tab walk reaches from a starting element.
|
|
608
620
|
*
|
|
@@ -630,16 +642,6 @@ export declare function collectScrollRegions(root: Element, axis?: 'inline' | 'b
|
|
|
630
642
|
*/
|
|
631
643
|
export declare function collectTabStops(root: Element, start: HTMLElement): Promise<readonly HTMLElement[]>;
|
|
632
644
|
|
|
633
|
-
/**
|
|
634
|
-
* Represents one rendered color as straight sRGB channels and its alpha.
|
|
635
|
-
*
|
|
636
|
-
* @remarks
|
|
637
|
-
* The channels run 0–255 and the alpha runs 0–1, which is the shape a computed `rgb()` value already
|
|
638
|
-
* carries. `parseColor` converts the 0–1 channels of `color(srgb …)` onto the same scale, so every
|
|
639
|
-
* color the measurement family passes around is comparable without asking where it came from.
|
|
640
|
-
*/
|
|
641
|
-
export declare type Color = readonly [red: number, green: number, blue: number, alpha: number];
|
|
642
|
-
|
|
643
645
|
/**
|
|
644
646
|
* Sets one field's value and commits it, the way typing and then leaving the field does.
|
|
645
647
|
*
|
|
@@ -774,7 +776,7 @@ export declare interface ContrastFixture {
|
|
|
774
776
|
*/
|
|
775
777
|
export declare interface ContrastOptions {
|
|
776
778
|
/** Holds the opaque color the backdrop walk ends on when nothing above it paints. */
|
|
777
|
-
readonly floor?:
|
|
779
|
+
readonly floor?: RGBA;
|
|
778
780
|
/** Holds the factor, from `0` to `1`, the color's alpha is multiplied by. Default: `1`. */
|
|
779
781
|
readonly opacity?: number;
|
|
780
782
|
}
|
|
@@ -796,7 +798,7 @@ export declare interface ContrastOptions {
|
|
|
796
798
|
* convertA98RGB(0, 0, 0) // [0, 0, 0, 1]
|
|
797
799
|
* ```
|
|
798
800
|
*/
|
|
799
|
-
export declare function convertA98RGB(red: number, green: number, blue: number, alpha?: number):
|
|
801
|
+
export declare function convertA98RGB(red: number, green: number, blue: number, alpha?: number): RGBA;
|
|
800
802
|
|
|
801
803
|
/**
|
|
802
804
|
* Converts encoded Display P3 channels to clipped sRGB paint channels.
|
|
@@ -815,7 +817,7 @@ export declare function convertA98RGB(red: number, green: number, blue: number,
|
|
|
815
817
|
* convertDisplayP3(0, 0, 0) // [0, 0, 0, 1]
|
|
816
818
|
* ```
|
|
817
819
|
*/
|
|
818
|
-
export declare function convertDisplayP3(red: number, green: number, blue: number, alpha?: number):
|
|
820
|
+
export declare function convertDisplayP3(red: number, green: number, blue: number, alpha?: number): RGBA;
|
|
819
821
|
|
|
820
822
|
/**
|
|
821
823
|
* Converts CIE Lab coordinates relative to D50 to clipped sRGB paint channels.
|
|
@@ -834,7 +836,7 @@ export declare function convertDisplayP3(red: number, green: number, blue: numbe
|
|
|
834
836
|
* convertLab(0, 0, 0) // [0, 0, 0, 1]
|
|
835
837
|
* ```
|
|
836
838
|
*/
|
|
837
|
-
export declare function convertLab(lightness: number, a: number, b: number, alpha?: number):
|
|
839
|
+
export declare function convertLab(lightness: number, a: number, b: number, alpha?: number): RGBA;
|
|
838
840
|
|
|
839
841
|
/**
|
|
840
842
|
* Converts linear sRGB channels to encoded, clipped paint channels.
|
|
@@ -853,7 +855,7 @@ export declare function convertLab(lightness: number, a: number, b: number, alph
|
|
|
853
855
|
* convertLinearSRGB(0, 0, 0) // [0, 0, 0, 1]
|
|
854
856
|
* ```
|
|
855
857
|
*/
|
|
856
|
-
export declare function convertLinearSRGB(red: number, green: number, blue: number, alpha?: number):
|
|
858
|
+
export declare function convertLinearSRGB(red: number, green: number, blue: number, alpha?: number): RGBA;
|
|
857
859
|
|
|
858
860
|
/**
|
|
859
861
|
* Converts OKLab coordinates to clipped sRGB paint channels.
|
|
@@ -872,7 +874,7 @@ export declare function convertLinearSRGB(red: number, green: number, blue: numb
|
|
|
872
874
|
* convertOKLab(0, 0, 0) // [0, 0, 0, 1]
|
|
873
875
|
* ```
|
|
874
876
|
*/
|
|
875
|
-
export declare function convertOKLab(lightness: number, a: number, b: number, alpha?: number):
|
|
877
|
+
export declare function convertOKLab(lightness: number, a: number, b: number, alpha?: number): RGBA;
|
|
876
878
|
|
|
877
879
|
/**
|
|
878
880
|
* Converts encoded ProPhoto RGB channels to clipped sRGB paint channels.
|
|
@@ -891,7 +893,7 @@ export declare function convertOKLab(lightness: number, a: number, b: number, al
|
|
|
891
893
|
* convertProPhotoRGB(0, 0, 0) // [0, 0, 0, 1]
|
|
892
894
|
* ```
|
|
893
895
|
*/
|
|
894
|
-
export declare function convertProPhotoRGB(red: number, green: number, blue: number, alpha?: number):
|
|
896
|
+
export declare function convertProPhotoRGB(red: number, green: number, blue: number, alpha?: number): RGBA;
|
|
895
897
|
|
|
896
898
|
/**
|
|
897
899
|
* Converts encoded Rec. 2020 channels to clipped sRGB paint channels.
|
|
@@ -910,7 +912,7 @@ export declare function convertProPhotoRGB(red: number, green: number, blue: num
|
|
|
910
912
|
* convertRec2020(0, 0, 0) // [0, 0, 0, 1]
|
|
911
913
|
* ```
|
|
912
914
|
*/
|
|
913
|
-
export declare function convertRec2020(red: number, green: number, blue: number, alpha?: number):
|
|
915
|
+
export declare function convertRec2020(red: number, green: number, blue: number, alpha?: number): RGBA;
|
|
914
916
|
|
|
915
917
|
/**
|
|
916
918
|
* Converts normalized encoded sRGB channels to the clipped paint scale.
|
|
@@ -926,7 +928,7 @@ export declare function convertRec2020(red: number, green: number, blue: number,
|
|
|
926
928
|
* convertSRGB(1.2, -0.1, 0.5) // [255, 0, 127.5, 1]
|
|
927
929
|
* ```
|
|
928
930
|
*/
|
|
929
|
-
export declare function convertSRGB(red: number, green: number, blue: number, alpha?: number):
|
|
931
|
+
export declare function convertSRGB(red: number, green: number, blue: number, alpha?: number): RGBA;
|
|
930
932
|
|
|
931
933
|
/**
|
|
932
934
|
* Converts D50 XYZ coordinates to clipped sRGB paint channels.
|
|
@@ -945,7 +947,7 @@ export declare function convertSRGB(red: number, green: number, blue: number, al
|
|
|
945
947
|
* convertXYZD50(0, 0, 0) // [0, 0, 0, 1]
|
|
946
948
|
* ```
|
|
947
949
|
*/
|
|
948
|
-
export declare function convertXYZD50(x: number, y: number, z: number, alpha?: number):
|
|
950
|
+
export declare function convertXYZD50(x: number, y: number, z: number, alpha?: number): RGBA;
|
|
949
951
|
|
|
950
952
|
/**
|
|
951
953
|
* Converts D65 XYZ coordinates to clipped sRGB paint channels.
|
|
@@ -964,7 +966,7 @@ export declare function convertXYZD50(x: number, y: number, z: number, alpha?: n
|
|
|
964
966
|
* convertXYZD65(0, 0, 0) // [0, 0, 0, 1]
|
|
965
967
|
* ```
|
|
966
968
|
*/
|
|
967
|
-
export declare function convertXYZD65(x: number, y: number, z: number, alpha?: number):
|
|
969
|
+
export declare function convertXYZD65(x: number, y: number, z: number, alpha?: number): RGBA;
|
|
968
970
|
|
|
969
971
|
/**
|
|
970
972
|
* Counts the elements a tree holds, descending into open shadow roots and same-origin frames.
|
|
@@ -985,32 +987,6 @@ export declare function convertXYZD65(x: number, y: number, z: number, alpha?: n
|
|
|
985
987
|
*/
|
|
986
988
|
export declare function countElements(root?: Document | ShadowRoot): number;
|
|
987
989
|
|
|
988
|
-
/**
|
|
989
|
-
* Creates one console channel that records every call it receives and hands that call on unchanged.
|
|
990
|
-
*
|
|
991
|
-
* @param name - The channel's name, which prefixes each line it records.
|
|
992
|
-
* @param output - The list each call is recorded into, appended to in place.
|
|
993
|
-
* @param forward - The channel every call is passed on to after it is recorded.
|
|
994
|
-
* @returns A channel carrying the console's own call signature.
|
|
995
|
-
*
|
|
996
|
-
* @remarks
|
|
997
|
-
* One call becomes one line. Every argument of that call is put through `String` and joined with a
|
|
998
|
-
* space, so a call carrying several values reads as the one line the page printed rather than as
|
|
999
|
-
* several entries.
|
|
1000
|
-
*
|
|
1001
|
-
* Nothing is swallowed. The record happens first and `forward` receives the arguments it would have
|
|
1002
|
-
* received, so a page recorded through this prints exactly what it printed without it. The list
|
|
1003
|
-
* belongs to the caller, so a channel writes into whatever it was handed and holds no state of its
|
|
1004
|
-
* own. {@link createJournal} builds one channel per console method over one list.
|
|
1005
|
-
*
|
|
1006
|
-
* @example
|
|
1007
|
-
* ```ts
|
|
1008
|
-
* const output: string[] = []
|
|
1009
|
-
* console.log = createChannel('log', output, console.log)
|
|
1010
|
-
* ```
|
|
1011
|
-
*/
|
|
1012
|
-
export declare function createChannel(name: string, output: string[], forward: (...data: unknown[]) => void): (...data: unknown[]) => void;
|
|
1013
|
-
|
|
1014
990
|
/**
|
|
1015
991
|
* Creates one real drag event carrying a live data transfer, ready to dispatch.
|
|
1016
992
|
*
|
|
@@ -1524,7 +1500,7 @@ export declare function fillAccessible(name: string, text: string): Promise<void
|
|
|
1524
1500
|
* declares no animation under that name.
|
|
1525
1501
|
*
|
|
1526
1502
|
* @remarks
|
|
1527
|
-
* The name is matched exactly, which is where this parts from {@link
|
|
1503
|
+
* The name is matched exactly, which is where this parts from {@link findStyleRule}: a selector is
|
|
1528
1504
|
* compound and a fragment of one is a useful question, and an animation name is one atom that either
|
|
1529
1505
|
* is or is not the one an `animation` declaration references.
|
|
1530
1506
|
*
|
|
@@ -1549,15 +1525,15 @@ export declare function findKeyframes(name: string): CSSKeyframesRule | undefine
|
|
|
1549
1525
|
* another. Assert on this where the subject is the stylesheet, and on `readStyle` where the subject is
|
|
1550
1526
|
* the rendered result.
|
|
1551
1527
|
*
|
|
1552
|
-
* The match is a substring, so `
|
|
1528
|
+
* The match is a substring, so `findStyleRule('.card')` finds `.card`, `.card:hover`, and
|
|
1553
1529
|
* `.panel > .card` alike. Pass more of the selector to narrow it.
|
|
1554
1530
|
*
|
|
1555
1531
|
* @example
|
|
1556
1532
|
* ```ts
|
|
1557
|
-
*
|
|
1533
|
+
* findStyleRule('.card')?.style.getPropertyValue('padding')
|
|
1558
1534
|
* ```
|
|
1559
1535
|
*/
|
|
1560
|
-
export declare function
|
|
1536
|
+
export declare function findStyleRule(selector: string): CSSStyleRule | undefined;
|
|
1561
1537
|
|
|
1562
1538
|
/**
|
|
1563
1539
|
* Bounds consecutive focus landings and the Tab presses budgeted per segmented input.
|
|
@@ -2002,7 +1978,7 @@ export declare interface JournalStep {
|
|
|
2002
1978
|
* matchesColor('red', [0, 0, 255, 1]) // false
|
|
2003
1979
|
* ```
|
|
2004
1980
|
*/
|
|
2005
|
-
export declare function matchesColor(first: string |
|
|
1981
|
+
export declare function matchesColor(first: string | RGBA, second: string | RGBA): boolean;
|
|
2006
1982
|
|
|
2007
1983
|
/**
|
|
2008
1984
|
* Checks whether a landing can carry a requested accessible name without resolving the document.
|
|
@@ -2087,7 +2063,7 @@ export declare function measureContent(): number;
|
|
|
2087
2063
|
* measureContrast([0, 0, 0, 1], [255, 255, 255, 1]) // 21
|
|
2088
2064
|
* ```
|
|
2089
2065
|
*/
|
|
2090
|
-
export declare function measureContrast(front:
|
|
2066
|
+
export declare function measureContrast(front: RGBA, back: RGBA): number;
|
|
2091
2067
|
|
|
2092
2068
|
/**
|
|
2093
2069
|
* Measures one opaque color's WCAG relative luminance.
|
|
@@ -2100,7 +2076,7 @@ export declare function measureContrast(front: Color, back: Color): number;
|
|
|
2100
2076
|
* measureLuminance([255, 255, 255, 1]) // 1
|
|
2101
2077
|
* ```
|
|
2102
2078
|
*/
|
|
2103
|
-
export declare function measureLuminance(color:
|
|
2079
|
+
export declare function measureLuminance(color: RGBA): number;
|
|
2104
2080
|
|
|
2105
2081
|
/**
|
|
2106
2082
|
* Names the tester root's attribute holding the media readings observed before the first stage.
|
|
@@ -2222,7 +2198,7 @@ export declare function parkPointer(): Promise<void>;
|
|
|
2222
2198
|
* parseColor('rebeccapurple') // undefined
|
|
2223
2199
|
* ```
|
|
2224
2200
|
*/
|
|
2225
|
-
export declare function parseColor(value: string):
|
|
2201
|
+
export declare function parseColor(value: string): RGBA | undefined;
|
|
2226
2202
|
|
|
2227
2203
|
/**
|
|
2228
2204
|
* Resolves any CSS color expression to straight sRGB channels, by asking the browser.
|
|
@@ -2277,7 +2253,7 @@ export declare function parseColor(value: string): Color | undefined;
|
|
|
2277
2253
|
* parseCSSColor('var(--ink)', panel) // the token as the panel declares it
|
|
2278
2254
|
* ```
|
|
2279
2255
|
*/
|
|
2280
|
-
export declare function parseCSSColor(value: string, scope?: Element):
|
|
2256
|
+
export declare function parseCSSColor(value: string, scope?: Element): RGBA | undefined;
|
|
2281
2257
|
|
|
2282
2258
|
/**
|
|
2283
2259
|
* Names the tester root's attribute holding the pressed pointer's page coordinates.
|
|
@@ -2474,7 +2450,7 @@ export declare function readAnimations(element: Element): AnimationResult;
|
|
|
2474
2450
|
* readBackdrop(requireValue(container.querySelector('p')), CANVAS_COLOR)
|
|
2475
2451
|
* ```
|
|
2476
2452
|
*/
|
|
2477
|
-
export declare function readBackdrop(element: Element, floor:
|
|
2453
|
+
export declare function readBackdrop(element: Element, floor: RGBA): RGBA;
|
|
2478
2454
|
|
|
2479
2455
|
/**
|
|
2480
2456
|
* Reads the optional disk-digest command the tester page registered.
|
|
@@ -2743,7 +2719,26 @@ export declare function readColorContrast(element: Element, color: string, optio
|
|
|
2743
2719
|
* readContrast(requireValue(container.firstElementChild), CANVAS_COLOR) // 21
|
|
2744
2720
|
* ```
|
|
2745
2721
|
*/
|
|
2746
|
-
export declare function readContrast(element: Element, floor?:
|
|
2722
|
+
export declare function readContrast(element: Element, floor?: RGBA): number;
|
|
2723
|
+
|
|
2724
|
+
/**
|
|
2725
|
+
* Reads the value a resolved control renders.
|
|
2726
|
+
*
|
|
2727
|
+
* @param role - The control's exact ARIA role.
|
|
2728
|
+
* @param name - The control's exact accessible name.
|
|
2729
|
+
* @returns The control's current value.
|
|
2730
|
+
* @throws When the target does not resolve, or resolves to an element that carries no value.
|
|
2731
|
+
*
|
|
2732
|
+
* @remarks
|
|
2733
|
+
* A control's value is a rendered fact a person can read, not internal state, so it is read from
|
|
2734
|
+
* the resolved element rather than from the component that produced it.
|
|
2735
|
+
*
|
|
2736
|
+
* @example
|
|
2737
|
+
* ```ts
|
|
2738
|
+
* readControlValue('spinbutton', 'Runs') // '3'
|
|
2739
|
+
* ```
|
|
2740
|
+
*/
|
|
2741
|
+
export declare function readControlValue(role: string, name: string): string;
|
|
2747
2742
|
|
|
2748
2743
|
/**
|
|
2749
2744
|
* Reads the rendered text of the element that holds focus.
|
|
@@ -2796,6 +2791,16 @@ export declare function readFocus(): string | undefined;
|
|
|
2796
2791
|
*/
|
|
2797
2792
|
export declare function readFrame(path: string): Promise<FrameResult>;
|
|
2798
2793
|
|
|
2794
|
+
/**
|
|
2795
|
+
* Reads a capture subject's height after applying its native scroll clearance.
|
|
2796
|
+
*
|
|
2797
|
+
* @example
|
|
2798
|
+
* ```ts
|
|
2799
|
+
* readFrameHeight({ path: 'frame.png', width: 390, height: 844 }, undefined, 844)
|
|
2800
|
+
* ```
|
|
2801
|
+
*/
|
|
2802
|
+
export declare function readFrameHeight(options: FrameOptions, element: Element | undefined, pane: number): number | undefined;
|
|
2803
|
+
|
|
2799
2804
|
/**
|
|
2800
2805
|
* Reads the topmost element at one element's bounding-box centre.
|
|
2801
2806
|
*
|
|
@@ -2907,7 +2912,7 @@ export declare function readLayerNames(source: CSSStyleSheet | CSSGroupingRule |
|
|
|
2907
2912
|
* readLayers(requireValue(container.querySelector('p')))
|
|
2908
2913
|
* ```
|
|
2909
2914
|
*/
|
|
2910
|
-
export declare function readLayers(element: Element): readonly
|
|
2915
|
+
export declare function readLayers(element: Element): readonly RGBA[];
|
|
2911
2916
|
|
|
2912
2917
|
/**
|
|
2913
2918
|
* Reads the accessible name one element is announced under.
|
|
@@ -3055,6 +3060,17 @@ export declare function readProtocolNode(element: Element): Promise<number>;
|
|
|
3055
3060
|
*/
|
|
3056
3061
|
export declare function readProtocolPoint(element: Element, offset?: ProtocolPoint): ProtocolPoint;
|
|
3057
3062
|
|
|
3063
|
+
/**
|
|
3064
|
+
* Reads the browser provider's DevTools session and its send member.
|
|
3065
|
+
*
|
|
3066
|
+
* @throws Thrown when the provider or member read fails.
|
|
3067
|
+
* @example
|
|
3068
|
+
* ```ts
|
|
3069
|
+
* const [session, send] = readProtocolSession()
|
|
3070
|
+
* ```
|
|
3071
|
+
*/
|
|
3072
|
+
export declare function readProtocolSession(): readonly [unknown, unknown];
|
|
3073
|
+
|
|
3058
3074
|
/**
|
|
3059
3075
|
* Reads the refusal one named target answers with, or nothing when it resolves.
|
|
3060
3076
|
*
|
|
@@ -3215,7 +3231,7 @@ export declare function readRows(root: ParentNode, selector: string): readonly s
|
|
|
3215
3231
|
* The walk is iterative and reads the list it is still appending to, which is what expands a media
|
|
3216
3232
|
* query, a supports block, a layer, and a nested style rule without recursion. Expanding by level
|
|
3217
3233
|
* rather than by depth is why a top-level rule is always met before a rule nested inside an earlier
|
|
3218
|
-
* one; {@link
|
|
3234
|
+
* one; {@link findStyleRule} returns the first match in exactly this order.
|
|
3219
3235
|
*
|
|
3220
3236
|
* The descent reaches a `CSSGroupingRule` and nothing else, and a `@keyframes` rule is not one. The
|
|
3221
3237
|
* `@keyframes` rule itself is collected wherever it sits, and the keyframe rules inside it are not;
|
|
@@ -3259,7 +3275,7 @@ export declare function readRules(): readonly CSSRule[];
|
|
|
3259
3275
|
* const [red, green, blue] = await readShotPixel(figure, 0.5, 0.5)
|
|
3260
3276
|
* ```
|
|
3261
3277
|
*/
|
|
3262
|
-
export declare function readShotPixel(element: Element, x: number, y: number): Promise<
|
|
3278
|
+
export declare function readShotPixel(element: Element, x: number, y: number): Promise<RGBA>;
|
|
3263
3279
|
|
|
3264
3280
|
/**
|
|
3265
3281
|
* Reads the states one element is announced in.
|
|
@@ -3350,23 +3366,30 @@ export declare function readText(element: Element): string;
|
|
|
3350
3366
|
export declare function readToken(element: Element, name: string): string;
|
|
3351
3367
|
|
|
3352
3368
|
/**
|
|
3353
|
-
*
|
|
3369
|
+
* Records every call one console channel receives and hands that call on unchanged.
|
|
3354
3370
|
*
|
|
3355
|
-
* @param
|
|
3356
|
-
* @param
|
|
3357
|
-
* @
|
|
3358
|
-
* @
|
|
3371
|
+
* @param name - The channel's name, which prefixes each line it records.
|
|
3372
|
+
* @param output - The list each call is recorded into, appended to in place.
|
|
3373
|
+
* @param forward - The channel every call is passed on to after it is recorded.
|
|
3374
|
+
* @returns A channel carrying the console's own call signature.
|
|
3359
3375
|
*
|
|
3360
3376
|
* @remarks
|
|
3361
|
-
*
|
|
3362
|
-
*
|
|
3377
|
+
* One call becomes one line. Every argument of that call is put through `String` and joined with a
|
|
3378
|
+
* space, so a call carrying several values reads as the one line the page printed rather than as
|
|
3379
|
+
* several entries.
|
|
3380
|
+
*
|
|
3381
|
+
* Nothing is swallowed. The record happens first and `forward` receives the arguments it would have
|
|
3382
|
+
* received, so a page recorded through this prints exactly what it printed without it. The list
|
|
3383
|
+
* belongs to the caller, so a channel writes into whatever it was handed and holds no state of its
|
|
3384
|
+
* own. {@link createJournal} builds one channel per console method over one list.
|
|
3363
3385
|
*
|
|
3364
3386
|
* @example
|
|
3365
3387
|
* ```ts
|
|
3366
|
-
*
|
|
3388
|
+
* const output: string[] = []
|
|
3389
|
+
* console.log = recordConsole('log', output, console.log)
|
|
3367
3390
|
* ```
|
|
3368
3391
|
*/
|
|
3369
|
-
export declare function
|
|
3392
|
+
export declare function recordConsole(name: string, output: string[], forward: (...data: unknown[]) => void): (...data: unknown[]) => void;
|
|
3370
3393
|
|
|
3371
3394
|
/**
|
|
3372
3395
|
* Restores the media readings observed before the first stage as explicit emulation. With nothing
|
|
@@ -3591,10 +3614,10 @@ export declare function resolveAccessible(role: string, name: string): HTMLEleme
|
|
|
3591
3614
|
* @throws When the named control is absent, unreachable, or ambiguous inside the region.
|
|
3592
3615
|
*
|
|
3593
3616
|
* @remarks
|
|
3594
|
-
* The region's name is matched exactly
|
|
3595
|
-
*
|
|
3596
|
-
*
|
|
3597
|
-
*
|
|
3617
|
+
* The region's name is matched exactly. The control first matches the case-sensitive pattern
|
|
3618
|
+
* from `computeNamePattern`, with hidden subtrees included. Any exact candidates own the result,
|
|
3619
|
+
* including unreachable or ambiguous candidates. Only an empty exact tier selects the loose query.
|
|
3620
|
+
* Both tiers refuse zero reachable candidates and several reachable candidates.
|
|
3598
3621
|
*
|
|
3599
3622
|
* @example
|
|
3600
3623
|
* ```ts
|
|
@@ -3645,6 +3668,16 @@ export declare function resolveFileInput(name: string): HTMLInputElement;
|
|
|
3645
3668
|
*/
|
|
3646
3669
|
export declare function resolveRendered(first: string, second?: string): HTMLElement;
|
|
3647
3670
|
|
|
3671
|
+
/**
|
|
3672
|
+
* Represents one rendered color as straight sRGB channels and its alpha.
|
|
3673
|
+
*
|
|
3674
|
+
* @remarks
|
|
3675
|
+
* The channels run 0–255 and the alpha runs 0–1, which is the shape a computed `rgb()` value already
|
|
3676
|
+
* carries. `parseColor` converts the 0–1 channels of `color(srgb …)` onto the same scale, so every
|
|
3677
|
+
* color the measurement family passes around is comparable without asking where it came from.
|
|
3678
|
+
*/
|
|
3679
|
+
export declare type RGBA = readonly [red: number, green: number, blue: number, alpha: number];
|
|
3680
|
+
|
|
3648
3681
|
/** Names the native input types whose editable segments share one focused element. */
|
|
3649
3682
|
export declare const SEGMENTED_INPUT_TYPES: readonly string[];
|
|
3650
3683
|
|
|
@@ -3745,6 +3778,17 @@ export declare function sendTouch(type: 'touchStart' | 'touchMove' | 'touchEnd'
|
|
|
3745
3778
|
*/
|
|
3746
3779
|
export declare function settleCapture(options?: SettleOptions): Promise<() => void>;
|
|
3747
3780
|
|
|
3781
|
+
/**
|
|
3782
|
+
* Restages a capture until its content extent equals the pane height.
|
|
3783
|
+
*
|
|
3784
|
+
* @remarks The stage limit bounds the recursion; a prepared pane is staged before accepting it.
|
|
3785
|
+
* @example
|
|
3786
|
+
* ```ts
|
|
3787
|
+
* await settleFrame({ path: 'frame.png', width: 390, height: 844 }, undefined, false)
|
|
3788
|
+
* ```
|
|
3789
|
+
*/
|
|
3790
|
+
export declare function settleFrame(options: FrameOptions, element: Element | undefined, prepared: boolean, pane?: number, covered?: number, stage?: number): Promise<void>;
|
|
3791
|
+
|
|
3748
3792
|
/**
|
|
3749
3793
|
* Configures one capture settle: the time bounds of {@link WaitOptions} and whether the pointer
|
|
3750
3794
|
* parks first.
|
|
@@ -3951,6 +3995,16 @@ export declare interface StorageOptions {
|
|
|
3951
3995
|
*/
|
|
3952
3996
|
export declare function supportsSegmentedFocus(element: Element): boolean;
|
|
3953
3997
|
|
|
3998
|
+
/**
|
|
3999
|
+
* Takes a screenshot while temporarily positioning the runner frame around its subject.
|
|
4000
|
+
*
|
|
4001
|
+
* @example
|
|
4002
|
+
* ```ts
|
|
4003
|
+
* const shot = await takeFrameShot({ path: 'frame.png', width: 390, height: 844 }, undefined)
|
|
4004
|
+
* ```
|
|
4005
|
+
*/
|
|
4006
|
+
export declare function takeFrameShot(options: FrameOptions, element: Element | undefined): Promise<FrameShot>;
|
|
4007
|
+
|
|
3954
4008
|
/**
|
|
3955
4009
|
* Taps an element's centre with emulated touch after its box settles.
|
|
3956
4010
|
*
|
|
@@ -4263,6 +4317,16 @@ export declare function walkFocus(stop?: (element: HTMLElement) => boolean): Pro
|
|
|
4263
4317
|
export declare interface WebStorageInterface extends Storage {
|
|
4264
4318
|
/** Grants the reads and the writes the host withheld, and replenishes no quota. */
|
|
4265
4319
|
permit(): void;
|
|
4320
|
+
/** Removes every stored entry when the host permits writes. */
|
|
4321
|
+
clear(): void;
|
|
4322
|
+
/** Reads a stored value when the host permits reads, or returns `null` for an absent key. */
|
|
4323
|
+
getItem(key: string): string | null;
|
|
4324
|
+
/** Reads the key at an insertion-order index when permitted, or returns `null` beyond the store. */
|
|
4325
|
+
key(index: number): string | null;
|
|
4326
|
+
/** Removes a stored entry when the host permits writes, consuming no quota. */
|
|
4327
|
+
removeItem(key: string): void;
|
|
4328
|
+
/** Stores a value when writes are permitted and consumes an accepted write from the quota. */
|
|
4329
|
+
setItem(key: string, value: string): void;
|
|
4266
4330
|
}
|
|
4267
4331
|
|
|
4268
4332
|
export { }
|