lighthouse 9.5.0-dev.20230122 → 9.5.0-dev.20230123
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/core/audits/bf-cache.js +1 -1
- package/core/audits/screenshot-thumbnails.d.ts +2 -1
- package/core/audits/screenshot-thumbnails.js +14 -9
- package/core/computed/processed-navigation.d.ts +12 -6
- package/core/computed/processed-navigation.js +19 -6
- package/core/util.cjs +42 -9
- package/core/util.d.cts +114 -2
- package/dist/report/bundle.esm.js +199 -261
- package/dist/report/flow.js +23 -23
- package/dist/report/standalone.js +17 -17
- package/flow-report/assets/standalone-flow-template.html +1 -1
- package/flow-report/src/i18n/i18n.d.ts +103 -100
- package/flow-report/src/i18n/i18n.tsx +12 -8
- package/flow-report/src/sidebar/sidebar.tsx +1 -1
- package/flow-report/src/summary/category.tsx +1 -1
- package/flow-report/src/topbar.tsx +4 -28
- package/package.json +2 -2
- package/readme.md +1 -1
- package/report/assets/standalone-template.html +1 -1
- package/report/assets/styles.css +3 -3
- package/report/assets/templates.html +4 -28
- package/report/renderer/category-renderer.js +9 -9
- package/report/renderer/components.js +119 -202
- package/report/renderer/crc-details-renderer.js +4 -3
- package/report/renderer/{i18n.d.ts → i18n-formatter.d.ts} +3 -9
- package/report/renderer/{i18n.js → i18n-formatter.js} +2 -11
- package/report/renderer/performance-category-renderer.js +4 -4
- package/report/renderer/report-renderer.js +14 -18
- package/report/renderer/report-ui-features.js +6 -6
- package/report/renderer/snippet-renderer.js +1 -1
- package/report/renderer/util.d.ts +115 -3
- package/report/renderer/util.js +42 -9
- package/report/test/renderer/category-renderer-test.js +2 -2
- package/report/test/renderer/crc-details-renderer-test.js +2 -2
- package/report/test/renderer/details-renderer-test.js +2 -2
- package/report/test/renderer/dom-test.js +2 -2
- package/report/test/renderer/element-screenshot-renderer-test.js +2 -2
- package/report/test/renderer/{i18n-test.js → i18n-formatter-test.js} +15 -21
- package/report/test/renderer/performance-category-renderer-test.js +2 -2
- package/report/test/renderer/pwa-category-renderer-test.js +2 -2
- package/report/test/renderer/snippet-renderer-test.js +2 -2
- package/report/test/renderer/util-test.js +2 -2
- package/report/test-assets/lhr-3.0.0.json +2332 -0
- package/report/test-assets/lhr-4.3.0.json +4754 -0
- package/report/test-assets/lhr-5.0.0.json +5994 -0
- package/report/test-assets/lhr-6.0.0.json +7222 -0
- package/report/test-assets/lhr-8.5.0.json +8679 -0
- package/shared/localization/locales/en-US.json +1 -1
- package/shared/localization/locales/en-XL.json +1 -1
package/core/audits/bf-cache.js
CHANGED
|
@@ -15,7 +15,7 @@ const UIStrings = {
|
|
|
15
15
|
/** Title of a diagnostic Lighthouse audit that identifies when the back/forward cache is being used. "back/forward" refers to the back and forward buttons found in modern browsers. This title is shown to users if the page attempted to restore from the back/forward cache but the back/forward cache was not used. */
|
|
16
16
|
failureTitle: 'Page prevented back/forward cache restoration',
|
|
17
17
|
/** Description of a diagnostic Lighthouse audit that identifies when the back/forward cache is being used. "back/forward" refers to the back and forward buttons found in modern browsers. */
|
|
18
|
-
description: 'Many navigations are performed by going back to a previous page, or forwards again. The back/forward cache (bfcache) can speed up these return navigations. [Learn more about the bfcache](https://
|
|
18
|
+
description: 'Many navigations are performed by going back to a previous page, or forwards again. The back/forward cache (bfcache) can speed up these return navigations. [Learn more about the bfcache](https://developer.chrome.com/docs/lighthouse/performance/bf-cache/)',
|
|
19
19
|
/** Failure type for an error that the user should be able to address themselves. Shown in a table column with other failure types. */
|
|
20
20
|
actionableFailureType: 'Actionable',
|
|
21
21
|
/** Failure type for an error that the user cannot address in the page's code. Shown in a table column with other failure types. */
|
|
@@ -7,9 +7,10 @@ declare class ScreenshotThumbnails extends Audit {
|
|
|
7
7
|
* ratio of the original thumbnail.
|
|
8
8
|
*
|
|
9
9
|
* @param {ReturnType<SpeedlineFrame['getParsedImage']>} imageData
|
|
10
|
+
* @param {number} scaledWidth
|
|
10
11
|
* @return {{width: number, height: number, data: Uint8Array}}
|
|
11
12
|
*/
|
|
12
|
-
static scaleImageToThumbnail(imageData: ReturnType<SpeedlineFrame['getParsedImage']
|
|
13
|
+
static scaleImageToThumbnail(imageData: ReturnType<SpeedlineFrame['getParsedImage']>, scaledWidth: number): {
|
|
13
14
|
width: number;
|
|
14
15
|
height: number;
|
|
15
16
|
data: Uint8Array;
|
|
@@ -10,8 +10,7 @@ import {Audit} from './audit.js';
|
|
|
10
10
|
import {LighthouseError} from '../lib/lh-error.js';
|
|
11
11
|
import {Speedline} from '../computed/speedline.js';
|
|
12
12
|
|
|
13
|
-
const NUMBER_OF_THUMBNAILS =
|
|
14
|
-
const THUMBNAIL_WIDTH = 120;
|
|
13
|
+
const NUMBER_OF_THUMBNAILS = 8;
|
|
15
14
|
|
|
16
15
|
/** @typedef {LH.Artifacts.Speedline['frames'][0]} SpeedlineFrame */
|
|
17
16
|
|
|
@@ -34,10 +33,10 @@ class ScreenshotThumbnails extends Audit {
|
|
|
34
33
|
* ratio of the original thumbnail.
|
|
35
34
|
*
|
|
36
35
|
* @param {ReturnType<SpeedlineFrame['getParsedImage']>} imageData
|
|
36
|
+
* @param {number} scaledWidth
|
|
37
37
|
* @return {{width: number, height: number, data: Uint8Array}}
|
|
38
38
|
*/
|
|
39
|
-
static scaleImageToThumbnail(imageData) {
|
|
40
|
-
const scaledWidth = THUMBNAIL_WIDTH;
|
|
39
|
+
static scaleImageToThumbnail(imageData, scaledWidth) {
|
|
41
40
|
const scaleFactor = imageData.width / scaledWidth;
|
|
42
41
|
const scaledHeight = Math.floor(imageData.height / scaleFactor);
|
|
43
42
|
|
|
@@ -79,6 +78,8 @@ class ScreenshotThumbnails extends Audit {
|
|
|
79
78
|
|
|
80
79
|
// Make the minimum time range 3s so sites that load super quickly don't get a single screenshot
|
|
81
80
|
const minimumTimelineDuration = context.options.minimumTimelineDuration || 3000;
|
|
81
|
+
const numberOfThumbnails = context.options.numberOfThumbnails || NUMBER_OF_THUMBNAILS;
|
|
82
|
+
const thumbnailWidth = context.options.thumbnailWidth || null;
|
|
82
83
|
|
|
83
84
|
const thumbnails = [];
|
|
84
85
|
const analyzedFrames = speedline.frames.filter(frame => !frame.isProgressInterpolated());
|
|
@@ -91,13 +92,13 @@ class ScreenshotThumbnails extends Audit {
|
|
|
91
92
|
throw new LighthouseError(LighthouseError.errors.INVALID_SPEEDLINE);
|
|
92
93
|
}
|
|
93
94
|
|
|
94
|
-
for (let i = 1; i <=
|
|
95
|
-
const targetTimestamp = speedline.beginning + timelineEnd * i /
|
|
95
|
+
for (let i = 1; i <= numberOfThumbnails; i++) {
|
|
96
|
+
const targetTimestamp = speedline.beginning + timelineEnd * i / numberOfThumbnails;
|
|
96
97
|
|
|
97
98
|
/** @type {SpeedlineFrame} */
|
|
98
99
|
// @ts-expect-error - there will always be at least one frame by this point. TODO: use nonnullable assertion in TS2.9
|
|
99
100
|
let frameForTimestamp = null;
|
|
100
|
-
if (i ===
|
|
101
|
+
if (i === numberOfThumbnails) {
|
|
101
102
|
frameForTimestamp = analyzedFrames[analyzedFrames.length - 1];
|
|
102
103
|
} else {
|
|
103
104
|
analyzedFrames.forEach(frame => {
|
|
@@ -111,11 +112,15 @@ class ScreenshotThumbnails extends Audit {
|
|
|
111
112
|
const cachedThumbnail = cachedThumbnails.get(frameForTimestamp);
|
|
112
113
|
if (cachedThumbnail) {
|
|
113
114
|
base64Data = cachedThumbnail;
|
|
114
|
-
} else {
|
|
115
|
+
} else if (thumbnailWidth !== null) {
|
|
115
116
|
const imageData = frameForTimestamp.getParsedImage();
|
|
116
|
-
const thumbnailImageData =
|
|
117
|
+
const thumbnailImageData =
|
|
118
|
+
ScreenshotThumbnails.scaleImageToThumbnail(imageData, thumbnailWidth);
|
|
117
119
|
base64Data = jpeg.encode(thumbnailImageData, 90).data.toString('base64');
|
|
118
120
|
cachedThumbnails.set(frameForTimestamp, base64Data);
|
|
121
|
+
} else {
|
|
122
|
+
base64Data = frameForTimestamp.getImage().toString('base64');
|
|
123
|
+
cachedThumbnails.set(frameForTimestamp, base64Data);
|
|
119
124
|
}
|
|
120
125
|
thumbnails.push({
|
|
121
126
|
timing: Math.round(targetTimestamp - speedline.beginning),
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
export { ProcessedNavigationComputed as ProcessedNavigation };
|
|
2
2
|
declare const ProcessedNavigationComputed: typeof ProcessedNavigation & {
|
|
3
|
-
request: (dependencies: import("../index.js").Trace, context: import("../../types/utility-types.js").default.ImmutableObject<{
|
|
3
|
+
request: (dependencies: import("../index.js").Trace | import("../index.js").Artifacts.ProcessedTrace, context: import("../../types/utility-types.js").default.ImmutableObject<{
|
|
4
4
|
computedCache: Map<string, import("../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
5
5
|
}>) => Promise<import("../index.js").Artifacts.ProcessedNavigation>;
|
|
6
6
|
};
|
|
7
7
|
declare class ProcessedNavigation {
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
* @param {LH.Trace | LH.Artifacts.ProcessedTrace} traceOrProcessedTrace
|
|
10
|
+
* @return {traceOrProcessedTrace is LH.Artifacts.ProcessedTrace}
|
|
11
|
+
*/
|
|
12
|
+
static isProcessedTrace(traceOrProcessedTrace: LH.Trace | LH.Artifacts.ProcessedTrace): traceOrProcessedTrace is import("../index.js").Artifacts.ProcessedTrace;
|
|
13
|
+
/**
|
|
14
|
+
* @param {LH.Trace | LH.Artifacts.ProcessedTrace} traceOrProcessedTrace
|
|
15
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
16
|
+
* @return {Promise<LH.Artifacts.ProcessedNavigation>}
|
|
17
|
+
*/
|
|
18
|
+
static compute_(traceOrProcessedTrace: LH.Trace | LH.Artifacts.ProcessedTrace, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.ProcessedNavigation>;
|
|
14
19
|
}
|
|
20
|
+
import { ProcessedTrace } from "./processed-trace.js";
|
|
15
21
|
//# sourceMappingURL=processed-navigation.d.ts.map
|
|
@@ -10,12 +10,25 @@ import LHTraceProcessor from '../lib/lh-trace-processor.js';
|
|
|
10
10
|
|
|
11
11
|
class ProcessedNavigation {
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
* @param {LH.Trace | LH.Artifacts.ProcessedTrace} traceOrProcessedTrace
|
|
14
|
+
* @return {traceOrProcessedTrace is LH.Artifacts.ProcessedTrace}
|
|
15
|
+
*/
|
|
16
|
+
static isProcessedTrace(traceOrProcessedTrace) {
|
|
17
|
+
return 'timeOriginEvt' in traceOrProcessedTrace;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @param {LH.Trace | LH.Artifacts.ProcessedTrace} traceOrProcessedTrace
|
|
22
|
+
* @param {LH.Artifacts.ComputedContext} context
|
|
23
|
+
* @return {Promise<LH.Artifacts.ProcessedNavigation>}
|
|
24
|
+
*/
|
|
25
|
+
static async compute_(traceOrProcessedTrace, context) {
|
|
26
|
+
// TODO: Remove this backport once pubads passes in a raw trace.
|
|
27
|
+
if (this.isProcessedTrace(traceOrProcessedTrace)) {
|
|
28
|
+
return LHTraceProcessor.processNavigation(traceOrProcessedTrace);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const processedTrace = await ProcessedTrace.request(traceOrProcessedTrace, context);
|
|
19
32
|
return LHTraceProcessor.processNavigation(processedTrace);
|
|
20
33
|
}
|
|
21
34
|
}
|
package/core/util.cjs
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* limitations under the License.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
/** @
|
|
22
|
+
/** @typedef {import('./i18n-formatter').I18nFormatter} I18nFormatter */
|
|
23
23
|
|
|
24
24
|
const ELLIPSIS = '\u2026';
|
|
25
25
|
const NBSP = '\xa0';
|
|
@@ -42,9 +42,21 @@ const listOfTlds = [
|
|
|
42
42
|
];
|
|
43
43
|
|
|
44
44
|
class Util {
|
|
45
|
-
/** @type {
|
|
45
|
+
/** @type {I18nFormatter} */
|
|
46
46
|
// @ts-expect-error: Is set in report renderer.
|
|
47
47
|
static i18n = null;
|
|
48
|
+
static strings = /** @type {typeof UIStrings} */ ({});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @param {Record<string, string>} providedStrings
|
|
52
|
+
*/
|
|
53
|
+
static applyStrings(providedStrings) {
|
|
54
|
+
this.strings = {
|
|
55
|
+
// Set missing renderer strings to default (english) values.
|
|
56
|
+
...UIStrings,
|
|
57
|
+
...providedStrings,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
48
60
|
|
|
49
61
|
static get PASS_THRESHOLD() {
|
|
50
62
|
return PASS_THRESHOLD;
|
|
@@ -154,6 +166,10 @@ class Util {
|
|
|
154
166
|
}
|
|
155
167
|
}
|
|
156
168
|
}
|
|
169
|
+
|
|
170
|
+
// TODO: convert printf-style displayValue.
|
|
171
|
+
// Added: #5099, v3
|
|
172
|
+
// Removed: #6767, v4
|
|
157
173
|
}
|
|
158
174
|
}
|
|
159
175
|
|
|
@@ -216,6 +232,20 @@ class Util {
|
|
|
216
232
|
});
|
|
217
233
|
}
|
|
218
234
|
|
|
235
|
+
// Add some minimal stuff so older reports still work.
|
|
236
|
+
if (!clone.environment) {
|
|
237
|
+
// @ts-expect-error
|
|
238
|
+
clone.environment = {benchmarkIndex: 0};
|
|
239
|
+
}
|
|
240
|
+
if (!clone.configSettings.screenEmulation) {
|
|
241
|
+
// @ts-expect-error
|
|
242
|
+
clone.configSettings.screenEmulation = {};
|
|
243
|
+
}
|
|
244
|
+
if (!clone.i18n) {
|
|
245
|
+
// @ts-expect-error
|
|
246
|
+
clone.i18n = {};
|
|
247
|
+
}
|
|
248
|
+
|
|
219
249
|
// In 10.0, full-page-screenshot became a top-level property on the LHR.
|
|
220
250
|
if (clone.audits['full-page-screenshot']) {
|
|
221
251
|
const details = /** @type {LH.Result.FullPageScreenshot=} */ (
|
|
@@ -511,7 +541,7 @@ class Util {
|
|
|
511
541
|
|
|
512
542
|
switch (settings.throttlingMethod) {
|
|
513
543
|
case 'provided':
|
|
514
|
-
summary = networkThrottling = cpuThrottling = Util.
|
|
544
|
+
summary = networkThrottling = cpuThrottling = Util.strings.throttlingProvided;
|
|
515
545
|
break;
|
|
516
546
|
case 'devtools': {
|
|
517
547
|
const {cpuSlowdownMultiplier, requestLatencyMs} = throttling;
|
|
@@ -526,7 +556,8 @@ class Util {
|
|
|
526
556
|
throttling.downloadThroughputKbps === 1.6 * 1024 * 0.9 &&
|
|
527
557
|
throttling.uploadThroughputKbps === 750 * 0.9;
|
|
528
558
|
};
|
|
529
|
-
summary = isSlow4G() ?
|
|
559
|
+
summary = isSlow4G() ?
|
|
560
|
+
Util.strings.runtimeSlow4g : Util.strings.runtimeCustom;
|
|
530
561
|
break;
|
|
531
562
|
}
|
|
532
563
|
case 'simulate': {
|
|
@@ -539,11 +570,12 @@ class Util {
|
|
|
539
570
|
const isSlow4G = () => {
|
|
540
571
|
return rttMs === 150 && throughputKbps === 1.6 * 1024;
|
|
541
572
|
};
|
|
542
|
-
summary = isSlow4G() ?
|
|
573
|
+
summary = isSlow4G() ?
|
|
574
|
+
Util.strings.runtimeSlow4g : Util.strings.runtimeCustom;
|
|
543
575
|
break;
|
|
544
576
|
}
|
|
545
577
|
default:
|
|
546
|
-
summary = cpuThrottling = networkThrottling = Util.
|
|
578
|
+
summary = cpuThrottling = networkThrottling = Util.strings.runtimeUnknown;
|
|
547
579
|
}
|
|
548
580
|
|
|
549
581
|
// devtools-entry.js always sets `screenEmulation.disabled` when using mobile emulation,
|
|
@@ -556,11 +588,11 @@ class Util {
|
|
|
556
588
|
settings.formFactor === 'mobile' :
|
|
557
589
|
settings.screenEmulation.mobile;
|
|
558
590
|
|
|
559
|
-
let deviceEmulation = Util.
|
|
591
|
+
let deviceEmulation = Util.strings.runtimeMobileEmulation;
|
|
560
592
|
if (isScreenEmulationDisabled) {
|
|
561
|
-
deviceEmulation = Util.
|
|
593
|
+
deviceEmulation = Util.strings.runtimeNoEmulation;
|
|
562
594
|
} else if (!isScreenEmulationMobile) {
|
|
563
|
-
deviceEmulation = Util.
|
|
595
|
+
deviceEmulation = Util.strings.runtimeDesktopEmulation;
|
|
564
596
|
}
|
|
565
597
|
|
|
566
598
|
const screenEmulation = isScreenEmulationDisabled ?
|
|
@@ -805,6 +837,7 @@ const UIStrings = {
|
|
|
805
837
|
runtimeCustom: 'Custom throttling',
|
|
806
838
|
};
|
|
807
839
|
Util.UIStrings = UIStrings;
|
|
840
|
+
Util.strings = {...UIStrings};
|
|
808
841
|
|
|
809
842
|
module.exports = {
|
|
810
843
|
Util,
|
package/core/util.d.cts
CHANGED
|
@@ -1,7 +1,119 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type I18nFormatter = any;
|
|
2
2
|
export class Util {
|
|
3
|
-
/** @type {
|
|
3
|
+
/** @type {I18nFormatter} */
|
|
4
4
|
static i18n: any;
|
|
5
|
+
static strings: {
|
|
6
|
+
/** Disclaimer shown to users below the metric values (First Contentful Paint, Time to Interactive, etc) to warn them that the numbers they see will likely change slightly the next time they run Lighthouse. */
|
|
7
|
+
varianceDisclaimer: string;
|
|
8
|
+
/** Text link pointing to an interactive calculator that explains Lighthouse scoring. The link text should be fairly short. */
|
|
9
|
+
calculatorLink: string;
|
|
10
|
+
/** Label preceding a radio control for filtering the list of audits. The radio choices are various performance metrics (FCP, LCP, TBT), and if chosen, the audits in the report are hidden if they are not relevant to the selected metric. */
|
|
11
|
+
showRelevantAudits: string;
|
|
12
|
+
/** Column heading label for the listing of opportunity audits. Each audit title represents an opportunity. There are only 2 columns, so no strict character limit. */
|
|
13
|
+
opportunityResourceColumnLabel: string;
|
|
14
|
+
/** Column heading label for the estimated page load savings of opportunity audits. Estimated Savings is the total amount of time (in seconds) that Lighthouse computed could be reduced from the total page load time, if the suggested action is taken. There are only 2 columns, so no strict character limit. */
|
|
15
|
+
opportunitySavingsColumnLabel: string;
|
|
16
|
+
/** An error string displayed next to a particular audit when it has errored, but not provided any specific error message. */
|
|
17
|
+
errorMissingAuditInfo: string;
|
|
18
|
+
/** A label, shown next to an audit title or metric title, indicating that there was an error computing it. The user can hover on the label to reveal a tooltip with the extended error message. Translation should be short (< 20 characters). */
|
|
19
|
+
errorLabel: string;
|
|
20
|
+
/** This label is shown above a bulleted list of warnings. It is shown directly below an audit that produced warnings. Warnings describe situations the user should be aware of, as Lighthouse was unable to complete all the work required on this audit. For example, The 'Unable to decode image (biglogo.jpg)' warning may show up below an image encoding audit. */
|
|
21
|
+
warningHeader: string;
|
|
22
|
+
/** Section heading shown above a list of passed audits that contain warnings. Audits under this section do not negatively impact the score, but Lighthouse has generated some potentially actionable suggestions that should be reviewed. This section is expanded by default and displays after the failing audits. */
|
|
23
|
+
warningAuditsGroupTitle: string;
|
|
24
|
+
/** Section heading shown above a list of audits that are passing. 'Passed' here refers to a passing grade. This section is collapsed by default, as the user should be focusing on the failed audits instead. Users can click this heading to reveal the list. */
|
|
25
|
+
passedAuditsGroupTitle: string;
|
|
26
|
+
/** Section heading shown above a list of audits that do not apply to the page. For example, if an audit is 'Are images optimized?', but the page has no images on it, the audit will be marked as not applicable. This is neither passing or failing. This section is collapsed by default, as the user should be focusing on the failed audits instead. Users can click this heading to reveal the list. */
|
|
27
|
+
notApplicableAuditsGroupTitle: string;
|
|
28
|
+
/** Section heading shown above a list of audits that were not computed by Lighthouse. They serve as a list of suggestions for the user to go and manually check. For example, Lighthouse can't automate testing cross-browser compatibility, so that is listed within this section, so the user is reminded to test it themselves. This section is collapsed by default, as the user should be focusing on the failed audits instead. Users can click this heading to reveal the list. */
|
|
29
|
+
manualAuditsGroupTitle: string;
|
|
30
|
+
/** Label shown preceding any important warnings that may have invalidated the entire report. For example, if the user has Chrome extensions installed, they may add enough performance overhead that Lighthouse's performance metrics are unreliable. If shown, this will be displayed at the top of the report UI. */
|
|
31
|
+
toplevelWarningsMessage: string;
|
|
32
|
+
/** String of text shown in a graphical representation of the flow of network requests for the web page. This label represents the initial network request that fetches an HTML page. This navigation may be redirected (eg. Initial navigation to http://example.com redirects to https://www.example.com). */
|
|
33
|
+
crcInitialNavigation: string;
|
|
34
|
+
/** Label of value shown in the summary of critical request chains. Refers to the total amount of time (milliseconds) of the longest critical path chain/sequence of network requests. Example value: 2310 ms */
|
|
35
|
+
crcLongestDurationLabel: string;
|
|
36
|
+
/** Label for button that shows all lines of the snippet when clicked */
|
|
37
|
+
snippetExpandButtonLabel: string;
|
|
38
|
+
/** Label for button that only shows a few lines of the snippet when clicked */
|
|
39
|
+
snippetCollapseButtonLabel: string;
|
|
40
|
+
/** Explanation shown to users below performance results to inform them that the test was done with a 4G network connection and to warn them that the numbers they see will likely change slightly the next time they run Lighthouse. 'Lighthouse' becomes link text to additional documentation. */
|
|
41
|
+
lsPerformanceCategoryDescription: string;
|
|
42
|
+
/** Title of the lab data section of the Performance category. Within this section are various speed metrics which quantify the pageload performance into values presented in seconds and milliseconds. "Lab" is an abbreviated form of "laboratory", and refers to the fact that the data is from a controlled test of a website, not measurements from real users visiting that site. */
|
|
43
|
+
labDataTitle: string;
|
|
44
|
+
/** This label is for a checkbox above a table of items loaded by a web page. The checkbox is used to show or hide third-party (or "3rd-party") resources in the table, where "third-party resources" refers to items loaded by a web page from URLs that aren't controlled by the owner of the web page. */
|
|
45
|
+
thirdPartyResourcesLabel: string;
|
|
46
|
+
/** This label is for a button that opens a new tab to a webapp called "Treemap", which is a nested visual representation of a heierarchy of data related to the reports (script bytes and coverage, resource breakdown, etc.) */
|
|
47
|
+
viewTreemapLabel: string;
|
|
48
|
+
/** This label is for a button that will show the user a trace of the page. */
|
|
49
|
+
viewTraceLabel: string;
|
|
50
|
+
/** This label is for a button that will show the user a trace of the page. */
|
|
51
|
+
viewOriginalTraceLabel: string;
|
|
52
|
+
/** Option in a dropdown menu that opens a small, summary report in a print dialog. */
|
|
53
|
+
dropdownPrintSummary: string;
|
|
54
|
+
/** Option in a dropdown menu that opens a full Lighthouse report in a print dialog. */
|
|
55
|
+
dropdownPrintExpanded: string;
|
|
56
|
+
/** Option in a dropdown menu that copies the Lighthouse JSON object to the system clipboard. */
|
|
57
|
+
dropdownCopyJSON: string;
|
|
58
|
+
/** Option in a dropdown menu that saves the Lighthouse report HTML locally to the system as a '.html' file. */
|
|
59
|
+
dropdownSaveHTML: string;
|
|
60
|
+
/** Option in a dropdown menu that saves the Lighthouse JSON object to the local system as a '.json' file. */
|
|
61
|
+
dropdownSaveJSON: string;
|
|
62
|
+
/** Option in a dropdown menu that opens the current report in the Lighthouse Viewer Application. */
|
|
63
|
+
dropdownViewer: string;
|
|
64
|
+
/** Option in a dropdown menu that saves the current report as a new GitHub Gist. */
|
|
65
|
+
dropdownSaveGist: string;
|
|
66
|
+
/** Option in a dropdown menu that toggles the themeing of the report between Light(default) and Dark themes. */
|
|
67
|
+
dropdownDarkTheme: string;
|
|
68
|
+
/** Label for a row in a table that describes the kind of device that was emulated for the Lighthouse run. Example values for row elements: 'No Emulation', 'Emulated Desktop', etc. */
|
|
69
|
+
runtimeSettingsDevice: string;
|
|
70
|
+
/** Label for a row in a table that describes the network throttling conditions that were used during a Lighthouse run, if any. */
|
|
71
|
+
runtimeSettingsNetworkThrottling: string;
|
|
72
|
+
/** Label for a row in a table that describes the CPU throttling conditions that were used during a Lighthouse run, if any.*/
|
|
73
|
+
runtimeSettingsCPUThrottling: string;
|
|
74
|
+
/** Label for a row in a table that shows the User Agent that was used to send out all network requests during the Lighthouse run. */
|
|
75
|
+
runtimeSettingsUANetwork: string;
|
|
76
|
+
/** Label for a row in a table that shows the estimated CPU power of the machine running Lighthouse. Example row values: 532, 1492, 783. */
|
|
77
|
+
runtimeSettingsBenchmark: string;
|
|
78
|
+
/** Label for a row in a table that shows the version of the Axe library used. Example row values: 2.1.0, 3.2.3 */
|
|
79
|
+
runtimeSettingsAxeVersion: string;
|
|
80
|
+
/** Label for a row in a table that shows the screen resolution and DPR that was emulated for the Lighthouse run. Example values: '800x600, DPR: 3' */
|
|
81
|
+
runtimeSettingsScreenEmulation: string;
|
|
82
|
+
/** Label for button to create an issue against the Lighthouse GitHub project. */
|
|
83
|
+
footerIssue: string;
|
|
84
|
+
/** Descriptive explanation for emulation setting when no device emulation is set. */
|
|
85
|
+
runtimeNoEmulation: string;
|
|
86
|
+
/** Descriptive explanation for emulation setting when emulating a Moto G4 mobile device. */
|
|
87
|
+
runtimeMobileEmulation: string;
|
|
88
|
+
/** Descriptive explanation for emulation setting when emulating a generic desktop form factor, as opposed to a mobile-device like form factor. */
|
|
89
|
+
runtimeDesktopEmulation: string;
|
|
90
|
+
/** Descriptive explanation for a runtime setting that is set to an unknown value. */
|
|
91
|
+
runtimeUnknown: string;
|
|
92
|
+
/** Descriptive label that this analysis run was from a single pageload of a browser (not a summary of hundreds of loads) */
|
|
93
|
+
runtimeSingleLoad: string;
|
|
94
|
+
/** Descriptive label that this analysis only considers the initial load of the page, and no interaction beyond when the page had "fully loaded" */
|
|
95
|
+
runtimeAnalysisWindow: string;
|
|
96
|
+
/** Descriptive explanation that this analysis run was from a single pageload of a browser, whereas field data often summarizes hundreds+ of page loads */
|
|
97
|
+
runtimeSingleLoadTooltip: string;
|
|
98
|
+
/** Descriptive explanation for environment throttling that was provided by the runtime environment instead of provided by Lighthouse throttling. */
|
|
99
|
+
throttlingProvided: string;
|
|
100
|
+
/** Label for an interactive control that will reveal or hide a group of content. This control toggles between the text 'Show' and 'Hide'. */
|
|
101
|
+
show: string;
|
|
102
|
+
/** Label for an interactive control that will reveal or hide a group of content. This control toggles between the text 'Show' and 'Hide'. */
|
|
103
|
+
hide: string;
|
|
104
|
+
/** Label for an interactive control that will reveal or hide a group of content. This control toggles between the text 'Expand view' and 'Collapse view'. */
|
|
105
|
+
expandView: string;
|
|
106
|
+
/** Label for an interactive control that will reveal or hide a group of content. This control toggles between the text 'Expand view' and 'Collapse view'. */
|
|
107
|
+
collapseView: string;
|
|
108
|
+
/** Label indicating that Lighthouse throttled the page to emulate a slow 4G network connection. */
|
|
109
|
+
runtimeSlow4g: string;
|
|
110
|
+
/** Label indicating that Lighthouse throttled the page using custom throttling settings. */
|
|
111
|
+
runtimeCustom: string;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* @param {Record<string, string>} providedStrings
|
|
115
|
+
*/
|
|
116
|
+
static applyStrings(providedStrings: Record<string, string>): void;
|
|
5
117
|
static get PASS_THRESHOLD(): number;
|
|
6
118
|
static get MS_DISPLAY_VALUE(): string;
|
|
7
119
|
/**
|