@nativemason/contracts 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,72 +1,42 @@
1
1
  import { z } from 'zod';
2
- export declare const NativeClientMessageSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2
+ /** Explicit local interface for development pairing; never a wildcard/public listener. */
3
+ export declare const NativeBindHostSchema: z.ZodIPv4;
4
+ export type NativeBindHost = z.infer<typeof NativeBindHostSchema>;
5
+ export declare const NativeClientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
6
  type: z.ZodLiteral<"hello">;
4
7
  token: z.ZodString;
5
8
  scenarioId: z.ZodString;
6
- protocolVersion: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>;
7
- platform: z.ZodOptional<z.ZodEnum<["android", "ios"]>>;
9
+ protocolVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
10
+ platform: z.ZodOptional<z.ZodEnum<{
11
+ android: "android";
12
+ ios: "ios";
13
+ }>>;
8
14
  targetId: z.ZodOptional<z.ZodString>;
9
15
  capabilities: z.ZodOptional<z.ZodObject<{
10
16
  textFits: z.ZodBoolean;
11
17
  scenarioActions: z.ZodBoolean;
12
- }, "strip", z.ZodTypeAny, {
13
- textFits: boolean;
14
- scenarioActions: boolean;
15
- }, {
16
- textFits: boolean;
17
- scenarioActions: boolean;
18
- }>>;
19
- }, "strict", z.ZodTypeAny, {
20
- type: "hello";
21
- scenarioId: string;
22
- token: string;
23
- protocolVersion: 1 | 2;
24
- platform?: "android" | "ios" | undefined;
25
- targetId?: string | undefined;
26
- capabilities?: {
27
- textFits: boolean;
28
- scenarioActions: boolean;
29
- } | undefined;
30
- }, {
31
- type: "hello";
32
- scenarioId: string;
33
- token: string;
34
- protocolVersion: 1 | 2;
35
- platform?: "android" | "ios" | undefined;
36
- targetId?: string | undefined;
37
- capabilities?: {
38
- textFits: boolean;
39
- scenarioActions: boolean;
40
- } | undefined;
41
- }>, z.ZodObject<{
18
+ }, z.core.$strip>>;
19
+ }, z.core.$strict>, z.ZodObject<{
42
20
  type: z.ZodLiteral<"action_result">;
43
21
  requestId: z.ZodString;
44
- }, "strict", z.ZodTypeAny, {
45
- type: "action_result";
46
- requestId: string;
47
- }, {
48
- type: "action_result";
49
- requestId: string;
50
- }>, z.ZodObject<{
22
+ }, z.core.$strict>, z.ZodObject<{
51
23
  type: z.ZodLiteral<"snapshot">;
52
24
  requestId: z.ZodString;
53
- snapshot: z.ZodEffects<z.ZodObject<{
25
+ snapshot: z.ZodObject<{
54
26
  schemaVersion: z.ZodLiteral<1>;
55
27
  sessionId: z.ZodString;
56
28
  snapshotId: z.ZodString;
57
- platform: z.ZodEnum<["web", "android", "ios"]>;
29
+ platform: z.ZodEnum<{
30
+ web: "web";
31
+ android: "android";
32
+ ios: "ios";
33
+ }>;
58
34
  scenarioId: z.ZodString;
59
35
  profile: z.ZodObject<{
60
36
  window: z.ZodObject<{
61
37
  width: z.ZodNumber;
62
38
  height: z.ZodNumber;
63
- }, "strict", z.ZodTypeAny, {
64
- width: number;
65
- height: number;
66
- }, {
67
- width: number;
68
- height: number;
69
- }>;
39
+ }, z.core.$strict>;
70
40
  pixelRatio: z.ZodNumber;
71
41
  fontScale: z.ZodNumber;
72
42
  insets: z.ZodObject<{
@@ -74,147 +44,54 @@ export declare const NativeClientMessageSchema: z.ZodEffects<z.ZodDiscriminatedU
74
44
  right: z.ZodNumber;
75
45
  bottom: z.ZodNumber;
76
46
  left: z.ZodNumber;
77
- }, "strict", z.ZodTypeAny, {
78
- top: number;
79
- right: number;
80
- bottom: number;
81
- left: number;
82
- }, {
83
- top: number;
84
- right: number;
85
- bottom: number;
86
- left: number;
87
- }>;
47
+ }, z.core.$strict>;
88
48
  root: z.ZodObject<{
89
49
  x: z.ZodNumber;
90
50
  y: z.ZodNumber;
91
51
  width: z.ZodNumber;
92
52
  height: z.ZodNumber;
93
- }, "strict", z.ZodTypeAny, {
94
- x: number;
95
- y: number;
96
- width: number;
97
- height: number;
98
- }, {
99
- x: number;
100
- y: number;
101
- width: number;
102
- height: number;
53
+ }, z.core.$strict>;
54
+ orientation: z.ZodEnum<{
55
+ portrait: "portrait";
56
+ landscape: "landscape";
103
57
  }>;
104
- orientation: z.ZodEnum<["portrait", "landscape"]>;
105
- }, "strict", z.ZodTypeAny, {
106
- window: {
107
- width: number;
108
- height: number;
109
- };
110
- pixelRatio: number;
111
- fontScale: number;
112
- insets: {
113
- top: number;
114
- right: number;
115
- bottom: number;
116
- left: number;
117
- };
118
- root: {
119
- x: number;
120
- y: number;
121
- width: number;
122
- height: number;
123
- };
124
- orientation: "portrait" | "landscape";
125
- }, {
126
- window: {
127
- width: number;
128
- height: number;
129
- };
130
- pixelRatio: number;
131
- fontScale: number;
132
- insets: {
133
- top: number;
134
- right: number;
135
- bottom: number;
136
- left: number;
137
- };
138
- root: {
139
- x: number;
140
- y: number;
141
- width: number;
142
- height: number;
143
- };
144
- orientation: "portrait" | "landscape";
145
- }>;
58
+ }, z.core.$strict>;
146
59
  revisions: z.ZodRecord<z.ZodString, z.ZodString>;
147
60
  nodes: z.ZodArray<z.ZodObject<{
148
61
  id: z.ZodString;
149
62
  parentId: z.ZodNullable<z.ZodString>;
150
- kind: z.ZodEnum<["View", "Text", "Pressable", "TextInput", "ScrollView", "Image"]>;
63
+ kind: z.ZodEnum<{
64
+ View: "View";
65
+ Text: "Text";
66
+ Pressable: "Pressable";
67
+ TextInput: "TextInput";
68
+ ScrollView: "ScrollView";
69
+ Image: "Image";
70
+ }>;
151
71
  role: z.ZodNullable<z.ZodString>;
152
72
  rect: z.ZodObject<{
153
73
  x: z.ZodNumber;
154
74
  y: z.ZodNumber;
155
75
  width: z.ZodNumber;
156
76
  height: z.ZodNumber;
157
- }, "strict", z.ZodTypeAny, {
158
- x: number;
159
- y: number;
160
- width: number;
161
- height: number;
162
- }, {
163
- x: number;
164
- y: number;
165
- width: number;
166
- height: number;
167
- }>;
77
+ }, z.core.$strict>;
168
78
  styles: z.ZodRecord<z.ZodString, z.ZodUnknown>;
169
- source: z.ZodNullable<z.ZodEffects<z.ZodObject<{
79
+ source: z.ZodNullable<z.ZodObject<{
170
80
  path: z.ZodString;
171
81
  styleForm: z.ZodOptional<z.ZodLiteral<"pressable-state">>;
172
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
82
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
173
83
  hash: z.ZodString;
174
84
  start: z.ZodNumber;
175
85
  end: z.ZodNumber;
176
86
  line: z.ZodNumber;
177
87
  column: z.ZodNumber;
178
- }, "strict", z.ZodTypeAny, {
179
- path: string;
180
- start: number;
181
- end: number;
182
- hash: string;
183
- line: number;
184
- column: number;
185
- styleForm?: "pressable-state" | undefined;
186
- dependencies?: string[] | undefined;
187
- }, {
188
- path: string;
189
- start: number;
190
- end: number;
191
- hash: string;
192
- line: number;
193
- column: number;
194
- styleForm?: "pressable-state" | undefined;
195
- dependencies?: string[] | undefined;
196
- }>, {
197
- path: string;
198
- start: number;
199
- end: number;
200
- hash: string;
201
- line: number;
202
- column: number;
203
- styleForm?: "pressable-state" | undefined;
204
- dependencies?: string[] | undefined;
205
- }, {
206
- path: string;
207
- start: number;
208
- end: number;
209
- hash: string;
210
- line: number;
211
- column: number;
212
- styleForm?: "pressable-state" | undefined;
213
- dependencies?: string[] | undefined;
214
- }>>;
88
+ }, z.core.$strict>>;
215
89
  editable: z.ZodBoolean;
