Files
headroom/frontend/node_modules/happy-dom/cjs/match-media/MediaQueryItem.d.ts
Santhosh Janardhanan de2d83092e feat: Reinitialize frontend with SvelteKit and TypeScript
- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
2026-02-17 16:19:59 -05:00

77 lines
2.0 KiB
TypeScript

import BrowserWindow from '../window/BrowserWindow.cjs';
import IMediaQueryRange from './IMediaQueryRange.cjs';
import IMediaQueryRule from './IMediaQueryRule.cjs';
import MediaQueryTypeEnum from './MediaQueryTypeEnum.cjs';
/**
* Media query this.
*/
export default class MediaQueryItem {
mediaTypes: MediaQueryTypeEnum[];
not: boolean;
rules: IMediaQueryRule[];
ranges: IMediaQueryRange[];
private rootFontSize;
private window;
/**
* Constructor.
*
* @param options Options.
* @param options.window Owner window.
* @param [options.rootFontSize] Root font size.
* @param [options.mediaTypes] Media types.
* @param [options.not] Not.
* @param [options.rules] Rules.
* @param [options.ranges] Ranges.
*/
constructor(options: {
window: BrowserWindow;
rootFontSize?: string | number | null;
mediaTypes?: MediaQueryTypeEnum[];
not?: boolean;
rules?: IMediaQueryRule[];
ranges?: IMediaQueryRange[];
});
/**
* Returns media string.
*/
toString(): string;
/**
* Returns "true" if the item matches.
*/
matches(): boolean;
/**
* Returns "true" if all matches.
*
* @returns "true" if all matches.
*/
private matchesAll;
/**
* Returns "true" if the mediaType matches.
*
* @param mediaType Media type.
* @returns "true" if the mediaType matches.
*/
private matchesMediaType;
/**
* Returns "true" if the range matches.
*
* @param range Range.
* @returns "true" if the range matches.
*/
private matchesRange;
/**
* Returns "true" if the rule matches.
*
* @param rule Rule.
* @returns "true" if the rule matches.
*/
private matchesRule;
/**
* Convert to pixels.
*
* @param value Value.
* @returns Value in pixels.
*/
private toPixels;
}
//# sourceMappingURL=MediaQueryItem.d.ts.map