chrome-devtools-frontend 1.0.945329 → 1.0.946351

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 (120) hide show
  1. package/config/gni/all_devtools_files.gni +0 -5
  2. package/config/gni/devtools_grd_files.gni +1 -33
  3. package/config/gni/devtools_image_files.gni +1 -0
  4. package/front_end/Images/src/circled_exclamation_icon.svg +3 -0
  5. package/front_end/core/host/UserMetrics.ts +0 -1
  6. package/front_end/core/i18n/locales/en-US.json +12 -12
  7. package/front_end/core/i18n/locales/en-XL.json +12 -12
  8. package/front_end/core/root/Runtime.ts +0 -1
  9. package/front_end/core/sdk/CSSMetadata.ts +0 -1
  10. package/front_end/core/sdk/CSSProperty.ts +16 -9
  11. package/front_end/core/sdk/sdk-meta.ts +20 -8
  12. package/front_end/devtools_compatibility.js +0 -7
  13. package/front_end/entrypoints/devtools_app/devtools_app.js +3 -0
  14. package/front_end/entrypoints/devtools_app/devtools_app.json +1 -2
  15. package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +1 -3
  16. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -2
  17. package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +0 -120
  18. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -11
  19. package/front_end/entrypoints/formatter_worker/formatter_worker.ts +5 -0
  20. package/front_end/entrypoints/js_app/js_app.js +3 -0
  21. package/front_end/entrypoints/js_app/js_app.json +1 -2
  22. package/front_end/entrypoints/main/MainImpl.ts +0 -6
  23. package/front_end/entrypoints/ndb_app/ndb_app.js +3 -0
  24. package/front_end/entrypoints/ndb_app/ndb_app.json +1 -2
  25. package/front_end/entrypoints/node_app/node_app.js +3 -0
  26. package/front_end/entrypoints/node_app/node_app.json +1 -2
  27. package/front_end/entrypoints/shell/shell.js +18 -1
  28. package/front_end/entrypoints/worker_app/worker_app.js +3 -0
  29. package/front_end/entrypoints/worker_app/worker_app.json +1 -2
  30. package/front_end/generated/protocol.d.ts +0 -4
  31. package/front_end/legacy_test_runner/sources_test_runner/sources_test_runner.js +0 -1
  32. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
  33. package/front_end/models/bindings/ResourceMapping.ts +1 -1
  34. package/front_end/models/emulation/EmulatedDevices.ts +2 -4
  35. package/front_end/models/formatter/FormatterWorkerPool.ts +0 -18
  36. package/front_end/models/text_utils/CodeMirrorUtils.ts +6 -51
  37. package/front_end/models/text_utils/TextUtils.ts +1 -2
  38. package/front_end/models/text_utils/text_utils-legacy.ts +0 -5
  39. package/front_end/panels/animation/AnimationTimeline.ts +1 -1
  40. package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -4
  41. package/front_end/panels/application/BackForwardCacheView.ts +8 -1
  42. package/front_end/panels/elements/StyleEditorWidget.ts +13 -2
  43. package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -12
  44. package/front_end/panels/elements/StylesSidebarPane.ts +35 -9
  45. package/front_end/panels/elements/elementsTreeOutline.css +0 -13
  46. package/front_end/panels/network/NetworkConfigView.ts +10 -0
  47. package/front_end/panels/network/NetworkItemView.ts +10 -1
  48. package/front_end/panels/network/networkConfigView.css +5 -0
  49. package/front_end/panels/profiler/heapProfiler.css +2 -5
  50. package/front_end/panels/profiler/profilesPanel.css +1 -1
  51. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +6 -4
  52. package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +0 -12
  53. package/front_end/panels/sources/DebuggerPlugin.ts +6 -2
  54. package/front_end/panels/sources/sourcesView.css +0 -130
  55. package/front_end/panels/webauthn/WebauthnPane.ts +31 -32
  56. package/front_end/third_party/codemirror/codemirror-tsconfig.json +1 -25
  57. package/front_end/ui/components/adorners/Adorner.ts +14 -14
  58. package/front_end/ui/components/buttons/Button.ts +133 -42
  59. package/front_end/ui/components/buttons/button.css +31 -0
  60. package/front_end/ui/components/data_grid/DataGrid.ts +131 -122
  61. package/front_end/ui/components/data_grid/DataGridController.ts +42 -42
  62. package/front_end/ui/components/diff_view/DiffView.ts +4 -4
  63. package/front_end/ui/components/docs/button/basic.html +3 -0
  64. package/front_end/ui/components/docs/button/basic.ts +58 -0
  65. package/front_end/ui/components/expandable_list/ExpandableList.ts +11 -11
  66. package/front_end/ui/components/icon_button/Icon.ts +24 -21
  67. package/front_end/ui/components/icon_button/IconButton.ts +31 -31
  68. package/front_end/ui/components/issue_counter/IssueCounter.ts +52 -52
  69. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +42 -42
  70. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +67 -67
  71. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +22 -22
  72. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +36 -36
  73. package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +19 -19
  74. package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +24 -32
  75. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +52 -52
  76. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +21 -21
  77. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
  78. package/front_end/ui/components/markdown_view/MarkdownImage.ts +14 -14
  79. package/front_end/ui/components/markdown_view/MarkdownLink.ts +8 -8
  80. package/front_end/ui/components/markdown_view/MarkdownView.ts +6 -6
  81. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +33 -33
  82. package/front_end/ui/components/report_view/ReportView.ts +18 -18
  83. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +53 -53
  84. package/front_end/ui/components/settings/SettingCheckbox.ts +15 -15
  85. package/front_end/ui/components/survey_link/SurveyLink.ts +28 -28
  86. package/front_end/ui/components/text_editor/TextEditor.ts +55 -52
  87. package/front_end/ui/components/text_editor/config.ts +3 -3
  88. package/front_end/ui/components/text_editor/javascript.ts +27 -9
  89. package/front_end/ui/components/text_editor/theme.ts +1 -0
  90. package/front_end/ui/components/text_prompt/TextPrompt.ts +19 -19
  91. package/front_end/ui/components/tree_outline/TreeOutline.ts +56 -56
  92. package/front_end/ui/legacy/Infobar.ts +9 -0
  93. package/front_end/ui/legacy/ListWidget.ts +2 -2
  94. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +2 -3
  95. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +0 -1
  96. package/front_end/ui/legacy/components/object_ui/object_ui-legacy.ts +0 -8
  97. package/front_end/ui/legacy/components/object_ui/object_ui.ts +0 -4
  98. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -0
  99. package/front_end/ui/legacy/inspectorSyntaxHighlight.css +0 -211
  100. package/front_end/ui/legacy/legacy-legacy.ts +0 -6
  101. package/front_end/ui/legacy/legacy.ts +0 -2
  102. package/front_end/ui/legacy/tabbedPane.css +1 -1
  103. package/inspector_overlay/main.ts +12 -2
  104. package/package.json +1 -1
  105. package/scripts/check_gn.js +1 -1
  106. package/scripts/eslint_rules/lib/l10n_filename_matches.js +17 -4
  107. package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +21 -0
  108. package/scripts/hosted_mode/server.js +17 -2
  109. package/front_end/entrypoints/shell/shell-meta-files.ts +0 -22
  110. package/front_end/entrypoints/shell/shell.json +0 -5
  111. package/front_end/ui/legacy/TextEditor.ts +0 -82
  112. package/front_end/ui/legacy/components/object_ui/JavaScriptAutocomplete.ts +0 -836
  113. package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +0 -1676
  114. package/front_end/ui/legacy/components/text_editor/TextEditorAutocompleteController.ts +0 -586
  115. package/front_end/ui/legacy/components/text_editor/autocompleteTooltip.css +0 -20
  116. package/front_end/ui/legacy/components/text_editor/cm_modes.ts +0 -23
  117. package/front_end/ui/legacy/components/text_editor/cmdevtools.css +0 -995
  118. package/front_end/ui/legacy/components/text_editor/module.json +0 -7
  119. package/front_end/ui/legacy/components/text_editor/text_editor-legacy.ts +0 -33
  120. package/front_end/ui/legacy/components/text_editor/text_editor.ts +0 -13
