@mapbox/mapbox-gl-style-spec 14.17.0 → 14.18.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +33 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +360 -114
- package/dist/index.es.js +33 -8
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/reference/v8.json +32 -0
- package/style-spec.ts +13 -11
- package/types.ts +32 -23
- package/util/properties.ts +3 -3
- package/validate_mapbox_api_supported.ts +0 -7
package/dist/index.d.ts
CHANGED
|
@@ -24,13 +24,16 @@ declare const _default: StyleReference;
|
|
|
24
24
|
* fs.writeFileSync('./dest.min.json', format(style, 0));
|
|
25
25
|
*/
|
|
26
26
|
export declare function format(style: any, space?: number): string;
|
|
27
|
-
type
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
type
|
|
27
|
+
type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? {
|
|
28
|
+
[K in keyof I]: I[K];
|
|
29
|
+
} : never;
|
|
30
|
+
export type ColorSpecification = string;
|
|
31
|
+
export type FormattedSpecification = string;
|
|
32
|
+
export type ResolvedImageSpecification = string;
|
|
33
|
+
export type PromoteIdSpecification = {
|
|
31
34
|
[_: string]: string | ExpressionSpecification;
|
|
32
35
|
} | string | ExpressionSpecification;
|
|
33
|
-
type FilterSpecification = ExpressionSpecification | [
|
|
36
|
+
export type FilterSpecification = ExpressionSpecification | [
|
|
34
37
|
"has",
|
|
35
38
|
string
|
|
36
39
|
] | [
|
|
@@ -61,22 +64,25 @@ type FilterSpecification = ExpressionSpecification | [
|
|
|
61
64
|
string,
|
|
62
65
|
string | number | boolean
|
|
63
66
|
] | Array<string | FilterSpecification>;
|
|
64
|
-
type TransitionSpecification = {
|
|
67
|
+
export type TransitionSpecification = {
|
|
65
68
|
duration?: number;
|
|
66
69
|
delay?: number;
|
|
67
70
|
};
|
|
68
|
-
type PropertyFunctionStop<T> = [
|
|
71
|
+
export type PropertyFunctionStop<T> = [
|
|
69
72
|
number,
|
|
70
73
|
T
|
|
71
74
|
];
|
|
72
|
-
type ZoomAndPropertyFunctionStop<T> = [
|
|
75
|
+
export type ZoomAndPropertyFunctionStop<T> = [
|
|
73
76
|
{
|
|
74
77
|
zoom: number;
|
|
75
78
|
value: string | number | boolean;
|
|
76
79
|
},
|
|
77
80
|
T
|
|
78
81
|
];
|
|
79
|
-
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Use [Expressions](https://docs.mapbox.com/style-spec/reference/expressions/) syntax instead.
|
|
84
|
+
*/
|
|
85
|
+
export type FunctionSpecification<T> = {
|
|
80
86
|
stops: Array<PropertyFunctionStop<T> | ZoomAndPropertyFunctionStop<T>>;
|
|
81
87
|
base?: number;
|
|
82
88
|
property?: string;
|
|
@@ -84,7 +90,7 @@ type FunctionSpecification<T> = {
|
|
|
84
90
|
colorSpace?: "rgb" | "lab" | "hcl";
|
|
85
91
|
default?: T;
|
|
86
92
|
};
|
|
87
|
-
type CameraFunctionSpecification<T> = {
|
|
93
|
+
export type CameraFunctionSpecification<T> = {
|
|
88
94
|
type: "exponential";
|
|
89
95
|
stops: Array<[
|
|
90
96
|
number,
|
|
@@ -97,7 +103,7 @@ type CameraFunctionSpecification<T> = {
|
|
|
97
103
|
T
|
|
98
104
|
]>;
|
|
99
105
|
};
|
|
100
|
-
type SourceFunctionSpecification<T> = {
|
|
106
|
+
export type SourceFunctionSpecification<T> = {
|
|
101
107
|
type: "exponential";
|
|
102
108
|
stops: Array<[
|
|
103
109
|
number,
|
|
@@ -126,7 +132,7 @@ type SourceFunctionSpecification<T> = {
|
|
|
126
132
|
property: string;
|
|
127
133
|
default?: T;
|
|
128
134
|
};
|
|
129
|
-
type CompositeFunctionSpecification<T> = {
|
|
135
|
+
export type CompositeFunctionSpecification<T> = {
|
|
130
136
|
type: "exponential";
|
|
131
137
|
stops: Array<[
|
|
132
138
|
{
|
|
@@ -160,13 +166,13 @@ type CompositeFunctionSpecification<T> = {
|
|
|
160
166
|
property: string;
|
|
161
167
|
default?: T;
|
|
162
168
|
};
|
|
163
|
-
type ExpressionSpecification = [
|
|
169
|
+
export type ExpressionSpecification = [
|
|
164
170
|
string,
|
|
165
171
|
...any[]
|
|
166
172
|
];
|
|
167
|
-
type PropertyValueSpecification<T> = T | CameraFunctionSpecification<T> | ExpressionSpecification;
|
|
168
|
-
type DataDrivenPropertyValueSpecification<T> = T | FunctionSpecification<T> | CameraFunctionSpecification<T> | SourceFunctionSpecification<T> | CompositeFunctionSpecification<T> | ExpressionSpecification | (T extends Array<infer U> ? Array<U | ExpressionSpecification> : never);
|
|
169
|
-
type StyleSpecification = {
|
|
173
|
+
export type PropertyValueSpecification<T> = T | CameraFunctionSpecification<T> | ExpressionSpecification;
|
|
174
|
+
export type DataDrivenPropertyValueSpecification<T> = T | FunctionSpecification<T> | CameraFunctionSpecification<T> | SourceFunctionSpecification<T> | CompositeFunctionSpecification<T> | ExpressionSpecification | (T extends Array<infer U> ? Array<U | ExpressionSpecification> : never);
|
|
175
|
+
export type StyleSpecification = {
|
|
170
176
|
"version": 8;
|
|
171
177
|
"fragment"?: boolean;
|
|
172
178
|
"name"?: string;
|
|
@@ -211,35 +217,35 @@ type StyleSpecification = {
|
|
|
211
217
|
*/
|
|
212
218
|
"featuresets"?: FeaturesetsSpecification;
|
|
213
219
|
};
|
|
214
|
-
type SourcesSpecification = {
|
|
220
|
+
export type SourcesSpecification = {
|
|
215
221
|
[_: string]: SourceSpecification;
|
|
216
222
|
};
|
|
217
|
-
type ModelsSpecification = {
|
|
223
|
+
export type ModelsSpecification = {
|
|
218
224
|
[_: string]: ModelSpecification;
|
|
219
225
|
};
|
|
220
|
-
type ModelNodeOverrideSpecification = {
|
|
226
|
+
export type ModelNodeOverrideSpecification = {
|
|
221
227
|
"orientation"?: [
|
|
222
228
|
number,
|
|
223
229
|
number,
|
|
224
230
|
number
|
|
225
231
|
];
|
|
226
232
|
};
|
|
227
|
-
type ModelNodeOverridesSpecification = {
|
|
233
|
+
export type ModelNodeOverridesSpecification = {
|
|
228
234
|
[_: string]: ModelNodeOverrideSpecification;
|
|
229
235
|
};
|
|
230
|
-
type ModelMaterialOverrideSpecification = {
|
|
236
|
+
export type ModelMaterialOverrideSpecification = {
|
|
231
237
|
"model-color"?: ColorSpecification;
|
|
232
238
|
"model-color-mix-intensity"?: number;
|
|
233
239
|
"model-opacity"?: number;
|
|
234
240
|
"model-emissive-strength"?: number;
|
|
235
241
|
};
|
|
236
|
-
type ModelMaterialOverridesSpecification = {
|
|
242
|
+
export type ModelMaterialOverridesSpecification = {
|
|
237
243
|
[_: string]: ModelMaterialOverrideSpecification;
|
|
238
244
|
};
|
|
239
|
-
type ModelSourceModelsSpecification = {
|
|
245
|
+
export type ModelSourceModelsSpecification = {
|
|
240
246
|
[_: string]: ModelSourceModelSpecification;
|
|
241
247
|
};
|
|
242
|
-
type ModelSourceModelSpecification = {
|
|
248
|
+
export type ModelSourceModelSpecification = {
|
|
243
249
|
"uri": string;
|
|
244
250
|
"position"?: [
|
|
245
251
|
number,
|
|
@@ -256,10 +262,10 @@ type ModelSourceModelSpecification = {
|
|
|
256
262
|
"materialOverrideNames"?: Array<string>;
|
|
257
263
|
"featureProperties"?: unknown;
|
|
258
264
|
};
|
|
259
|
-
type IconsetsSpecification = {
|
|
265
|
+
export type IconsetsSpecification = {
|
|
260
266
|
[_: string]: IconsetSpecification;
|
|
261
267
|
};
|
|
262
|
-
type LightSpecification = {
|
|
268
|
+
export type LightSpecification = {
|
|
263
269
|
"anchor"?: PropertyValueSpecification<"map" | "viewport">;
|
|
264
270
|
"position"?: PropertyValueSpecification<[
|
|
265
271
|
number,
|
|
@@ -273,12 +279,16 @@ type LightSpecification = {
|
|
|
273
279
|
"intensity"?: PropertyValueSpecification<number>;
|
|
274
280
|
"intensity-transition"?: TransitionSpecification;
|
|
275
281
|
};
|
|
276
|
-
type TerrainSpecification = {
|
|
282
|
+
export type TerrainSpecification = {
|
|
277
283
|
"source": string;
|
|
278
284
|
"exaggeration"?: PropertyValueSpecification<number>;
|
|
279
285
|
"exaggeration-transition"?: TransitionSpecification;
|
|
280
286
|
};
|
|
281
|
-
type
|
|
287
|
+
export type TerrainSpecificationUpdate = {
|
|
288
|
+
"exaggeration"?: PropertyValueSpecification<number>;
|
|
289
|
+
"exaggeration-transition"?: TransitionSpecification;
|
|
290
|
+
};
|
|
291
|
+
export type FogSpecification = {
|
|
282
292
|
"range"?: PropertyValueSpecification<[
|
|
283
293
|
number,
|
|
284
294
|
number
|
|
@@ -303,7 +313,7 @@ type FogSpecification = {
|
|
|
303
313
|
]>;
|
|
304
314
|
"vertical-range-transition"?: TransitionSpecification;
|
|
305
315
|
};
|
|
306
|
-
type SnowSpecification = {
|
|
316
|
+
export type SnowSpecification = {
|
|
307
317
|
/**
|
|
308
318
|
* @experimental This property is experimental and subject to change in future versions.
|
|
309
319
|
*/
|
|
@@ -355,7 +365,7 @@ type SnowSpecification = {
|
|
|
355
365
|
"flake-size"?: PropertyValueSpecification<number>;
|
|
356
366
|
"flake-size-transition"?: TransitionSpecification;
|
|
357
367
|
};
|
|
358
|
-
type RainSpecification = {
|
|
368
|
+
export type RainSpecification = {
|
|
359
369
|
/**
|
|
360
370
|
* @experimental This property is experimental and subject to change in future versions.
|
|
361
371
|
*/
|
|
@@ -415,14 +425,14 @@ type RainSpecification = {
|
|
|
415
425
|
"distortion-strength"?: PropertyValueSpecification<number>;
|
|
416
426
|
"distortion-strength-transition"?: TransitionSpecification;
|
|
417
427
|
};
|
|
418
|
-
type CameraSpecification = {
|
|
428
|
+
export type CameraSpecification = {
|
|
419
429
|
"camera-projection"?: PropertyValueSpecification<"perspective" | "orthographic">;
|
|
420
430
|
"camera-projection-transition"?: TransitionSpecification;
|
|
421
431
|
};
|
|
422
|
-
type ColorThemeSpecification = {
|
|
423
|
-
"data"?: ExpressionSpecification;
|
|
432
|
+
export type ColorThemeSpecification = {
|
|
433
|
+
"data"?: string | ExpressionSpecification;
|
|
424
434
|
};
|
|
425
|
-
type ProjectionSpecification = {
|
|
435
|
+
export type ProjectionSpecification = {
|
|
426
436
|
"name": "albers" | "equalEarth" | "equirectangular" | "lambertConformalConic" | "mercator" | "naturalEarth" | "winkelTripel" | "globe";
|
|
427
437
|
"center"?: [
|
|
428
438
|
number,
|
|
@@ -433,20 +443,20 @@ type ProjectionSpecification = {
|
|
|
433
443
|
number
|
|
434
444
|
];
|
|
435
445
|
};
|
|
436
|
-
type ImportSpecification = {
|
|
446
|
+
export type ImportSpecification = {
|
|
437
447
|
"id": string;
|
|
438
448
|
"url": string;
|
|
439
449
|
"config"?: ConfigSpecification;
|
|
440
450
|
"data"?: StyleSpecification;
|
|
441
451
|
"color-theme"?: ColorThemeSpecification | null | undefined;
|
|
442
452
|
};
|
|
443
|
-
type IndoorSpecification = {
|
|
453
|
+
export type IndoorSpecification = {
|
|
444
454
|
/**
|
|
445
455
|
* @experimental This property is experimental and subject to change in future versions.
|
|
446
456
|
*/
|
|
447
457
|
[_: string]: IndoorSourceSpecification;
|
|
448
458
|
};
|
|
449
|
-
type IndoorSourceSpecification = {
|
|
459
|
+
export type IndoorSourceSpecification = {
|
|
450
460
|
/**
|
|
451
461
|
* @experimental This property is experimental and subject to change in future versions.
|
|
452
462
|
*/
|
|
@@ -456,14 +466,14 @@ type IndoorSourceSpecification = {
|
|
|
456
466
|
*/
|
|
457
467
|
"sourceLayers"?: Array<string>;
|
|
458
468
|
};
|
|
459
|
-
type ConfigSpecification = {
|
|
469
|
+
export type ConfigSpecification = {
|
|
460
470
|
[_: string]: unknown;
|
|
461
471
|
};
|
|
462
|
-
type SchemaSpecification = {
|
|
472
|
+
export type SchemaSpecification = {
|
|
463
473
|
[_: string]: OptionSpecification;
|
|
464
474
|
};
|
|
465
|
-
type OptionSpecification = {
|
|
466
|
-
"default": ExpressionSpecification;
|
|
475
|
+
export type OptionSpecification = {
|
|
476
|
+
"default": unknown | ExpressionSpecification;
|
|
467
477
|
"type"?: "string" | "number" | "boolean" | "color";
|
|
468
478
|
"array"?: boolean;
|
|
469
479
|
"minValue"?: number;
|
|
@@ -472,10 +482,16 @@ type OptionSpecification = {
|
|
|
472
482
|
"values"?: Array<unknown>;
|
|
473
483
|
"metadata"?: unknown;
|
|
474
484
|
};
|
|
475
|
-
|
|
485
|
+
/**
|
|
486
|
+
* @experimental This is experimental and subject to change in future versions.
|
|
487
|
+
*/
|
|
488
|
+
export type FeaturesetsSpecification = {
|
|
476
489
|
[_: string]: FeaturesetSpecification;
|
|
477
490
|
};
|
|
478
|
-
|
|
491
|
+
/**
|
|
492
|
+
* @experimental This is experimental and subject to change in future versions.
|
|
493
|
+
*/
|
|
494
|
+
export type FeaturesetSpecification = {
|
|
479
495
|
/**
|
|
480
496
|
* @experimental This property is experimental and subject to change in future versions.
|
|
481
497
|
*/
|
|
@@ -485,7 +501,10 @@ type FeaturesetSpecification = {
|
|
|
485
501
|
*/
|
|
486
502
|
"selectors"?: Array<SelectorSpecification>;
|
|
487
503
|
};
|
|
488
|
-
|
|
504
|
+
/**
|
|
505
|
+
* @experimental This is experimental and subject to change in future versions.
|
|
506
|
+
*/
|
|
507
|
+
export type SelectorSpecification = {
|
|
489
508
|
/**
|
|
490
509
|
* @experimental This property is experimental and subject to change in future versions.
|
|
491
510
|
*/
|
|
@@ -503,18 +522,21 @@ type SelectorSpecification = {
|
|
|
503
522
|
*/
|
|
504
523
|
"_uniqueFeatureID"?: boolean;
|
|
505
524
|
};
|
|
506
|
-
|
|
525
|
+
/**
|
|
526
|
+
* @experimental This is experimental and subject to change in future versions.
|
|
527
|
+
*/
|
|
528
|
+
export type SelectorPropertySpecification = {
|
|
507
529
|
/**
|
|
508
530
|
* @experimental This property is experimental and subject to change in future versions.
|
|
509
531
|
*/
|
|
510
532
|
[_: string]: unknown;
|
|
511
533
|
};
|
|
512
|
-
type AppearanceSpecification = {
|
|
534
|
+
export type AppearanceSpecification = {
|
|
513
535
|
"condition"?: DataDrivenPropertyValueSpecification<boolean>;
|
|
514
536
|
"name"?: string;
|
|
515
537
|
"properties"?: unknown;
|
|
516
538
|
};
|
|
517
|
-
type VectorSourceSpecification = {
|
|
539
|
+
export type VectorSourceSpecification = {
|
|
518
540
|
"type": "vector";
|
|
519
541
|
"url"?: string;
|
|
520
542
|
"tiles"?: Array<string>;
|
|
@@ -538,7 +560,7 @@ type VectorSourceSpecification = {
|
|
|
538
560
|
"volatile"?: boolean;
|
|
539
561
|
[_: string]: unknown;
|
|
540
562
|
};
|
|
541
|
-
type RasterSourceSpecification = {
|
|
563
|
+
export type RasterSourceSpecification = {
|
|
542
564
|
"type": "raster";
|
|
543
565
|
"url"?: string;
|
|
544
566
|
"tiles"?: Array<string>;
|
|
@@ -562,7 +584,7 @@ type RasterSourceSpecification = {
|
|
|
562
584
|
"volatile"?: boolean;
|
|
563
585
|
[_: string]: unknown;
|
|
564
586
|
};
|
|
565
|
-
type RasterDEMSourceSpecification = {
|
|
587
|
+
export type RasterDEMSourceSpecification = {
|
|
566
588
|
"type": "raster-dem";
|
|
567
589
|
"url"?: string;
|
|
568
590
|
"tiles"?: Array<string>;
|
|
@@ -586,7 +608,10 @@ type RasterDEMSourceSpecification = {
|
|
|
586
608
|
"volatile"?: boolean;
|
|
587
609
|
[_: string]: unknown;
|
|
588
610
|
};
|
|
589
|
-
|
|
611
|
+
/**
|
|
612
|
+
* @experimental This is experimental and subject to change in future versions.
|
|
613
|
+
*/
|
|
614
|
+
export type RasterArraySourceSpecification = {
|
|
590
615
|
"type": "raster-array";
|
|
591
616
|
"url"?: string;
|
|
592
617
|
"tiles"?: Array<string>;
|
|
@@ -610,7 +635,7 @@ type RasterArraySourceSpecification = {
|
|
|
610
635
|
"volatile"?: boolean;
|
|
611
636
|
[_: string]: unknown;
|
|
612
637
|
};
|
|
613
|
-
type GeoJSONSourceSpecification = {
|
|
638
|
+
export type GeoJSONSourceSpecification = {
|
|
614
639
|
"type": "geojson";
|
|
615
640
|
"data"?: GeoJSON.GeoJSON | string;
|
|
616
641
|
"maxzoom"?: number;
|
|
@@ -629,7 +654,7 @@ type GeoJSONSourceSpecification = {
|
|
|
629
654
|
"promoteId"?: PromoteIdSpecification;
|
|
630
655
|
"dynamic"?: boolean;
|
|
631
656
|
};
|
|
632
|
-
type VideoSourceSpecification = {
|
|
657
|
+
export type VideoSourceSpecification = {
|
|
633
658
|
"type": "video";
|
|
634
659
|
"urls": Array<string>;
|
|
635
660
|
"coordinates": [
|
|
@@ -651,7 +676,7 @@ type VideoSourceSpecification = {
|
|
|
651
676
|
]
|
|
652
677
|
];
|
|
653
678
|
};
|
|
654
|
-
type ImageSourceSpecification = {
|
|
679
|
+
export type ImageSourceSpecification = {
|
|
655
680
|
"type": "image";
|
|
656
681
|
"url"?: string;
|
|
657
682
|
"coordinates": [
|
|
@@ -673,23 +698,24 @@ type ImageSourceSpecification = {
|
|
|
673
698
|
]
|
|
674
699
|
];
|
|
675
700
|
};
|
|
676
|
-
type ModelSourceSpecification = {
|
|
701
|
+
export type ModelSourceSpecification = {
|
|
677
702
|
"type": "model" | "batched-model";
|
|
703
|
+
"url"?: string;
|
|
678
704
|
"maxzoom"?: number;
|
|
679
705
|
"minzoom"?: number;
|
|
680
706
|
"tiles"?: Array<string>;
|
|
681
707
|
"models"?: ModelSourceModelsSpecification;
|
|
682
708
|
};
|
|
683
|
-
type SourceSpecification = VectorSourceSpecification | RasterSourceSpecification | RasterDEMSourceSpecification | RasterArraySourceSpecification | GeoJSONSourceSpecification | VideoSourceSpecification | ImageSourceSpecification | ModelSourceSpecification;
|
|
684
|
-
type IconsetSpecification = {
|
|
709
|
+
export type SourceSpecification = VectorSourceSpecification | RasterSourceSpecification | RasterDEMSourceSpecification | RasterArraySourceSpecification | GeoJSONSourceSpecification | VideoSourceSpecification | ImageSourceSpecification | ModelSourceSpecification;
|
|
710
|
+
export type IconsetSpecification = {
|
|
685
711
|
"type": "sprite";
|
|
686
712
|
"url": string;
|
|
687
713
|
} | {
|
|
688
714
|
"type": "source";
|
|
689
715
|
"source": string;
|
|
690
716
|
};
|
|
691
|
-
type ModelSpecification = string;
|
|
692
|
-
type AmbientLightSpecification = {
|
|
717
|
+
export type ModelSpecification = string;
|
|
718
|
+
export type AmbientLightSpecification = {
|
|
693
719
|
"id": string;
|
|
694
720
|
"properties"?: {
|
|
695
721
|
"color"?: PropertyValueSpecification<ColorSpecification>;
|
|
@@ -700,7 +726,7 @@ type AmbientLightSpecification = {
|
|
|
700
726
|
};
|
|
701
727
|
"type": "ambient";
|
|
702
728
|
};
|
|
703
|
-
type DirectionalLightSpecification = {
|
|
729
|
+
export type DirectionalLightSpecification = {
|
|
704
730
|
"id": string;
|
|
705
731
|
"properties"?: {
|
|
706
732
|
"direction"?: PropertyValueSpecification<[
|
|
@@ -720,10 +746,14 @@ type DirectionalLightSpecification = {
|
|
|
720
746
|
"shadow-quality"?: PropertyValueSpecification<number>;
|
|
721
747
|
"shadow-intensity"?: PropertyValueSpecification<number>;
|
|
722
748
|
"shadow-intensity-transition"?: TransitionSpecification;
|
|
749
|
+
/**
|
|
750
|
+
* @experimental This property is experimental and subject to change in future versions.
|
|
751
|
+
*/
|
|
752
|
+
"shadow-draw-before-layer"?: string;
|
|
723
753
|
};
|
|
724
754
|
"type": "directional";
|
|
725
755
|
};
|
|
726
|
-
type FlatLightSpecification = {
|
|
756
|
+
export type FlatLightSpecification = {
|
|
727
757
|
"id": string;
|
|
728
758
|
"properties"?: {
|
|
729
759
|
"anchor"?: PropertyValueSpecification<"map" | "viewport">;
|
|
@@ -741,8 +771,8 @@ type FlatLightSpecification = {
|
|
|
741
771
|
};
|
|
742
772
|
"type": "flat";
|
|
743
773
|
};
|
|
744
|
-
type LightsSpecification = AmbientLightSpecification | DirectionalLightSpecification | FlatLightSpecification;
|
|
745
|
-
type FillLayerSpecification = {
|
|
774
|
+
export type LightsSpecification = AmbientLightSpecification | DirectionalLightSpecification | FlatLightSpecification;
|
|
775
|
+
export type FillLayerSpecification = {
|
|
746
776
|
"id": string;
|
|
747
777
|
"type": "fill";
|
|
748
778
|
"metadata"?: unknown;
|
|
@@ -807,7 +837,15 @@ type FillLayerSpecification = {
|
|
|
807
837
|
*/
|
|
808
838
|
"appearances"?: Array<AppearanceSpecification>;
|
|
809
839
|
};
|
|
810
|
-
|
|
840
|
+
/**
|
|
841
|
+
* @deprecated Use `FillLayerSpecification['layout']` instead.
|
|
842
|
+
*/
|
|
843
|
+
export type FillLayout = FillLayerSpecification["layout"];
|
|
844
|
+
/**
|
|
845
|
+
* @deprecated Use `FillLayerSpecification['paint']` instead.
|
|
846
|
+
*/
|
|
847
|
+
export type FillPaint = FillLayerSpecification["paint"];
|
|
848
|
+
export type LineLayerSpecification = {
|
|
811
849
|
"id": string;
|
|
812
850
|
"type": "line";
|
|
813
851
|
"metadata"?: unknown;
|
|
@@ -834,7 +872,7 @@ type LineLayerSpecification = {
|
|
|
834
872
|
/**
|
|
835
873
|
* @experimental This property is experimental and subject to change in future versions.
|
|
836
874
|
*/
|
|
837
|
-
"line-cross-slope"?: ExpressionSpecification;
|
|
875
|
+
"line-cross-slope"?: number | ExpressionSpecification;
|
|
838
876
|
"visibility"?: "visible" | "none" | ExpressionSpecification;
|
|
839
877
|
/**
|
|
840
878
|
* @experimental This property is experimental and subject to change in future versions.
|
|
@@ -864,7 +902,7 @@ type LineLayerSpecification = {
|
|
|
864
902
|
"line-dasharray"?: DataDrivenPropertyValueSpecification<Array<number>>;
|
|
865
903
|
"line-pattern"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
|
|
866
904
|
"line-pattern-cross-fade"?: PropertyValueSpecification<number>;
|
|
867
|
-
"line-gradient"?: ExpressionSpecification;
|
|
905
|
+
"line-gradient"?: ColorSpecification | ExpressionSpecification;
|
|
868
906
|
"line-gradient-use-theme"?: PropertyValueSpecification<string>;
|
|
869
907
|
"line-trim-offset"?: [
|
|
870
908
|
number,
|
|
@@ -898,7 +936,15 @@ type LineLayerSpecification = {
|
|
|
898
936
|
*/
|
|
899
937
|
"appearances"?: Array<AppearanceSpecification>;
|
|
900
938
|
};
|
|
901
|
-
|
|
939
|
+
/**
|
|
940
|
+
* @deprecated Use `LineLayerSpecification['layout']` instead.
|
|
941
|
+
*/
|
|
942
|
+
export type LineLayout = LineLayerSpecification["layout"];
|
|
943
|
+
/**
|
|
944
|
+
* @deprecated Use `LineLayerSpecification['paint']` instead.
|
|
945
|
+
*/
|
|
946
|
+
export type LinePaint = LineLayerSpecification["paint"];
|
|
947
|
+
export type SymbolLayerSpecification = {
|
|
902
948
|
"id": string;
|
|
903
949
|
"type": "symbol";
|
|
904
950
|
"metadata"?: unknown;
|
|
@@ -927,7 +973,10 @@ type SymbolLayerSpecification = {
|
|
|
927
973
|
/**
|
|
928
974
|
* @experimental This property is experimental and subject to change in future versions.
|
|
929
975
|
*/
|
|
930
|
-
"icon-size-scale-range"?:
|
|
976
|
+
"icon-size-scale-range"?: [
|
|
977
|
+
number,
|
|
978
|
+
number
|
|
979
|
+
] | ExpressionSpecification;
|
|
931
980
|
"icon-text-fit"?: DataDrivenPropertyValueSpecification<"none" | "width" | "height" | "both">;
|
|
932
981
|
"icon-text-fit-padding"?: DataDrivenPropertyValueSpecification<[
|
|
933
982
|
number,
|
|
@@ -954,7 +1003,10 @@ type SymbolLayerSpecification = {
|
|
|
954
1003
|
/**
|
|
955
1004
|
* @experimental This property is experimental and subject to change in future versions.
|
|
956
1005
|
*/
|
|
957
|
-
"text-size-scale-range"?:
|
|
1006
|
+
"text-size-scale-range"?: [
|
|
1007
|
+
number,
|
|
1008
|
+
number
|
|
1009
|
+
] | ExpressionSpecification;
|
|
958
1010
|
"text-max-width"?: DataDrivenPropertyValueSpecification<number>;
|
|
959
1011
|
"text-line-height"?: DataDrivenPropertyValueSpecification<number>;
|
|
960
1012
|
"text-letter-spacing"?: DataDrivenPropertyValueSpecification<number>;
|
|
@@ -1023,10 +1075,10 @@ type SymbolLayerSpecification = {
|
|
|
1023
1075
|
]>;
|
|
1024
1076
|
"text-translate-transition"?: TransitionSpecification;
|
|
1025
1077
|
"text-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
|
|
1026
|
-
"icon-color-saturation"?: ExpressionSpecification;
|
|
1027
|
-
"icon-color-contrast"?: ExpressionSpecification;
|
|
1028
|
-
"icon-color-brightness-min"?: ExpressionSpecification;
|
|
1029
|
-
"icon-color-brightness-max"?: ExpressionSpecification;
|
|
1078
|
+
"icon-color-saturation"?: number | ExpressionSpecification;
|
|
1079
|
+
"icon-color-contrast"?: number | ExpressionSpecification;
|
|
1080
|
+
"icon-color-brightness-min"?: number | ExpressionSpecification;
|
|
1081
|
+
"icon-color-brightness-max"?: number | ExpressionSpecification;
|
|
1030
1082
|
/**
|
|
1031
1083
|
* @experimental This property is experimental and subject to change in future versions.
|
|
1032
1084
|
*/
|
|
@@ -1038,7 +1090,15 @@ type SymbolLayerSpecification = {
|
|
|
1038
1090
|
*/
|
|
1039
1091
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1040
1092
|
};
|
|
1041
|
-
|
|
1093
|
+
/**
|
|
1094
|
+
* @deprecated Use `SymbolLayerSpecification['layout']` instead.
|
|
1095
|
+
*/
|
|
1096
|
+
export type SymbolLayout = SymbolLayerSpecification["layout"];
|
|
1097
|
+
/**
|
|
1098
|
+
* @deprecated Use `SymbolLayerSpecification['paint']` instead.
|
|
1099
|
+
*/
|
|
1100
|
+
export type SymbolPaint = SymbolLayerSpecification["paint"];
|
|
1101
|
+
export type CircleLayerSpecification = {
|
|
1042
1102
|
"id": string;
|
|
1043
1103
|
"type": "circle";
|
|
1044
1104
|
"metadata"?: unknown;
|
|
@@ -1089,7 +1149,15 @@ type CircleLayerSpecification = {
|
|
|
1089
1149
|
*/
|
|
1090
1150
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1091
1151
|
};
|
|
1092
|
-
|
|
1152
|
+
/**
|
|
1153
|
+
* @deprecated Use `CircleLayerSpecification['layout']` instead.
|
|
1154
|
+
*/
|
|
1155
|
+
export type CircleLayout = CircleLayerSpecification["layout"];
|
|
1156
|
+
/**
|
|
1157
|
+
* @deprecated Use `CircleLayerSpecification['paint']` instead.
|
|
1158
|
+
*/
|
|
1159
|
+
export type CirclePaint = CircleLayerSpecification["paint"];
|
|
1160
|
+
export type HeatmapLayerSpecification = {
|
|
1093
1161
|
"id": string;
|
|
1094
1162
|
"type": "heatmap";
|
|
1095
1163
|
"metadata"?: unknown;
|
|
@@ -1108,7 +1176,7 @@ type HeatmapLayerSpecification = {
|
|
|
1108
1176
|
"heatmap-weight"?: DataDrivenPropertyValueSpecification<number>;
|
|
1109
1177
|
"heatmap-intensity"?: PropertyValueSpecification<number>;
|
|
1110
1178
|
"heatmap-intensity-transition"?: TransitionSpecification;
|
|
1111
|
-
"heatmap-color"?: ExpressionSpecification;
|
|
1179
|
+
"heatmap-color"?: ColorSpecification | ExpressionSpecification;
|
|
1112
1180
|
"heatmap-color-use-theme"?: PropertyValueSpecification<string>;
|
|
1113
1181
|
"heatmap-opacity"?: PropertyValueSpecification<number>;
|
|
1114
1182
|
"heatmap-opacity-transition"?: TransitionSpecification;
|
|
@@ -1118,7 +1186,15 @@ type HeatmapLayerSpecification = {
|
|
|
1118
1186
|
*/
|
|
1119
1187
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1120
1188
|
};
|
|
1121
|
-
|
|
1189
|
+
/**
|
|
1190
|
+
* @deprecated Use `HeatmapLayerSpecification['layout']` instead.
|
|
1191
|
+
*/
|
|
1192
|
+
export type HeatmapLayout = HeatmapLayerSpecification["layout"];
|
|
1193
|
+
/**
|
|
1194
|
+
* @deprecated Use `HeatmapLayerSpecification['paint']` instead.
|
|
1195
|
+
*/
|
|
1196
|
+
export type HeatmapPaint = HeatmapLayerSpecification["paint"];
|
|
1197
|
+
export type FillExtrusionLayerSpecification = {
|
|
1122
1198
|
"id": string;
|
|
1123
1199
|
"type": "fill-extrusion";
|
|
1124
1200
|
"metadata"?: unknown;
|
|
@@ -1133,7 +1209,7 @@ type FillExtrusionLayerSpecification = {
|
|
|
1133
1209
|
/**
|
|
1134
1210
|
* @experimental This property is experimental and subject to change in future versions.
|
|
1135
1211
|
*/
|
|
1136
|
-
"fill-extrusion-edge-radius"?: ExpressionSpecification;
|
|
1212
|
+
"fill-extrusion-edge-radius"?: number | ExpressionSpecification;
|
|
1137
1213
|
};
|
|
1138
1214
|
"paint"?: {
|
|
1139
1215
|
"fill-extrusion-opacity"?: PropertyValueSpecification<number>;
|
|
@@ -1216,7 +1292,7 @@ type FillExtrusionLayerSpecification = {
|
|
|
1216
1292
|
* @experimental This property is experimental and subject to change in future versions.
|
|
1217
1293
|
*/
|
|
1218
1294
|
"fill-extrusion-rounded-roof"?: PropertyValueSpecification<boolean>;
|
|
1219
|
-
"fill-extrusion-cutoff-fade-range"?: ExpressionSpecification;
|
|
1295
|
+
"fill-extrusion-cutoff-fade-range"?: number | ExpressionSpecification;
|
|
1220
1296
|
"fill-extrusion-emissive-strength"?: DataDrivenPropertyValueSpecification<number>;
|
|
1221
1297
|
"fill-extrusion-emissive-strength-transition"?: TransitionSpecification;
|
|
1222
1298
|
/**
|
|
@@ -1231,7 +1307,15 @@ type FillExtrusionLayerSpecification = {
|
|
|
1231
1307
|
*/
|
|
1232
1308
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1233
1309
|
};
|
|
1234
|
-
|
|
1310
|
+
/**
|
|
1311
|
+
* @deprecated Use `FillExtrusionLayerSpecification['layout']` instead.
|
|
1312
|
+
*/
|
|
1313
|
+
export type FillExtrusionLayout = FillExtrusionLayerSpecification["layout"];
|
|
1314
|
+
/**
|
|
1315
|
+
* @deprecated Use `FillExtrusionLayerSpecification['paint']` instead.
|
|
1316
|
+
*/
|
|
1317
|
+
export type FillExtrusionPaint = FillExtrusionLayerSpecification["paint"];
|
|
1318
|
+
export type BuildingLayerSpecification = {
|
|
1235
1319
|
"id": string;
|
|
1236
1320
|
"type": "building";
|
|
1237
1321
|
"metadata"?: unknown;
|
|
@@ -1265,7 +1349,7 @@ type BuildingLayerSpecification = {
|
|
|
1265
1349
|
"paint"?: {
|
|
1266
1350
|
"building-opacity"?: PropertyValueSpecification<number>;
|
|
1267
1351
|
"building-opacity-transition"?: TransitionSpecification;
|
|
1268
|
-
"building-ambient-occlusion-intensity"?: ExpressionSpecification;
|
|
1352
|
+
"building-ambient-occlusion-intensity"?: number | ExpressionSpecification;
|
|
1269
1353
|
"building-ambient-occlusion-intensity-transition"?: TransitionSpecification;
|
|
1270
1354
|
"building-ambient-occlusion-ground-intensity"?: PropertyValueSpecification<number>;
|
|
1271
1355
|
"building-ambient-occlusion-ground-intensity-transition"?: TransitionSpecification;
|
|
@@ -1280,7 +1364,7 @@ type BuildingLayerSpecification = {
|
|
|
1280
1364
|
"building-color-use-theme"?: PropertyValueSpecification<string>;
|
|
1281
1365
|
"building-emissive-strength"?: DataDrivenPropertyValueSpecification<number>;
|
|
1282
1366
|
"building-facade-emissive-chance"?: PropertyValueSpecification<number>;
|
|
1283
|
-
"building-cutoff-fade-range"?: ExpressionSpecification;
|
|
1367
|
+
"building-cutoff-fade-range"?: number | ExpressionSpecification;
|
|
1284
1368
|
"building-flood-light-color"?: PropertyValueSpecification<ColorSpecification>;
|
|
1285
1369
|
"building-flood-light-color-transition"?: TransitionSpecification;
|
|
1286
1370
|
"building-flood-light-color-use-theme"?: PropertyValueSpecification<string>;
|
|
@@ -1294,7 +1378,15 @@ type BuildingLayerSpecification = {
|
|
|
1294
1378
|
*/
|
|
1295
1379
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1296
1380
|
};
|
|
1297
|
-
|
|
1381
|
+
/**
|
|
1382
|
+
* @deprecated Use `BuildingLayerSpecification['layout']` instead.
|
|
1383
|
+
*/
|
|
1384
|
+
export type BuildingLayout = BuildingLayerSpecification["layout"];
|
|
1385
|
+
/**
|
|
1386
|
+
* @deprecated Use `BuildingLayerSpecification['paint']` instead.
|
|
1387
|
+
*/
|
|
1388
|
+
export type BuildingPaint = BuildingLayerSpecification["paint"];
|
|
1389
|
+
export type RasterLayerSpecification = {
|
|
1298
1390
|
"id": string;
|
|
1299
1391
|
"type": "raster";
|
|
1300
1392
|
"metadata"?: unknown;
|
|
@@ -1310,7 +1402,7 @@ type RasterLayerSpecification = {
|
|
|
1310
1402
|
"paint"?: {
|
|
1311
1403
|
"raster-opacity"?: PropertyValueSpecification<number>;
|
|
1312
1404
|
"raster-opacity-transition"?: TransitionSpecification;
|
|
1313
|
-
"raster-color"?: ExpressionSpecification;
|
|
1405
|
+
"raster-color"?: ColorSpecification | ExpressionSpecification;
|
|
1314
1406
|
"raster-color-use-theme"?: PropertyValueSpecification<string>;
|
|
1315
1407
|
"raster-color-mix"?: PropertyValueSpecification<[
|
|
1316
1408
|
number,
|
|
@@ -1353,7 +1445,15 @@ type RasterLayerSpecification = {
|
|
|
1353
1445
|
*/
|
|
1354
1446
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1355
1447
|
};
|
|
1356
|
-
|
|
1448
|
+
/**
|
|
1449
|
+
* @deprecated Use `RasterLayerSpecification['layout']` instead.
|
|
1450
|
+
*/
|
|
1451
|
+
export type RasterLayout = RasterLayerSpecification["layout"];
|
|
1452
|
+
/**
|
|
1453
|
+
* @deprecated Use `RasterLayerSpecification['paint']` instead.
|
|
1454
|
+
*/
|
|
1455
|
+
export type RasterPaint = RasterLayerSpecification["paint"];
|
|
1456
|
+
export type RasterParticleLayerSpecification = {
|
|
1357
1457
|
"id": string;
|
|
1358
1458
|
"type": "raster-particle";
|
|
1359
1459
|
"metadata"?: unknown;
|
|
@@ -1369,7 +1469,7 @@ type RasterParticleLayerSpecification = {
|
|
|
1369
1469
|
"paint"?: {
|
|
1370
1470
|
"raster-particle-array-band"?: string;
|
|
1371
1471
|
"raster-particle-count"?: number;
|
|
1372
|
-
"raster-particle-color"?: ExpressionSpecification;
|
|
1472
|
+
"raster-particle-color"?: ColorSpecification | ExpressionSpecification;
|
|
1373
1473
|
"raster-particle-color-use-theme"?: PropertyValueSpecification<string>;
|
|
1374
1474
|
"raster-particle-max-speed"?: number;
|
|
1375
1475
|
"raster-particle-speed-factor"?: PropertyValueSpecification<number>;
|
|
@@ -1385,7 +1485,15 @@ type RasterParticleLayerSpecification = {
|
|
|
1385
1485
|
*/
|
|
1386
1486
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1387
1487
|
};
|
|
1388
|
-
|
|
1488
|
+
/**
|
|
1489
|
+
* @deprecated Use `RasterParticleLayerSpecification['layout']` instead.
|
|
1490
|
+
*/
|
|
1491
|
+
export type RasterParticleLayout = RasterParticleLayerSpecification["layout"];
|
|
1492
|
+
/**
|
|
1493
|
+
* @deprecated Use `RasterParticleLayerSpecification['paint']` instead.
|
|
1494
|
+
*/
|
|
1495
|
+
export type RasterParticlePaint = RasterParticleLayerSpecification["paint"];
|
|
1496
|
+
export type HillshadeLayerSpecification = {
|
|
1389
1497
|
"id": string;
|
|
1390
1498
|
"type": "hillshade";
|
|
1391
1499
|
"metadata"?: unknown;
|
|
@@ -1420,7 +1528,15 @@ type HillshadeLayerSpecification = {
|
|
|
1420
1528
|
*/
|
|
1421
1529
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1422
1530
|
};
|
|
1423
|
-
|
|
1531
|
+
/**
|
|
1532
|
+
* @deprecated Use `HillshadeLayerSpecification['layout']` instead.
|
|
1533
|
+
*/
|
|
1534
|
+
export type HillshadeLayout = HillshadeLayerSpecification["layout"];
|
|
1535
|
+
/**
|
|
1536
|
+
* @deprecated Use `HillshadeLayerSpecification['paint']` instead.
|
|
1537
|
+
*/
|
|
1538
|
+
export type HillshadePaint = HillshadeLayerSpecification["paint"];
|
|
1539
|
+
export type ModelLayerSpecification = {
|
|
1424
1540
|
"id": string;
|
|
1425
1541
|
"type": "model";
|
|
1426
1542
|
"metadata"?: unknown;
|
|
@@ -1433,6 +1549,10 @@ type ModelLayerSpecification = {
|
|
|
1433
1549
|
"layout"?: {
|
|
1434
1550
|
"visibility"?: "visible" | "none" | ExpressionSpecification;
|
|
1435
1551
|
"model-id"?: DataDrivenPropertyValueSpecification<string>;
|
|
1552
|
+
/**
|
|
1553
|
+
* @experimental This property is experimental and subject to change in future versions.
|
|
1554
|
+
*/
|
|
1555
|
+
"model-allow-density-reduction"?: boolean;
|
|
1436
1556
|
};
|
|
1437
1557
|
"paint"?: {
|
|
1438
1558
|
"model-opacity"?: DataDrivenPropertyValueSpecification<number>;
|
|
@@ -1477,7 +1597,7 @@ type ModelLayerSpecification = {
|
|
|
1477
1597
|
number
|
|
1478
1598
|
]>;
|
|
1479
1599
|
"model-height-based-emissive-strength-multiplier-transition"?: TransitionSpecification;
|
|
1480
|
-
"model-cutoff-fade-range"?: ExpressionSpecification;
|
|
1600
|
+
"model-cutoff-fade-range"?: number | ExpressionSpecification;
|
|
1481
1601
|
"model-front-cutoff"?: PropertyValueSpecification<[
|
|
1482
1602
|
number,
|
|
1483
1603
|
number,
|
|
@@ -1490,7 +1610,15 @@ type ModelLayerSpecification = {
|
|
|
1490
1610
|
*/
|
|
1491
1611
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1492
1612
|
};
|
|
1493
|
-
|
|
1613
|
+
/**
|
|
1614
|
+
* @deprecated Use `ModelLayerSpecification['layout']` instead.
|
|
1615
|
+
*/
|
|
1616
|
+
export type ModelLayout = ModelLayerSpecification["layout"];
|
|
1617
|
+
/**
|
|
1618
|
+
* @deprecated Use `ModelLayerSpecification['paint']` instead.
|
|
1619
|
+
*/
|
|
1620
|
+
export type ModelPaint = ModelLayerSpecification["paint"];
|
|
1621
|
+
export type BackgroundLayerSpecification = {
|
|
1494
1622
|
"id": string;
|
|
1495
1623
|
"type": "background";
|
|
1496
1624
|
"metadata"?: unknown;
|
|
@@ -1522,7 +1650,15 @@ type BackgroundLayerSpecification = {
|
|
|
1522
1650
|
*/
|
|
1523
1651
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1524
1652
|
};
|
|
1525
|
-
|
|
1653
|
+
/**
|
|
1654
|
+
* @deprecated Use `BackgroundLayerSpecification['layout']` instead.
|
|
1655
|
+
*/
|
|
1656
|
+
export type BackgroundLayout = BackgroundLayerSpecification["layout"];
|
|
1657
|
+
/**
|
|
1658
|
+
* @deprecated Use `BackgroundLayerSpecification['paint']` instead.
|
|
1659
|
+
*/
|
|
1660
|
+
export type BackgroundPaint = BackgroundLayerSpecification["paint"];
|
|
1661
|
+
export type SkyLayerSpecification = {
|
|
1526
1662
|
"id": string;
|
|
1527
1663
|
"type": "sky";
|
|
1528
1664
|
"metadata"?: unknown;
|
|
@@ -1547,7 +1683,7 @@ type SkyLayerSpecification = {
|
|
|
1547
1683
|
number
|
|
1548
1684
|
]>;
|
|
1549
1685
|
"sky-gradient-radius"?: PropertyValueSpecification<number>;
|
|
1550
|
-
"sky-gradient"?: ExpressionSpecification;
|
|
1686
|
+
"sky-gradient"?: ColorSpecification | ExpressionSpecification;
|
|
1551
1687
|
"sky-gradient-use-theme"?: PropertyValueSpecification<string>;
|
|
1552
1688
|
"sky-atmosphere-halo-color"?: ColorSpecification;
|
|
1553
1689
|
"sky-atmosphere-halo-color-use-theme"?: PropertyValueSpecification<string>;
|
|
@@ -1561,7 +1697,15 @@ type SkyLayerSpecification = {
|
|
|
1561
1697
|
*/
|
|
1562
1698
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1563
1699
|
};
|
|
1564
|
-
|
|
1700
|
+
/**
|
|
1701
|
+
* @deprecated Use `SkyLayerSpecification['layout']` instead.
|
|
1702
|
+
*/
|
|
1703
|
+
export type SkyLayout = SkyLayerSpecification["layout"];
|
|
1704
|
+
/**
|
|
1705
|
+
* @deprecated Use `SkyLayerSpecification['paint']` instead.
|
|
1706
|
+
*/
|
|
1707
|
+
export type SkyPaint = SkyLayerSpecification["paint"];
|
|
1708
|
+
export type SlotLayerSpecification = {
|
|
1565
1709
|
"id": string;
|
|
1566
1710
|
"type": "slot";
|
|
1567
1711
|
"metadata"?: unknown;
|
|
@@ -1578,7 +1722,7 @@ type SlotLayerSpecification = {
|
|
|
1578
1722
|
"layout"?: never;
|
|
1579
1723
|
"paint"?: never;
|
|
1580
1724
|
};
|
|
1581
|
-
type ClipLayerSpecification = {
|
|
1725
|
+
export type ClipLayerSpecification = {
|
|
1582
1726
|
"id": string;
|
|
1583
1727
|
"type": "clip";
|
|
1584
1728
|
"metadata"?: unknown;
|
|
@@ -1589,8 +1733,8 @@ type ClipLayerSpecification = {
|
|
|
1589
1733
|
"maxzoom"?: number;
|
|
1590
1734
|
"filter"?: FilterSpecification;
|
|
1591
1735
|
"layout"?: {
|
|
1592
|
-
"clip-layer-types"?: ExpressionSpecification;
|
|
1593
|
-
"clip-layer-scope"?: ExpressionSpecification;
|
|
1736
|
+
"clip-layer-types"?: Array<"model" | "symbol"> | ExpressionSpecification;
|
|
1737
|
+
"clip-layer-scope"?: Array<string> | ExpressionSpecification;
|
|
1594
1738
|
};
|
|
1595
1739
|
/**
|
|
1596
1740
|
* @experimental This property is experimental and subject to change in future versions.
|
|
@@ -1598,7 +1742,110 @@ type ClipLayerSpecification = {
|
|
|
1598
1742
|
"appearances"?: Array<AppearanceSpecification>;
|
|
1599
1743
|
"paint"?: never;
|
|
1600
1744
|
};
|
|
1601
|
-
|
|
1745
|
+
/**
|
|
1746
|
+
* @deprecated Use `ClipLayerSpecification['layout']` instead.
|
|
1747
|
+
*/
|
|
1748
|
+
export type ClipLayout = ClipLayerSpecification["layout"];
|
|
1749
|
+
export type LayerSpecification = FillLayerSpecification | LineLayerSpecification | SymbolLayerSpecification | CircleLayerSpecification | HeatmapLayerSpecification | FillExtrusionLayerSpecification | BuildingLayerSpecification | RasterLayerSpecification | RasterParticleLayerSpecification | HillshadeLayerSpecification | ModelLayerSpecification | BackgroundLayerSpecification | SkyLayerSpecification | SlotLayerSpecification | ClipLayerSpecification;
|
|
1750
|
+
export type LayoutSpecification = UnionToIntersection<NonNullable<LayerSpecification["layout"]>>;
|
|
1751
|
+
export type PaintSpecification = UnionToIntersection<NonNullable<LayerSpecification["paint"]>>;
|
|
1752
|
+
export type Layer = Pick<LayerSpecification, "id" | "type" | "source" | "source-layer" | "slot" | "filter" | "layout" | "paint" | "minzoom" | "maxzoom" | "metadata">;
|
|
1753
|
+
/**
|
|
1754
|
+
* @deprecated Use `StyleSpecification` instead.
|
|
1755
|
+
*/
|
|
1756
|
+
export type Style = StyleSpecification;
|
|
1757
|
+
/**
|
|
1758
|
+
* @deprecated Use `LayerSpecification` instead.
|
|
1759
|
+
*/
|
|
1760
|
+
export type AnyLayer = LayerSpecification;
|
|
1761
|
+
/**
|
|
1762
|
+
* @deprecated Use `FillLayerSpecification` instead.
|
|
1763
|
+
*/
|
|
1764
|
+
export type FillLayer = FillLayerSpecification;
|
|
1765
|
+
/**
|
|
1766
|
+
* @deprecated Use `LineLayerSpecification` instead.
|
|
1767
|
+
*/
|
|
1768
|
+
export type LineLayer = LineLayerSpecification;
|
|
1769
|
+
/**
|
|
1770
|
+
* @deprecated Use `SymbolLayerSpecification` instead.
|
|
1771
|
+
*/
|
|
1772
|
+
export type SymbolLayer = SymbolLayerSpecification;
|
|
1773
|
+
/**
|
|
1774
|
+
* @deprecated Use `CircleLayerSpecification` instead.
|
|
1775
|
+
*/
|
|
1776
|
+
export type CircleLayer = CircleLayerSpecification;
|
|
1777
|
+
/**
|
|
1778
|
+
* @deprecated Use `HeatmapLayerSpecification` instead.
|
|
1779
|
+
*/
|
|
1780
|
+
export type HeatmapLayer = HeatmapLayerSpecification;
|
|
1781
|
+
/**
|
|
1782
|
+
* @deprecated Use `FillExtrusionLayerSpecification` instead.
|
|
1783
|
+
*/
|
|
1784
|
+
export type FillExtrusionLayer = FillExtrusionLayerSpecification;
|
|
1785
|
+
/**
|
|
1786
|
+
* @deprecated Use `BuildingLayerSpecification` instead.
|
|
1787
|
+
*/
|
|
1788
|
+
export type BuildingLayer = BuildingLayerSpecification;
|
|
1789
|
+
/**
|
|
1790
|
+
* @deprecated Use `RasterLayerSpecification` instead.
|
|
1791
|
+
*/
|
|
1792
|
+
export type RasterLayer = RasterLayerSpecification;
|
|
1793
|
+
/**
|
|
1794
|
+
* @deprecated Use `RasterParticleLayerSpecification` instead.
|
|
1795
|
+
*/
|
|
1796
|
+
export type RasterParticleLayer = RasterParticleLayerSpecification;
|
|
1797
|
+
/**
|
|
1798
|
+
* @deprecated Use `HillshadeLayerSpecification` instead.
|
|
1799
|
+
*/
|
|
1800
|
+
export type HillshadeLayer = HillshadeLayerSpecification;
|
|
1801
|
+
/**
|
|
1802
|
+
* @deprecated Use `ModelLayerSpecification` instead.
|
|
1803
|
+
*/
|
|
1804
|
+
export type ModelLayer = ModelLayerSpecification;
|
|
1805
|
+
/**
|
|
1806
|
+
* @deprecated Use `BackgroundLayerSpecification` instead.
|
|
1807
|
+
*/
|
|
1808
|
+
export type BackgroundLayer = BackgroundLayerSpecification;
|
|
1809
|
+
/**
|
|
1810
|
+
* @deprecated Use `SkyLayerSpecification` instead.
|
|
1811
|
+
*/
|
|
1812
|
+
export type SkyLayer = SkyLayerSpecification;
|
|
1813
|
+
/**
|
|
1814
|
+
* @deprecated Use `SlotLayerSpecification` instead.
|
|
1815
|
+
*/
|
|
1816
|
+
export type SlotLayer = SlotLayerSpecification;
|
|
1817
|
+
/**
|
|
1818
|
+
* @deprecated Use `ClipLayerSpecification` instead.
|
|
1819
|
+
*/
|
|
1820
|
+
export type ClipLayer = ClipLayerSpecification;
|
|
1821
|
+
/**
|
|
1822
|
+
* @deprecated Use `LayoutSpecification` instead.
|
|
1823
|
+
*/
|
|
1824
|
+
export type AnyLayout = LayoutSpecification;
|
|
1825
|
+
/**
|
|
1826
|
+
* @deprecated Use `PaintSpecification` instead.
|
|
1827
|
+
*/
|
|
1828
|
+
export type AnyPaint = PaintSpecification;
|
|
1829
|
+
/**
|
|
1830
|
+
* @deprecated Use `ExpressionSpecification` instead.
|
|
1831
|
+
*/
|
|
1832
|
+
export type Expression = ExpressionSpecification;
|
|
1833
|
+
/**
|
|
1834
|
+
* @deprecated Use `TransitionSpecification` instead.
|
|
1835
|
+
*/
|
|
1836
|
+
export type Transition = TransitionSpecification;
|
|
1837
|
+
/**
|
|
1838
|
+
* @deprecated Use `SourceSpecification` instead.
|
|
1839
|
+
*/
|
|
1840
|
+
export type AnySourceData = SourceSpecification;
|
|
1841
|
+
/**
|
|
1842
|
+
* @deprecated Use `SourcesSpecification` instead.
|
|
1843
|
+
*/
|
|
1844
|
+
export type Sources = SourcesSpecification;
|
|
1845
|
+
/**
|
|
1846
|
+
* @deprecated Use `ProjectionSpecification` instead.
|
|
1847
|
+
*/
|
|
1848
|
+
export type Projection = ProjectionSpecification;
|
|
1602
1849
|
/**
|
|
1603
1850
|
* Migrate a Mapbox GL Style to the latest version.
|
|
1604
1851
|
*
|
|
@@ -1908,11 +2155,11 @@ type CanonicalTileID = {
|
|
|
1908
2155
|
y: number;
|
|
1909
2156
|
};
|
|
1910
2157
|
type SerializedExpression = Array<unknown> | Array<string> | string | number | boolean | null;
|
|
1911
|
-
interface Expression {
|
|
2158
|
+
interface Expression$1 {
|
|
1912
2159
|
readonly type: Type;
|
|
1913
2160
|
value?: any;
|
|
1914
2161
|
evaluate: (ctx: EvaluationContext) => any;
|
|
1915
|
-
eachChild: (fn: (arg1: Expression) => void) => void;
|
|
2162
|
+
eachChild: (fn: (arg1: Expression$1) => void) => void;
|
|
1916
2163
|
/**
|
|
1917
2164
|
* Statically analyze the expression, attempting to enumerate possible outputs. Returns
|
|
1918
2165
|
* false if the complete set of outputs is statically undecidable, otherwise true.
|
|
@@ -1921,8 +2168,8 @@ interface Expression {
|
|
|
1921
2168
|
serialize: () => SerializedExpression;
|
|
1922
2169
|
}
|
|
1923
2170
|
type ConfigOptionValue = {
|
|
1924
|
-
default: Expression;
|
|
1925
|
-
value?: Expression;
|
|
2171
|
+
default: Expression$1;
|
|
2172
|
+
value?: Expression$1;
|
|
1926
2173
|
values?: Array<unknown>;
|
|
1927
2174
|
minValue?: number;
|
|
1928
2175
|
maxValue?: number;
|
|
@@ -2034,7 +2281,7 @@ interface GlobalProperties {
|
|
|
2034
2281
|
activeFloors?: Set<string>;
|
|
2035
2282
|
}
|
|
2036
2283
|
declare class StyleExpression {
|
|
2037
|
-
expression: Expression;
|
|
2284
|
+
expression: Expression$1;
|
|
2038
2285
|
_scope?: string;
|
|
2039
2286
|
_options?: ConfigOptions;
|
|
2040
2287
|
_iconImageUseTheme?: string;
|
|
@@ -2048,7 +2295,7 @@ declare class StyleExpression {
|
|
|
2048
2295
|
};
|
|
2049
2296
|
configDependencies: Set<string>;
|
|
2050
2297
|
isIndoorDependent: boolean;
|
|
2051
|
-
constructor(expression: Expression, propertySpec?: StylePropertySpecification, scope?: string, options?: ConfigOptions, iconImageUseTheme?: string);
|
|
2298
|
+
constructor(expression: Expression$1, propertySpec?: StylePropertySpecification, scope?: string, options?: ConfigOptions, iconImageUseTheme?: string);
|
|
2052
2299
|
evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any;
|
|
2053
2300
|
evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData, iconImageUseTheme?: string): any;
|
|
2054
2301
|
}
|
|
@@ -2230,7 +2477,7 @@ type MapboxStyleSpecification = StyleSpecification & {
|
|
|
2230
2477
|
export function validateMapboxApiSupported(style: MapboxStyleSpecification, styleSpec?: StyleReference): ValidationErrors;
|
|
2231
2478
|
type ExpressionType = "data-driven" | "color-ramp" | "data-constant" | "constant";
|
|
2232
2479
|
type ExpressionParameter = "zoom" | "pitch" | "feature" | "raster-value" | "feature-state" | "line-progress" | "measure-light" | "heatmap-density" | "sky-radial-progress" | "distance-from-center" | "raster-particle-speed";
|
|
2233
|
-
type
|
|
2480
|
+
export type PropertyExpressionSpecification = {
|
|
2234
2481
|
interpolated: boolean;
|
|
2235
2482
|
parameters?: ExpressionParameter[];
|
|
2236
2483
|
relaxZoomRestriction?: boolean;
|
|
@@ -2239,7 +2486,7 @@ export type ArrayPropertySpecification = {
|
|
|
2239
2486
|
type: "array";
|
|
2240
2487
|
"property-type": ExpressionType;
|
|
2241
2488
|
value: "enum";
|
|
2242
|
-
expression?:
|
|
2489
|
+
expression?: PropertyExpressionSpecification;
|
|
2243
2490
|
transition?: boolean;
|
|
2244
2491
|
default?: string[];
|
|
2245
2492
|
length?: number;
|
|
@@ -2257,7 +2504,7 @@ export type ArrayPropertySpecification = {
|
|
|
2257
2504
|
type: "array";
|
|
2258
2505
|
"property-type": ExpressionType;
|
|
2259
2506
|
value: "number";
|
|
2260
|
-
expression?:
|
|
2507
|
+
expression?: PropertyExpressionSpecification;
|
|
2261
2508
|
transition?: boolean;
|
|
2262
2509
|
default?: number[];
|
|
2263
2510
|
minimum?: number;
|
|
@@ -2275,7 +2522,7 @@ export type ArrayPropertySpecification = {
|
|
|
2275
2522
|
type: "array";
|
|
2276
2523
|
"property-type": ExpressionType;
|
|
2277
2524
|
value: "string";
|
|
2278
|
-
expression?:
|
|
2525
|
+
expression?: PropertyExpressionSpecification;
|
|
2279
2526
|
transition?: boolean;
|
|
2280
2527
|
default?: string[];
|
|
2281
2528
|
length?: number;
|
|
@@ -2291,7 +2538,7 @@ export type ArrayPropertySpecification = {
|
|
|
2291
2538
|
export type BooleanPropertySpecification = {
|
|
2292
2539
|
type: "boolean";
|
|
2293
2540
|
"property-type": ExpressionType;
|
|
2294
|
-
expression?:
|
|
2541
|
+
expression?: PropertyExpressionSpecification;
|
|
2295
2542
|
transition?: boolean;
|
|
2296
2543
|
default?: boolean;
|
|
2297
2544
|
overridable?: boolean;
|
|
@@ -2304,7 +2551,7 @@ export type BooleanPropertySpecification = {
|
|
|
2304
2551
|
export type ColorPropertySpecification = {
|
|
2305
2552
|
type: "color";
|
|
2306
2553
|
"property-type": ExpressionType;
|
|
2307
|
-
expression?:
|
|
2554
|
+
expression?: PropertyExpressionSpecification;
|
|
2308
2555
|
transition?: boolean;
|
|
2309
2556
|
default?: string;
|
|
2310
2557
|
"use-theme"?: boolean;
|
|
@@ -2318,7 +2565,7 @@ export type ColorPropertySpecification = {
|
|
|
2318
2565
|
export type EnumPropertySpecification = {
|
|
2319
2566
|
type: "enum";
|
|
2320
2567
|
"property-type": ExpressionType;
|
|
2321
|
-
expression?:
|
|
2568
|
+
expression?: PropertyExpressionSpecification;
|
|
2322
2569
|
transition?: boolean;
|
|
2323
2570
|
default?: string;
|
|
2324
2571
|
values?: {
|
|
@@ -2333,7 +2580,7 @@ export type EnumPropertySpecification = {
|
|
|
2333
2580
|
export type FormattedPropertySpecification = {
|
|
2334
2581
|
type: "formatted";
|
|
2335
2582
|
"property-type": ExpressionType;
|
|
2336
|
-
expression?:
|
|
2583
|
+
expression?: PropertyExpressionSpecification;
|
|
2337
2584
|
transition?: boolean;
|
|
2338
2585
|
default?: string;
|
|
2339
2586
|
tokens?: boolean;
|
|
@@ -2345,7 +2592,7 @@ export type FormattedPropertySpecification = {
|
|
|
2345
2592
|
export type NumberPropertySpecification = {
|
|
2346
2593
|
type: "number";
|
|
2347
2594
|
"property-type": ExpressionType;
|
|
2348
|
-
expression?:
|
|
2595
|
+
expression?: PropertyExpressionSpecification;
|
|
2349
2596
|
transition?: boolean;
|
|
2350
2597
|
default?: number;
|
|
2351
2598
|
minimum?: number;
|
|
@@ -2361,7 +2608,7 @@ export type NumberPropertySpecification = {
|
|
|
2361
2608
|
export type ResolvedImagePropertySpecification = {
|
|
2362
2609
|
type: "resolvedImage";
|
|
2363
2610
|
"property-type": ExpressionType;
|
|
2364
|
-
expression?:
|
|
2611
|
+
expression?: PropertyExpressionSpecification;
|
|
2365
2612
|
transition?: boolean;
|
|
2366
2613
|
default?: string;
|
|
2367
2614
|
tokens?: boolean;
|
|
@@ -2374,7 +2621,7 @@ export type ResolvedImagePropertySpecification = {
|
|
|
2374
2621
|
export type StringPropertySpecification = {
|
|
2375
2622
|
type: "string";
|
|
2376
2623
|
"property-type": ExpressionType;
|
|
2377
|
-
expression?:
|
|
2624
|
+
expression?: PropertyExpressionSpecification;
|
|
2378
2625
|
transition?: boolean;
|
|
2379
2626
|
default?: string;
|
|
2380
2627
|
tokens?: boolean;
|
|
@@ -2410,7 +2657,6 @@ export declare const visit: {
|
|
|
2410
2657
|
};
|
|
2411
2658
|
|
|
2412
2659
|
export {
|
|
2413
|
-
ExpressionSpecification$1 as ExpressionSpecification,
|
|
2414
2660
|
_default as latest,
|
|
2415
2661
|
_default$1 as migrate,
|
|
2416
2662
|
_default$2 as composite,
|