chrome-devtools-frontend 1.0.1525561 → 1.0.1526630

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 (58) hide show
  1. package/front_end/core/common/Settings.ts +1 -1
  2. package/front_end/core/i18n/i18nImpl.ts +1 -1
  3. package/front_end/core/sdk/ChildTargetManager.ts +2 -0
  4. package/front_end/core/sdk/PreloadingModel.ts +3 -0
  5. package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
  6. package/front_end/core/sdk/SourceMapScopesInfo.ts +57 -0
  7. package/front_end/generated/InspectorBackendCommands.js +5 -5
  8. package/front_end/generated/SupportedCSSProperties.js +0 -19
  9. package/front_end/generated/protocol-mapping.d.ts +4 -2
  10. package/front_end/generated/protocol-proxy-api.d.ts +4 -2
  11. package/front_end/generated/protocol.ts +9 -8
  12. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +43 -8
  13. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +50 -32
  14. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +29 -29
  15. package/front_end/models/javascript_metadata/NativeFunctions.js +3 -8
  16. package/front_end/models/trace/handlers/UserTimingsHandler.ts +1 -1
  17. package/front_end/models/trace/insights/CLSCulprits.ts +2 -1
  18. package/front_end/models/trace/insights/Cache.ts +2 -1
  19. package/front_end/models/trace/insights/DOMSize.ts +2 -1
  20. package/front_end/models/trace/insights/DocumentLatency.ts +2 -1
  21. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +2 -1
  22. package/front_end/models/trace/insights/FontDisplay.ts +2 -1
  23. package/front_end/models/trace/insights/ForcedReflow.ts +2 -1
  24. package/front_end/models/trace/insights/INPBreakdown.ts +2 -1
  25. package/front_end/models/trace/insights/ImageDelivery.ts +2 -1
  26. package/front_end/models/trace/insights/LCPBreakdown.ts +2 -1
  27. package/front_end/models/trace/insights/LCPDiscovery.ts +2 -1
  28. package/front_end/models/trace/insights/LegacyJavaScript.ts +2 -1
  29. package/front_end/models/trace/insights/ModernHTTP.ts +2 -1
  30. package/front_end/models/trace/insights/NetworkDependencyTree.ts +2 -1
  31. package/front_end/models/trace/insights/RenderBlocking.ts +2 -1
  32. package/front_end/models/trace/insights/SlowCSSSelector.ts +2 -1
  33. package/front_end/models/trace/insights/ThirdParties.ts +2 -1
  34. package/front_end/models/trace/insights/Viewport.ts +2 -1
  35. package/front_end/models/trace/insights/types.ts +2 -1
  36. package/front_end/panels/application/ReportingApiView.ts +8 -7
  37. package/front_end/panels/application/StorageView.ts +2 -1
  38. package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -0
  39. package/front_end/panels/console/ConsolePrompt.ts +24 -4
  40. package/front_end/panels/coverage/CoverageListView.ts +125 -279
  41. package/front_end/panels/coverage/CoverageView.ts +109 -111
  42. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +11 -19
  43. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +27 -43
  44. package/front_end/panels/network/RequestResponseView.ts +1 -1
  45. package/front_end/panels/timeline/TimelinePanel.ts +10 -8
  46. package/front_end/panels/timeline/components/ExportTraceOptions.ts +1 -1
  47. package/front_end/third_party/chromium/README.chromium +1 -1
  48. package/front_end/ui/components/buttons/Button.ts +18 -1
  49. package/front_end/ui/legacy/EmptyWidget.ts +11 -1
  50. package/front_end/ui/legacy/SearchableView.ts +1 -1
  51. package/front_end/ui/legacy/Toolbar.ts +25 -4
  52. package/front_end/ui/legacy/UIUtils.ts +28 -2
  53. package/front_end/ui/legacy/Widget.ts +5 -0
  54. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +48 -5
  55. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -2
  56. package/front_end/ui/legacy/components/source_frame/JSONView.ts +28 -0
  57. package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +7 -8
  58. package/package.json +22 -22
@@ -63,6 +63,10 @@ interface ButtonState {
63
63
  jslogContext?: string;
64
64
  longClickable?: boolean;
65
65
  inverseColorTheme?: boolean;
66
+ /**
67
+ * Sets aria-label on the internal <button> element.
68
+ */
69
+ accessibleLabel?: string;
66
70
  }
