chrome-devtools-frontend 1.0.1515988 → 1.0.1516909

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.
Files changed (43) hide show
  1. package/front_end/core/host/GdpClient.ts +1 -1
  2. package/front_end/core/host/UserMetrics.ts +5 -1
  3. package/front_end/entrypoints/main/MainImpl.ts +1 -1
  4. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +4 -5
  5. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +24 -8
  6. package/front_end/models/badges/UserBadges.ts +38 -3
  7. package/front_end/models/formatter/FormatterWorkerPool.ts +3 -3
  8. package/front_end/panels/common/BadgeNotification.ts +46 -10
  9. package/front_end/panels/elements/ComputedStyleWidget.ts +1 -2
  10. package/front_end/panels/elements/LayoutPane.ts +1 -1
  11. package/front_end/panels/network/NetworkLogView.ts +5 -1
  12. package/front_end/panels/search/SearchResultsPane.ts +32 -47
  13. package/front_end/panels/search/SearchView.ts +25 -48
  14. package/front_end/panels/settings/components/SyncSection.ts +1 -1
  15. package/front_end/panels/sources/OutlineQuickOpen.ts +3 -1
  16. package/front_end/panels/timeline/TimelineUIUtils.ts +13 -8
  17. package/front_end/third_party/puppeteer/README.chromium +2 -2
  18. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
  19. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +0 -20
  20. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
  21. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
  22. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
  23. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  24. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +1 -1
  25. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
  26. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  27. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  28. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +2 -23
  29. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +0 -20
  30. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
  31. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
  32. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
  33. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +1 -1
  34. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
  35. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  36. package/front_end/third_party/puppeteer/package/package.json +1 -1
  37. package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +1 -21
  38. package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
  39. package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
  40. package/front_end/ui/components/text_editor/config.ts +30 -1
  41. package/front_end/ui/components/tooltips/Tooltip.ts +1 -3
  42. package/front_end/ui/visual_logging/KnownContextValues.ts +5 -0
  43. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "puppeteer-core",
3
- "version": "24.21.0",
3
+ "version": "24.22.0",
4
4
  "description": "A high-level API to control headless Chrome over the DevTools Protocol",
