You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**colorScheme** (enum: "dark", "light", "auto") _(optional)_: [`Emulate`](#emulate) the dark or the light mode. Set to "auto" to reset to the default.
225
-
-**cpuThrottlingRate** (number) _(optional)_: Represents the CPU slowdown factor. Set the rate to 1 to disable throttling. If omitted, throttling remains unchanged.
226
-
-**geolocation** (unknown) _(optional)_: Geolocation to [`emulate`](#emulate). Set to null to clear the geolocation override.
227
-
-**networkConditions** (enum: "No emulation", "Offline", "Slow 3G", "Fast 3G", "Slow 4G", "Fast 4G") _(optional)_: Throttle network. Set to "No emulation" to disable. If omitted, conditions remain unchanged.
228
-
-**userAgent** (unknown) _(optional)_: User agent to [`emulate`](#emulate). Set to null to clear the user agent override.
229
-
-**viewport** (unknown) _(optional)_: Viewport to [`emulate`](#emulate). Set to null to reset to the default viewport.
225
+
-**cpuThrottlingRate** (number) _(optional)_: Represents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling
226
+
-**geolocation** (string) _(optional)_: Geolocation (`<latitude>x<longitude>`) to [`emulate`](#emulate). Latitude between -90 and 90. Longitude between -180 and 180. Omit clear the geolocation override.
-**userAgent** (string) _(optional)_: User agent to [`emulate`](#emulate). Set to empty string to clear the user agent override.
229
+
-**viewport** (string) _(optional)_: [`Emulate`](#emulate) device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to [`emulate`](#emulate) mobile devices. 'landscape' to [`emulate`](#emulate) landscape mode.
`Throttle network. Set to "No emulation" to disable. If omitted, conditions remain unchanged.`,
32
-
),
33
+
.describe(`Throttle network. Omit to disable throttling.`),
33
34
cpuThrottlingRate: zod
34
35
.number()
35
36
.min(1)
36
37
.max(20)
37
38
.optional()
38
39
.describe(
39
-
'Represents the CPU slowdown factor. Set the rate to 1 to disable throttling. If omitted, throttling remains unchanged.',
40
+
'Represents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling',
40
41
),
41
42
geolocation: zod
42
-
.object({
43
-
latitude: zod
44
-
.number()
45
-
.min(-90)
46
-
.max(90)
47
-
.describe('Latitude between -90 and 90.'),
48
-
longitude: zod
49
-
.number()
50
-
.min(-180)
51
-
.max(180)
52
-
.describe('Longitude between -180 and 180.'),
53
-
})
54
-
.nullable()
43
+
.string()
55
44
.optional()
45
+
.transform(geolocationTransform)
56
46
.describe(
57
-
'Geolocation to emulate. Set to null to clear the geolocation override.',
47
+
'Geolocation (`<latitude>x<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit clear the geolocation override.',
58
48
),
59
49
userAgent: zod
60
50
.string()
61
-
.nullable()
62
51
.optional()
63
52
.describe(
64
-
'User agent to emulate. Set to null to clear the user agent override.',
53
+
'User agent to emulate. Set to empty string to clear the user agent override.',
'Emulate the dark or the light mode. Set to "auto" to reset to the default.',
71
60
),
72
61
viewport: zod
73
-
.object({
74
-
width: zod.number().int().min(0).describe('Page width in pixels.'),
75
-
height: zod.number().int().min(0).describe('Page height in pixels.'),
76
-
deviceScaleFactor: zod
77
-
.number()
78
-
.min(0)
79
-
.optional()
80
-
.describe('Specify device scale factor (can be thought of as dpr).'),
81
-
isMobile: zod
82
-
.boolean()
83
-
.optional()
84
-
.describe(
85
-
'Whether the meta viewport tag is taken into account. Defaults to false.',
86
-
),
87
-
hasTouch: zod
88
-
.boolean()
89
-
.optional()
90
-
.describe(
91
-
'Specifies if viewport supports touch events. This should be set to true for mobile devices.',
92
-
),
93
-
isLandscape: zod
94
-
.boolean()
95
-
.optional()
96
-
.describe(
97
-
'Specifies if viewport is in landscape mode. Defaults to false.',
98
-
),
99
-
})
100
-
.nullable()
62
+
.string()
101
63
.optional()
64
+
.transform(viewportTransform)
102
65
.describe(
103
-
'Viewport to emulate. Set to null to reset to the default viewport.',
66
+
`Emulate device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode.`,
0 commit comments