216
90
  editReason: z.ZodNullable<z.ZodString>;
217
- pressableState: z.ZodOptional<z.ZodEnum<["pressed", "rest"]>>;
91
+ pressableState: z.ZodOptional<z.ZodEnum<{
92
+ pressed: "pressed";
93
+ rest: "rest";
94
+ }>>;
218
95
  accessibility: z.ZodOptional<z.ZodObject<{
219
96
  authoredLabel: z.ZodOptional<z.ZodString>;
220
97
  authoredHint: z.ZodOptional<z.ZodString>;
@@ -222,1498 +99,156 @@ export declare const NativeClientMessageSchema: z.ZodEffects<z.ZodDiscriminatedU
222
99
  focusable: z.ZodOptional<z.ZodBoolean>;
223
100
  hidden: z.ZodOptional<z.ZodBoolean>;
224
101
  disabled: z.ZodOptional<z.ZodBoolean>;
225
- direction: z.ZodEnum<["ltr", "rtl", "unknown"]>;
226
- directionSource: z.ZodOptional<z.ZodEnum<["authored", "native-global", "browser-computed", "unknown"]>>;
102
+ direction: z.ZodEnum<{
103
+ unknown: "unknown";
104
+ ltr: "ltr";
105
+ rtl: "rtl";
106
+ }>;
107
+ directionSource: z.ZodOptional<z.ZodEnum<{
108
+ unknown: "unknown";
109
+ authored: "authored";
110
+ "native-global": "native-global";
111
+ "browser-computed": "browser-computed";
112
+ }>>;
227
113
  browser: z.ZodOptional<z.ZodObject<{
228
114
  name: z.ZodNullable<z.ZodString>;
229
115
  focusOrder: z.ZodNullable<z.ZodNumber>;
230
116
  focusOrderSource: z.ZodLiteral<"dom-sequential-estimate">;
231
- contrast: z.ZodEffects<z.ZodObject<{
232
- status: z.ZodEnum<["measured", "unavailable"]>;
117
+ contrast: z.ZodObject<{
118
+ status: z.ZodEnum<{
119
+ measured: "measured";
120
+ unavailable: "unavailable";
121
+ }>;
233
122
  ratio: z.ZodOptional<z.ZodNumber>;
234
123
  requiredRatio: z.ZodOptional<z.ZodNumber>;
235
124
  reason: z.ZodOptional<z.ZodString>;
236
- }, "strict", z.ZodTypeAny, {
237
- status: "measured" | "unavailable";
238
- ratio?: number | undefined;
239
- requiredRatio?: number | undefined;
240
- reason?: string | undefined;
241
- }, {
242
- status: "measured" | "unavailable";
243
- ratio?: number | undefined;
244
- requiredRatio?: number | undefined;
245
- reason?: string | undefined;
246
- }>, {
247
- status: "measured" | "unavailable";
248
- ratio?: number | undefined;
249
- requiredRatio?: number | undefined;
250
- reason?: string | undefined;
251
- }, {
252
- status: "measured" | "unavailable";
253
- ratio?: number | undefined;
254
- requiredRatio?: number | undefined;
255
- reason?: string | undefined;
256
- }>;
257
- }, "strict", z.ZodTypeAny, {
258
- focusOrder: number | null;
259
- name: string | null;
260
- focusOrderSource: "dom-sequential-estimate";
261
- contrast: {
262
- status: "measured" | "unavailable";
263
- ratio?: number | undefined;
264
- requiredRatio?: number | undefined;
265
- reason?: string | undefined;
266
- };
267
- }, {
268
- focusOrder: number | null;
269
- name: string | null;
270
- focusOrderSource: "dom-sequential-estimate";
271
- contrast: {
272
- status: "measured" | "unavailable";
273
- ratio?: number | undefined;
274
- requiredRatio?: number | undefined;
275
- reason?: string | undefined;
276
- };
277
- }>>;
278
- }, "strict", z.ZodTypeAny, {
279
- direction: "unknown" | "ltr" | "rtl";
280
- authoredLabel?: string | undefined;
281
- authoredHint?: string | undefined;
282
- accessible?: boolean | undefined;
283
- focusable?: boolean | undefined;
284
- hidden?: boolean | undefined;
285
- disabled?: boolean | undefined;
286
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
287
- browser?: {
288
- focusOrder: number | null;
289
- name: string | null;
290
- focusOrderSource: "dom-sequential-estimate";
291
- contrast: {
292
- status: "measured" | "unavailable";
293
- ratio?: number | undefined;
294
- requiredRatio?: number | undefined;
295
- reason?: string | undefined;
296
- };
297
- } | undefined;
298
- }, {
299
- direction: "unknown" | "ltr" | "rtl";
300
- authoredLabel?: string | undefined;
301
- authoredHint?: string | undefined;
302
- accessible?: boolean | undefined;
303
- focusable?: boolean | undefined;
304
- hidden?: boolean | undefined;
305
- disabled?: boolean | undefined;
306
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
307
- browser?: {
308
- focusOrder: number | null;
309
- name: string | null;
310
- focusOrderSource: "dom-sequential-estimate";
311
- contrast: {
312
- status: "measured" | "unavailable";
313
- ratio?: number | undefined;
314
- requiredRatio?: number | undefined;
315
- reason?: string | undefined;
316
- };
317
- } | undefined;
318
- }>>;
125
+ }, z.core.$strict>;
126
+ }, z.core.$strict>>;
127
+ }, z.core.$strict>>;
319
128
  textFit: z.ZodOptional<z.ZodObject<{
320
- status: z.ZodEnum<["supported", "unavailable"]>;
129
+ status: z.ZodEnum<{
130
+ unavailable: "unavailable";
131
+ supported: "supported";
132
+ }>;
321
133
  fullLineCount: z.ZodOptional<z.ZodNumber>;
322
134
  limitedLineCount: z.ZodOptional<z.ZodNumber>;
323
135
  fullHeight: z.ZodOptional<z.ZodNumber>;
324
136
  availableHeight: z.ZodOptional<z.ZodNumber>;
325
137
  reason: z.ZodOptional<z.ZodString>;
326
- }, "strict", z.ZodTypeAny, {
327
- status: "unavailable" | "supported";
328
- reason?: string | undefined;
329
- fullLineCount?: number | undefined;
330
- limitedLineCount?: number | undefined;
331
- fullHeight?: number | undefined;
332
- availableHeight?: number | undefined;
333
- }, {
334
- status: "unavailable" | "supported";
335
- reason?: string | undefined;
336
- fullLineCount?: number | undefined;
337
- limitedLineCount?: number | undefined;
338
- fullHeight?: number | undefined;
339
- availableHeight?: number | undefined;
340
- }>>;
138
+ }, z.core.$strict>>;
341
139
  authoredTextProps: z.ZodOptional<z.ZodObject<{
342
140
  fontSize: z.ZodOptional<z.ZodNumber>;
343
141
  lineHeight: z.ZodOptional<z.ZodNumber>;
344
142
  numberOfLines: z.ZodOptional<z.ZodNumber>;
345
143
  allowFontScaling: z.ZodOptional<z.ZodBoolean>;
346
- ellipsizeMode: z.ZodOptional<z.ZodEnum<["head", "middle", "tail", "clip"]>>;
347
- }, "strict", z.ZodTypeAny, {
348
- fontSize?: number | undefined;
349
- lineHeight?: number | undefined;
350
- numberOfLines?: number | undefined;
351
- allowFontScaling?: boolean | undefined;
352
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
353
- }, {
354
- fontSize?: number | undefined;
355
- lineHeight?: number | undefined;
356
- numberOfLines?: number | undefined;
357
- allowFontScaling?: boolean | undefined;
358
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
359
- }>>;
144
+ ellipsizeMode: z.ZodOptional<z.ZodEnum<{
145
+ head: "head";
146
+ middle: "middle";
147
+ tail: "tail";
148
+ clip: "clip";
149
+ }>>;
150
+ }, z.core.$strict>>;
360
151
  measuredLineCount: z.ZodOptional<z.ZodNumber>;
