lighthouse 11.1.0-dev.20230930 → 11.1.0-dev.20231002

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "11.1.0-dev.20230930",
4
+ "version": "11.1.0-dev.20231002",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {
@@ -1964,5 +1964,231 @@ details[open] .lh-clump-toggletext--hide { display: block;}
1964
1964
  }
1965
1965
  }
1966
1966
 
1967
+ /* Explodey gauge */
1968
+
1969
+ .lh-exp-gauge-component {
1970
+ margin-bottom: 10px;
1971
+ }
1972
+
1973
+ .lh-exp-gauge-component circle {
1974
+ stroke: currentcolor;
1975
+ r: var(--radius);
1976
+ }
1977
+
1978
+ .lh-exp-gauge-component text {
1979
+ font-size: calc(var(--radius) * 0.2);
1980
+ }
1981
+
1982
+ .lh-exp-gauge-component .lh-exp-gauge {
1983
+ margin: 0 auto;
1984
+ width: 225px;
1985
+ stroke-width: var(--stroke-width);
1986
+ stroke-linecap: round;
1987
+
1988
+ /* for better rendering perf */
1989
+ contain: strict;
1990
+ height: 225px;
1991
+ will-change: transform;
1992
+ }
1993
+ .lh-exp-gauge-component .lh-exp-gauge--faded {
1994
+ opacity: 0.1;
1995
+ }
1996
+ .lh-exp-gauge-component .lh-exp-gauge__wrapper {
1997
+ font-family: var(--report-font-family-monospace);
1998
+ text-align: center;
1999
+ text-decoration: none;
2000
+ transition: .3s;
2001
+ }
2002
+ .lh-exp-gauge-component .lh-exp-gauge__wrapper--pass {
2003
+ color: var(--color-pass);
2004
+ }
2005
+ .lh-exp-gauge-component .lh-exp-gauge__wrapper--average {
2006
+ color: var(--color-average);
2007
+ }
2008
+ .lh-exp-gauge-component .lh-exp-gauge__wrapper--fail {
2009
+ color: var(--color-fail);
2010
+ }
2011
+ .lh-exp-gauge-component .state--expanded {
2012
+ transition: color .3s;
2013
+ }
2014
+ .lh-exp-gauge-component .state--highlight {
2015
+ color: var(--color-highlight);
2016
+ }
2017
+ .lh-exp-gauge-component .lh-exp-gauge__svg-wrapper {
2018
+ display: flex;
2019
+ flex-direction: column-reverse;
2020
+ }
2021
+
2022
+ .lh-exp-gauge-component .lh-exp-gauge__label {
2023
+ fill: var(--report-text-color);
2024
+ font-family: var(--report-font-family);
2025
+ font-size: 12px;
2026
+ }
2027
+
2028
+ .lh-exp-gauge-component .lh-exp-gauge__cutout {
2029
+ opacity: .999;
2030
+ transition: opacity .3s;
2031
+ }
2032
+ .lh-exp-gauge-component .state--highlight .lh-exp-gauge__cutout {
2033
+ opacity: 0;
2034
+ }
2035
+
2036
+ .lh-exp-gauge-component .lh-exp-gauge__inner {
2037
+ color: inherit;
2038
+ }
2039
+ .lh-exp-gauge-component .lh-exp-gauge__base {
2040
+ fill: currentcolor;
2041
+ }
2042
+
2043
+
2044
+ .lh-exp-gauge-component .lh-exp-gauge__arc {
2045
+ fill: none;
2046
+ transition: opacity .3s;
2047
+ }
2048
+ .lh-exp-gauge-component .lh-exp-gauge__arc--metric {
2049
+ color: var(--metric-color);
2050
+ stroke-dashoffset: var(--metric-offset);
2051
+ opacity: 0.3;
2052
+ }
2053
+ .lh-exp-gauge-component .lh-exp-gauge-hovertarget {
2054
+ color: currentcolor;
2055
+ opacity: 0.001;
2056
+ stroke-linecap: butt;
2057
+ stroke-width: 24;
2058
+ /* hack. move the hover target out of the center. ideally i tweak the r instead but that rquires considerably more math. */
2059
+ transform: scale(1.15);
2060
+ }
2061
+ .lh-exp-gauge-component .lh-exp-gauge__arc--metric.lh-exp-gauge--miniarc {
2062
+ opacity: 0;
2063
+ stroke-dasharray: 0 calc(var(--circle-meas) * var(--radius));
2064
+ transition: 0s .005s;
2065
+ }
2066
+ .lh-exp-gauge-component .state--expanded .lh-exp-gauge__arc--metric.lh-exp-gauge--miniarc {
2067
+ opacity: .999;
2068
+ stroke-dasharray: var(--metric-array);
2069
+ transition: 0.3s; /* calc(.005s + var(--i)*.05s); entrace animation */
2070
+ }
2071
+ .lh-exp-gauge-component .state--expanded .lh-exp-gauge__inner .lh-exp-gauge__arc {
2072
+ opacity: 0;
2073
+ }
2074
+
2075
+
2076
+ .lh-exp-gauge-component .lh-exp-gauge__percentage {
2077
+ text-anchor: middle;
2078
+ dominant-baseline: middle;
2079
+ opacity: .999;
2080
+ font-size: calc(var(--radius) * 0.625);
2081
+ transition: opacity .3s ease-in;
2082
+ }
2083
+ .lh-exp-gauge-component .state--highlight .lh-exp-gauge__percentage {
2084
+ opacity: 0;
2085
+ }
2086
+
2087
+ .lh-exp-gauge-component .lh-exp-gauge__wrapper--fail .lh-exp-gauge__percentage {
2088
+ fill: var(--color-fail);
2089
+ }
2090
+ .lh-exp-gauge-component .lh-exp-gauge__wrapper--average .lh-exp-gauge__percentage {
2091
+ fill: var(--color-average);
2092
+ }
2093
+ .lh-exp-gauge-component .lh-exp-gauge__wrapper--pass .lh-exp-gauge__percentage {
2094
+ fill: var(--color-pass);
2095
+ }
2096
+
2097
+ .lh-exp-gauge-component .lh-cover {
2098
+ fill: none;
2099
+ opacity: .001;
2100
+ pointer-events: none;
2101
+ }
2102
+ .lh-exp-gauge-component .state--expanded .lh-cover {
2103
+ pointer-events: auto;
2104
+ }
2105
+
2106
+ .lh-exp-gauge-component .metric {
2107
+ transform: scale(var(--scale-initial));
2108
+ opacity: 0;
2109
+ transition: transform .1s .2s ease-out, opacity .3s ease-out;
2110
+ pointer-events: none;
2111
+ }
2112
+ .lh-exp-gauge-component .metric text {
2113
+ pointer-events: none;
2114
+ }
2115
+ .lh-exp-gauge-component .metric__value {
2116
+ fill: currentcolor;
2117
+ opacity: 0;
2118
+ transition: opacity 0.2s;
2119
+ }
2120
+ .lh-exp-gauge-component .state--expanded .metric {
2121
+ transform: scale(1);
2122
+ opacity: .999;
2123
+ transition: transform .3s ease-out, opacity .3s ease-in, stroke-width .1s ease-out;
2124
+ transition-delay: calc(var(--i)*.05s);
2125
+ pointer-events: auto;
2126
+ }
2127
+ .lh-exp-gauge-component .state--highlight .metric {
2128
+ opacity: .3;
2129
+ }
2130
+ .lh-exp-gauge-component .state--highlight .metric--highlight {
2131
+ opacity: .999;
2132
+ stroke-width: calc(1.5*var(--stroke-width));
2133
+ }
2134
+ .lh-exp-gauge-component .state--highlight .metric--highlight .metric__value {
2135
+ opacity: 0.999;
2136
+ }
2137
+
2138
+
2139
+ /*
2140
+ the initial first load peek
2141
+ */
2142
+ .lh-exp-gauge-component .lh-exp-gauge__bg { /* needed for the use zindex stacking w/ transparency */
2143
+ fill: var(--report-background-color);
2144
+ stroke: var(--report-background-color);
2145
+ }
2146
+ .lh-exp-gauge-component .state--peek .metric {
2147
+ transition-delay: 0ms;
2148
+ animation: peek var(--peek-dur) cubic-bezier(0.46, 0.03, 0.52, 0.96);
2149
+ animation-fill-mode: forwards;
2150
+ }
2151
+ .lh-exp-gauge-component .state--peek .lh-exp-gauge__inner .lh-exp-gauge__arc {
2152
+ opacity: 1;
2153
+ }
2154
+ .lh-exp-gauge-component .state--peek .lh-exp-gauge__arc.lh-exp-gauge--faded {
2155
+ opacity: 0.3; /* just a tad stronger cuz its fighting with a big solid arg */
2156
+ }
2157
+ /* do i need to set expanded and override this? */
2158
+ .lh-exp-gauge-component .state--peek .lh-exp-gauge__arc--metric.lh-exp-gauge--miniarc {
2159
+ transition: opacity 0.3s;
2160
+ }
2161
+ .lh-exp-gauge-component .state--peek {
2162
+ color: unset;
2163
+ }
2164
+ .lh-exp-gauge-component .state--peek .metric__label {
2165
+ display: none;
2166
+ }
2167
+
2168
+ .lh-exp-gauge-component .metric__label {
2169
+ fill: var(--report-text-color);
2170
+ }
2171
+
2172
+ @keyframes peek {
2173
+ /* biggest it should go is 0.92. smallest is 0.8 */
2174
+ 0% {
2175
+ transform: scale(0.8);
2176
+ opacity: 0.8;
2177
+ }
2178
+
2179
+ 50% {
2180
+ transform: scale(0.92);
2181
+ opacity: 1;
2182
+ }
2183
+
2184
+ 100% {
2185
+ transform: scale(0.8);
2186
+ opacity: 0.8;
2187
+ }
2188
+ }
2189
+
2190
+ .lh-exp-gauge-component .wrapper {
2191
+ width: 620px;
2192
+ }
1967
2193
 
