effect-browser 0.2.0-beta.6 → 0.2.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +507 -130
- package/dist/Browser-n-bKgBNN.d.mts +372 -0
- package/dist/Browser.d.mts +3 -189
- package/dist/Browser.mjs +9 -1
- package/dist/Browser.mjs.map +1 -1
- package/dist/{BrowserData-DPh3Oaof.d.mts → BrowserData-CPIIIHol.d.mts} +84 -10
- package/dist/BrowserData.d.mts +2 -2
- package/dist/BrowserData.mjs +106 -7
- package/dist/BrowserData.mjs.map +1 -1
- package/dist/{BrowserRuntime-BBAjpVFa.d.mts → BrowserRuntime-CFe9uUTv.d.mts} +16 -11
- package/dist/{BrowserRuntime-DImn_Oe_.mjs → BrowserRuntime-HJ1yYlFS.mjs} +4977 -4134
- package/dist/BrowserRuntime-HJ1yYlFS.mjs.map +1 -0
- package/dist/BrowserRuntime.d.mts +2 -2
- package/dist/BrowserRuntime.mjs +2 -1
- package/dist/Capture.d.mts +9 -7
- package/dist/Capture.mjs +157 -32
- package/dist/Capture.mjs.map +1 -1
- package/dist/{CaptureData-Dys0Ko9d.mjs → CaptureData-CYriZHX1.mjs} +25 -6
- package/dist/CaptureData-CYriZHX1.mjs.map +1 -0
- package/dist/CaptureData.d.mts +62 -3
- package/dist/CaptureData.mjs +2 -2
- package/dist/Chromium.d.mts +2 -2
- package/dist/Chromium.mjs +19 -10
- package/dist/Chromium.mjs.map +1 -1
- package/dist/Errors.d.mts +69 -17
- package/dist/Errors.mjs +57 -6
- package/dist/Errors.mjs.map +1 -1
- package/dist/Images-CaaPNeed.mjs +76 -0
- package/dist/Images-CaaPNeed.mjs.map +1 -0
- package/dist/OperationOptions-DAeRS6O9.mjs +55 -0
- package/dist/OperationOptions-DAeRS6O9.mjs.map +1 -0
- package/dist/PageControl.d.mts +6 -6
- package/dist/PageControl.mjs +16 -10
- package/dist/PageControl.mjs.map +1 -1
- package/dist/PageRegistry-B3q9DS3g.mjs +164 -0
- package/dist/PageRegistry-B3q9DS3g.mjs.map +1 -0
- package/dist/Plan-D8qQ48Ic.mjs +512 -0
- package/dist/Plan-D8qQ48Ic.mjs.map +1 -0
- package/dist/Plan.d.mts +3 -0
- package/dist/Plan.mjs +2 -0
- package/dist/PlanData-B668RxbQ.d.mts +4831 -0
- package/dist/PlanData.d.mts +3 -0
- package/dist/PlanData.mjs +268 -0
- package/dist/PlanData.mjs.map +1 -0
- package/dist/PlanInput-BJcPPncs.mjs +75 -0
- package/dist/PlanInput-BJcPPncs.mjs.map +1 -0
- package/dist/PublicSession-Bs61Eal8.mjs +5601 -0
- package/dist/PublicSession-Bs61Eal8.mjs.map +1 -0
- package/dist/Testing.d.mts +48 -6
- package/dist/Testing.mjs +675 -123
- package/dist/Testing.mjs.map +1 -1
- package/dist/Timeline-fV22Xk-S.d.mts +29 -0
- package/dist/Timeline.d.mts +4 -0
- package/dist/Timeline.mjs +20 -0
- package/dist/Timeline.mjs.map +1 -0
- package/dist/TimelineData-BsOn-YGZ.d.mts +3818 -0
- package/dist/TimelineData.d.mts +3 -0
- package/dist/TimelineData.mjs +482 -0
- package/dist/TimelineData.mjs.map +1 -0
- package/dist/index.d.mts +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +17 -1
- package/dist/Association-BsSfBYVx.mjs +0 -138
- package/dist/Association-BsSfBYVx.mjs.map +0 -1
- package/dist/BrowserRuntime-DImn_Oe_.mjs.map +0 -1
- package/dist/CaptureData-Dys0Ko9d.mjs.map +0 -1
- package/dist/PageControlAssociation-DabEg5AR.mjs +0 -10
- package/dist/PageControlAssociation-DabEg5AR.mjs.map +0 -1
package/dist/Testing.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BrowserError, BrowserOperation, BrowserOutcome, BrowserReason, InitializationError } from "./Errors.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { r as BrowserBinding } from "./BrowserRuntime-
|
|
2
|
+
import { it as Viewport, o as BrowserPolicy, ot as ViewportPoint, r as AutomationOptions } from "./BrowserData-CPIIIHol.mjs";
|
|
3
|
+
import { c as OpenOptions, i as BrowserSession } from "./Browser-n-bKgBNN.mjs";
|
|
4
|
+
import { r as BrowserBinding } from "./BrowserRuntime-CFe9uUTv.mjs";
|
|
5
5
|
import { Crypto, Effect, Layer, Option, Schema, Scope } from "effect";
|
|
6
6
|
//#region src/internal/testing/Frame.d.ts
|
|
7
7
|
/** A valid 64×48 baseline JPEG, the bytes a scripted capture frame carries by default. */
|
|
@@ -72,6 +72,18 @@ export declare const DocumentScript: Schema.Struct<{
|
|
|
72
72
|
readonly url: Schema.NonEmptyString;
|
|
73
73
|
readonly title: Schema.optionalKey<Schema.String>;
|
|
74
74
|
readonly text: Schema.String;
|
|
75
|
+
/**
|
|
76
|
+
* Authored root-document geometry, not inferred layout. Readings carry this exact snapshot;
|
|
77
|
+
* use document.update to supply the next state after a scripted scroll or resize.
|
|
78
|
+
*/
|
|
79
|
+
readonly documentScroll: Schema.optionalKey<Schema.Struct<{
|
|
80
|
+
readonly x: Schema.Finite;
|
|
81
|
+
readonly y: Schema.Finite;
|
|
82
|
+
readonly scrollWidth: Schema.Natural;
|
|
83
|
+
readonly scrollHeight: Schema.Natural;
|
|
84
|
+
readonly clientWidth: Schema.Natural;
|
|
85
|
+
readonly clientHeight: Schema.Natural;
|
|
86
|
+
}>>;
|
|
75
87
|
readonly controls: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
76
88
|
readonly id: Schema.NonEmptyString;
|
|
77
89
|
readonly kind: Schema.Literals<readonly ["link", "button", "input", "select", "textarea", "other"]>;
|
|
@@ -124,6 +136,18 @@ export declare const Script: Schema.Struct<{
|
|
|
124
136
|
readonly url: Schema.NonEmptyString;
|
|
125
137
|
readonly title: Schema.optionalKey<Schema.String>;
|
|
126
138
|
readonly text: Schema.String;
|
|
139
|
+
/**
|
|
140
|
+
* Authored root-document geometry, not inferred layout. Readings carry this exact snapshot;
|
|
141
|
+
* use document.update to supply the next state after a scripted scroll or resize.
|
|
142
|
+
*/
|
|
143
|
+
readonly documentScroll: Schema.optionalKey<Schema.Struct<{
|
|
144
|
+
readonly x: Schema.Finite;
|
|
145
|
+
readonly y: Schema.Finite;
|
|
146
|
+
readonly scrollWidth: Schema.Natural;
|
|
147
|
+
readonly scrollHeight: Schema.Natural;
|
|
148
|
+
readonly clientWidth: Schema.Natural;
|
|
149
|
+
readonly clientHeight: Schema.Natural;
|
|
150
|
+
}>>;
|
|
127
151
|
readonly controls: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
128
152
|
readonly id: Schema.NonEmptyString;
|
|
129
153
|
readonly kind: Schema.Literals<readonly ["link", "button", "input", "select", "textarea", "other"]>;
|
|
@@ -196,7 +220,7 @@ export declare class ScriptedCleanupResult extends ScriptedCleanupResult_base {}
|
|
|
196
220
|
* The operations whose next call a test may script. `disconnect` is the owner's native teardown
|
|
197
221
|
* of a connection: a `Fail` makes it fail and a `Hold` parks it, however long cleanup waits.
|
|
198
222
|
*/
|
|
199
|
-
export declare const ScriptableOperation: Schema.Literals<("capture-stop" | "checkpoint" | "click" | "click-and-wait" | "close-page" | "control-facts" | "disconnect" | "download-action" | "file-chooser" | "fill" | "fill-form" | "hover" | "list-frames" | "list-pages" | "navigate" | "navigate-stop" | "new-page" | "observe" | "page-resume" | "page-suspend" | "pointer-move" | "press" | "read-text" | "resize" | "revalidate" | "screenshot" | "scroll" | "select-files" | "select-
|
|
223
|
+
export declare const ScriptableOperation: Schema.Literals<("capture-stop" | "checkpoint" | "click" | "click-and-wait" | "close-page" | "control-facts" | "describe-page" | "disconnect" | "download-action" | "file-chooser" | "fill" | "fill-form" | "hover" | "list-frames" | "list-pages" | "navigate" | "navigate-stop" | "new-page" | "observe" | "page-resume" | "page-suspend" | "pointer-move" | "press" | "read-text" | "resize" | "resolve" | "revalidate" | "run" | "screenshot" | "scroll" | "select-files" | "select-option" | "select-page" | "settled" | "type" | "wait" | "wheel")[]>;
|
|
200
224
|
export type ScriptableOperation = typeof ScriptableOperation.Type;
|
|
201
225
|
/** A held native call: the test learns that it arrived, then decides when it may finish. */
|
|
202
226
|
interface Gate {
|
|
@@ -337,13 +361,22 @@ export interface ScriptedBinding {
|
|
|
337
361
|
* Open one scripted browser in the caller's Scope. The session is the real owner over a
|
|
338
362
|
* scripted native engine: admission, budgets, staleness, dispatch evidence, capture, page holds
|
|
339
363
|
* and typed callbacks are the production code paths. Only the page and its outcomes are scripted,
|
|
340
|
-
* and the owner's ids and handoff tokens
|
|
364
|
+
* and the owner's ids and handoff tokens use deterministic Crypto namespaced by this
|
|
365
|
+
* scripted reference, so independently opened sessions have distinct evidence domains.
|
|
341
366
|
*/
|
|
342
367
|
export declare const open: <E = never, R = never>(script: {
|
|
343
368
|
readonly documents: readonly {
|
|
344
369
|
readonly url: string;
|
|
345
370
|
readonly title?: string | undefined;
|
|
346
371
|
readonly text: string;
|
|
372
|
+
readonly documentScroll?: {
|
|
373
|
+
readonly x: number;
|
|
374
|
+
readonly y: number;
|
|
375
|
+
readonly scrollWidth: number;
|
|
376
|
+
readonly scrollHeight: number;
|
|
377
|
+
readonly clientWidth: number;
|
|
378
|
+
readonly clientHeight: number;
|
|
379
|
+
} | undefined;
|
|
347
380
|
readonly controls?: readonly {
|
|
348
381
|
readonly id: string;
|
|
349
382
|
readonly kind: "button" | "input" | "link" | "other" | "select" | "textarea";
|
|
@@ -381,7 +414,8 @@ export declare const open: <E = never, R = never>(script: {
|
|
|
381
414
|
/**
|
|
382
415
|
* The `Crypto` scripted browsers draw their ids and handoff tokens from. Its bytes count up from
|
|
383
416
|
* one on each build, so every value is predictable; it is not random and computes no digest.
|
|
384
|
-
* `open` uses
|
|
417
|
+
* `open` uses the same counter with its original scripted-reference namespace. A provider
|
|
418
|
+
* Layer built over `binding` still requires a `Crypto`, and
|
|
385
419
|
* this one keeps such a test free of a platform package.
|
|
386
420
|
*/
|
|
387
421
|
export declare const sequentialCrypto: Layer.Layer<Crypto.Crypto>;
|
|
@@ -395,6 +429,14 @@ export declare const binding: (script: {
|
|
|
395
429
|
readonly url: string;
|
|
396
430
|
readonly title?: string | undefined;
|
|
397
431
|
readonly text: string;
|
|
432
|
+
readonly documentScroll?: {
|
|
433
|
+
readonly x: number;
|
|
434
|
+
readonly y: number;
|
|
435
|
+
readonly scrollWidth: number;
|
|
436
|
+
readonly scrollHeight: number;
|
|
437
|
+
readonly clientWidth: number;
|
|
438
|
+
readonly clientHeight: number;
|
|
439
|
+
} | undefined;
|
|
398
440
|
readonly controls?: readonly {
|
|
399
441
|
readonly id: string;
|
|
400
442
|
readonly kind: "button" | "input" | "link" | "other" | "select" | "textarea";
|