chrome-devtools-frontend 1.0.980332 → 1.0.981537
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/front_end/core/common/ParsedURL.ts +37 -4
- package/front_end/core/i18n/locales/en-US.json +3 -0
- package/front_end/core/i18n/locales/en-XL.json +3 -0
- package/front_end/core/platform/DevToolsPath.ts +3 -0
- package/front_end/core/sdk/CSSRule.ts +2 -2
- package/front_end/core/sdk/DOMDebuggerModel.ts +2 -2
- package/front_end/core/sdk/NetworkRequest.ts +1 -1
- package/front_end/core/sdk/SourceMap.ts +14 -5
- package/front_end/core/sdk/Target.ts +2 -2
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +26 -17
- package/front_end/generated/InspectorBackendCommands.js +6 -2
- package/front_end/generated/protocol.ts +16 -0
- package/front_end/legacy_test_runner/bindings_test_runner/BindingsTestRunner.js +5 -0
- package/front_end/models/bindings/BreakpointManager.ts +0 -2
- package/front_end/models/bindings/ContentProviderBasedProject.ts +6 -4
- package/front_end/models/persistence/EditFileSystemView.ts +3 -1
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +14 -9
- package/front_end/models/persistence/IsolatedFileSystem.ts +66 -40
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +4 -3
- package/front_end/models/persistence/NetworkPersistenceManager.ts +6 -5
- package/front_end/models/persistence/PlatformFileSystem.ts +15 -10
- package/front_end/models/timeline_model/TimelineModel.ts +1 -0
- package/front_end/models/workspace/UISourceCode.ts +4 -2
- package/front_end/models/workspace/WorkspaceImpl.ts +9 -5
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/console/ConsoleFormat.ts +23 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -19
- package/front_end/panels/emulation/AdvancedApp.ts +6 -2
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +1 -2
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +25 -19
- package/front_end/panels/sources/NavigatorView.ts +9 -5
- package/front_end/panels/sources/SourcesNavigator.ts +2 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +7 -0
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +963 -886
- package/front_end/third_party/lighthouse/report/bundle.js +3 -2
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/ui/components/buttons/Button.ts +11 -1
- package/front_end/ui/components/buttons/button.css +31 -10
- package/front_end/ui/components/docs/button/basic.ts +47 -1
- package/front_end/ui/legacy/themeColors.css +4 -0
- package/package.json +1 -1
@@ -18,6 +18,7 @@ export const enum Variant {
|
|
18
18
|
PRIMARY = 'primary',
|
19
19
|
SECONDARY = 'secondary',
|
20
20
|
TOOLBAR = 'toolbar',
|
21
|
+
ROUND = 'round',
|
21
22
|
}
|
22
23
|
|
23
24
|
export const enum Size {
|
@@ -40,7 +41,7 @@ interface ButtonState {
|
|
40
41
|
}
|
41
42
|
|
42
43
|
export type ButtonData = {
|
43
|
-
variant: Variant.TOOLBAR,
|
44
|
+
variant: Variant.TOOLBAR|Variant.ROUND,
|
44
45
|
iconUrl: string,
|
45
46
|
size?: Size,
|
46
47
|
disabled?: boolean,
|
@@ -199,10 +200,19 @@ export class Button extends HTMLElement {
|
|
199
200
|
throw new Error('Tooblar button does not accept children');
|
200
201
|
}
|
201
202
|
}
|
203
|
+
if (this.#props.variant === Variant.ROUND) {
|
204
|
+
if (!this.#props.iconUrl) {
|
205
|
+
throw new Error('Round button requires an icon');
|
206
|
+
}
|
207
|
+
if (!this.#isEmpty) {
|
208
|
+
throw new Error('Round button does not accept children');
|
209
|
+
}
|
210
|
+
}
|
202
211
|
const classes = {
|
203
212
|
primary: this.#props.variant === Variant.PRIMARY,
|
204
213
|
secondary: this.#props.variant === Variant.SECONDARY,
|
205
214
|
toolbar: this.#props.variant === Variant.TOOLBAR,
|
215
|
+
round: this.#props.variant === Variant.ROUND,
|
206
216
|
'text-with-icon': Boolean(this.#props.iconUrl) && !this.#isEmpty,
|
207
217
|
'only-icon': Boolean(this.#props.iconUrl) && this.#isEmpty,
|
208
218
|
small: Boolean(this.#props.size === Size.SMALL),
|
@@ -49,7 +49,8 @@ button:focus-visible {
|
|
49
49
|
box-shadow: 0 0 0 2px var(--color-button-outline-focus);
|
50
50
|
}
|
51
51
|
|
52
|
-
button.toolbar
|
52
|
+
button.toolbar,
|
53
|
+
button.round {
|
53
54
|
background: transparent;
|
54
55
|
border-radius: 2px;
|
55
56
|
border: none;
|
@@ -60,11 +61,22 @@ button.toolbar {
|
|
60
61
|
white-space: nowrap;
|
61
62
|
}
|
62
63
|
|
64
|
+
button.round {
|
65
|
+
border-radius: 100%;
|
66
|
+
height: 30px;
|
67
|
+
width: 30px;
|
68
|
+
}
|
69
|
+
|
63
70
|
button.toolbar.small {
|
64
71
|
height: 18px;
|
65
72
|
width: 18px;
|
66
73
|
}
|
67
74
|
|
75
|
+
button.round.small {
|
76
|
+
height: 24px;
|
77
|
+
width: 24px;
|
78
|
+
}
|
79
|
+
|
68
80
|
button.primary {
|
69
81
|
border: 1px solid var(--color-primary);
|
70
82
|
background: var(--color-primary);
|
@@ -123,21 +135,27 @@ button.secondary:active:focus-visible {
|
|
123
135
|
border: 1px solid var(--color-button-secondary-background-pressed);
|
124
136
|
}
|
125
137
|
|
126
|
-
button.toolbar:hover
|
127
|
-
|
138
|
+
button.toolbar:hover,
|
139
|
+
button.round:hover {
|
140
|
+
background-color: var(--color-iconbutton-hover);
|
128
141
|
}
|
129
142
|
|
130
143
|
button.toolbar.active,
|
131
|
-
button.toolbar:active
|
132
|
-
|
144
|
+
button.toolbar:active,
|
145
|
+
button.round.active,
|
146
|
+
button.round:active {
|
147
|
+
background-color: var(--color-iconbutton-pressed);
|
133
148
|
}
|
134
149
|
|
135
|
-
button.toolbar:focus-visible
|
150
|
+
button.toolbar:focus-visible,
|
151
|
+
button.round:focus-visible {
|
136
152
|
background-color: var(--color-background-elevation-2);
|
137
153
|
}
|
138
154
|
|
139
155
|
button.toolbar:disabled,
|
140
|
-
button.toolbar:disabled:hover
|
156
|
+
button.toolbar:disabled:hover,
|
157
|
+
button.round:disabled,
|
158
|
+
button.round:disabled:hover {
|
141
159
|
background: var(--color-background);
|
142
160
|
color: var(--color-text-disabled);
|
143
161
|
cursor: not-allowed;
|
@@ -160,7 +178,8 @@ button devtools-icon {
|
|
160
178
|
height: 19px;
|
161
179
|
}
|
162
180
|
|
163
|
-
button.toolbar devtools-icon
|
181
|
+
button.toolbar devtools-icon,
|
182
|
+
button.round devtools-icon {
|
164
183
|
width: 24px;
|
165
184
|
height: 24px;
|
166
185
|
|
@@ -180,7 +199,8 @@ button.small devtools-icon {
|
|
180
199
|
height: 14px;
|
181
200
|
}
|
182
201
|
|
183
|
-
button.toolbar.small devtools-icon
|
202
|
+
button.toolbar.small devtools-icon,
|
203
|
+
button.round.small devtools-icon {
|
184
204
|
width: 18px;
|
185
205
|
height: 18px;
|
186
206
|
}
|
@@ -194,7 +214,8 @@ button.toolbar:hover devtools-icon {
|
|
194
214
|
--icon-color: var(--color-text-primary);
|
195
215
|
}
|
196
216
|
|
197
|
-
button.toolbar:disabled devtools-icon
|
217
|
+
button.toolbar:disabled devtools-icon,
|
218
|
+
button.round:disabled devtools-icon {
|
198
219
|
--icon-color: var(--color-text-disabled);
|
199
220
|
}
|
200
221
|
|
@@ -190,7 +190,7 @@ disabledPrimaryIconButton.data = {
|
|
190
190
|
disabledPrimaryIconButton.onclick = () => alert('clicked');
|
191
191
|
appendButton(disabledPrimaryIconButton);
|
192
192
|
|
193
|
-
// Disabled Secondary Icon Only
|
193
|
+
// Small Disabled Secondary Icon Only
|
194
194
|
const disabledSecondaryIconOnlyButton = new Buttons.Button.Button();
|
195
195
|
disabledSecondaryIconOnlyButton.onclick = () => alert('clicked');
|
196
196
|
disabledSecondaryIconOnlyButton.style.width = '18px';
|
@@ -202,6 +202,50 @@ disabledSecondaryIconOnlyButton.data = {
|
|
202
202
|
};
|
203
203
|
appendButton(disabledSecondaryIconOnlyButton);
|
204
204
|
|
205
|
+
// Round Button
|
206
|
+
const roundButton = new Buttons.Button.Button();
|
207
|
+
roundButton.data = {
|
208
|
+
variant: Buttons.Button.Variant.ROUND,
|
209
|
+
iconUrl: testIcon,
|
210
|
+
};
|
211
|
+
roundButton.title = 'Round Button';
|
212
|
+
roundButton.onclick = () => alert('clicked');
|
213
|
+
appendButton(roundButton);
|
214
|
+
|
215
|
+
// Disabled Round Button
|
216
|
+
const roundButtonDisabled = new Buttons.Button.Button();
|
217
|
+
roundButtonDisabled.data = {
|
218
|
+
variant: Buttons.Button.Variant.ROUND,
|
219
|
+
iconUrl: testIcon,
|
220
|
+
disabled: true,
|
221
|
+
};
|
222
|
+
roundButtonDisabled.title = 'Disabled Round Button';
|
223
|
+
roundButtonDisabled.onclick = () => alert('clicked');
|
224
|
+
appendButton(roundButtonDisabled);
|
225
|
+
|
226
|
+
// Small Round Button
|
227
|
+
const smallRoundButton = new Buttons.Button.Button();
|
228
|
+
smallRoundButton.data = {
|
229
|
+
variant: Buttons.Button.Variant.ROUND,
|
230
|
+
iconUrl: testIcon,
|
231
|
+
size: Buttons.Button.Size.SMALL,
|
232
|
+
};
|
233
|
+
smallRoundButton.title = 'Small Round Button';
|
234
|
+
smallRoundButton.onclick = () => alert('clicked');
|
235
|
+
appendButton(smallRoundButton);
|
236
|
+
|
237
|
+
// Small Disabled Round Button
|
238
|
+
const smallRoundButtonDisabled = new Buttons.Button.Button();
|
239
|
+
smallRoundButtonDisabled.data = {
|
240
|
+
variant: Buttons.Button.Variant.ROUND,
|
241
|
+
iconUrl: testIcon,
|
242
|
+
disabled: true,
|
243
|
+
size: Buttons.Button.Size.SMALL,
|
244
|
+
};
|
245
|
+
smallRoundButtonDisabled.title = 'Small Disabled Round Button';
|
246
|
+
smallRoundButtonDisabled.onclick = () => alert('clicked');
|
247
|
+
appendButton(smallRoundButtonDisabled);
|
248
|
+
|
205
249
|
for (let i = 0; i < 6; i++) {
|
206
250
|
// Regular Toolbar Button
|
207
251
|
const toolbarButton = new Buttons.Button.Button();
|
@@ -245,6 +289,7 @@ for (let i = 0; i < 6; i++) {
|
|
245
289
|
}
|
246
290
|
}
|
247
291
|
|
292
|
+
// Submit Button
|
248
293
|
const submitButton = new Buttons.Button.Button();
|
249
294
|
submitButton.data = {
|
250
295
|
variant: Buttons.Button.Variant.PRIMARY,
|
@@ -253,6 +298,7 @@ submitButton.data = {
|
|
253
298
|
submitButton.innerText = 'Submit';
|
254
299
|
document.querySelector('#form')?.append(submitButton);
|
255
300
|
|
301
|
+
// Reset Button
|
256
302
|
const resetButton = new Buttons.Button.Button();
|
257
303
|
resetButton.data = {
|
258
304
|
variant: Buttons.Button.Variant.SECONDARY,
|
@@ -127,6 +127,8 @@
|
|
127
127
|
--color-button-secondary-background-hovering: rgb(26 115 232 / 10%);
|
128
128
|
--color-button-secondary-background-pressed: rgb(26 92 178 / 25%);
|
129
129
|
--color-button-secondary-border: rgb(218 220 224);
|
130
|
+
--color-iconbutton-hover: rgb(0 0 0 / 10%);
|
131
|
+
--color-iconbutton-pressed: rgb(0 0 0 / 15%);
|
130
132
|
|
131
133
|
/* Colors for file icons */
|
132
134
|
--color-ic-file-document: rgb(39 116 240);
|
@@ -273,6 +275,8 @@
|
|
273
275
|
--color-button-secondary-background-hovering: rgb(138 180 248 / 15%);
|
274
276
|
--color-button-secondary-background-pressed: rgb(138 180 248 / 23%);
|
275
277
|
--color-button-secondary-border: rgb(60 61 65);
|
278
|
+
--color-iconbutton-hover: rgb(255 255 255 / 12%);
|
279
|
+
--color-iconbutton-pressed: rgb(255 255 255 / 20%);
|
276
280
|
|
277
281
|
/* Colors for file icons */
|
278
282
|
--color-ic-file-document: rgb(39 116 240);
|
package/package.json
CHANGED