@applitools/nlp-web-runner 5.3.0 → 5.4.1-dev.df8483935

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.
@@ -1 +1 @@
1
- var T=l;(function(B,E){var C=l,Y=B();while(!![]){try{var x=-parseInt(C(0x183))/0x1+parseInt(C(0x182))/0x2*(parseInt(C(0x17c))/0x3)+-parseInt(C(0x17f))/0x4*(-parseInt(C(0x17b))/0x5)+parseInt(C(0x17a))/0x6+-parseInt(C(0x17e))/0x7*(parseInt(C(0x17d))/0x8)+parseInt(C(0x185))/0x9*(-parseInt(C(0x179))/0xa)+parseInt(C(0x184))/0xb*(-parseInt(C(0x180))/0xc);if(x===E)break;else Y['push'](Y['shift']());}catch(J){Y['push'](Y['shift']());}}}(D,0x48619));function D(){var f=['mtG1mtmZmeDWwNbcyG','nw1QsKHTtG','ndm4s2rWwvD6','mtqXndq4AvLXEgPT','n1jvte9rtW','mtmXmti0ohf0qLzVCG','mZi0vuDsv1fN','zgvMAw5LuhjVCgvYDhK','mZG2oezvu2TAsG','mtuZotu2AxLjENHh','mtaYodGZrgDqtfDJ','ntu4zwvlsujx','Dg9tDhjPBMDuywC','mZe5ntbvqxLpwhG'];D=function(){return f;};return D();}var __defProp=Object[T(0x181)],__exportAll=(B,E)=>{var V=T;let Y={};for(var x in B)__defProp(Y,x,{'get':B[x],'enumerable':!![]});if(!E)__defProp(Y,Symbol[V(0x178)],{'value':'Module'});return Y;};function l(B,E){B=B-0x178;var Y=D();var x=Y[B];if(l['FKetDi']===undefined){var J=function(f){var j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var m='',z='';for(var H=0x0,A,y,w=0x0;y=f['charAt'](w++);~y&&(A=H%0x4?A*0x40+y:y,H++%0x4)?m+=String['fromCharCode'](0xff&A>>(-0x2*H&0x6)):0x0){y=j['indexOf'](y);}for(var t=0x0,N=m['length'];t<N;t++){z+='%'+('00'+m['charCodeAt'](t)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(z);};l['ekiccp']=J,l['ZAmgBV']={},l['FKetDi']=!![];}var C=Y[0x0],T=B+C,V=l['ZAmgBV'][T];return!V?(x=l['ekiccp'](x),l['ZAmgBV'][T]=x):x=V,x;}export{__exportAll as t};
1
+ function J(G,F){G=G-0x13f;var R=i();var l=R[G];if(J['eCUCuW']===undefined){var d=function(s){var E='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var x='',H='';for(var T=0x0,c,z,y=0x0;z=s['charAt'](y++);~z&&(c=T%0x4?c*0x40+z:z,T++%0x4)?x+=String['fromCharCode'](0xff&c>>(-0x2*T&0x6)):0x0){z=E['indexOf'](z);}for(var O=0x0,P=x['length'];O<P;O++){H+='%'+('00'+x['charCodeAt'](O)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(H);};J['vIMQhY']=d,J['UDeAWb']={},J['eCUCuW']=!![];}var u=R[0x0],A=G+u,K=J['UDeAWb'][A];return!K?(l=J['vIMQhY'](l),J['UDeAWb'][A]=l):l=K,l;}function i(){var s=['otuYmJK2vfPcyNDt','mZaWnJGWmwXOvKLszW','mteYDvDiD3by','mZu1otbXCNHUC1C','mti1nhHlBhHUCa','tw9KDwXL','mtaZngrYvuLUvW','mtyXmZvxDej0sxO','zgvMAw5LuhjVCgvYDhK','mu5wrvHzEa','nte4nxfczefSwG','mZaZmtm4Bvfnq210','oti0odC0twrLyuz4'];i=function(){return s;};return i();}var A=J;(function(G,F){var u=J,R=G();while(!![]){try{var l=parseInt(u(0x13f))/0x1*(parseInt(u(0x142))/0x2)+-parseInt(u(0x141))/0x3+parseInt(u(0x143))/0x4+parseInt(u(0x140))/0x5*(parseInt(u(0x147))/0x6)+-parseInt(u(0x14a))/0x7*(-parseInt(u(0x145))/0x8)+parseInt(u(0x144))/0x9+parseInt(u(0x146))/0xa*(-parseInt(u(0x149))/0xb);if(l===F)break;else R['push'](R['shift']());}catch(d){R['push'](R['shift']());}}}(i,0xcf08b));var __defProp=Object[A(0x14b)],__exportAll=(G,F)=>{var K=A;let R={};for(var l in G)__defProp(R,l,{'get':G[l],'enumerable':!![]});if(!F)__defProp(R,Symbol['toStringTag'],{'value':K(0x148)});return R;};export{__exportAll as t};
@@ -1,5 +1,4 @@
1
1
  {
2
- "@applitools/nlp-parser": "workspace:^",
3
2
  "culori": "^4.0.2",
4
3
  "undici": "^7.25.0",
5
4
  "chrome-har": "^1.3.1",
@@ -1,4 +1,3 @@
1
- import { AbsolutePosition, Action, AnchorDescriptor, AnchorDescriptor as AnchorDescriptor$1, Any, ChromeElementDescriptor, CloseAction, Condition, ContentType, ControlType, DropPreinstructionsControlFlow, ElementDescriptor, ElementDescriptor as ElementDescriptor$1, ElementScrollDirection, EntriesOperation, Extractor, FileHandle, Generator as Generator$1, IfControlFlow, InitializeScopeControlFlow, Instruction, InterpolatedString, JSExpression, JSExpressionReference, KeysOperation, NumberExpression, OTP, Operand, Operation, Pattern, Primitive, RandomValue, Reference, RelativePosition, SetPreinstructionsControlFlow, SizeOperation, StructuralType, Structure, TryControlFlow, ValuesOperation } from "@applitools/nlp-parser";
2
1
  import { Dispatcher, WebSocket } from "undici";
3
2
  import { Readable } from "node:stream";
4
3
  import { Har } from "chrome-har";
@@ -6,6 +5,537 @@ import { Protocol } from "devtools-protocol";
6
5
  type WebDriver = never;
7
6
  import { ProtocolMapping } from "devtools-protocol/types/protocol-mapping.js";
8
7
 
8
+ //#region ../parser/dist/types.d.ts
9
+ type SetPreinstructionsControlFlow = {
10
+ type: 'set preinstructions';
11
+ instructions: Instruction[];
12
+ };
13
+ type DropPreinstructionsControlFlow = {
14
+ type: 'drop preinstructions';
15
+ };
16
+ type TryControlFlow = {
17
+ type: 'try';
18
+ instructions: Instruction[];
19
+ };
20
+ type InitializeScopeControlFlow = {
21
+ type: 'initialize scope';
22
+ name: string;
23
+ parameters?: {
24
+ name: string;
25
+ value: AnyExpression;
26
+ secret: boolean;
27
+ }[];
28
+ options?: {
29
+ navigation?: 'all';
30
+ assertions?: 'visual' | 'nonvisual' | 'all';
31
+ };
32
+ };
33
+ type IfControlFlow = {
34
+ type: 'if';
35
+ condition: Condition;
36
+ then?: Instruction[];
37
+ otherwise?: Instruction[];
38
+ };
39
+ type ControlFlow = SetPreinstructionsControlFlow | DropPreinstructionsControlFlow | TryControlFlow | InitializeScopeControlFlow | IfControlFlow;
40
+ type EmptyAction = {
41
+ type: 'empty';
42
+ };
43
+ type CommentAction = {
44
+ type: 'comment';
45
+ text: string;
46
+ };
47
+ type SetVariableAction = {
48
+ type: 'set variable';
49
+ destruction?: boolean;
50
+ names: {
51
+ name: string;
52
+ secret?: boolean;
53
+ }[];
54
+ data: {
55
+ value: AnyExpression | Extractor<ElementDescriptor, any> | Generator$1;
56
+ secret?: boolean;
57
+ };
58
+ scope?: 'public' | 'internal';
59
+ };
60
+ type SetValueAction = {
61
+ type: 'set value';
62
+ value: StringExpression | NumberExpression | Generator$1 | FileHandle;
63
+ element: ElementDescriptor;
64
+ };
65
+ type FetchAction = {
66
+ type: 'fetch';
67
+ url: StringExpression;
68
+ method?: 'get' | 'post' | 'put' | 'patch' | 'delete' | 'head' | 'trace' | 'options' | 'connect';
69
+ auth?: {
70
+ type: 'basic';
71
+ username: StringExpression;
72
+ password: StringExpression;
73
+ };
74
+ headers?: {
75
+ name: StringExpression;
76
+ value: StringExpression;
77
+ secret: boolean;
78
+ }[];
79
+ cookies?: {
80
+ name: StringExpression;
81
+ value: StringExpression;
82
+ secret: boolean;
83
+ }[];
84
+ body?: {
85
+ type?: 'json' | 'xml' | 'base64';
86
+ data: AnyExpression;
87
+ };
88
+ statuses?: number[] | '*';
89
+ };
90
+ type AssertAction = {
91
+ type: 'assert';
92
+ condition: Condition;
93
+ timeout?: NumberExpression;
94
+ };
95
+ type EvaluateAction = {
96
+ type: 'evaluate';
97
+ js: JSExpression;
98
+ };
99
+ type FocusAction = {
100
+ type: 'focus';
101
+ element: ElementDescriptor;
102
+ };
103
+ type CheckAction = {
104
+ type: 'check';
105
+ value: boolean;
106
+ element: ElementDescriptor;
107
+ };
108
+ type ClearAction = {
109
+ type: 'clear';
110
+ element?: ElementDescriptor;
111
+ };
112
+ type EraseAction = {
113
+ type: 'erase';
114
+ size: NumberExpression;
115
+ element?: ElementDescriptor;
116
+ };
117
+ type TypeAction = {
118
+ type: 'type';
119
+ value: AnyExpression | Extractor<ElementDescriptor, any> | Generator$1;
120
+ secret?: boolean;
121
+ element?: ElementDescriptor | ChromeElementDescriptor;
122
+ };
123
+ type SearchAction = {
124
+ type: 'search';
125
+ value: StringExpression;
126
+ element?: ElementDescriptor;
127
+ };
128
+ type HitKeyAction = {
129
+ type: 'hit key';
130
+ keys: Key[];
131
+ times?: NumberExpression;
132
+ };
133
+ type ClickElementAction = {
134
+ type: 'click';
135
+ keys?: Key[];
136
+ element: ElementDescriptor;
137
+ button?: 'left' | 'right';
138
+ times?: number;
139
+ };
140
+ type ClickChromeElementAction = {
141
+ type: 'click';
142
+ element: ChromeElementDescriptor;
143
+ };
144
+ type HoverAction = {
145
+ type: 'hover';
146
+ element: ElementDescriptor;
147
+ };
148
+ type ScrollByDistanceAction = {
149
+ type: 'scroll';
150
+ distance?: NumberExpression;
151
+ direction?: Direction;
152
+ times?: NumberExpression;
153
+ };
154
+ type ScrollByFractionAction = {
155
+ type: 'scroll';
156
+ fraction: NumberExpression;
157
+ element?: ElementDescriptor | ViewportDescriptor;
158
+ direction?: Direction;
159
+ times?: NumberExpression;
160
+ };
161
+ type ScrollToPositionAction = {
162
+ type: 'scroll';
163
+ position: AbsolutePosition;
164
+ element?: ElementDescriptor | ViewportDescriptor;
165
+ times?: NumberExpression;
166
+ };
167
+ type ScrollToElementAction = {
168
+ type: 'scroll';
169
+ element: ElementDescriptor;
170
+ };
171
+ type ScrollTheElementAction = {
172
+ type: 'scroll';
173
+ element: ElementDescriptor;
174
+ direction?: Direction;
175
+ distance: NumberExpression;
176
+ times?: NumberExpression;
177
+ };
178
+ type AlertAction = {
179
+ type: 'alert';
180
+ value: boolean;
181
+ condition?: ElementCondition;
182
+ };
183
+ type NavigatePdfAction = {
184
+ type: 'navigate pdf';
185
+ page: NumberExpression;
186
+ };
187
+ type NavigateToUrlAction = {
188
+ type: 'navigate';
189
+ url: StringExpression;
190
+ relative?: boolean;
191
+ statuses?: number[] | '*';
192
+ };
193
+ type NavigateThroughHistoryAction = {
194
+ type: 'navigate';
195
+ direction: HistoryDirection;
196
+ times?: NumberExpression;
197
+ };
198
+ type GoAction = {
199
+ type: 'go';
200
+ target: StringExpression;
201
+ };
202
+ type RefreshAction = {
203
+ type: 'refresh';
204
+ value?: 'hard' | 'soft';
205
+ };
206
+ type CreateTargetAction = {
207
+ type: 'create target';
208
+ url?: StringExpression;
209
+ };
210
+ type CloseTargetAction = {
211
+ type: 'close target';
212
+ };
213
+ type CloseAction = {
214
+ type: 'close';
215
+ element: ElementDescriptor;
216
+ };
217
+ type SwitchTargetByIndexAction = {
218
+ type: 'switch target';
219
+ index: NumberExpression;
220
+ };
221
+ type SwitchTargetByTitleAction = {
222
+ type: 'switch target';
223
+ title: StringExpression;
224
+ };
225
+ type SwitchTargetByPositionAction = {
226
+ type: 'switch target';
227
+ position: SequentialRelativePosition;
228
+ };
229
+ type WaitAction = {
230
+ type: 'wait';
231
+ timeout?: NumberExpression;
232
+ condition?: Condition;
233
+ };
234
+ type FindAction = {
235
+ type: 'find';
236
+ element: ElementDescriptor;
237
+ };
238
+ type VisualCheckAction = {
239
+ type: 'visual check';
240
+ };
241
+ type IntentAction = {
242
+ type: 'intent';
243
+ description: string;
244
+ };
245
+ type Action<TType extends string> = Extract<EmptyAction | CommentAction | SetVariableAction | SetValueAction | FetchAction | AssertAction | EvaluateAction | FocusAction | CheckAction | ClearAction | EraseAction | TypeAction | HitKeyAction | SearchAction | ClickElementAction | ClickChromeElementAction | HoverAction | ScrollByDistanceAction | ScrollByFractionAction | ScrollToPositionAction | ScrollToElementAction | ScrollTheElementAction | AlertAction | NavigateToUrlAction | NavigateThroughHistoryAction | NavigatePdfAction | RefreshAction | CreateTargetAction | CloseTargetAction | CloseAction | SwitchTargetByIndexAction | SwitchTargetByTitleAction | SwitchTargetByPositionAction | WaitAction | GoAction | FindAction | VisualCheckAction | IntentAction, {
246
+ type: TType;
247
+ }>;
248
+ type Instruction = Action<any> | ControlFlow;
249
+ type Program$1 = Instruction[];
250
+ type SealedProgram = {
251
+ __seal?: never;
252
+ };
253
+ type Primitive<TPrimitiveName extends string> = TPrimitiveName extends 'null' ? null : TPrimitiveName extends 'boolean' ? boolean : TPrimitiveName extends 'number' ? number : TPrimitiveName extends 'string' ? string : TPrimitiveName extends 'any' ? Any : unknown;
254
+ type PrimitiveName<TPrimitive = Any> = TPrimitive extends null ? 'null' : TPrimitive extends boolean ? 'boolean' : TPrimitive extends number ? 'number' : TPrimitive extends string ? 'string' : TPrimitive extends Any ? 'any' : never;
255
+ type Reference<TType> = {
256
+ isRef: true;
257
+ name: string;
258
+ modifiers?: ({
259
+ get: number | StringExpression;
260
+ } | {
261
+ match: Pattern;
262
+ })[];
263
+ type?: PrimitiveName<TType>;
264
+ scope?: 'public' | 'internal';
265
+ };
266
+ type JSExpressionReference<TType> = {
267
+ isJSExpressionRef: true;
268
+ expression: JSExpression;
269
+ type?: PrimitiveName<TType>;
270
+ };
271
+ type InterpolatedString = {
272
+ isInterpolatedString: true;
273
+ chunks: (string | Reference<string> | JSExpressionReference<string>)[];
274
+ };
275
+ type JSExpression = {
276
+ isJSExpression: true;
277
+ chunks: (string | Reference<Any>)[];
278
+ };
279
+ type Structure = ArrayStructure | RecordStructure;
280
+ type ArrayStructure = {
281
+ isStructure: true;
282
+ type: 'array';
283
+ items: AnyExpression[];
284
+ };
285
+ type RecordStructure = {
286
+ isStructure: true;
287
+ type: 'record';
288
+ items: {
289
+ key: StringExpression;
290
+ value: AnyExpression;
291
+ }[];
292
+ };
293
+ type Pattern = {
294
+ isPattern: true;
295
+ flags?: string;
296
+ } & ({
297
+ pattern: string;
298
+ } | {
299
+ name: PatternName;
300
+ });
301
+ type PatternName = 'number' | 'price' | 'percentage' | 'date' | 'time' | 'code';
302
+ type Extractor<TValue, TType extends Primitive<any>> = {
303
+ isExtractor: true;
304
+ value: TValue;
305
+ type: PrimitiveName<TType> | 'color' | 'background-color' | 'foreground-color';
306
+ };
307
+ type OTP = {
308
+ isOTP: true;
309
+ user: StringExpression;
310
+ };
311
+ type RandomValue<TType extends Primitive<any> = any> = {
312
+ isRandomValue: true;
313
+ description?: StringExpression;
314
+ type?: PrimitiveName<TType>;
315
+ properties?: string[];
316
+ };
317
+ type Generator$1 = OTP | RandomValue;
318
+ type FileHandle = {
319
+ isFileHandle: true;
320
+ filename: StringExpression;
321
+ };
322
+ type NumberExpression = number | NumberOperation | Reference<number> | JSExpressionReference<number>;
323
+ type StringExpression = string | InterpolatedString | Reference<string> | JSExpressionReference<string>;
324
+ type Any = null | boolean | number | string | {
325
+ [key: string]: Any;
326
+ } | Any[];
327
+ type AnyExpression = null | boolean | number | NumberOperation | string | InterpolatedString | Structure | Reference<Any> | JSExpressionReference<Any>;
328
+ type Condition = {
329
+ isCondition: true;
330
+ operation: ConditionOperation;
331
+ };
332
+ type Operation = ConditionOperation | ExpressionOperation;
333
+ type ExpressionOperation = SizeOperation | KeysOperation | ValuesOperation | EntriesOperation | NumberOperation;
334
+ type NumberOperation = AddOperation | SubOperation | MulOperation | DivOperation;
335
+ type ConditionOperation = ParensOperation | IgnoreCaseOperation | MatchCaseOperation | NotOperation | OrOperation | AndOperation | ComparisonOperation | ValidateOperation | MatchOperation | IncludesOnlyOperation | IncludesOperation | StartsWithOperation | EndsWithOperation | VisibleOperation | ClickableOperation | EnabledOperation | HoveredOperation | CheckedOperation | PopulatedOperation;
336
+ type Operand = {
337
+ isOperand: true;
338
+ value: AnyExpression | ElementDescriptor | Extractor<ElementDescriptor, any> | DialogDescriptor | ExpressionOperation;
339
+ };
340
+ type ParensOperation = {
341
+ operator: 'parens';
342
+ operands: [ConditionOperation];
343
+ };
344
+ type NotOperation = {
345
+ operator: 'not';
346
+ operands: [ConditionOperation];
347
+ };
348
+ type IgnoreCaseOperation = {
349
+ operator: 'ignore case';
350
+ operands: [ConditionOperation];
351
+ };
352
+ type MatchCaseOperation = {
353
+ operator: 'match case';
354
+ operands: [ConditionOperation];
355
+ };
356
+ type SizeOperation = {
357
+ operator: 'size';
358
+ operands: [Operand];
359
+ };
360
+ type KeysOperation = {
361
+ operator: 'keys';
362
+ operands: [Operand];
363
+ };
364
+ type ValuesOperation = {
365
+ operator: 'values';
366
+ operands: [Operand];
367
+ };
368
+ type EntriesOperation = {
369
+ operator: 'entries';
370
+ operands: [Operand];
371
+ };
372
+ type AddOperation = {
373
+ operator: 'add';
374
+ operands: [Operand, Operand];
375
+ };
376
+ type SubOperation = {
377
+ operator: 'sub';
378
+ operands: [Operand, Operand];
379
+ };
380
+ type MulOperation = {
381
+ operator: 'mul';
382
+ operands: [Operand, Operand];
383
+ };
384
+ type DivOperation = {
385
+ operator: 'div';
386
+ operands: [Operand, Operand];
387
+ };
388
+ type OrOperation = {
389
+ operator: 'or';
390
+ operands: [ConditionOperation, ConditionOperation];
391
+ };
392
+ type AndOperation = {
393
+ operator: 'and';
394
+ operands: [ConditionOperation, ConditionOperation];
395
+ };
396
+ type ComparisonOperation = EqOperation | LtOperation | GtOperation | LteOperation | GteOperation;
397
+ type EqOperation = {
398
+ operator: 'eq';
399
+ operands: [Operand, Operand];
400
+ };
401
+ type LtOperation = {
402
+ operator: 'lt';
403
+ operands: [Operand, Operand];
404
+ };
405
+ type GtOperation = {
406
+ operator: 'gt';
407
+ operands: [Operand, Operand];
408
+ };
409
+ type LteOperation = {
410
+ operator: 'lte';
411
+ operands: [Operand, Operand];
412
+ };
413
+ type GteOperation = {
414
+ operator: 'gte';
415
+ operands: [Operand, Operand];
416
+ };
417
+ type ValidateOperation = {
418
+ operator: 'validate';
419
+ operands: [Operand, `${'lower' | 'upper' | 'pascal' | 'camel' | 'snake' | 'kebab'}case` | 'capitalized' | 'numeric' | 'alphanumeric'];
420
+ };
421
+ type MatchOperation = {
422
+ operator: 'match';
423
+ operands: [Operand, Pattern];
424
+ };
425
+ type IncludesOnlyOperation = {
426
+ operator: 'includes only';
427
+ operands: [Operand, Operand, ...Operand[]];
428
+ };
429
+ type IncludesOperation = {
430
+ operator: 'includes';
431
+ operands: [Operand, Operand];
432
+ };
433
+ type StartsWithOperation = {
434
+ operator: 'starts with';
435
+ operands: [Operand, Operand];
436
+ };
437
+ type EndsWithOperation = {
438
+ operator: 'ends with';
439
+ operands: [Operand, Operand];
440
+ };
441
+ type VisibleOperation = {
442
+ operator: 'visible';
443
+ operands: [Operand];
444
+ };
445
+ type ClickableOperation = {
446
+ operator: 'clickable';
447
+ operands: [Operand];
448
+ };
449
+ type EnabledOperation = {
450
+ operator: 'enabled';
451
+ operands: [Operand];
452
+ };
453
+ type HoveredOperation = {
454
+ operator: 'hovered';
455
+ operands: [Operand];
456
+ };
457
+ type CheckedOperation = {
458
+ operator: 'checked';
459
+ operands: [Operand, boolean];
460
+ };
461
+ type PopulatedOperation = {
462
+ operator: 'populated';
463
+ operands: [Operand];
464
+ };
465
+ type ElementScrollDirection = 'horizontal' | 'vertical' | 'both';
466
+ type ElementDescriptor = {
467
+ nth?: NumberExpression;
468
+ type?: ElementType | ElementType[];
469
+ title?: StringExpression | Pattern;
470
+ orderDirection?: 'forward' | 'backward';
471
+ state?: {
472
+ focused?: boolean;
473
+ active?: boolean;
474
+ };
475
+ color?: StringExpression;
476
+ superlative?: Superlative;
477
+ selector?: Selector$1;
478
+ hints?: {
479
+ type?: ElementType | ElementType[];
480
+ scrollable?: ElementScrollDirection;
481
+ role?: 'close' | 'submit' | 'cancel';
482
+ };
483
+ avoid?: ElementDescriptorAvoid | ElementDescriptorAvoid[];
484
+ anchor?: AnchorDescriptor | AnchorDescriptor[];
485
+ secret?: boolean;
486
+ fallback?: ElementDescriptor;
487
+ vocabulary?: Record<string, string>[];
488
+ };
489
+ type ElementDescriptorAvoid = {
490
+ type?: ElementType | ElementType[];
491
+ ancestor?: {
492
+ type?: ElementType | ElementType[];
493
+ minScore?: number;
494
+ };
495
+ };
496
+ type Selector$1 = {
497
+ type: 'css' | 'xpath';
498
+ selector: StringExpression;
499
+ };
500
+ type AnchorDescriptor<TElement = ElementDescriptor> = RelativeAnchorDescriptor<TElement> | AbsoluteAnchorDescriptor<TElement>;
501
+ type RelativeAnchorDescriptor<TElement = ElementDescriptor> = {
502
+ position: RelativePosition | RelativePosition[];
503
+ element: TElement;
504
+ };
505
+ type AbsoluteAnchorDescriptor<TElement = ElementDescriptor> = {
506
+ position: AbsolutePosition | AbsolutePosition[];
507
+ element?: TElement | ViewportDescriptor;
508
+ };
509
+ type DialogDescriptor = {
510
+ isDialogDescriptor: true;
511
+ };
512
+ type ChromeElementDescriptor = {
513
+ isChromeElementDescriptor: true;
514
+ title: 'refresh' | 'back' | 'forward' | 'url';
515
+ };
516
+ type ViewportDescriptor = {
517
+ isViewportDescriptor: true;
518
+ };
519
+ type CharacterKey = 'Backquote' | 'Digit1' | 'Digit2' | 'Digit3' | 'Digit4' | 'Digit5' | 'Digit6' | 'Digit7' | 'Digit8' | 'Digit9' | 'Digit0' | 'Minus' | 'Equal' | 'Backslash' | 'KeyQ' | 'KeyW' | 'KeyE' | 'KeyR' | 'KeyT' | 'KeyY' | 'KeyU' | 'KeyI' | 'KeyO' | 'KeyP' | 'BracketLeft' | 'BracketRight' | 'KeyA' | 'KeyS' | 'KeyD' | 'KeyF' | 'KeyG' | 'KeyH' | 'KeyJ' | 'KeyK' | 'KeyL' | 'Semicolon' | 'Quote' | 'KeyZ' | 'KeyX' | 'KeyC' | 'KeyV' | 'KeyB' | 'KeyN' | 'KeyM' | 'Comma' | 'Period' | 'Slash';
520
+ type ArrowKey = 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight';
521
+ type ControlKey = 'Escape' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5' | 'F6' | 'F7' | 'F8' | 'F9' | 'F10' | 'F11' | 'F12' | 'Backspace' | 'Tab' | 'CapsLock' | 'Enter' | 'ShiftLeft' | 'ShiftRight' | 'ControlLeft' | 'MetaLeft' | 'AltLeft' | 'Space' | 'AltRight' | 'AltGraph' | 'MetaRight' | 'ControlRight' | 'Delete' | 'Home' | 'End' | 'PageUp' | 'PageDown' | 'Insert';
522
+ type Key = ControlKey | ArrowKey | CharacterKey;
523
+ type ElementCondition = {
524
+ type: ConditionType;
525
+ element?: ElementDescriptor;
526
+ };
527
+ type ConditionType = 'exists' | 'not-exists' | 'visible' | 'not-visible' | 'clickable';
528
+ type ElementType = StructuralType | ControlType | ContentType;
529
+ type StructuralType = 'app' | 'host' | 'ad' | 'header' | 'footer' | 'sidebar' | 'popup' | 'tooltip' | 'modal' | 'scrollable' | 'form' | 'fieldset' | 'menu' | 'menuitem' | 'hamburger' | 'list' | 'listitem' | 'heading' | 'table' | 'table-cell' | 'table-head-cell' | 'table-row' | 'table-dom-row' | 'table-leaf-row' | 'table-head-row' | 'table-column' | 'table-leaf-column' | 'table-stub-column' | 'card' | 'pdfpage';
530
+ type ControlType = 'checkboxgroup' | 'checkbox' | 'radiogroup' | 'radio' | 'textbox' | 'combobox' | 'listbox' | 'option' | 'datepicker' | 'timepicker' | 'datetimepicker' | 'colorpicker' | 'filepicker' | 'slider' | 'inputbox' | 'selectbox' | 'valuebox' | 'button' | 'color';
531
+ type ContentType = 'text' | 'link' | 'label' | 'logo' | 'image' | 'icon' | 'video' | 'paragraph';
532
+ type HistoryDirection = 'back' | 'forward';
533
+ type SequentialRelativePosition = 'next' | 'previous';
534
+ type Direction = 'up' | 'down' | 'left' | 'right';
535
+ type Superlative = 'smallest' | 'largest' | 'widest' | 'narrowest' | 'tallest' | 'shortest' | 'leftmost' | 'rightmost' | 'topmost' | 'bottommost';
536
+ type AbsolutePosition = 'inside' | 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright';
537
+ type RelativePosition = 'near' | 'above' | 'below' | 'leftof' | 'rightof' | 'aboveleftof' | 'aboverightof' | 'belowleftof' | 'belowrightof';
538
+ //#endregion
9
539
  //#region dist/_inline/_chunks/node-Cd1bkA9w.d.ts
10
540
  //#region src/automator.d.ts
11
541
  interface Automator {
@@ -7873,7 +8403,7 @@ interface IAXTreeView<TNode = unknown> extends Iterable<IAXNodeView<TNode>> {
7873
8403
  }
7874
8404
  //#endregion
7875
8405
  //#region src/columbus/types.d.ts
7876
- type ResolvedElementDescriptor = Omit<ElementDescriptor$1, 'title' | 'nth' | 'selector' | 'anchor' | 'color'> & {
8406
+ type ResolvedElementDescriptor = Omit<ElementDescriptor, 'title' | 'nth' | 'selector' | 'anchor' | 'color'> & {
7877
8407
  nth?: number;
7878
8408
  title?: string | Pattern;
7879
8409
  color?: string;
@@ -7885,7 +8415,7 @@ type ResolvedElementDescriptor = Omit<ElementDescriptor$1, 'title' | 'nth' | 'se
7885
8415
  fallback?: ResolvedElementDescriptor;
7886
8416
  node?: IAXNodeView;
7887
8417
  };
7888
- type ResolvedAnchor = AnchorDescriptor$1<ResolvedElementDescriptor>;
8418
+ type ResolvedAnchor = AnchorDescriptor<ResolvedElementDescriptor>;
7889
8419
  type DescriptorStrategy = 'require' | 'allow' | 'avoid';
7890
8420
  interface ElementDescriptorQuery<TNode extends string[] | IAXNodeView<any>> {
7891
8421
  node: TNode;
@@ -8245,7 +8775,7 @@ declare class Device implements Automator {
8245
8775
  //#region src/utils/values-stack.d.ts
8246
8776
  type ElementDescriptorItem = {
8247
8777
  type: 'descriptor';
8248
- entity: ElementDescriptor$1;
8778
+ entity: ElementDescriptor;
8249
8779
  value: ResolvedElementDescriptor;
8250
8780
  };
8251
8781
  type NodeItem = {
@@ -8288,8 +8818,8 @@ type Item<TType extends string> = Extract<ElementDescriptorItem | NodeItem | Ref
8288
8818
  type Entity = Item<any>['entity'];
8289
8819
  declare class ValuesStack {
8290
8820
  #private;
8291
- descriptor(entity: ElementDescriptor$1): (value: ResolvedElementDescriptor) => ResolvedElementDescriptor;
8292
- descriptor(entity: ElementDescriptor$1, value: ResolvedElementDescriptor): ResolvedElementDescriptor;
8821
+ descriptor(entity: ElementDescriptor): (value: ResolvedElementDescriptor) => ResolvedElementDescriptor;
8822
+ descriptor(entity: ElementDescriptor, value: ResolvedElementDescriptor): ResolvedElementDescriptor;
8293
8823
  node(entity: ResolvedElementDescriptor): (value: IAXNodeView<Node>) => IAXNodeView<Node>;
8294
8824
  node(entity: ResolvedElementDescriptor, value: IAXNodeView<Node>): IAXNodeView<Node>;
8295
8825
  reference(entity: Reference<Any>): (value: Any, meta?: {
@@ -8650,7 +9180,7 @@ declare const ErrorCode: {
8650
9180
  type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
8651
9181
  //#endregion
8652
9182
  //#region src/utils/evaluate-expression.d.ts
8653
- type EvaluatedExpression<TValue> = TValue extends Extractor<ElementDescriptor$1, infer TResult extends Any> ? TResult : TValue extends NumberExpression ? number : TValue extends SizeOperation ? number : TValue extends KeysOperation ? string[] : TValue extends ValuesOperation | EntriesOperation ? Any[] : TValue extends Condition ? boolean : TValue extends OTP ? string : TValue extends RandomValue<string> ? string | string[] : TValue extends RandomValue<number> ? number : TValue extends Reference<infer TType extends Any> ? TType : TValue extends JSExpressionReference<infer TType extends Any> ? TType : TValue extends InterpolatedString ? string : TValue extends JSExpression ? string : TValue extends Structure ? Record<string, any> | any[] : TValue extends FileHandle ? string : TValue extends Pattern ? RegExp | Match : TValue extends ChromeElementDescriptor ? ChromeElementDescriptor : TValue extends ElementDescriptor$1 ? ResolvedElementDescriptor : TValue;
9183
+ type EvaluatedExpression<TValue> = TValue extends Extractor<ElementDescriptor, infer TResult extends Any> ? TResult : TValue extends NumberExpression ? number : TValue extends SizeOperation ? number : TValue extends KeysOperation ? string[] : TValue extends ValuesOperation | EntriesOperation ? Any[] : TValue extends Condition ? boolean : TValue extends OTP ? string : TValue extends RandomValue<string> ? string | string[] : TValue extends RandomValue<number> ? number : TValue extends Reference<infer TType extends Any> ? TType : TValue extends JSExpressionReference<infer TType extends Any> ? TType : TValue extends InterpolatedString ? string : TValue extends JSExpression ? string : TValue extends Structure ? Record<string, any> | any[] : TValue extends FileHandle ? string : TValue extends Pattern ? RegExp | Match : TValue extends ChromeElementDescriptor ? ChromeElementDescriptor : TValue extends ElementDescriptor ? ResolvedElementDescriptor : TValue;
8654
9184
  //#endregion
8655
9185
  //#region src/handler.d.ts
8656
9186
  type HandlerOptions<TAutomator extends Automator, TInstruction extends Instruction> = {
@@ -9477,8 +10007,22 @@ declare class Runner<TAutomator extends Automator> extends EventTargetNode<Runne
9477
10007
  }>);
9478
10008
  get status(): ProgressStatus;
9479
10009
  constructor(options: RunnerOptions<TAutomator>);
9480
- run(input: string | Instruction[], options?: RunOptions): Promise<RunResult>;
10010
+ run(input: string | Program$1 | SealedProgram, options?: RunOptions): Promise<RunResult>;
9481
10011
  handle<TInstruction extends Instruction>(instruction: TInstruction, options?: RunOptions): Promise<HandlerResult<TAutomator, TInstruction>>;
10012
+ /**
10013
+ * Locates an element on the page and returns its node, or `null` when nothing matches.
10014
+ *
10015
+ * Accepts either a natural-language element descriptor string (e.g. `"the red submit button below the form"`)
10016
+ * or a structured {@link ElementDescriptor} object. Unlike {@link run}/{@link handle}, this is a pure query:
10017
+ * it stabilizes the page, resolves the descriptor, and runs Columbus element finding, but does not run
10018
+ * preinstructions, capture screenshots, or update the active element.
10019
+ *
10020
+ * Web-oriented: the returned node is a `WebNode`, consistent with `RunnerContext.activeElement`.
10021
+ */
10022
+ find(descriptor: string | ElementDescriptor, options?: {
10023
+ timeout?: number;
10024
+ signal?: AbortSignal;
10025
+ }): Promise<WebNode | null>;
9482
10026
  setScope(...names: string[]): Promise<void>;
9483
10027
  resetScope(): Promise<void>;
9484
10028
  dispose(): Promise<void>;