@orkestrel/test 0.0.29 → 0.0.31

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 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
 
@@ -78,7 +78,7 @@ export declare function adoptSheet(text: string): SheetAdoption;
78
78
  * An animation counts as endless when its effect declares infinite iterations. A paused, an idle,
79
79
  * and a finished animation are at rest, so neither list holds one.
80
80
  */
81
- export declare interface AnimationReading {
81
+ export declare interface AnimationResult {
82
82
  /** Lists the running animations that end, the ones `waitForAnimations` waits on. */
83
83
  readonly finite: readonly Animation[];
84
84
  /** Lists the running animations whose effect declares infinite iterations. */
@@ -270,7 +270,7 @@ export declare const CAPTURE_PANE = "data-capture-pane";
270
270
  * one restaging past the cap before it comes back down to the edge. Nothing measured needs a
271
271
  * fourth, so a fourth is the headroom that keeps a settling document off the refusal.
272
272
  */
273
- export declare const CAPTURE_STAGINGS = 4;
273
+ export declare const CAPTURE_STAGE_LIMIT = 4;
274
274
 
275
275
  /**
276
276
  * Shoots one frame at one viewport size and proves the file on disk holds this run's bytes.
@@ -278,14 +278,17 @@ export declare const CAPTURE_STAGINGS = 4;
278
278
  * @param options - The path to write, the viewport to shoot at, and the element to shoot.
279
279
  * @returns The absolute path of the written frame, after it has been read back and matched.
280
280
  * @throws Thrown when the pane cannot be staged, when the document's height or an element frame's
281
- * element height never settles under {@link CAPTURE_STAGINGS} restagings, when the provider wrote
281
+ * element height never settles under {@link CAPTURE_STAGE_LIMIT} restagings, when the provider wrote
282
282
  * the frame somewhere else, and when the bytes on disk are not the ones this shot produced.
283
283
  *
284
284
  * @remarks
285
285
  * The path a screenshot call returns is the path it meant to write, so it is not evidence a file
286
- * exists. The file is read back through the runner's built-in `readFile` command and compared with
287
- * the shot itself, which is what separates a frame this run wrote from one an earlier run left
288
- * behind. The provider resolves `options.path` against the calling test file and returns an absolute
286
+ * exists. The {@link verifyFrame} helper compares the file with the shot itself. When the page
287
+ * registered a `readCapture` command, {@link readCaptureReader} returns it and the comparison uses
288
+ * SHA-256 digests computed in Node for the file and in the browser for the returned bytes. Otherwise
289
+ * the runner's built-in `readFile` command supplies the base64 comparison. A command failure
290
+ * propagates without falling back. The provider resolves `options.path`
291
+ * against the calling test file and returns an absolute
289
292
  * path, so the two are compared by the segments that survive resolving `.` and `..` lexically — the
290
293
  * refusal is what a provider resolving that path against a different base would trip.
291
294
  *
@@ -295,6 +298,8 @@ export declare const CAPTURE_STAGINGS = 4;
295
298
  * than the document — a frame that reads as the surface down to the fold and as bare canvas after
296
299
  * it. The document is therefore laid out at the declared viewport first and, where it is taller
297
300
  * than that, the pane is staged again at the height the document needs, for the shot alone.
301
+ * Where the tester already has the declared viewport, the reading precedes the initial staging,
302
+ * so fixed content stages at its final height directly. Every staged height is still read again.
298
303
  *
299
304
  * That height is {@link measureContent}, never less than `options.height`, because the declared
300
305
  * viewport is the smallest frame a variant asks for. The reading is the content's own edge rather
@@ -317,7 +322,7 @@ export declare const CAPTURE_STAGINGS = 4;
317
322
  *
318
323
  * The re-reading stops when the pane and the edge agree, which is the pane the shot is taken at. A
319
324
  * rule that adds height with every pane never reaches that point, so the re-reading is bounded by
320
- * {@link CAPTURE_STAGINGS} and the shot is refused with
325
+ * {@link CAPTURE_STAGE_LIMIT} and the shot is refused with
321
326
  * `Capture frame at <path> never settled after <n> restagings: <h> over a <h> pane` rather than
322
327
  * written at a height that is already wrong.
323
328
  *
@@ -366,6 +371,9 @@ export declare const CAPTURE_STAGINGS = 4;
366
371
  */
367
372
  export declare function captureFrame(options: FrameOptions): Promise<string>;
368
373
 
374
+ /** Reads the lowercase hexadecimal SHA-256 digest of a captured file through a browser command. */
375
+ export declare type CaptureReader = (path: string) => Promise<string>;
376
+
369
377
  /**
370
378
  * Adds to a journey variant the document change a capture run applies before resizing.
371
379
  *
@@ -409,7 +417,7 @@ export declare interface CensusFixture {
409
417
  * markup whose every class the cascade declares. Assert on `elements` as well as on `undeclared`
410
418
  * and the two cannot be confused.
411
419
  */
412
- export declare interface CensusReading {
420
+ export declare interface CensusResult {
413
421
  /** Reports how many elements the walk read, the root included when it is an element. */
414
422
  readonly elements: number;
415
423
  /** Lists every class token the markup carries, sorted. */
@@ -595,6 +603,18 @@ export declare function collectClippingAncestors(element: Element): readonly Ele
595
603
  */
596
604
  export declare function collectScrollRegions(root: Element, axis?: 'inline' | 'block'): readonly HTMLElement[];
597
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
+
598
618
  /**
599
619
  * Collects the elements of a region that a forward Tab walk reaches from a starting element.
600
620
  *
@@ -1346,9 +1366,12 @@ export declare function driveHold(resolve: () => HTMLElement, name: string): Pro
1346
1366
  * Reaches the control a resolver returns, only through natural forward Tab traversal from the
1347
1367
  * current focus.
1348
1368
  *
1349
- * @param resolve - The resolver that returns the target, called before the first step and again on
1350
- * every step, because a framework may replace the node between resolution and focus arrival.
1369
+ * @param resolve - The resolver called before traversal and at candidate arrivals, without retaining
1370
+ * its result between steps.
1351
1371
  * @param name - The target's name, as the refusal voices it.
1372
+ * @param candidate - The landing check; it must admit every element the resolver could return.
1373
+ * Default: the conservative exact-name check from {@link matchesTraversalName}. Supply a check
1374
+ * matching the resolver's semantics when it uses a label, region, or loose name.
1352
1375
  * @returns The target after the browser moves focus to it.
1353
1376
  * @throws When the resolver refuses, or one complete traversal cannot reach the target.
1354
1377
  *
@@ -1365,7 +1388,7 @@ export declare function driveHold(resolve: () => HTMLElement, name: string): Pro
1365
1388
  * await driveTraversal(() => resolveRendered('Evaluate'), 'Evaluate')
1366
1389
  * ```
1367
1390
  */
1368
- export declare function driveTraversal(resolve: () => HTMLElement, name: string): Promise<HTMLElement>;
1391
+ export declare function driveTraversal(resolve: () => HTMLElement, name: string, candidate?: (element: HTMLElement) => boolean): Promise<HTMLElement>;
1369
1392
 
1370
1393
  /**
1371
1394
  * Configures one built element: its class list, its text, and its attributes.
@@ -1607,7 +1630,7 @@ export declare interface FrameOptions {
1607
1630
  * color in the `rgb(r, g, b)` form a computed style is written in, so a literal comparison,
1608
1631
  * `parseColor`, and `matchesColor` all take it.
1609
1632
  */
1610
- export declare interface FrameReading {
1633
+ export declare interface FrameResult {
1611
1634
  /** Holds the frame's width in device pixels. */
1612
1635
  readonly width: number;
1613
1636
  /** Holds the frame's height in device pixels. */
@@ -1616,6 +1639,14 @@ export declare interface FrameReading {
1616
1639
  readonly floor: string | undefined;
1617
1640
  }
1618
1641
 
1642
+ /** Represents the path and base64 bytes returned by Vitest's screenshot operation. */
1643
+ export declare interface FrameShot {
1644
+ /** Holds the absolute path the provider wrote. */
1645
+ readonly path: string;
1646
+ /** Holds the screenshot bytes encoded as base64. */
1647
+ readonly base64: string;
1648
+ }
1649
+
1619
1650
  /**
1620
1651
  * Holds a mounted statechart harness, the tally it publishes, and the run it drives.
1621
1652
  *
@@ -1985,6 +2016,30 @@ export declare interface JournalStep {
1985
2016
  */
1986
2017
  export declare function matchesColor(first: string | Color, second: string | Color): boolean;
1987
2018
 
2019
+ /**
2020
+ * Checks whether a landing can carry a requested accessible name without resolving the document.
2021
+ *
2022
+ * @param element - The element focus landed on.
2023
+ * @param name - The name the resolver matches.
2024
+ * @param exact - If `true`, compares exact names; if `false`, compares case-insensitive substrings.
2025
+ * Default: `true`.
2026
+ * @returns True if the name matches or its computation requires the resolver; false otherwise.
2027
+ *
2028
+ * @remarks
2029
+ * This is a conservative candidate check, not an accessible-name implementation. It compares a
2030
+ * nonempty `aria-label` without `aria-labelledby`, or the text of a plain native button or link.
2031
+ * Referenced labels, associated labels, descendants, shadow content, owned content, explicit roles,
2032
+ * generated content, and other naming rules fall through to the resolver. Empty requested names
2033
+ * also fall through because a role can prohibit naming. Whitespace, zero-width spaces, and soft
2034
+ * hyphens are normalized as in the provider's role query. Never use this check to accept a target.
2035
+ *
2036
+ * @example
2037
+ * ```ts
2038
+ * matchesTraversalName(document.createElement('input'), 'Attachments') // true
2039
+ * ```
2040
+ */
2041
+ export declare function matchesTraversalName(element: HTMLElement, name: string, exact?: boolean): boolean;
2042
+
1988
2043
  /**
1989
2044
  * Measures the row the document's own content ends on, in document coordinates.
1990
2045
  *
@@ -2402,7 +2457,7 @@ export declare function readActiveElement(root?: Document | ShadowRoot): HTMLEle
2402
2457
  * readAnimations(document.documentElement).finite.length // 0 once every transition has settled
2403
2458
  * ```
2404
2459
  */
2405
- export declare function readAnimations(element: Element): AnimationReading;
2460
+ export declare function readAnimations(element: Element): AnimationResult;
2406
2461
 
2407
2462
  /**
2408
2463
  * Resolves the opaque color standing behind one element.
@@ -2433,6 +2488,22 @@ export declare function readAnimations(element: Element): AnimationReading;
2433
2488
  */
2434
2489
  export declare function readBackdrop(element: Element, floor: Color): Color;
2435
2490
 
2491
+ /**
2492
+ * Reads the optional disk-digest command the tester page registered.
2493
+ *
2494
+ * @returns The registered `readCapture` command, or undefined where none is registered.
2495
+ *
2496
+ * @remarks Vitest publishes only registered commands, so an unregistered `readCapture` reads as
2497
+ * undefined and a capture falls back to the base64 read-back. Outside a Vitest browser page, where
2498
+ * `commands` is no object, the command reads as undefined too, so importing this module never
2499
+ * throws there.
2500
+ * @example
2501
+ * ```ts
2502
+ * await verifyFrame(shot, '../../tmp/frame.png', readCaptureReader())
2503
+ * ```
2504
+ */
2505
+ export declare function readCaptureReader(): CaptureReader | undefined;
2506
+
2436
2507
  /**
2437
2508
  * Collects every class token the stylesheets loaded into this document actually define.
2438
2509
  *
@@ -2494,7 +2565,7 @@ export declare function readCascade(): ReadonlySet<string>;
2494
2565
  * readCensus(container).undeclared // ['lead'] — no loaded stylesheet declares it
2495
2566
  * ```
2496
2567
  */
2497
- export declare function readCensus(root: ParentNode): CensusReading;
2568
+ export declare function readCensus(root: ParentNode): CensusResult;
2498
2569
 
2499
2570
  /**
2500
2571
  * Collects every class token the markup under one root carries.
@@ -2732,10 +2803,20 @@ export declare function readFocus(): string | undefined;
2732
2803
  *
2733
2804
  * @example
2734
2805
  * ```ts
2735
- * const reading = await readFrame(written)
2806
+ * const result = await readFrame(written)
2736
2807
  * ```
2737
2808
  */
2738
- export declare function readFrame(path: string): Promise<FrameReading>;
2809
+ export declare function readFrame(path: string): Promise<FrameResult>;
2810
+
2811
+ /**
2812
+ * Reads a capture subject's height after applying its native scroll clearance.
2813
+ *
2814
+ * @example
2815
+ * ```ts
2816
+ * readFrameHeight({ path: 'frame.png', width: 390, height: 844 }, undefined, 844)
2817
+ * ```
2818
+ */
2819
+ export declare function readFrameHeight(options: FrameOptions, element: Element | undefined, pane: number): number | undefined;
2739
2820
 
2740
2821
  /**
2741
2822
  * Reads the topmost element at one element's bounding-box centre.
@@ -2996,6 +3077,17 @@ export declare function readProtocolNode(element: Element): Promise<number>;
2996
3077
  */
2997
3078
  export declare function readProtocolPoint(element: Element, offset?: ProtocolPoint): ProtocolPoint;
2998
3079
 
3080
+ /**
3081
+ * Reads the browser provider's DevTools session and its send member.
3082
+ *
3083
+ * @throws Thrown when the provider or member read fails.
3084
+ * @example
3085
+ * ```ts
3086
+ * const [session, send] = readProtocolSession()
3087
+ * ```
3088
+ */
3089
+ export declare function readProtocolSession(): readonly [unknown, unknown];
3090
+
2999
3091
  /**
3000
3092
  * Reads the refusal one named target answers with, or nothing when it resolves.
3001
3093
  *
@@ -3353,7 +3445,9 @@ export declare function releaseMedia(): Promise<void>;
3353
3445
  * otherwise read the last capture's variant. The size comes off the {@link CAPTURE_PANE} value
3354
3446
  * {@link stagePane} wrote onto the rule element, which is the reading taken before the first
3355
3447
  * staging. Calling this on an unstaged pane finds no such value, so it changes nothing and resizes
3356
- * nothing.
3448
+ * nothing. A staged pane sends its saved size even when the tester already holds it, because the
3449
+ * runner refits its frame scale only on a viewport request; a release that skipped it would leave
3450
+ * the next case shooting through the staged scale.
3357
3451
  *
3358
3452
  * That hand-back is what makes {@link stagePane} and this pair a capture's staging rather than a
3359
3453
  * resize: the pair puts the tester back where it found it, so a suite that used it to reach a
@@ -3530,10 +3624,10 @@ export declare function resolveAccessible(role: string, name: string): HTMLEleme
3530
3624
  * @throws When the named control is absent, unreachable, or ambiguous inside the region.
3531
3625
  *
3532
3626
  * @remarks
3533
- * The region's name is matched exactly and the control's name loosely, over a computed name that
3534
- * includes hidden subtrees, so a glyph joins the text rather than displacing it. One pass answers
3535
- * this: a control the region cannot reach is refused whether it is absent or hidden. This is the
3536
- * resolver the region-scoped verbs share.
3627
+ * The region's name is matched exactly. The control first matches the case-sensitive pattern
3628
+ * from `computeNamePattern`, with hidden subtrees included. Any exact candidates own the result,
3629
+ * including unreachable or ambiguous candidates. Only an empty exact tier selects the loose query.
3630
+ * Both tiers refuse zero reachable candidates and several reachable candidates.
3537
3631
  *
3538
3632
  * @example
3539
3633
  * ```ts
@@ -3684,6 +3778,17 @@ export declare function sendTouch(type: 'touchStart' | 'touchMove' | 'touchEnd'
3684
3778
  */
3685
3779
  export declare function settleCapture(options?: SettleOptions): Promise<() => void>;
3686
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
+
3687
3792
  /**
3688
3793
  * Configures one capture settle: the time bounds of {@link WaitOptions} and whether the pointer
3689
3794
  * parks first.
@@ -3780,6 +3885,8 @@ export declare function stageMedia(options: MediaOptions): Promise<void>;
3780
3885
  * selector and the `--tester-transform`, `--tester-margin-left`, `--viewport-width`, and
3781
3886
  * `--viewport-height` custom properties are the runner's, so a Vitest release that renames any of
3782
3887
  * them reddens the size check that follows rather than writing a wrong frame.
3888
+ * The custom-property overrides serve Vitest 4; `transform: none !important` on the pane and
3889
+ * iframe also suppresses Vitest 5's direct CSS transform.
3783
3890
  *
3784
3891
  * Hand the pane straight back with {@link releasePane}. A tester pinned at a viewport taller than
3785
3892
  * the window puts its lower half beyond what a pointer can reach, so an ordinary press then fails
@@ -3797,7 +3904,8 @@ export declare function stageMedia(options: MediaOptions): Promise<void>;
3797
3904
  * the shot replaces the node and takes any attribute of ours with it.
3798
3905
  *
3799
3906
  * The wait is two frames rather than a delay: the first carries the resize into layout and the
3800
- * second is the paint a screenshot reads.
3907
+ * second is the paint a screenshot reads. An already matching viewport needs no resize command;
3908
+ * the staging rule, paint waits, and rendered-size check still run.
3801
3909
  *
3802
3910
  * The viewport the tester had before this staging is written onto that rule element as the
3803
3911
  * {@link CAPTURE_PANE} value, in `<width>x<height>` form, and {@link releasePane} hands it back.
@@ -3887,6 +3995,16 @@ export declare interface StorageOptions {
3887
3995
  */
3888
3996
  export declare function supportsSegmentedFocus(element: Element): boolean;
3889
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
+
3890
4008
  /**
3891
4009
  * Taps an element's centre with emulated touch after its box settles.
3892
4010
  *
@@ -3921,7 +4039,8 @@ export declare function tapTouch(element: Element, options?: StabilityOptions):
3921
4039
  * @throws When one complete traversal cannot reach the target.
3922
4040
  *
3923
4041
  * @remarks
3924
- * The loop is {@link driveTraversal} over {@link resolveRendered}. Consecutive landings inside a
4042
+ * The loop is {@link driveTraversal} over {@link resolveRendered}, with a conservative name check
4043
+ * before each arrival resolution. Consecutive landings inside a
3925
4044
  * native segmented input continue through its segments up to {@link FOCUS_SEGMENT_LIMIT} landings.
3926
4045
  * A longer run or any other revisit ends the traversal.
3927
4046
  *
@@ -3944,7 +4063,8 @@ export declare function traverseAccessible(name: string): Promise<HTMLElement>;
3944
4063
  *
3945
4064
  * @remarks
3946
4065
  * The resolution is {@link resolveAccessibleWithin} and the loop is {@link driveTraversal}, so a
3947
- * twin of the same name earlier in the tab order is passed over rather than reached.
4066
+ * twin of the same name earlier in the tab order is passed over rather than reached. Candidates
4067
+ * retain the resolver's loose name match and must belong to a freshly resolved named region.
3948
4068
  *
3949
4069
  * @example
3950
4070
  * ```ts
@@ -3996,6 +4116,22 @@ export declare function typeAccessible(name: string, text: string): Promise<void
3996
4116
  */
3997
4117
  export declare function typeInput(element: HTMLInputElement | HTMLTextAreaElement, text: string): void;
3998
4118
 
4119
+ /**
4120
+ * Verifies a screenshot's destination and compares its returned bytes with the written file.
4121
+ *
4122
+ * @param shot - The provider's absolute path and base64 screenshot bytes.
4123
+ * @param path - The requested screenshot path, relative to the test file.
4124
+ * @param reader - The optional Node disk-digest command; omission uses Vitest's base64 read-back.
4125
+ * @throws Thrown when the destination differs, the bytes differ, or either reading fails.
4126
+ * @remarks Digest reads compare SHA-256 of the decoded shot with SHA-256 of the disk bytes.
4127
+ * Command failures propagate unchanged; they never select the base64 fallback.
4128
+ * @example
4129
+ * ```ts
4130
+ * await verifyFrame(shot, '../../tmp/frame.png', readCaptureReader())
4131
+ * ```
4132
+ */
4133
+ export declare function verifyFrame(shot: FrameShot, path: string, reader?: CaptureReader): Promise<void>;
4134
+
3999
4135
  /**
4000
4136
  * Waits until every finite animation on one element and its subtree has stopped moving.
4001
4137
  *
@@ -4181,6 +4317,16 @@ export declare function walkFocus(stop?: (element: HTMLElement) => boolean): Pro
4181
4317
  export declare interface WebStorageInterface extends Storage {
4182
4318
  /** Grants the reads and the writes the host withheld, and replenishes no quota. */
4183
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;
4184
4330
  }
4185
4331
 
4186
4332
  export { }