chrome-devtools-frontend 1.0.1549484 → 1.0.1550444
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/styleguide/ux/components.md +53 -12
- package/docs/styleguide/ux/images/cards.png +0 -0
- package/docs/ui_engineering.md +2 -2
- package/front_end/core/sdk/NetworkManager.ts +12 -10
- package/front_end/core/sdk/PageResourceLoader.ts +8 -1
- package/front_end/core/sdk/SourceMapManager.ts +12 -6
- package/front_end/entrypoints/main/MainImpl.ts +0 -9
- package/front_end/foundation/Universe.ts +7 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -2
- package/front_end/generated/protocol-mapping.d.ts +8 -0
- package/front_end/generated/protocol-proxy-api.d.ts +6 -0
- package/front_end/generated/protocol.ts +76 -0
- package/front_end/models/ai_assistance/BuiltInAi.ts +79 -5
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +6 -8
- package/front_end/models/issues_manager/BounceTrackingIssue.ts +4 -14
- package/front_end/models/issues_manager/ClientHintIssue.ts +5 -12
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +5 -12
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +7 -14
- package/front_end/models/issues_manager/CookieIssue.ts +27 -30
- package/front_end/models/issues_manager/CorsIssue.ts +8 -17
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -8
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -14
- package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +7 -14
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +4 -11
- package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +4 -11
- package/front_end/models/issues_manager/GenericIssue.ts +11 -16
- package/front_end/models/issues_manager/HeavyAdIssue.ts +4 -11
- package/front_end/models/issues_manager/Issue.ts +12 -4
- package/front_end/models/issues_manager/IssueAggregator.ts +8 -2
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +3 -10
- package/front_end/models/issues_manager/MixedContentIssue.ts +7 -13
- package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +4 -11
- package/front_end/models/issues_manager/PropertyRuleIssue.ts +6 -12
- package/front_end/models/issues_manager/QuirksModeIssue.ts +3 -10
- package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +7 -13
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +4 -11
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +6 -13
- package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +8 -13
- package/front_end/models/issues_manager/UnencodedDigestIssue.ts +2 -9
- package/front_end/models/javascript_metadata/NativeFunctions.js +0 -13
- package/front_end/panels/application/AppManifestView.ts +4 -4
- package/front_end/panels/application/ApplicationPanelSidebar.ts +21 -21
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -2
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -2
- package/front_end/panels/application/InterestGroupTreeElement.ts +2 -2
- package/front_end/panels/application/OpenedWindowDetailsView.ts +2 -2
- package/front_end/panels/application/OriginTrialTreeView.ts +1 -1
- package/front_end/panels/application/PreloadingTreeElement.ts +3 -3
- package/front_end/panels/application/ReportingApiTreeElement.ts +2 -2
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +3 -3
- package/front_end/panels/application/SharedStorageListTreeElement.ts +2 -2
- package/front_end/panels/application/StorageBucketsTreeElement.ts +3 -3
- package/front_end/panels/application/StorageView.ts +2 -2
- package/front_end/panels/application/TrustTokensTreeElement.ts +2 -2
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ProtocolHandlersView.ts +1 -1
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/changes/ChangesSidebar.ts +2 -0
- package/front_end/panels/changes/CombinedDiffView.ts +2 -0
- package/front_end/panels/common/AnnotationManager.ts +71 -0
- package/front_end/panels/common/PersistenceUtils.ts +6 -7
- package/front_end/panels/common/common.ts +1 -0
- package/front_end/panels/console/ConsolePrompt.ts +4 -4
- package/front_end/panels/console/ConsoleView.ts +2 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +10 -11
- package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +3 -3
- package/front_end/panels/elements/ElementsPanel.ts +49 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +156 -108
- package/front_end/panels/elements/ElementsTreeOutline.ts +9 -2
- package/front_end/panels/elements/ShortcutTreeElement.ts +2 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -5
- package/front_end/panels/elements/TopLayerContainer.ts +2 -2
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
- package/front_end/panels/elements/components/QueryContainer.ts +1 -1
- package/front_end/panels/elements/components/StylePropertyEditor.ts +1 -1
- package/front_end/panels/emulation/DeviceModeWrapper.ts +48 -3
- package/front_end/panels/explain/components/ConsoleInsight.ts +6 -4
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -2
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +2 -2
- package/front_end/panels/issues/IssueKindView.ts +2 -2
- package/front_end/panels/issues/IssueView.ts +4 -4
- package/front_end/panels/js_timeline/js_timeline-meta.ts +4 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
- package/front_end/panels/media/PlayerListView.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +2 -3
- package/front_end/panels/network/NetworkDataGridNode.ts +3 -3
- package/front_end/panels/network/NetworkFrameGrouper.ts +2 -2
- package/front_end/panels/network/NetworkItemView.ts +4 -4
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/SignedExchangeInfoView.ts +2 -2
- package/front_end/panels/network/components/RequestTrustTokensView.ts +5 -6
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +3 -3
- package/front_end/panels/profiler/ProfileDataGrid.ts +2 -2
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/recorder/components/CreateRecordingView.ts +1 -1
- package/front_end/panels/recorder/components/ExtensionView.ts +1 -1
- package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
- package/front_end/panels/recorder/components/RecordingView.ts +1 -1
- package/front_end/panels/recorder/components/StepView.ts +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +8 -8
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/CookieControlsTreeElement.ts +2 -2
- package/front_end/panels/security/CookieReportTreeElement.ts +2 -2
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/security/SecurityPanelSidebar.ts +3 -4
- package/front_end/panels/settings/KeybindsSettingsTab.ts +4 -4
- package/front_end/panels/settings/SettingsScreen.ts +2 -3
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +16 -8
- package/front_end/panels/sources/BreakpointEditDialog.ts +3 -3
- package/front_end/panels/sources/BreakpointsView.ts +1 -1
- package/front_end/panels/sources/CSSPlugin.ts +3 -3
- package/front_end/panels/sources/CallStackSidebarPane.ts +4 -4
- package/front_end/panels/sources/DebuggerPausedMessage.ts +3 -3
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +39 -30
- package/front_end/panels/sources/GoToLineQuickOpen.ts +11 -7
- package/front_end/panels/sources/NavigatorView.ts +2 -2
- package/front_end/panels/sources/OpenFileQuickOpen.ts +11 -15
- package/front_end/panels/sources/OutlineQuickOpen.ts +23 -26
- package/front_end/panels/sources/SourcesView.ts +2 -2
- package/front_end/panels/sources/TabbedEditorContainer.ts +4 -5
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -2
- package/front_end/panels/sources/UISourceCodeFrame.ts +5 -5
- package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -2
- package/front_end/panels/timeline/TimelinePanel.ts +14 -9
- package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +1 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +1 -1
- package/front_end/panels/timeline/components/NetworkThrottlingSelector.ts +1 -1
- package/front_end/panels/timeline/components/OriginMap.ts +1 -1
- package/front_end/panels/timeline/components/insights/Checklist.ts +1 -1
- package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -1
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -1
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +1 -1
- package/front_end/panels/timeline/timeline-meta.ts +3 -2
- package/front_end/panels/utils/utils.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/adorners/Adorner.ts +20 -0
- package/front_end/ui/components/annotations/AnnotationRepository.ts +1 -1
- package/front_end/ui/components/buttons/Button.ts +1 -1
- package/front_end/ui/components/buttons/FloatingButton.ts +1 -1
- package/front_end/ui/components/highlighting/HighlightElement.ts +15 -2
- package/front_end/ui/components/icon_button/FileSourceIcon.ts +1 -1
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/front_end/ui/components/icon_button/icon_button.ts +0 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +3 -3
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +1 -1
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- package/front_end/ui/components/text_editor/config.ts +2 -2
- package/front_end/ui/kit/cards/Card.docs.ts +43 -0
- package/front_end/ui/{components/icon_button → kit/icons}/Icon.docs.ts +3 -4
- package/front_end/ui/{components/icon_button → kit/icons}/Icon.ts +4 -4
- package/front_end/ui/kit/kit.ts +1 -0
- package/front_end/ui/legacy/Infobar.ts +3 -3
- package/front_end/ui/legacy/InspectorView.ts +3 -3
- package/front_end/ui/legacy/SearchableView.ts +2 -2
- package/front_end/ui/legacy/SoftContextMenu.ts +5 -5
- package/front_end/ui/legacy/SoftDropDown.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +9 -9
- package/front_end/ui/legacy/Toolbar.ts +3 -3
- package/front_end/ui/legacy/Treeoutline.ts +2 -2
- package/front_end/ui/legacy/UIUtils.ts +4 -4
- package/front_end/ui/legacy/ViewManager.ts +4 -4
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +8 -8
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +4 -4
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +4 -4
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +2 -2
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +5 -5
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +22 -29
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +8 -15
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +11 -14
- package/front_end/ui/legacy/components/utils/Linkifier.ts +3 -3
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -1
- /package/front_end/ui/{components/icon_button → kit/icons}/icon.css +0 -0
|
@@ -7,7 +7,7 @@ import * as Common from '../../../../core/common/common.js';
|
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
8
8
|
import type * as SDK from '../../../../core/sdk/sdk.js';
|
|
9
9
|
import type * as Protocol from '../../../../generated/protocol.js';
|
|
10
|
-
import
|
|
10
|
+
import {createIcon, type Icon} from '../../../kit/kit.js';
|
|
11
11
|
import * as UI from '../../legacy.js';
|
|
12
12
|
|
|
13
13
|
import customPreviewComponentStyles from './customPreviewComponent.css.js';
|
|
@@ -33,7 +33,7 @@ export class CustomPreviewSection {
|
|
|
33
33
|
private expanded: boolean;
|
|
34
34
|
private cachedContent: Node|null;
|
|
35
35
|
private readonly header: Node|undefined;
|
|
36
|
-
private readonly expandIcon:
|
|
36
|
+
private readonly expandIcon: Icon|undefined;
|
|
37
37
|
constructor(object: SDK.RemoteObject.RemoteObject) {
|
|
38
38
|
this.sectionElement = document.createElement('span');
|
|
39
39
|
this.sectionElement.classList.add('custom-expandable-section');
|
|
@@ -64,7 +64,7 @@ export class CustomPreviewSection {
|
|
|
64
64
|
this.header.classList.add('custom-expandable-section-header');
|
|
65
65
|
}
|
|
66
66
|
this.header.addEventListener('click', this.onClick.bind(this), false);
|
|
67
|
-
this.expandIcon =
|
|
67
|
+
this.expandIcon = createIcon('triangle-right', 'custom-expand-icon');
|
|
68
68
|
this.header.insertBefore(this.expandIcon, this.header.firstChild);
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -7,7 +7,7 @@ import * as Common from '../../../../core/common/common.js';
|
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
8
8
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
9
9
|
import type * as NetworkTimeCalculator from '../../../../models/network_time_calculator/network_time_calculator.js';
|
|
10
|
-
import
|
|
10
|
+
import {createIcon, type Icon} from '../../../kit/kit.js';
|
|
11
11
|
import * as VisualLogging from '../../../visual_logging/visual_logging.js';
|
|
12
12
|
import * as UI from '../../legacy.js';
|
|
13
13
|
|
|
@@ -137,7 +137,7 @@ export class Window extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
|
137
137
|
private breadcrumbButtonContainerElement: HTMLElement;
|
|
138
138
|
private createBreadcrumbButton: HTMLElement;
|
|
139
139
|
private curtainsRange?: HTMLElement;
|
|
140
|
-
private breadcrumbZoomIcon?:
|
|
140
|
+
private breadcrumbZoomIcon?: Icon;
|
|
141
141
|
|
|
142
142
|
private overviewWindowSelector!: WindowSelector|undefined;
|
|
143
143
|
private offsetLeft!: number;
|
|
@@ -213,7 +213,7 @@ export class Window extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
|
213
213
|
|
|
214
214
|
enableCreateBreadcrumbsButton(): HTMLElement {
|
|
215
215
|
this.curtainsRange = this.createBreadcrumbButton.createChild('div');
|
|
216
|
-
this.breadcrumbZoomIcon =
|
|
216
|
+
this.breadcrumbZoomIcon = createIcon('zoom-in');
|
|
217
217
|
this.createBreadcrumbButton.appendChild(this.breadcrumbZoomIcon);
|
|
218
218
|
this.createBreadcrumbButton.addEventListener('click', () => {
|
|
219
219
|
this.#createBreadcrumb();
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import '../../../kit/kit.js';
|
|
6
|
+
import '../../../components/highlighting/highlighting.js';
|
|
7
|
+
|
|
5
8
|
import * as Common from '../../../../core/common/common.js';
|
|
6
9
|
import * as Host from '../../../../core/host/host.js';
|
|
7
10
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
8
11
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
9
12
|
import * as Diff from '../../../../third_party/diff/diff.js';
|
|
10
|
-
import
|
|
13
|
+
import {html, nothing, type TemplateResult} from '../../../lit/lit.js';
|
|
11
14
|
import * as UI from '../../legacy.js';
|
|
12
15
|
|
|
13
16
|
import {FilteredListWidget, Provider, registerProvider} from './FilteredListWidget.js';
|
|
@@ -340,36 +343,26 @@ export class CommandMenuProvider extends Provider {
|
|
|
340
343
|
return score;
|
|
341
344
|
}
|
|
342
345
|
|
|
343
|
-
override renderItem(itemIndex: number, query: string
|
|
346
|
+
override renderItem(itemIndex: number, query: string): TemplateResult {
|
|
344
347
|
const command = this.commands[itemIndex];
|
|
345
|
-
|
|
346
|
-
const itemElement = wrapperElement.createChild('div');
|
|
347
|
-
const titleElement = itemElement.createChild('div');
|
|
348
|
-
|
|
349
|
-
titleElement.removeChildren();
|
|
350
|
-
const icon = IconButton.Icon.create(categoryIcons[command.category]);
|
|
351
|
-
wrapperElement.insertBefore(icon, itemElement);
|
|
352
|
-
UI.UIUtils.createTextChild(titleElement, command.title);
|
|
353
|
-
FilteredListWidget.highlightRanges(titleElement, query, true);
|
|
354
|
-
|
|
355
|
-
const subtitleElement = itemElement.createChild('div');
|
|
356
|
-
if (command.featurePromotionId) {
|
|
357
|
-
const badge = UI.UIUtils.maybeCreateNewBadge(command.featurePromotionId);
|
|
358
|
-
if (badge) {
|
|
359
|
-
itemElement.insertBefore(badge, subtitleElement);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
subtitleElement.textContent = command.shortcut;
|
|
364
|
-
|
|
348
|
+
const badge = command.featurePromotionId ? UI.UIUtils.maybeCreateNewBadge(command.featurePromotionId) : undefined;
|
|
365
349
|
const deprecationWarning = command.deprecationWarning;
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
350
|
+
// clang-format off
|
|
351
|
+
return html`
|
|
352
|
+
<devtools-icon name=${categoryIcons[command.category]}></devtools-icon>
|
|
353
|
+
<div>
|
|
354
|
+
<devtools-highlight type="markup" ranges=${FilteredListWidget.getHighlightRanges(command.title, query, true)}>
|
|
355
|
+
${command.title}
|
|
356
|
+
</devtools-highlight>
|
|
357
|
+
${badge ?? nothing}
|
|
358
|
+
<div>${command.shortcut}</div>
|
|
359
|
+
${deprecationWarning ? html`
|
|
360
|
+
<span class="deprecated-tag" title=${deprecationWarning}>
|
|
361
|
+
${i18nString(UIStrings.deprecated)}
|
|
362
|
+
</span>` : nothing}
|
|
363
|
+
</div>
|
|
364
|
+
<span class="tag">${command.category}</span>`;
|
|
365
|
+
// clang-format on
|
|
373
366
|
}
|
|
374
367
|
|
|
375
368
|
override jslogContextAt(itemIndex: number): string {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright 2012 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
4
|
+
/* eslint-disable @devtools/no-imperative-dom-api, @devtools/no-lit-render-outside-of-view */
|
|
5
5
|
|
|
6
6
|
import * as Common from '../../../../core/common/common.js';
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
@@ -9,8 +9,8 @@ import * as Platform from '../../../../core/platform/platform.js';
|
|
|
9
9
|
import * as Geometry from '../../../../models/geometry/geometry.js';
|
|
10
10
|
import * as TextUtils from '../../../../models/text_utils/text_utils.js';
|
|
11
11
|
import * as Diff from '../../../../third_party/diff/diff.js';
|
|
12
|
-
import * as Highlighting from '../../../../ui/components/highlighting/highlighting.js';
|
|
13
12
|
import * as TextPrompt from '../../../../ui/components/text_prompt/text_prompt.js';
|
|
13
|
+
import {type LitTemplate, nothing, render} from '../../../lit/lit.js';
|
|
14
14
|
import * as VisualLogging from '../../../visual_logging/visual_logging.js';
|
|
15
15
|
import * as UI from '../../legacy.js';
|
|
16
16
|
|
|
@@ -118,9 +118,9 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
|
|
|
118
118
|
this.queryChangedCallback = queryChangedCallback;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
static
|
|
121
|
+
static getHighlightRanges(text: string, query: string, caseInsensitive?: boolean): string {
|
|
122
122
|
if (!query) {
|
|
123
|
-
return
|
|
123
|
+
return '';
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
function rangesForMatch(text: string, query: string): TextUtils.TextRange.SourceRange[]|null {
|
|
@@ -139,19 +139,11 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
|
|
|
139
139
|
return ranges;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
if (element.textContent === null) {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
const text = element.textContent;
|
|
146
142
|
let ranges = rangesForMatch(text, query);
|
|
147
143
|
if (!ranges || caseInsensitive) {
|
|
148
144
|
ranges = rangesForMatch(text.toUpperCase(), query.toUpperCase());
|
|
149
145
|
}
|
|
150
|
-
|
|
151
|
-
Highlighting.highlightRangesWithStyleClass(element, ranges, 'highlight');
|
|
152
|
-
return true;
|
|
153
|
-
}
|
|
154
|
-
return false;
|
|
146
|
+
return ranges?.map(range => `${range.offset},${range.length}`).join(' ') || '';
|
|
155
147
|
}
|
|
156
148
|
|
|
157
149
|
setCommandPrefix(commandPrefix: string): void {
|
|
@@ -286,7 +278,7 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
|
|
|
286
278
|
wrapperElement.className = 'filtered-list-widget-item';
|
|
287
279
|
|
|
288
280
|
if (this.provider) {
|
|
289
|
-
this.provider.renderItem(item, this.cleanValue(), wrapperElement);
|
|
281
|
+
render(this.provider.renderItem(item, this.cleanValue()), wrapperElement);
|
|
290
282
|
wrapperElement.setAttribute(
|
|
291
283
|
'jslog', `${VisualLogging.item(this.provider.jslogContextAt(item)).track({click: true})}`);
|
|
292
284
|
}
|
|
@@ -622,7 +614,8 @@ export class Provider {
|
|
|
622
614
|
return 1;
|
|
623
615
|
}
|
|
624
616
|
|
|
625
|
-
renderItem(_itemIndex: number, _query: string
|
|
617
|
+
renderItem(_itemIndex: number, _query: string): LitTemplate {
|
|
618
|
+
return nothing;
|
|
626
619
|
}
|
|
627
620
|
|
|
628
621
|
jslogContextAt(_itemIndex: number): string {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Copyright 2017 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
4
|
|
|
6
|
-
import
|
|
7
|
-
|
|
5
|
+
import '../../../kit/kit.js';
|
|
6
|
+
|
|
7
|
+
import {html, type TemplateResult} from '../../../lit/lit.js';
|
|
8
8
|
|
|
9
9
|
import {getRegisteredProviders, Provider, type ProviderRegistration, registerProvider} from './FilteredListWidget.js';
|
|
10
10
|
import {QuickOpenImpl} from './QuickOpen.js';
|
|
@@ -44,18 +44,15 @@ export class HelpQuickOpen extends Provider {
|
|
|
44
44
|
return -this.providers[itemIndex].prefix.length;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
override renderItem(itemIndex: number, _query: string
|
|
47
|
+
override renderItem(itemIndex: number, _query: string): TemplateResult {
|
|
48
48
|
const provider = this.providers[itemIndex];
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
wrapperElement.insertBefore(iconElement, itemElement);
|
|
57
|
-
|
|
58
|
-
UI.UIUtils.createTextChild(titleElement, provider.title);
|
|
49
|
+
// clang-format off
|
|
50
|
+
return html`
|
|
51
|
+
<devtools-icon class="large" name=${provider.iconName}></devtools-icon>
|
|
52
|
+
<div>
|
|
53
|
+
<div>${provider.title}</div>
|
|
54
|
+
</div>`;
|
|
55
|
+
// clang-format on
|
|
59
56
|
}
|
|
60
57
|
|
|
61
58
|
override jslogContextAt(itemIndex: number): string {
|
|
@@ -16,8 +16,8 @@ import type * as StackTrace from '../../../../models/stack_trace/stack_trace.js'
|
|
|
16
16
|
import * as TextUtils from '../../../../models/text_utils/text_utils.js';
|
|
17
17
|
import type * as Trace from '../../../../models/trace/trace.js';
|
|
18
18
|
import * as Workspace from '../../../../models/workspace/workspace.js';
|
|
19
|
-
import type * as IconButton from '../../../components/icon_button/icon_button.js';
|
|
20
19
|
import * as UIHelpers from '../../../helpers/helpers.js';
|
|
20
|
+
import type {Icon} from '../../../kit/kit.js';
|
|
21
21
|
import {html, render} from '../../../lit/lit.js';
|
|
22
22
|
import * as VisualLogging from '../../../visual_logging/visual_logging.js';
|
|
23
23
|
import * as UI from '../../legacy.js';
|
|
@@ -946,7 +946,7 @@ export class Linkifier extends Common.ObjectWrapper.ObjectWrapper<EventTypes> im
|
|
|
946
946
|
}
|
|
947
947
|
|
|
948
948
|
export interface LinkDecorator extends Common.EventTarget.EventTarget<LinkDecorator.EventTypes> {
|
|
949
|
-
linkIcon(uiSourceCode: Workspace.UISourceCode.UISourceCode):
|
|
949
|
+
linkIcon(uiSourceCode: Workspace.UISourceCode.UISourceCode): Icon|null;
|
|
950
950
|
}
|
|
951
951
|
|
|
952
952
|
export namespace LinkDecorator {
|
|
@@ -1106,7 +1106,7 @@ export class ContentProviderContextMenuProvider implements
|
|
|
1106
1106
|
}
|
|
1107
1107
|
|
|
1108
1108
|
interface LinkInfo {
|
|
1109
|
-
icon:
|
|
1109
|
+
icon: Icon|null;
|
|
1110
1110
|
enableDecorator: boolean;
|
|
1111
1111
|
uiLocation: Workspace.UISourceCode.UILocation|null;
|
|
1112
1112
|
liveLocation: Bindings.LiveLocation.LiveLocation|null;
|
package/mcp/mcp.ts
CHANGED
|
@@ -47,6 +47,7 @@ export {
|
|
|
47
47
|
IssuesManager
|
|
48
48
|
} from '../front_end/models/issues_manager/IssuesManager.js';
|
|
49
49
|
export * as MarkdownIssueDescription from '../front_end/models/issues_manager/MarkdownIssueDescription.js';
|
|
50
|
+
export * as StackTrace from '../front_end/models/stack_trace/stack_trace.js';
|
|
50
51
|
export * as TraceEngine from '../front_end/models/trace/trace.js';
|
|
51
52
|
export * as Marked from '../front_end/third_party/marked/marked.js';
|
|
52
53
|
|
package/package.json
CHANGED
|
File without changes
|