361
- }, "strict", z.ZodTypeAny, {
362
- id: string;
363
- rect: {
364
- x: number;
365
- y: number;
366
- width: number;
367
- height: number;
368
- };
369
- kind: "View" | "Text" | "Pressable" | "TextInput" | "ScrollView" | "Image";
370
- source: {
371
- path: string;
372
- start: number;
373
- end: number;
374
- hash: string;
375
- line: number;
376
- column: number;
377
- styleForm?: "pressable-state" | undefined;
378
- dependencies?: string[] | undefined;
379
- } | null;
380
- parentId: string | null;
381
- role: string | null;
382
- styles: Record<string, unknown>;
383
- editable: boolean;
384
- editReason: string | null;
385
- pressableState?: "pressed" | "rest" | undefined;
386
- accessibility?: {
387
- direction: "unknown" | "ltr" | "rtl";
388
- authoredLabel?: string | undefined;
389
- authoredHint?: string | undefined;
390
- accessible?: boolean | undefined;
391
- focusable?: boolean | undefined;
392
- hidden?: boolean | undefined;
393
- disabled?: boolean | undefined;
394
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
395
- browser?: {
396
- focusOrder: number | null;
397
- name: string | null;
398
- focusOrderSource: "dom-sequential-estimate";
399
- contrast: {
400
- status: "measured" | "unavailable";
401
- ratio?: number | undefined;
402
- requiredRatio?: number | undefined;
403
- reason?: string | undefined;
404
- };
405
- } | undefined;
406
- } | undefined;
407
- textFit?: {
408
- status: "unavailable" | "supported";
409
- reason?: string | undefined;
410
- fullLineCount?: number | undefined;
411
- limitedLineCount?: number | undefined;
412
- fullHeight?: number | undefined;
413
- availableHeight?: number | undefined;
414
- } | undefined;
415
- authoredTextProps?: {
416
- fontSize?: number | undefined;
417
- lineHeight?: number | undefined;
418
- numberOfLines?: number | undefined;
419
- allowFontScaling?: boolean | undefined;
420
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
421
- } | undefined;
422
- measuredLineCount?: number | undefined;
423
- }, {
424
- id: string;
425
- rect: {
426
- x: number;
427
- y: number;
428
- width: number;
429
- height: number;
430
- };
431
- kind: "View" | "Text" | "Pressable" | "TextInput" | "ScrollView" | "Image";
432
- source: {
433
- path: string;
434
- start: number;
435
- end: number;
436
- hash: string;
437
- line: number;
438
- column: number;
439
- styleForm?: "pressable-state" | undefined;
440
- dependencies?: string[] | undefined;
441
- } | null;
442
- parentId: string | null;
443
- role: string | null;
444
- styles: Record<string, unknown>;
445
- editable: boolean;
446
- editReason: string | null;
447
- pressableState?: "pressed" | "rest" | undefined;
448
- accessibility?: {
449
- direction: "unknown" | "ltr" | "rtl";
450
- authoredLabel?: string | undefined;
451
- authoredHint?: string | undefined;
452
- accessible?: boolean | undefined;
453
- focusable?: boolean | undefined;
454
- hidden?: boolean | undefined;
455
- disabled?: boolean | undefined;
456
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
457
- browser?: {
458
- focusOrder: number | null;
459
- name: string | null;
460
- focusOrderSource: "dom-sequential-estimate";
461
- contrast: {
462
- status: "measured" | "unavailable";
463
- ratio?: number | undefined;
464
- requiredRatio?: number | undefined;
465
- reason?: string | undefined;
466
- };
467
- } | undefined;
468
- } | undefined;
469
- textFit?: {
470
- status: "unavailable" | "supported";
471
- reason?: string | undefined;
472
- fullLineCount?: number | undefined;
473
- limitedLineCount?: number | undefined;
474
- fullHeight?: number | undefined;
475
- availableHeight?: number | undefined;
476
- } | undefined;
477
- authoredTextProps?: {
478
- fontSize?: number | undefined;
479
- lineHeight?: number | undefined;
480
- numberOfLines?: number | undefined;
481
- allowFontScaling?: boolean | undefined;
482
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
483
- } | undefined;
484
- measuredLineCount?: number | undefined;
485
- }>, "many">;
486
- status: z.ZodEnum<["stable", "unstable"]>;
152
+ }, z.core.$strict>>;
153
+ status: z.ZodEnum<{
154
+ stable: "stable";
155
+ unstable: "unstable";
156
+ }>;
487
157
  generation: z.ZodNumber;
488
158
  nativeTarget: z.ZodOptional<z.ZodObject<{
489
159
  targetId: z.ZodString;
490
- platform: z.ZodEnum<["android", "ios"]>;
491
- kind: z.ZodEnum<["physical", "emulator", "simulator"]>;
492
- }, "strict", z.ZodTypeAny, {
493
- platform: "android" | "ios";
494
- kind: "physical" | "emulator" | "simulator";
495
- targetId: string;
496
- }, {
497
- platform: "android" | "ios";
498
- kind: "physical" | "emulator" | "simulator";
499
- targetId: string;
500
- }>>;
160
+ platform: z.ZodEnum<{
161
+ android: "android";
162
+ ios: "ios";
163
+ }>;
164
+ kind: z.ZodEnum<{
165
+ physical: "physical";
166
+ emulator: "emulator";
167
+ simulator: "simulator";
168
+ }>;
169
+ }, z.core.$strict>>;
501
170
  webDiagnostics: z.ZodOptional<z.ZodObject<{
502
171
  nodes: z.ZodRecord<z.ZodString, z.ZodObject<{
503
- clipping: z.ZodEnum<["confirmed", "clear", "unknown"]>;
504
- centerHitTest: z.ZodEnum<["confirmed", "clear", "unknown"]>;
172
+ clipping: z.ZodEnum<{
173
+ unknown: "unknown";
174
+ confirmed: "confirmed";
175
+ clear: "clear";
176
+ }>;
177
+ centerHitTest: z.ZodEnum<{
178
+ unknown: "unknown";
179
+ confirmed: "confirmed";
180
+ clear: "clear";
181
+ }>;
505
182
  scrollOverflow: z.ZodObject<{
506
183
  horizontal: z.ZodBoolean;
507
184
  vertical: z.ZodBoolean;
508
- }, "strict", z.ZodTypeAny, {
509
- horizontal: boolean;
510
- vertical: boolean;
511
- }, {
512
- horizontal: boolean;
513
- vertical: boolean;
514
- }>;
185
+ }, z.core.$strict>;
515
186
  paintOrder: z.ZodNullable<z.ZodNumber>;
516
187
  fonts: z.ZodArray<z.ZodObject<{
517
188
  family: z.ZodString;
518
189
  glyphCount: z.ZodNumber;
519
190
  isCustom: z.ZodNullable<z.ZodBoolean>;
520
- }, "strict", z.ZodTypeAny, {
521
- family: string;
522
- glyphCount: number;
523
- isCustom: boolean | null;
524
- }, {
525
- family: string;
526
- glyphCount: number;
527
- isCustom: boolean | null;
528
- }>, "many">;
191
+ }, z.core.$strict>>;
529
192
  lineBoxCount: z.ZodNullable<z.ZodNumber>;
