lighthouse 9.3.1-dev.20220207 → 9.3.1-dev.20220211
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/dist/report/bundle.esm.js +14 -4
- package/dist/report/flow.js +3 -3
- package/dist/report/standalone.js +7 -7
- package/lighthouse-cli/run.js +1 -1
- package/lighthouse-core/fraggle-rock/gather/navigation-runner.js +46 -26
- package/lighthouse-core/fraggle-rock/user-flow.js +8 -6
- package/lighthouse-core/gather/driver/navigation.js +29 -10
- package/lighthouse-core/gather/driver/network-monitor.js +8 -6
- package/lighthouse-core/gather/driver/prepare.js +13 -7
- package/lighthouse-core/gather/gather-runner.js +1 -1
- package/lighthouse-core/util-commonjs.js +4 -0
- package/package.json +1 -1
- package/report/assets/templates.html +0 -3
- package/report/renderer/components.js +1 -1
- package/report/renderer/report-ui-features.js +9 -3
- package/report/renderer/util.js +4 -0
- package/report/test/renderer/__snapshots__/report-renderer-axe-test.js.snap +107 -0
- package/report/test/renderer/report-renderer-axe-test.js +38 -17
- package/report/types/report-renderer.d.ts +7 -0
- package/shared/localization/locales/en-US.json +6 -0
- package/shared/localization/locales/en-XL.json +6 -0
- package/types/global-lh.d.ts +1 -0
|
@@ -626,6 +626,10 @@ const UIStrings = {
|
|
|
626
626
|
thirdPartyResourcesLabel: 'Show 3rd-party resources',
|
|
627
627
|
/** 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.) */
|
|
628
628
|
viewTreemapLabel: 'View Treemap',
|
|
629
|
+
/** This label is for a button that will show the user a trace of the page. */
|
|
630
|
+
viewTraceLabel: 'View Trace',
|
|
631
|
+
/** This label is for a button that will show the user a trace of the page. */
|
|
632
|
+
viewOriginalTraceLabel: 'View Original Trace',
|
|
629
633
|
|
|
630
634
|
/** Option in a dropdown menu that opens a small, summary report in a print dialog. */
|
|
631
635
|
dropdownPrintSummary: 'Print Summary',
|
|
@@ -1041,7 +1045,7 @@ function createGaugePwaComponent(dom) {
|
|
|
1041
1045
|
function createHeadingComponent(dom) {
|
|
1042
1046
|
const el0 = dom.createFragment();
|
|
1043
1047
|
const el1 = dom.createElement('style');
|
|
1044
|
-
el1.append('\n /* CSS Fireworks. Originally by Eddie Lin\n https://codepen.io/paulirish/pen/yEVMbP\n */\n .lh-pyro {\n display: none;\n z-index: 1;\n pointer-events: none;\n }\n .lh-score100 .lh-pyro {\n display: block;\n }\n .lh-score100 .lh-lighthouse stop:first-child {\n stop-color: hsla(200, 12%, 95%, 0);\n }\n .lh-score100 .lh-lighthouse stop:last-child {\n stop-color: hsla(65, 81%, 76%, 1);\n }\n\n .lh-pyro > .lh-pyro-before, .lh-pyro > .lh-pyro-after {\n position: absolute;\n width: 5px;\n height: 5px;\n border-radius: 2.5px;\n box-shadow: 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff;\n animation: 1s bang ease-out infinite backwards, 1s gravity ease-in infinite backwards, 5s position linear infinite backwards;\n animation-delay: 1s, 1s, 1s;\n }\n\n .lh-pyro > .lh-pyro-after {\n animation-delay: 2.25s, 2.25s, 2.25s;\n animation-duration: 1.25s, 1.25s, 6.25s;\n }\n
|
|
1048
|
+
el1.append('\n /* CSS Fireworks. Originally by Eddie Lin\n https://codepen.io/paulirish/pen/yEVMbP\n */\n .lh-pyro {\n display: none;\n z-index: 1;\n pointer-events: none;\n }\n .lh-score100 .lh-pyro {\n display: block;\n }\n .lh-score100 .lh-lighthouse stop:first-child {\n stop-color: hsla(200, 12%, 95%, 0);\n }\n .lh-score100 .lh-lighthouse stop:last-child {\n stop-color: hsla(65, 81%, 76%, 1);\n }\n\n .lh-pyro > .lh-pyro-before, .lh-pyro > .lh-pyro-after {\n position: absolute;\n width: 5px;\n height: 5px;\n border-radius: 2.5px;\n box-shadow: 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff;\n animation: 1s bang ease-out infinite backwards, 1s gravity ease-in infinite backwards, 5s position linear infinite backwards;\n animation-delay: 1s, 1s, 1s;\n }\n\n .lh-pyro > .lh-pyro-after {\n animation-delay: 2.25s, 2.25s, 2.25s;\n animation-duration: 1.25s, 1.25s, 6.25s;\n }\n\n @keyframes bang {\n to {\n box-shadow: -70px -115.67px #47ebbc, -28px -99.67px #eb47a4, 58px -31.67px #7eeb47, 13px -141.67px #eb47c5, -19px 6.33px #7347eb, -2px -74.67px #ebd247, 24px -151.67px #eb47e0, 57px -138.67px #b4eb47, -51px -104.67px #479eeb, 62px 8.33px #ebcf47, -93px 0.33px #d547eb, -16px -118.67px #47bfeb, 53px -84.67px #47eb83, 66px -57.67px #eb47bf, -93px -65.67px #91eb47, 30px -13.67px #86eb47, -2px -59.67px #83eb47, -44px 1.33px #eb47eb, 61px -58.67px #47eb73, 5px -22.67px #47e8eb, -66px -28.67px #ebe247, 42px -123.67px #eb5547, -75px 26.33px #7beb47, 15px -52.67px #a147eb, 36px -51.67px #eb8347, -38px -12.67px #eb5547, -46px -59.67px #47eb81, 78px -114.67px #eb47ba, 15px -156.67px #eb47bf, -36px 1.33px #eb4783, -72px -86.67px #eba147, 31px -46.67px #ebe247, -68px 29.33px #47e2eb, -55px 19.33px #ebe047, -56px 27.33px #4776eb, -13px -91.67px #eb5547, -47px -138.67px #47ebc7, -18px -96.67px #eb47ac, 11px -88.67px #4783eb, -67px -28.67px #47baeb, 53px 10.33px #ba47eb, 11px 19.33px #5247eb, -5px -11.67px #eb4791, -68px -4.67px #47eba7, 95px -37.67px #eb478b, -67px -162.67px #eb5d47, -54px -120.67px #eb6847, 49px -12.67px #ebe047, 88px 8.33px #47ebda, 97px 33.33px #eb8147, 6px -71.67px #ebbc47;\n }\n }\n @keyframes gravity {\n to {\n transform: translateY(80px);\n opacity: 0;\n }\n }\n @keyframes position {\n 0%, 19.9% {\n margin-top: 4%;\n margin-left: 47%;\n }\n 20%, 39.9% {\n margin-top: 7%;\n margin-left: 30%;\n }\n 40%, 59.9% {\n margin-top: 6%;\n margin-left: 70%;\n }\n 60%, 79.9% {\n margin-top: 3%;\n margin-left: 20%;\n }\n 80%, 99.9% {\n margin-top: 3%;\n margin-left: 80%;\n }\n }\n ');
|
|
1045
1049
|
el0.append(el1);
|
|
1046
1050
|
const el2 = dom.createElement('div', 'lh-header-container');
|
|
1047
1051
|
const el3 = dom.createElement('div', 'lh-scores-wrapper-placeholder');
|
|
@@ -5767,6 +5771,15 @@ class ReportUIFeatures {
|
|
|
5767
5771
|
});
|
|
5768
5772
|
}
|
|
5769
5773
|
|
|
5774
|
+
if (this._opts.onViewTrace) {
|
|
5775
|
+
this.addButton({
|
|
5776
|
+
text: lhr.configSettings.throttlingMethod === 'simulate' ?
|
|
5777
|
+
Util.i18n.strings.viewOriginalTraceLabel :
|
|
5778
|
+
Util.i18n.strings.viewTraceLabel,
|
|
5779
|
+
onClick: () => this._opts.onViewTrace?.(),
|
|
5780
|
+
});
|
|
5781
|
+
}
|
|
5782
|
+
|
|
5770
5783
|
if (this._opts.getStandaloneReportHTML) {
|
|
5771
5784
|
this._dom.find('a[data-action="save-html"]', this._dom.rootEl).classList.remove('lh-hidden');
|
|
5772
5785
|
}
|
|
@@ -5835,9 +5848,6 @@ class ReportUIFeatures {
|
|
|
5835
5848
|
_enableFireworks() {
|
|
5836
5849
|
const scoresContainer = this._dom.find('.lh-scores-container', this._dom.rootEl);
|
|
5837
5850
|
scoresContainer.classList.add('lh-score100');
|
|
5838
|
-
scoresContainer.addEventListener('click', _ => {
|
|
5839
|
-
scoresContainer.classList.toggle('lh-fireworks-paused');
|
|
5840
|
-
});
|
|
5841
5851
|
}
|
|
5842
5852
|
|
|
5843
5853
|
_setupMediaQueryListeners() {
|