@nativemason/contracts 0.0.0-stage → 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.
- package/LICENSE +202 -0
- package/README.md +4 -2
- package/dist/accessibility.d.ts +92 -0
- package/dist/accessibility.js +21 -0
- package/dist/constraints.d.ts +179 -0
- package/dist/constraints.js +16 -0
- package/dist/design.d.ts +304 -0
- package/dist/design.js +29 -0
- package/dist/diagnostics.d.ts +580 -0
- package/dist/diagnostics.js +35 -0
- package/dist/evidence.d.ts +854 -0
- package/dist/evidence.js +44 -0
- package/dist/geometry.d.ts +39 -0
- package/dist/geometry.js +4 -0
- package/dist/graph.d.ts +456 -0
- package/dist/graph.js +36 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +12 -0
- package/dist/native-protocol.d.ts +262 -0
- package/dist/native-protocol.js +13 -0
- package/dist/source.d.ts +119 -0
- package/dist/source.js +17 -0
- package/dist/styles.d.ts +105 -0
- package/dist/styles.js +3 -0
- package/dist/tools.d.ts +7411 -0
- package/dist/tools.js +55 -0
- package/dist/workflow.d.ts +688 -0
- package/dist/workflow.js +18 -0
- package/package.json +33 -3
|
@@ -0,0 +1,688 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SourceFile, SourcePort } from './source.js';
|
|
3
|
+
export declare const LayoutMutationSchema: z.ZodObject<{
|
|
4
|
+
elementId: z.ZodString;
|
|
5
|
+
patch: z.ZodObject<{
|
|
6
|
+
flex: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
flexWrap: z.ZodOptional<z.ZodEnum<{
|
|
8
|
+
wrap: "wrap";
|
|
9
|
+
nowrap: "nowrap";
|
|
10
|
+
"wrap-reverse": "wrap-reverse";
|
|
11
|
+
}>>;
|
|
12
|
+
alignContent: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
center: "center";
|
|
14
|
+
"flex-start": "flex-start";
|
|
15
|
+
"flex-end": "flex-end";
|
|
16
|
+
stretch: "stretch";
|
|
17
|
+
"space-between": "space-between";
|
|
18
|
+
"space-around": "space-around";
|
|
19
|
+
}>>;
|
|
20
|
+
position: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
relative: "relative";
|
|
22
|
+
absolute: "absolute";
|
|
23
|
+
static: "static";
|
|
24
|
+
}>>;
|
|
25
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
aspectRatio: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
paddingStart: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
paddingEnd: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
marginStart: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
marginEnd: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
39
|
+
fontWeight: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
normal: "normal";
|
|
41
|
+
bold: "bold";
|
|
42
|
+
100: "100";
|
|
43
|
+
200: "200";
|
|
44
|
+
300: "300";
|
|
45
|
+
400: "400";
|
|
46
|
+
500: "500";
|
|
47
|
+
600: "600";
|
|
48
|
+
700: "700";
|
|
49
|
+
800: "800";
|
|
50
|
+
900: "900";
|
|
51
|
+
}>>;
|
|
52
|
+
flexDirection: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
column: "column";
|
|
54
|
+
row: "row";
|
|
55
|
+
"row-reverse": "row-reverse";
|
|
56
|
+
"column-reverse": "column-reverse";
|
|
57
|
+
}>>;
|
|
58
|
+
justifyContent: z.ZodOptional<z.ZodEnum<{
|
|
59
|
+
center: "center";
|
|
60
|
+
"flex-start": "flex-start";
|
|
61
|
+
"flex-end": "flex-end";
|
|
62
|
+
"space-between": "space-between";
|
|
63
|
+
"space-around": "space-around";
|
|
64
|
+
"space-evenly": "space-evenly";
|
|
65
|
+
}>>;
|
|
66
|
+
alignItems: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
center: "center";
|
|
68
|
+
"flex-start": "flex-start";
|
|
69
|
+
"flex-end": "flex-end";
|
|
70
|
+
stretch: "stretch";
|
|
71
|
+
baseline: "baseline";
|
|
72
|
+
}>>;
|
|
73
|
+
alignSelf: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
center: "center";
|
|
75
|
+
"flex-start": "flex-start";
|
|
76
|
+
"flex-end": "flex-end";
|
|
77
|
+
stretch: "stretch";
|
|
78
|
+
baseline: "baseline";
|
|
79
|
+
auto: "auto";
|
|
80
|
+
}>>;
|
|
81
|
+
flexGrow: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
flexShrink: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
84
|
+
height: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
85
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
rowGap: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
columnGap: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
paddingHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
paddingVertical: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
paddingTop: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
paddingBottom: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
paddingLeft: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
paddingRight: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
margin: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
marginHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
marginVertical: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
marginTop: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
marginBottom: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
marginLeft: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
marginRight: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
}, z.core.$strict>;
|
|
107
|
+
}, z.core.$strict>;
|
|
108
|
+
export type LayoutMutation = z.infer<typeof LayoutMutationSchema>;
|
|
109
|
+
export declare const EditScopeSchema: z.ZodObject<{
|
|
110
|
+
kind: z.ZodEnum<{
|
|
111
|
+
"pressable-state": "pressable-state";
|
|
112
|
+
local: "local";
|
|
113
|
+
branch: "branch";
|
|
114
|
+
shared: "shared";
|
|
115
|
+
nativewind: "nativewind";
|
|
116
|
+
}>;
|
|
117
|
+
branch: z.ZodOptional<z.ZodEnum<{
|
|
118
|
+
consequent: "consequent";
|
|
119
|
+
alternate: "alternate";
|
|
120
|
+
}>>;
|
|
121
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
122
|
+
pressed: "pressed";
|
|
123
|
+
rest: "rest";
|
|
124
|
+
}>>;
|
|
125
|
+
acknowledgeInstances: z.ZodOptional<z.ZodBoolean>;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
export type EditScope = z.infer<typeof EditScopeSchema>;
|
|
128
|
+
export declare const SharedConsumerSchema: z.ZodObject<{
|
|
129
|
+
source: z.ZodObject<{
|
|
130
|
+
path: z.ZodString;
|
|
131
|
+
styleForm: z.ZodOptional<z.ZodLiteral<"pressable-state">>;
|
|
132
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
133
|
+
hash: z.ZodString;
|
|
134
|
+
start: z.ZodNumber;
|
|
135
|
+
end: z.ZodNumber;
|
|
136
|
+
line: z.ZodNumber;
|
|
137
|
+
column: z.ZodNumber;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
mountedIds: z.ZodArray<z.ZodString>;
|
|
140
|
+
requiredScenarios: z.ZodArray<z.ZodString>;
|
|
141
|
+
}, z.core.$strict>;
|
|
142
|
+
export type SharedConsumer = z.infer<typeof SharedConsumerSchema>;
|
|
143
|
+
export declare const BlastRadiusSchema: z.ZodObject<{
|
|
144
|
+
consumers: z.ZodArray<z.ZodObject<{
|
|
145
|
+
source: z.ZodObject<{
|
|
146
|
+
path: z.ZodString;
|
|
147
|
+
styleForm: z.ZodOptional<z.ZodLiteral<"pressable-state">>;
|
|
148
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
149
|
+
hash: z.ZodString;
|
|
150
|
+
start: z.ZodNumber;
|
|
151
|
+
end: z.ZodNumber;
|
|
152
|
+
line: z.ZodNumber;
|
|
153
|
+
column: z.ZodNumber;
|
|
154
|
+
}, z.core.$strict>;
|
|
155
|
+
mountedIds: z.ZodArray<z.ZodString>;
|
|
156
|
+
requiredScenarios: z.ZodArray<z.ZodString>;
|
|
157
|
+
}, z.core.$strict>>;
|
|
158
|
+
unresolvedReferences: z.ZodArray<z.ZodString>;
|
|
159
|
+
}, z.core.$strict>;
|
|
160
|
+
export type BlastRadius = z.infer<typeof BlastRadiusSchema>;
|
|
161
|
+
export declare const SourceMutationSchema: z.ZodObject<{
|
|
162
|
+
source: z.ZodObject<{
|
|
163
|
+
path: z.ZodString;
|
|
164
|
+
styleForm: z.ZodOptional<z.ZodLiteral<"pressable-state">>;
|
|
165
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
166
|
+
hash: z.ZodString;
|
|
167
|
+
start: z.ZodNumber;
|
|
168
|
+
end: z.ZodNumber;
|
|
169
|
+
line: z.ZodNumber;
|
|
170
|
+
column: z.ZodNumber;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
patch: z.ZodObject<{
|
|
173
|
+
flex: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
flexWrap: z.ZodOptional<z.ZodEnum<{
|
|
175
|
+
wrap: "wrap";
|
|
176
|
+
nowrap: "nowrap";
|
|
177
|
+
"wrap-reverse": "wrap-reverse";
|
|
178
|
+
}>>;
|
|
179
|
+
alignContent: z.ZodOptional<z.ZodEnum<{
|
|
180
|
+
center: "center";
|
|
181
|
+
"flex-start": "flex-start";
|
|
182
|
+
"flex-end": "flex-end";
|
|
183
|
+
stretch: "stretch";
|
|
184
|
+
"space-between": "space-between";
|
|
185
|
+
"space-around": "space-around";
|
|
186
|
+
}>>;
|
|
187
|
+
position: z.ZodOptional<z.ZodEnum<{
|
|
188
|
+
relative: "relative";
|
|
189
|
+
absolute: "absolute";
|
|
190
|
+
static: "static";
|
|
191
|
+
}>>;
|
|
192
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
196
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
197
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
198
|
+
aspectRatio: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
paddingStart: z.ZodOptional<z.ZodNumber>;
|
|
200
|
+
paddingEnd: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
marginStart: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
marginEnd: z.ZodOptional<z.ZodNumber>;
|
|
203
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
206
|
+
fontWeight: z.ZodOptional<z.ZodEnum<{
|
|
207
|
+
normal: "normal";
|
|
208
|
+
bold: "bold";
|
|
209
|
+
100: "100";
|
|
210
|
+
200: "200";
|
|
211
|
+
300: "300";
|
|
212
|
+
400: "400";
|
|
213
|
+
500: "500";
|
|
214
|
+
600: "600";
|
|
215
|
+
700: "700";
|
|
216
|
+
800: "800";
|
|
217
|
+
900: "900";
|
|
218
|
+
}>>;
|
|
219
|
+
flexDirection: z.ZodOptional<z.ZodEnum<{
|
|
220
|
+
column: "column";
|
|
221
|
+
row: "row";
|
|
222
|
+
"row-reverse": "row-reverse";
|
|
223
|
+
"column-reverse": "column-reverse";
|
|
224
|
+
}>>;
|
|
225
|
+
justifyContent: z.ZodOptional<z.ZodEnum<{
|
|
226
|
+
center: "center";
|
|
227
|
+
"flex-start": "flex-start";
|
|
228
|
+
"flex-end": "flex-end";
|
|
229
|
+
"space-between": "space-between";
|
|
230
|
+
"space-around": "space-around";
|
|
231
|
+
"space-evenly": "space-evenly";
|
|
232
|
+
}>>;
|
|
233
|
+
alignItems: z.ZodOptional<z.ZodEnum<{
|
|
234
|
+
center: "center";
|
|
235
|
+
"flex-start": "flex-start";
|
|
236
|
+
"flex-end": "flex-end";
|
|
237
|
+
stretch: "stretch";
|
|
238
|
+
baseline: "baseline";
|
|
239
|
+
}>>;
|
|
240
|
+
alignSelf: z.ZodOptional<z.ZodEnum<{
|
|
241
|
+
center: "center";
|
|
242
|
+
"flex-start": "flex-start";
|
|
243
|
+
"flex-end": "flex-end";
|
|
244
|
+
stretch: "stretch";
|
|
245
|
+
baseline: "baseline";
|
|
246
|
+
auto: "auto";
|
|
247
|
+
}>>;
|
|
248
|
+
flexGrow: z.ZodOptional<z.ZodNumber>;
|
|
249
|
+
flexShrink: z.ZodOptional<z.ZodNumber>;
|
|
250
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
251
|
+
height: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
252
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
253
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
254
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
255
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
257
|
+
rowGap: z.ZodOptional<z.ZodNumber>;
|
|
258
|
+
columnGap: z.ZodOptional<z.ZodNumber>;
|
|
259
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
paddingHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
261
|
+
paddingVertical: z.ZodOptional<z.ZodNumber>;
|
|
262
|
+
paddingTop: z.ZodOptional<z.ZodNumber>;
|
|
263
|
+
paddingBottom: z.ZodOptional<z.ZodNumber>;
|
|
264
|
+
paddingLeft: z.ZodOptional<z.ZodNumber>;
|
|
265
|
+
paddingRight: z.ZodOptional<z.ZodNumber>;
|
|
266
|
+
margin: z.ZodOptional<z.ZodNumber>;
|
|
267
|
+
marginHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
268
|
+
marginVertical: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
marginTop: z.ZodOptional<z.ZodNumber>;
|
|
270
|
+
marginBottom: z.ZodOptional<z.ZodNumber>;
|
|
271
|
+
marginLeft: z.ZodOptional<z.ZodNumber>;
|
|
272
|
+
marginRight: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
}, z.core.$strict>;
|
|
274
|
+
scope: z.ZodOptional<z.ZodObject<{
|
|
275
|
+
kind: z.ZodEnum<{
|
|
276
|
+
"pressable-state": "pressable-state";
|
|
277
|
+
local: "local";
|
|
278
|
+
branch: "branch";
|
|
279
|
+
shared: "shared";
|
|
280
|
+
nativewind: "nativewind";
|
|
281
|
+
}>;
|
|
282
|
+
branch: z.ZodOptional<z.ZodEnum<{
|
|
283
|
+
consequent: "consequent";
|
|
284
|
+
alternate: "alternate";
|
|
285
|
+
}>>;
|
|
286
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
287
|
+
pressed: "pressed";
|
|
288
|
+
rest: "rest";
|
|
289
|
+
}>>;
|
|
290
|
+
acknowledgeInstances: z.ZodOptional<z.ZodBoolean>;
|
|
291
|
+
}, z.core.$strict>>;
|
|
292
|
+
}, z.core.$strict>;
|
|
293
|
+
export type SourceMutation = z.infer<typeof SourceMutationSchema>;
|
|
294
|
+
export declare const TransactionPlanSchema: z.ZodObject<{
|
|
295
|
+
intentId: z.ZodOptional<z.ZodString>;
|
|
296
|
+
files: z.ZodArray<z.ZodObject<{
|
|
297
|
+
source: z.ZodObject<{
|
|
298
|
+
path: z.ZodString;
|
|
299
|
+
styleForm: z.ZodOptional<z.ZodLiteral<"pressable-state">>;
|
|
300
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
301
|
+
hash: z.ZodString;
|
|
302
|
+
start: z.ZodNumber;
|
|
303
|
+
end: z.ZodNumber;
|
|
304
|
+
line: z.ZodNumber;
|
|
305
|
+
column: z.ZodNumber;
|
|
306
|
+
}, z.core.$strict>;
|
|
307
|
+
expectedHash: z.ZodString;
|
|
308
|
+
updatedText: z.ZodString;
|
|
309
|
+
diff: z.ZodString;
|
|
310
|
+
}, z.core.$strict>>;
|
|
311
|
+
blastRadius: z.ZodObject<{
|
|
312
|
+
consumers: z.ZodArray<z.ZodObject<{
|
|
313
|
+
source: z.ZodObject<{
|
|
314
|
+
path: z.ZodString;
|
|
315
|
+
styleForm: z.ZodOptional<z.ZodLiteral<"pressable-state">>;
|
|
316
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
317
|
+
hash: z.ZodString;
|
|
318
|
+
start: z.ZodNumber;
|
|
319
|
+
end: z.ZodNumber;
|
|
320
|
+
line: z.ZodNumber;
|
|
321
|
+
column: z.ZodNumber;
|
|
322
|
+
}, z.core.$strict>;
|
|
323
|
+
mountedIds: z.ZodArray<z.ZodString>;
|
|
324
|
+
requiredScenarios: z.ZodArray<z.ZodString>;
|
|
325
|
+
}, z.core.$strict>>;
|
|
326
|
+
unresolvedReferences: z.ZodArray<z.ZodString>;
|
|
327
|
+
}, z.core.$strict>;
|
|
328
|
+
}, z.core.$strict>;
|
|
329
|
+
export type TransactionPlan = z.infer<typeof TransactionPlanSchema>;
|
|
330
|
+
export declare const TransactionReceiptSchema: z.ZodObject<{
|
|
331
|
+
commitId: z.ZodString;
|
|
332
|
+
files: z.ZodArray<z.ZodObject<{
|
|
333
|
+
path: z.ZodString;
|
|
334
|
+
oldHash: z.ZodString;
|
|
335
|
+
newHash: z.ZodString;
|
|
336
|
+
diff: z.ZodString;
|
|
337
|
+
}, z.core.$strict>>;
|
|
338
|
+
nativeStatus: z.ZodEnum<{
|
|
339
|
+
pending: "pending";
|
|
340
|
+
passed: "passed";
|
|
341
|
+
failed: "failed";
|
|
342
|
+
}>;
|
|
343
|
+
revertsCommitId: z.ZodOptional<z.ZodString>;
|
|
344
|
+
}, z.core.$strict>;
|
|
345
|
+
export type TransactionReceipt = z.infer<typeof TransactionReceiptSchema>;
|
|
346
|
+
export interface TransactionSourcePort extends SourcePort {
|
|
347
|
+
readProject(): Promise<SourceFile[]>;
|
|
348
|
+
applyTransaction(plan: TransactionPlan): Promise<TransactionReceipt>;
|
|
349
|
+
revert(commitId: string): Promise<TransactionReceipt>;
|
|
350
|
+
recover(): Promise<void>;
|
|
351
|
+
}
|
|
352
|
+
export declare const TextFitEvidenceSchema: z.ZodObject<{
|
|
353
|
+
status: z.ZodEnum<{
|
|
354
|
+
unavailable: "unavailable";
|
|
355
|
+
supported: "supported";
|
|
356
|
+
}>;
|
|
357
|
+
fullLineCount: z.ZodOptional<z.ZodNumber>;
|
|
358
|
+
limitedLineCount: z.ZodOptional<z.ZodNumber>;
|
|
359
|
+
fullHeight: z.ZodOptional<z.ZodNumber>;
|
|
360
|
+
availableHeight: z.ZodOptional<z.ZodNumber>;
|
|
361
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
362
|
+
}, z.core.$strict>;
|
|
363
|
+
export type TextFitEvidence = z.infer<typeof TextFitEvidenceSchema>;
|
|
364
|
+
export declare const NativeTargetSchema: z.ZodObject<{
|
|
365
|
+
targetId: z.ZodString;
|
|
366
|
+
platform: z.ZodEnum<{
|
|
367
|
+
android: "android";
|
|
368
|
+
ios: "ios";
|
|
369
|
+
}>;
|
|
370
|
+
kind: z.ZodEnum<{
|
|
371
|
+
physical: "physical";
|
|
372
|
+
emulator: "emulator";
|
|
373
|
+
simulator: "simulator";
|
|
374
|
+
}>;
|
|
375
|
+
}, z.core.$strict>;
|
|
376
|
+
export type NativeTarget = z.infer<typeof NativeTargetSchema>;
|
|
377
|
+
export declare const SuggestionCandidateSchema: z.ZodObject<{
|
|
378
|
+
mutations: z.ZodArray<z.ZodObject<{
|
|
379
|
+
elementId: z.ZodString;
|
|
380
|
+
patch: z.ZodObject<{
|
|
381
|
+
flex: z.ZodOptional<z.ZodNumber>;
|
|
382
|
+
flexWrap: z.ZodOptional<z.ZodEnum<{
|
|
383
|
+
wrap: "wrap";
|
|
384
|
+
nowrap: "nowrap";
|
|
385
|
+
"wrap-reverse": "wrap-reverse";
|
|
386
|
+
}>>;
|
|
387
|
+
alignContent: z.ZodOptional<z.ZodEnum<{
|
|
388
|
+
center: "center";
|
|
389
|
+
"flex-start": "flex-start";
|
|
390
|
+
"flex-end": "flex-end";
|
|
391
|
+
stretch: "stretch";
|
|
392
|
+
"space-between": "space-between";
|
|
393
|
+
"space-around": "space-around";
|
|
394
|
+
}>>;
|
|
395
|
+
position: z.ZodOptional<z.ZodEnum<{
|
|
396
|
+
relative: "relative";
|
|
397
|
+
absolute: "absolute";
|
|
398
|
+
static: "static";
|
|
399
|
+
}>>;
|
|
400
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
401
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
403
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
404
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
405
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
406
|
+
aspectRatio: z.ZodOptional<z.ZodNumber>;
|
|
407
|
+
paddingStart: z.ZodOptional<z.ZodNumber>;
|
|
408
|
+
paddingEnd: z.ZodOptional<z.ZodNumber>;
|
|
409
|
+
marginStart: z.ZodOptional<z.ZodNumber>;
|
|
410
|
+
marginEnd: z.ZodOptional<z.ZodNumber>;
|
|
411
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
412
|
+
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
413
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
414
|
+
fontWeight: z.ZodOptional<z.ZodEnum<{
|
|
415
|
+
normal: "normal";
|
|
416
|
+
bold: "bold";
|
|
417
|
+
100: "100";
|
|
418
|
+
200: "200";
|
|
419
|
+
300: "300";
|
|
420
|
+
400: "400";
|
|
421
|
+
500: "500";
|
|
422
|
+
600: "600";
|
|
423
|
+
700: "700";
|
|
424
|
+
800: "800";
|
|
425
|
+
900: "900";
|
|
426
|
+
}>>;
|
|
427
|
+
flexDirection: z.ZodOptional<z.ZodEnum<{
|
|
428
|
+
column: "column";
|
|
429
|
+
row: "row";
|
|
430
|
+
"row-reverse": "row-reverse";
|
|
431
|
+
"column-reverse": "column-reverse";
|
|
432
|
+
}>>;
|
|
433
|
+
justifyContent: z.ZodOptional<z.ZodEnum<{
|
|
434
|
+
center: "center";
|
|
435
|
+
"flex-start": "flex-start";
|
|
436
|
+
"flex-end": "flex-end";
|
|
437
|
+
"space-between": "space-between";
|
|
438
|
+
"space-around": "space-around";
|
|
439
|
+
"space-evenly": "space-evenly";
|
|
440
|
+
}>>;
|
|
441
|
+
alignItems: z.ZodOptional<z.ZodEnum<{
|
|
442
|
+
center: "center";
|
|
443
|
+
"flex-start": "flex-start";
|
|
444
|
+
"flex-end": "flex-end";
|
|
445
|
+
stretch: "stretch";
|
|
446
|
+
baseline: "baseline";
|
|
447
|
+
}>>;
|
|
448
|
+
alignSelf: z.ZodOptional<z.ZodEnum<{
|
|
449
|
+
center: "center";
|
|
450
|
+
"flex-start": "flex-start";
|
|
451
|
+
"flex-end": "flex-end";
|
|
452
|
+
stretch: "stretch";
|
|
453
|
+
baseline: "baseline";
|
|
454
|
+
auto: "auto";
|
|
455
|
+
}>>;
|
|
456
|
+
flexGrow: z.ZodOptional<z.ZodNumber>;
|
|
457
|
+
flexShrink: z.ZodOptional<z.ZodNumber>;
|
|
458
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
459
|
+
height: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
460
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
461
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
462
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
463
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
464
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
465
|
+
rowGap: z.ZodOptional<z.ZodNumber>;
|
|
466
|
+
columnGap: z.ZodOptional<z.ZodNumber>;
|
|
467
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
468
|
+
paddingHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
469
|
+
paddingVertical: z.ZodOptional<z.ZodNumber>;
|
|
470
|
+
paddingTop: z.ZodOptional<z.ZodNumber>;
|
|
471
|
+
paddingBottom: z.ZodOptional<z.ZodNumber>;
|
|
472
|
+
paddingLeft: z.ZodOptional<z.ZodNumber>;
|
|
473
|
+
paddingRight: z.ZodOptional<z.ZodNumber>;
|
|
474
|
+
margin: z.ZodOptional<z.ZodNumber>;
|
|
475
|
+
marginHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
476
|
+
marginVertical: z.ZodOptional<z.ZodNumber>;
|
|
477
|
+
marginTop: z.ZodOptional<z.ZodNumber>;
|
|
478
|
+
marginBottom: z.ZodOptional<z.ZodNumber>;
|
|
479
|
+
marginLeft: z.ZodOptional<z.ZodNumber>;
|
|
480
|
+
marginRight: z.ZodOptional<z.ZodNumber>;
|
|
481
|
+
}, z.core.$strict>;
|
|
482
|
+
}, z.core.$strict>>;
|
|
483
|
+
reason: z.ZodString;
|
|
484
|
+
constraintIds: z.ZodArray<z.ZodString>;
|
|
485
|
+
}, z.core.$strict>;
|
|
486
|
+
export type SuggestionCandidate = z.infer<typeof SuggestionCandidateSchema>;
|
|
487
|
+
export declare const InferenceOptionsSchema: z.ZodObject<{
|
|
488
|
+
tolerance: z.ZodOptional<z.ZodNumber>;
|
|
489
|
+
includeRectangles: z.ZodOptional<z.ZodBoolean>;
|
|
490
|
+
}, z.core.$strict>;
|
|
491
|
+
export type InferenceOptions = z.infer<typeof InferenceOptionsSchema>;
|
|
492
|
+
export declare const RuleFindingSchema: z.ZodObject<{
|
|
493
|
+
code: z.ZodString;
|
|
494
|
+
severity: z.ZodEnum<{
|
|
495
|
+
unavailable: "unavailable";
|
|
496
|
+
advisory: "advisory";
|
|
497
|
+
confirmed: "confirmed";
|
|
498
|
+
}>;
|
|
499
|
+
elementIds: z.ZodArray<z.ZodString>;
|
|
500
|
+
message: z.ZodString;
|
|
501
|
+
}, z.core.$strict>;
|
|
502
|
+
export type RuleFinding = z.infer<typeof RuleFindingSchema>;
|
|
503
|
+
export declare const ScenarioActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
504
|
+
type: z.ZodLiteral<"navigate">;
|
|
505
|
+
url: z.ZodString;
|
|
506
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
507
|
+
type: z.ZodLiteral<"tap">;
|
|
508
|
+
elementId: z.ZodString;
|
|
509
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
510
|
+
type: z.ZodLiteral<"press">;
|
|
511
|
+
elementId: z.ZodString;
|
|
512
|
+
phase: z.ZodEnum<{
|
|
513
|
+
down: "down";
|
|
514
|
+
up: "up";
|
|
515
|
+
}>;
|
|
516
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
517
|
+
type: z.ZodLiteral<"input">;
|
|
518
|
+
elementId: z.ZodString;
|
|
519
|
+
text: z.ZodString;
|
|
520
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
521
|
+
replace: "replace";
|
|
522
|
+
append: "append";
|
|
523
|
+
}>>;
|
|
524
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
525
|
+
type: z.ZodLiteral<"swipe">;
|
|
526
|
+
elementId: z.ZodString;
|
|
527
|
+
direction: z.ZodEnum<{
|
|
528
|
+
UP: "UP";
|
|
529
|
+
DOWN: "DOWN";
|
|
530
|
+
LEFT: "LEFT";
|
|
531
|
+
RIGHT: "RIGHT";
|
|
532
|
+
}>;
|
|
533
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
534
|
+
type: z.ZodLiteral<"scroll">;
|
|
535
|
+
elementId: z.ZodString;
|
|
536
|
+
x: z.ZodNumber;
|
|
537
|
+
y: z.ZodNumber;
|
|
538
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
539
|
+
type: z.ZodLiteral<"keyboard">;
|
|
540
|
+
visible: z.ZodBoolean;
|
|
541
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
542
|
+
type: z.ZodLiteral<"wait">;
|
|
543
|
+
elementId: z.ZodString;
|
|
544
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
545
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
546
|
+
type: z.ZodLiteral<"hook">;
|
|
547
|
+
name: z.ZodString;
|
|
548
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
549
|
+
}, z.core.$strip>], "type">;
|
|
550
|
+
export type ScenarioAction = z.infer<typeof ScenarioActionSchema>;
|
|
551
|
+
export declare const ScenarioScriptSchema: z.ZodObject<{
|
|
552
|
+
scenarioId: z.ZodString;
|
|
553
|
+
reset: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
554
|
+
type: z.ZodLiteral<"navigate">;
|
|
555
|
+
url: z.ZodString;
|
|
556
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
557
|
+
type: z.ZodLiteral<"tap">;
|
|
558
|
+
elementId: z.ZodString;
|
|
559
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
560
|
+
type: z.ZodLiteral<"press">;
|
|
561
|
+
elementId: z.ZodString;
|
|
562
|
+
phase: z.ZodEnum<{
|
|
563
|
+
down: "down";
|
|
564
|
+
up: "up";
|
|
565
|
+
}>;
|
|
566
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
567
|
+
type: z.ZodLiteral<"input">;
|
|
568
|
+
elementId: z.ZodString;
|
|
569
|
+
text: z.ZodString;
|
|
570
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
571
|
+
replace: "replace";
|
|
572
|
+
append: "append";
|
|
573
|
+
}>>;
|
|
574
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
575
|
+
type: z.ZodLiteral<"swipe">;
|
|
576
|
+
elementId: z.ZodString;
|
|
577
|
+
direction: z.ZodEnum<{
|
|
578
|
+
UP: "UP";
|
|
579
|
+
DOWN: "DOWN";
|
|
580
|
+
LEFT: "LEFT";
|
|
581
|
+
RIGHT: "RIGHT";
|
|
582
|
+
}>;
|
|
583
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
584
|
+
type: z.ZodLiteral<"scroll">;
|
|
585
|
+
elementId: z.ZodString;
|
|
586
|
+
x: z.ZodNumber;
|
|
587
|
+
y: z.ZodNumber;
|
|
588
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
589
|
+
type: z.ZodLiteral<"keyboard">;
|
|
590
|
+
visible: z.ZodBoolean;
|
|
591
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
592
|
+
type: z.ZodLiteral<"wait">;
|
|
593
|
+
elementId: z.ZodString;
|
|
594
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
595
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
596
|
+
type: z.ZodLiteral<"hook">;
|
|
597
|
+
name: z.ZodString;
|
|
598
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
599
|
+
}, z.core.$strip>], "type">>;
|
|
600
|
+
actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
601
|
+
type: z.ZodLiteral<"navigate">;
|
|
602
|
+
url: z.ZodString;
|
|
603
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
604
|
+
type: z.ZodLiteral<"tap">;
|
|
605
|
+
elementId: z.ZodString;
|
|
606
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
607
|
+
type: z.ZodLiteral<"press">;
|
|
608
|
+
elementId: z.ZodString;
|
|
609
|
+
phase: z.ZodEnum<{
|
|
610
|
+
down: "down";
|
|
611
|
+
up: "up";
|
|
612
|
+
}>;
|
|
613
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
614
|
+
type: z.ZodLiteral<"input">;
|
|
615
|
+
elementId: z.ZodString;
|
|
616
|
+
text: z.ZodString;
|
|
617
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
618
|
+
replace: "replace";
|
|
619
|
+
append: "append";
|
|
620
|
+
}>>;
|
|
621
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
622
|
+
type: z.ZodLiteral<"swipe">;
|
|
623
|
+
elementId: z.ZodString;
|
|
624
|
+
direction: z.ZodEnum<{
|
|
625
|
+
UP: "UP";
|
|
626
|
+
DOWN: "DOWN";
|
|
627
|
+
LEFT: "LEFT";
|
|
628
|
+
RIGHT: "RIGHT";
|
|
629
|
+
}>;
|
|
630
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
631
|
+
type: z.ZodLiteral<"scroll">;
|
|
632
|
+
elementId: z.ZodString;
|
|
633
|
+
x: z.ZodNumber;
|
|
634
|
+
y: z.ZodNumber;
|
|
635
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
636
|
+
type: z.ZodLiteral<"keyboard">;
|
|
637
|
+
visible: z.ZodBoolean;
|
|
638
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
639
|
+
type: z.ZodLiteral<"wait">;
|
|
640
|
+
elementId: z.ZodString;
|
|
641
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
642
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
643
|
+
type: z.ZodLiteral<"hook">;
|
|
644
|
+
name: z.ZodString;
|
|
645
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
646
|
+
}, z.core.$strip>], "type">>;
|
|
647
|
+
}, z.core.$strict>;
|
|
648
|
+
export type ScenarioScript = z.infer<typeof ScenarioScriptSchema>;
|
|
649
|
+
export declare const MatrixCellSchema: z.ZodObject<{
|
|
650
|
+
targetId: z.ZodString;
|
|
651
|
+
scenarioId: z.ZodString;
|
|
652
|
+
orientation: z.ZodEnum<{
|
|
653
|
+
portrait: "portrait";
|
|
654
|
+
landscape: "landscape";
|
|
655
|
+
}>;
|
|
656
|
+
fontScale: z.ZodNumber;
|
|
657
|
+
status: z.ZodEnum<{
|
|
658
|
+
unavailable: "unavailable";
|
|
659
|
+
passed: "passed";
|
|
660
|
+
failed: "failed";
|
|
661
|
+
unsupported: "unsupported";
|
|
662
|
+
}>;
|
|
663
|
+
snapshotId: z.ZodOptional<z.ZodString>;
|
|
664
|
+
message: z.ZodOptional<z.ZodString>;
|
|
665
|
+
}, z.core.$strict>;
|
|
666
|
+
export type MatrixCell = z.infer<typeof MatrixCellSchema>;
|
|
667
|
+
export interface ScenarioPort {
|
|
668
|
+
run(script: ScenarioScript): Promise<void>;
|
|
669
|
+
close(): Promise<void>;
|
|
670
|
+
}
|
|
671
|
+
export interface NativeScenarioOptions {
|
|
672
|
+
readProfile?(): Promise<import('./geometry.js').DeviceProfile>;
|
|
673
|
+
runHook?(name: string, value?: unknown): Promise<void>;
|
|
674
|
+
target: NativeTarget;
|
|
675
|
+
appId: string;
|
|
676
|
+
projectRoot: string;
|
|
677
|
+
adbSerial?: string;
|
|
678
|
+
ssh?: {
|
|
679
|
+
destination: string;
|
|
680
|
+
identityFile?: string;
|
|
681
|
+
};
|
|
682
|
+
maestroPath?: string;
|
|
683
|
+
timeoutMs?: number;
|
|
684
|
+
}
|
|
685
|
+
export interface NativeProfilePort {
|
|
686
|
+
withProfile<T>(profile: import('./graph.js').ProfileOverrides, work: () => Promise<T>): Promise<T>;
|
|
687
|
+
recover(): Promise<void>;
|
|
688
|
+
}
|