530
- }, "strict", z.ZodTypeAny, {
531
- clipping: "unknown" | "confirmed" | "clear";
532
- centerHitTest: "unknown" | "confirmed" | "clear";
533
- scrollOverflow: {
534
- horizontal: boolean;
535
- vertical: boolean;
536
- };
537
- paintOrder: number | null;
538
- fonts: {
539
- family: string;
540
- glyphCount: number;
541
- isCustom: boolean | null;
542
- }[];
543
- lineBoxCount: number | null;
544
- }, {
545
- clipping: "unknown" | "confirmed" | "clear";
546
- centerHitTest: "unknown" | "confirmed" | "clear";
547
- scrollOverflow: {
548
- horizontal: boolean;
549
- vertical: boolean;
550
- };
551
- paintOrder: number | null;
552
- fonts: {
553
- family: string;
554
- glyphCount: number;
555
- isCustom: boolean | null;
556
- }[];
557
- lineBoxCount: number | null;
558
- }>>;
193
+ }, z.core.$strict>>;
559
194
  warnings: z.ZodArray<z.ZodObject<{
560
195
  elementId: z.ZodString;
561
- code: z.ZodEnum<["CLIPPED", "OCCLUDED", "FONT_LOAD_FAILED", "EVIDENCE_UNAVAILABLE"]>;
562
- severity: z.ZodEnum<["confirmed", "uncertain"]>;
196
+ code: z.ZodEnum<{
197
+ CLIPPED: "CLIPPED";
198
+ OCCLUDED: "OCCLUDED";
199
+ FONT_LOAD_FAILED: "FONT_LOAD_FAILED";
200
+ EVIDENCE_UNAVAILABLE: "EVIDENCE_UNAVAILABLE";
201
+ }>;
202
+ severity: z.ZodEnum<{
203
+ confirmed: "confirmed";
204
+ uncertain: "uncertain";
205
+ }>;
563
206
  message: z.ZodString;
564
- }, "strict", z.ZodTypeAny, {
565
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
566
- message: string;
567
- elementId: string;
568
- severity: "confirmed" | "uncertain";
569
- }, {
570
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
571
- message: string;
572
- elementId: string;
573
- severity: "confirmed" | "uncertain";
574
- }>, "many">;
575
- }, "strict", z.ZodTypeAny, {
576
- nodes: Record<string, {
577
- clipping: "unknown" | "confirmed" | "clear";
578
- centerHitTest: "unknown" | "confirmed" | "clear";
579
- scrollOverflow: {
580
- horizontal: boolean;
581
- vertical: boolean;
582
- };
583
- paintOrder: number | null;
584
- fonts: {
585
- family: string;
586
- glyphCount: number;
587
- isCustom: boolean | null;
588
- }[];
589
- lineBoxCount: number | null;
590
- }>;
591
- warnings: {
592
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
593
- message: string;
594
- elementId: string;
595
- severity: "confirmed" | "uncertain";
596
- }[];
597
- }, {
598
- nodes: Record<string, {
599
- clipping: "unknown" | "confirmed" | "clear";
600
- centerHitTest: "unknown" | "confirmed" | "clear";
601
- scrollOverflow: {
602
- horizontal: boolean;
603
- vertical: boolean;
604
- };
605
- paintOrder: number | null;
606
- fonts: {
607
- family: string;
608
- glyphCount: number;
609
- isCustom: boolean | null;
610
- }[];
611
- lineBoxCount: number | null;
612
- }>;
613
- warnings: {
614
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
615
- message: string;
616
- elementId: string;
617
- severity: "confirmed" | "uncertain";
618
- }[];
619
- }>>;
620
- }, "strict", z.ZodTypeAny, {
621
- status: "stable" | "unstable";
622
- platform: "web" | "android" | "ios";
623
- schemaVersion: 1;
624
- scenarioId: string;
625
- profile: {
626
- window: {
627
- width: number;
628
- height: number;
629
- };
630
- pixelRatio: number;
631
- fontScale: number;
632
- insets: {
633
- top: number;
634
- right: number;
635
- bottom: number;
636
- left: number;
637
- };
638
- root: {
639
- x: number;
640
- y: number;
641
- width: number;
642
- height: number;
643
- };
644
- orientation: "portrait" | "landscape";
645
- };
646
- snapshotId: string;
647
- nodes: {
648
- id: string;
649
- rect: {
650
- x: number;
651
- y: number;
652
- width: number;
653
- height: number;
654
- };
655
- kind: "View" | "Text" | "Pressable" | "TextInput" | "ScrollView" | "Image";
656
- source: {
657
- path: string;
658
- start: number;
659
- end: number;
660
- hash: string;
661
- line: number;
662
- column: number;
663
- styleForm?: "pressable-state" | undefined;
664
- dependencies?: string[] | undefined;
665
- } | null;
666
- parentId: string | null;
667
- role: string | null;
668
- styles: Record<string, unknown>;
669
- editable: boolean;
670
- editReason: string | null;
671
- pressableState?: "pressed" | "rest" | undefined;
672
- accessibility?: {
673
- direction: "unknown" | "ltr" | "rtl";
674
- authoredLabel?: string | undefined;
675
- authoredHint?: string | undefined;
676
- accessible?: boolean | undefined;
677
- focusable?: boolean | undefined;
678
- hidden?: boolean | undefined;
679
- disabled?: boolean | undefined;
680
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
681
- browser?: {
682
- focusOrder: number | null;
683
- name: string | null;
684
- focusOrderSource: "dom-sequential-estimate";
685
- contrast: {
686
- status: "measured" | "unavailable";
687
- ratio?: number | undefined;
688
- requiredRatio?: number | undefined;
689
- reason?: string | undefined;
690
- };
691
- } | undefined;
692
- } | undefined;
693
- textFit?: {
694
- status: "unavailable" | "supported";
695
- reason?: string | undefined;
696
- fullLineCount?: number | undefined;
697
- limitedLineCount?: number | undefined;
698
- fullHeight?: number | undefined;
699
- availableHeight?: number | undefined;
700
- } | undefined;
701
- authoredTextProps?: {
702
- fontSize?: number | undefined;
703
- lineHeight?: number | undefined;
704
- numberOfLines?: number | undefined;
705
- allowFontScaling?: boolean | undefined;
706
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
707
- } | undefined;
708
- measuredLineCount?: number | undefined;
709
- }[];
710
- sessionId: string;
711
- revisions: Record<string, string>;
712
- generation: number;
713
- nativeTarget?: {
714
- platform: "android" | "ios";
715
- kind: "physical" | "emulator" | "simulator";
716
- targetId: string;
717
- } | undefined;
718
- webDiagnostics?: {
719
- nodes: Record<string, {
720
- clipping: "unknown" | "confirmed" | "clear";
721
- centerHitTest: "unknown" | "confirmed" | "clear";
722
- scrollOverflow: {
723
- horizontal: boolean;
724
- vertical: boolean;
725
- };
726
- paintOrder: number | null;
727
- fonts: {
728
- family: string;
729
- glyphCount: number;
730
- isCustom: boolean | null;
731
- }[];
732
- lineBoxCount: number | null;
733
- }>;
734
- warnings: {
735
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
736
- message: string;
737
- elementId: string;
738
- severity: "confirmed" | "uncertain";
739
- }[];
740
- } | undefined;
741
- }, {
742
- status: "stable" | "unstable";
743
- platform: "web" | "android" | "ios";
744
- schemaVersion: 1;
745
- scenarioId: string;
746
- profile: {
747
- window: {
748
- width: number;
749
- height: number;
750
- };
751
- pixelRatio: number;
752
- fontScale: number;
753
- insets: {
754
- top: number;
755
- right: number;
756
- bottom: number;
757
- left: number;
758
- };
759
- root: {
760
- x: number;
761
- y: number;
762
- width: number;
763
- height: number;
764
- };
765
- orientation: "portrait" | "landscape";
766
- };
767
- snapshotId: string;
768
- nodes: {
769
- id: string;
770
- rect: {
771
- x: number;
772
- y: number;
773
- width: number;
774
- height: number;
775
- };
776
- kind: "View" | "Text" | "Pressable" | "TextInput" | "ScrollView" | "Image";
777
- source: {
778
- path: string;
779
- start: number;
780
- end: number;
781
- hash: string;
782
- line: number;
783
- column: number;
784
- styleForm?: "pressable-state" | undefined;
785
- dependencies?: string[] | undefined;
786
- } | null;
787
- parentId: string | null;
788
- role: string | null;
789
- styles: Record<string, unknown>;
790
- editable: boolean;
791
- editReason: string | null;
792
- pressableState?: "pressed" | "rest" | undefined;
793
- accessibility?: {
794
- direction: "unknown" | "ltr" | "rtl";
795
- authoredLabel?: string | undefined;
796
- authoredHint?: string | undefined;
797
- accessible?: boolean | undefined;
798
- focusable?: boolean | undefined;
799
- hidden?: boolean | undefined;
800
- disabled?: boolean | undefined;
801
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
802
- browser?: {
803
- focusOrder: number | null;
804
- name: string | null;
805
- focusOrderSource: "dom-sequential-estimate";
806
- contrast: {
807
- status: "measured" | "unavailable";
808
- ratio?: number | undefined;
809
- requiredRatio?: number | undefined;
810
- reason?: string | undefined;
811
- };
812
- } | undefined;
813
- } | undefined;
814
- textFit?: {
815
- status: "unavailable" | "supported";
816
- reason?: string | undefined;
817
- fullLineCount?: number | undefined;
818
- limitedLineCount?: number | undefined;
819
- fullHeight?: number | undefined;
820
- availableHeight?: number | undefined;
821
- } | undefined;
822
- authoredTextProps?: {
823
- fontSize?: number | undefined;
824
- lineHeight?: number | undefined;
825
- numberOfLines?: number | undefined;
826
- allowFontScaling?: boolean | undefined;
827
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
828
- } | undefined;
829
- measuredLineCount?: number | undefined;
830
- }[];
831
- sessionId: string;
832
- revisions: Record<string, string>;
833
- generation: number;
834
- nativeTarget?: {
835
- platform: "android" | "ios";
836
- kind: "physical" | "emulator" | "simulator";
837
- targetId: string;
838
- } | undefined;
839
- webDiagnostics?: {
840
- nodes: Record<string, {
841
- clipping: "unknown" | "confirmed" | "clear";
842
- centerHitTest: "unknown" | "confirmed" | "clear";
843
- scrollOverflow: {
844
- horizontal: boolean;
845
- vertical: boolean;
846
- };
847
- paintOrder: number | null;
848
- fonts: {
849
- family: string;
850
- glyphCount: number;
851
- isCustom: boolean | null;
852
- }[];
853
- lineBoxCount: number | null;
854
- }>;
855
- warnings: {
856
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
857
- message: string;
858
- elementId: string;
859
- severity: "confirmed" | "uncertain";
860
- }[];
861
- } | undefined;
862
- }>, {
863
- status: "stable" | "unstable";
864
- platform: "web" | "android" | "ios";
865
- schemaVersion: 1;
866
- scenarioId: string;
867
- profile: {
868
- window: {
869
- width: number;
870
- height: number;
871
- };
872
- pixelRatio: number;
873
- fontScale: number;
874
- insets: {
875
- top: number;
876
- right: number;
877
- bottom: number;
878
- left: number;
879
- };
880
- root: {
881
- x: number;
882
- y: number;
883
- width: number;
884
- height: number;
885
- };
886
- orientation: "portrait" | "landscape";
887
- };
888
- snapshotId: string;
889
- nodes: {
890
- id: string;
891
- rect: {
892
- x: number;
893
- y: number;
894
- width: number;
895
- height: number;
896
- };
897
- kind: "View" | "Text" | "Pressable" | "TextInput" | "ScrollView" | "Image";
898
- source: {
899
- path: string;
900
- start: number;
901
- end: number;
902
- hash: string;
903
- line: number;
904
- column: number;
905
- styleForm?: "pressable-state" | undefined;
906
- dependencies?: string[] | undefined;
907
- } | null;
908
- parentId: string | null;
909
- role: string | null;
910
- styles: Record<string, unknown>;
911
- editable: boolean;
912
- editReason: string | null;
913
- pressableState?: "pressed" | "rest" | undefined;
914
- accessibility?: {
915
- direction: "unknown" | "ltr" | "rtl";
916
- authoredLabel?: string | undefined;
917
- authoredHint?: string | undefined;
918
- accessible?: boolean | undefined;
919
- focusable?: boolean | undefined;
920
- hidden?: boolean | undefined;
921
- disabled?: boolean | undefined;
922
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
923
- browser?: {
924
- focusOrder: number | null;
925
- name: string | null;
926
- focusOrderSource: "dom-sequential-estimate";
927
- contrast: {
928
- status: "measured" | "unavailable";
929
- ratio?: number | undefined;
930
- requiredRatio?: number | undefined;
931
- reason?: string | undefined;
932
- };
933
- } | undefined;
934
- } | undefined;
935
- textFit?: {
936
- status: "unavailable" | "supported";
937
- reason?: string | undefined;
938
- fullLineCount?: number | undefined;
939
- limitedLineCount?: number | undefined;
940
- fullHeight?: number | undefined;
941
- availableHeight?: number | undefined;
942
- } | undefined;
943
- authoredTextProps?: {
944
- fontSize?: number | undefined;
945
- lineHeight?: number | undefined;
946
- numberOfLines?: number | undefined;
947
- allowFontScaling?: boolean | undefined;
948
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
949
- } | undefined;
950
- measuredLineCount?: number | undefined;
951
- }[];
952
- sessionId: string;
953
- revisions: Record<string, string>;
954
- generation: number;
955
- nativeTarget?: {
956
- platform: "android" | "ios";
957
- kind: "physical" | "emulator" | "simulator";
958
- targetId: string;
959
- } | undefined;
960
- webDiagnostics?: {
961
- nodes: Record<string, {
962
- clipping: "unknown" | "confirmed" | "clear";
963
- centerHitTest: "unknown" | "confirmed" | "clear";
964
- scrollOverflow: {
965
- horizontal: boolean;
966
- vertical: boolean;
967
- };
968
- paintOrder: number | null;
969
- fonts: {
970
- family: string;
971
- glyphCount: number;
972
- isCustom: boolean | null;
973
- }[];
974
- lineBoxCount: number | null;
975
- }>;
976
- warnings: {
977
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
978
- message: string;
979
- elementId: string;
980
- severity: "confirmed" | "uncertain";
981
- }[];
982
- } | undefined;
983
- }, {
984
- status: "stable" | "unstable";
985
- platform: "web" | "android" | "ios";
986
- schemaVersion: 1;
987
- scenarioId: string;
988
- profile: {
989
- window: {
990
- width: number;
991
- height: number;
992
- };
993
- pixelRatio: number;
994
- fontScale: number;
995
- insets: {
996
- top: number;
997
- right: number;
998
- bottom: number;
999
- left: number;
1000
- };
1001
- root: {
1002
- x: number;
1003
- y: number;
1004
- width: number;
1005
- height: number;
1006
- };
1007
- orientation: "portrait" | "landscape";
1008
- };
1009
- snapshotId: string;
1010
- nodes: {
1011
- id: string;
1012
- rect: {
1013
- x: number;
1014
- y: number;
1015
- width: number;
1016
- height: number;
1017
- };
1018
- kind: "View" | "Text" | "Pressable" | "TextInput" | "ScrollView" | "Image";
1019
- source: {
1020
- path: string;
1021
- start: number;
1022
- end: number;
1023
- hash: string;
1024
- line: number;
1025
- column: number;
1026
- styleForm?: "pressable-state" | undefined;
1027
- dependencies?: string[] | undefined;
1028
- } | null;
1029
- parentId: string | null;
1030
- role: string | null;
1031
- styles: Record<string, unknown>;
1032
- editable: boolean;
1033
- editReason: string | null;
1034
- pressableState?: "pressed" | "rest" | undefined;
1035
- accessibility?: {
1036
- direction: "unknown" | "ltr" | "rtl";
1037
- authoredLabel?: string | undefined;
1038
- authoredHint?: string | undefined;
1039
- accessible?: boolean | undefined;
1040
- focusable?: boolean | undefined;
1041
- hidden?: boolean | undefined;
1042
- disabled?: boolean | undefined;
1043
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
1044
- browser?: {
1045
- focusOrder: number | null;
1046
- name: string | null;
1047
- focusOrderSource: "dom-sequential-estimate";
1048
- contrast: {
1049
- status: "measured" | "unavailable";
1050
- ratio?: number | undefined;
1051
- requiredRatio?: number | undefined;
1052
- reason?: string | undefined;
1053
- };
1054
- } | undefined;
1055
- } | undefined;
1056
- textFit?: {
1057
- status: "unavailable" | "supported";
1058
- reason?: string | undefined;
1059
- fullLineCount?: number | undefined;
1060
- limitedLineCount?: number | undefined;
1061
- fullHeight?: number | undefined;
1062
- availableHeight?: number | undefined;
1063
- } | undefined;
1064
- authoredTextProps?: {
1065
- fontSize?: number | undefined;
1066
- lineHeight?: number | undefined;
1067
- numberOfLines?: number | undefined;
1068
- allowFontScaling?: boolean | undefined;
1069
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
1070
- } | undefined;
1071
- measuredLineCount?: number | undefined;
1072
- }[];
1073
- sessionId: string;
1074
- revisions: Record<string, string>;
1075
- generation: number;
1076
- nativeTarget?: {
1077
- platform: "android" | "ios";
1078
- kind: "physical" | "emulator" | "simulator";
1079
- targetId: string;
1080
- } | undefined;
1081
- webDiagnostics?: {
1082
- nodes: Record<string, {
1083
- clipping: "unknown" | "confirmed" | "clear";
1084
- centerHitTest: "unknown" | "confirmed" | "clear";
1085
- scrollOverflow: {
1086
- horizontal: boolean;
1087
- vertical: boolean;
1088
- };
1089
- paintOrder: number | null;
1090
- fonts: {
1091
- family: string;
1092
- glyphCount: number;
1093
- isCustom: boolean | null;
1094
- }[];
1095
- lineBoxCount: number | null;
1096
- }>;
1097
- warnings: {
1098
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
1099
- message: string;
1100
- elementId: string;
1101
- severity: "confirmed" | "uncertain";
1102
- }[];
1103
- } | undefined;
1104
- }>;
1105
- }, "strict", z.ZodTypeAny, {
1106
- type: "snapshot";
1107
- snapshot: {
1108
- status: "stable" | "unstable";
1109
- platform: "web" | "android" | "ios";
1110
- schemaVersion: 1;
1111
- scenarioId: string;
1112
- profile: {
1113
- window: {
1114
- width: number;
1115
- height: number;
1116
- };
1117
- pixelRatio: number;
1118
- fontScale: number;
1119
- insets: {
1120
- top: number;
1121
- right: number;
1122
- bottom: number;
1123
- left: number;
1124
- };
1125
- root: {
1126
- x: number;
1127
- y: number;
1128
- width: number;
1129
- height: number;
1130
- };
1131
- orientation: "portrait" | "landscape";
1132
- };
1133
- snapshotId: string;
1134
- nodes: {
1135
- id: string;
1136
- rect: {
1137
- x: number;
1138
- y: number;
1139
- width: number;
1140
- height: number;
1141
- };
1142
- kind: "View" | "Text" | "Pressable" | "TextInput" | "ScrollView" | "Image";
1143
- source: {
1144
- path: string;
1145
- start: number;
1146
- end: number;
1147
- hash: string;
1148
- line: number;
1149
- column: number;
1150
- styleForm?: "pressable-state" | undefined;
1151
- dependencies?: string[] | undefined;
1152
- } | null;
1153
- parentId: string | null;
1154
- role: string | null;
1155
- styles: Record<string, unknown>;
1156
- editable: boolean;
1157
- editReason: string | null;
1158
- pressableState?: "pressed" | "rest" | undefined;
1159
- accessibility?: {
1160
- direction: "unknown" | "ltr" | "rtl";
1161
- authoredLabel?: string | undefined;
1162
- authoredHint?: string | undefined;
1163
- accessible?: boolean | undefined;
1164
- focusable?: boolean | undefined;
1165
- hidden?: boolean | undefined;
1166
- disabled?: boolean | undefined;
1167
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
1168
- browser?: {
1169
- focusOrder: number | null;
1170
- name: string | null;
1171
- focusOrderSource: "dom-sequential-estimate";
1172
- contrast: {
1173
- status: "measured" | "unavailable";
1174
- ratio?: number | undefined;
1175
- requiredRatio?: number | undefined;
1176
- reason?: string | undefined;
1177
- };
1178
- } | undefined;
1179
- } | undefined;
1180
- textFit?: {
1181
- status: "unavailable" | "supported";
1182
- reason?: string | undefined;
1183
- fullLineCount?: number | undefined;
1184
- limitedLineCount?: number | undefined;
1185
- fullHeight?: number | undefined;
1186
- availableHeight?: number | undefined;
1187
- } | undefined;
1188
- authoredTextProps?: {
1189
- fontSize?: number | undefined;
1190
- lineHeight?: number | undefined;
1191
- numberOfLines?: number | undefined;
1192
- allowFontScaling?: boolean | undefined;
1193
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
1194
- } | undefined;
1195
- measuredLineCount?: number | undefined;
1196
- }[];
1197
- sessionId: string;
1198
- revisions: Record<string, string>;
1199
- generation: number;
1200
- nativeTarget?: {
1201
- platform: "android" | "ios";
1202
- kind: "physical" | "emulator" | "simulator";
1203
- targetId: string;
1204
- } | undefined;
1205
- webDiagnostics?: {
1206
- nodes: Record<string, {
1207
- clipping: "unknown" | "confirmed" | "clear";
1208
- centerHitTest: "unknown" | "confirmed" | "clear";
1209
- scrollOverflow: {
1210
- horizontal: boolean;
1211
- vertical: boolean;
1212
- };
1213
- paintOrder: number | null;
1214
- fonts: {
1215
- family: string;
1216
- glyphCount: number;
1217
- isCustom: boolean | null;
1218
- }[];
1219
- lineBoxCount: number | null;
1220
- }>;
1221
- warnings: {
1222
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
1223
- message: string;
1224
- elementId: string;
1225
- severity: "confirmed" | "uncertain";
1226
- }[];
1227
- } | undefined;
1228
- };
1229
- requestId: string;
1230
- }, {
1231
- type: "snapshot";
1232
- snapshot: {
1233
- status: "stable" | "unstable";
1234
- platform: "web" | "android" | "ios";
1235
- schemaVersion: 1;
1236
- scenarioId: string;
1237
- profile: {
1238
- window: {
1239
- width: number;
1240
- height: number;
1241
- };
1242
- pixelRatio: number;
1243
- fontScale: number;
1244
- insets: {
1245
- top: number;
1246
- right: number;
1247
- bottom: number;
1248
- left: number;
1249
- };
1250
- root: {
1251
- x: number;
1252
- y: number;
1253
- width: number;
1254
- height: number;
1255
- };
1256
- orientation: "portrait" | "landscape";
1257
- };
1258
- snapshotId: string;
1259
- nodes: {
1260
- id: string;
1261
- rect: {
1262
- x: number;
1263
- y: number;
1264
- width: number;
1265
- height: number;
1266
- };
1267
- kind: "View" | "Text" | "Pressable" | "TextInput" | "ScrollView" | "Image";
1268
- source: {
1269
- path: string;
1270
- start: number;
1271
- end: number;
1272
- hash: string;
1273
- line: number;
1274
- column: number;
1275
- styleForm?: "pressable-state" | undefined;
1276
- dependencies?: string[] | undefined;
1277
- } | null;
1278
- parentId: string | null;
1279
- role: string | null;
1280
- styles: Record<string, unknown>;
1281
- editable: boolean;
1282
- editReason: string | null;
1283
- pressableState?: "pressed" | "rest" | undefined;
1284
- accessibility?: {
1285
- direction: "unknown" | "ltr" | "rtl";
1286
- authoredLabel?: string | undefined;
1287
- authoredHint?: string | undefined;
1288
- accessible?: boolean | undefined;
1289
- focusable?: boolean | undefined;
1290
- hidden?: boolean | undefined;
1291
- disabled?: boolean | undefined;
1292
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
1293
- browser?: {
1294
- focusOrder: number | null;
1295
- name: string | null;
1296
- focusOrderSource: "dom-sequential-estimate";
1297
- contrast: {
1298
- status: "measured" | "unavailable";
1299
- ratio?: number | undefined;
1300
- requiredRatio?: number | undefined;
1301
- reason?: string | undefined;
1302
- };
1303
- } | undefined;
1304
- } | undefined;
1305
- textFit?: {
1306
- status: "unavailable" | "supported";
1307
- reason?: string | undefined;
1308
- fullLineCount?: number | undefined;
1309
- limitedLineCount?: number | undefined;
1310
- fullHeight?: number | undefined;
1311
- availableHeight?: number | undefined;
1312
- } | undefined;
1313
- authoredTextProps?: {
1314
- fontSize?: number | undefined;
1315
- lineHeight?: number | undefined;
1316
- numberOfLines?: number | undefined;
1317
- allowFontScaling?: boolean | undefined;
1318
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
1319
- } | undefined;
1320
- measuredLineCount?: number | undefined;
1321
- }[];
1322
- sessionId: string;
1323
- revisions: Record<string, string>;
1324
- generation: number;
1325
- nativeTarget?: {
1326
- platform: "android" | "ios";
1327
- kind: "physical" | "emulator" | "simulator";
1328
- targetId: string;
1329
- } | undefined;
1330
- webDiagnostics?: {
1331
- nodes: Record<string, {
1332
- clipping: "unknown" | "confirmed" | "clear";
1333
- centerHitTest: "unknown" | "confirmed" | "clear";
1334
- scrollOverflow: {
1335
- horizontal: boolean;
1336
- vertical: boolean;
1337
- };
1338
- paintOrder: number | null;
1339
- fonts: {
1340
- family: string;
1341
- glyphCount: number;
1342
- isCustom: boolean | null;
1343
- }[];
1344
- lineBoxCount: number | null;
1345
- }>;
1346
- warnings: {
1347
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
1348
- message: string;
1349
- elementId: string;
1350
- severity: "confirmed" | "uncertain";
1351
- }[];
1352
- } | undefined;
1353
- };
1354
- requestId: string;
1355
- }>, z.ZodObject<{
207
+ }, z.core.$strict>>;
208
+ }, z.core.$strict>>;
209
+ }, z.core.$strict>;
210
+ }, z.core.$strict>, z.ZodObject<{
1356
211
  type: z.ZodLiteral<"error">;
1357
212
  requestId: z.ZodString;
1358
213
  error: z.ZodObject<{
1359
- code: z.ZodEnum<["INVALID_INPUT", "MISSING_ELEMENT", "DUPLICATE_ELEMENT", "STALE_SNAPSHOT", "STALE_SOURCE", "UNSUPPORTED_EDIT", "UNSUPPORTED_PROFILE", "UNSTABLE_LAYOUT", "NATIVE_DISCONNECTED", "TIMEOUT", "VERIFICATION_FAILED", "SESSION_NOT_FOUND", "TRIAL_NOT_FOUND", "SOURCE_OUTSIDE_PROJECT", "INTERNAL_ERROR", "RECOVERY_CONFLICT", "TRANSACTION_CONFLICT", "UNSUPPORTED_ACTION", "PROTOCOL_MISMATCH"]>;
214
+ code: z.ZodEnum<{
215
+ INVALID_INPUT: "INVALID_INPUT";
216
+ MISSING_ELEMENT: "MISSING_ELEMENT";
217
+ DUPLICATE_ELEMENT: "DUPLICATE_ELEMENT";
218
+ STALE_SNAPSHOT: "STALE_SNAPSHOT";
219
+ STALE_SOURCE: "STALE_SOURCE";
220
+ UNSUPPORTED_EDIT: "UNSUPPORTED_EDIT";
221
+ UNSUPPORTED_PROFILE: "UNSUPPORTED_PROFILE";
222
+ UNSTABLE_LAYOUT: "UNSTABLE_LAYOUT";
223
+ NATIVE_DISCONNECTED: "NATIVE_DISCONNECTED";
224
+ TIMEOUT: "TIMEOUT";
225
+ VERIFICATION_FAILED: "VERIFICATION_FAILED";
226
+ SESSION_NOT_FOUND: "SESSION_NOT_FOUND";
227
+ TRIAL_NOT_FOUND: "TRIAL_NOT_FOUND";
228
+ SOURCE_OUTSIDE_PROJECT: "SOURCE_OUTSIDE_PROJECT";
229
+ INTERNAL_ERROR: "INTERNAL_ERROR";
230
+ RECOVERY_CONFLICT: "RECOVERY_CONFLICT";
231
+ TRANSACTION_CONFLICT: "TRANSACTION_CONFLICT";
232
+ UNSUPPORTED_ACTION: "UNSUPPORTED_ACTION";
233
+ PROTOCOL_MISMATCH: "PROTOCOL_MISMATCH";
234
+ }>;
1360
235
  message: z.ZodString;
1361
236
  details: z.ZodOptional<z.ZodUnknown>;
1362
- }, "strict", z.ZodTypeAny, {
1363
- code: "INVALID_INPUT" | "MISSING_ELEMENT" | "DUPLICATE_ELEMENT" | "STALE_SNAPSHOT" | "STALE_SOURCE" | "UNSUPPORTED_EDIT" | "UNSUPPORTED_PROFILE" | "UNSTABLE_LAYOUT" | "NATIVE_DISCONNECTED" | "TIMEOUT" | "VERIFICATION_FAILED" | "SESSION_NOT_FOUND" | "TRIAL_NOT_FOUND" | "SOURCE_OUTSIDE_PROJECT" | "INTERNAL_ERROR" | "RECOVERY_CONFLICT" | "TRANSACTION_CONFLICT" | "UNSUPPORTED_ACTION" | "PROTOCOL_MISMATCH";
1364
- message: string;
1365
- details?: unknown;
1366
- }, {
1367
- code: "INVALID_INPUT" | "MISSING_ELEMENT" | "DUPLICATE_ELEMENT" | "STALE_SNAPSHOT" | "STALE_SOURCE" | "UNSUPPORTED_EDIT" | "UNSUPPORTED_PROFILE" | "UNSTABLE_LAYOUT" | "NATIVE_DISCONNECTED" | "TIMEOUT" | "VERIFICATION_FAILED" | "SESSION_NOT_FOUND" | "TRIAL_NOT_FOUND" | "SOURCE_OUTSIDE_PROJECT" | "INTERNAL_ERROR" | "RECOVERY_CONFLICT" | "TRANSACTION_CONFLICT" | "UNSUPPORTED_ACTION" | "PROTOCOL_MISMATCH";
1368
- message: string;
1369
- details?: unknown;
1370
- }>;
1371
- }, "strict", z.ZodTypeAny, {
1372
- type: "error";
1373
- error: {
1374
- code: "INVALID_INPUT" | "MISSING_ELEMENT" | "DUPLICATE_ELEMENT" | "STALE_SNAPSHOT" | "STALE_SOURCE" | "UNSUPPORTED_EDIT" | "UNSUPPORTED_PROFILE" | "UNSTABLE_LAYOUT" | "NATIVE_DISCONNECTED" | "TIMEOUT" | "VERIFICATION_FAILED" | "SESSION_NOT_FOUND" | "TRIAL_NOT_FOUND" | "SOURCE_OUTSIDE_PROJECT" | "INTERNAL_ERROR" | "RECOVERY_CONFLICT" | "TRANSACTION_CONFLICT" | "UNSUPPORTED_ACTION" | "PROTOCOL_MISMATCH";
1375
- message: string;
1376
- details?: unknown;
1377
- };
1378
- requestId: string;
1379
- }, {
1380
- type: "error";
1381
- error: {
1382
- code: "INVALID_INPUT" | "MISSING_ELEMENT" | "DUPLICATE_ELEMENT" | "STALE_SNAPSHOT" | "STALE_SOURCE" | "UNSUPPORTED_EDIT" | "UNSUPPORTED_PROFILE" | "UNSTABLE_LAYOUT" | "NATIVE_DISCONNECTED" | "TIMEOUT" | "VERIFICATION_FAILED" | "SESSION_NOT_FOUND" | "TRIAL_NOT_FOUND" | "SOURCE_OUTSIDE_PROJECT" | "INTERNAL_ERROR" | "RECOVERY_CONFLICT" | "TRANSACTION_CONFLICT" | "UNSUPPORTED_ACTION" | "PROTOCOL_MISMATCH";
1383
- message: string;
1384
- details?: unknown;
1385
- };
1386
- requestId: string;
1387
- }>]>, {
1388
- type: "hello";
1389
- scenarioId: string;
1390
- token: string;
1391
- protocolVersion: 1 | 2;
1392
- platform?: "android" | "ios" | undefined;
1393
- targetId?: string | undefined;
1394
- capabilities?: {
1395
- textFits: boolean;
1396
- scenarioActions: boolean;
1397
- } | undefined;
1398
- } | {
1399
- type: "action_result";
1400
- requestId: string;
1401
- } | {
1402
- type: "snapshot";
1403
- snapshot: {
1404
- status: "stable" | "unstable";
1405
- platform: "web" | "android" | "ios";
1406
- schemaVersion: 1;
1407
- scenarioId: string;
1408
- profile: {
1409
- window: {
1410
- width: number;
1411
- height: number;
1412
- };
1413
- pixelRatio: number;
1414
- fontScale: number;
1415
- insets: {
1416
- top: number;
1417
- right: number;
1418
- bottom: number;
1419
- left: number;
1420
- };
1421
- root: {
1422
- x: number;
1423
- y: number;
1424
- width: number;
1425
- height: number;
1426
- };
1427
- orientation: "portrait" | "landscape";
1428
- };
1429
- snapshotId: string;
1430
- nodes: {
1431
- id: string;
1432
- rect: {
1433
- x: number;
1434
- y: number;
1435
- width: number;
1436
- height: number;
1437
- };
1438
- kind: "View" | "Text" | "Pressable" | "TextInput" | "ScrollView" | "Image";
1439
- source: {
1440
- path: string;
1441
- start: number;
1442
- end: number;
1443
- hash: string;
1444
- line: number;
1445
- column: number;
1446
- styleForm?: "pressable-state" | undefined;
1447
- dependencies?: string[] | undefined;
1448
- } | null;
1449
- parentId: string | null;
1450
- role: string | null;
1451
- styles: Record<string, unknown>;
1452
- editable: boolean;
1453
- editReason: string | null;
1454
- pressableState?: "pressed" | "rest" | undefined;
1455
- accessibility?: {
1456
- direction: "unknown" | "ltr" | "rtl";
1457
- authoredLabel?: string | undefined;
1458
- authoredHint?: string | undefined;
1459
- accessible?: boolean | undefined;
1460
- focusable?: boolean | undefined;
1461
- hidden?: boolean | undefined;
1462
- disabled?: boolean | undefined;
1463
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
1464
- browser?: {
1465
- focusOrder: number | null;
1466
- name: string | null;
1467
- focusOrderSource: "dom-sequential-estimate";
1468
- contrast: {
1469
- status: "measured" | "unavailable";
1470
- ratio?: number | undefined;
1471
- requiredRatio?: number | undefined;
1472
- reason?: string | undefined;
1473
- };
1474
- } | undefined;
1475
- } | undefined;
1476
- textFit?: {
1477
- status: "unavailable" | "supported";
1478
- reason?: string | undefined;
1479
- fullLineCount?: number | undefined;
1480
- limitedLineCount?: number | undefined;
1481
- fullHeight?: number | undefined;
1482
- availableHeight?: number | undefined;
1483
- } | undefined;
1484
- authoredTextProps?: {
1485
- fontSize?: number | undefined;
1486
- lineHeight?: number | undefined;
1487
- numberOfLines?: number | undefined;
1488
- allowFontScaling?: boolean | undefined;
1489
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
1490
- } | undefined;
1491
- measuredLineCount?: number | undefined;
1492
- }[];
1493
- sessionId: string;
1494
- revisions: Record<string, string>;
1495
- generation: number;
1496
- nativeTarget?: {
1497
- platform: "android" | "ios";
1498
- kind: "physical" | "emulator" | "simulator";
1499
- targetId: string;
1500
- } | undefined;
1501
- webDiagnostics?: {
1502
- nodes: Record<string, {
1503
- clipping: "unknown" | "confirmed" | "clear";
1504
- centerHitTest: "unknown" | "confirmed" | "clear";
1505
- scrollOverflow: {
1506
- horizontal: boolean;
1507
- vertical: boolean;
1508
- };
1509
- paintOrder: number | null;
1510
- fonts: {
1511
- family: string;
1512
- glyphCount: number;
1513
- isCustom: boolean | null;
1514
- }[];
1515
- lineBoxCount: number | null;
1516
- }>;
1517
- warnings: {
1518
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
1519
- message: string;
1520
- elementId: string;
1521
- severity: "confirmed" | "uncertain";
1522
- }[];
1523
- } | undefined;
1524
- };
1525
- requestId: string;
1526
- } | {
1527
- type: "error";
1528
- error: {
1529
- code: "INVALID_INPUT" | "MISSING_ELEMENT" | "DUPLICATE_ELEMENT" | "STALE_SNAPSHOT" | "STALE_SOURCE" | "UNSUPPORTED_EDIT" | "UNSUPPORTED_PROFILE" | "UNSTABLE_LAYOUT" | "NATIVE_DISCONNECTED" | "TIMEOUT" | "VERIFICATION_FAILED" | "SESSION_NOT_FOUND" | "TRIAL_NOT_FOUND" | "SOURCE_OUTSIDE_PROJECT" | "INTERNAL_ERROR" | "RECOVERY_CONFLICT" | "TRANSACTION_CONFLICT" | "UNSUPPORTED_ACTION" | "PROTOCOL_MISMATCH";
1530
- message: string;
1531
- details?: unknown;
1532
- };
1533
- requestId: string;
1534
- }, {
1535
- type: "hello";
1536
- scenarioId: string;
1537
- token: string;
1538
- protocolVersion: 1 | 2;
1539
- platform?: "android" | "ios" | undefined;
1540
- targetId?: string | undefined;
1541
- capabilities?: {
1542
- textFits: boolean;
1543
- scenarioActions: boolean;
1544
- } | undefined;
1545
- } | {
1546
- type: "action_result";
1547
- requestId: string;
1548
- } | {
1549
- type: "snapshot";
1550
- snapshot: {
1551
- status: "stable" | "unstable";
1552
- platform: "web" | "android" | "ios";
1553
- schemaVersion: 1;
1554
- scenarioId: string;
1555
- profile: {
1556
- window: {
1557
- width: number;
1558
- height: number;
1559
- };
1560
- pixelRatio: number;
1561
- fontScale: number;
1562
- insets: {
1563
- top: number;
1564
- right: number;
1565
- bottom: number;
1566
- left: number;
1567
- };
1568
- root: {
1569
- x: number;
1570
- y: number;
1571
- width: number;
1572
- height: number;
1573
- };
1574
- orientation: "portrait" | "landscape";
1575
- };
1576
- snapshotId: string;
1577
- nodes: {
1578
- id: string;
1579
- rect: {
1580
- x: number;
1581
- y: number;
1582
- width: number;
1583
- height: number;
1584
- };
1585
- kind: "View" | "Text" | "Pressable" | "TextInput" | "ScrollView" | "Image";
1586
- source: {
1587
- path: string;
1588
- start: number;
1589
- end: number;
1590
- hash: string;
1591
- line: number;
1592
- column: number;
1593
- styleForm?: "pressable-state" | undefined;
1594
- dependencies?: string[] | undefined;
1595
- } | null;
1596
- parentId: string | null;
1597
- role: string | null;
1598
- styles: Record<string, unknown>;
1599
- editable: boolean;
1600
- editReason: string | null;
1601
- pressableState?: "pressed" | "rest" | undefined;
1602
- accessibility?: {
1603
- direction: "unknown" | "ltr" | "rtl";
1604
- authoredLabel?: string | undefined;
1605
- authoredHint?: string | undefined;
1606
- accessible?: boolean | undefined;
1607
- focusable?: boolean | undefined;
1608
- hidden?: boolean | undefined;
1609
- disabled?: boolean | undefined;
1610
- directionSource?: "unknown" | "authored" | "native-global" | "browser-computed" | undefined;
1611
- browser?: {
1612
- focusOrder: number | null;
1613
- name: string | null;
1614
- focusOrderSource: "dom-sequential-estimate";
1615
- contrast: {
1616
- status: "measured" | "unavailable";
1617
- ratio?: number | undefined;
1618
- requiredRatio?: number | undefined;
1619
- reason?: string | undefined;
1620
- };
1621
- } | undefined;
1622
- } | undefined;
1623
- textFit?: {
1624
- status: "unavailable" | "supported";
1625
- reason?: string | undefined;
1626
- fullLineCount?: number | undefined;
1627
- limitedLineCount?: number | undefined;
1628
- fullHeight?: number | undefined;
1629
- availableHeight?: number | undefined;
1630
- } | undefined;
1631
- authoredTextProps?: {
1632
- fontSize?: number | undefined;
1633
- lineHeight?: number | undefined;
1634
- numberOfLines?: number | undefined;
1635
- allowFontScaling?: boolean | undefined;
1636
- ellipsizeMode?: "head" | "middle" | "tail" | "clip" | undefined;
1637
- } | undefined;
1638
- measuredLineCount?: number | undefined;
1639
- }[];
1640
- sessionId: string;
1641
- revisions: Record<string, string>;
1642
- generation: number;
1643
- nativeTarget?: {
1644
- platform: "android" | "ios";
1645
- kind: "physical" | "emulator" | "simulator";
1646
- targetId: string;
1647
- } | undefined;
1648
- webDiagnostics?: {
1649
- nodes: Record<string, {
1650
- clipping: "unknown" | "confirmed" | "clear";
1651
- centerHitTest: "unknown" | "confirmed" | "clear";
1652
- scrollOverflow: {
1653
- horizontal: boolean;
1654
- vertical: boolean;
1655
- };
1656
- paintOrder: number | null;
1657
- fonts: {
1658
- family: string;
1659
- glyphCount: number;
1660
- isCustom: boolean | null;
1661
- }[];
1662
- lineBoxCount: number | null;
1663
- }>;
1664
- warnings: {
1665
- code: "CLIPPED" | "OCCLUDED" | "FONT_LOAD_FAILED" | "EVIDENCE_UNAVAILABLE";
1666
- message: string;
1667
- elementId: string;
1668
- severity: "confirmed" | "uncertain";
1669
- }[];
1670
- } | undefined;
1671
- };
1672
- requestId: string;
1673
- } | {
1674
- type: "error";
1675
- error: {
1676
- code: "INVALID_INPUT" | "MISSING_ELEMENT" | "DUPLICATE_ELEMENT" | "STALE_SNAPSHOT" | "STALE_SOURCE" | "UNSUPPORTED_EDIT" | "UNSUPPORTED_PROFILE" | "UNSTABLE_LAYOUT" | "NATIVE_DISCONNECTED" | "TIMEOUT" | "VERIFICATION_FAILED" | "SESSION_NOT_FOUND" | "TRIAL_NOT_FOUND" | "SOURCE_OUTSIDE_PROJECT" | "INTERNAL_ERROR" | "RECOVERY_CONFLICT" | "TRANSACTION_CONFLICT" | "UNSUPPORTED_ACTION" | "PROTOCOL_MISMATCH";
1677
- message: string;
1678
- details?: unknown;
1679
- };
1680
- requestId: string;
1681
- }>;
237
+ }, z.core.$strict>;
238
+ }, z.core.$strict>], "type">;
1682
239
  export type NativeClientMessage = z.infer<typeof NativeClientMessageSchema>;
