@orkestrel/test 0.0.31 → 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.
@@ -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: Color, back: Color): Color;
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: 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
@@ -642,16 +642,6 @@ export declare function collectShadowHosts(element: Element, root?: Node): reado
642
642
  */
643
643
  export declare function collectTabStops(root: Element, start: HTMLElement): Promise<readonly HTMLElement[]>;
644
644
 
645
- /**
646
- * Represents one rendered color as straight sRGB channels and its alpha.
647
- *
648
- * @remarks
649
- * The channels run 0–255 and the alpha runs 0–1, which is the shape a computed `rgb()` value already
650
- * carries. `parseColor` converts the 0–1 channels of `color(srgb …)` onto the same scale, so every
651
- * color the measurement family passes around is comparable without asking where it came from.
652
- */
653
- export declare type Color = readonly [red: number, green: number, blue: number, alpha: number];
654
-
655
645
  /**
656
646
  * Sets one field's value and commits it, the way typing and then leaving the field does.
657
647
  *
@@ -786,7 +776,7 @@ export declare interface ContrastFixture {
786
776
  */
787
777
  export declare interface ContrastOptions {
788
778
  /** Holds the opaque color the backdrop walk ends on when nothing above it paints. */
789
- readonly floor?: Color;
779
+ readonly floor?: RGBA;
790
780
  /** Holds the factor, from `0` to `1`, the color's alpha is multiplied by. Default: `1`. */
791
781
  readonly opacity?: number;
792
782
  }
