UNPKG

3.03 kBPlain TextView Raw
1// This file is generated. Edit build/generate-style-code.ts, then run 'npm run codegen'.
2/* eslint-disable */
3
4import styleSpec from '../../style-spec/reference/latest';
5
6import {
7 Properties,
8 DataConstantProperty,
9 DataDrivenProperty,
10 CrossFadedDataDrivenProperty,
11 CrossFadedProperty,
12 ColorRampProperty,
13 PossiblyEvaluatedPropertyValue,
14 CrossFaded
15} from '../properties';
16
17import type Color from '../../style-spec/util/color';
18
19import type Formatted from '../../style-spec/expression/types/formatted';
20
21import type ResolvedImage from '../../style-spec/expression/types/resolved_image';
22import {StylePropertySpecification} from '../../style-spec/style-spec';
23
24export type FillLayoutProps = {
25 "fill-sort-key": DataDrivenProperty<number>,
26};
27
28export type FillLayoutPropsPossiblyEvaluated = {
29 "fill-sort-key": PossiblyEvaluatedPropertyValue<number>,
30};
31
32const layout: Properties<FillLayoutProps> = new Properties({
33 "fill-sort-key": new DataDrivenProperty(styleSpec["layout_fill"]["fill-sort-key"] as any as StylePropertySpecification),
34});
35
36export type FillPaintProps = {
37 "fill-antialias": DataConstantProperty<boolean>,
38 "fill-opacity": DataDrivenProperty<number>,
39 "fill-color": DataDrivenProperty<Color>,
40 "fill-outline-color": DataDrivenProperty<Color>,
41 "fill-translate": DataConstantProperty<[number, number]>,
42 "fill-translate-anchor": DataConstantProperty<"map" | "viewport">,
43 "fill-pattern": CrossFadedDataDrivenProperty<ResolvedImage>,
44};
45
46export type FillPaintPropsPossiblyEvaluated = {
47 "fill-antialias": boolean,
48 "fill-opacity": PossiblyEvaluatedPropertyValue<number>,
49 "fill-color": PossiblyEvaluatedPropertyValue<Color>,
50 "fill-outline-color": PossiblyEvaluatedPropertyValue<Color>,
51 "fill-translate": [number, number],
52 "fill-translate-anchor": "map" | "viewport",
53 "fill-pattern": PossiblyEvaluatedPropertyValue<CrossFaded<ResolvedImage>>,
54};
55
56const paint: Properties<FillPaintProps> = new Properties({
57 "fill-antialias": new DataConstantProperty(styleSpec["paint_fill"]["fill-antialias"] as any as StylePropertySpecification),
58 "fill-opacity": new DataDrivenProperty(styleSpec["paint_fill"]["fill-opacity"] as any as StylePropertySpecification),
59 "fill-color": new DataDrivenProperty(styleSpec["paint_fill"]["fill-color"] as any as StylePropertySpecification),
60 "fill-outline-color": new DataDrivenProperty(styleSpec["paint_fill"]["fill-outline-color"] as any as StylePropertySpecification),
61 "fill-translate": new DataConstantProperty(styleSpec["paint_fill"]["fill-translate"] as any as StylePropertySpecification),
62 "fill-translate-anchor": new DataConstantProperty(styleSpec["paint_fill"]["fill-translate-anchor"] as any as StylePropertySpecification),
63 "fill-pattern": new CrossFadedDataDrivenProperty(styleSpec["paint_fill"]["fill-pattern"] as any as StylePropertySpecification),
64});
65
66export default ({ paint, layout } as {
67 paint: Properties<FillPaintProps>,
68 layout: Properties<FillLayoutProps>
69});
\No newline at end of file