@percy/core 1.31.7-beta.0 → 1.31.8-beta.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/package.json +8 -8
- package/types/index.d.ts +57 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/core",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.8-beta.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"test:types": "tsd"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@percy/client": "1.31.
|
|
47
|
-
"@percy/config": "1.31.
|
|
48
|
-
"@percy/dom": "1.31.
|
|
49
|
-
"@percy/logger": "1.31.
|
|
50
|
-
"@percy/monitoring": "1.31.
|
|
51
|
-
"@percy/webdriver-utils": "1.31.
|
|
46
|
+
"@percy/client": "1.31.8-beta.0",
|
|
47
|
+
"@percy/config": "1.31.8-beta.0",
|
|
48
|
+
"@percy/dom": "1.31.8-beta.0",
|
|
49
|
+
"@percy/logger": "1.31.8-beta.0",
|
|
50
|
+
"@percy/monitoring": "1.31.8-beta.0",
|
|
51
|
+
"@percy/webdriver-utils": "1.31.8-beta.0",
|
|
52
52
|
"content-disposition": "^0.5.4",
|
|
53
53
|
"cross-spawn": "^7.0.3",
|
|
54
54
|
"extract-zip": "^2.0.1",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"ws": "^8.17.1",
|
|
62
62
|
"yaml": "^2.4.1"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "94b2706fbb6576924d22836e5d10b66c3d18de99"
|
|
65
65
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -59,9 +59,66 @@ interface CommonSnapshotOptions {
|
|
|
59
59
|
scopeOptions?: ScopeOptions;
|
|
60
60
|
browsers?: string[];
|
|
61
61
|
}
|
|
62
|
+
// Region support for TypeScript
|
|
63
|
+
interface BoundingBox {
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
width: number;
|
|
67
|
+
height: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface Padding {
|
|
71
|
+
top?: number;
|
|
72
|
+
left?: number;
|
|
73
|
+
right?: number;
|
|
74
|
+
bottom?: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface ElementSelector {
|
|
78
|
+
boundingBox?: BoundingBox;
|
|
79
|
+
elementXpath?: string;
|
|
80
|
+
elementCSS?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
interface RegionConfiguration {
|
|
84
|
+
diffSensitivity?: number;
|
|
85
|
+
imageIgnoreThreshold?: number;
|
|
86
|
+
carouselsEnabled?: boolean;
|
|
87
|
+
bannersEnabled?: boolean;
|
|
88
|
+
adsEnabled?: boolean;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface RegionAssertion {
|
|
92
|
+
diffIgnoreThreshold?: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface Region {
|
|
96
|
+
algorithm: string;
|
|
97
|
+
elementSelector: ElementSelector;
|
|
98
|
+
padding?: Padding;
|
|
99
|
+
configuration?: RegionConfiguration;
|
|
100
|
+
assertion?: RegionAssertion;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface CreateRegionOptions {
|
|
104
|
+
boundingBox?: BoundingBox;
|
|
105
|
+
elementXpath?: string;
|
|
106
|
+
elementCSS?: string;
|
|
107
|
+
padding?: Padding;
|
|
108
|
+
algorithm?: string;
|
|
109
|
+
diffSensitivity?: number;
|
|
110
|
+
imageIgnoreThreshold?: number;
|
|
111
|
+
carouselsEnabled?: boolean;
|
|
112
|
+
bannersEnabled?: boolean;
|
|
113
|
+
adsEnabled?: boolean;
|
|
114
|
+
diffIgnoreThreshold?: number;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function createRegion(options: CreateRegionOptions): Region;
|
|
62
118
|
|
|
63
119
|
export interface SnapshotOptions extends CommonSnapshotOptions {
|
|
64
120
|
discovery?: DiscoveryOptions;
|
|
121
|
+
regions?: Region[];
|
|
65
122
|
}
|
|
66
123
|
|
|
67
124
|
type ClientEnvInfo = {
|