- ✅ Ticket 1.1: Estructura Clean Architecture en backend - ✅ Ticket 1.2: Schemas Zod compartidos - ✅ Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares) - ✅ Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares) - ✅ Ticket 1.5: Eliminación de duplicidades (~50 líneas) Cambios principales: - Creada estructura Clean Architecture en backend/src/ - Schemas Zod compartidos en backend/src/shared/schemas/ - Refactorización modular de drugs y procedures - Utilidades genéricas en src/utils/ (filter, validation) - Eliminados scripts obsoletos y documentación antigua - Corregidos errores: QueryClient, import test-error-handling - Build verificado y funcionando correctamente
77 lines
1.9 KiB
TypeScript
77 lines
1.9 KiB
TypeScript
import BrowserWindow from '../window/BrowserWindow.js';
|
|
import IMediaQueryRange from './IMediaQueryRange.js';
|
|
import IMediaQueryRule from './IMediaQueryRule.js';
|
|
import MediaQueryTypeEnum from './MediaQueryTypeEnum.js';
|
|
/**
|
|
* 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
|