1683
- export declare const NativeServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
240
+ export declare const NativeServerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1684
241
  type: z.ZodLiteral<"capture">;
1685
242
  requestId: z.ZodString;
1686
243
  sessionId: z.ZodString;
1687
244
  expectedRevisions: z.ZodRecord<z.ZodString, z.ZodString>;
1688
- }, "strict", z.ZodTypeAny, {
1689
- type: "capture";
1690
- sessionId: string;
1691
- requestId: string;
1692
- expectedRevisions: Record<string, string>;
1693
- }, {
1694
- type: "capture";
1695
- sessionId: string;
1696
- requestId: string;
1697
- expectedRevisions: Record<string, string>;
1698
- }>, z.ZodObject<{
245
+ }, z.core.$strict>, z.ZodObject<{
1699
246
  type: z.ZodLiteral<"action">;
1700
247
  requestId: z.ZodString;
1701
248
  sessionId: z.ZodString;
1702
249
  name: z.ZodString;
1703
250
  value: z.ZodOptional<z.ZodUnknown>;
1704
- }, "strict", z.ZodTypeAny, {
1705
- type: "action";
1706
- name: string;
1707
- sessionId: string;
1708
- requestId: string;
1709
- value?: unknown;
1710
- }, {
1711
- type: "action";
1712
- name: string;
1713
- sessionId: string;
1714
- requestId: string;
1715
- value?: unknown;
1716
- }>]>;
251
+ }, z.core.$strict>], "type">;
1717
252
  export type NativeServerMessage = z.infer<typeof NativeServerMessageSchema>;
1718
253
  export interface NativeConnectionOptions {
1719
254
  port: number;
@@ -1723,4 +258,5 @@ export interface NativeConnectionOptions {
1723
258
  timeoutMs?: number;
1724
259
  targetId?: string;
1725
260
  platform?: 'android' | 'ios';
261
+ host?: NativeBindHost;
1726
262
  }