5
5
  "keywords": [
6
6
  "puppeteer",
@@ -319,7 +319,6 @@ class AXNode {
319
319
  #name: string;
320
320
  #role: string;
321
321
  #ignored: boolean;
322
- #cachedHasFocusableChild?: boolean;
323
322
  #realm: Realm;
324
323
 
325
324
  constructor(realm: Realm, payload: Protocol.Accessibility.AXNode) {
@@ -362,19 +361,6 @@ class AXNode {
362
361
  );
363
362
  }
364
363
 
365
- #hasFocusableChild(): boolean {
366
- if (this.#cachedHasFocusableChild === undefined) {
367
- this.#cachedHasFocusableChild = false;
368
- for (const child of this.children) {
369
- if (child.#focusable || child.#hasFocusableChild()) {
370
- this.#cachedHasFocusableChild = true;
371
- break;
372
- }
373
- }
374
- }
375
- return this.#cachedHasFocusableChild;
376
- }
377
-
378
364
  public find(predicate: (x: AXNode) => boolean): AXNode | null {
379
365
  if (predicate(this)) {
380
366
  return this;
@@ -420,16 +406,10 @@ class AXNode {
420
406
  break;
421
407
  }
422
408
 
423
- // Here and below: Android heuristics
424
- if (this.#hasFocusableChild()) {
425
- return false;
426
- }
427
- if (this.#focusable && this.#name && this.#name !== 'Document') {
428
- return true;
429
- }
430
409
  if (this.#role === 'heading' && this.#name) {
431
410
  return true;
432
411
  }
412
+
433
413
  return false;
434
414
  }
435
415
 
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * @internal
3
3
  */
4
- export const packageVersion = '24.21.0';
4
+ export const packageVersion = '24.22.0';
@@ -10,5 +10,5 @@
10
10
  export const PUPPETEER_REVISIONS = Object.freeze({
11
11
  chrome: '140.0.7339.82',
12
12
  'chrome-headless-shell': '140.0.7339.82',
13
- firefox: 'stable_142.0.1',
13
+ firefox: 'stable_143.0',
14
14
  });
@@ -484,8 +484,10 @@ export const setAiAutoCompleteSuggestion = CM.StateEffect.define<ActiveSuggestio
484
484
  interface ActiveSuggestion {
485
485
  text: string;
486
486
  from: number;
487
- sampleId?: number;
487
+ sampleId: number;
488
488
  rpcGlobalId?: Host.AidaClient.RpcGlobalId;
489
+ startTime: number;
490
+ onImpression: (rpcGlobalId: Host.AidaClient.RpcGlobalId, sampleId: number, latency: number) => void;
489
491
  }
490
492
 
491
493
  export const aiAutoCompleteSuggestionState = CM.StateField.define<ActiveSuggestion|null>({
@@ -569,8 +571,15 @@ export const aiAutoCompleteSuggestion: CM.Extension = [
569
571
  CM.ViewPlugin.fromClass(
570
572
  class {
571
573
  decorations: CM.DecorationSet = CM.Decoration.none;
574
+ #lastLoggedSuggestion: ActiveSuggestion|null = null;
572
575
 
573
576
  update(update: CM.ViewUpdate): void {
577
+ // If there is no text on the document, we don't want to show the AI suggestion.
578
+ if (update.state.doc.length === 0) {
579
+ this.decorations = CM.Decoration.none;
580
+ return;
581
+ }
582
+
574
583
  // Hide decorations if there is no active AI suggestion.
575
584
  const activeSuggestion = update.state.field(aiAutoCompleteSuggestionState);
576
585
  if (!activeSuggestion) {
@@ -605,6 +614,12 @@ export const aiAutoCompleteSuggestion: CM.Extension = [
605
614
 
606
615
  let ghostText = activeSuggestion.text.slice(additionallyTypedText.length);
607
616
  if (selectedCompletion) {
617
+ // Do not show AI generated suggestion if top traditional suggestion is of type
618
+ // 'keyword' - `do`, `while` etc.
619
+ if (selectedCompletion.type?.includes('keyword')) {
620
+ this.decorations = CM.Decoration.none;
621
+ return;
622
+ }
608
623
  // If the user typed the full selected completion, then we don't check for overlap.
609
624
  // (e.g. the user wrote `flex`, traditional suggestion is `flex` and the AI autocompletion is
610
625
  // `;\njustify-content: center`. Then, we want to show the AI completion)
@@ -635,6 +650,20 @@ export const aiAutoCompleteSuggestion: CM.Extension = [
635
650
 
636
651
  this.decorations =
637
652
  CM.Decoration.set([CM.Decoration.widget({widget: new CompletionHint(ghostText), side: 1}).range(head)]);
653
+ this.#registerImpressionIfNeeded(activeSuggestion);
654
+ }
655
+
656
+ #registerImpressionIfNeeded(activeSuggestion: ActiveSuggestion): void {
657
+ if (!activeSuggestion.rpcGlobalId) {
658
+ return;
659
+ }
660
+ if (this.#lastLoggedSuggestion?.rpcGlobalId === activeSuggestion?.rpcGlobalId &&
661
+ this.#lastLoggedSuggestion?.sampleId === activeSuggestion?.sampleId) {
662
+ return;
663
+ }
664
+ const latency = performance.now() - activeSuggestion.startTime;
665
+ // only register impression for the first time AI generated suggestion is shown to the user.
666
+ activeSuggestion.onImpression(activeSuggestion.rpcGlobalId, activeSuggestion.sampleId, latency);
638
667
  }
639
668
  },
640
669
  {decorations: p => p.decorations}),
@@ -360,9 +360,7 @@ export class Tooltip extends HTMLElement {
360
360
  if (this.open && Tooltip.lastOpenedTooltipId === this.id) {
361
361
  Tooltip.lastOpenedTooltipId = null;
362
362
  }
363
- this.#timeout = window.setTimeout(() => {
364
- this.hidePopover();
365
- }, this.hoverDelay);
363
+ this.hidePopover();
366
364
  };
367
365
 
368
366
  toggle = (): void => {
@@ -1907,6 +1907,8 @@ export const knownContextValues = new Set([
1907
1907
  'interactions',
1908
1908
  'interactivity',
1909
1909
  'interest-delay',
1910
+ 'interest-delay-end',
1911
+ 'interest-delay-start',
1910
1912
  'interest-groups',
1911
1913
  'interest-hide-delay',
1912
1914
  'interest-show-delay',
@@ -3547,6 +3549,9 @@ export const knownContextValues = new Set([
3547
3549
  'start-time',
3548
3550
  'start-url',
3549
3551
  'start-view',
3552
+ 'starter-badge-dismissed',
3553
+ 'starter-badge-last-snoozed-timestamp',
3554
+ 'starter-badge-snooze-count',
3550
3555
  'static-global-setting',
3551
3556
  'static-synced-setting',
3552
3557
  'status',
package/package.json CHANGED
@@ -102,5 +102,5 @@
102
102
  "@eslint/core": "0.15.1"
103
103
  }
104
104
  },
105
- "version": "1.0.1515988"
105
+ "version": "1.0.1516909"
106
106
  }