- ✅ 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
66 lines
1.9 KiB
TypeScript
66 lines
1.9 KiB
TypeScript
import CSSRule from './CSSRule.js';
|
|
import MediaList from './MediaList.js';
|
|
import BrowserWindow from '../window/BrowserWindow.js';
|
|
import * as PropertySymbol from '../PropertySymbol.js';
|
|
/**
|
|
* CSS StyleSheet.
|
|
*
|
|
* Reference:
|
|
* https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet.
|
|
*/
|
|
export default class CSSStyleSheet {
|
|
#private;
|
|
protected [PropertySymbol.window]: BrowserWindow;
|
|
readonly cssRules: CSSRule[];
|
|
media: MediaList | string;
|
|
title: string;
|
|
alternate: boolean;
|
|
disabled: boolean;
|
|
/**
|
|
* Constructor.
|
|
*
|
|
* @param [options] Options.
|
|
* @param [options.media] Media.
|
|
* @param [options.title] Title.
|
|
* @param [options.alternate] Alternate.
|
|
* @param [options.disabled] Disabled.
|
|
*/
|
|
constructor(options?: {
|
|
media?: MediaList | string;
|
|
title?: string;
|
|
alternate?: boolean;
|
|
disabled?: boolean;
|
|
});
|
|
/**
|
|
* Inserts a rule.
|
|
*
|
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/insertRule
|
|
* @param rule Rule.
|
|
* @param [index] Index.
|
|
* @returns The newly inserterted rule's index.
|
|
*/
|
|
insertRule(rule: string, index?: number): number;
|
|
/**
|
|
* Removes a rule.
|
|
*
|
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/deleteRule
|
|
* @param index Index.
|
|
*/
|
|
deleteRule(index: number): void;
|
|
/**
|
|
* Replaces all CSS rules.
|
|
*
|
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/replace
|
|
* @param text CSS text.
|
|
* @returns Promise.
|
|
*/
|
|
replace(text: string): Promise<void>;
|
|
/**
|
|
* Replaces all CSS rules.
|
|
*
|
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/replaceSync
|
|
* @param text CSS text.
|
|
*/
|
|
replaceSync(text: string): void;
|
|
}
|
|
//# sourceMappingURL=CSSStyleSheet.d.ts.map
|