@orkestrel/scaffold 0.0.115 → 0.0.116
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/dist/bin/main.js +137 -15
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +1 -1
- package/dist/host/claude/agents/orkestrel.md +1 -1
- package/dist/host/claude/rules/names.md +3 -1
- package/dist/host/guides/abort.md +17 -17
- package/dist/host/guides/agent.md +445 -445
- package/dist/host/guides/brief.md +143 -143
- package/dist/host/guides/browser.md +731 -731
- package/dist/host/guides/budget.md +39 -39
- package/dist/host/guides/capture.md +298 -298
- package/dist/host/guides/console.md +109 -109
- package/dist/host/guides/contract.md +335 -335
- package/dist/host/guides/csv.md +30 -30
- package/dist/host/guides/database.md +163 -163
- package/dist/host/guides/emitter.md +17 -17
- package/dist/host/guides/form.md +99 -99
- package/dist/host/guides/guide.md +361 -183
- package/dist/host/guides/html.md +49 -49
- package/dist/host/guides/indexeddb.md +40 -40
- package/dist/host/guides/interpret.md +139 -139
- package/dist/host/guides/lsp.md +114 -114
- package/dist/host/guides/markdown.md +68 -68
- package/dist/host/guides/mcp.md +3745 -3745
- package/dist/host/guides/middleware.md +170 -170
- package/dist/host/guides/msg.md +95 -95
- package/dist/host/guides/ndjson.md +8 -8
- package/dist/host/guides/ollama.md +56 -56
- package/dist/host/guides/pool.md +21 -21
- package/dist/host/guides/probe.md +82 -82
- package/dist/host/guides/process.md +99 -99
- package/dist/host/guides/program.md +98 -96
- package/dist/host/guides/qualifier.md +70 -70
- package/dist/host/guides/queue.md +37 -37
- package/dist/host/guides/rater.md +38 -38
- package/dist/host/guides/reason.md +308 -308
- package/dist/host/guides/relation.md +50 -50
- package/dist/host/guides/router.md +58 -58
- package/dist/host/guides/scaffold.md +554 -419
- package/dist/host/guides/sea.md +128 -128
- package/dist/host/guides/server.md +100 -100
- package/dist/host/guides/sqlite.md +28 -28
- package/dist/host/guides/sse.md +20 -20
- package/dist/host/guides/study.md +444 -444
- package/dist/host/guides/table.md +82 -82
- package/dist/host/guides/template.md +41 -41
- package/dist/host/guides/terminal.md +121 -121
- package/dist/host/guides/test.md +273 -273
- package/dist/host/guides/timeout.md +18 -18
- package/dist/host/guides/tool.md +27 -27
- package/dist/host/guides/toolbox.md +166 -166
- package/dist/host/guides/websocket.md +54 -54
- package/dist/host/guides/worker.md +24 -24
- package/dist/host/guides/workflow.md +187 -187
- package/dist/host/guides/workspace.md +55 -55
- package/dist/host/manifest.json +55 -55
- package/dist/host/tests/setupPolicy.ts +5 -3
- package/dist/src/core/index.cjs +89 -3
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +229 -144
- package/dist/src/core/index.d.ts +229 -144
- package/dist/src/core/index.js +87 -4
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +292 -66
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +188 -6
- package/dist/src/server/index.d.ts +188 -6
- package/dist/src/server/index.js +287 -69
- package/dist/src/server/index.js.map +1 -1
- package/package.json +4 -3
package/dist/host/guides/test.md
CHANGED
|
@@ -112,27 +112,27 @@ member and `plus` introducing its call-signature members, and a type alias's own
|
|
|
112
112
|
a union's arms escaped as `\|`. An extended interface's name comes before `plus`, with the members
|
|
113
113
|
it adds after.
|
|
114
114
|
|
|
115
|
-
|
|
|
116
|
-
| -------------------------- | --------- |
|
|
117
|
-
| `WaitOptions` | interface | `{ budget?, interval?, signal? }`
|
|
118
|
-
| `RetryOptions` | interface | `
|
|
119
|
-
| `TextWaitOptions` | interface | `
|
|
120
|
-
| `EventSubscriber` | type | `(listener) =>
|
|
121
|
-
| `RetryObservation` | interface | `{ last, cause }`
|
|
122
|
-
| `RecorderInterface` | interface | `{ calls, count, handler }`
|
|
123
|
-
| `EventSourceInterface` | interface | `{
|
|
124
|
-
| `RecorderMap` | type | `{ readonly [K in TName]: RecorderInterface<TMap[K]
|
|
125
|
-
| `SignalInterface` | interface | `{ controller, signal, count }`
|
|
126
|
-
| `SignalRegistration` | type | `readonly [listener, installed, capture, cleanup]`
|
|
127
|
-
| `ResourceFactoryInterface` | interface | `{ created, destroyed
|
|
128
|
-
| `TeardownInterface` | interface | `{ count
|
|
129
|
-
| `TeardownHandler` | type | `() => void \| Promise<void>`
|
|
130
|
-
| `JSONSafe` | type | `JSONSafe<T
|
|
131
|
-
| `HeadersSource` | type | `NonNullable<ConstructorParameters<typeof Headers>[0]>`
|
|
132
|
-
| `JourneyVariant` | interface | `{ name, width, height }`
|
|
133
|
-
| `StatechartStatus` | type | `'pending' \| 'idle' \| 'running' \| 'passed' \| 'failed'`
|
|
134
|
-
| `StateTransition` | interface | `{ name, from, event, to }`
|
|
135
|
-
| `StateScenario` | interface | `{ transition
|
|
115
|
+
| Name | Kind | Signature | Summary |
|
|
116
|
+
| -------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
117
|
+
| `WaitOptions` | interface | `{ budget?, interval?, signal? }` | Configures a bounded asynchronous wait with an elapsed-time limit, a delay between readings, and an abort signal. |
|
|
118
|
+
| `RetryOptions` | interface | `{ attempts? }` | Configures a bounded retry, adding an optional producer-call limit to a bounded wait's bounds. |
|
|
119
|
+
| `TextWaitOptions` | interface | `{ exact?, absent? }` | Configures a bounded wait over a reading of text. |
|
|
120
|
+
| `EventSubscriber` | type | `(listener: (...args: TArgs) => void) => (() => void) \| void` | Subscribes a listener to one event source. |
|
|
121
|
+
| `RetryObservation` | interface | `{ last, cause }` | Holds the latest produced text and producer refusal across a retry history. |
|
|
122
|
+
| `RecorderInterface` | interface | `{ calls, count, handler, clear() }` | Records every call made to its handler. |
|
|
123
|
+
| `EventSourceInterface` | interface | `{ on() }` | Subscribes handlers to a typed event source. |
|
|
124
|
+
| `RecorderMap` | type | `{ readonly [K in TName]: RecorderInterface<TMap[K]>; }` | Maps event names to recorders for their delivered argument tuples. |
|
|
125
|
+
| `SignalInterface` | interface | `{ controller, signal, count }` | Holds a real abort signal and controller instrumented with its live abort-listener tally. |
|
|
126
|
+
| `SignalRegistration` | type | `readonly [ listener: EventListener \| EventListenerObject, installed: EventListener \| EventListenerObject, capture: boolean, cleanup: AbortController \| undefined ]` | Represents one abort listener an instrumented signal installed, as its tally holds it. |
|
|
127
|
+
| `ResourceFactoryInterface` | interface | `{ created, destroyed, create(), destroy() }` | Represents a numbered resource factory with records of every creation and destruction. |
|
|
128
|
+
| `TeardownInterface` | interface | `{ count, add(), destroy() }` | Represents the cleanup a test adds as it goes and runs once, newest first, when it is done. |
|
|
129
|
+
| `TeardownHandler` | type | `() => void \| Promise<void>` | Represents the work one teardown entry performs when the list is destroyed. |
|
|
130
|
+
| `JSONSafe` | type | `unknown extends T ? T : T extends string \| number \| boolean \| null ? T : T extends ReadonlyArray<infer E> ? ReadonlyArray<JSONSafe<E>> : T extends (...args: never[]) => unknown ? never : T extends object ? object extends T ? never : { readonly [K in keyof T]: K extends symbol ? never : JSONSafe<T[K]>; } : never` | Represents the JSON-safe projection of a type: every member JSON preserves, mapped to itself, and every member it does not, mapped to `never`. |
|
|
131
|
+
| `HeadersSource` | type | `NonNullable<ConstructorParameters<typeof Headers>[0]>` | Covers any value the host `Headers` constructor accepts. |
|
|
132
|
+
| `JourneyVariant` | interface | `{ name, width, height }` | Represents one theme-and-viewport pair in the form a project configuration can serialize. |
|
|
133
|
+
| `StatechartStatus` | type | `'pending' \| 'idle' \| 'running' \| 'passed' \| 'failed'` | Names the run state a statechart harness publishes through its status attribute. |
|
|
134
|
+
| `StateTransition` | interface | `{ name, from, event, to }` | Represents one row of a statechart table: the entity's state before an event, the event, and the state that event must leave it in. |
|
|
135
|
+
| `StateScenario` | interface | `{ transition, arrange(), act(), assert() }` | Drives one `StateTransition` through the three phases that prove it. |
|
|
136
136
|
|
|
137
137
|
Each interface's call-signature members are listed under [Methods](#methods). `Result`, `Success`,
|
|
138
138
|
and `Failure` come from `@orkestrel/contract` (mirrored at [`contract.md`](contract.md)) and are not
|
|
@@ -140,21 +140,21 @@ re-exported; `retryUntil` reads `Result` internally.
|
|
|
140
140
|
|
|
141
141
|
The chooser wire contract is shared by the browser journey and its server command.
|
|
142
142
|
|
|
143
|
-
|
|
|
144
|
-
| ---------------- | --------- |
|
|
145
|
-
| `FixtureFile` | interface | `{ name, mime, bytes }`
|
|
146
|
-
| `ChoiceOptions` | interface | `{ keyboard?, budget? }`
|
|
147
|
-
| `ChooserRequest` | interface | `
|
|
143
|
+
| Name | Kind | Signature | Summary |
|
|
144
|
+
| ---------------- | --------- | ------------------------ | ------------------------------------------------------------------------------------- |
|
|
145
|
+
| `FixtureFile` | interface | `{ name, mime, bytes }` | Represents one fixture file as a name, media type, and immutable bytes. |
|
|
146
|
+
| `ChoiceOptions` | interface | `{ keyboard?, budget? }` | Configures native file-picker activation and its bounded provider wait. |
|
|
147
|
+
| `ChooserRequest` | interface | `{ selector, files }` | Carries a resolved file-input selector and fixture selection to the browser provider. |
|
|
148
148
|
|
|
149
149
|
#### Constants
|
|
150
150
|
|
|
151
151
|
A `Shape` cell holds the constant's declared type.
|
|
152
152
|
|
|
153
|
-
|
|
|
154
|
-
| ----------------------- | ----- |
|
|
155
|
-
| `TIMER_LEAD` | const | `
|
|
156
|
-
| `STATECHART_ATTRIBUTES` | const | `Readonly<
|
|
157
|
-
| `STATECHART_STATUSES` | const | `readonly [
|
|
153
|
+
| Name | Kind | Signature | Summary |
|
|
154
|
+
| ----------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
155
|
+
| `TIMER_LEAD` | const | `2` | Bounds how far a real timer can end short of its duration, in whole milliseconds. |
|
|
156
|
+
| `STATECHART_ATTRIBUTES` | const | `Readonly<{ status: "data-statechart-status"; passed: "data-statechart-passed"; failed: "data-statechart-failed"; total: "data-statechart-total"; scenario: "data-statechart-scenario"; result: "data-statechart-result"; state: "data-statechart-state"; }>` | Names the attributes a statechart harness publishes, keyed by the fact each one carries. |
|
|
157
|
+
| `STATECHART_STATUSES` | const | `readonly ["pending", "idle", "running", "passed", "failed"]` | Lists every value a statechart harness reports through its `status` attribute. |
|
|
158
158
|
|
|
159
159
|
A harness renders the attributes and a gate outside the page polls them, so the names are the whole
|
|
160
160
|
contract between the two. `status`, `passed`, `failed`, and `total` belong on the harness root,
|
|
@@ -171,9 +171,9 @@ throw. `StatechartStatus` is the same set of readings as a named union.
|
|
|
171
171
|
|
|
172
172
|
In a guard table a `Shape` cell holds the type the guard narrows to.
|
|
173
173
|
|
|
174
|
-
|
|
|
175
|
-
| ----------------------- | -------- |
|
|
176
|
-
| `isRecorderMapComplete` | function |
|
|
174
|
+
| Name | Kind | Signature | Summary |
|
|
175
|
+
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
|
176
|
+
| `isRecorderMapComplete` | function | `<TMap extends Record<string, readonly unknown[]>, TName extends keyof TMap>(value: unknown, events: readonly TName[]) => value is RecorderMap<TMap, TName>` | Checks whether a value contains a recorder for every listed event. |
|
|
177
177
|
|
|
178
178
|
`isRecorderMapComplete` takes the events as a second parameter rather than reading them off the
|
|
179
179
|
value, because the listed events are what completeness is measured against. It reads each listed key
|
|
@@ -187,33 +187,33 @@ instead of propagating.
|
|
|
187
187
|
|
|
188
188
|
#### Helpers
|
|
189
189
|
|
|
190
|
-
|
|
|
191
|
-
| ------------------------ | -------- |
|
|
192
|
-
| `waitForCondition` | function | `(description, condition
|
|
193
|
-
| `retryUntil` | function |
|
|
194
|
-
| `waitForEvent` | function |
|
|
195
|
-
| `waitForText` | function | `(description, read, text, options
|
|
196
|
-
| `checkBounds` | function | `(subject: string, budget: number, interval: number) => void`
|
|
197
|
-
| `captureProduction` | function | `<T>(produce: () => T \| Promise<T>) => Promise<Readonly<PromiseSettledResult<T>>>`
|
|
198
|
-
| `renderRetryValue` | function | `(value: unknown) => string`
|
|
199
|
-
| `buildRetryExhausted` | function | `(description, budget, elapsed, last, cause) => Error`
|
|
200
|
-
| `buildRefusal` | function | `(name: string, cause: unknown) => Error`
|
|
201
|
-
| `dropRegistration` | function | `(registrations: SignalRegistration[], installed) => SignalRegistration \| undefined`
|
|
202
|
-
| `decodeJSONLines` | function | `(text: string) => readonly unknown[]`
|
|
203
|
-
| `collectSelectorClasses` | function | `(selector: string) => readonly string[]`
|
|
204
|
-
| `waitForDelay` | function | `(ms?: number) => Promise<void>`
|
|
205
|
-
| `waitForAbort` | function | `(signal: AbortSignal) => Promise<void>`
|
|
206
|
-
| `captureError` | function | `(thunk: () => unknown) => unknown`
|
|
207
|
-
| `requireValue` | function | `<T>(value: T \| null \| undefined, message?: string) => T`
|
|
208
|
-
| `collect` | function | `<T>(source: AsyncIterable<T>) => Promise<readonly T[]>`
|
|
209
|
-
| `collectStream` | function | `<T>(stream: ReadableStream<T>) => Promise<readonly T[]>`
|
|
210
|
-
| `roundTripJSON` | function | `<T>(value: T & JSONSafe<T>) => T`
|
|
211
|
-
| `invokeUnchecked` | function | `<T>(target: unknown, method: unknown, args: readonly unknown[]) => T`
|
|
212
|
-
| `readProperty` | function | `<T>(target: unknown, key: PropertyKey) => T`
|
|
213
|
-
| `flattenHeaders` | function | `(init: HeadersSource) => Readonly<Record<string, string>>`
|
|
214
|
-
| `resolveRoot` | function | `(meta: ImportMeta) => URL`
|
|
215
|
-
| `executeScenario` | function |
|
|
216
|
-
| `executeScenarios` | function |
|
|
190
|
+
| Name | Kind | Signature | Summary |
|
|
191
|
+
| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
192
|
+
| `waitForCondition` | function | `(description: string, condition: () => boolean \| Promise<boolean>, options?: WaitOptions) => Promise<void>` | Waits until a condition holds within an elapsed-time budget. |
|
|
193
|
+
| `retryUntil` | function | `<T>(description: string, produce: () => T \| Promise<T>, satisfied: (value: T) => boolean, options?: RetryOptions) => Promise<T>` | Repeats a producer until one produced value satisfies a predicate. |
|
|
194
|
+
| `waitForEvent` | function | `<TArgs extends readonly unknown[]>(subscribe: EventSubscriber<TArgs>, description: string, options?: WaitOptions) => Promise<TArgs>` | Waits for the first delivery from an event subscription. |
|
|
195
|
+
| `waitForText` | function | `(description: string, read: () => string, text: string, options?: TextWaitOptions) => Promise<string>` | Waits until a reading of text carries an expected sentence. |
|
|
196
|
+
| `checkBounds` | function | `(subject: string, budget: number, interval: number) => void` | Checks the resolved bounds one bounded wait runs under. |
|
|
197
|
+
| `captureProduction` | function | `<T>(produce: () => T \| Promise<T>) => Promise<Readonly<PromiseSettledResult<T>>>` | Captures a synchronous or asynchronous producer's value or exact refusal. |
|
|
198
|
+
| `renderRetryValue` | function | `(value: unknown) => string` | Renders a retry value as JSON, plain text, or an unreadable-value marker. |
|
|
199
|
+
| `buildRetryExhausted` | function | `(description: string, budget: number, elapsed: number, last: string \| undefined, cause: unknown) => Error` | Builds the error `retryUntil` raises when its elapsed-time budget runs out. |
|
|
200
|
+
| `buildRefusal` | function | `(name: string, cause: unknown) => Error` | Builds the error a refused fixture build raises, named for the row it was building for. |
|
|
201
|
+
| `dropRegistration` | function | `(registrations: SignalRegistration[], installed: EventListener \| EventListenerObject) => SignalRegistration \| undefined` | Drops the registration an instrumented signal installed for one listener. |
|
|
202
|
+
| `decodeJSONLines` | function | `(text: string) => readonly unknown[]` | Decodes newline-delimited JSON values. |
|
|
203
|
+
| `collectSelectorClasses` | function | `(selector: string) => readonly string[]` | Collects the class names one selector text names, decoded and without repeats. |
|
|
204
|
+
| `waitForDelay` | function | `(ms?: number) => Promise<void>` | Waits for a host timer to elapse. |
|
|
205
|
+
| `waitForAbort` | function | `(signal: AbortSignal) => Promise<void>` | Waits until an abort signal is aborted. |
|
|
206
|
+
| `captureError` | function | `(thunk: () => unknown) => unknown` | Captures the value thrown by a thunk. |
|
|
207
|
+
| `requireValue` | function | `<T>(value: T \| null \| undefined, message?: string) => T` | Narrows a value away from `null` and `undefined`, throwing when it is absent. |
|
|
208
|
+
| `collect` | function | `<T>(source: AsyncIterable<T>) => Promise<readonly T[]>` | Collects every value from an async iterable. |
|
|
209
|
+
| `collectStream` | function | `<T>(stream: ReadableStream<T>) => Promise<readonly T[]>` | Collects every value from a readable stream. |
|
|
210
|
+
| `roundTripJSON` | function | `<T>(value: T & JSONSafe<T>) => T` | Copies a JSON value through serialization and parsing. |
|
|
211
|
+
| `invokeUnchecked` | function | `<T>(target: unknown, method: unknown, args: readonly unknown[]) => T` | Invokes an unknown method through an explicit unchecked result contract. |
|
|
212
|
+
| `readProperty` | function | `<T>(target: unknown, key: PropertyKey) => T` | Reads a property from an unknown object or function. |
|
|
213
|
+
| `flattenHeaders` | function | `(init: HeadersSource) => Readonly<Record<string, string>>` | Normalizes headers into a frozen plain record. |
|
|
214
|
+
| `resolveRoot` | function | `(meta: ImportMeta) => URL` | Resolves the parent directory of a calling module, which is the workspace root when called from the conventional `tests/setup.ts` location. |
|
|
215
|
+
| `executeScenario` | function | `<TState extends string, TEvent extends string, TContext>(scenario: StateScenario<TState, TEvent, TContext>, context: TContext) => Promise<void>` | Drives one statechart scenario through its arrange, act, and assert phases. |
|
|
216
|
+
| `executeScenarios` | function | `<TState extends string, TEvent extends string, TContext>(scenarios: ReadonlyArray<StateScenario<TState, TEvent, TContext>>, build: (scenario: StateScenario<TState, TEvent, TContext>) => TContext \| Promise<TContext>) => Promise<void>` | Drives a statechart table row by row, each row against a context of its own. |
|
|
217
217
|
|
|
218
218
|
`dropRegistration` is the mechanic `createSignal`'s one-shot and scope-abort paths share, exported
|
|
219
219
|
because both of them call it rather than because a consumer was expected to. Reaching it takes a
|
|
@@ -232,14 +232,14 @@ selector alphabet such as a declaration block's braces — throws an `Error` rea
|
|
|
232
232
|
|
|
233
233
|
#### Factories
|
|
234
234
|
|
|
235
|
-
|
|
|
236
|
-
| ----------------------- | -------- |
|
|
237
|
-
| `createHostileValues` | function | `() => readonly unknown[]`
|
|
238
|
-
| `createRecorder` | function | `<TArgs extends readonly unknown[]>() => RecorderInterface<TArgs>`
|
|
239
|
-
| `createRecorders` | function | `<TMap, TName>(source: EventSourceInterface<TMap>, events: readonly TName[]) => RecorderMap<TMap, TName>` | Creates event recorders and subscribes them to the source. |
|
|
240
|
-
| `createSignal` | function | `() => SignalInterface`
|
|
241
|
-
| `createResourceFactory` | function | `() => ResourceFactoryInterface`
|
|
242
|
-
| `createTeardown` | function | `() => TeardownInterface`
|
|
235
|
+
| Name | Kind | Signature | Summary |
|
|
236
|
+
| ----------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
237
|
+
| `createHostileValues` | function | `() => readonly unknown[]` | Creates values that make common object readers throw or violate their assumptions. |
|
|
238
|
+
| `createRecorder` | function | `<TArgs extends readonly unknown[] = readonly unknown[]>() => RecorderInterface<TArgs>` | Creates a recorder for callback arguments. |
|
|
239
|
+
| `createRecorders` | function | `<TMap extends Record<string, readonly unknown[]>, TName extends keyof TMap>(source: EventSourceInterface<TMap>, events: readonly TName[]) => RecorderMap<TMap, TName>` | Creates event recorders and subscribes them to the source. |
|
|
240
|
+
| `createSignal` | function | `() => SignalInterface` | Creates a real abort controller whose signal reports its live abort listeners. |
|
|
241
|
+
| `createResourceFactory` | function | `() => ResourceFactoryInterface` | Creates a monotonically numbered resource factory with creation and destruction records. |
|
|
242
|
+
| `createTeardown` | function | `() => TeardownInterface` | Creates a teardown list that runs registered handlers newest-first. |
|
|
243
243
|
|
|
244
244
|
### Browser
|
|
245
245
|
|
|
@@ -256,7 +256,7 @@ focus reachability, so a status or region can receive an external file drag.
|
|
|
256
256
|
Native file inputs carry no ARIA role. Their journey uses the label resolver and the same visibility,
|
|
257
257
|
enabled-state, focus-order, uniqueness, and active-modal checks as the other controls.
|
|
258
258
|
|
|
259
|
-
|
|
|
259
|
+
| Name | Kind | Signature | Summary |
|
|
260
260
|
| ------------------ | -------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
261
261
|
| `resolveFileInput` | function | `(name: string) => HTMLInputElement` | Resolves one visible, enabled, focus-reachable native file input by its exact label. |
|
|
262
262
|
| `chooseAccessible` | function | `(name: string, files: readonly FixtureFile[], options?: ChoiceOptions) => Promise<void>` | Activates a labeled native file input and fulfills its observed chooser with fixture bytes. |
|
|
@@ -305,203 +305,203 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
305
305
|
member and `plus` introducing its call-signature members, and a type alias's own type literal with
|
|
306
306
|
a union's arms escaped as `\|`.
|
|
307
307
|
|
|
308
|
-
|
|
|
309
|
-
| --------------------- | --------- |
|
|
310
|
-
| `CaptureReader` | type | `(path: string) => Promise<string>`
|
|
311
|
-
| `FrameShot` | interface | `{ path, base64 }`
|
|
312
|
-
| `Color` | type | `readonly [red, green, blue, alpha]`
|
|
313
|
-
| `ContrastOptions` | interface | `{ floor?, opacity? }`
|
|
314
|
-
| `ElementOptions` | interface | `{ classes?, text?, attributes? }`
|
|
315
|
-
| `FrameOptions` | interface | `{ path, width, height, element? }`
|
|
316
|
-
| `FrameOffset` | interface | `{ top, left }`
|
|
317
|
-
| `FrameResult` | interface | `{ width, height, floor }`
|
|
318
|
-
| `CaptureVariant` | interface | `
|
|
319
|
-
| `PortfolioOptions` | interface | `{ states, variants, variant, directory, enabled? }`
|
|
320
|
-
| `PortfolioInterface` | interface | `{ variant, placements, paths, files }`
|
|
321
|
-
| `JournalStep` | interface | `{ action, trigger, result }`
|
|
322
|
-
| `JournalInterface` | interface | `{ steps, output
|
|
323
|
-
| `StateOptions` | interface | `
|
|
324
|
-
| `SettleOptions` | interface | `
|
|
325
|
-
| `AnimationResult` | interface | `{ finite, endless }`
|
|
326
|
-
| `MediaOptions` | interface | `{ print?, motion?, forced?, pointer? }`
|
|
327
|
-
| `StabilityOptions` | interface | `
|
|
328
|
-
| `AccessibilityNode` | interface | `{ role, name, properties }`
|
|
329
|
-
| `SheetAdoption` | interface | `{ sheet
|
|
330
|
-
| `ProtocolPoint` | interface | `{ x, y }`
|
|
331
|
-
| `StorageOptions` | interface | `{ values?, reads?, writes?, quota? }`
|
|
332
|
-
| `WebStorageInterface` | interface | `
|
|
333
|
-
| `CensusResult` | interface | `{ elements, tokens, undeclared }`
|
|
334
|
-
| `ContrastFixture` | interface | `{ root, refused, accepted }`
|
|
335
|
-
| `EscapeFixture` | interface | `{ root, inline, embedded, permitted }`
|
|
336
|
-
| `CensusFixture` | interface | `{ root, token, mark }`
|
|
337
|
-
| `HarnessOptions` | interface | `{ scenarios, build, state, pause? }`
|
|
338
|
-
| `HarnessInterface` | interface | `{ root, status, total, passed, failed, failures
|
|
308
|
+
| Name | Kind | Signature | Summary |
|
|
309
|
+
| --------------------- | --------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
310
|
+
| `CaptureReader` | type | `(path: string) => Promise<string>` | Reads the lowercase hexadecimal SHA-256 digest of a captured file through a browser command. |
|
|
311
|
+
| `FrameShot` | interface | `{ path, base64 }` | Represents the path and base64 bytes returned by Vitest's screenshot operation. |
|
|
312
|
+
| `Color` | type | `readonly [red: number, green: number, blue: number, alpha: number]` | Represents one rendered color as straight sRGB channels and its alpha. |
|
|
313
|
+
| `ContrastOptions` | interface | `{ floor?, opacity? }` | Configures one color contrast reading: the surface the backdrop walk ends on, and the opacity the painted color is shown at. |
|
|
314
|
+
| `ElementOptions` | interface | `{ classes?, text?, attributes? }` | Configures one built element: its class list, its text, and its attributes. |
|
|
315
|
+
| `FrameOptions` | interface | `{ path, width, height, element? }` | Configures one captured frame: where it is written, the viewport it is shot at, and what it shoots. |
|
|
316
|
+
| `FrameOffset` | interface | `{ top, left }` | Represents how far an element frame moves the tester frame from the runner window's origin for the shot, in CSS pixels. |
|
|
317
|
+
| `FrameResult` | interface | `{ width, height, floor }` | Represents one written frame read back from the file a capture produced: its size in device pixels, and the single color its bottom row paints. |
|
|
318
|
+
| `CaptureVariant` | interface | `{ apply? }` | Adds to a journey variant the document change a capture run applies before resizing. |
|
|
319
|
+
| `PortfolioOptions` | interface | `{ states, variants, variant, directory, enabled? }` | Configures a capture portfolio: the state registry, the variant matrix, this run's variant, where it writes, and whether it writes at all. |
|
|
320
|
+
| `PortfolioInterface` | interface | `{ variant, placements, paths, files, place() }` | Holds the registry of capture states one run places, and the files it wrote placing them. |
|
|
321
|
+
| `JournalStep` | interface | `{ action, trigger, result }` | Represents one scripted step a journal recorded, and what the surface did about it. |
|
|
322
|
+
| `JournalInterface` | interface | `{ steps, output, start(), stop(), record() }` | Records one scenario: every step it took and everything the page said while it ran. |
|
|
323
|
+
| `StateOptions` | interface | `{ absent? }` | Configures a bounded wait over the states a control announces. |
|
|
324
|
+
| `SettleOptions` | interface | `{ pointer? }` | Configures one capture settle: the time bounds of `WaitOptions` and whether the pointer parks first. |
|
|
325
|
+
| `AnimationResult` | interface | `{ finite, endless }` | Represents the animations running on one element and its subtree, split by whether each one ends. |
|
|
326
|
+
| `MediaOptions` | interface | `{ print?, motion?, forced?, pointer? }` | Configures the tester's print medium, motion preference, forced colours, and pointer precision. |
|
|
327
|
+
| `StabilityOptions` | interface | `{ frames? }` | Configures how long a reading must hold still: the time bounds of `WaitOptions` and the count of reads it must agree across. |
|
|
328
|
+
| `AccessibilityNode` | interface | `{ role, name, properties }` | Represents the accessibility node the browser computed for one element. |
|
|
329
|
+
| `SheetAdoption` | interface | `{ sheet, release() }` | Describes an adopted stylesheet and its idempotent release operation. |
|
|
330
|
+
| `ProtocolPoint` | interface | `{ x, y }` | Represents one point in the coordinates of the browser's top-level viewport, the space a DevTools input command addresses. |
|
|
331
|
+
| `StorageOptions` | interface | `{ values?, reads?, writes?, quota? }` | Configures an inert `Storage`: its seed, which operations the host permits, and its quota. |
|
|
332
|
+
| `WebStorageInterface` | interface | `{ permit(), clear(), getItem(), key(), removeItem(), setItem() }` | Holds a store the host can withhold and later grant. |
|
|
333
|
+
| `CensusResult` | interface | `{ elements, tokens, undeclared }` | Reports an authored-class census: the population walked, the tokens found, and the undeclared. |
|
|
334
|
+
| `ContrastFixture` | interface | `{ root, refused, accepted }` | Holds a detached translucent stack whose flat and composited readings disagree across one bar. |
|
|
335
|
+
| `EscapeFixture` | interface | `{ root, inline, embedded, permitted }` | Holds detached markup a style-escape reading must find, and the one it must leave alone. |
|
|
336
|
+
| `CensusFixture` | interface | `{ root, token, mark }` | Holds detached markup an authored-class census must report as undeclared. |
|
|
337
|
+
| `HarnessOptions` | interface | `{ scenarios, build, state, pause? }` | Configures the harness that renders one transition table and drives it row by row. |
|
|
338
|
+
| `HarnessInterface` | interface | `{ root, status, total, passed, failed, failures, execute(), destroy() }` | Holds a mounted statechart harness, the tally it publishes, and the run it drives. |
|
|
339
339
|
|
|
340
340
|
#### Constants
|
|
341
341
|
|
|
342
342
|
A `Shape` cell holds the constant's declared type.
|
|
343
343
|
|
|
344
|
-
|
|
|
345
|
-
| ----------------------- | ----- |
|
|
346
|
-
| `ACCESSIBLE_ROLES` | const | `readonly string[]`
|
|
347
|
-
| `CANVAS_COLOR` | const | `Color`
|
|
348
|
-
| `CAPTURE_PANE` | const | `
|
|
349
|
-
| `CAPTURE_STAGE_LIMIT` | const | `
|
|
350
|
-
| `CONTENT_ROLES` | const | `readonly string[]`
|
|
351
|
-
| `FIELD_ROLES` | const | `Readonly<Record<string, string>>`
|
|
352
|
-
| `FOCUSABLE_SELECTOR` | const | `
|
|
353
|
-
| `SEGMENTED_INPUT_TYPES` | const | `readonly string[]`
|
|
354
|
-
| `FOCUS_SEGMENT_LIMIT` | const | `
|
|
355
|
-
| `HEADER_ROLES` | const | `Readonly<Record<string, string>>`
|
|
356
|
-
| `IMPLICIT_ROLES` | const | `Readonly<Record<string, string>>`
|
|
357
|
-
| `MEDIA_STAGE` | const | `
|
|
358
|
-
| `POINTER_HOLD` | const | `
|
|
344
|
+
| Name | Kind | Signature | Summary |
|
|
345
|
+
| ----------------------- | ----- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
346
|
+
| `ACCESSIBLE_ROLES` | const | `readonly string[]` | Names the interactive ARIA roles a bare accessible name is searched across. |
|
|
347
|
+
| `CANVAS_COLOR` | const | `Color` | Names the color a browser paints an unstyled document with: opaque white. |
|
|
348
|
+
| `CAPTURE_PANE` | const | `"data-capture-pane"` | Names the attribute marking the runner's tester pane, and the rule that sizes it, while a frame is staged. |
|
|
349
|
+
| `CAPTURE_STAGE_LIMIT` | const | `4` | Bounds the restagings one capture takes before it refuses a document whose height never settles. |
|
|
350
|
+
| `CONTENT_ROLES` | const | `readonly string[]` | Names the roles whose accessible name is the text a reader can see inside them. |
|
|
351
|
+
| `FIELD_ROLES` | const | `Readonly<Record<string, string>>` | Names the role each `input` type carries. |
|
|
352
|
+
| `FOCUSABLE_SELECTOR` | const | `"a[href], area[href], button, input, select, summary, textarea, [tabindex]"` | Names what sequential keyboard navigation can reach, before disabled and unrendered elements go. |
|
|
353
|
+
| `SEGMENTED_INPUT_TYPES` | const | `readonly string[]` | Names the native input types whose editable segments share one focused element. |
|
|
354
|
+
| `FOCUS_SEGMENT_LIMIT` | const | `10` | Bounds consecutive focus landings and the Tab presses budgeted per segmented input. |
|
|
355
|
+
| `HEADER_ROLES` | const | `Readonly<Record<string, string>>` | Names the role a `th` carries for the header axis its `scope` names. |
|
|
356
|
+
| `IMPLICIT_ROLES` | const | `Readonly<Record<string, string>>` | Names the role each listed tag carries in the accessibility tree when it declares none of its own. |
|
|
357
|
+
| `MEDIA_STAGE` | const | `"data-media-stage"` | Names the tester root's attribute holding the media readings observed before the first stage. |
|
|
358
|
+
| `POINTER_HOLD` | const | `"data-pointer-hold"` | Names the tester root's attribute holding the pressed pointer's page coordinates. |
|
|
359
359
|
|
|
360
360
|
#### Helpers
|
|
361
361
|
|
|
362
|
-
|
|
|
363
|
-
| -------------------------- | -------- |
|
|
364
|
-
| `supportsSegmentedFocus` | function | `(element: Element) => boolean`
|
|
365
|
-
| `resolveAccessible` | function | `(name: string) => HTMLElement
|
|
366
|
-
| `resolveAccessibleWithin` | function | `(region: string, role: string, name: string) => HTMLElement`
|
|
367
|
-
| `resolveRendered` | function | `(first: string, second?: string) => HTMLElement`
|
|
368
|
-
| `computeNamePattern` | function | `(name: string) => RegExp`
|
|
369
|
-
| `isOutsideViewport` | function | `(rectangle: DOMRectReadOnly) => boolean`
|
|
370
|
-
| `isRendered` | function | `(element: Element) => boolean`
|
|
371
|
-
| `collectShadowHosts` | function | `(element: Element, root?: Node) => readonly Element[]`
|
|
372
|
-
| `isReachable` | function | `(element: Element) => boolean`
|
|
373
|
-
| `readHit` | function | `(element: Element) => Element \| undefined`
|
|
374
|
-
| `clickAccessible` | function | `(name: string) => Promise<void
|
|
375
|
-
| `clickAccessibleWithin` | function | `(region: string, role: string, name: string) => Promise<void>`
|
|
376
|
-
| `clickDisclosure` | function | `(name: string) => Promise<void>`
|
|
377
|
-
| `readProtocolSession` | function | `() => readonly [unknown, unknown]`
|
|
378
|
-
| `sendProtocol` | function | `(method: string, params?: Readonly<Record<string, unknown>>) => Promise<unknown>`
|
|
379
|
-
| `readProtocolPoint` | function | `(element: Element, offset?: ProtocolPoint) => ProtocolPoint`
|
|
380
|
-
| `readProtocolNode` | function | `(element: Element) => Promise<number>`
|
|
381
|
-
| `readAccessibilityNode` | function | `(element: Element) => Promise<AccessibilityNode>`
|
|
382
|
-
| `hoverAccessible` | function | `(name: string) => Promise<void
|
|
383
|
-
| `holdAccessible` | function | `(name: string) => Promise<void
|
|
384
|
-
| `holdAccessibleWithin` | function | `(region: string, role: string, name: string) => Promise<void>`
|
|
385
|
-
| `driveHold` | function | `(resolve: () => HTMLElement, name: string) => Promise<void>`
|
|
386
|
-
| `parkPointer` | function | `() => Promise<void>`
|
|
387
|
-
| `releasePointer` | function | `() => Promise<void>`
|
|
388
|
-
| `typeAccessible` | function | `(name: string, text: string) => Promise<void>`
|
|
389
|
-
| `fillAccessible` | function | `(name: string, text: string) => Promise<void>`
|
|
390
|
-
| `traverseAccessible` | function | `(name: string) => Promise<HTMLElement>`
|
|
391
|
-
| `traverseAccessibleWithin` | function | `(region: string, role: string, name: string) => Promise<HTMLElement>`
|
|
392
|
-
| `readActiveElement` | function | `(root?: Document \| ShadowRoot) => HTMLElement \| undefined`
|
|
393
|
-
| `countElements` | function | `(root?: Document \| ShadowRoot) => number`
|
|
394
|
-
| `containsNode` | function | `(root: Node, node: Node) => boolean`
|
|
395
|
-
| `stepFocus` | function | `(limit: number) => AsyncGenerator<HTMLElement \| undefined, void, undefined>`
|
|
396
|
-
| `matchesTraversalName` | function | `(element: HTMLElement, name: string, exact?: boolean) => boolean`
|
|
397
|
-
| `driveTraversal` | function | `(resolve: () => HTMLElement, name: string, candidate?: (element: HTMLElement) => boolean) => Promise<HTMLElement>`
|
|
398
|
-
| `walkFocus` | function | `(stop?: (element: HTMLElement) => boolean) => Promise<readonly HTMLElement[]>`
|
|
399
|
-
| `collectTabStops` | function | `(root: Element, start: HTMLElement) => Promise<readonly HTMLElement[]>`
|
|
400
|
-
| `pressKeys` | function | `(keys: string) => Promise<void>`
|
|
401
|
-
| `readPerception` | function | `(name: string) => string`
|
|
402
|
-
| `readPage` | function | `() => string`
|
|
403
|
-
| `readFocus` | function | `() => string \| undefined`
|
|
404
|
-
| `readValue` | function | `(role: string, name: string) => string`
|
|
405
|
-
| `readRefusal` | function | `(name: string) => string \| undefined
|
|
406
|
-
| `readText` | function | `(element: Element) => string`
|
|
407
|
-
| `readRole` | function | `(element: Element) => string \| undefined`
|
|
408
|
-
| `readName` | function | `(element: Element) => string`
|
|
409
|
-
| `readStates` | function | `(element: Element) => readonly string[]`
|
|
410
|
-
| `describeTree` | function | `(element: Element) => string`
|
|
411
|
-
| `describeFocus` | function | `(element: Element) => string`
|
|
412
|
-
| `waitForFrame` | function | `() => Promise<void>`
|
|
413
|
-
| `waitForState` | function | `(name, state, options
|
|
414
|
-
| `waitForAnimations` | function | `(element: Element, options?: WaitOptions) => Promise<void>`
|
|
415
|
-
| `readAnimations` | function | `(element: Element) => AnimationResult`
|
|
416
|
-
| `settleCapture` | function | `(options?: SettleOptions) => Promise<() => void>`
|
|
417
|
-
| `collectScrollRegions` | function | `(root: Element, axis?: 'inline' \| 'block') => readonly HTMLElement[]`
|
|
418
|
-
| `describeScrollRegions` | function | `(regions: readonly HTMLElement[]) => string`
|
|
419
|
-
| `build` | function | `<K extends keyof HTMLElementTagNameMap>(tag: K, options?: ElementOptions) => HTMLElementTagNameMap[K]`
|
|
420
|
-
| `mount` | function | `<T extends Element>(element: T) => T`
|
|
421
|
-
| `typeInput` | function | `(element: HTMLInputElement \| HTMLTextAreaElement, text: string) => void`
|
|
422
|
-
| `commitInput` | function | `(element: HTMLInputElement \| HTMLTextAreaElement, text: string) => void`
|
|
423
|
-
| `render` | function | `(markup: string) => HTMLDivElement
|
|
424
|
-
| `clearStorage` | function | `() => void`
|
|
425
|
-
| `removeDatabase` | function | `(name: string) => Promise<void>`
|
|
426
|
-
| `convertSRGB` | function | `(red: number, green: number, blue: number, alpha?: number) => Color`
|
|
427
|
-
| `convertLinearSRGB` | function | `(red: number, green: number, blue: number, alpha?: number) => Color`
|
|
428
|
-
| `convertXYZD65` | function | `(x: number, y: number, z: number, alpha?: number) => Color`
|
|
429
|
-
| `convertXYZD50` | function | `(x: number, y: number, z: number, alpha?: number) => Color`
|
|
430
|
-
| `convertOKLab` | function | `(lightness: number, a: number, b: number, alpha?: number) => Color`
|
|
431
|
-
| `convertLab` | function | `(lightness: number, a: number, b: number, alpha?: number) => Color`
|
|
432
|
-
| `convertDisplayP3` | function | `(red: number, green: number, blue: number, alpha?: number) => Color`
|
|
433
|
-
| `convertA98RGB` | function | `(red: number, green: number, blue: number, alpha?: number) => Color`
|
|
434
|
-
| `convertProPhotoRGB` | function | `(red: number, green: number, blue: number, alpha?: number) => Color`
|
|
435
|
-
| `convertRec2020` | function | `(red: number, green: number, blue: number, alpha?: number) => Color`
|
|
436
|
-
| `parseColor` | function | `(value: string) => Color \| undefined`
|
|
437
|
-
| `parseCSSColor` | function | `(value: string, scope?: Element) => Color \| undefined`
|
|
438
|
-
| `matchesColor` | function | `(first: string \| Color, second: string \| Color) => boolean`
|
|
439
|
-
| `blendColor` | function | `(front: Color, back: Color) => Color`
|
|
440
|
-
| `measureLuminance` | function | `(color: Color) => number`
|
|
441
|
-
| `measureContrast` | function | `(front: Color, back: Color) => number`
|
|
442
|
-
| `readLayers` | function | `(element: Element) => readonly Color[]`
|
|
443
|
-
| `readBackdrop` | function | `(element: Element, floor: Color) => Color`
|
|
444
|
-
| `readColorContrast` | function | `(element: Element, color: string, options?: ContrastOptions) => number`
|
|
445
|
-
| `readContrast` | function | `(element: Element, floor?: Color) => number`
|
|
446
|
-
| `readRing` | function | `(control: Element, worn?: Element) => number \| undefined`
|
|
447
|
-
| `readClipEdge` | function | `(element: Element) => number \| undefined`
|
|
448
|
-
| `readClipMargin` | function | `(element: Element) => number`
|
|
449
|
-
| `readClippedBlock` | function | `(element: Element) => number`
|
|
450
|
-
| `collectClippingAncestors` | function | `(element: Element) => readonly Element[]`
|
|
451
|
-
| `clipsOverflow` | function | `(element: Element) => boolean`
|
|
452
|
-
| `measureContent` | function | `() => number`
|
|
453
|
-
| `stagePane` | function | `(width: number, height: number) => Promise<void>`
|
|
454
|
-
| `releasePane` | function | `() => Promise<void>`
|
|
455
|
-
| `computeOffset` | function | `(box: DOMRectReadOnly, width: number, height: number) => FrameOffset`
|
|
456
|
-
| `stageMedia` | function | `(options: MediaOptions) => Promise<void>`
|
|
457
|
-
| `releaseMedia` | function | `() => Promise<void>`
|
|
458
|
-
| `waitForStability` | function | `(description: string, read: () => string, options?: StabilityOptions) => Promise<void>`
|
|
459
|
-
| `settleFrame` | function | `(options, element, prepared, pane
|
|
460
|
-
| `readFrameHeight` | function | `(options: FrameOptions, element: Element \| undefined, pane: number) => number \| undefined`
|
|
461
|
-
| `takeFrameShot` | function | `(options: FrameOptions, element: Element \| undefined) => Promise<FrameShot>`
|
|
462
|
-
| `captureFrame` | function | `(options: FrameOptions) => Promise<string>`
|
|
463
|
-
| `readCaptureReader` | function | `() => CaptureReader \| undefined`
|
|
464
|
-
| `verifyFrame` | function | `(shot: FrameShot, path: string, reader?: CaptureReader) => Promise<void>`
|
|
465
|
-
| `paintImage` | function | `(encoded: string) => Promise<OffscreenCanvasRenderingContext2D \| undefined>`
|
|
466
|
-
| `readFrame` | function | `(path: string) => Promise<FrameResult>`
|
|
467
|
-
| `readShotPixel` | function | `(element: Element, x: number, y: number) => Promise<Color>`
|
|
468
|
-
| `readCascade` | function | `() => ReadonlySet<string>`
|
|
469
|
-
| `readClasses` | function | `(root: ParentNode) => ReadonlySet<string>`
|
|
470
|
-
| `readCensus` | function | `(root: ParentNode) => CensusResult`
|
|
471
|
-
| `sendTouch` | function | `(type: 'touchStart' \| 'touchMove' \| 'touchEnd' \| 'touchCancel', element?: Element, point?: ProtocolPoint) => Promise<void>`
|
|
472
|
-
| `tapTouch` | function | `(element: Element, options?: StabilityOptions) => Promise<void>`
|
|
473
|
-
| `releaseTouch` | function | `() => Promise<void>`
|
|
474
|
-
| `sendFileDrag` | function | `(type: 'dragEnter' \| 'dragOver' \| 'dragCancel', role: string, name: string, names: readonly string[]) => Promise<void>`
|
|
475
|
-
| `adoptSheet` | function | `(text: string) => SheetAdoption`
|
|
476
|
-
| `readLayerNames` | function | `(source: CSSStyleSheet \| CSSGroupingRule \| CSSStyleRule, layer?: string) => readonly string[]`
|
|
477
|
-
| `readRules` | function | `() => readonly CSSRule[]`
|
|
478
|
-
| `findRule` | function | `(selector: string) => CSSStyleRule \| undefined`
|
|
479
|
-
| `findKeyframes` | function | `(name: string) => CSSKeyframesRule \| undefined`
|
|
480
|
-
| `readRows` | function | `(root: ParentNode, selector: string) => readonly string[]`
|
|
481
|
-
| `extractOrphans` | function | `(root: ParentNode, child: string, parent: string) => readonly string[]`
|
|
482
|
-
| `extractStyles` | function | `(root: ParentNode) => readonly string[]`
|
|
483
|
-
| `readStyle` | function | `(element: Element, property: string, pseudo?: string) => string`
|
|
484
|
-
| `readToken` | function | `(element: Element, name: string) => string`
|
|
485
|
-
| `readRootToken` | function | `(name: string) => string`
|
|
486
|
-
| `readPixels` | function | `(element: Element, property: string, pseudo?: string) => number`
|
|
487
|
-
| `expandCaptures` | function | `(states: readonly string[], variants: readonly CaptureVariant[]) => readonly string[]`
|
|
488
|
-
| `buildDenial` | function | `(operation: string, key?: string) => DOMException`
|
|
489
|
-
| `buildContrast` | function | `(bar: number) => ContrastFixture`
|
|
490
|
-
| `buildEscapes` | function | `(permitted: string) => EscapeFixture`
|
|
491
|
-
| `buildCensus` | function | `() => CensusFixture`
|
|
362
|
+
| Name | Kind | Signature | Summary |
|
|
363
|
+
| -------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
364
|
+
| `supportsSegmentedFocus` | function | `(element: Element) => boolean` | Determines whether a native input exposes separately editable segments under one focused element. |
|
|
365
|
+
| `resolveAccessible` | function | `((name: string) => HTMLElement) & ((role: string, name: string) => HTMLElement)` | Resolves one visible, focus-reachable interactive element by its exact accessible name. A wholly-off-viewport target is scrolled into view before reachability is measured. |
|
|
366
|
+
| `resolveAccessibleWithin` | function | `(region: string, role: string, name: string) => HTMLElement` | Resolves one human-reachable control by role and accessible-name text inside a named region. |
|
|
367
|
+
| `resolveRendered` | function | `(first: string, second?: string) => HTMLElement` | Resolves one rendered, focus-reachable interactive element without requiring it to intersect the viewport yet. |
|
|
368
|
+
| `computeNamePattern` | function | `(name: string) => RegExp` | Computes the pattern that matches one accessible name a decorative glyph may sit beside. |
|
|
369
|
+
| `isOutsideViewport` | function | `(rectangle: DOMRectReadOnly) => boolean` | Determines whether a rectangle lies wholly outside the browser viewport. |
|
|
370
|
+
| `isRendered` | function | `(element: Element) => boolean` | Determines whether the accessibility tree presents one element at all. |
|
|
371
|
+
| `collectShadowHosts` | function | `(element: Element, root?: Node) => readonly Element[]` | Collects an element and the successive hosts of its containing shadow roots. |
|
|
372
|
+
| `isReachable` | function | `(element: Element) => boolean` | Determines whether a person can click one element where it sits. |
|
|
373
|
+
| `readHit` | function | `(element: Element) => Element \| undefined` | Reads the topmost element at one element's bounding-box centre. |
|
|
374
|
+
| `clickAccessible` | function | `((name: string) => Promise<void>) & ((role: string, name: string) => Promise<void>)` | Clicks one visible, focus-reachable control by its accessible name through the browser provider. |
|
|
375
|
+
| `clickAccessibleWithin` | function | `(region: string, role: string, name: string) => Promise<void>` | Clicks one human-reachable control by role and accessible-name text inside a named region. |
|
|
376
|
+
| `clickDisclosure` | function | `(name: string) => Promise<void>` | Opens or closes one native details disclosure by its rendered summary. |
|
|
377
|
+
| `readProtocolSession` | function | `() => readonly [unknown, unknown]` | Reads the browser provider's DevTools session and its send member. |
|
|
378
|
+
| `sendProtocol` | function | `(method: string, params?: Readonly<Record<string, unknown>>) => Promise<unknown>` | Sends one DevTools protocol command through the browser provider. |
|
|
379
|
+
| `readProtocolPoint` | function | `(element: Element, offset?: ProtocolPoint) => ProtocolPoint` | Projects a point of one element through every frame that holds it into the browser's top-level viewport. |
|
|
380
|
+
| `readProtocolNode` | function | `(element: Element) => Promise<number>` | Resolves one element to the node the browser's DOM tree holds for it. |
|
|
381
|
+
| `readAccessibilityNode` | function | `(element: Element) => Promise<AccessibilityNode>` | Reads the accessibility node the browser computed for one element. |
|
|
382
|
+
| `hoverAccessible` | function | `((name: string) => Promise<void>) & ((role: string, name: string) => Promise<void>)` | Hovers one visible, focus-reachable control by its accessible name through the browser provider. |
|
|
383
|
+
| `holdAccessible` | function | `((name: string) => Promise<void>) & ((role: string, name: string) => Promise<void>)` | Holds the primary pointer button on one visible, focus-reachable control by its accessible name. |
|
|
384
|
+
| `holdAccessibleWithin` | function | `(region: string, role: string, name: string) => Promise<void>` | Holds the primary pointer button on one control by role and accessible-name text inside a named region. |
|
|
385
|
+
| `driveHold` | function | `(resolve: () => HTMLElement, name: string) => Promise<void>` | Holds the primary pointer button on the control a resolver returns, through the browser provider. |
|
|
386
|
+
| `parkPointer` | function | `() => Promise<void>` | Parks the pointer outside the page and waits for the parked pointer's frame to paint. |
|
|
387
|
+
| `releasePointer` | function | `() => Promise<void>` | Releases a held pointer and parks it outside the page, clearing hover. |
|
|
388
|
+
| `typeAccessible` | function | `(name: string, text: string) => Promise<void>` | Replaces a named field's value through focus, select-all, deletion, and real keystrokes. |
|
|
389
|
+
| `fillAccessible` | function | `(name: string, text: string) => Promise<void>` | Replaces a named field's value in one operation, for text too long to type key by key. |
|
|
390
|
+
| `traverseAccessible` | function | `(name: string) => Promise<HTMLElement>` | Reaches a named control only through natural forward Tab traversal from the current focus. |
|
|
391
|
+
| `traverseAccessibleWithin` | function | `(region: string, role: string, name: string) => Promise<HTMLElement>` | Reaches a control by role and accessible-name text inside a named region, only through natural forward Tab traversal from the current focus. |
|
|
392
|
+
| `readActiveElement` | function | `(root?: Document \| ShadowRoot) => HTMLElement \| undefined` | Reads the HTML element that holds focus, following it into open shadow roots and same-origin frames. |
|
|
393
|
+
| `countElements` | function | `(root?: Document \| ShadowRoot) => number` | Counts the elements a tree holds, descending into open shadow roots and same-origin frames. |
|
|
394
|
+
| `containsNode` | function | `(root: Node, node: Node) => boolean` | Determines whether a node sits inside a root, through open shadow roots and frames. |
|
|
395
|
+
| `stepFocus` | function | `(limit: number) => AsyncGenerator<HTMLElement \| undefined, void, undefined>` | Presses Tab and yields the element focus lands on, once per press, up to a limit. |
|
|
396
|
+
| `matchesTraversalName` | function | `(element: HTMLElement, name: string, exact?: boolean) => boolean` | Checks whether a landing can carry a requested accessible name without resolving the document. |
|
|
397
|
+
| `driveTraversal` | function | `(resolve: () => HTMLElement, name: string, candidate?: (element: HTMLElement) => boolean) => Promise<HTMLElement>` | Reaches the control a resolver returns, only through natural forward Tab traversal from the current focus. |
|
|
398
|
+
| `walkFocus` | function | `(stop?: (element: HTMLElement) => boolean) => Promise<readonly HTMLElement[]>` | Walks forward by real Tab presses from the focused element until a predicate accepts a stop or the Tab order ends. |
|
|
399
|
+
| `collectTabStops` | function | `(root: Element, start: HTMLElement) => Promise<readonly HTMLElement[]>` | Collects the elements of a region that a forward Tab walk reaches from a starting element. |
|
|
400
|
+
| `pressKeys` | function | `(keys: string) => Promise<void>` | Sends a key sequence to whatever holds focus, and refuses to send it to nothing. |
|
|
401
|
+
| `readPerception` | function | `(name: string) => string` | Reads the normalized visible text of one named region, dialog, table, tab panel, or alert. |
|
|
402
|
+
| `readPage` | function | `() => string` | Reads the normalized visible text of the whole page. |
|
|
403
|
+
| `readFocus` | function | `() => string \| undefined` | Reads the rendered text of the element that holds focus. |
|
|
404
|
+
| `readValue` | function | `(role: string, name: string) => string` | Reads the value a resolved control renders. |
|
|
405
|
+
| `readRefusal` | function | `((name: string) => string \| undefined) & ((role: string, name: string) => string \| undefined)` | Reads the refusal one named target answers with, or nothing when it resolves. |
|
|
406
|
+
| `readText` | function | `(element: Element) => string` | Reads one element's rendered text the way a name computation reads it. |
|
|
407
|
+
| `readRole` | function | `(element: Element) => string \| undefined` | Reads the role one element carries in the accessibility tree. |
|
|
408
|
+
| `readName` | function | `(element: Element) => string` | Reads the accessible name one element is announced under. |
|
|
409
|
+
| `readStates` | function | `(element: Element) => readonly string[]` | Reads the states one element is announced in. |
|
|
410
|
+
| `describeTree` | function | `(element: Element) => string` | Describes the accessible tree one rendered element presents. |
|
|
411
|
+
| `describeFocus` | function | `(element: Element) => string` | Describes the order sequential keyboard navigation visits one element's controls in. |
|
|
412
|
+
| `waitForFrame` | function | `() => Promise<void>` | Waits for one animation frame to settle pending browser paint work. |
|
|
413
|
+
| `waitForState` | function | `((name: string, state: string, options?: StateOptions) => Promise<readonly string[]>) & ((role: string, name: string, state: string, options?: StateOptions) => Promise<readonly string[]>)` | Waits until one named control announces a state, or stops announcing it. |
|
|
414
|
+
| `waitForAnimations` | function | `(element: Element, options?: WaitOptions) => Promise<void>` | Waits until every finite animation on one element and its subtree has stopped moving. |
|
|
415
|
+
| `readAnimations` | function | `(element: Element) => AnimationResult` | Reads the animations running on one element and its subtree, split by whether each one ends. |
|
|
416
|
+
| `settleCapture` | function | `(options?: SettleOptions) => Promise<() => void>` | Settles the page for one capture: parks the pointer, waits out every finite animation, and holds each endless animation at its first frame. |
|
|
417
|
+
| `collectScrollRegions` | function | `(root: Element, axis?: 'inline' \| 'block') => readonly HTMLElement[]` | Collects the rendered boxes a person can scroll. |
|
|
418
|
+
| `describeScrollRegions` | function | `(regions: readonly HTMLElement[]) => string` | Describes the window's scroll position and each scroll region's offsets and extents. |
|
|
419
|
+
| `build` | function | `<K extends keyof HTMLElementTagNameMap>(tag: K, options?: ElementOptions) => HTMLElementTagNameMap[K]` | Builds one unmounted element of a known tag, wearing the classes, text, and attributes asked for. |
|
|
420
|
+
| `mount` | function | `<T extends Element>(element: T) => T` | Puts one element into the document and hands it straight back. |
|
|
421
|
+
| `typeInput` | function | `(element: HTMLInputElement \| HTMLTextAreaElement, text: string) => void` | Sets one field's value and announces it the way typing into the field does. |
|
|
422
|
+
| `commitInput` | function | `(element: HTMLInputElement \| HTMLTextAreaElement, text: string) => void` | Sets one field's value and commits it, the way typing and then leaving the field does. |
|
|
423
|
+
| `render` | function | `((markup: string) => HTMLDivElement) & (<K extends keyof HTMLElementTagNameMap>(tag: K, classes: string) => HTMLElementTagNameMap[K])` | Renders one fixture into the document from trusted markup. |
|
|
424
|
+
| `clearStorage` | function | `() => void` | Clears both browser storage surfaces. |
|
|
425
|
+
| `removeDatabase` | function | `(name: string) => Promise<void>` | Deletes one IndexedDB database and reports what the request actually did. |
|
|
426
|
+
| `convertSRGB` | function | `(red: number, green: number, blue: number, alpha?: number) => Color` | Converts normalized encoded sRGB channels to the clipped paint scale. |
|
|
427
|
+
| `convertLinearSRGB` | function | `(red: number, green: number, blue: number, alpha?: number) => Color` | Converts linear sRGB channels to encoded, clipped paint channels. |
|
|
428
|
+
| `convertXYZD65` | function | `(x: number, y: number, z: number, alpha?: number) => Color` | Converts D65 XYZ coordinates to clipped sRGB paint channels. |
|
|
429
|
+
| `convertXYZD50` | function | `(x: number, y: number, z: number, alpha?: number) => Color` | Converts D50 XYZ coordinates to clipped sRGB paint channels. |
|
|
430
|
+
| `convertOKLab` | function | `(lightness: number, a: number, b: number, alpha?: number) => Color` | Converts OKLab coordinates to clipped sRGB paint channels. |
|
|
431
|
+
| `convertLab` | function | `(lightness: number, a: number, b: number, alpha?: number) => Color` | Converts CIE Lab coordinates relative to D50 to clipped sRGB paint channels. |
|
|
432
|
+
| `convertDisplayP3` | function | `(red: number, green: number, blue: number, alpha?: number) => Color` | Converts encoded Display P3 channels to clipped sRGB paint channels. |
|
|
433
|
+
| `convertA98RGB` | function | `(red: number, green: number, blue: number, alpha?: number) => Color` | Converts encoded A98 RGB channels to clipped sRGB paint channels. |
|
|
434
|
+
| `convertProPhotoRGB` | function | `(red: number, green: number, blue: number, alpha?: number) => Color` | Converts encoded ProPhoto RGB channels to clipped sRGB paint channels. |
|
|
435
|
+
| `convertRec2020` | function | `(red: number, green: number, blue: number, alpha?: number) => Color` | Converts encoded Rec. 2020 channels to clipped sRGB paint channels. |
|
|
436
|
+
| `parseColor` | function | `(value: string) => Color \| undefined` | Parses computed CSS Color 4 values into clipped straight sRGB channels. |
|
|
437
|
+
| `parseCSSColor` | function | `(value: string, scope?: Element) => Color \| undefined` | Resolves any CSS color expression to straight sRGB channels, by asking the browser. |
|
|
438
|
+
| `matchesColor` | function | `(first: string \| Color, second: string \| Color) => boolean` | Determines whether two colors render the same, within the rounding a browser does. |
|
|
439
|
+
| `blendColor` | function | `(front: Color, back: Color) => Color` | Composites one color over another. |
|
|
440
|
+
| `measureLuminance` | function | `(color: Color) => number` | Measures one opaque color's WCAG relative luminance. |
|
|
441
|
+
| `measureContrast` | function | `(front: Color, back: Color) => number` | Measures the WCAG 2.x contrast ratio between two opaque colors. |
|
|
442
|
+
| `readLayers` | function | `(element: Element) => readonly Color[]` | Collects readable background color layers and refuses an unreadable painted layer. |
|
|
443
|
+
| `readBackdrop` | function | `(element: Element, floor: Color) => Color` | Resolves the opaque color standing behind one element. |
|
|
444
|
+
| `readColorContrast` | function | `(element: Element, color: string, options?: ContrastOptions) => number` | Measures the WCAG 2.x contrast ratio one color reaches when painted over an element's backdrop. |
|
|
445
|
+
| `readContrast` | function | `(element: Element, floor?: Color) => number` | Measures the WCAG 2.x contrast ratio between an element's computed text and background colors. |
|
|
446
|
+
| `readRing` | function | `(control: Element, worn?: Element) => number \| undefined` | Measures the contrast the focus chrome painted on one control reaches against its own backdrop. |
|
|
447
|
+
| `readClipEdge` | function | `(element: Element) => number \| undefined` | Measures the row a clipping element cuts its content off at, in document coordinates. |
|
|
448
|
+
| `readClipMargin` | function | `(element: Element) => number` | Measures how far past its own box a clipping element lets its content show. |
|
|
449
|
+
| `readClippedBlock` | function | `(element: Element) => number` | Measures the block size an element shows after every clipping ancestor cuts it. |
|
|
450
|
+
| `collectClippingAncestors` | function | `(element: Element) => readonly Element[]` | Collects the ancestors of an element that clip their descendants' overflow. |
|
|
451
|
+
| `clipsOverflow` | function | `(element: Element) => boolean` | Reports whether an element clips its descendants' overflow. |
|
|
452
|
+
| `measureContent` | function | `() => number` | Measures the row the document's own content ends on, in document coordinates. |
|
|
453
|
+
| `stagePane` | function | `(width: number, height: number) => Promise<void>` | Sets the tester's viewport and renders the runner's pane at the size that viewport claims. |
|
|
454
|
+
| `releasePane` | function | `() => Promise<void>` | Hands the tester pane back to the runner's own layout, at the viewport it had before staging. |
|
|
455
|
+
| `computeOffset` | function | `(box: DOMRectReadOnly, width: number, height: number) => FrameOffset` | Computes how far an element frame moves the tester frame so the element is shot inside the runner's window. |
|
|
456
|
+
| `stageMedia` | function | `(options: MediaOptions) => Promise<void>` | Stages the tester's print medium, motion preference, forced colours, and pointer precision through the browser provider. |
|
|
457
|
+
| `releaseMedia` | function | `() => Promise<void>` | Restores the media readings observed before the first stage as explicit emulation. With nothing staged, clears every override and waits for a stable reading, not a proved engine baseline. Checks the budget between polls, so a frame that never paints is not bounded by it. |
|
|
458
|
+
| `waitForStability` | function | `(description: string, read: () => string, options?: StabilityOptions) => Promise<void>` | Waits for a reading to hold across its last `frames + 1` reads, each later read taken after a painted frame, with the interval slept between polls. Checks the budget between reads, so a frame that never paints is not bounded by it. |
|
|
459
|
+
| `settleFrame` | function | `(options: FrameOptions, element: Element \| undefined, prepared: boolean, pane?: number, covered?: number, stage?: number) => Promise<void>` | Restages a capture until its content extent equals the pane height. |
|
|
460
|
+
| `readFrameHeight` | function | `(options: FrameOptions, element: Element \| undefined, pane: number) => number \| undefined` | Reads a capture subject's height after applying its native scroll clearance. |
|
|
461
|
+
| `takeFrameShot` | function | `(options: FrameOptions, element: Element \| undefined) => Promise<FrameShot>` | Takes a screenshot while temporarily positioning the runner frame around its subject. |
|
|
462
|
+
| `captureFrame` | function | `(options: FrameOptions) => Promise<string>` | Shoots one frame at one viewport size and proves the file on disk holds this run's bytes. |
|
|
463
|
+
| `readCaptureReader` | function | `() => CaptureReader \| undefined` | Reads the optional disk-digest command the tester page registered. |
|
|
464
|
+
| `verifyFrame` | function | `(shot: FrameShot, path: string, reader?: CaptureReader) => Promise<void>` | Verifies a screenshot's destination and compares its returned bytes with the written file. |
|
|
465
|
+
| `paintImage` | function | `(encoded: string) => Promise<OffscreenCanvasRenderingContext2D \| undefined>` | Decodes a base64 PNG and paints it, unscaled, onto a fresh offscreen 2D canvas. |
|
|
466
|
+
| `readFrame` | function | `(path: string) => Promise<FrameResult>` | Reads one written frame back and reports its size and the color its bottom row paints. |
|
|
467
|
+
| `readShotPixel` | function | `(element: Element, x: number, y: number) => Promise<Color>` | Reads one painted pixel of an element's screenshot. |
|
|
468
|
+
| `readCascade` | function | `() => ReadonlySet<string>` | Collects every class token the stylesheets loaded into this document actually define. |
|
|
469
|
+
| `readClasses` | function | `(root: ParentNode) => ReadonlySet<string>` | Collects every class token the markup under one root carries. |
|
|
470
|
+
| `readCensus` | function | `(root: ParentNode) => CensusResult` | Takes the authored-class census of one subtree against the cascade this document loaded. |
|
|
471
|
+
| `sendTouch` | function | `(type: 'touchStart' \| 'touchMove' \| 'touchEnd' \| 'touchCancel', element?: Element, point?: ProtocolPoint) => Promise<void>` | Sends one emulated touch event through the browser protocol. |
|
|
472
|
+
| `tapTouch` | function | `(element: Element, options?: StabilityOptions) => Promise<void>` | Taps an element's centre with emulated touch after its box settles. |
|
|
473
|
+
| `releaseTouch` | function | `() => Promise<void>` | Cancels emulated touch input, disables touch emulation, and parks the pointer. |
|
|
474
|
+
| `sendFileDrag` | function | `(type: 'dragEnter' \| 'dragOver' \| 'dragCancel', role: string, name: string, names: readonly string[]) => Promise<void>` | Carries files from outside the page over a rendered target named by role and accessible name. |
|
|
475
|
+
| `adoptSheet` | function | `(text: string) => SheetAdoption` | Adopts CSS text into the document with an idempotent release operation. |
|
|
476
|
+
| `readLayerNames` | function | `(source: CSSStyleSheet \| CSSGroupingRule \| CSSStyleRule, layer?: string) => readonly string[]` | Reads layer statements and blocks in declaration order, including repeated names. |
|
|
477
|
+
| `readRules` | function | `() => readonly CSSRule[]` | Collects every rule the stylesheets loaded into this document hold, nested grouping rules included. |
|
|
478
|
+
| `findRule` | function | `(selector: string) => CSSStyleRule \| undefined` | Finds the first style rule in the cascade whose selector carries a fragment. |
|
|
479
|
+
| `findKeyframes` | function | `(name: string) => CSSKeyframesRule \| undefined` | Finds the animation the cascade declares under one name. |
|
|
480
|
+
| `readRows` | function | `(root: ParentNode, selector: string) => readonly string[]` | Reads the normalized visible text of every element a selector matches, in document order. |
|
|
481
|
+
| `extractOrphans` | function | `(root: ParentNode, child: string, parent: string) => readonly string[]` | Collects every element carrying a component class rendered outside the container it belongs to. |
|
|
482
|
+
| `extractStyles` | function | `(root: ParentNode) => readonly string[]` | Collects the markup of every element carrying a non-empty `style` attribute and of every `<style>` element, in document order, `root` included in both populations when it is an `Element`. |
|
|
483
|
+
| `readStyle` | function | `(element: Element, property: string, pseudo?: string) => string` | Reads one resolved CSS property from a real browser element or a named pseudo-element. |
|
|
484
|
+
| `readToken` | function | `(element: Element, name: string) => string` | Reads one custom property from an element's resolved style. |
|
|
485
|
+
| `readRootToken` | function | `(name: string) => string` | Reads one custom property from the document element. |
|
|
486
|
+
| `readPixels` | function | `(element: Element, property: string, pseudo?: string) => number` | Reads one resolved CSS length as a number of pixels. |
|
|
487
|
+
| `expandCaptures` | function | `(states: readonly string[], variants: readonly CaptureVariant[]) => readonly string[]` | Expands a capture registry across every variant into the filenames a complete portfolio holds. |
|
|
488
|
+
| `buildDenial` | function | `(operation: string, key?: string) => DOMException` | Builds the refusal a host withholding a storage operation raises. |
|
|
489
|
+
| `buildContrast` | function | `(bar: number) => ContrastFixture` | Builds a detached translucent stack whose composited and flat contrast readings straddle one bar. |
|
|
490
|
+
| `buildEscapes` | function | `(permitted: string) => EscapeFixture` | Builds detached markup carrying one style escape of each kind, plus the sheet a project allows. |
|
|
491
|
+
| `buildCensus` | function | `() => CensusFixture` | Builds detached markup carrying one undeclared class token on HTML and another on SVG. |
|
|
492
492
|
|
|
493
493
|
#### Factories
|
|
494
494
|
|
|
495
|
-
|
|
|
496
|
-
| --------------------- | -------- |
|
|
497
|
-
| `createPortfolio` | function | `(options: PortfolioOptions) => PortfolioInterface`
|
|
498
|
-
| `createChannel` | function | `(name: string, output: string[], forward: (...data: unknown[]) => void) => (...data: unknown[]) => void`
|
|
499
|
-
| `createJournal` | function | `() => JournalInterface`
|
|
500
|
-
| `createStorage` | function | `(options?: StorageOptions) => WebStorageInterface`
|
|
501
|
-
| `createHarness` | function |
|
|
502
|
-
| `createPointerEvent` | function | `(name: string, options?: PointerEventInit) => PointerEvent`
|
|
503
|
-
| `createDragEvent` | function | `(name: string, options?: DragEventInit) => DragEvent`
|
|
504
|
-
| `createKeyboardEvent` | function | `(name: string, options?: KeyboardEventInit) => KeyboardEvent`
|
|
495
|
+
| Name | Kind | Signature | Summary |
|
|
496
|
+
| --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
497
|
+
| `createPortfolio` | function | `(options: PortfolioOptions) => PortfolioInterface` | Creates the capture portfolio one run places its screenshots through; a disabled run still refuses. |
|
|
498
|
+
| `createChannel` | function | `(name: string, output: string[], forward: (...data: unknown[]) => void) => (...data: unknown[]) => void` | Creates one console channel that records every call it receives and hands that call on unchanged. |
|
|
499
|
+
| `createJournal` | function | `() => JournalInterface` | Creates the journal one scenario records its steps and the page's own output into. |
|
|
500
|
+
| `createStorage` | function | `(options?: StorageOptions) => WebStorageInterface` | Creates an inert `Storage` a host can withhold, grant, and run out of room in. |
|
|
501
|
+
| `createHarness` | function | `<TState extends string, TEvent extends string, TContext>(options: HarnessOptions<TState, TEvent, TContext>) => HarnessInterface` | Creates a mounted statechart harness that renders one transition table and drives it row by row. |
|
|
502
|
+
| `createPointerEvent` | function | `(name: string, options?: PointerEventInit) => PointerEvent` | Creates one real pointer event, ready to dispatch. |
|
|
503
|
+
| `createDragEvent` | function | `(name: string, options?: DragEventInit) => DragEvent` | Creates one real drag event carrying a live data transfer, ready to dispatch. |
|
|
504
|
+
| `createKeyboardEvent` | function | `(name: string, options?: KeyboardEventInit) => KeyboardEvent` | Creates one real keyboard event, ready to dispatch. |
|
|
505
505
|
|
|
506
506
|
`createPointerEvent` and `createDragEvent` default to `composed: true` from 0.0.27, where 0.0.26
|
|
507
507
|
left it `false`. An event dispatched inside an open shadow root stayed there in 0.0.26, and a
|
|
@@ -937,7 +937,7 @@ Imported from `@orkestrel/test/server`.
|
|
|
937
937
|
|
|
938
938
|
The provider command consumes the browser journey's resolved selector inside Vitest's tester frame.
|
|
939
939
|
|
|
940
|
-
|
|
|
940
|
+
| Name | Kind | Signature | Summary |
|
|
941
941
|
| ------------- | -------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
942
942
|
| `chooseFiles` | function | `(context: ChooserContext, request: ChooserRequest) => Promise<void>` | Observes a native chooser before activating its input and supplies the verified chooser's fixture bytes. |
|
|
943
943
|
|
|
@@ -948,31 +948,31 @@ member and `plus` introducing its call-signature members, and a type alias's own
|
|
|
948
948
|
a union's arms escaped as `\|`. An extended interface's name comes before `plus`, with the members
|
|
949
949
|
it adds after.
|
|
950
950
|
|
|
951
|
-
|
|
|
952
|
-
| -------------------- | --------- |
|
|
953
|
-
| `ScratchInterface` | interface | `{ path
|
|
954
|
-
| `ScratchIdentity` | interface | `{ device, inode, birth }`
|
|
955
|
-
| `ScratchOptions` | interface | `{ parent?, prefix?, files? }`
|
|
956
|
-
| `LoopbackInterface` | interface | `{ url, port }`
|
|
957
|
-
| `CookieJarInterface` | interface | `{ header
|
|
958
|
-
| `InventoryOptions` | interface | `{ extensions?, exclude? }`
|
|
959
|
-
| `UpgradeOptions` | interface | `
|
|
960
|
-
| `UpgradeResult` | type | `{ claimed
|
|
961
|
-
| `ChooserContext` | interface | `{ page, iframe }`
|
|
951
|
+
| Name | Kind | Signature | Summary |
|
|
952
|
+
| -------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
|
|
953
|
+
| `ScratchInterface` | interface | `{ path, write(), read(), has(), names(), ensure(), link(), remove(), destroy() }` | Holds a temporary directory a test owns, writes into, reads back, and removes when it is done. |
|
|
954
|
+
| `ScratchIdentity` | interface | `{ device, inode, birth }` | Represents the fields that together identify one allocated directory on its host. |
|
|
955
|
+
| `ScratchOptions` | interface | `{ parent?, prefix?, files? }` | Configures a scratch directory allocation. |
|
|
956
|
+
| `LoopbackInterface` | interface | `{ url, port, destroy() }` | Holds a server a test owns, listening on an ephemeral loopback port until the test releases it. |
|
|
957
|
+
| `CookieJarInterface` | interface | `{ header, read(), capture() }` | Holds a name-keyed cookie store a test drives one origin with, filled from real responses. |
|
|
958
|
+
| `InventoryOptions` | interface | `{ extensions?, exclude? }` | Configures a source inventory read. |
|
|
959
|
+
| `UpgradeOptions` | interface | `{ path?, protocols? }` | Configures a client upgrade request. |
|
|
960
|
+
| `UpgradeResult` | type | `{ readonly claimed: true; readonly protocol: string \| undefined; } \| { readonly claimed: false; readonly status: number; }` | Represents what one server did with a client upgrade request. |
|
|
961
|
+
| `ChooserContext` | interface | `{ page, iframe }` | Supplies the real Playwright page and tester frame to a native chooser command. |
|
|
962
962
|
|
|
963
963
|
#### Constants
|
|
964
964
|
|
|
965
965
|
A `Shape` cell holds the constant's declared type.
|
|
966
966
|
|
|
967
|
-
|
|
|
967
|
+
| Name | Kind | Signature | Summary |
|
|
968
968
|
| ----------------------------- | ----- | ------------------- | ---------------------------------------------------------------------------------- |
|
|
969
|
-
| `REMOVE_TREE_MAX_ATTEMPTS` | const | `
|
|
970
|
-
| `REMOVE_TREE_RETRY_DELAY_MS` | const | `
|
|
969
|
+
| `REMOVE_TREE_MAX_ATTEMPTS` | const | `10` | Caps the attempts `removeTree` makes before rethrowing a retryable removal error. |
|
|
970
|
+
| `REMOVE_TREE_RETRY_DELAY_MS` | const | `100` | Names the synchronous delay, in milliseconds, `removeTree` waits between attempts. |
|
|
971
971
|
| `REMOVE_TREE_RETRYABLE_CODES` | const | `readonly string[]` | Names the error codes `removeTree` retries; every other code rethrows immediately. |
|
|
972
972
|
|
|
973
973
|
#### Helpers
|
|
974
974
|
|
|
975
|
-
|
|
|
975
|
+
| Name | Kind | Signature | Summary |
|
|
976
976
|
| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
977
977
|
| `readLoopClock` | function | `() => number` | Reads the loop clock Node stamps on an armed timer, in whole milliseconds. |
|
|
978
978
|
| `alignLoopClock` | function | `(offset?: number) => void` | Spins synchronously past a loop-clock tick and an optional millisecond offset. |
|
|
@@ -1098,7 +1098,7 @@ that needs a refusal probes that refusal itself.
|
|
|
1098
1098
|
|
|
1099
1099
|
#### Factories
|
|
1100
1100
|
|
|
1101
|
-
|
|
|
1101
|
+
| Name | Kind | Signature | Summary |
|
|
1102
1102
|
| ----------------- | -------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------- |
|
|
1103
1103
|
| `createScratch` | function | `(options?: ScratchOptions) => ScratchInterface` | Allocates an owned temporary directory with contained file operations. |
|
|
1104
1104
|
| `createLoopback` | function | `(server: Server) => Promise<LoopbackInterface>` | Starts a server on an ephemeral IPv4 loopback port. |
|