1968
2194
  /*# sourceURL=report-styles.css */
@@ -515,6 +515,28 @@ SPDX-License-Identifier: Apache-2.0
515
515
  </a>
516
516
  </template>
517
517
 
518
+ <!-- Lighthouse score gauge - explodey version -->
519
+ <template id="explodeyGauge">
520
+ <div class="lh-exp-gauge-component">
521
+ <div class="lh-exp-gauge__wrapper" target="_blank">
522
+ <div class="lh-exp-gauge__svg-wrapper">
523
+ <svg class="lh-exp-gauge">
524
+ <g class="lh-exp-gauge__inner">
525
+ <circle class="lh-exp-gauge__bg" />
526
+ <circle class="lh-exp-gauge__base lh-exp-gauge--faded" />
527
+ <circle class="lh-exp-gauge__arc" />
528
+ <text class="lh-exp-gauge__percentage"></text>
529
+ </g>
530
+ <g class="lh-exp-gauge__outer">
531
+ <circle class="lh-cover" />
532
+ </g>
533
+ <text class="lh-exp-gauge__label" text-anchor="middle" x="0" y="60"></text>
534
+ </svg>
535
+ </div>
536
+ </div>
537
+ </div>
538
+ </template>
539
+
518
540
  <!-- Lighthouse category fraction -->
