@namzu/browser 2.0.1 → 2.1.0
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/CHANGELOG.md +13 -0
- package/dist/classifier.d.ts +22 -1
- package/dist/classifier.d.ts.map +1 -1
- package/dist/classifier.js +30 -7
- package/dist/classifier.js.map +1 -1
- package/dist/errors.d.ts +19 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +26 -0
- package/dist/errors.js.map +1 -1
- package/dist/host.d.ts +42 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +483 -69
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/page-scripts.d.ts +20 -0
- package/dist/page-scripts.d.ts.map +1 -1
- package/dist/page-scripts.js +110 -0
- package/dist/page-scripts.js.map +1 -1
- package/dist/reach.d.ts +66 -0
- package/dist/reach.d.ts.map +1 -0
- package/dist/reach.js +189 -0
- package/dist/reach.js.map +1 -0
- package/dist/settle.d.ts +40 -0
- package/dist/settle.d.ts.map +1 -0
- package/dist/settle.js +30 -0
- package/dist/settle.js.map +1 -0
- package/dist/snapshot.d.ts +80 -2
- package/dist/snapshot.d.ts.map +1 -1
- package/dist/snapshot.js +326 -20
- package/dist/snapshot.js.map +1 -1
- package/package.json +3 -2
- package/src/classifier.ts +44 -7
- package/src/errors.ts +32 -0
- package/src/host.ts +606 -83
- package/src/index.ts +4 -0
- package/src/page-scripts.ts +108 -0
- package/src/reach.ts +211 -0
- package/src/settle.ts +60 -0
- package/src/snapshot.ts +402 -20
package/dist/reach.js
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/** Keys `press` accepts without a ref. None of them enters a character except Enter and Space. */
|
|
2
|
+
export const NAMED_KEYS = [
|
|
3
|
+
'Escape',
|
|
4
|
+
'Enter',
|
|
5
|
+
'Tab',
|
|
6
|
+
'Shift+Tab',
|
|
7
|
+
'PageDown',
|
|
8
|
+
'PageUp',
|
|
9
|
+
'Home',
|
|
10
|
+
'End',
|
|
11
|
+
'Space',
|
|
12
|
+
];
|
|
13
|
+
/** The canonical spelling of an accepted key, or undefined for any other. */
|
|
14
|
+
export function namedKey(raw) {
|
|
15
|
+
const wanted = raw.trim().toLowerCase();
|
|
16
|
+
return NAMED_KEYS.find((key) => key.toLowerCase() === wanted);
|
|
17
|
+
}
|
|
18
|
+
/** Keys that put a character in a field or submit a form, so the focus must be known to be safe. */
|
|
19
|
+
export function keyCanCommit(key) {
|
|
20
|
+
return key === 'Enter' || key === 'Space';
|
|
21
|
+
}
|
|
22
|
+
/** How long between key presses when `type` sends real key events. */
|
|
23
|
+
export const KEY_DELAY_MS = 20;
|
|
24
|
+
/** Most candidates a refusal lists. */
|
|
25
|
+
export const CANDIDATES_MAX = 8;
|
|
26
|
+
/**
|
|
27
|
+
* Where to land on an element that is a container rather than a control:
|
|
28
|
+
* its first visible control, else the box of its own first text, else the
|
|
29
|
+
* middle. An element that is itself a control, or looks clickable, keeps the
|
|
30
|
+
* middle. `path` is an XPath relative to the element.
|
|
31
|
+
*
|
|
32
|
+
* Serialised; keep it self-contained.
|
|
33
|
+
*/
|
|
34
|
+
export function aimInside(el) {
|
|
35
|
+
const controls = 'a[href],button,input:not([type=hidden]),select,textarea,summary,label,[role=button],[role=link],[role=menuitem],[role=menuitemcheckbox],[role=menuitemradio],[role=tab],[role=option],[role=checkbox],[role=radio],[role=switch],[role=combobox],[role=textbox],[role=searchbox],[role=slider],[role=treeitem],[contenteditable=""],[contenteditable=true],[tabindex]:not([tabindex^="-"])';
|
|
36
|
+
const shown = (node) => {
|
|
37
|
+
const rect = node.getBoundingClientRect();
|
|
38
|
+
if (rect.width < 1 || rect.height < 1)
|
|
39
|
+
return false;
|
|
40
|
+
const style = getComputedStyle(node);
|
|
41
|
+
return style.visibility !== 'hidden' && style.display !== 'none';
|
|
42
|
+
};
|
|
43
|
+
if (el.matches(controls) ||
|
|
44
|
+
el.hasAttribute('onclick') ||
|
|
45
|
+
getComputedStyle(el).cursor === 'pointer') {
|
|
46
|
+
return { kind: 'centre' };
|
|
47
|
+
}
|
|
48
|
+
const inner = Array.from(el.querySelectorAll(controls)).find(shown);
|
|
49
|
+
if (inner) {
|
|
50
|
+
const steps = [];
|
|
51
|
+
let node = inner;
|
|
52
|
+
while (node && node !== el) {
|
|
53
|
+
const parent = node.parentElement;
|
|
54
|
+
if (!parent)
|
|
55
|
+
return { kind: 'centre' };
|
|
56
|
+
steps.unshift(Array.prototype.indexOf.call(parent.children, node) + 1);
|
|
57
|
+
node = parent;
|
|
58
|
+
}
|
|
59
|
+
return { kind: 'descendant', path: `./${steps.map((i) => `*[${i}]`).join('/')}` };
|
|
60
|
+
}
|
|
61
|
+
const box = el.getBoundingClientRect();
|
|
62
|
+
const walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT);
|
|
63
|
+
for (let node = walker.nextNode(); node; node = walker.nextNode()) {
|
|
64
|
+
const parent = node.parentElement;
|
|
65
|
+
if (!parent || !(node.textContent ?? '').trim() || !shown(parent))
|
|
66
|
+
continue;
|
|
67
|
+
if (/^(script|style|noscript|template)$/i.test(parent.tagName))
|
|
68
|
+
continue;
|
|
69
|
+
const range = document.createRange();
|
|
70
|
+
range.selectNodeContents(node);
|
|
71
|
+
const rect = Array.from(range.getClientRects()).find((r) => r.width >= 1 && r.height >= 1);
|
|
72
|
+
if (!rect)
|
|
73
|
+
continue;
|
|
74
|
+
if (box.width <= rect.width * 1.5 + 8 && box.height <= rect.height * 1.5 + 8) {
|
|
75
|
+
return { kind: 'centre' };
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
kind: 'text',
|
|
79
|
+
x: rect.left + rect.width / 2 - (box.left + el.clientLeft),
|
|
80
|
+
y: rect.top + rect.height / 2 - (box.top + el.clientTop),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
return { kind: 'centre' };
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The deepest focused element, through open shadow roots and same-origin
|
|
87
|
+
* frames, or null when nothing but the page is focused.
|
|
88
|
+
*
|
|
89
|
+
* Serialised; keep it self-contained.
|
|
90
|
+
*/
|
|
91
|
+
export function deepFocus() {
|
|
92
|
+
let active = document.activeElement;
|
|
93
|
+
for (let depth = 0; active && depth < 20; depth++) {
|
|
94
|
+
if (active.shadowRoot?.activeElement) {
|
|
95
|
+
active = active.shadowRoot.activeElement;
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
const frame = active;
|
|
99
|
+
const inner = frame.tagName === 'IFRAME' ? frame.contentDocument?.activeElement : null;
|
|
100
|
+
if (inner) {
|
|
101
|
+
active = inner;
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
return !active || active === document.body || active === document.documentElement ? null : active;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Whether the focused element is one whose inside cannot be read: a shadow
|
|
110
|
+
* host. A plain element only holds the focus when it is a control, a frame,
|
|
111
|
+
* editable, or given a tab stop; any other element holding it is a host whose
|
|
112
|
+
* root is closed (an open root is followed by {@link deepFocus}). Serialised.
|
|
113
|
+
*/
|
|
114
|
+
export function focusIsOpaque(el) {
|
|
115
|
+
return !el.matches('input,textarea,select,button,a[href],area[href],summary,iframe,object,embed,[contenteditable]:not([contenteditable=false]),[tabindex]');
|
|
116
|
+
}
|
|
117
|
+
/** What a candidate looks like to a person: its role and its name. Serialised. */
|
|
118
|
+
export function describeCandidate(el) {
|
|
119
|
+
const tag = el.tagName.toLowerCase();
|
|
120
|
+
const input = el;
|
|
121
|
+
const implicit = {
|
|
122
|
+
a: 'link',
|
|
123
|
+
button: 'button',
|
|
124
|
+
select: 'combobox',
|
|
125
|
+
textarea: 'textbox',
|
|
126
|
+
summary: 'button',
|
|
127
|
+
li: 'listitem',
|
|
128
|
+
img: 'image',
|
|
129
|
+
nav: 'navigation',
|
|
130
|
+
table: 'table',
|
|
131
|
+
h1: 'heading',
|
|
132
|
+
h2: 'heading',
|
|
133
|
+
h3: 'heading',
|
|
134
|
+
h4: 'heading',
|
|
135
|
+
h5: 'heading',
|
|
136
|
+
h6: 'heading',
|
|
137
|
+
};
|
|
138
|
+
let role = el.getAttribute('role') ?? implicit[tag] ?? tag;
|
|
139
|
+
if (tag === 'input') {
|
|
140
|
+
const type = (input.type || 'text').toLowerCase();
|
|
141
|
+
role = ['checkbox', 'radio'].includes(type)
|
|
142
|
+
? type
|
|
143
|
+
: ['button', 'submit', 'reset', 'image'].includes(type)
|
|
144
|
+
? 'button'
|
|
145
|
+
: 'textbox';
|
|
146
|
+
}
|
|
147
|
+
const raw = el.getAttribute('aria-label') ||
|
|
148
|
+
el.innerText ||
|
|
149
|
+
el.textContent ||
|
|
150
|
+
input.value ||
|
|
151
|
+
el.getAttribute('title') ||
|
|
152
|
+
el.getAttribute('placeholder') ||
|
|
153
|
+
'';
|
|
154
|
+
return { role, name: raw.replace(/\s+/g, ' ').trim().slice(0, 80) };
|
|
155
|
+
}
|
|
156
|
+
/** Why an action that stopped before touching the page stopped, in a clause. */
|
|
157
|
+
export function noEffectReason(error) {
|
|
158
|
+
const text = error instanceof Error ? error.message : String(error);
|
|
159
|
+
if (/intercepts pointer events/i.test(text))
|
|
160
|
+
return 'another element is covering it';
|
|
161
|
+
if (/not visible/i.test(text))
|
|
162
|
+
return 'it is not visible';
|
|
163
|
+
if (/not enabled/i.test(text))
|
|
164
|
+
return 'it is disabled';
|
|
165
|
+
if (/not stable/i.test(text))
|
|
166
|
+
return 'it kept moving';
|
|
167
|
+
if (/not attached|detached/i.test(text))
|
|
168
|
+
return 'it left the page';
|
|
169
|
+
if (/outside of the viewport/i.test(text))
|
|
170
|
+
return 'it is outside the visible area and could not be scrolled in';
|
|
171
|
+
if (/timeout/i.test(text))
|
|
172
|
+
return 'it did not become ready to act on in time';
|
|
173
|
+
return (text.split('\n')[0] ?? '').slice(0, 160);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Did a failed action stop before it did anything? Playwright logs
|
|
177
|
+
* "performing <action> action" the moment it sends input, so a timeout whose
|
|
178
|
+
* log never reaches that line left the page alone. Anything else — including
|
|
179
|
+
* an error that carries no log — may have changed the page.
|
|
180
|
+
*/
|
|
181
|
+
export function failedBeforeActing(error) {
|
|
182
|
+
if (!(error instanceof Error))
|
|
183
|
+
return false;
|
|
184
|
+
const text = error.message;
|
|
185
|
+
if (error.name !== 'TimeoutError' && !/Timeout \d+ms exceeded/.test(text))
|
|
186
|
+
return false;
|
|
187
|
+
return !/performing \w+ action|action done|scheduled navigations|\.(?:type|pressSequentially|fill)\(/i.test(text);
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=reach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reach.js","sourceRoot":"","sources":["../src/reach.ts"],"names":[],"mappings":"AAUA,kGAAkG;AAClG,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,QAAQ;IACR,OAAO;IACP,KAAK;IACL,WAAW;IACX,UAAU;IACV,QAAQ;IACR,MAAM;IACN,KAAK;IACL,OAAO;CACE,CAAA;AAIV,6EAA6E;AAC7E,MAAM,UAAU,QAAQ,CAAC,GAAW;IACnC,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;IACvC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAA;AAC9D,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,YAAY,CAAC,GAAa;IACzC,OAAO,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,OAAO,CAAA;AAC1C,CAAC;AAED,sEAAsE;AACtE,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAA;AAE9B,uCAAuC;AACvC,MAAM,CAAC,MAAM,cA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KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;AACjD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAChD,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAA;IAC1B,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAA;IACvF,OAAO,CAAC,8FAA8F,CAAC,IAAI,CAC1G,IAAI,CACJ,CAAA;AACF,CAAC"}
|
package/dist/settle.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Waiting for a page to go quiet, as a small state machine over an injected
|
|
3
|
+
* clock and probe so that its timing can be tested without waiting.
|
|
4
|
+
*
|
|
5
|
+
* A page is quiet when nothing in it has changed and no request is in flight
|
|
6
|
+
* for `quietMs`. The wait is capped: a page that animates or polls forever is
|
|
7
|
+
* never quiet, and the caller reports that instead of waiting on it.
|
|
8
|
+
*/
|
|
9
|
+
/** Time, as the host or a test supplies it. */
|
|
10
|
+
export interface SettleClock {
|
|
11
|
+
now(): number;
|
|
12
|
+
sleep(ms: number): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
/** How long the page has been still, in milliseconds; 0 while a request is in flight. */
|
|
15
|
+
export interface SettleProbe {
|
|
16
|
+
stillForMs(): Promise<number>;
|
|
17
|
+
}
|
|
18
|
+
export interface SettleOptions {
|
|
19
|
+
/** How long the page must be still. */
|
|
20
|
+
readonly quietMs: number;
|
|
21
|
+
/** The longest the whole wait may take. */
|
|
22
|
+
readonly capMs: number;
|
|
23
|
+
/** How often the probe is read. Default: a fifth of `quietMs`, at least 20. */
|
|
24
|
+
readonly pollMs?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface SettleOutcome {
|
|
27
|
+
/** The page went quiet before the cap. */
|
|
28
|
+
readonly quiet: boolean;
|
|
29
|
+
/** How long the wait took. */
|
|
30
|
+
readonly waitedMs: number;
|
|
31
|
+
readonly capMs: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Wait until `probe` has reported `quietMs` of stillness, or `capMs` has
|
|
35
|
+
* passed. The stillness is never counted from before the wait began, so an
|
|
36
|
+
* event that is still on its way to the host (a popup, a request the browser
|
|
37
|
+
* has not announced yet) has `quietMs` to arrive.
|
|
38
|
+
*/
|
|
39
|
+
export declare function waitUntilQuiet(clock: SettleClock, probe: SettleProbe, options: SettleOptions): Promise<SettleOutcome>;
|
|
40
|
+
//# sourceMappingURL=settle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settle.d.ts","sourceRoot":"","sources":["../src/settle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+CAA+C;AAC/C,MAAM,WAAW,WAAW;IAC3B,GAAG,IAAI,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAChC;AAED,yFAAyF;AACzF,MAAM,WAAW,WAAW;IAC3B,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CAC7B;AAED,MAAM,WAAW,aAAa;IAC7B,uCAAuC;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,aAAa;IAC7B,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,8BAA8B;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACtB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CACnC,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,aAAa,GACpB,OAAO,CAAC,aAAa,CAAC,CAYxB"}
|
package/dist/settle.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Waiting for a page to go quiet, as a small state machine over an injected
|
|
3
|
+
* clock and probe so that its timing can be tested without waiting.
|
|
4
|
+
*
|
|
5
|
+
* A page is quiet when nothing in it has changed and no request is in flight
|
|
6
|
+
* for `quietMs`. The wait is capped: a page that animates or polls forever is
|
|
7
|
+
* never quiet, and the caller reports that instead of waiting on it.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Wait until `probe` has reported `quietMs` of stillness, or `capMs` has
|
|
11
|
+
* passed. The stillness is never counted from before the wait began, so an
|
|
12
|
+
* event that is still on its way to the host (a popup, a request the browser
|
|
13
|
+
* has not announced yet) has `quietMs` to arrive.
|
|
14
|
+
*/
|
|
15
|
+
export async function waitUntilQuiet(clock, probe, options) {
|
|
16
|
+
const { quietMs, capMs } = options;
|
|
17
|
+
const poll = Math.max(20, options.pollMs ?? Math.floor(quietMs / 5));
|
|
18
|
+
const start = clock.now();
|
|
19
|
+
for (;;) {
|
|
20
|
+
const elapsed = clock.now() - start;
|
|
21
|
+
const still = Math.min(await probe.stillForMs(), clock.now() - start);
|
|
22
|
+
if (still >= quietMs)
|
|
23
|
+
return { quiet: true, waitedMs: clock.now() - start, capMs };
|
|
24
|
+
if (elapsed >= capMs)
|
|
25
|
+
return { quiet: false, waitedMs: clock.now() - start, capMs };
|
|
26
|
+
const remainingToQuiet = Math.max(1, quietMs - still);
|
|
27
|
+
await clock.sleep(Math.min(poll, remainingToQuiet, Math.max(1, capMs - elapsed)));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=settle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settle.js","sourceRoot":"","sources":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 @@
|
|
|
1
|
-
import type { BrowserRefDescription } from '@namzu/sdk';
|
|
1
|
+
import type { BrowserEffect, BrowserRefDescription } from '@namzu/sdk';
|
|
2
2
|
import type { Locator, Page } from 'playwright-core';
|
|
3
3
|
import { type InvisibleBoxes, type Rect } from './page-scripts.js';
|
|
4
4
|
/**
|
|
@@ -51,20 +51,98 @@ export interface RenderedSnapshot {
|
|
|
51
51
|
}
|
|
52
52
|
/** What a credential field's value is shown as. */
|
|
53
53
|
export declare const REDACTED = "[value hidden: password or one-time code]";
|
|
54
|
+
/** Most options of one select that are listed; the chosen ones are always kept. */
|
|
55
|
+
export declare const SELECT_OPTIONS_SHOWN = 40;
|
|
54
56
|
/**
|
|
55
57
|
* Render nodes as the snapshot text the model reads, one element per line:
|
|
56
58
|
*
|
|
57
59
|
* ```text
|
|
58
60
|
* - link "Pricing" [ref=e7]:
|
|
59
61
|
* - /url: /pricing
|
|
60
|
-
* - textbox "Email" [ref=e9]
|
|
62
|
+
* - textbox "Email" [ref=e9]: ada@example.com
|
|
63
|
+
* - combobox "Plan" [ref=e11]: Gold
|
|
64
|
+
* - option "Free"
|
|
65
|
+
* - option "Gold" [selected]
|
|
61
66
|
* ```
|
|
62
67
|
*
|
|
68
|
+
* Every control's line carries what it holds. A native select lists its
|
|
69
|
+
* options, the chosen ones marked: the browser reports them with empty boxes,
|
|
70
|
+
* which would read as invisible, so an option under a combobox or listbox is
|
|
71
|
+
* never dropped for its size.
|
|
72
|
+
*
|
|
63
73
|
* Dropped: `aria-hidden` subtrees, and the own text of nodes nobody can see
|
|
64
74
|
* (their visible children are kept, one level up). With `rootRef`, only that
|
|
65
75
|
* element's subtree; `undefined` when the ref is not in the tree.
|
|
66
76
|
*/
|
|
67
77
|
export declare function renderAriaTree(nodes: readonly (string | AriaNode)[], hidden?: InvisibleBoxes, rootRef?: string, redact?: ReadonlySet<string>): RenderedSnapshot | undefined;
|
|
78
|
+
/** The element a ref names as a one-node tree, so a view can be cut to it; `undefined` when it is not there. */
|
|
79
|
+
export declare function subtreeOf(nodes: readonly (string | AriaNode)[], ref: string): readonly AriaNode[] | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Only the elements a call can act on, one line each, in page order, with the
|
|
82
|
+
* heading or landmark they sit under. Cheap to read and to re-read; refs are
|
|
83
|
+
* the same as in the full tree.
|
|
84
|
+
*/
|
|
85
|
+
export declare function renderInteractive(nodes: readonly (string | AriaNode)[], hidden?: InvisibleBoxes, redact?: ReadonlySet<string>): string;
|
|
86
|
+
/** What a find looks for. */
|
|
87
|
+
export interface FindQuery {
|
|
88
|
+
readonly query?: string;
|
|
89
|
+
readonly role?: string;
|
|
90
|
+
}
|
|
91
|
+
/** The result of a find: the matching lines (at most `max`) and how many matched in all. */
|
|
92
|
+
export interface FindResult {
|
|
93
|
+
readonly lines: readonly string[];
|
|
94
|
+
readonly total: number;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Elements whose name, own text or direct text contains `query`
|
|
98
|
+
* (case-insensitive), and/or that have the given role. Each match is its tree
|
|
99
|
+
* line with its ref and the nearest named ancestor, so a model can reach
|
|
100
|
+
* something a long page keeps out of sight. A match with no ref of its own (a
|
|
101
|
+
* table cell, a label) is listed with its text and the nearest ref above it.
|
|
102
|
+
*/
|
|
103
|
+
export declare function findInTree(nodes: readonly (string | AriaNode)[], hidden: InvisibleBoxes, redact: ReadonlySet<string>, find: FindQuery, max: number): FindResult;
|
|
104
|
+
/**
|
|
105
|
+
* The page's text without markup: headings as `#` lines, then paragraphs,
|
|
106
|
+
* list items, cells and the like, one per line. For reading an article, where
|
|
107
|
+
* a tree costs more than it tells.
|
|
108
|
+
*/
|
|
109
|
+
export declare function renderReading(nodes: readonly (string | AriaNode)[], hidden?: InvisibleBoxes, redact?: ReadonlySet<string>): string;
|
|
110
|
+
/** What changed between two renderings of a page's tree. */
|
|
111
|
+
export interface LineDiff {
|
|
112
|
+
readonly added: number;
|
|
113
|
+
readonly removed: number;
|
|
114
|
+
/** The first `shown` lines that appeared, in page order, indentation and the list dash dropped. */
|
|
115
|
+
readonly addedLines: readonly string[];
|
|
116
|
+
readonly removedLines: readonly string[];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Lines present after and not before (added) and before and not after
|
|
120
|
+
* (removed), compared as a multiset on the trimmed line. Refs of an element
|
|
121
|
+
* that stays do not change between snapshots, so a line that is unchanged is
|
|
122
|
+
* the same text on both sides; a control whose value changed shows as one
|
|
123
|
+
* line removed and one added.
|
|
124
|
+
*/
|
|
125
|
+
export declare function diffLines(before: string, after: string, shown?: number): LineDiff;
|
|
126
|
+
/** What the host knew of an action's surroundings, before and after it. */
|
|
127
|
+
export interface EffectFacts {
|
|
128
|
+
readonly beforeTree: string;
|
|
129
|
+
readonly afterTree: string;
|
|
130
|
+
readonly urlBefore: string;
|
|
131
|
+
readonly urlNow: string;
|
|
132
|
+
readonly tabsBefore: number;
|
|
133
|
+
readonly tabsNow: number;
|
|
134
|
+
readonly settle: {
|
|
135
|
+
readonly quiet: boolean;
|
|
136
|
+
readonly waitedMs: number;
|
|
137
|
+
readonly capMs: number;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The effect of one action, computed from the tree before and after it. The
|
|
142
|
+
* host reads the two trees; everything the model is told about the result
|
|
143
|
+
* comes from here, so a test can feed two trees and check the line.
|
|
144
|
+
*/
|
|
145
|
+
export declare function buildEffect(facts: EffectFacts, shown?: number): BrowserEffect;
|
|
68
146
|
/**
|
|
69
147
|
* Take a whole-page snapshot. `ariaSnapshotJSON` returns one root node or a
|
|
70
148
|
* list; either way the result is a list.
|
package/dist/snapshot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../src/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"snapshot.d.ts","sour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