-
Notifications
You must be signed in to change notification settings - Fork 26.2k
/
Copy pathapi_flags.ts
65 lines (61 loc) · 2.05 KB
/
api_flags.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {ViewEncapsulation} from '../metadata/view';
/**
* Used by `RendererFactory2` to associate custom rendering data and styles
* with a rendering implementation.
* @publicApi
*/
export interface RendererType2 {
/**
* A unique identifying string for the new renderer, used when creating
* unique styles for encapsulation.
*/
id: string;
/**
* The view encapsulation type, which determines how styles are applied to
* DOM elements. One of
* - `Emulated` (default): Emulate native scoping of styles.
* - `Native`: Use the native encapsulation mechanism of the renderer.
* - `ShadowDom`: Use modern [Shadow
* DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
* create a ShadowRoot for component's host element.
* - `None`: Do not provide any template or style encapsulation.
*/
encapsulation: ViewEncapsulation;
/**
* Defines CSS styles to be stored on a renderer instance.
*/
styles: string[];
/**
* Defines arbitrary developer-defined data to be stored on a renderer instance.
* This is useful for renderers that delegate to other renderers.
*/
data: {[kind: string]: any};
/**
* A function used by the framework to create the list of external runtime style URLs.
*/
getExternalStyles?: ((encapsulationId?: string) => string[]) | null;
}
/**
* Flags for renderer-specific style modifiers.
* @publicApi
*/
export enum RendererStyleFlags2 {
// TODO(misko): This needs to be refactored into a separate file so that it can be imported from
// `node_manipulation.ts` Currently doing the import cause resolution order to change and fails
// the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.
/**
* Marks a style as important.
*/
Important = 1 << 0,
/**
* Marks a style as using dash case naming (this-is-dash-case).
*/
DashCase = 1 << 1,
}