chrome-devtools-frontend 1.0.1593518 → 1.0.1595090
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/contributing/settings-experiments-features.md +93 -98
- package/front_end/core/common/README.md +126 -0
- package/front_end/core/host/UserMetrics.ts +1 -2
- package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/CSSModel.ts +22 -0
- package/front_end/core/sdk/CSSNavigation.ts +33 -0
- package/front_end/core/sdk/CSSRule.ts +12 -2
- package/front_end/core/sdk/EmulationModel.ts +41 -1
- package/front_end/core/sdk/sdk-meta.ts +22 -18
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/design_system_tokens.css +538 -259
- package/front_end/entrypoints/main/MainImpl.ts +0 -6
- package/front_end/entrypoints/main/main-meta.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.ts +6 -4
- package/front_end/generated/SupportedCSSProperties.js +12 -0
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +47 -0
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +1 -0
- package/front_end/models/emulation/DeviceModeModel.ts +47 -0
- package/front_end/models/issues_manager/Issue.ts +1 -0
- package/front_end/models/issues_manager/IssueAggregator.ts +9 -9
- package/front_end/models/issues_manager/IssuesManager.ts +5 -5
- package/front_end/models/issues_manager/SelectivePermissionsInterventionIssue.ts +65 -0
- package/front_end/models/issues_manager/descriptions/selectivePermissionsIntervention.md +7 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -4
- package/front_end/models/javascript_metadata/NativeFunctions.js +48 -9
- package/front_end/models/lighthouse/lighthouse.ts +9 -0
- package/front_end/models/persistence/persistence-meta.ts +4 -4
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +12 -1
- package/front_end/panels/ai_assistance/components/ChatInput.ts +37 -30
- package/front_end/panels/ai_assistance/components/ChatView.ts +4 -2
- package/front_end/panels/ai_assistance/components/chatInput.css +26 -1
- package/front_end/panels/application/StorageView.ts +8 -2
- package/front_end/panels/application/preloading/PreloadingView.ts +105 -7
- package/front_end/panels/application/preloading/preloadingView.css +4 -0
- package/front_end/panels/common/AiCodeCompletionDisclaimer.ts +3 -0
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +3 -0
- package/front_end/panels/console/ConsoleView.ts +2 -2
- package/front_end/panels/console/console-meta.ts +18 -14
- package/front_end/panels/elements/ComputedStyleWidget.ts +12 -7
- package/front_end/panels/elements/ElementsPanel.ts +1 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +4 -6
- package/front_end/panels/elements/ImagePreviewPopover.ts +6 -9
- package/front_end/panels/elements/StylePropertiesSection.ts +30 -0
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +1 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +92 -7
- package/front_end/panels/elements/elements-meta.ts +12 -8
- package/front_end/panels/emulation/DeviceModeToolbar.ts +206 -66
- package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +120 -0
- package/front_end/panels/issues/HiddenIssuesRow.ts +1 -1
- package/front_end/panels/issues/IssueKindView.ts +2 -1
- package/front_end/panels/issues/IssueView.ts +4 -4
- package/front_end/panels/issues/IssuesPane.ts +8 -2
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/lighthouse/LighthouseController.ts +3 -3
- package/front_end/panels/lighthouse/LighthousePanel.ts +9 -5
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +5 -5
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +6 -7
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +4 -3
- package/front_end/panels/lighthouse/LighthouseStartView.ts +99 -38
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +53 -14
- package/front_end/panels/lighthouse/RadioSetting.ts +33 -19
- package/front_end/panels/lighthouse/lighthouse.ts +2 -2
- package/front_end/panels/media/PlayerMessagesView.ts +62 -49
- package/front_end/panels/media/media.ts +2 -0
- package/front_end/panels/media/playerMessagesView.css +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +49 -24
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +2 -2
- package/front_end/panels/sources/sources-meta.ts +8 -4
- package/front_end/panels/utils/utils.ts +11 -5
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lit/lib/async-directive.d.ts +465 -0
- package/front_end/third_party/lit/lib/async-directive.js +23 -0
- package/front_end/third_party/lit/lib/async-directive.js.map +1 -0
- package/front_end/third_party/lit/lib/decorators.d.ts +7 -1
- package/front_end/third_party/lit/lib/decorators.js +2 -2
- package/front_end/third_party/lit/lib/decorators.js.map +1 -1
- package/front_end/third_party/lit/lib/directive.js.map +1 -1
- package/front_end/third_party/lit/lib/directives.d.ts +27 -8
- package/front_end/third_party/lit/lib/directives.js +8 -8
- package/front_end/third_party/lit/lib/directives.js.map +1 -1
- package/front_end/third_party/lit/lib/lit.d.ts +15 -5
- package/front_end/third_party/lit/lib/lit.js +4 -4
- package/front_end/third_party/lit/lib/lit.js.map +1 -1
- package/front_end/third_party/lit/lib/static-html.js +2 -2
- package/front_end/third_party/lit/lib/static-html.js.map +1 -1
- package/front_end/third_party/lit/lit.ts +2 -1
- package/front_end/third_party/lit/rollup.config.mjs +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/deno.json +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/package.json +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +2 -2
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -0
- package/front_end/ui/legacy/SuggestBox.ts +4 -0
- package/front_end/ui/legacy/TextPrompt.ts +1 -1
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +27 -23
- package/front_end/ui/lit/lit.ts +1 -0
- package/front_end/ui/visual_logging/Debugging.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +19 -0
- package/inspector_overlay/highlight_grid_common.ts +11 -8
- package/package.json +1 -1
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +0 -78
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +0 -63
- package/front_end/panels/issues/AffectedElementsWithLowContrastView.ts +0 -91
- /package/front_end/{panels → models}/lighthouse/LighthouseReporterTypes.ts +0 -0
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
// Copyright 2021 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
|
-
|
|
6
|
-
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
|
-
import * as Platform from '../../core/platform/platform.js';
|
|
8
|
-
import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
9
|
-
|
|
10
|
-
import {AffectedElementsView} from './AffectedElementsView.js';
|
|
11
|
-
|
|
12
|
-
export class AffectedElementsWithLowContrastView extends AffectedElementsView {
|
|
13
|
-
#runningUpdatePromise: Promise<void> = Promise.resolve();
|
|
14
|
-
|
|
15
|
-
override update(): void {
|
|
16
|
-
// Ensure that doUpdate is invoked atomically by serializing the update calls
|
|
17
|
-
// because it's not re-entrace safe.
|
|
18
|
-
this.#runningUpdatePromise = this.#runningUpdatePromise.then(this.#doUpdate.bind(this));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async #doUpdate(): Promise<void> {
|
|
22
|
-
this.clear();
|
|
23
|
-
await this.#appendLowContrastElements(this.issue.getLowContrastIssues());
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async #appendLowContrastElement(issue: IssuesManager.LowTextContrastIssue.LowTextContrastIssue): Promise<void> {
|
|
27
|
-
const row = document.createElement('tr');
|
|
28
|
-
row.classList.add('affected-resource-low-contrast');
|
|
29
|
-
|
|
30
|
-
const details = issue.details();
|
|
31
|
-
const target = issue.model()?.target() || null;
|
|
32
|
-
row.appendChild(await this.createElementCell(
|
|
33
|
-
{nodeName: details.violatingNodeSelector, backendNodeId: details.violatingNodeId, target},
|
|
34
|
-
issue.getCategory()));
|
|
35
|
-
this.appendIssueDetailCell(row, String(Platform.NumberUtilities.floor(details.contrastRatio, 2)));
|
|
36
|
-
this.appendIssueDetailCell(row, String(details.thresholdAA));
|
|
37
|
-
this.appendIssueDetailCell(row, String(details.thresholdAAA));
|
|
38
|
-
this.appendIssueDetailCell(row, details.fontSize);
|
|
39
|
-
this.appendIssueDetailCell(row, details.fontWeight);
|
|
40
|
-
|
|
41
|
-
this.affectedResources.appendChild(row);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
async #appendLowContrastElements(issues: Iterable<IssuesManager.LowTextContrastIssue.LowTextContrastIssue>):
|
|
45
|
-
Promise<void> {
|
|
46
|
-
const header = document.createElement('tr');
|
|
47
|
-
this.appendColumnTitle(header, i18nString(UIStrings.element));
|
|
48
|
-
this.appendColumnTitle(header, i18nString(UIStrings.contrastRatio));
|
|
49
|
-
this.appendColumnTitle(header, i18nString(UIStrings.minimumAA));
|
|
50
|
-
this.appendColumnTitle(header, i18nString(UIStrings.minimumAAA));
|
|
51
|
-
this.appendColumnTitle(header, i18nString(UIStrings.textSize));
|
|
52
|
-
this.appendColumnTitle(header, i18nString(UIStrings.textWeight));
|
|
53
|
-
|
|
54
|
-
this.affectedResources.appendChild(header);
|
|
55
|
-
let count = 0;
|
|
56
|
-
for (const lowContrastIssue of issues) {
|
|
57
|
-
count++;
|
|
58
|
-
await this.#appendLowContrastElement(lowContrastIssue);
|
|
59
|
-
}
|
|
60
|
-
this.updateAffectedResourceCount(count);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const UIStrings = {
|
|
65
|
-
/**
|
|
66
|
-
* @description Column title for the element column in the low contrast issue view
|
|
67
|
-
*/
|
|
68
|
-
element: 'Element',
|
|
69
|
-
/**
|
|
70
|
-
* @description Column title for the contrast ratio column in the low contrast issue view
|
|
71
|
-
*/
|
|
72
|
-
contrastRatio: 'Contrast ratio',
|
|
73
|
-
/**
|
|
74
|
-
* @description Column title for the minimum AA contrast ratio column in the low contrast issue view
|
|
75
|
-
*/
|
|
76
|
-
minimumAA: 'Minimum AA ratio',
|
|
77
|
-
/**
|
|
78
|
-
* @description Column title for the minimum AAA contrast ratio column in the low contrast issue view
|
|
79
|
-
*/
|
|
80
|
-
minimumAAA: 'Minimum AAA ratio',
|
|
81
|
-
/**
|
|
82
|
-
* @description Column title for the text size column in the low contrast issue view
|
|
83
|
-
*/
|
|
84
|
-
textSize: 'Text size',
|
|
85
|
-
/**
|
|
86
|
-
* @description Column title for the text weight column in the low contrast issue view
|
|
87
|
-
*/
|
|
88
|
-
textWeight: 'Text weight',
|
|
89
|
-
} as const;
|
|
90
|
-
const str_ = i18n.i18n.registerUIStrings('panels/issues/AffectedElementsWithLowContrastView.ts', UIStrings);
|
|
91
|
-
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
File without changes
|