chrome-devtools-frontend 1.0.940714 → 1.0.942529
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/config/gni/all_devtools_files.gni +0 -57
- package/config/gni/devtools_grd_files.gni +55 -15
- package/config/gni/devtools_image_files.gni +2 -3
- package/front_end/.eslintrc.js +12 -1
- package/front_end/Images/src/feedback_button_icon.svg +3 -0
- package/front_end/Images/src/{feedback_thin_16x16_icon.svg → survey_feedback_icon.svg} +1 -1
- package/front_end/Tests.js +15 -0
- package/front_end/core/common/Color.ts +5 -0
- package/front_end/core/i18n/locales/en-US.json +31 -28
- package/front_end/core/i18n/locales/en-XL.json +31 -28
- package/front_end/core/sdk/DebuggerModel.ts +4 -14
- package/front_end/core/sdk/sdk-meta.ts +17 -3
- package/front_end/emulated_devices/module.json +1 -3
- package/front_end/entrypoints/devtools_app/devtools_app.json +1 -9
- package/front_end/entrypoints/main/MainImpl.ts +26 -0
- package/front_end/entrypoints/shell/shell.js +0 -11
- package/front_end/entrypoints/shell/shell.json +0 -2
- package/front_end/entrypoints/worker_app/worker_app.json +0 -4
- package/front_end/generated/InspectorBackendCommands.js +1 -0
- package/front_end/generated/protocol.d.ts +2 -0
- package/front_end/global_typings/global_defs.d.ts +5 -0
- package/front_end/legacy_test_runner/bindings_test_runner/IsolatedFilesystemTestRunner.js +2 -2
- package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +14 -2
- package/front_end/legacy_test_runner/legacy_test_runner.ts +10 -1
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +11 -0
- package/front_end/models/formatter/SourceFormatter.ts +0 -10
- package/front_end/models/workspace/UISourceCode.ts +9 -42
- package/front_end/panels/animation/AnimationTimeline.ts +3 -3
- package/front_end/panels/application/ApplicationPanelSidebar.ts +3 -3
- package/front_end/panels/application/application-meta.ts +0 -3
- package/front_end/panels/application/components/EndpointsGrid.ts +1 -1
- package/front_end/panels/application/components/ReportsGrid.ts +1 -1
- package/front_end/panels/console/ConsolePinPane.ts +21 -26
- package/front_end/panels/coverage/CoverageDecorationManager.ts +4 -5
- package/front_end/panels/coverage/CoverageView.ts +2 -105
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +11 -56
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -8
- package/front_end/panels/elements/ElementsTreeElement.ts +4 -9
- package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -0
- package/front_end/panels/elements/components/adornerSettingsPane.css +0 -4
- package/front_end/panels/emulation/DeviceModeToolbar.ts +3 -1
- package/front_end/panels/emulation/DeviceModeView.ts +2 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +3 -1
- package/front_end/panels/emulation/MediaQueryInspector.ts +3 -1
- package/front_end/panels/emulation/emulation-meta.ts +2 -4
- package/front_end/panels/issues/issues-meta.ts +0 -2
- package/front_end/panels/layers/module.json +0 -1
- package/front_end/panels/lighthouse/LighthousePanel.ts +2 -4
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -4
- package/front_end/panels/lighthouse/lighthouseStartView.css +4 -0
- package/front_end/panels/lighthouse/module.json +1 -4
- package/front_end/panels/media/media-meta.ts +0 -3
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +2 -1
- package/front_end/panels/network/network-meta.ts +0 -3
- package/front_end/panels/profiler/module.json +1 -4
- package/front_end/panels/screencast/module.json +1 -4
- package/front_end/panels/security/security-meta.ts +0 -3
- package/front_end/panels/sources/BreakpointEditDialog.ts +16 -30
- package/front_end/panels/sources/CSSPlugin.ts +310 -331
- package/front_end/panels/sources/CallStackSidebarPane.ts +28 -34
- package/front_end/panels/sources/CoveragePlugin.ts +121 -6
- package/front_end/panels/sources/DebuggerPlugin.ts +1166 -1243
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +71 -101
- package/front_end/panels/sources/GoToLineQuickOpen.ts +4 -3
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +3 -3
- package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +26 -23
- package/front_end/panels/sources/Plugin.ts +20 -4
- package/front_end/panels/sources/ProfilePlugin.ts +185 -0
- package/front_end/panels/sources/ScriptFormatterEditorAction.ts +3 -3
- package/front_end/panels/sources/ScriptOriginPlugin.ts +0 -10
- package/front_end/panels/sources/SnippetsPlugin.ts +1 -10
- package/front_end/panels/sources/SourcesPanel.ts +15 -10
- package/front_end/panels/sources/SourcesView.ts +10 -8
- package/front_end/panels/sources/TabbedEditorContainer.ts +31 -27
- package/front_end/panels/sources/UISourceCodeFrame.ts +335 -470
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -2
- package/front_end/panels/sources/sources-legacy.ts +0 -6
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/panels/timeline/module.json +0 -3
- package/front_end/third_party/codemirror.next/bundle.ts +9 -13
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/javascript.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -6
- package/front_end/third_party/codemirror.next/chunk/php.js +2 -6
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +2 -2
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +279 -198
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +13 -11
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1128 -1158
- package/front_end/third_party/lighthouse/locales/ar-XB.json +211 -79
- package/front_end/third_party/lighthouse/locales/ar.json +213 -81
- package/front_end/third_party/lighthouse/locales/bg.json +211 -79
- package/front_end/third_party/lighthouse/locales/ca.json +212 -80
- package/front_end/third_party/lighthouse/locales/cs.json +211 -79
- package/front_end/third_party/lighthouse/locales/da.json +211 -79
- package/front_end/third_party/lighthouse/locales/de.json +211 -79
- package/front_end/third_party/lighthouse/locales/el.json +213 -81
- package/front_end/third_party/lighthouse/locales/en-GB.json +211 -79
- package/front_end/third_party/lighthouse/locales/en-US.json +186 -75
- package/front_end/third_party/lighthouse/locales/en-XA.json +211 -79
- package/front_end/third_party/lighthouse/locales/en-XL.json +186 -75
- package/front_end/third_party/lighthouse/locales/es-419.json +211 -79
- package/front_end/third_party/lighthouse/locales/es.json +212 -80
- package/front_end/third_party/lighthouse/locales/fi.json +211 -79
- package/front_end/third_party/lighthouse/locales/fil.json +211 -79
- package/front_end/third_party/lighthouse/locales/fr.json +211 -79
- package/front_end/third_party/lighthouse/locales/he.json +212 -80
- package/front_end/third_party/lighthouse/locales/hi.json +214 -82
- package/front_end/third_party/lighthouse/locales/hr.json +211 -79
- package/front_end/third_party/lighthouse/locales/hu.json +211 -79
- package/front_end/third_party/lighthouse/locales/id.json +211 -79
- package/front_end/third_party/lighthouse/locales/it.json +211 -79
- package/front_end/third_party/lighthouse/locales/ja.json +211 -79
- package/front_end/third_party/lighthouse/locales/ko.json +211 -79
- package/front_end/third_party/lighthouse/locales/lt.json +211 -79
- package/front_end/third_party/lighthouse/locales/lv.json +214 -82
- package/front_end/third_party/lighthouse/locales/nl.json +211 -79
- package/front_end/third_party/lighthouse/locales/no.json +211 -79
- package/front_end/third_party/lighthouse/locales/pl.json +211 -79
- package/front_end/third_party/lighthouse/locales/pt-PT.json +211 -79
- package/front_end/third_party/lighthouse/locales/pt.json +211 -79
- package/front_end/third_party/lighthouse/locales/ro.json +212 -80
- package/front_end/third_party/lighthouse/locales/ru.json +211 -79
- package/front_end/third_party/lighthouse/locales/sk.json +211 -79
- package/front_end/third_party/lighthouse/locales/sl.json +211 -79
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +211 -79
- package/front_end/third_party/lighthouse/locales/sr.json +211 -79
- package/front_end/third_party/lighthouse/locales/sv.json +211 -79
- package/front_end/third_party/lighthouse/locales/ta.json +218 -86
- package/front_end/third_party/lighthouse/locales/te.json +251 -119
- package/front_end/third_party/lighthouse/locales/th.json +211 -79
- package/front_end/third_party/lighthouse/locales/tr.json +211 -79
- package/front_end/third_party/lighthouse/locales/uk.json +212 -80
- package/front_end/third_party/lighthouse/locales/vi.json +211 -79
- package/front_end/third_party/lighthouse/locales/zh-HK.json +211 -79
- package/front_end/third_party/lighthouse/locales/zh-TW.json +211 -79
- package/front_end/third_party/lighthouse/locales/zh.json +211 -79
- package/front_end/third_party/lighthouse/report/bundle.d.ts +72 -34
- package/front_end/third_party/lighthouse/report/bundle.js +698 -492
- package/front_end/third_party/lighthouse/report-assets/report-generator.js +1 -2
- package/front_end/third_party/lighthouse/report-assets/report.js +40 -35
- package/front_end/third_party/lighthouse/report-assets/standalone-template.html +2 -4
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +60 -68
- package/front_end/ui/components/data_grid/dataGrid.css +12 -10
- package/front_end/ui/components/docs/css_overview/start_view.html +25 -0
- package/front_end/ui/components/docs/css_overview/start_view.ts +14 -0
- package/front_end/ui/components/docs/icon_button/basic.ts +3 -3
- package/front_end/ui/components/docs/panel_feedback/basic.html +25 -0
- package/front_end/ui/components/docs/panel_feedback/basic.ts +20 -0
- package/front_end/ui/components/docs/panel_feedback/button.html +25 -0
- package/front_end/ui/components/docs/panel_feedback/button.ts +18 -0
- package/front_end/ui/components/helpers/get-stylesheet.ts +0 -13
- package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +1 -1
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +67 -0
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +100 -0
- package/front_end/ui/components/panel_feedback/panelFeedback.css +76 -0
- package/front_end/ui/components/panel_feedback/panel_feedback.ts +6 -0
- package/front_end/ui/components/report_view/reportValue.css +1 -0
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- package/front_end/ui/components/text_editor/TextEditor.ts +79 -36
- package/front_end/ui/components/text_editor/config.ts +42 -26
- package/front_end/ui/components/text_editor/javascript.ts +2 -3
- package/front_end/ui/components/text_editor/position.ts +17 -0
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/components/text_editor/theme.ts +5 -1
- package/front_end/ui/legacy/Dialog.ts +3 -1
- package/front_end/ui/legacy/DropTarget.ts +2 -1
- package/front_end/ui/legacy/EmptyWidget.ts +2 -1
- package/front_end/ui/legacy/FilterBar.ts +2 -1
- package/front_end/ui/legacy/GlassPane.ts +4 -2
- package/front_end/ui/legacy/Infobar.ts +5 -8
- package/front_end/ui/legacy/InspectorView.ts +6 -1
- package/front_end/ui/legacy/ListWidget.ts +2 -1
- package/front_end/ui/legacy/PopoverHelper.ts +2 -1
- package/front_end/ui/legacy/ProgressIndicator.ts +2 -1
- package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +2 -1
- package/front_end/ui/legacy/ReportView.ts +2 -1
- package/front_end/ui/legacy/RootView.ts +2 -1
- package/front_end/ui/legacy/SearchableView.ts +2 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +11 -7
- package/front_end/ui/legacy/SoftContextMenu.ts +2 -1
- package/front_end/ui/legacy/SoftDropDown.ts +4 -2
- package/front_end/ui/legacy/SplitWidget.ts +2 -1
- package/front_end/ui/legacy/SuggestBox.ts +2 -1
- package/front_end/ui/legacy/TabbedPane.ts +2 -1
- package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -1
- package/front_end/ui/legacy/TextPrompt.ts +2 -1
- package/front_end/ui/legacy/Toolbar.ts +3 -2
- package/front_end/ui/legacy/Treeoutline.ts +3 -2
- package/front_end/ui/legacy/UIUtils.ts +16 -13
- package/front_end/ui/legacy/ViewManager.ts +2 -1
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +2 -1
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +3 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -1
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +35 -131
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +2 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +3 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +2 -1
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +2 -2
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +3 -6
- package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +19 -14
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +502 -252
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -0
- package/front_end/ui/legacy/components/source_frame/module.json +0 -3
- package/front_end/ui/legacy/components/source_frame/source_frame-legacy.ts +0 -11
- package/front_end/ui/legacy/components/source_frame/source_frame.ts +0 -2
- package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +2 -0
- package/front_end/ui/legacy/components/text_editor/cmdevtools.css +3 -1
- package/front_end/ui/legacy/components/text_editor/module.json +0 -3
- package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -15
- package/front_end/ui/legacy/radioButton.css +1 -13
- package/front_end/ui/legacy/softContextMenu.css +1 -0
- package/front_end/ui/legacy/themeColors.css +36 -0
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +7 -9
- package/front_end/ui/legacy/utils/append-style.ts +9 -4
- package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +2 -2
- package/front_end/ui/legacy/utils/inject-core-styles.ts +7 -4
- package/package.json +1 -1
- package/scripts/build/generate_css_js_files.js +23 -9
- package/scripts/build/ninja/generate_css.gni +10 -1
- package/scripts/eslint_rules/lib/check_css_import.js +2 -2
- package/scripts/eslint_rules/tests/check_css_import_test.js +12 -0
- package/front_end/Images/radioDot-dark-theme.png +0 -0
- package/front_end/Images/radioDot.png +0 -0
- package/front_end/panels/application/module.json +0 -7
- package/front_end/panels/emulation/module.json +0 -11
- package/front_end/panels/issues/module.json +0 -6
- package/front_end/panels/layer_viewer/module.json +0 -6
- package/front_end/panels/media/module.json +0 -6
- package/front_end/panels/network/module.json +0 -6
- package/front_end/panels/security/module.json +0 -5
- package/front_end/third_party/lighthouse/report-assets/report.css +0 -1774
- package/front_end/ui/legacy/components/perf_ui/module.json +0 -13
- package/front_end/ui/legacy/components/source_frame/SourcesTextEditor.ts +0 -1030
- package/front_end/ui/legacy/module.json +0 -41
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
export type ComponentName = '3pFilter' | 'audit' | 'categoryHeader' | 'chevron' | 'clump' | 'crc' | 'crcChain' | 'elementScreenshot' | '
|
|
2
|
+
export type ComponentName = '3pFilter' | 'audit' | 'categoryHeader' | 'chevron' | 'clump' | 'crc' | 'crcChain' | 'elementScreenshot' | 'footer' | 'fraction' | 'gauge' | 'gaugePwa' | 'heading' | 'metric' | 'opportunity' | 'opportunityHeader' | 'scorescale' | 'scoresWrapper' | 'snippet' | 'snippetContent' | 'snippetHeader' | 'snippetLine' | 'styles' | 'topbar' | 'warningsToplevel';
|
|
3
3
|
export type I18n<T> = any;
|
|
4
|
+
export type DetailsRenderer = any;
|
|
4
5
|
export type CRCSegment = {
|
|
5
|
-
node: any
|
|
6
|
+
node: any;
|
|
6
7
|
isLastChild: boolean;
|
|
7
8
|
hasChildren: boolean;
|
|
8
9
|
startTime: number;
|
|
9
10
|
transferSize: number;
|
|
10
|
-
treeMarkers:
|
|
11
|
+
treeMarkers: boolean[];
|
|
11
12
|
};
|
|
12
13
|
export type LineDetails = {
|
|
13
14
|
content: string;
|
|
@@ -35,14 +36,17 @@ export type LineDetails = {
|
|
|
35
36
|
export class DOM {
|
|
36
37
|
/**
|
|
37
38
|
* @param {Document} document
|
|
39
|
+
* @param {HTMLElement} rootEl
|
|
38
40
|
*/
|
|
39
|
-
constructor(document: Document);
|
|
41
|
+
constructor(document: Document, rootEl: HTMLElement);
|
|
40
42
|
/** @type {Document} */
|
|
41
43
|
_document: Document;
|
|
42
44
|
/** @type {string} */
|
|
43
45
|
_lighthouseChannel: string;
|
|
44
46
|
/** @type {Map<string, DocumentFragment>} */
|
|
45
47
|
_componentCache: Map<string, DocumentFragment>;
|
|
48
|
+
/** @type {HTMLElement} */
|
|
49
|
+
rootEl: HTMLElement;
|
|
46
50
|
/**
|
|
47
51
|
* @template {string} T
|
|
48
52
|
* @param {T} name
|
|
@@ -61,6 +65,11 @@ export class DOM {
|
|
|
61
65
|
* @return {!DocumentFragment}
|
|
62
66
|
*/
|
|
63
67
|
createFragment(): DocumentFragment;
|
|
68
|
+
/**
|
|
69
|
+
* @param {string} data
|
|
70
|
+
* @return {!Node}
|
|
71
|
+
*/
|
|
72
|
+
createTextNode(data: string): Node;
|
|
64
73
|
/**
|
|
65
74
|
* @template {string} T
|
|
66
75
|
* @param {Element} parentElem
|
|
@@ -104,6 +113,8 @@ export class DOM {
|
|
|
104
113
|
*/
|
|
105
114
|
setLighthouseChannel(lighthouseChannel: string): void;
|
|
106
115
|
/**
|
|
116
|
+
* ONLY use if `dom.rootEl` isn't sufficient for your needs. `dom.rootEl` is preferred
|
|
117
|
+
* for all scoping, because a document can have multiple reports within it.
|
|
107
118
|
* @return {Document}
|
|
108
119
|
*/
|
|
109
120
|
document(): Document;
|
|
@@ -135,6 +146,12 @@ export class DOM {
|
|
|
135
146
|
* @param {*=} detail Custom data to include.
|
|
136
147
|
*/
|
|
137
148
|
fireEventOn(name: string, target?: Node | undefined, detail?: any | undefined): void;
|
|
149
|
+
/**
|
|
150
|
+
* Downloads a file (blob) using a[download].
|
|
151
|
+
* @param {Blob|File} blob The file to save.
|
|
152
|
+
* @param {string} filename
|
|
153
|
+
*/
|
|
154
|
+
saveFile(blob: Blob | File, filename: string): void;
|
|
138
155
|
}
|
|
139
156
|
/**
|
|
140
157
|
* @license
|
|
@@ -162,12 +179,15 @@ export class ReportRenderer {
|
|
|
162
179
|
constructor(dom: DOM);
|
|
163
180
|
/** @type {DOM} */
|
|
164
181
|
_dom: DOM;
|
|
182
|
+
/** @type {LH.Renderer.Options} */
|
|
183
|
+
_opts: any;
|
|
165
184
|
/**
|
|
166
185
|
* @param {LH.Result} lhr
|
|
167
|
-
* @param {
|
|
186
|
+
* @param {HTMLElement?} rootEl Report root element containing the report
|
|
187
|
+
* @param {LH.Renderer.Options=} opts
|
|
168
188
|
* @return {!Element}
|
|
169
189
|
*/
|
|
170
|
-
renderReport(lhr: any,
|
|
190
|
+
renderReport(lhr: any, rootEl: HTMLElement | null, opts?: any): Element;
|
|
171
191
|
/**
|
|
172
192
|
* @param {LH.ReportResult} report
|
|
173
193
|
* @return {DocumentFragment}
|
|
@@ -182,6 +202,11 @@ export class ReportRenderer {
|
|
|
182
202
|
* @return {DocumentFragment}
|
|
183
203
|
*/
|
|
184
204
|
_renderReportFooter(report: any): DocumentFragment;
|
|
205
|
+
/**
|
|
206
|
+
* @param {LH.ReportResult} report
|
|
207
|
+
* @param {DocumentFragment} footer
|
|
208
|
+
*/
|
|
209
|
+
_renderMetaBlock(report: any, footer: DocumentFragment): void;
|
|
185
210
|
/**
|
|
186
211
|
* Returns a div with a list of top-level warnings, or an empty div if no warnings.
|
|
187
212
|
* @param {LH.ReportResult} report
|
|
@@ -204,14 +229,14 @@ export class ReportRenderer {
|
|
|
204
229
|
export class ReportUIFeatures {
|
|
205
230
|
/**
|
|
206
231
|
* @param {DOM} dom
|
|
232
|
+
* @param {LH.Renderer.Options} opts
|
|
207
233
|
*/
|
|
208
|
-
constructor(dom: DOM);
|
|
234
|
+
constructor(dom: DOM, opts?: any);
|
|
209
235
|
/** @type {LH.Result} */
|
|
210
236
|
json: any;
|
|
211
237
|
/** @type {DOM} */
|
|
212
238
|
_dom: DOM;
|
|
213
|
-
|
|
214
|
-
_document: Document;
|
|
239
|
+
_opts: any;
|
|
215
240
|
_topbar: TopbarFeatures;
|
|
216
241
|
/**
|
|
217
242
|
* Handle media query change events.
|
|
@@ -225,10 +250,9 @@ export class ReportUIFeatures {
|
|
|
225
250
|
*/
|
|
226
251
|
initFeatures(lhr: any): void;
|
|
227
252
|
/**
|
|
228
|
-
* @param {{
|
|
253
|
+
* @param {{text: string, icon?: string, onClick: () => void}} opts
|
|
229
254
|
*/
|
|
230
255
|
addButton(opts: {
|
|
231
|
-
container?: Element;
|
|
232
256
|
text: string;
|
|
233
257
|
icon?: string;
|
|
234
258
|
onClick: () => void;
|
|
@@ -252,9 +276,9 @@ export class ReportUIFeatures {
|
|
|
252
276
|
_resetUIState(): void;
|
|
253
277
|
_setupThirdPartyFilter(): void;
|
|
254
278
|
/**
|
|
255
|
-
* @param {Element}
|
|
279
|
+
* @param {Element} rootEl
|
|
256
280
|
*/
|
|
257
|
-
_setupElementScreenshotOverlay(
|
|
281
|
+
_setupElementScreenshotOverlay(rootEl: Element): void;
|
|
258
282
|
/**
|
|
259
283
|
* From a table with URL entries, finds the rows containing third-party URLs
|
|
260
284
|
* and returns them.
|
|
@@ -264,11 +288,24 @@ export class ReportUIFeatures {
|
|
|
264
288
|
*/
|
|
265
289
|
_getThirdPartyRows(rowEls: HTMLElement[], finalUrl: string): Array<HTMLElement>;
|
|
266
290
|
/**
|
|
267
|
-
*
|
|
268
|
-
*
|
|
291
|
+
* DevTools uses its own file manager to download files, so it redefines this function.
|
|
292
|
+
* Wrapper is necessary so DevTools can still override this function.
|
|
293
|
+
*
|
|
294
|
+
* @param {Blob|File} blob
|
|
269
295
|
*/
|
|
270
296
|
_saveFile(blob: Blob | File): void;
|
|
271
297
|
}
|
|
298
|
+
/**
|
|
299
|
+
* @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
|
|
300
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
301
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
302
|
+
*/
|
|
303
|
+
/**
|
|
304
|
+
* @param {LH.Result} lhr
|
|
305
|
+
* @param {LH.Renderer.Options} opts
|
|
306
|
+
* @return {HTMLElement}
|
|
307
|
+
*/
|
|
308
|
+
export function renderReport(lhr: any, opts?: any): HTMLElement;
|
|
272
309
|
type LineContentType = number;
|
|
273
310
|
declare namespace LineContentType {
|
|
274
311
|
const CONTENT_NORMAL: number;
|
|
@@ -329,6 +366,13 @@ declare class CategoryRenderer {
|
|
|
329
366
|
* @return {!Element}
|
|
330
367
|
*/
|
|
331
368
|
populateAuditValues(audit: any, component: DocumentFragment): Element;
|
|
369
|
+
/**
|
|
370
|
+
* Inject the final screenshot next to the score gauge of the first category (likely Performance)
|
|
371
|
+
* @param {HTMLElement} categoriesEl
|
|
372
|
+
* @param {LH.ReportResult['audits']} audits
|
|
373
|
+
* @param {Element} scoreScaleEl
|
|
374
|
+
*/
|
|
375
|
+
injectFinalScreenshot(categoriesEl: HTMLElement, audits: any, scoreScaleEl: Element): any;
|
|
332
376
|
/**
|
|
333
377
|
* @return {Element}
|
|
334
378
|
*/
|
|
@@ -353,9 +397,9 @@ declare class CategoryRenderer {
|
|
|
353
397
|
* Renders the group container for a group of audits. Individual audit elements can be added
|
|
354
398
|
* directly to the returned element.
|
|
355
399
|
* @param {LH.Result.ReportGroup} group
|
|
356
|
-
* @return {Element}
|
|
400
|
+
* @return {[Element, Element | null]}
|
|
357
401
|
*/
|
|
358
|
-
renderAuditGroup(group: any): Element;
|
|
402
|
+
renderAuditGroup(group: any): [Element, Element | null];
|
|
359
403
|
/**
|
|
360
404
|
* Takes an array of auditRefs, groups them if requested, then returns an
|
|
361
405
|
* array of audit and audit-group elements.
|
|
@@ -451,21 +495,14 @@ declare class CategoryRenderer {
|
|
|
451
495
|
* ⋮
|
|
452
496
|
* @param {LH.ReportResult.Category} category
|
|
453
497
|
* @param {Object<string, LH.Result.ReportGroup>=} groupDefinitions
|
|
454
|
-
* @param {{
|
|
498
|
+
* @param {{gatherMode: LH.Result.GatherMode}=} options
|
|
455
499
|
* @return {Element}
|
|
456
500
|
*/
|
|
457
501
|
render(category: any, groupDefinitions?: {
|
|
458
502
|
[x: string]: any;
|
|
459
503
|
} | undefined, options?: {
|
|
460
|
-
environment?: 'PSI';
|
|
461
504
|
gatherMode: any;
|
|
462
505
|
} | undefined): Element;
|
|
463
|
-
/**
|
|
464
|
-
* Create a non-semantic span used for hash navigation of categories
|
|
465
|
-
* @param {Element} element
|
|
466
|
-
* @param {string} id
|
|
467
|
-
*/
|
|
468
|
-
createPermalinkSpan(element: Element, id: string): void;
|
|
469
506
|
}
|
|
470
507
|
/**
|
|
471
508
|
* @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
|
|
@@ -482,16 +519,14 @@ declare class TopbarFeatures {
|
|
|
482
519
|
lhr: any;
|
|
483
520
|
_reportUIFeatures: ReportUIFeatures;
|
|
484
521
|
_dom: DOM;
|
|
485
|
-
/** @type {Document} */
|
|
486
|
-
_document: Document;
|
|
487
522
|
_dropDownMenu: DropDownMenu;
|
|
488
523
|
_copyAttempt: boolean;
|
|
489
524
|
/** @type {HTMLElement} */
|
|
490
525
|
topbarEl: HTMLElement;
|
|
491
526
|
/** @type {HTMLElement} */
|
|
492
|
-
|
|
493
|
-
/** @type {HTMLElement} */
|
|
494
|
-
stickyHeaderEl: HTMLElement;
|
|
527
|
+
categoriesEl: HTMLElement;
|
|
528
|
+
/** @type {HTMLElement?} */
|
|
529
|
+
stickyHeaderEl: HTMLElement | null;
|
|
495
530
|
/** @type {HTMLElement} */
|
|
496
531
|
highlightEl: HTMLElement;
|
|
497
532
|
/**
|
|
@@ -514,7 +549,6 @@ declare class TopbarFeatures {
|
|
|
514
549
|
* open a `<details>` element.
|
|
515
550
|
*/
|
|
516
551
|
collapseAllDetails(): void;
|
|
517
|
-
_updateStickyHeaderOnScroll(): void;
|
|
518
552
|
/**
|
|
519
553
|
* @param {LH.Result} lhr
|
|
520
554
|
*/
|
|
@@ -539,15 +573,19 @@ declare class TopbarFeatures {
|
|
|
539
573
|
/**
|
|
540
574
|
* Finds the first scrollable ancestor of `element`. Falls back to the document.
|
|
541
575
|
* @param {Element} element
|
|
542
|
-
* @return {
|
|
576
|
+
* @return {Element | Document}
|
|
543
577
|
*/
|
|
544
|
-
_getScrollParent(element: Element):
|
|
578
|
+
_getScrollParent(element: Element): Element | Document;
|
|
545
579
|
/**
|
|
546
580
|
* Sets up listeners to collapse audit `<details>` when the user closes the
|
|
547
581
|
* print dialog, all `<details>` are collapsed.
|
|
548
582
|
*/
|
|
549
583
|
_setUpCollapseDetailsAfterPrinting(): void;
|
|
550
|
-
|
|
584
|
+
_setupStickyHeader(): void;
|
|
585
|
+
/**
|
|
586
|
+
* Toggle visibility and update highlighter position
|
|
587
|
+
*/
|
|
588
|
+
_updateStickyHeader(): void;
|
|
551
589
|
}
|
|
552
590
|
declare class DetailsRenderer {
|
|
553
591
|
/**
|