519
541
  <template id="fraction">
520
542
  <a class="lh-fraction__wrapper">
@@ -1,4 +1,4 @@
1
- /** @typedef {'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'} ComponentName */
1
+ /** @typedef {'3pFilter'|'audit'|'categoryHeader'|'chevron'|'clump'|'crc'|'crcChain'|'elementScreenshot'|'explodeyGauge'|'footer'|'fraction'|'gauge'|'gaugePwa'|'heading'|'metric'|'opportunity'|'opportunityHeader'|'scorescale'|'scoresWrapper'|'snippet'|'snippetContent'|'snippetHeader'|'snippetLine'|'styles'|'topbar'|'warningsToplevel'} ComponentName */
2
2
  /**
3
3
  * @param {DOM} dom
4
4
  * @param {ComponentName} componentName
@@ -6,5 +6,5 @@
6
6
  */
7
7
  export function createComponent(dom: DOM, componentName: ComponentName): DocumentFragment;
8
8
  export type DOM = import('./dom.js').DOM;
9
- 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';
9
+ export type ComponentName = '3pFilter' | 'audit' | 'categoryHeader' | 'chevron' | 'clump' | 'crc' | 'crcChain' | 'elementScreenshot' | 'explodeyGauge' | 'footer' | 'fraction' | 'gauge' | 'gaugePwa' | 'heading' | 'metric' | 'opportunity' | 'opportunityHeader' | 'scorescale' | 'scoresWrapper' | 'snippet' | 'snippetContent' | 'snippetHeader' | 'snippetLine' | 'styles' | 'topbar' | 'warningsToplevel';
10
10
  //# sourceMappingURL=components.d.ts.map