@@ -21,35 +21,36 @@ declare global {
21
21
  export class TextEditor extends HTMLElement {
22
22
  static readonly litTagName = LitHtml.literal`devtools-text-editor`;
23
23
 
24
- private readonly shadow = this.attachShadow({mode: 'open'});
25
- private activeEditor: CodeMirror.EditorView|undefined = undefined;
26
- private dynamicSettings: readonly DynamicSetting<unknown>[] = DynamicSetting.none;
27
- private activeSettingListeners: [Common.Settings.Setting<unknown>, (event: {data: unknown}) => void][] = [];
28
- private pendingState: CodeMirror.EditorState|undefined;
29
- private lastScrollPos = {left: 0, top: 0};
30
- private resizeTimeout = -1;
31
- private devtoolsResizeObserver = new ResizeObserver(() => {
32
- if (this.resizeTimeout < 0) {
33
- this.resizeTimeout = window.setTimeout(() => {
34
- this.resizeTimeout = -1;
35
- if (this.activeEditor) {
36
- CodeMirror.repositionTooltips(this.activeEditor);
24
+ readonly #shadow = this.attachShadow({mode: 'open'});
25
+ #activeEditor: CodeMirror.EditorView|undefined = undefined;
26
+ #dynamicSettings: readonly DynamicSetting<unknown>[] = DynamicSetting.none;
27
+ #activeSettingListeners: [Common.Settings.Setting<unknown>, (event: {data: unknown}) => void][] = [];
28
+ #pendingState: CodeMirror.EditorState|undefined;
29
+ #lastScrollPos = {left: 0, top: 0};
30
+ #resizeTimeout = -1;
31
+ #resizeListener = (): void => {
32
+ if (this.#resizeTimeout < 0) {
33
+ this.#resizeTimeout = window.setTimeout(() => {
34
+ this.#resizeTimeout = -1;
35
+ if (this.#activeEditor) {
36
+ CodeMirror.repositionTooltips(this.#activeEditor);
37
37
  }
38
38
  }, 50);
39
39
  }
40
- });
40
+ };
41
+ #devtoolsResizeObserver = new ResizeObserver(this.#resizeListener);
41
42
 
42
43
  constructor(pendingState?: CodeMirror.EditorState) {
43
44
  super();
44
- this.pendingState = pendingState;
45
- this.shadow.adoptedStyleSheets = [CodeHighlighter.Style.default];
45
+ this.#pendingState = pendingState;
46
+ this.#shadow.adoptedStyleSheets = [CodeHighlighter.Style.default];
46
47
  }
47
48
 
48
49
  private createEditor(): CodeMirror.EditorView {
49
- this.activeEditor = new CodeMirror.EditorView({
50
+ this.#activeEditor = new CodeMirror.EditorView({
50
51
  state: this.state,
51
- parent: this.shadow,
52
- root: this.shadow,
52
+ parent: this.#shadow,
53
+ root: this.#shadow,
53
54
  dispatch: (tr: CodeMirror.Transaction): void => {
54
55
  this.editor.update([tr]);
55
56
  if (tr.reconfigured) {
@@ -57,19 +58,19 @@ export class TextEditor extends HTMLElement {
57
58
  }
58
59
  },
59
60
  });
60
- this.activeEditor.scrollDOM.scrollTop = this.lastScrollPos.top;
61
- this.activeEditor.scrollDOM.scrollLeft = this.lastScrollPos.left;
62
- this.activeEditor.scrollDOM.addEventListener('scroll', (event): void => {
63
- this.lastScrollPos.left = (event.target as HTMLElement).scrollLeft;
64
- this.lastScrollPos.top = (event.target as HTMLElement).scrollTop;
61
+ this.#activeEditor.scrollDOM.scrollTop = this.#lastScrollPos.top;
62
+ this.#activeEditor.scrollDOM.scrollLeft = this.#lastScrollPos.left;
63
+ this.#activeEditor.scrollDOM.addEventListener('scroll', (event): void => {
64
+ this.#lastScrollPos.left = (event.target as HTMLElement).scrollLeft;
65
+ this.#lastScrollPos.top = (event.target as HTMLElement).scrollTop;
65
66
  });
66
67
  this.ensureSettingListeners();
67
68
  this.startObservingResize();
68
- return this.activeEditor;
69
+ return this.#activeEditor;
69
70
  }
70
71
 
71
72
  get editor(): CodeMirror.EditorView {
72
- return this.activeEditor || this.createEditor();
73
+ return this.#activeEditor || this.createEditor();
73
74
  }
74
75
 
75
76
  dispatch(spec: CodeMirror.TransactionSpec): void {
@@ -77,68 +78,69 @@ export class TextEditor extends HTMLElement {
77
78
  }
78
79
 
79
80
  get state(): CodeMirror.EditorState {
80
- if (this.activeEditor) {
81
- return this.activeEditor.state;
81
+ if (this.#activeEditor) {
82
+ return this.#activeEditor.state;
82
83
  }
83
- if (!this.pendingState) {
84
- this.pendingState = CodeMirror.EditorState.create({extensions: baseConfiguration('')});
84
+ if (!this.#pendingState) {
85
+ this.#pendingState = CodeMirror.EditorState.create({extensions: baseConfiguration('')});
85
86
  }
86
- return this.pendingState;
87
+ return this.#pendingState;
87
88
  }
88
89
 
89
90
  set state(state: CodeMirror.EditorState) {
90
- if (this.activeEditor) {
91
- this.activeEditor.setState(state);
91
+ if (this.#activeEditor) {
92
+ this.#activeEditor.setState(state);
92
93
  } else {
93
- this.pendingState = state;
94
+ this.#pendingState = state;
94
95
  }
95
96
  }
96
97
 
97
98
  connectedCallback(): void {
98
- if (!this.activeEditor) {
99
+ if (!this.#activeEditor) {
99
100
  this.createEditor();
100
101
  }
101
102
  }
102
103
 
103
104
  disconnectedCallback(): void {
104
- if (this.activeEditor) {
105
- this.pendingState = this.activeEditor.state;
106
- this.devtoolsResizeObserver.disconnect();
107
- this.activeEditor.destroy();
108
- this.activeEditor = undefined;
105
+ if (this.#activeEditor) {
106
+ this.#pendingState = this.#activeEditor.state;
107
+ this.#devtoolsResizeObserver.disconnect();
108
+ window.removeEventListener('resize', this.#resizeListener);
109
+ this.#activeEditor.destroy();
110
+ this.#activeEditor = undefined;
109
111
  this.ensureSettingListeners();
110
112
  }
111
113
  }
112
114
 
113
115
  focus(): void {
114
- if (this.activeEditor) {
115
- this.activeEditor.focus();
116
+ if (this.#activeEditor) {
117
+ this.#activeEditor.focus();
116
118
  }
117
119
  }
118
120
 
119
121
  private ensureSettingListeners(): void {
120
- const dynamicSettings = this.activeEditor ? this.activeEditor.state.facet(dynamicSetting) : DynamicSetting.none;
121
- if (dynamicSettings === this.dynamicSettings) {
122
+ const dynamicSettings = this.#activeEditor ? this.#activeEditor.state.facet(dynamicSetting) : DynamicSetting.none;
123
+ if (dynamicSettings === this.#dynamicSettings) {
122
124
  return;
123
125
  }
124
- this.dynamicSettings = dynamicSettings;
126
+ this.#dynamicSettings = dynamicSettings;
125
127
 
126
- for (const [setting, listener] of this.activeSettingListeners) {
128
+ for (const [setting, listener] of this.#activeSettingListeners) {
127
129
  setting.removeChangeListener(listener);
128
130
  }
129
- this.activeSettingListeners = [];
131
+ this.#activeSettingListeners = [];
130
132
 
131
133
  const settings = Common.Settings.Settings.instance();
132
134
  for (const dynamicSetting of dynamicSettings) {
133
135
  const handler = ({data}: {data: unknown}): void => {
134
136
  const change = dynamicSetting.sync(this.state, data);
135
- if (change && this.activeEditor) {
136
- this.activeEditor.dispatch({effects: change});
137
+ if (change && this.#activeEditor) {
138
+ this.#activeEditor.dispatch({effects: change});
137
139
  }
138
140
  };
139
141
  const setting = settings.moduleSetting(dynamicSetting.settingName);
140
142
  setting.addChangeListener(handler);
141
- this.activeSettingListeners.push([setting, handler]);
143
+ this.#activeSettingListeners.push([setting, handler]);
142
144
  }
143
145
  }
144
146
 
@@ -146,12 +148,13 @@ export class TextEditor extends HTMLElement {
146
148
  const devtoolsElement =
147
149
  WindowBoundsService.WindowBoundsService.WindowBoundsServiceImpl.instance().getDevToolsBoundingElement();
148
150
  if (devtoolsElement) {
149
- this.devtoolsResizeObserver.observe(devtoolsElement);
151
+ this.#devtoolsResizeObserver.observe(devtoolsElement);
150
152
  }
153
+ window.addEventListener('resize', this.#resizeListener);
151
154
  }
152
155
 
153
156
  revealPosition(selection: CodeMirror.EditorSelection, highlight: boolean = true): void {
154
- const view = this.activeEditor;
157
+ const view = this.#activeEditor;
155
158
  if (!view) {
156
159
  return;
157
160
  }
@@ -63,7 +63,7 @@ export class DynamicSetting<T> {
63
63
  static none: readonly DynamicSetting<unknown>[] = [];
64
64
  }
65
65
 
66
- export const tabMovesFocus = DynamicSetting.bool('textEditorTabMovesFocus', CM.keymap.of([{
66
+ export const tabMovesFocus = DynamicSetting.bool('textEditorTabMovesFocus', [], CM.keymap.of([{
67
67
  key: 'Tab',
68
68
  run: (view: CM.EditorView): boolean => view.state.doc.length ? CM.indentMore(view) : false,
69
69
  shift: (view: CM.EditorView): boolean => view.state.doc.length ? CM.indentLess(view) : false,
@@ -85,7 +85,7 @@ export function guessIndent(doc: CM.Text): string {
85
85
  let scanned = 0;
86
86
  for (let cur = doc.iterLines(1, Math.min(doc.lines + 1, LINES_TO_SCAN_FOR_INDENTATION_GUESSING)); !cur.next().done;) {
87
87
  let space = (/^\s*/.exec(cur.value) as string[])[0];
88
- if (space.length === cur.value.length || !space.length) {
88
+ if (space.length === cur.value.length || !space.length || cur.value[space.length] === '*') {
89
89
  continue;
90
90
  }
91
91
  if (space[0] === '\t') {
@@ -324,7 +324,7 @@ export const showCompletionHint = CM.ViewPlugin.fromClass(class {
324
324
  if (pos !== lineBefore.to) {
325
325
  return null;
326
326
  }
327
- const wordBefore = /[\w$]+$/.exec(lineBefore.text);
327
+ const wordBefore = /#?[\w$]+$/.exec(lineBefore.text);
328
328
  if (wordBefore && !label.startsWith(wordBefore[0])) {
329
329
  return null;
330
330
  }
@@ -15,6 +15,23 @@ export function completion(): CodeMirror.Extension {
15
15
  });
16
16
  }
17
17
 
18
+ export async function completeInContext(
19
+ textBefore: string, query: string, force: boolean = false): Promise<UI.SuggestBox.Suggestions> {
20
+ const state = CodeMirror.EditorState.create({
21
+ doc: textBefore,
22
+ selection: {anchor: textBefore.length},
23
+ extensions: CodeMirror.javascript.javascriptLanguage,
24
+ });
25
+ const result = await javascriptCompletionSource(new CodeMirror.CompletionContext(state, textBefore.length, force));
26
+ return result ?
27
+ result.options.filter((o): boolean => o.label.startsWith(query)).map((o): UI.SuggestBox.Suggestion => ({
28
+ text: o.label,
29
+ priority: 100 + (o.boost || 0),
30
+ isSecondary: o.type === 'secondary',
31
+ })) :
32
+ [];
33
+ }
34
+
18
35
  class CompletionSet {
19
36
  constructor(
20
37
  readonly completions: CodeMirror.Completion[] = [],
@@ -101,7 +118,7 @@ export function getQueryType(tree: CodeMirror.Tree, pos: number, doc: CodeMirror
101
118
  return null;
102
119
  }
103
120
 
104
- if (node.name === 'PropertyName') {
121
+ if (node.name === 'PropertyName' || node.name === 'PrivatePropertyName') {
105
122
  return parent?.name !== 'MemberExpression' ? null :
106
123
  {type: QueryType.PropertyName, from: node.from, relatedNode: parent};
107
124
  }
@@ -172,7 +189,7 @@ export async function javascriptCompletionSource(cx: CodeMirror.CompletionContex
172
189
  return {
173
190
  from: query.from ?? cx.pos,
174
191
  options: result.completions,
175
- span: /^[\w\P{ASCII}]*/u,
192
+ span: /^#?[\w\P{ASCII}]*/u,
176
193
  };
177
194
  }
178
195
 
@@ -217,10 +234,10 @@ let cacheInstance: PropertyCache|null = null;
217
234
  // Store recent collections of property completions. The empty string
218
235
  // is used to store the set of global bindings.
219
236
  class PropertyCache {
220
- private readonly cache: Map<string, Promise<CompletionSet>> = new Map();
237
+ readonly #cache: Map<string, Promise<CompletionSet>> = new Map();
221
238
 
222
239
  constructor() {
223
- const clear = (): void => this.cache.clear();
240
+ const clear = (): void => this.#cache.clear();
224
241
  SDK.ConsoleModel.ConsoleModel.instance().addEventListener(SDK.ConsoleModel.Events.CommandEvaluated, clear);
225
242
  UI.Context.Context.instance().addFlavorChangeListener(SDK.RuntimeModel.ExecutionContext, clear);
226
243
  SDK.TargetManager.TargetManager.instance().addModelListener(
@@ -230,14 +247,14 @@ class PropertyCache {
230
247
  }
231
248
 
232
249
  get(expression: string): Promise<CompletionSet>|undefined {
233
- return this.cache.get(expression);
250
+ return this.#cache.get(expression);
234
251
  }
235
252
 
236
253
  set(expression: string, value: Promise<CompletionSet>): void {
237
- this.cache.set(expression, value);
254
+ this.#cache.set(expression, value);
238
255
  setTimeout(() => {
239
- if (this.cache.get(expression) === value) {
240
- this.cache.delete(expression);
256
+ if (this.#cache.get(expression) === value) {
257
+ this.#cache.delete(expression);
241
258
  }
242
259
  }, maxCacheAge);
243
260
  }
@@ -312,7 +329,8 @@ async function completePropertiesInner(
312
329
  const properties = await object.getAllProperties(false, false);
313
330
  const isFunction = object.type === 'function';
314
331
  for (const prop of properties.properties || []) {
315
- if (!prop.symbol && !(isFunction && (prop.name === 'arguments' || prop.name === 'caller'))) {
332
+ if (!prop.symbol && !(isFunction && (prop.name === 'arguments' || prop.name === 'caller')) &&
333
+ (!prop.private || expression === 'this')) {
316
334
  const label = quoted ? quoted + prop.name + quoted : prop.name;
317
335
  const completion: CodeMirror.Completion = {
318
336
  label,
@@ -7,6 +7,7 @@ import * as CM from '../../../third_party/codemirror.next/codemirror.next.js';
7
7
  export const editorTheme = CM.EditorView.theme({
8
8
  '&.cm-editor': {
9
9
  color: 'color: var(--color-text-primary)',
10
+ cursor: 'auto',
10
11
  '&.cm-focused': {
11
12
  outline: 'none',
12
13
  },
@@ -26,27 +26,27 @@ export class PromptInputEvent extends Event {
26
26
 
27
27
  export class TextPrompt extends HTMLElement {
28
28
  static readonly litTagName = LitHtml.literal`devtools-text-prompt`;
29
- private readonly shadow = this.attachShadow({mode: 'open'});
30
- private ariaLabelText = '';
31
- private prefixText = '';
32
- private suggestionText = '';
29
+ readonly #shadow = this.attachShadow({mode: 'open'});
30
+ #ariaLabelText = '';
31
+ #prefixText = '';
32
+ #suggestionText = '';
33
33
 
34
34
  connectedCallback(): void {
35
- this.shadow.adoptedStyleSheets = [textPromptStyles];
35
+ this.#shadow.adoptedStyleSheets = [textPromptStyles];
36
36
  }
37
37
 
38
38
  set data(data: TextPromptData) {
39
- this.ariaLabelText = data.ariaLabel;
40
- this.prefixText = data.prefix;
41
- this.suggestionText = data.suggestion;
39
+ this.#ariaLabelText = data.ariaLabel;
40
+ this.#prefixText = data.prefix;
41
+ this.#suggestionText = data.suggestion;
42
42
  this.render();
43
43
  }
44
44
 
45
45
  get data(): TextPromptData {
46
46
  return {
47
- ariaLabel: this.ariaLabelText,
48
- prefix: this.prefixText,
49
- suggestion: this.suggestionText,
47
+ ariaLabel: this.#ariaLabelText,
48
+ prefix: this.#prefixText,
49
+ suggestion: this.#suggestionText,
50
50
  };
51
51
  }
52
52
 
@@ -55,7 +55,7 @@ export class TextPrompt extends HTMLElement {
55
55
  }
56
56
 
57
57
  private input(): HTMLInputElement {
58
- const inputElement = this.shadow.querySelector<HTMLInputElement>('input');
58
+ const inputElement = this.#shadow.querySelector<HTMLInputElement>('input');
59
59
  if (!inputElement) {
60
60
  throw new Error('Expected an input element!');
61
61
  }
@@ -92,12 +92,12 @@ export class TextPrompt extends HTMLElement {
92
92
  }
93
93
 
94
94
  setPrefix(prefix: string): void {
95
- this.prefixText = prefix;
95
+ this.#prefixText = prefix;
96
96
  this.render();
97
97
  }
98
98
 
99
99
  setSuggestion(suggestion: string): void {
100
- this.suggestionText = suggestion;
100
+ this.#suggestionText = suggestion;
101
101
  this.render();
102
102
  }
103
103
 
@@ -112,7 +112,7 @@ export class TextPrompt extends HTMLElement {
112
112
  }
113
113
 
114
114
  private suggestion(): HTMLSpanElement {
115
- const suggestionElement = this.shadow.querySelector<HTMLSpanElement>('.suggestion');
115
+ const suggestionElement = this.#shadow.querySelector<HTMLSpanElement>('.suggestion');
116
116
  if (!suggestionElement) {
117
117
  throw new Error('Expected an suggestion element!');
118
118
  }
@@ -125,11 +125,11 @@ export class TextPrompt extends HTMLElement {
125
125
 
126
126
  private render(): void {
127
127
  const output = LitHtml.html`
128
- <span class="prefix">${this.prefixText} </span>
129
- <span class="text-prompt-input"><input aria-label=${this.ariaLabelText} spellcheck="false" @input=${
128
+ <span class="prefix">${this.#prefixText} </span>
129
+ <span class="text-prompt-input"><input aria-label=${this.#ariaLabelText} spellcheck="false" @input=${
130
130
  this.onInput} @keydown=${this.onKeyDown}/><span class='suggestion' suggestion="${
131
- this.suggestionText}"></span></span>`;
132
- LitHtml.render(output, this.shadow, {host: this});
131
+ this.#suggestionText}"></span></span>`;
132
+ LitHtml.render(output, this.#shadow, {host: this});
133
133
  }
134
134
  }
135
135