Rocky_Mountain_Vending/.pnpm-store/v10/files/2b/9a5f9117cc47c543e689ea29e0c80245e0b9f7e899e47be46d59cbd1f8f0bf6a6d7c8b3b64ecf73dc7c655ae2bd8f189c2bd36583df5858383695642a47d01
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

55 lines
1.5 KiB
Text

/**
* @license
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import BaseGatherer from '../base-gatherer.js';
/**
* @return {LH.Artifacts.ViewportDimensions}
*/
/* c8 ignore start */
function getViewportDimensions() {
// window.innerWidth to get the scrollable size of the window (irrespective of zoom)
// window.outerWidth to get the size of the visible area
// window.devicePixelRatio to get ratio of logical pixels to physical pixels
return {
innerWidth: window.innerWidth,
innerHeight: window.innerHeight,
outerWidth: window.outerWidth,
outerHeight: window.outerHeight,
devicePixelRatio: window.devicePixelRatio,
};
}
/* c8 ignore stop */
class ViewportDimensions extends BaseGatherer {
/** @type {LH.Gatherer.GathererMeta} */
meta = {
supportedModes: ['snapshot', 'timespan', 'navigation'],
};
/**
* @param {LH.Gatherer.Context} passContext
* @return {Promise<LH.Artifacts.ViewportDimensions>}
*/
async getArtifact(passContext) {
const driver = passContext.driver;
const dimensions = await driver.executionContext.evaluate(getViewportDimensions, {
args: [],
useIsolation: true,
});
const allNumeric = Object.values(dimensions).every(Number.isFinite);
if (!allNumeric) {
const results = JSON.stringify(dimensions);
throw new Error(`ViewportDimensions results were not numeric: ${results}`);
}
return dimensions;
}
}
export default ViewportDimensions;