67
71
 
68
72
  interface CommonButtonData {
@@ -84,6 +88,10 @@ interface CommonButtonData {
84
88
  jslogContext?: string;
85
89
  longClickable?: boolean;
86
90
  inverseColorTheme?: boolean;
91
+ /**
92
+ * Sets aria-label on the internal <button> element.
93
+ */
94
+ accessibleLabel?: string;
87
95
  }
88
96
 
89
97
  export type ButtonData = CommonButtonData&(|{
@@ -143,6 +151,9 @@ export class Button extends HTMLElement {
143
151
  if ('size' in data && data.size) {
144
152
  this.#props.size = data.size;
145
153
  }
154
+ if (data.accessibleLabel) {
155
+ this.#props.accessibleLabel = data.accessibleLabel;
156
+ }
146
157
 
147
158
  this.#props.active = Boolean(data.active);
148
159
  this.#props.spinner = Boolean('spinner' in data ? data.spinner : false);
@@ -187,6 +198,11 @@ export class Button extends HTMLElement {
187
198
  this.#render();
188
199
  }
189
200
 
201
+ set accessibleLabel(label: string) {
202
+ this.#props.accessibleLabel = label;
203
+ this.#render();
204
+ }
205
+
190
206
  set reducedFocusRing(reducedFocusRing: boolean) {
191
207
  this.#props.reducedFocusRing = reducedFocusRing;
192
208
  this.#render();
@@ -354,9 +370,10 @@ export class Button extends HTMLElement {
354
370
  html`
355
371
  <style>${buttonStyles}</style>
356
372
  <button title=${ifDefined(this.#props.title)}
357
- .disabled=${this.#props.disabled}
373
+ ?disabled=${this.#props.disabled}
358
374
  class=${classMap(classes)}
359
375
  aria-pressed=${ifDefined(this.#props.toggled)}
376
+ aria-label=${ifDefined(this.#props.accessibleLabel)}
360
377
  jslog=${ifDefined(jslog)}>
361
378
  ${hasIcon ? html`
362
379
  <devtools-icon name=${ifDefined(this.#props.toggled ? this.#props.toggledIconName : this.#props.iconName)}>
@@ -26,6 +26,7 @@ interface EmptyWidgetInput {
26
26
  header: string;
27
27
  text: string;
28
28
  link?: Platform.DevToolsPath.UrlString|undefined|null;
29
+ extraElements?: Element[];
29
30
  }
30
31
 
31
32
  interface EmptyWidgetOutput {
@@ -47,6 +48,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
47
48
  ${input.link ? XLink.create(
48
49
  input.link, i18nString(UIStrings.learnMore), undefined, undefined, 'learn-more') : ''}
49
50
  </div>
51
+ ${input.extraElements}
50
52
  </div>`, target);
51
53
  // clang-format on
52
54
  };
@@ -56,6 +58,8 @@ export class EmptyWidget extends VBox {
56
58
  #text: string;
57
59
  #link: Platform.DevToolsPath.UrlString|undefined|null;
58
60
  #view: View;
61
+ #firstUpdate = true;
62
+ #extraElements: Element[] = [];
59
63
 
60
64
  constructor(headerOrElement: string|HTMLElement, text = '', element?: HTMLElement, view = DEFAULT_VIEW) {
61
65
  const header = typeof headerOrElement === 'string' ? headerOrElement : '';
@@ -86,8 +90,14 @@ export class EmptyWidget extends VBox {
86
90
  }
87
91
 
88
92
  override performUpdate(): void {
93
+ if (this.#firstUpdate) {
94
+ this.#extraElements = [...this.element.children];
95
+ this.#firstUpdate = false;
96
+ }
89
97
  const output = {contentElement: undefined};
90
- this.#view({header: this.#header, text: this.#text, link: this.#link}, output, this.element);
98
+ this.#view(
99
+ {header: this.#header, text: this.#text, link: this.#link, extraElements: this.#extraElements}, output,
100
+ this.element);
91
101
  if (output.contentElement) {
92
102
  this.contentElement = output.contentElement;
93
103
  }
@@ -139,7 +139,7 @@ function createClearButton(jslogContext: string): Buttons.Button.Button {
139
139
  return button;
140
140
  }
141
141
  export class SearchableView extends VBox {
142
- private searchProvider: Searchable;
142
+ protected searchProvider: Searchable;
143
143
  private replaceProvider: Replaceable|null;
144
144
  // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
145
145
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -94,7 +94,7 @@ export class Toolbar extends HTMLElement {
94
94
  if (element instanceof Buttons.Button.Button) {
95
95
  item = new ToolbarButton('', undefined, undefined, undefined, element);
96
96
  } else if (element instanceof ToolbarInputElement) {
97
- item = element.item;
97
+ item = element.item as ToolbarItem;
98
98
  } else if (element instanceof HTMLSelectElement) {
99
99
  item = new ToolbarComboBox(null, element.title, undefined, undefined, element);
100
100
  } else {
@@ -833,11 +833,12 @@ export class ToolbarFilter extends ToolbarInput {
833
833
  }
834
834
 
835
835
  export class ToolbarInputElement extends HTMLElement {
836
- static observedAttributes = ['value'];
836
+ static observedAttributes = ['value', 'disabled'];
837
837
 
838
- item!: ToolbarInput;
838
+ item?: ToolbarInput;
839
839
  datalist: HTMLDataListElement|null = null;
840
840
  value: string|undefined = undefined;
841
+ #disabled = false;
841
842
 
842
843
  connectedCallback(): void {
843
844
  if (this.item) {
@@ -866,6 +867,9 @@ export class ToolbarInputElement extends HTMLElement {
866
867
  if (this.value) {
867
868
  this.item.setValue(this.value);
868
869
  }
870
+ if (this.#disabled) {
871
+ this.item.setEnabled(false);
872
+ }
869
873
  this.item.addEventListener(ToolbarInput.Event.TEXT_CHANGED, event => {
870
874
  this.dispatchEvent(new CustomEvent('change', {detail: event.data}));
871
875
  });
@@ -875,7 +879,7 @@ export class ToolbarInputElement extends HTMLElement {
875
879
  }
876
880
 
877
881
  override focus(): void {
878
- this.item.focus();
882
+ this.item?.focus();
879
883
  }
880
884
 
881
885
  async #onAutocomplete(expression: string, prefix: string, force?: boolean): Promise<Suggestion[]> {
@@ -894,8 +898,25 @@ export class ToolbarInputElement extends HTMLElement {
894
898
  } else {
895
899
  this.value = newValue;
896
900
  }
901
+ } else if (name === 'disabled') {
902
+ this.#disabled = typeof newValue === 'string';
903
+ if (this.item) {
904
+ this.item.setEnabled(!this.#disabled);
905
+ }
906
+ }
907
+ }
908
+
909
+ set disabled(disabled: boolean) {
910
+ if (disabled) {
911
+ this.setAttribute('disabled', '');
912
+ } else {
913
+ this.removeAttribute('disabled');
897
914
  }
898
915
  }
916
+
917
+ get disabled(): boolean {
918
+ return this.hasAttribute('disabled');
919
+ }
899
920
  }
900
921
  customElements.define('devtools-toolbar-input', ToolbarInputElement);
901
922
 
@@ -2135,6 +2135,7 @@ export function bindToAction(actionName: string): ReturnType<typeof Directives.r
2135
2135
  const action = ActionRegistry.instance().getAction(actionName);
2136
2136
 
2137
2137
  let setEnabled: (enabled: boolean) => void;
2138
+ let toggled: () => void;
2138
2139
  function actionEnabledChanged(event: Common.EventTarget.EventTargetEvent<boolean>): void {
2139
2140
  setEnabled(event.data);
2140
2141
  }
@@ -2142,6 +2143,7 @@ export function bindToAction(actionName: string): ReturnType<typeof Directives.r
2142
2143
  return Directives.ref((e: Element|undefined) => {
2143
2144
  if (!e || !(e instanceof Buttons.Button.Button)) {
2144
2145
  action.removeEventListener(ActionRegistration.Events.ENABLED, actionEnabledChanged);
2146
+ action.removeEventListener(ActionRegistration.Events.TOGGLED, toggled);
2145
2147
  return;
2146
2148
  }
2147
2149
 
@@ -2151,10 +2153,34 @@ export function bindToAction(actionName: string): ReturnType<typeof Directives.r
2151
2153
 
2152
2154
  action.addEventListener(ActionRegistration.Events.ENABLED, actionEnabledChanged);
2153
2155
 
2156
+ const toggleable = action.toggleable();
2157
+ if (toggleable) {
2158
+ toggled = () => {
2159
+ e.toggled = action.toggled();
2160
+ if (action.title()) {
2161
+ e.title = action.title();
2162
+ Tooltip.installWithActionBinding(e, action.title(), action.id());
2163
+ }
2164
+ };
2165
+ action.addEventListener(ActionRegistration.Events.TOGGLED, toggled);
2166
+ }
2154
2167
  const title = action.title();
2155
- const iconName = action.icon();
2168
+ const iconName = action.icon() ?? '';
2156
2169
  const jslogContext = action.id();
2157
- if (iconName) {
2170
+ const toggledIconName = action.toggledIcon() ?? iconName;
2171
+ const toggleType = action.toggleWithRedColor() ? Buttons.Button.ToggleType.RED : Buttons.Button.ToggleType.PRIMARY;
2172
+ if (toggleable) {
2173
+ e.data = {
2174
+ jslogContext,
2175
+ title,
2176
+ variant: Buttons.Button.Variant.ICON_TOGGLE,
2177
+ iconName,
2178
+ toggledIconName,
2179
+ toggleType,
2180
+ toggled: action.toggled(),
2181
+ };
2182
+ toggled();
2183
+ } else if (iconName) {
2158
2184
  e.data = {iconName, jslogContext, title, variant: Buttons.Button.Variant.ICON};
2159
2185
  } else {
2160
2186
  e.data = {jslogContext, title, variant: Buttons.Button.Variant.TEXT};
@@ -737,6 +737,11 @@ export class Widget {
737
737
  return;
738
738
  }
739
739
 
740
+ if (this.#shadowRoot?.delegatesFocus && this.contentElement.querySelector('[autofocus]')) {
741
+ this.element.focus();
742
+ return;
743
+ }
744
+
740
745
  const element = (this.#defaultFocusedElement as HTMLElement | null);
741
746
  if (element) {
742
747
  if (!element.hasFocus()) {
@@ -5,10 +5,17 @@
5
5
 
6
6
  import type * as Platform from '../../../../core/platform/platform.js';
7
7
  import type * as TextUtils from '../../../../models/text_utils/text_utils.js';
8
- import * as UI from '../../../../ui/legacy/legacy.js';
8
+ import * as UI from '../../legacy.js';
9
9
 
10
10
  import dataGridStyles from './dataGrid.css.js';
11
- import {Align, type ColumnDescriptor, DataType, Events as DataGridEvents} from './DataGrid.js';
11
+ import {
12
+ Align,
13
+ type ColumnDescriptor,
14
+ DataType,
15
+ Events as DataGridEvents,
16
+ Order,
17
+ type ResizeMethod
18
+ } from './DataGrid.js';
12
19
  import {SortableDataGrid, SortableDataGridNode} from './SortableDataGrid.js';
13
20
 
14
21
  const DUMMY_COLUMN_ID = 'dummy'; // SortableDataGrid.create requires at least one column.
@@ -36,12 +43,14 @@ const DUMMY_COLUMN_ID = 'dummy'; // SortableDataGrid.create requires at least o
36
43
  * Under the hood it uses SortableDataGrid, which extends ViewportDataGrid so only
37
44
  * visible rows are layed out and sorting is provided out of the box.
38
45
  *
39
- * @property filters
40
- * @attribute striped
46
+ * @property filters Set of text filters to be applied to the data grid.
47
+ * @attribute inline If true, the data grid will render inline instead of taking a full container height.
48
+ * @attribute resize Column resize method, one of 'nearest' (default), 'first' or 'last'.
49
+ * @attribute striped If true, the data grid will have striped rows.
41
50
  * @attribute displayName
42
51
  */
43
52
  class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate {
44
- static readonly observedAttributes = ['striped', 'name', 'inline'];
53
+ static readonly observedAttributes = ['striped', 'name', 'inline', 'resize'];
45
54
 
46
55
  #dataGrid = SortableDataGrid.create([DUMMY_COLUMN_ID], [], '') as SortableDataGrid<DataGridElementNode>;
47
56
  #resizeObserver = new ResizeObserver(() => {
@@ -69,6 +78,9 @@ class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate {
69
78
  e => (e.data as DataGridElementNode).configElement.dispatchEvent(new CustomEvent('select')));
70
79
  this.#dataGrid.addEventListener(
71
80
  DataGridEvents.DESELECTED_NODE, () => this.dispatchEvent(new CustomEvent('deselect')));
81
+ this.#dataGrid.addEventListener(
82
+ DataGridEvents.OPENED_NODE,
83
+ e => (e.data as DataGridElementNode).configElement.dispatchEvent(new CustomEvent('open')));
72
84
  this.#dataGrid.addEventListener(DataGridEvents.SORTING_CHANGED, () => this.dispatchEvent(new CustomEvent('sort', {
73
85
  detail: {columnId: this.#dataGrid.sortColumnId(), ascending: this.#dataGrid.isSortOrderAscending()}
74
86
  })));
@@ -111,6 +123,9 @@ class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate {
111
123
  case 'inline':
112
124
  this.#dataGrid.renderInline();
113
125
  break;
126
+ case 'resize':
127
+ this.#dataGrid.setResizeMethod(newValue as ResizeMethod);
128
+ break;
114
129
  }
115
130
  }
116
131
 
@@ -138,6 +153,14 @@ class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate {
138
153
  return this.getAttribute('name');
139
154
  }
140
155
 
156
+ set resizeMethod(resizeMethod: ResizeMethod) {
157
+ this.setAttribute('resize', resizeMethod);
158
+ }
159
+
160
+ get resizeMethod(): ResizeMethod {
161
+ return this.getAttribute('resize') as ResizeMethod;
162
+ }
163
+
141
164
  set filters(filters: TextUtils.TextUtils.ParsedFilter[]) {
142
165
  this.#dataGrid.setFilters(filters);
143
166
  this.#dataGrid.element.setAttribute('aria-rowcount', String(this.#dataGrid.getNumberOfRows()));
@@ -178,11 +201,15 @@ class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate {
178
201
  if (editable) {
179
202
  hasEditableColumn = true;
180
203
  }
204
+ const sort = column.getAttribute('sort') === 'descending' ? Order.Descending :
205
+ column.getAttribute('sort') === 'ascending' ? Order.Ascending :
206
+ undefined;
181
207
  const columnDescriptor = {
182
208
  id,
183
209
  title: title as Platform.UIString.LocalizedString,
184
210
  titleDOMFragment,
185
211
  sortable,
212
+ sort,
186
213
  fixedWidth,
187
214
  width,
188
215
  align,
@@ -235,6 +262,18 @@ class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate {
235
262
  .filter(node => node.querySelector('td') && !hasBooleanAttribute(node, 'placeholder'));
236
263
  }
237
264
 
265
+ #getStyleElements(nodes: NodeList): HTMLElement[] {
266
+ return [...nodes].flatMap(node => {
267
+ if (node instanceof HTMLStyleElement) {
268
+ return [node];
269
+ }
270
+ if (node instanceof HTMLElement) {
271
+ return [...node.querySelectorAll<HTMLStyleElement>('style')];
272
+ }
273
+ return [] as HTMLElement[];
274
+ });
275
+ }
276
+
238
277
  #findNextExistingNode(element: Element): DataGridElementNode|null {
239
278
  for (let e = element.nextElementSibling; e; e = e.nextElementSibling) {
240
279
  const nextNode = DataGridElementNode.get(e);
@@ -270,6 +309,10 @@ class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate {
270
309
  node.setHighlighted(true);
271
310
  }
272
311
  }
312
+ for (const element of this.#getStyleElements(nodes)) {
313
+ this.#shadowRoot.appendChild(element.cloneNode(true));
314
+ }
315
+ this.#dataGrid.dispatchEventToListeners(DataGridEvents.SORTING_CHANGED);
273
316
  }
274
317
 
275
318
  override removeNodes(nodes: NodeList): void {
@@ -23,7 +23,7 @@ import {TimelineGrid} from './TimelineGrid.js';
23
23
  /**
24
24
  * Set as the `details` value on the fake context menu event we dispatch to
25
25
  * trigger a context menu on an event on a keyboard space key press.
26
- * {@see onContextMenu} for more details and explanation.
26
+ * {@link FlameChart.onContextMenu} for more details and explanation.
27
27
  */
28
28
  const KEYBOARD_FAKED_CONTEXT_MENU_DETAIL = -1;
29
29
 
@@ -2347,7 +2347,7 @@ export class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, type
2347
2347
  }
2348
2348
 
2349
2349
  /**
2350
- * Draws decorations onto events. {@see FlameChartDecoration}.
2350
+ * Draws decorations onto events. {@link FlameChartDecoration}.
2351
2351
  */
2352
2352
  #drawDecorations(context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData, indexes: number[]): void {
2353
2353
  const {entryTotalTimes, entryStartTimes, entryLevels} = timelineData;
@@ -20,6 +20,7 @@ const UIStrings = {
20
20
  } as const;
21
21
  const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/source_frame/JSONView.ts', UIStrings);
22
22
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
23
+
23
24
  export class JSONView extends UI.Widget.VBox implements UI.SearchableView.Searchable {
24
25
  private initialized: boolean;
25
26
  private readonly parsedJSON: ParsedJSON;
@@ -67,6 +68,10 @@ export class JSONView extends UI.Widget.VBox implements UI.SearchableView.Search
67
68
  return searchableView;
68
69
  }
69
70
 
71
+ setSearchableView(searchableView: UI.SearchableView.SearchableView): void {
72
+ this.searchableView = searchableView;
73
+ }
74
+
70
75
  private static parseJSON(text: string|null): Promise<ParsedJSON|null> {
71
76
  let returnObj: ParsedJSON<string>|null = null;
72
77
  if (text) {
@@ -280,3 +285,26 @@ export class ParsedJSON<T extends unknown = unknown> {
280
285
  this.suffix = suffix;
281
286
  }
282
287
  }
288
+
289
+ export class SearchableJsonView extends UI.SearchableView.SearchableView {
290
+ #jsonView: JSONView;
291
+
292
+ constructor(element: HTMLElement) {
293
+ const jsonView = new JSONView(new ParsedJSON('', '', ''));
294
+ super(jsonView, null, undefined, element);
295
+ this.#jsonView = jsonView;
296
+ this.setPlaceholder(i18nString(UIStrings.find));
297
+ jsonView.setSearchableView(this);
298
+ jsonView.show(this.element);
299
+ jsonView.element.tabIndex = 0;
300
+ }
301
+
302
+ set jsonObject(obj: Object) {
303
+ const jsonView = new JSONView(new ParsedJSON(obj, '', ''));
304
+ this.#jsonView.detach();
305
+ this.#jsonView = jsonView;
306
+ this.searchProvider = jsonView;
307
+ jsonView.show(this.element);
308
+ this.requestUpdate();
309
+ }
310
+ }
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable rulesdir/no-imperative-dom-api */
5
5
 
6
+ import type * as Common from '../../../../core/common/common.js';
6
7
  import * as TextUtils from '../../../../models/text_utils/text_utils.js';
7
8
  import * as LinearMemoryInspectorComponents from '../../../../panels/linear_memory_inspector/components/components.js';
8
9
  import * as UI from '../../legacy.js';
@@ -22,13 +23,11 @@ class LinearMemoryInspectorView extends UI.Widget.VBox {
22
23
 
23
24
  constructor() {
24
25
  super();
25
- this.#inspector.contentElement.addEventListener(
26
- LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent.eventName,
27
- (event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent) =>
28
- this.#memoryRequested(event));
29
- this.#inspector.contentElement.addEventListener(
30
- LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent.eventName,
31
- (event: LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent) => {
26
+ this.#inspector.addEventListener(
27
+ LinearMemoryInspectorComponents.LinearMemoryInspector.Events.MEMORY_REQUEST, this.#memoryRequested, this);
28
+ this.#inspector.addEventListener(
29
+ LinearMemoryInspectorComponents.LinearMemoryInspector.Events.ADDRESS_CHANGED,
30
+ (event: Common.EventTarget.EventTargetEvent<number>) => {
32
31
  this.#address = event.data;
33
32
  });
34
33
  this.#inspector.show(this.contentElement);
@@ -60,7 +59,7 @@ class LinearMemoryInspectorView extends UI.Widget.VBox {
60
59
  this.#inspector.hideValueInspector = true;
61
60
  }
62
61
 
63
- #memoryRequested(event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent): void {
62
+ #memoryRequested(event: Common.EventTarget.EventTargetEvent<{start: number, end: number, address: number}>): void {
64
63
  // TODO(szuend): The following lines are copied from `LinearMemoryInspectorController`. We can't reuse them
65
64
  // as depending on a module in `panels/` from a component is a layering violation.
66
65
 
package/package.json CHANGED
@@ -36,10 +36,10 @@
36
36
  "devDependencies": {
37
37
  "@rollup/plugin-node-resolve": "16.0.1",
38
38
  "@rollup/plugin-terser": "0.4.4",
39
- "@rollup/wasm-node": "4.46.2",
40
- "@stylistic/eslint-plugin": "5.2.3",
39
+ "@rollup/wasm-node": "4.52.1",
40
+ "@stylistic/eslint-plugin": "5.4.0",
41
41
  "@types/chai": "4.3.15",
42
- "@types/codemirror": "5.60.15",
42
+ "@types/codemirror": "5.60.16",
43
43
  "@types/emscripten": "1.39.4",
44
44
  "@types/estree": "1.0.8",
45
45
  "@types/filesystem": "0.0.36",
@@ -51,20 +51,20 @@
51
51
  "@types/webidl2": "24.4.3",
52
52
  "@types/yargs": "17.0.33",
53
53
  "@types/yargs-unparser": "2.0.3",
54
- "@typescript-eslint/rule-tester": "8.39.1",
55
- "@typescript-eslint/utils": "8.39.1",
54
+ "@typescript-eslint/rule-tester": "8.45.0",
55
+ "@typescript-eslint/utils": "8.45.0",
56
56
  "@web/rollup-plugin-import-meta-assets": "2.3.0",
57
57
  "chai": "4.3.4",
58
- "cssnano": "7.1.0",
58
+ "cssnano": "7.1.1",
59
59
  "cssnano-preset-lite": "4.0.4",
60
60
  "esbuild": "0.25.1",
61
- "eslint": "9.33.0",
61
+ "eslint": "9.36.0",
62
62
  "eslint-plugin-eslint-plugin": "7.0.0",
63
63
  "eslint-plugin-import": "2.32.0",
64
- "eslint-plugin-jsdoc": "51.3.4",
64
+ "eslint-plugin-jsdoc": "60.5.0",
65
65
  "eslint-plugin-mocha": "10.5.0",
66
66
  "glob": "7.1.7",
67
- "globals": "16.3.0",
67
+ "globals": "16.4.0",
68
68
  "js-yaml": "4.1.0",
69
69
  "karma": "6.4.4",
70
70
  "karma-chai": "0.1.0",
@@ -77,30 +77,30 @@
77
77
  "karma-spec-reporter": "0.0.36",
78
78
  "license-checker": "25.0.1",
79
79
  "lit-analyzer": "2.0.3",
80
- "mocha": "11.7.1",
81
- "ora": "8.2.0",
80
+ "mocha": "11.7.2",
81
+ "ora": "9.0.0",
82
82
  "postcss": "8.5.6",
83
- "puppeteer-core": "24.14.0",
84
- "rollup-plugin-sourcemaps2": "0.5.3",
83
+ "puppeteer-core": "24.22.3",
84
+ "rollup-plugin-sourcemaps2": "0.5.4",
85
85
  "sinon": "21.0.0",
86
86
  "source-map-support": "0.5.21",
87
- "stylelint": "16.23.1",
87
+ "stylelint": "16.24.0",
88
88
  "stylelint-config-standard": "39.0.0",
89
89
  "svgo": "3.3.2",
90
- "terser": "5.43.1",
90
+ "terser": "5.44.0",
91
91
  "ts-lit-plugin": "2.0.2",
92
92
  "typescript": "5.9.2",
93
- "typescript-eslint": "8.39.1",
94
- "uuid": "11.1.0",
93
+ "typescript-eslint": "8.45.0",
94
+ "uuid": "13.0.0",
95
95
  "webidl2": "24.5.0",
96
96
  "yargs": "17.7.2"
97
97
  },
98
98
  "overrides": {
99
- "@typescript-eslint/types": "8.39.1",
100
- "eslint": {
101
- "@eslint/plugin-kit": "0.3.4",
102
- "@eslint/core": "0.15.1"
99
+ "@typescript-eslint/types": "8.45.0",
100
+ "@es-joy/jsdoccomment": "0.64.0",
101
+ "stylelint": {
102
+ "flat-cache": "6.1.12"
103
103
  }
104
104
  },
105
- "version": "1.0.1525561"
105
+ "version": "1.0.1526630"
106
106
  }