chrome-devtools-frontend 1.0.1597624 → 1.0.1598808
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/docs/ui_engineering.md +6 -6
- package/front_end/core/host/AidaClient.ts +2 -0
- package/front_end/models/ai_assistance/AiConversation.ts +16 -14
- package/front_end/models/ai_assistance/agents/AiAgent.ts +14 -4
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +109 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +30 -1
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +6 -9
- package/front_end/panels/ai_assistance/PatchWidget.ts +1 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +53 -29
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -1
- package/front_end/panels/application/AppManifestView.ts +2 -2
- package/front_end/panels/application/CookieItemsView.ts +9 -15
- package/front_end/panels/application/DeviceBoundSessionsView.ts +3 -5
- package/front_end/panels/application/FrameDetailsView.ts +2 -2
- package/front_end/panels/application/ReportingApiView.ts +2 -2
- package/front_end/panels/application/preloading/PreloadingView.ts +18 -3
- package/front_end/panels/changes/ChangesView.ts +7 -11
- package/front_end/panels/coverage/CoverageView.ts +4 -4
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +3 -3
- package/front_end/panels/elements/ElementsTreeOutline.ts +34 -8
- package/front_end/panels/elements/StylePropertiesSection.ts +129 -1
- package/front_end/panels/elements/StylePropertyHighlighter.ts +3 -0
- package/front_end/panels/elements/stylesSidebarPane.css +34 -0
- package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +3 -5
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +2 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +4 -4
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +4 -4
- package/front_end/panels/network/RequestResponseView.ts +2 -2
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -3
- package/front_end/panels/recorder/components/StepView.ts +2 -1
- package/front_end/panels/search/SearchView.ts +2 -2
- package/front_end/panels/timeline/TimelineDetailsView.ts +8 -6
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +2 -7
- package/front_end/panels/timeline/components/insights/CharacterSet.ts +2 -6
- package/front_end/panels/timeline/components/insights/EventRef.ts +2 -2
- package/front_end/panels/webauthn/WebauthnPane.ts +2 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Realm.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js +13 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/mitt/mitt.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/parsel-js/parsel-js.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/rxjs/rxjs.js +446 -446
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +166 -167
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js +12 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt/mitt.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js/parsel-js.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs/rxjs.js +97 -97
- package/front_end/third_party/puppeteer/package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/bidi/util.ts +17 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/legacy/Widget.ts +42 -6
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ import {ExposableFunction} from './ExposedFunction.js';
|
|
|
36
36
|
import type {BidiFrame} from './Frame.js';
|
|
37
37
|
import {BidiJSHandle} from './JSHandle.js';
|
|
38
38
|
import {BidiSerializer} from './Serializer.js';
|
|
39
|
-
import {createEvaluationError} from './util.js';
|
|
39
|
+
import {createEvaluationError, rewriteEvaluationError} from './util.js';
|
|
40
40
|
import type {BidiWebWorker} from './WebWorker.js';
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -181,7 +181,7 @@ export abstract class BidiRealm extends Realm {
|
|
|
181
181
|
);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
const result = await responsePromise;
|
|
184
|
+
const result = await responsePromise.catch(rewriteEvaluationError);
|
|
185
185
|
|
|
186
186
|
if ('type' in result && result.type === 'exception') {
|
|
187
187
|
throw createEvaluationError(result.exceptionDetails);
|
|
@@ -82,3 +82,20 @@ export function rewriteNavigationError(
|
|
|
82
82
|
throw error;
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
export function rewriteEvaluationError(error: unknown): never {
|
|
90
|
+
if (error instanceof Error) {
|
|
91
|
+
if (
|
|
92
|
+
error.message.includes('ExecutionContext was destroyed') ||
|
|
93
|
+
error.message.includes('Inspected target navigated or closed')
|
|
94
|
+
) {
|
|
95
|
+
throw new Error(
|
|
96
|
+
'Execution context was destroyed, most likely because of a navigation.',
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
throw error;
|
|
101
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
10
|
export const PUPPETEER_REVISIONS = Object.freeze({
|
|
11
|
-
chrome: '146.0.7680.
|
|
12
|
-
'chrome-headless-shell': '146.0.7680.
|
|
13
|
-
firefox: 'stable_148.0',
|
|
11
|
+
chrome: '146.0.7680.76',
|
|
12
|
+
'chrome-headless-shell': '146.0.7680.76',
|
|
13
|
+
firefox: 'stable_148.0.2',
|
|
14
14
|
});
|
|
@@ -101,6 +101,7 @@ function enqueueWidgetUpdate(widget: Widget): Promise<void> {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
function cancelUpdate(widget: Widget): void {
|
|
104
|
+
widget.cancelUpdateController();
|
|
104
105
|
if (currentUpdateQueue) {
|
|
105
106
|
const scheduledUpdate = currentUpdateQueue.get(widget);
|
|
106
107
|
if (scheduledUpdate) {
|
|
@@ -124,8 +125,13 @@ function runNextUpdate(): void {
|
|
|
124
125
|
for (const [widget, {resolve}] of currentUpdateQueue) {
|
|
125
126
|
currentlyProcessed.add(widget);
|
|
126
127
|
void (async () => {
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
try {
|
|
129
|
+
const controller = new AbortController();
|
|
130
|
+
widget.addUpdateController(controller);
|
|
131
|
+
await widget.performUpdate(controller.signal);
|
|
132
|
+
} finally {
|
|
133
|
+
resolve();
|
|
134
|
+
}
|
|
129
135
|
})();
|
|
130
136
|
}
|
|
131
137
|
currentUpdateQueue.clear();
|
|
@@ -266,16 +272,34 @@ export class WidgetElement<WidgetT extends Widget> extends HTMLElement {
|
|
|
266
272
|
customElements.define('devtools-widget', WidgetElement);
|
|
267
273
|
|
|
268
274
|
export class WidgetDirective extends Lit.Directive.Directive {
|
|
275
|
+
#partType: Lit.Directive.PartType;
|
|
276
|
+
|
|
269
277
|
constructor(partInfo: Lit.Directive.PartInfo) {
|
|
270
278
|
super(partInfo);
|
|
271
|
-
|
|
272
|
-
|
|
279
|
+
this.#partType = partInfo.type;
|
|
280
|
+
if (this.#partType !== Lit.Directive.PartType.CHILD && this.#partType !== Lit.Directive.PartType.ELEMENT) {
|
|
281
|
+
throw new Error('Widget directive must be used as a child or element directive.');
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
override update(part: Lit.Directive.Part, [widgetClass, widgetParams]: Parameters<this['render']>): unknown {
|
|
286
|
+
if (this.#partType === Lit.Directive.PartType.ELEMENT) {
|
|
287
|
+
const element = (part as Lit.Directive.ElementPart).element;
|
|
288
|
+
if (!(element instanceof WidgetElement)) {
|
|
289
|
+
throw new Error('Widget directive must be used on a devtools-widget element.');
|
|
290
|
+
}
|
|
291
|
+
element.widgetConfig = widgetConfig(widgetClass, widgetParams);
|
|
292
|
+
return Lit.nothing;
|
|
273
293
|
}
|
|
294
|
+
return this.render(widgetClass, widgetParams);
|
|
274
295
|
}
|
|
275
296
|
|
|
276
297
|
render<F extends WidgetFactory<Widget>, ParamKeys extends keyof InferWidgetTFromFactory<F>>(
|
|
277
298
|
widgetClass: F,
|
|
278
299
|
widgetParams?: Pick<InferWidgetTFromFactory<F>, ParamKeys>&Partial<InferWidgetTFromFactory<F>>): unknown {
|
|
300
|
+
if (this.#partType === Lit.Directive.PartType.ELEMENT) {
|
|
301
|
+
return Lit.nothing;
|
|
302
|
+
}
|
|
279
303
|
// We use `repeat` to force Lit to recreate the `<devtools-widget>` DOM node when the `widgetClass` changes.
|
|
280
304
|
// If we didn't use `repeat` and used `html` directly, Lit would reuse the same `<devtools-widget>` instance
|
|
281
305
|
// even if `widgetClass` changed (for example, in a ternary operator `condition ? widget(A) : widget(B)`).
|
|
@@ -284,7 +308,7 @@ export class WidgetDirective extends Lit.Directive.Directive {
|
|
|
284
308
|
return Lit.Directives.repeat(
|
|
285
309
|
[widgetClass], () => widgetClass,
|
|
286
310
|
() => html`<devtools-widget .widgetConfig=${
|
|
287
|
-
widgetConfig(widgetClass, widgetParams
|
|
311
|
+
widgetConfig<F, ParamKeys>(widgetClass, widgetParams)}></devtools-widget>`);
|
|
288
312
|
}
|
|
289
313
|
}
|
|
290
314
|
|
|
@@ -388,6 +412,7 @@ export class Widget {
|
|
|
388
412
|
#invalidationsRequested?: boolean;
|
|
389
413
|
#externallyManaged?: boolean;
|
|
390
414
|
#updateComplete = UPDATE_COMPLETE;
|
|
415
|
+
#updateController?: AbortController;
|
|
391
416
|
|
|
392
417
|
/**
|
|
393
418
|
* Constructs a new `Widget` with the given `options`.
|
|
@@ -1027,7 +1052,17 @@ export class Widget {
|
|
|
1027
1052
|
* update logic will await the resolution of the returned promise
|
|
1028
1053
|
* before proceeding.
|
|
1029
1054
|
*/
|
|
1030
|
-
performUpdate(): Promise<void>|void
|
|
1055
|
+
performUpdate(): Promise<void>|void;
|
|
1056
|
+
performUpdate(signal: AbortSignal): Promise<void>|void;
|
|
1057
|
+
performUpdate(_signal?: AbortSignal): Promise<void>|void {
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
addUpdateController(controller: AbortController): void {
|
|
1061
|
+
this.#updateController = controller;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
cancelUpdateController(): void {
|
|
1065
|
+
this.#updateController?.abort();
|
|
1031
1066
|
}
|
|
1032
1067
|
|
|
1033
1068
|
/**
|
|
@@ -1037,6 +1072,7 @@ export class Widget {
|
|
|
1037
1072
|
* frame.
|
|
1038
1073
|
*/
|
|
1039
1074
|
requestUpdate(): void {
|
|
1075
|
+
this.#updateController?.abort();
|
|
1040
1076
|
this.#updateComplete = enqueueWidgetUpdate(this);
|
|
1041
1077
|
}
|
|
1042
1078
|
|
package/package.json
CHANGED