@@ -808,7 +798,7 @@ export declare interface ContrastOptions {
808
798
  * convertA98RGB(0, 0, 0) // [0, 0, 0, 1]
809
799
  * ```
810
800
  */
811
- export declare function convertA98RGB(red: number, green: number, blue: number, alpha?: number): Color;
801
+ export declare function convertA98RGB(red: number, green: number, blue: number, alpha?: number): RGBA;
812
802
 
813
803
  /**
814
804
  * Converts encoded Display P3 channels to clipped sRGB paint channels.
@@ -827,7 +817,7 @@ export declare function convertA98RGB(red: number, green: number, blue: number,
827
817
  * convertDisplayP3(0, 0, 0) // [0, 0, 0, 1]
828
818
  * ```
829
819
  */
830
- export declare function convertDisplayP3(red: number, green: number, blue: number, alpha?: number): Color;
820
+ export declare function convertDisplayP3(red: number, green: number, blue: number, alpha?: number): RGBA;
831
821
 
832
822
  /**
833
823
  * Converts CIE Lab coordinates relative to D50 to clipped sRGB paint channels.
@@ -846,7 +836,7 @@ export declare function convertDisplayP3(red: number, green: number, blue: numbe
846
836
  * convertLab(0, 0, 0) // [0, 0, 0, 1]
847
837
  * ```
848
838
  */
849
- export declare function convertLab(lightness: number, a: number, b: number, alpha?: number): Color;
839
+ export declare function convertLab(lightness: number, a: number, b: number, alpha?: number): RGBA;
850
840
 
851
841
  /**
852
842
  * Converts linear sRGB channels to encoded, clipped paint channels.
@@ -865,7 +855,7 @@ export declare function convertLab(lightness: number, a: number, b: number, alph
865
855
  * convertLinearSRGB(0, 0, 0) // [0, 0, 0, 1]
866
856
  * ```
867
857
  */
868
- export declare function convertLinearSRGB(red: number, green: number, blue: number, alpha?: number): Color;
858
+ export declare function convertLinearSRGB(red: number, green: number, blue: number, alpha?: number): RGBA;
869
859
 
870
860
  /**
871
861
  * Converts OKLab coordinates to clipped sRGB paint channels.
@@ -884,7 +874,7 @@ export declare function convertLinearSRGB(red: number, green: number, blue: numb
884
874
  * convertOKLab(0, 0, 0) // [0, 0, 0, 1]
885
875
  * ```
886
876
  */
887
- export declare function convertOKLab(lightness: number, a: number, b: number, alpha?: number): Color;
877
+ export declare function convertOKLab(lightness: number, a: number, b: number, alpha?: number): RGBA;
888
878
 
889
879
  /**
890
880
  * Converts encoded ProPhoto RGB channels to clipped sRGB paint channels.
@@ -903,7 +893,7 @@ export declare function convertOKLab(lightness: number, a: number, b: number, al
903
893
  * convertProPhotoRGB(0, 0, 0) // [0, 0, 0, 1]
904
894
  * ```
905
895
  */
906
- export declare function convertProPhotoRGB(red: number, green: number, blue: number, alpha?: number): Color;
896
+ export declare function convertProPhotoRGB(red: number, green: number, blue: number, alpha?: number): RGBA;
907
897
 
908
898
  /**
909
899
  * Converts encoded Rec. 2020 channels to clipped sRGB paint channels.
@@ -922,7 +912,7 @@ export declare function convertProPhotoRGB(red: number, green: number, blue: num
922
912
  * convertRec2020(0, 0, 0) // [0, 0, 0, 1]
923
913
  * ```
924
914
  */
925
- export declare function convertRec2020(red: number, green: number, blue: number, alpha?: number): Color;
915
+ export declare function convertRec2020(red: number, green: number, blue: number, alpha?: number): RGBA;
926
916
 
927
917
  /**
928
918
  * Converts normalized encoded sRGB channels to the clipped paint scale.
@@ -938,7 +928,7 @@ export declare function convertRec2020(red: number, green: number, blue: number,
938
928
  * convertSRGB(1.2, -0.1, 0.5) // [255, 0, 127.5, 1]
939
929
  * ```
940
930
  */
941
- export declare function convertSRGB(red: number, green: number, blue: number, alpha?: number): Color;
931
+ export declare function convertSRGB(red: number, green: number, blue: number, alpha?: number): RGBA;
942
932
 
943
933
  /**
944
934
  * Converts D50 XYZ coordinates to clipped sRGB paint channels.
@@ -957,7 +947,7 @@ export declare function convertSRGB(red: number, green: number, blue: number, al
957
947
  * convertXYZD50(0, 0, 0) // [0, 0, 0, 1]
958
948
  * ```
959
949
  */
960
- export declare function convertXYZD50(x: number, y: number, z: number, alpha?: number): Color;
950
+ export declare function convertXYZD50(x: number, y: number, z: number, alpha?: number): RGBA;
961
951
 
962
952
  /**
963
953
  * Converts D65 XYZ coordinates to clipped sRGB paint channels.
@@ -976,7 +966,7 @@ export declare function convertXYZD50(x: number, y: number, z: number, alpha?: n
976
966
  * convertXYZD65(0, 0, 0) // [0, 0, 0, 1]
977
967
  * ```
978
968
  */
979
- export declare function convertXYZD65(x: number, y: number, z: number, alpha?: number): Color;
969
+ export declare function convertXYZD65(x: number, y: number, z: number, alpha?: number): RGBA;
980
970
 
981
971
  /**
982
972
  * Counts the elements a tree holds, descending into open shadow roots and same-origin frames.
@@ -997,32 +987,6 @@ export declare function convertXYZD65(x: number, y: number, z: number, alpha?: n
997
987
  */
998
988
  export declare function countElements(root?: Document | ShadowRoot): number;
999
989
 
1000
- /**
1001
- * Creates one console channel that records every call it receives and hands that call on unchanged.
1002
- *
1003
- * @param name - The channel's name, which prefixes each line it records.
1004
- * @param output - The list each call is recorded into, appended to in place.
1005
- * @param forward - The channel every call is passed on to after it is recorded.
1006
- * @returns A channel carrying the console's own call signature.
1007
- *
1008
- * @remarks
1009
- * One call becomes one line. Every argument of that call is put through `String` and joined with a
1010
- * space, so a call carrying several values reads as the one line the page printed rather than as
1011
- * several entries.
1012
- *
1013
- * Nothing is swallowed. The record happens first and `forward` receives the arguments it would have
1014
- * received, so a page recorded through this prints exactly what it printed without it. The list
1015
- * belongs to the caller, so a channel writes into whatever it was handed and holds no state of its
1016
- * own. {@link createJournal} builds one channel per console method over one list.
1017
- *
1018
- * @example
1019
- * ```ts
1020
- * const output: string[] = []
1021
- * console.log = createChannel('log', output, console.log)
1022
- * ```
1023
- */
1024
- export declare function createChannel(name: string, output: string[], forward: (...data: unknown[]) => void): (...data: unknown[]) => void;
1025
-
1026
990
  /**
1027
991
  * Creates one real drag event carrying a live data transfer, ready to dispatch.
1028
992
  *
@@ -1536,7 +1500,7 @@ export declare function fillAccessible(name: string, text: string): Promise<void
1536
1500
  * declares no animation under that name.
1537
1501
  *
1538
1502
  * @remarks
1539
- * The name is matched exactly, which is where this parts from {@link findRule}: a selector is
1503
+ * The name is matched exactly, which is where this parts from {@link findStyleRule}: a selector is
1540
1504
  * compound and a fragment of one is a useful question, and an animation name is one atom that either
1541
1505
  * is or is not the one an `animation` declaration references.
1542
1506
  *
@@ -1561,15 +1525,15 @@ export declare function findKeyframes(name: string): CSSKeyframesRule | undefine
1561
1525
  * another. Assert on this where the subject is the stylesheet, and on `readStyle` where the subject is
1562
1526
  * the rendered result.
1563
1527
  *
1564
- * The match is a substring, so `findRule('.card')` finds `.card`, `.card:hover`, and
1528
+ * The match is a substring, so `findStyleRule('.card')` finds `.card`, `.card:hover`, and
1565
1529
  * `.panel > .card` alike. Pass more of the selector to narrow it.
1566
1530
  *
1567
1531
  * @example
1568
1532
  * ```ts
1569
- * findRule('.card')?.style.getPropertyValue('padding')
1533
+ * findStyleRule('.card')?.style.getPropertyValue('padding')
1570
1534
  * ```
1571
1535
  */
1572
- export declare function findRule(selector: string): CSSStyleRule | undefined;
1536
+ export declare function findStyleRule(selector: string): CSSStyleRule | undefined;
1573
1537
 
1574
1538
  /**
1575
1539
  * Bounds consecutive focus landings and the Tab presses budgeted per segmented input.
@@ -2014,7 +1978,7 @@ export declare interface JournalStep {
2014
1978
  * matchesColor('red', [0, 0, 255, 1]) // false
2015
1979
  * ```
2016
1980
  */
2017
- export declare function matchesColor(first: string | Color, second: string | Color): boolean;
1981
+ export declare function matchesColor(first: string | RGBA, second: string | RGBA): boolean;
2018
1982
 
2019
1983
  /**
2020
1984
  * Checks whether a landing can carry a requested accessible name without resolving the document.
@@ -2099,7 +2063,7 @@ export declare function measureContent(): number;
2099
2063
  * measureContrast([0, 0, 0, 1], [255, 255, 255, 1]) // 21
2100
2064
  * ```
2101
2065
  */
2102
- export declare function measureContrast(front: Color, back: Color): number;
2066
+ export declare function measureContrast(front: RGBA, back: RGBA): number;
2103
2067
 
2104
2068
  /**
2105
2069
  * Measures one opaque color's WCAG relative luminance.
@@ -2112,7 +2076,7 @@ export declare function measureContrast(front: Color, back: Color): number;
2112
2076
  * measureLuminance([255, 255, 255, 1]) // 1
2113
2077
  * ```
2114
2078
  */
2115
- export declare function measureLuminance(color: Color): number;
2079
+ export declare function measureLuminance(color: RGBA): number;
2116
2080
 
2117
2081
  /**
2118
2082
  * Names the tester root's attribute holding the media readings observed before the first stage.
@@ -2234,7 +2198,7 @@ export declare function parkPointer(): Promise<void>;
2234
2198
  * parseColor('rebeccapurple') // undefined
2235
2199
  * ```
2236
2200
  */
2237
- export declare function parseColor(value: string): Color | undefined;
2201
+ export declare function parseColor(value: string): RGBA | undefined;
2238
2202
 
2239
2203
  /**
2240
2204
  * Resolves any CSS color expression to straight sRGB channels, by asking the browser.
@@ -2289,7 +2253,7 @@ export declare function parseColor(value: string): Color | undefined;
2289
2253
  * parseCSSColor('var(--ink)', panel) // the token as the panel declares it
2290
2254
  * ```
2291
2255
  */
2292
- export declare function parseCSSColor(value: string, scope?: Element): Color | undefined;
2256
+ export declare function parseCSSColor(value: string, scope?: Element): RGBA | undefined;
2293
2257
 
2294
2258
  /**
2295
2259
  * Names the tester root's attribute holding the pressed pointer's page coordinates.
@@ -2486,7 +2450,7 @@ export declare function readAnimations(element: Element): AnimationResult;
2486
2450
  * readBackdrop(requireValue(container.querySelector('p')), CANVAS_COLOR)
2487
2451
  * ```
2488
2452
  */
2489
- export declare function readBackdrop(element: Element, floor: Color): Color;
2453
+ export declare function readBackdrop(element: Element, floor: RGBA): RGBA;
2490
2454
 
2491
2455
  /**
2492
2456
  * Reads the optional disk-digest command the tester page registered.
@@ -2755,7 +2719,26 @@ export declare function readColorContrast(element: Element, color: string, optio
2755
2719
  * readContrast(requireValue(container.firstElementChild), CANVAS_COLOR) // 21
2756
2720
  * ```
2757
2721
  */
2758
- export declare function readContrast(element: Element, floor?: Color): number;
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;
2759
2742
 
2760
2743
  /**
2761
2744
  * Reads the rendered text of the element that holds focus.
@@ -2929,7 +2912,7 @@ export declare function readLayerNames(source: CSSStyleSheet | CSSGroupingRule |
2929
2912
  * readLayers(requireValue(container.querySelector('p')))
2930
2913
  * ```
2931
2914
  */
2932
- export declare function readLayers(element: Element): readonly Color[];
2915
+ export declare function readLayers(element: Element): readonly RGBA[];
2933
2916
 
2934
2917
  /**
2935
2918
  * Reads the accessible name one element is announced under.
@@ -3248,7 +3231,7 @@ export declare function readRows(root: ParentNode, selector: string): readonly s
3248
3231
  * The walk is iterative and reads the list it is still appending to, which is what expands a media
3249
3232
  * query, a supports block, a layer, and a nested style rule without recursion. Expanding by level
3250
3233
  * rather than by depth is why a top-level rule is always met before a rule nested inside an earlier
3251
- * one; {@link findRule} returns the first match in exactly this order.
3234
+ * one; {@link findStyleRule} returns the first match in exactly this order.
3252
3235
  *
3253
3236
  * The descent reaches a `CSSGroupingRule` and nothing else, and a `@keyframes` rule is not one. The
3254
3237
  * `@keyframes` rule itself is collected wherever it sits, and the keyframe rules inside it are not;
@@ -3292,7 +3275,7 @@ export declare function readRules(): readonly CSSRule[];
3292
3275
  * const [red, green, blue] = await readShotPixel(figure, 0.5, 0.5)
3293
3276
  * ```
3294
3277
  */
3295
- export declare function readShotPixel(element: Element, x: number, y: number): Promise<Color>;
3278
+ export declare function readShotPixel(element: Element, x: number, y: number): Promise<RGBA>;
3296
3279
 
3297
3280
  /**
3298
3281
  * Reads the states one element is announced in.
@@ -3383,23 +3366,30 @@ export declare function readText(element: Element): string;
3383
3366
  export declare function readToken(element: Element, name: string): string;
3384
3367
 
3385
3368
  /**
3386
- * Reads the value a resolved control renders.
3369
+ * Records every call one console channel receives and hands that call on unchanged.
3387
3370
  *
3388
- * @param role - The control's exact ARIA role.
3389
- * @param name - The control's exact accessible name.
3390
- * @returns The control's current value.
3391
- * @throws When the target does not resolve, or resolves to an element that carries no value.
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.
3392
3375
  *
3393
3376
  * @remarks
3394
- * A control's value is a rendered fact a person can read, not internal state, so it is read from
3395
- * the resolved element rather than from the component that produced it.
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.
3396
3385
  *
3397
3386
  * @example
3398
3387
  * ```ts
3399
- * readValue('spinbutton', 'Runs') // '3'
3388
+ * const output: string[] = []
3389
+ * console.log = recordConsole('log', output, console.log)
3400
3390
  * ```
3401
3391
  */
3402
- export declare function readValue(role: string, name: string): string;
3392
+ export declare function recordConsole(name: string, output: string[], forward: (...data: unknown[]) => void): (...data: unknown[]) => void;
3403
3393
 
3404
3394
  /**
3405
3395
  * Restores the media readings observed before the first stage as explicit emulation. With nothing
@@ -3678,6 +3668,16 @@ export declare function resolveFileInput(name: string): HTMLInputElement;
3678
3668
  */
3679
3669
  export declare function resolveRendered(first: string, second?: string): HTMLElement;
3680
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
+
3681
3681
  /** Names the native input types whose editable segments share one focused element. */
3682
3682
  export declare const SEGMENTED_INPUT_TYPES: readonly string[];
3683
3683
 
@@ -1251,12 +1251,13 @@ async function readShotPixel(element, x, y) {
1251
1251
  if (context === void 0) throw new Error("Shot cannot be measured without a 2D canvas");
1252
1252
  const { width, height } = context.canvas;
1253
1253
  const [red = 0, green = 0, blue = 0, alpha = 0] = context.getImageData(Math.min(width - 1, Math.floor(width * x)), Math.min(height - 1, Math.floor(height * y)), 1, 1).data;
1254
- return Object.freeze([
1254
+ const pixel = [
1255
1255
  red,
1256
1256
  green,
1257
1257
  blue,
1258
1258
  alpha / 255
1259
- ]);
1259
+ ];
1260
+ return Object.freeze(pixel);
1260
1261
  }
1261
1262
  /**
1262
1263
  * Expands a capture registry across every variant into the filenames a complete portfolio holds.
@@ -1594,6 +1595,36 @@ async function sendFileDrag(type, role, name, names) {
1594
1595
  });
1595
1596
  }
1596
1597
  /**
1598
+ * Records every call one console channel receives and hands that call on unchanged.
1599
+ *
1600
+ * @param name - The channel's name, which prefixes each line it records.
1601
+ * @param output - The list each call is recorded into, appended to in place.
1602
+ * @param forward - The channel every call is passed on to after it is recorded.
1603
+ * @returns A channel carrying the console's own call signature.
1604
+ *
1605
+ * @remarks
1606
+ * One call becomes one line. Every argument of that call is put through `String` and joined with a
1607
+ * space, so a call carrying several values reads as the one line the page printed rather than as
1608
+ * several entries.
1609
+ *
1610
+ * Nothing is swallowed. The record happens first and `forward` receives the arguments it would have
1611
+ * received, so a page recorded through this prints exactly what it printed without it. The list
1612
+ * belongs to the caller, so a channel writes into whatever it was handed and holds no state of its
1613
+ * own. {@link createJournal} builds one channel per console method over one list.
1614
+ *
1615
+ * @example
1616
+ * ```ts
1617
+ * const output: string[] = []
1618
+ * console.log = recordConsole('log', output, console.log)
1619
+ * ```
1620
+ */
1621
+ function recordConsole(name, output, forward) {
1622
+ return (...data) => {
1623
+ output.push(`${name}: ${data.map((value) => String(value)).join(" ")}`);
1624
+ forward(...data);
1625
+ };
1626
+ }
1627
+ /**
1597
1628
  * Determines whether a rectangle lies wholly outside the browser viewport.
1598
1629
  *
1599
1630
  * @param rectangle - The measured client rectangle to inspect.
@@ -2850,10 +2881,10 @@ function readFocus() {
2850
2881
  *
2851
2882
  * @example
2852
2883
  * ```ts
2853
- * readValue('spinbutton', 'Runs') // '3'
2884
+ * readControlValue('spinbutton', 'Runs') // '3'
2854
2885
  * ```
2855
2886
  */
2856
- function readValue(role, name) {
2887
+ function readControlValue(role, name) {
2857
2888
  const control = resolveAccessible(role, name);
2858
2889
  if (!(control instanceof HTMLInputElement) && !(control instanceof HTMLTextAreaElement) && !(control instanceof HTMLSelectElement)) throw new Error(`Interactive target "${name}" does not carry a value`);
2859
2890
  return control.value;
@@ -3529,7 +3560,7 @@ var Journal = class {
3529
3560
  "info",
3530
3561
  "log",
3531
3562
  "warn"
3532
- ]) console[channel] = createChannel(channel, this.#output, forwarded[channel]);
3563
+ ]) console[channel] = recordConsole(channel, this.#output, forwarded[channel]);
3533
3564
  const dropped = new AbortController();
3534
3565
  this.#listeners = dropped;
3535
3566
  window.addEventListener("error", (event) => {
@@ -3603,36 +3634,6 @@ var WebStorage = class {
3603
3634
  };
3604
3635
  // src/browser/journeys/factories.ts
3605
3636
  /**
3606
- * Creates one console channel that records every call it receives and hands that call on unchanged.
3607
- *
3608
- * @param name - The channel's name, which prefixes each line it records.
3609
- * @param output - The list each call is recorded into, appended to in place.
3610
- * @param forward - The channel every call is passed on to after it is recorded.
3611
- * @returns A channel carrying the console's own call signature.
3612
- *
3613
- * @remarks
3614
- * One call becomes one line. Every argument of that call is put through `String` and joined with a
3615
- * space, so a call carrying several values reads as the one line the page printed rather than as
3616
- * several entries.
3617
- *
3618
- * Nothing is swallowed. The record happens first and `forward` receives the arguments it would have
3619
- * received, so a page recorded through this prints exactly what it printed without it. The list
3620
- * belongs to the caller, so a channel writes into whatever it was handed and holds no state of its
3621
- * own. {@link createJournal} builds one channel per console method over one list.
3622
- *
3623
- * @example
3624
- * ```ts
3625
- * const output: string[] = []
3626
- * console.log = createChannel('log', output, console.log)
3627
- * ```
3628
- */
3629
- function createChannel(name, output, forward) {
3630
- return (...data) => {
3631
- output.push(`${name}: ${data.map((value) => String(value)).join(" ")}`);
3632
- forward(...data);
3633
- };
3634
- }
3635
- /**
3636
3637
  * Creates the journal one scenario records its steps and the page's own output into.
3637
3638
  *
3638
3639
  * @returns A journal that records nothing until it is started.
@@ -5015,7 +5016,7 @@ function readCensus(root) {
5015
5016
  * The walk is iterative and reads the list it is still appending to, which is what expands a media
5016
5017
  * query, a supports block, a layer, and a nested style rule without recursion. Expanding by level
5017
5018
  * rather than by depth is why a top-level rule is always met before a rule nested inside an earlier
5018
- * one; {@link findRule} returns the first match in exactly this order.
5019
+ * one; {@link findStyleRule} returns the first match in exactly this order.
5019
5020
  *
5020
5021
  * The descent reaches a `CSSGroupingRule` and nothing else, and a `@keyframes` rule is not one. The
5021
5022
  * `@keyframes` rule itself is collected wherever it sits, and the keyframe rules inside it are not;
@@ -5055,15 +5056,15 @@ function readRules() {
5055
5056
  * another. Assert on this where the subject is the stylesheet, and on `readStyle` where the subject is
5056
5057
  * the rendered result.
5057
5058
  *
5058
- * The match is a substring, so `findRule('.card')` finds `.card`, `.card:hover`, and
5059
+ * The match is a substring, so `findStyleRule('.card')` finds `.card`, `.card:hover`, and
5059
5060
  * `.panel > .card` alike. Pass more of the selector to narrow it.
5060
5061
  *
5061
5062
  * @example
5062
5063
  * ```ts
5063
- * findRule('.card')?.style.getPropertyValue('padding')
5064
+ * findStyleRule('.card')?.style.getPropertyValue('padding')
5064
5065
  * ```
5065
5066
  */
5066
- function findRule(selector) {
5067
+ function findStyleRule(selector) {
5067
5068
  for (const rule of readRules()) if (rule instanceof CSSStyleRule && rule.selectorText.includes(selector)) return rule;
5068
5069
  }
5069
5070
  /**
@@ -5074,7 +5075,7 @@ function findRule(selector) {
5074
5075
  * declares no animation under that name.
5075
5076
  *
5076
5077
  * @remarks
5077
- * The name is matched exactly, which is where this parts from {@link findRule}: a selector is
5078
+ * The name is matched exactly, which is where this parts from {@link findStyleRule}: a selector is
5078
5079
  * compound and a fragment of one is a useful question, and an animation name is one atom that either
5079
5080
  * is or is not the one an `animation` declaration references.
5080
5081
  *
@@ -5278,6 +5279,6 @@ function buildCensus() {
5278
5279
  mark
5279
5280
  });
5280
5281
  }
5281
- export { ACCESSIBLE_ROLES, CANVAS_COLOR, CAPTURE_PANE, CAPTURE_STAGE_LIMIT, CONTENT_ROLES, FIELD_ROLES, FOCUSABLE_SELECTOR, FOCUS_SEGMENT_LIMIT, HEADER_ROLES, IMPLICIT_ROLES, MEDIA_STAGE, POINTER_HOLD, SEGMENTED_INPUT_TYPES, adoptSheet, blendColor, build, buildCensus, buildContrast, buildDenial, buildEscapes, captureFrame, chooseAccessible, clearStorage, clickAccessible, clickAccessibleWithin, clickDisclosure, clipsOverflow, collectClippingAncestors, collectScrollRegions, collectShadowHosts, collectTabStops, commitInput, computeNamePattern, computeOffset, containsNode, convertA98RGB, convertDisplayP3, convertLab, convertLinearSRGB, convertOKLab, convertProPhotoRGB, convertRec2020, convertSRGB, convertXYZD50, convertXYZD65, countElements, createChannel, createDragEvent, createHarness, createJournal, createKeyboardEvent, createPointerEvent, createPortfolio, createStorage, describeFocus, describeScrollRegions, describeTree, driveHold, driveTraversal, expandCaptures, extractOrphans, extractStyles, fillAccessible, findKeyframes, findRule, holdAccessible, holdAccessibleWithin, hoverAccessible, isOutsideViewport, isReachable, isRendered, matchesColor, matchesTraversalName, measureContent, measureContrast, measureLuminance, mount, paintImage, parkPointer, parseCSSColor, parseColor, pressKeys, readAccessibilityNode, readActiveElement, readAnimations, readBackdrop, readCaptureReader, readCascade, readCensus, readClasses, readClipEdge, readClipMargin, readClippedBlock, readColorContrast, readContrast, readFocus, readFrame, readFrameHeight, readHit, readLayerNames, readLayers, readName, readPage, readPerception, readPixels, readProtocolNode, readProtocolPoint, readProtocolSession, readRefusal, readRing, readRole, readRootToken, readRows, readRules, readShotPixel, readStates, readStyle, readText, readToken, readValue, releaseMedia, releasePane, releasePointer, releaseTouch, removeDatabase, render, resolveAccessible, resolveAccessibleWithin, resolveFileInput, resolveRendered, sendFileDrag, sendProtocol, sendTouch, settleCapture, settleFrame, stageMedia, stagePane, stepFocus, supportsSegmentedFocus, takeFrameShot, tapTouch, traverseAccessible, traverseAccessibleWithin, typeAccessible, typeInput, verifyFrame, waitForAnimations, waitForFrame, waitForStability, waitForState, walkFocus };
5282
+ export { ACCESSIBLE_ROLES, CANVAS_COLOR, CAPTURE_PANE, CAPTURE_STAGE_LIMIT, CONTENT_ROLES, FIELD_ROLES, FOCUSABLE_SELECTOR, FOCUS_SEGMENT_LIMIT, HEADER_ROLES, IMPLICIT_ROLES, MEDIA_STAGE, POINTER_HOLD, SEGMENTED_INPUT_TYPES, adoptSheet, blendColor, build, buildCensus, buildContrast, buildDenial, buildEscapes, captureFrame, chooseAccessible, clearStorage, clickAccessible, clickAccessibleWithin, clickDisclosure, clipsOverflow, collectClippingAncestors, collectScrollRegions, collectShadowHosts, collectTabStops, commitInput, computeNamePattern, computeOffset, containsNode, convertA98RGB, convertDisplayP3, convertLab, convertLinearSRGB, convertOKLab, convertProPhotoRGB, convertRec2020, convertSRGB, convertXYZD50, convertXYZD65, countElements, createDragEvent, createHarness, createJournal, createKeyboardEvent, createPointerEvent, createPortfolio, createStorage, describeFocus, describeScrollRegions, describeTree, driveHold, driveTraversal, expandCaptures, extractOrphans, extractStyles, fillAccessible, findKeyframes, findStyleRule, holdAccessible, holdAccessibleWithin, hoverAccessible, isOutsideViewport, isReachable, isRendered, matchesColor, matchesTraversalName, measureContent, measureContrast, measureLuminance, mount, paintImage, parkPointer, parseCSSColor, parseColor, pressKeys, readAccessibilityNode, readActiveElement, readAnimations, readBackdrop, readCaptureReader, readCascade, readCensus, readClasses, readClipEdge, readClipMargin, readClippedBlock, readColorContrast, readContrast, readControlValue, readFocus, readFrame, readFrameHeight, readHit, readLayerNames, readLayers, readName, readPage, readPerception, readPixels, readProtocolNode, readProtocolPoint, readProtocolSession, readRefusal, readRing, readRole, readRootToken, readRows, readRules, readShotPixel, readStates, readStyle, readText, readToken, recordConsole, releaseMedia, releasePane, releasePointer, releaseTouch, removeDatabase, render, resolveAccessible, resolveAccessibleWithin, resolveFileInput, resolveRendered, sendFileDrag, sendProtocol, sendTouch, settleCapture, settleFrame, stageMedia, stagePane, stepFocus, supportsSegmentedFocus, takeFrameShot, tapTouch, traverseAccessible, traverseAccessibleWithin, typeAccessible, typeInput, verifyFrame, waitForAnimations, waitForFrame, waitForStability, waitForState, walkFocus };
5282
5283
 
5283
5284
  //# sourceMappingURL=index.js.map