1 |
|
2 |
|
3 |
|
4 | import styleSpec from '../../style-spec/reference/latest';
|
5 |
|
6 | import {
|
7 | Properties,
|
8 | DataConstantProperty,
|
9 | DataDrivenProperty,
|
10 | CrossFadedDataDrivenProperty,
|
11 | CrossFadedProperty,
|
12 | ColorRampProperty,
|
13 | PossiblyEvaluatedPropertyValue,
|
14 | CrossFaded
|
15 | } from '../properties';
|
16 |
|
17 | import type Color from '../../style-spec/util/color';
|
18 |
|
19 | import type Formatted from '../../style-spec/expression/types/formatted';
|
20 |
|
21 | import type ResolvedImage from '../../style-spec/expression/types/resolved_image';
|
22 | import {StylePropertySpecification} from '../../style-spec/style-spec';
|
23 |
|
24 |
|
25 | export type BackgroundPaintProps = {
|
26 | "background-color": DataConstantProperty<Color>,
|
27 | "background-pattern": CrossFadedProperty<ResolvedImage>,
|
28 | "background-opacity": DataConstantProperty<number>,
|
29 | };
|
30 |
|
31 | export type BackgroundPaintPropsPossiblyEvaluated = {
|
32 | "background-color": Color,
|
33 | "background-pattern": CrossFaded<ResolvedImage>,
|
34 | "background-opacity": number,
|
35 | };
|
36 |
|
37 | const paint: Properties<BackgroundPaintProps> = new Properties({
|
38 | "background-color": new DataConstantProperty(styleSpec["paint_background"]["background-color"] as any as StylePropertySpecification),
|
39 | "background-pattern": new CrossFadedProperty(styleSpec["paint_background"]["background-pattern"] as any as StylePropertySpecification),
|
40 | "background-opacity": new DataConstantProperty(styleSpec["paint_background"]["background-opacity"] as any as StylePropertySpecification),
|
41 | });
|
42 |
|
43 | export default ({ paint } as {
|
44 | paint: Properties<BackgroundPaintProps>
|
45 | }); |
\ | No newline at end of file |