UNPKG

2.12 kBTypeScriptView Raw
1import { BreakPoint, ɵMatchMedia as MatchMedia, StylesheetMap, MediaMarshaller } from '@angular/flex-layout/core';
2import { ServerMatchMedia } from './server-match-media';
3/**
4 * Activate all the registered breakpoints in sequence, and then
5 * retrieve the associated stylings from the virtual stylesheet
6 * @param serverSheet the virtual stylesheet that stores styles for each
7 * element
8 * @param mediaController the MatchMedia service to activate/deactivate breakpoints
9 * @param breakpoints the registered breakpoints to activate/deactivate
10 * @param mediaMarshaller the MediaMarshaller service to disable fallback styles dynamically
11 */
12export declare function generateStaticFlexLayoutStyles(serverSheet: StylesheetMap, mediaController: ServerMatchMedia, breakpoints: BreakPoint[], mediaMarshaller: MediaMarshaller): string;
13/**
14 * Create a style tag populated with the dynamic stylings from Flex
15 * components and attach it to the head of the DOM
16 */
17export declare function FLEX_SSR_SERIALIZER_FACTORY(serverSheet: StylesheetMap, mediaController: ServerMatchMedia, _document: Document, breakpoints: BreakPoint[], mediaMarshaller: MediaMarshaller): () => void;
18/**
19 * Provider to set static styles on the server
20 */
21export declare const SERVER_PROVIDERS: ({
22 provide: import("@angular/core").InjectionToken<(() => void | Promise<void>)[]>;
23 useFactory: typeof FLEX_SSR_SERIALIZER_FACTORY;
24 deps: (import("@angular/core").InjectionToken<Document> | typeof StylesheetMap | typeof MatchMedia | typeof MediaMarshaller)[];
25 multi: boolean;
26 useValue?: undefined;
27 useClass?: undefined;
28} | {
29 provide: import("@angular/core").InjectionToken<boolean>;
30 useValue: boolean;
31 useFactory?: undefined;
32 deps?: undefined;
33 multi?: undefined;
34 useClass?: undefined;
35} | {
36 provide: typeof MatchMedia;
37 useClass: typeof ServerMatchMedia;
38 useFactory?: undefined;
39 deps?: undefined;
40 multi?: undefined;
41 useValue?: undefined;
42})[];
43export declare type StyleSheet = Map<HTMLElement, Map<string, string | number>>;
44export declare type ClassMap = Map<HTMLElement, string>;
45
\No newline at end of file