@chromatic-com/playwright 0.12.0 → 0.12.1-aa792aa-20250325153437
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,265 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
interface SymbolConstructor {
|
|
3
|
-
readonly observable: symbol;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
interface SBBaseType {
|
|
8
|
-
required?: boolean;
|
|
9
|
-
raw?: string;
|
|
10
|
-
}
|
|
11
|
-
type SBScalarType = SBBaseType & {
|
|
12
|
-
name: 'boolean' | 'string' | 'number' | 'function' | 'symbol';
|
|
13
|
-
};
|
|
14
|
-
type SBArrayType = SBBaseType & {
|
|
15
|
-
name: 'array';
|
|
16
|
-
value: SBType;
|
|
17
|
-
};
|
|
18
|
-
type SBObjectType = SBBaseType & {
|
|
19
|
-
name: 'object';
|
|
20
|
-
value: Record<string, SBType>;
|
|
21
|
-
};
|
|
22
|
-
type SBEnumType = SBBaseType & {
|
|
23
|
-
name: 'enum';
|
|
24
|
-
value: (string | number)[];
|
|
25
|
-
};
|
|
26
|
-
type SBIntersectionType = SBBaseType & {
|
|
27
|
-
name: 'intersection';
|
|
28
|
-
value: SBType[];
|
|
29
|
-
};
|
|
30
|
-
type SBUnionType = SBBaseType & {
|
|
31
|
-
name: 'union';
|
|
32
|
-
value: SBType[];
|
|
33
|
-
};
|
|
34
|
-
type SBOtherType = SBBaseType & {
|
|
35
|
-
name: 'other';
|
|
36
|
-
value: string;
|
|
37
|
-
};
|
|
38
|
-
type SBType = SBScalarType | SBEnumType | SBArrayType | SBObjectType | SBIntersectionType | SBUnionType | SBOtherType;
|
|
39
|
-
|
|
40
|
-
type StoryId = string;
|
|
41
|
-
type ComponentId = string;
|
|
42
|
-
type ComponentTitle = string;
|
|
43
|
-
type StoryName = string;
|
|
44
|
-
type Tag$1 = string;
|
|
45
|
-
interface StoryIdentifier {
|
|
46
|
-
componentId: ComponentId;
|
|
47
|
-
title: ComponentTitle;
|
|
48
|
-
/** @deprecated */
|
|
49
|
-
kind: ComponentTitle;
|
|
50
|
-
id: StoryId;
|
|
51
|
-
name: StoryName;
|
|
52
|
-
/** @deprecated */
|
|
53
|
-
story: StoryName;
|
|
54
|
-
tags: Tag$1[];
|
|
55
|
-
}
|
|
56
|
-
interface Parameters {
|
|
57
|
-
[name: string]: any;
|
|
58
|
-
}
|
|
59
|
-
type ControlType = 'object' | 'boolean' | 'check' | 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select' | 'number' | 'range' | 'file' | 'color' | 'date' | 'text';
|
|
60
|
-
type ConditionalTest = {
|
|
61
|
-
truthy?: boolean;
|
|
62
|
-
} | {
|
|
63
|
-
exists: boolean;
|
|
64
|
-
} | {
|
|
65
|
-
eq: any;
|
|
66
|
-
} | {
|
|
67
|
-
neq: any;
|
|
68
|
-
};
|
|
69
|
-
type ConditionalValue = {
|
|
70
|
-
arg: string;
|
|
71
|
-
} | {
|
|
72
|
-
global: string;
|
|
73
|
-
};
|
|
74
|
-
type Conditional = ConditionalValue & ConditionalTest;
|
|
75
|
-
interface ControlBase {
|
|
76
|
-
[key: string]: any;
|
|
77
|
-
/**
|
|
78
|
-
* @see https://storybook.js.org/docs/api/arg-types#controltype
|
|
79
|
-
*/
|
|
80
|
-
type?: ControlType;
|
|
81
|
-
disable?: boolean;
|
|
82
|
-
}
|
|
83
|
-
type Control = ControlType | false | (ControlBase & (ControlBase | {
|
|
84
|
-
type: 'color';
|
|
85
|
-
/**
|
|
86
|
-
* @see https://storybook.js.org/docs/api/arg-types#controlpresetcolors
|
|
87
|
-
*/
|
|
88
|
-
presetColors?: string[];
|
|
89
|
-
} | {
|
|
90
|
-
type: 'file';
|
|
91
|
-
/**
|
|
92
|
-
* @see https://storybook.js.org/docs/api/arg-types#controlaccept
|
|
93
|
-
*/
|
|
94
|
-
accept?: string;
|
|
95
|
-
} | {
|
|
96
|
-
type: 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select';
|
|
97
|
-
/**
|
|
98
|
-
* @see https://storybook.js.org/docs/api/arg-types#controllabels
|
|
99
|
-
*/
|
|
100
|
-
labels?: {
|
|
101
|
-
[options: string]: string;
|
|
102
|
-
};
|
|
103
|
-
} | {
|
|
104
|
-
type: 'number' | 'range';
|
|
105
|
-
/**
|
|
106
|
-
* @see https://storybook.js.org/docs/api/arg-types#controlmax
|
|
107
|
-
*/
|
|
108
|
-
max?: number;
|
|
109
|
-
/**
|
|
110
|
-
* @see https://storybook.js.org/docs/api/arg-types#controlmin
|
|
111
|
-
*/
|
|
112
|
-
min?: number;
|
|
113
|
-
/**
|
|
114
|
-
* @see https://storybook.js.org/docs/api/arg-types#controlstep
|
|
115
|
-
*/
|
|
116
|
-
step?: number;
|
|
117
|
-
}));
|
|
118
|
-
interface InputType {
|
|
119
|
-
/**
|
|
120
|
-
* @see https://storybook.js.org/docs/api/arg-types#control
|
|
121
|
-
*/
|
|
122
|
-
control?: Control;
|
|
123
|
-
/**
|
|
124
|
-
* @see https://storybook.js.org/docs/api/arg-types#description
|
|
125
|
-
*/
|
|
126
|
-
description?: string;
|
|
127
|
-
/**
|
|
128
|
-
* @see https://storybook.js.org/docs/api/arg-types#if
|
|
129
|
-
*/
|
|
130
|
-
if?: Conditional;
|
|
131
|
-
/**
|
|
132
|
-
* @see https://storybook.js.org/docs/api/arg-types#mapping
|
|
133
|
-
*/
|
|
134
|
-
mapping?: {
|
|
135
|
-
[key: string]: any;
|
|
136
|
-
};
|
|
137
|
-
/**
|
|
138
|
-
* @see https://storybook.js.org/docs/api/arg-types#name
|
|
139
|
-
*/
|
|
140
|
-
name?: string;
|
|
141
|
-
/**
|
|
142
|
-
* @see https://storybook.js.org/docs/api/arg-types#options
|
|
143
|
-
*/
|
|
144
|
-
options?: readonly any[];
|
|
145
|
-
/**
|
|
146
|
-
* @see https://storybook.js.org/docs/api/arg-types#table
|
|
147
|
-
*/
|
|
148
|
-
table?: {
|
|
149
|
-
[key: string]: unknown;
|
|
150
|
-
/**
|
|
151
|
-
* @see https://storybook.js.org/docs/api/arg-types#tablecategory
|
|
152
|
-
*/
|
|
153
|
-
category?: string;
|
|
154
|
-
/**
|
|
155
|
-
* @see https://storybook.js.org/docs/api/arg-types#tabledefaultvalue
|
|
156
|
-
*/
|
|
157
|
-
defaultValue?: {
|
|
158
|
-
summary?: string;
|
|
159
|
-
detail?: string;
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* @see https://storybook.js.org/docs/api/arg-types#tabledisable
|
|
163
|
-
*/
|
|
164
|
-
disable?: boolean;
|
|
165
|
-
/**
|
|
166
|
-
* @see https://storybook.js.org/docs/api/arg-types#tablesubcategory
|
|
167
|
-
*/
|
|
168
|
-
subcategory?: string;
|
|
169
|
-
/**
|
|
170
|
-
* @see https://storybook.js.org/docs/api/arg-types#tabletype
|
|
171
|
-
*/
|
|
172
|
-
type?: {
|
|
173
|
-
summary?: string;
|
|
174
|
-
detail?: string;
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
/**
|
|
178
|
-
* @see https://storybook.js.org/docs/api/arg-types#type
|
|
179
|
-
*/
|
|
180
|
-
type?: SBType | SBScalarType['name'];
|
|
181
|
-
/**
|
|
182
|
-
* @see https://storybook.js.org/docs/api/arg-types#defaultvalue
|
|
183
|
-
*
|
|
184
|
-
* @deprecated Use `table.defaultValue.summary` instead.
|
|
185
|
-
*/
|
|
186
|
-
defaultValue?: any;
|
|
187
|
-
[key: string]: any;
|
|
188
|
-
}
|
|
189
|
-
interface StrictInputType extends InputType {
|
|
190
|
-
name: string;
|
|
191
|
-
type?: SBType;
|
|
192
|
-
}
|
|
193
|
-
interface Args {
|
|
194
|
-
[name: string]: any;
|
|
195
|
-
}
|
|
196
|
-
type StrictArgTypes<TArgs = Args> = {
|
|
197
|
-
[name in keyof TArgs]: StrictInputType;
|
|
198
|
-
};
|
|
199
|
-
interface Globals {
|
|
200
|
-
[name: string]: any;
|
|
201
|
-
}
|
|
202
|
-
type Renderer = {
|
|
203
|
-
/** What is the type of the `component` annotation in this renderer? */
|
|
204
|
-
component: unknown;
|
|
205
|
-
/** What does the story function return in this renderer? */
|
|
206
|
-
storyResult: unknown;
|
|
207
|
-
/** What type of element does this renderer render to? */
|
|
208
|
-
canvasElement: unknown;
|
|
209
|
-
T?: unknown;
|
|
210
|
-
};
|
|
211
|
-
interface StoryContextForEnhancers<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryIdentifier {
|
|
212
|
-
component?: (TRenderer & {
|
|
213
|
-
T: any;
|
|
214
|
-
})['component'];
|
|
215
|
-
subcomponents?: Record<string, (TRenderer & {
|
|
216
|
-
T: any;
|
|
217
|
-
})['component']>;
|
|
218
|
-
parameters: Parameters;
|
|
219
|
-
initialArgs: TArgs;
|
|
220
|
-
argTypes: StrictArgTypes<TArgs>;
|
|
221
|
-
}
|
|
222
|
-
interface StoryContextUpdate<TArgs = Args> {
|
|
223
|
-
args?: TArgs;
|
|
224
|
-
globals?: Globals;
|
|
225
|
-
[key: string]: any;
|
|
226
|
-
}
|
|
227
|
-
type ViewMode$1 = 'story' | 'docs';
|
|
228
|
-
interface StoryContextForLoaders<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryContextForEnhancers<TRenderer, TArgs>, Required<StoryContextUpdate<TArgs>> {
|
|
229
|
-
hooks: unknown;
|
|
230
|
-
viewMode: ViewMode$1;
|
|
231
|
-
originalStoryFn: StoryFn<TRenderer>;
|
|
232
|
-
}
|
|
233
|
-
interface StoryContext<TRenderer extends Renderer = Renderer, TArgs = Args> extends StoryContextForLoaders<TRenderer, TArgs> {
|
|
234
|
-
loaded: Record<string, any>;
|
|
235
|
-
abortSignal: AbortSignal;
|
|
236
|
-
canvasElement: TRenderer['canvasElement'];
|
|
237
|
-
}
|
|
238
|
-
type PartialStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (update?: StoryContextUpdate<Partial<TArgs>>) => TRenderer['storyResult'];
|
|
239
|
-
type LegacyStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (context: StoryContext<TRenderer, TArgs>) => TRenderer['storyResult'];
|
|
240
|
-
type ArgsStoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = (args: TArgs, context: StoryContext<TRenderer, TArgs>) => (TRenderer & {
|
|
241
|
-
T: TArgs;
|
|
242
|
-
})['storyResult'];
|
|
243
|
-
type StoryFn<TRenderer extends Renderer = Renderer, TArgs = Args> = LegacyStoryFn<TRenderer, TArgs> | ArgsStoryFn<TRenderer, TArgs>;
|
|
244
|
-
|
|
245
|
-
interface WebRenderer extends Renderer {
|
|
246
|
-
canvasElement: HTMLElement;
|
|
247
|
-
}
|
|
248
|
-
type MaybePromise<T> = Promise<T> | T;
|
|
249
|
-
type TeardownRenderToCanvas = () => MaybePromise<void>;
|
|
250
|
-
type RenderToCanvas<TRenderer extends Renderer> = (context: RenderContext<TRenderer>, element: TRenderer['canvasElement']) => MaybePromise<void | TeardownRenderToCanvas>;
|
|
251
|
-
declare type RenderContext<TRenderer extends Renderer = Renderer> = StoryIdentifier & {
|
|
252
|
-
showMain: () => void;
|
|
253
|
-
showError: (error: {
|
|
254
|
-
title: string;
|
|
255
|
-
description: string;
|
|
256
|
-
}) => void;
|
|
257
|
-
showException: (err: Error) => void;
|
|
258
|
-
forceRemount: boolean;
|
|
259
|
-
storyContext: StoryContext<TRenderer>;
|
|
260
|
-
storyFn: PartialStoryFn<TRenderer>;
|
|
261
|
-
unboundStoryFn: LegacyStoryFn<TRenderer>;
|
|
262
|
-
};
|
|
1
|
+
import { WebRenderer, RenderToCanvas } from 'storybook/internal/types';
|
|
263
2
|
|
|
264
3
|
interface RRWebFramework extends WebRenderer {
|
|
265
4
|
component: undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chromatic-com/playwright",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1-aa792aa-20250325153437",
|
|
4
4
|
"description": "Chromatic Visual Regression Testing for Playwright",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@chromatic-com/shared-e2e": "workspace:*",
|
|
51
51
|
"@playwright/test": "^1.46.1",
|
|
52
|
-
"@storybook/types": "
|
|
52
|
+
"@storybook/types": "8.6.9",
|
|
53
53
|
"express": "^4.18.2",
|
|
54
54
|
"playwright": "^1.46.1",
|
|
55
55
|
"playwright-core": "^1.46.1"
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@chromaui/rrweb-snapshot": "2.0.0-alpha.17-noAbsolute",
|
|
65
65
|
"@segment/analytics-node": "^1.1.0",
|
|
66
|
-
"@storybook/addon-essentials": "
|
|
66
|
+
"@storybook/addon-essentials": "8.6.9",
|
|
67
67
|
"@storybook/csf": "^0.1.0",
|
|
68
|
-
"@storybook/manager-api": "
|
|
69
|
-
"@storybook/server-webpack5": "
|
|
70
|
-
"storybook": "
|
|
68
|
+
"@storybook/manager-api": "8.6.9",
|
|
69
|
+
"@storybook/server-webpack5": "8.6.9",
|
|
70
|
+
"storybook": "8.6.9",
|
|
71
71
|
"ts-dedent": "^2.2.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|