maplibre-gl 2.2.0-pre.4 → 2.3.0

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.
@@ -0,0 +1,1781 @@
1
+ // Generated by dts-bundle-generator v6.12.0
2
+
3
+ import Point from '@mapbox/point-geometry';
4
+
5
+ declare const _default: any;
6
+ /**
7
+ * Format a MapLibre GL Style. Returns a stringified style with its keys
8
+ * sorted in the same order as the reference style.
9
+ *
10
+ * The optional `space` argument is passed to
11
+ * [`JSON.stringify`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)
12
+ * to generate formatted output.
13
+ *
14
+ * If `space` is unspecified, a default of `2` spaces will be used.
15
+ *
16
+ * @private
17
+ * @param {Object} style a MapLibre GL Style
18
+ * @param {number} [space] space argument to pass to `JSON.stringify`
19
+ * @returns {string} stringified formatted JSON
20
+ * @example
21
+ * var fs = require('fs');
22
+ * var format = require('maplibre-gl-style-spec').format;
23
+ * var style = fs.readFileSync('./source.json', 'utf8');
24
+ * fs.writeFileSync('./dest.json', format(style));
25
+ * fs.writeFileSync('./dest.min.json', format(style, 0));
26
+ */
27
+ export declare function format(style: any, space?: number): string;
28
+ export declare type ColorSpecification = string;
29
+ export declare type PaddingSpecification = number | number[];
30
+ export declare type FormattedSpecification = string;
31
+ export declare type ResolvedImageSpecification = string;
32
+ export declare type PromoteIdSpecification = {
33
+ [_: string]: string;
34
+ } | string;
35
+ export declare type ExpressionInputType = string | number | boolean;
36
+ export declare type CollatorExpressionSpecification = [
37
+ "collator",
38
+ {
39
+ "case-sensitive"?: boolean | ExpressionSpecification;
40
+ "diacritic-sensitive"?: boolean | ExpressionSpecification;
41
+ locale?: string | ExpressionSpecification;
42
+ }
43
+ ];
44
+ export declare type InterpolationSpecification = [
45
+ "linear"
46
+ ] | [
47
+ "exponential",
48
+ number | ExpressionSpecification
49
+ ] | [
50
+ "cubic-bezier",
51
+ number | ExpressionSpecification,
52
+ number | ExpressionSpecification,
53
+ number | ExpressionSpecification,
54
+ number | ExpressionSpecification
55
+ ];
56
+ export declare type ExpressionSpecification = [
57
+ "array",
58
+ unknown | ExpressionSpecification
59
+ ] | [
60
+ "array",
61
+ ExpressionInputType | ExpressionSpecification,
62
+ unknown | ExpressionSpecification
63
+ ] | [
64
+ "array",
65
+ ExpressionInputType | ExpressionSpecification,
66
+ number | ExpressionSpecification,
67
+ unknown | ExpressionSpecification
68
+ ] | [
69
+ "boolean",
70
+ ...(unknown | ExpressionSpecification)[],
71
+ unknown | ExpressionSpecification
72
+ ] | CollatorExpressionSpecification | [
73
+ "format",
74
+ ...(string | [
75
+ "image",
76
+ ExpressionSpecification
77
+ ] | ExpressionSpecification | {
78
+ "font-scale"?: number | ExpressionSpecification;
79
+ "text-font"?: string[] | ExpressionSpecification;
80
+ "text-color": ColorSpecification | ExpressionSpecification;
81
+ })[]
82
+ ] | [
83
+ "image",
84
+ unknown | ExpressionSpecification
85
+ ] | [
86
+ "literal",
87
+ unknown
88
+ ] | [
89
+ "number",
90
+ unknown | ExpressionSpecification,
91
+ ...(unknown | ExpressionSpecification)[]
92
+ ] | [
93
+ "number-format",
94
+ number | ExpressionSpecification,
95
+ {
96
+ "locale"?: string | ExpressionSpecification;
97
+ "currency"?: string | ExpressionSpecification;
98
+ "min-fraction-digits"?: number | ExpressionSpecification;
99
+ "max-fraction-digits"?: number | ExpressionSpecification;
100
+ }
101
+ ] | [
102
+ "object",
103
+ unknown | ExpressionSpecification,
104
+ ...(unknown | ExpressionSpecification)[]
105
+ ] | [
106
+ "string",
107
+ unknown | ExpressionSpecification,
108
+ ...(unknown | ExpressionSpecification)[]
109
+ ] | [
110
+ "to-boolean",
111
+ unknown | ExpressionSpecification
112
+ ] | [
113
+ "to-color",
114
+ unknown | ExpressionSpecification,
115
+ ...(unknown | ExpressionSpecification)[]
116
+ ] | [
117
+ "to-number",
118
+ unknown | ExpressionSpecification,
119
+ ...(unknown | ExpressionSpecification)[]
120
+ ] | [
121
+ "to-string",
122
+ unknown | ExpressionSpecification
123
+ ] | [
124
+ "accumulated"
125
+ ] | [
126
+ "feature-state",
127
+ string
128
+ ] | [
129
+ "geometry-type"
130
+ ] | [
131
+ "id"
132
+ ] | [
133
+ "line-progress"
134
+ ] | [
135
+ "properties"
136
+ ] | [
137
+ "at",
138
+ number | ExpressionSpecification,
139
+ ExpressionSpecification
140
+ ] | [
141
+ "get",
142
+ string | ExpressionSpecification,
143
+ (Record<string, unknown> | ExpressionSpecification)?
144
+ ] | [
145
+ "has",
146
+ string | ExpressionSpecification,
147
+ (Record<string, unknown> | ExpressionSpecification)?
148
+ ] | [
149
+ "in",
150
+ ExpressionInputType | ExpressionSpecification,
151
+ ExpressionInputType | ExpressionSpecification
152
+ ] | [
153
+ "index-of",
154
+ ExpressionInputType | ExpressionSpecification,
155
+ ExpressionInputType | ExpressionSpecification
156
+ ] | [
157
+ "length",
158
+ string | ExpressionSpecification
159
+ ] | [
160
+ "slice",
161
+ string | ExpressionSpecification,
162
+ number | ExpressionSpecification
163
+ ] | [
164
+ "!",
165
+ boolean | ExpressionSpecification
166
+ ] | [
167
+ "!=",
168
+ ExpressionInputType | ExpressionSpecification,
169
+ ExpressionInputType | ExpressionSpecification,
170
+ CollatorExpressionSpecification?
171
+ ] | [
172
+ "<",
173
+ ExpressionInputType | ExpressionSpecification,
174
+ ExpressionInputType | ExpressionSpecification,
175
+ CollatorExpressionSpecification?
176
+ ] | [
177
+ "<=",
178
+ ExpressionInputType | ExpressionSpecification,
179
+ ExpressionInputType | ExpressionSpecification,
180
+ CollatorExpressionSpecification?
181
+ ] | [
182
+ "==",
183
+ ExpressionInputType | ExpressionSpecification,
184
+ ExpressionInputType | ExpressionSpecification,
185
+ CollatorExpressionSpecification?
186
+ ] | [
187
+ ">",
188
+ ExpressionInputType | ExpressionSpecification,
189
+ ExpressionInputType | ExpressionSpecification,
190
+ CollatorExpressionSpecification?
191
+ ] | [
192
+ ">=",
193
+ ExpressionInputType | ExpressionSpecification,
194
+ ExpressionInputType | ExpressionSpecification,
195
+ CollatorExpressionSpecification?
196
+ ] | [
197
+ "all",
198
+ ...(boolean | ExpressionSpecification)[]
199
+ ] | [
200
+ "any",
201
+ ...(boolean | ExpressionSpecification)[]
202
+ ] | [
203
+ "case",
204
+ boolean | ExpressionSpecification,
205
+ ExpressionInputType | ExpressionSpecification,
206
+ ...(boolean | ExpressionInputType | ExpressionSpecification)[],
207
+ ExpressionInputType | ExpressionSpecification
208
+ ] | [
209
+ "coalesce",
210
+ ExpressionInputType | ExpressionSpecification,
211
+ ExpressionInputType | ExpressionSpecification,
212
+ ...(ExpressionInputType | ExpressionSpecification)[]
213
+ ] | [
214
+ "match",
215
+ ExpressionInputType | ExpressionSpecification,
216
+ ExpressionInputType | ExpressionInputType[],
217
+ ExpressionInputType | ExpressionSpecification,
218
+ ...(ExpressionInputType | ExpressionInputType[] | ExpressionSpecification)[],
219
+ ExpressionInputType
220
+ ] | [
221
+ "within",
222
+ unknown | ExpressionSpecification
223
+ ] | [
224
+ "interpolate",
225
+ InterpolationSpecification,
226
+ number | ExpressionSpecification,
227
+ number | ExpressionSpecification,
228
+ ExpressionInputType | ExpressionSpecification,
229
+ ...(number | ExpressionInputType | ExpressionSpecification)[]
230
+ ] | [
231
+ "interpolate-hcl",
232
+ InterpolationSpecification,
233
+ number | ExpressionSpecification,
234
+ number | ExpressionSpecification,
235
+ ExpressionInputType | ExpressionSpecification,
236
+ ...(number | ColorSpecification | ExpressionSpecification)[]
237
+ ] | [
238
+ "interpolate-lab",
239
+ InterpolationSpecification,
240
+ number | ExpressionSpecification,
241
+ number | ExpressionSpecification,
242
+ ExpressionInputType | ExpressionSpecification,
243
+ ...(number | ColorSpecification | ExpressionSpecification)[]
244
+ ] | [
245
+ "step",
246
+ number | ExpressionSpecification,
247
+ number | ExpressionSpecification,
248
+ ExpressionInputType | ExpressionSpecification,
249
+ ...(number | ExpressionInputType | ExpressionSpecification)[]
250
+ ] | [
251
+ "let",
252
+ string,
253
+ ExpressionInputType | ExpressionSpecification,
254
+ ...(string | ExpressionInputType | ExpressionSpecification)[]
255
+ ] | [
256
+ "var",
257
+ string
258
+ ] | [
259
+ "concat",
260
+ ExpressionInputType | ExpressionSpecification,
261
+ ExpressionInputType | ExpressionSpecification,
262
+ ...(ExpressionInputType | ExpressionSpecification)[]
263
+ ] | [
264
+ "downcase",
265
+ string | ExpressionSpecification
266
+ ] | [
267
+ "is-supported-script",
268
+ string | ExpressionSpecification
269
+ ] | [
270
+ "resolved-locale",
271
+ CollatorExpressionSpecification
272
+ ] | [
273
+ "upcase",
274
+ string | ExpressionSpecification
275
+ ] | [
276
+ "rgb",
277
+ number | ExpressionSpecification,
278
+ number | ExpressionSpecification,
279
+ number | ExpressionSpecification
280
+ ] | [
281
+ "rgba",
282
+ number | ExpressionSpecification,
283
+ number | ExpressionSpecification,
284
+ number | ExpressionSpecification,
285
+ number | ExpressionSpecification
286
+ ] | [
287
+ "to-rgba",
288
+ ColorSpecification | ExpressionSpecification
289
+ ] | [
290
+ "-",
291
+ number | ExpressionSpecification,
292
+ (number | ExpressionSpecification)?
293
+ ] | [
294
+ "*",
295
+ number | ExpressionSpecification,
296
+ number | ExpressionSpecification,
297
+ ...(number | ExpressionSpecification)[]
298
+ ] | [
299
+ "/",
300
+ number | ExpressionSpecification,
301
+ number | ExpressionSpecification
302
+ ] | [
303
+ "%",
304
+ number | ExpressionSpecification,
305
+ number | ExpressionSpecification
306
+ ] | [
307
+ "^",
308
+ number | ExpressionSpecification,
309
+ number | ExpressionSpecification
310
+ ] | [
311
+ "+",
312
+ number | ExpressionSpecification,
313
+ number | ExpressionSpecification,
314
+ ...(number | ExpressionSpecification)[]
315
+ ] | [
316
+ "abs",
317
+ number | ExpressionSpecification
318
+ ] | [
319
+ "acos",
320
+ number | ExpressionSpecification
321
+ ] | [
322
+ "asin",
323
+ number | ExpressionSpecification
324
+ ] | [
325
+ "atan",
326
+ number | ExpressionSpecification
327
+ ] | [
328
+ "ceil",
329
+ number | ExpressionSpecification
330
+ ] | [
331
+ "cos",
332
+ number | ExpressionSpecification
333
+ ] | [
334
+ "distance",
335
+ Record<string, unknown> | ExpressionSpecification
336
+ ] | [
337
+ "ExpressionSpecification"
338
+ ] | [
339
+ "floor",
340
+ number | ExpressionSpecification
341
+ ] | [
342
+ "ln",
343
+ number | ExpressionSpecification
344
+ ] | [
345
+ "ln2"
346
+ ] | [
347
+ "log10",
348
+ number | ExpressionSpecification
349
+ ] | [
350
+ "log2",
351
+ number | ExpressionSpecification
352
+ ] | [
353
+ "max",
354
+ number | ExpressionSpecification,
355
+ ...(number | ExpressionSpecification)[]
356
+ ] | [
357
+ "min",
358
+ number | ExpressionSpecification,
359
+ ...(number | ExpressionSpecification)[]
360
+ ] | [
361
+ "pi"
362
+ ] | [
363
+ "round",
364
+ number | ExpressionSpecification
365
+ ] | [
366
+ "sin",
367
+ number | ExpressionSpecification
368
+ ] | [
369
+ "sqrt",
370
+ number | ExpressionSpecification
371
+ ] | [
372
+ "tan",
373
+ number | ExpressionSpecification
374
+ ] | [
375
+ "zoom"
376
+ ] | [
377
+ "heatmap-density"
378
+ ];
379
+ export declare type ExpressionFilterSpecification = boolean | ExpressionSpecification;
380
+ export declare type LegacyFilterSpecification = [
381
+ "has",
382
+ string
383
+ ] | [
384
+ "!has",
385
+ string
386
+ ] | [
387
+ "==",
388
+ string,
389
+ string | number | boolean
390
+ ] | [
391
+ "!=",
392
+ string,
393
+ string | number | boolean
394
+ ] | [
395
+ ">",
396
+ string,
397
+ string | number | boolean
398
+ ] | [
399
+ ">=",
400
+ string,
401
+ string | number | boolean
402
+ ] | [
403
+ "<",
404
+ string,
405
+ string | number | boolean
406
+ ] | [
407
+ "<=",
408
+ string,
409
+ string | number | boolean
410
+ ] | [
411
+ "in",
412
+ string,
413
+ ...(string | number | boolean)[]
414
+ ] | [
415
+ "!in",
416
+ string,
417
+ ...(string | number | boolean)[]
418
+ ] | [
419
+ "all",
420
+ ...LegacyFilterSpecification[]
421
+ ] | [
422
+ "any",
423
+ ...LegacyFilterSpecification[]
424
+ ] | [
425
+ "none",
426
+ ...LegacyFilterSpecification[]
427
+ ];
428
+ export declare type FilterSpecification = ExpressionFilterSpecification | LegacyFilterSpecification;
429
+ export declare type TransitionSpecification = {
430
+ duration?: number;
431
+ delay?: number;
432
+ };
433
+ export declare type CameraFunctionSpecification<T> = {
434
+ type: "exponential";
435
+ stops: Array<[
436
+ number,
437
+ T
438
+ ]>;
439
+ } | {
440
+ type: "interval";
441
+ stops: Array<[
442
+ number,
443
+ T
444
+ ]>;
445
+ };
446
+ export declare type SourceFunctionSpecification<T> = {
447
+ type: "exponential";
448
+ stops: Array<[
449
+ number,
450
+ T
451
+ ]>;
452
+ property: string;
453
+ default?: T;
454
+ } | {
455
+ type: "interval";
456
+ stops: Array<[
457
+ number,
458
+ T
459
+ ]>;
460
+ property: string;
461
+ default?: T;
462
+ } | {
463
+ type: "categorical";
464
+ stops: Array<[
465
+ string | number | boolean,
466
+ T
467
+ ]>;
468
+ property: string;
469
+ default?: T;
470
+ } | {
471
+ type: "identity";
472
+ property: string;
473
+ default?: T;
474
+ };
475
+ export declare type CompositeFunctionSpecification<T> = {
476
+ type: "exponential";
477
+ stops: Array<[
478
+ {
479
+ zoom: number;
480
+ value: number;
481
+ },
482
+ T
483
+ ]>;
484
+ property: string;
485
+ default?: T;
486
+ } | {
487
+ type: "interval";
488
+ stops: Array<[
489
+ {
490
+ zoom: number;
491
+ value: number;
492
+ },
493
+ T
494
+ ]>;
495
+ property: string;
496
+ default?: T;
497
+ } | {
498
+ type: "categorical";
499
+ stops: Array<[
500
+ {
501
+ zoom: number;
502
+ value: string | number | boolean;
503
+ },
504
+ T
505
+ ]>;
506
+ property: string;
507
+ default?: T;
508
+ };
509
+ export declare type PropertyValueSpecification<T> = T | CameraFunctionSpecification<T> | ExpressionSpecification;
510
+ export declare type DataDrivenPropertyValueSpecification<T> = T | CameraFunctionSpecification<T> | SourceFunctionSpecification<T> | CompositeFunctionSpecification<T> | ExpressionSpecification;
511
+ export declare type StyleSpecification = {
512
+ "version": 8;
513
+ "name"?: string;
514
+ "metadata"?: unknown;
515
+ "center"?: Array<number>;
516
+ "zoom"?: number;
517
+ "bearing"?: number;
518
+ "pitch"?: number;
519
+ "light"?: LightSpecification;
520
+ "terrain"?: TerrainSpecification;
521
+ "sources": {
522
+ [_: string]: SourceSpecification;
523
+ };
524
+ "sprite"?: string;
525
+ "glyphs"?: string;
526
+ "transition"?: TransitionSpecification;
527
+ "layers": Array<LayerSpecification>;
528
+ };
529
+ export declare type LightSpecification = {
530
+ "anchor"?: PropertyValueSpecification<"map" | "viewport">;
531
+ "position"?: PropertyValueSpecification<[
532
+ number,
533
+ number,
534
+ number
535
+ ]>;
536
+ "color"?: PropertyValueSpecification<ColorSpecification>;
537
+ "intensity"?: PropertyValueSpecification<number>;
538
+ };
539
+ export declare type TerrainSpecification = {
540
+ "source": string;
541
+ "exaggeration"?: number;
542
+ "elevationOffset"?: number;
543
+ };
544
+ export declare type VectorSourceSpecification = {
545
+ "type": "vector";
546
+ "url"?: string;
547
+ "tiles"?: Array<string>;
548
+ "bounds"?: [
549
+ number,
550
+ number,
551
+ number,
552
+ number
553
+ ];
554
+ "scheme"?: "xyz" | "tms";
555
+ "minzoom"?: number;
556
+ "maxzoom"?: number;
557
+ "attribution"?: string;
558
+ "promoteId"?: PromoteIdSpecification;
559
+ "volatile"?: boolean;
560
+ };
561
+ export declare type RasterSourceSpecification = {
562
+ "type": "raster";
563
+ "url"?: string;
564
+ "tiles"?: Array<string>;
565
+ "bounds"?: [
566
+ number,
567
+ number,
568
+ number,
569
+ number
570
+ ];
571
+ "minzoom"?: number;
572
+ "maxzoom"?: number;
573
+ "tileSize"?: number;
574
+ "scheme"?: "xyz" | "tms";
575
+ "attribution"?: string;
576
+ "volatile"?: boolean;
577
+ };
578
+ export declare type RasterDEMSourceSpecification = {
579
+ "type": "raster-dem";
580
+ "url"?: string;
581
+ "tiles"?: Array<string>;
582
+ "bounds"?: [
583
+ number,
584
+ number,
585
+ number,
586
+ number
587
+ ];
588
+ "minzoom"?: number;
589
+ "maxzoom"?: number;
590
+ "tileSize"?: number;
591
+ "attribution"?: string;
592
+ "encoding"?: "terrarium" | "mapbox";
593
+ "volatile"?: boolean;
594
+ };
595
+ export declare type GeoJSONSourceSpecification = {
596
+ "type": "geojson";
597
+ "data"?: unknown;
598
+ "maxzoom"?: number;
599
+ "attribution"?: string;
600
+ "buffer"?: number;
601
+ "filter"?: unknown;
602
+ "tolerance"?: number;
603
+ "cluster"?: boolean;
604
+ "clusterRadius"?: number;
605
+ "clusterMaxZoom"?: number;
606
+ "clusterMinPoints"?: number;
607
+ "clusterProperties"?: unknown;
608
+ "lineMetrics"?: boolean;
609
+ "generateId"?: boolean;
610
+ "promoteId"?: PromoteIdSpecification;
611
+ };
612
+ export declare type VideoSourceSpecification = {
613
+ "type": "video";
614
+ "urls": Array<string>;
615
+ "coordinates": [
616
+ [
617
+ number,
618
+ number
619
+ ],
620
+ [
621
+ number,
622
+ number
623
+ ],
624
+ [
625
+ number,
626
+ number
627
+ ],
628
+ [
629
+ number,
630
+ number
631
+ ]
632
+ ];
633
+ };
634
+ export declare type ImageSourceSpecification = {
635
+ "type": "image";
636
+ "url": string;
637
+ "coordinates": [
638
+ [
639
+ number,
640
+ number
641
+ ],
642
+ [
643
+ number,
644
+ number
645
+ ],
646
+ [
647
+ number,
648
+ number
649
+ ],
650
+ [
651
+ number,
652
+ number
653
+ ]
654
+ ];
655
+ };
656
+ export declare type SourceSpecification = VectorSourceSpecification | RasterSourceSpecification | RasterDEMSourceSpecification | GeoJSONSourceSpecification | VideoSourceSpecification | ImageSourceSpecification;
657
+ export declare type FillLayerSpecification = {
658
+ "id": string;
659
+ "type": "fill";
660
+ "metadata"?: unknown;
661
+ "source": string;
662
+ "source-layer"?: string;
663
+ "minzoom"?: number;
664
+ "maxzoom"?: number;
665
+ "filter"?: FilterSpecification;
666
+ "layout"?: {
667
+ "fill-sort-key"?: DataDrivenPropertyValueSpecification<number>;
668
+ "visibility"?: "visible" | "none";
669
+ };
670
+ "paint"?: {
671
+ "fill-antialias"?: PropertyValueSpecification<boolean>;
672
+ "fill-opacity"?: DataDrivenPropertyValueSpecification<number>;
673
+ "fill-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
674
+ "fill-outline-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
675
+ "fill-translate"?: PropertyValueSpecification<[
676
+ number,
677
+ number
678
+ ]>;
679
+ "fill-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
680
+ "fill-pattern"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
681
+ };
682
+ };
683
+ export declare type LineLayerSpecification = {
684
+ "id": string;
685
+ "type": "line";
686
+ "metadata"?: unknown;
687
+ "source": string;
688
+ "source-layer"?: string;
689
+ "minzoom"?: number;
690
+ "maxzoom"?: number;
691
+ "filter"?: FilterSpecification;
692
+ "layout"?: {
693
+ "line-cap"?: PropertyValueSpecification<"butt" | "round" | "square">;
694
+ "line-join"?: DataDrivenPropertyValueSpecification<"bevel" | "round" | "miter">;
695
+ "line-miter-limit"?: PropertyValueSpecification<number>;
696
+ "line-round-limit"?: PropertyValueSpecification<number>;
697
+ "line-sort-key"?: DataDrivenPropertyValueSpecification<number>;
698
+ "visibility"?: "visible" | "none";
699
+ };
700
+ "paint"?: {
701
+ "line-opacity"?: DataDrivenPropertyValueSpecification<number>;
702
+ "line-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
703
+ "line-translate"?: PropertyValueSpecification<[
704
+ number,
705
+ number
706
+ ]>;
707
+ "line-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
708
+ "line-width"?: DataDrivenPropertyValueSpecification<number>;
709
+ "line-gap-width"?: DataDrivenPropertyValueSpecification<number>;
710
+ "line-offset"?: DataDrivenPropertyValueSpecification<number>;
711
+ "line-blur"?: DataDrivenPropertyValueSpecification<number>;
712
+ "line-dasharray"?: PropertyValueSpecification<Array<number>>;
713
+ "line-pattern"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
714
+ "line-gradient"?: ExpressionSpecification;
715
+ };
716
+ };
717
+ export declare type SymbolLayerSpecification = {
718
+ "id": string;
719
+ "type": "symbol";
720
+ "metadata"?: unknown;
721
+ "source": string;
722
+ "source-layer"?: string;
723
+ "minzoom"?: number;
724
+ "maxzoom"?: number;
725
+ "filter"?: FilterSpecification;
726
+ "layout"?: {
727
+ "symbol-placement"?: PropertyValueSpecification<"point" | "line" | "line-center">;
728
+ "symbol-spacing"?: PropertyValueSpecification<number>;
729
+ "symbol-avoid-edges"?: PropertyValueSpecification<boolean>;
730
+ "symbol-sort-key"?: DataDrivenPropertyValueSpecification<number>;
731
+ "symbol-z-order"?: PropertyValueSpecification<"auto" | "viewport-y" | "source">;
732
+ "icon-allow-overlap"?: PropertyValueSpecification<boolean>;
733
+ "icon-overlap"?: PropertyValueSpecification<"never" | "always" | "cooperative">;
734
+ "icon-ignore-placement"?: PropertyValueSpecification<boolean>;
735
+ "icon-optional"?: PropertyValueSpecification<boolean>;
736
+ "icon-rotation-alignment"?: PropertyValueSpecification<"map" | "viewport" | "auto">;
737
+ "icon-size"?: DataDrivenPropertyValueSpecification<number>;
738
+ "icon-text-fit"?: PropertyValueSpecification<"none" | "width" | "height" | "both">;
739
+ "icon-text-fit-padding"?: PropertyValueSpecification<[
740
+ number,
741
+ number,
742
+ number,
743
+ number
744
+ ]>;
745
+ "icon-image"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
746
+ "icon-rotate"?: DataDrivenPropertyValueSpecification<number>;
747
+ "icon-padding"?: DataDrivenPropertyValueSpecification<PaddingSpecification>;
748
+ "icon-keep-upright"?: PropertyValueSpecification<boolean>;
749
+ "icon-offset"?: DataDrivenPropertyValueSpecification<[
750
+ number,
751
+ number
752
+ ]>;
753
+ "icon-anchor"?: DataDrivenPropertyValueSpecification<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
754
+ "icon-pitch-alignment"?: PropertyValueSpecification<"map" | "viewport" | "auto">;
755
+ "text-pitch-alignment"?: PropertyValueSpecification<"map" | "viewport" | "auto">;
756
+ "text-rotation-alignment"?: PropertyValueSpecification<"map" | "viewport" | "viewport-glyph" | "auto">;
757
+ "text-field"?: DataDrivenPropertyValueSpecification<FormattedSpecification>;
758
+ "text-font"?: DataDrivenPropertyValueSpecification<Array<string>>;
759
+ "text-size"?: DataDrivenPropertyValueSpecification<number>;
760
+ "text-max-width"?: DataDrivenPropertyValueSpecification<number>;
761
+ "text-line-height"?: PropertyValueSpecification<number>;
762
+ "text-letter-spacing"?: DataDrivenPropertyValueSpecification<number>;
763
+ "text-justify"?: DataDrivenPropertyValueSpecification<"auto" | "left" | "center" | "right">;
764
+ "text-radial-offset"?: DataDrivenPropertyValueSpecification<number>;
765
+ "text-variable-anchor"?: PropertyValueSpecification<Array<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">>;
766
+ "text-anchor"?: DataDrivenPropertyValueSpecification<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
767
+ "text-max-angle"?: PropertyValueSpecification<number>;
768
+ "text-writing-mode"?: PropertyValueSpecification<Array<"horizontal" | "vertical">>;
769
+ "text-rotate"?: DataDrivenPropertyValueSpecification<number>;
770
+ "text-padding"?: PropertyValueSpecification<number>;
771
+ "text-keep-upright"?: PropertyValueSpecification<boolean>;
772
+ "text-transform"?: DataDrivenPropertyValueSpecification<"none" | "uppercase" | "lowercase">;
773
+ "text-offset"?: DataDrivenPropertyValueSpecification<[
774
+ number,
775
+ number
776
+ ]>;
777
+ "text-allow-overlap"?: PropertyValueSpecification<boolean>;
778
+ "text-overlap"?: PropertyValueSpecification<"never" | "always" | "cooperative">;
779
+ "text-ignore-placement"?: PropertyValueSpecification<boolean>;
780
+ "text-optional"?: PropertyValueSpecification<boolean>;
781
+ "visibility"?: "visible" | "none";
782
+ };
783
+ "paint"?: {
784
+ "icon-opacity"?: DataDrivenPropertyValueSpecification<number>;
785
+ "icon-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
786
+ "icon-halo-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
787
+ "icon-halo-width"?: DataDrivenPropertyValueSpecification<number>;
788
+ "icon-halo-blur"?: DataDrivenPropertyValueSpecification<number>;
789
+ "icon-translate"?: PropertyValueSpecification<[
790
+ number,
791
+ number
792
+ ]>;
793
+ "icon-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
794
+ "text-opacity"?: DataDrivenPropertyValueSpecification<number>;
795
+ "text-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
796
+ "text-halo-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
797
+ "text-halo-width"?: DataDrivenPropertyValueSpecification<number>;
798
+ "text-halo-blur"?: DataDrivenPropertyValueSpecification<number>;
799
+ "text-translate"?: PropertyValueSpecification<[
800
+ number,
801
+ number
802
+ ]>;
803
+ "text-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
804
+ };
805
+ };
806
+ export declare type CircleLayerSpecification = {
807
+ "id": string;
808
+ "type": "circle";
809
+ "metadata"?: unknown;
810
+ "source": string;
811
+ "source-layer"?: string;
812
+ "minzoom"?: number;
813
+ "maxzoom"?: number;
814
+ "filter"?: FilterSpecification;
815
+ "layout"?: {
816
+ "circle-sort-key"?: DataDrivenPropertyValueSpecification<number>;
817
+ "visibility"?: "visible" | "none";
818
+ };
819
+ "paint"?: {
820
+ "circle-radius"?: DataDrivenPropertyValueSpecification<number>;
821
+ "circle-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
822
+ "circle-blur"?: DataDrivenPropertyValueSpecification<number>;
823
+ "circle-opacity"?: DataDrivenPropertyValueSpecification<number>;
824
+ "circle-translate"?: PropertyValueSpecification<[
825
+ number,
826
+ number
827
+ ]>;
828
+ "circle-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
829
+ "circle-pitch-scale"?: PropertyValueSpecification<"map" | "viewport">;
830
+ "circle-pitch-alignment"?: PropertyValueSpecification<"map" | "viewport">;
831
+ "circle-stroke-width"?: DataDrivenPropertyValueSpecification<number>;
832
+ "circle-stroke-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
833
+ "circle-stroke-opacity"?: DataDrivenPropertyValueSpecification<number>;
834
+ };
835
+ };
836
+ export declare type HeatmapLayerSpecification = {
837
+ "id": string;
838
+ "type": "heatmap";
839
+ "metadata"?: unknown;
840
+ "source": string;
841
+ "source-layer"?: string;
842
+ "minzoom"?: number;
843
+ "maxzoom"?: number;
844
+ "filter"?: FilterSpecification;
845
+ "layout"?: {
846
+ "visibility"?: "visible" | "none";
847
+ };
848
+ "paint"?: {
849
+ "heatmap-radius"?: DataDrivenPropertyValueSpecification<number>;
850
+ "heatmap-weight"?: DataDrivenPropertyValueSpecification<number>;
851
+ "heatmap-intensity"?: PropertyValueSpecification<number>;
852
+ "heatmap-color"?: ExpressionSpecification;
853
+ "heatmap-opacity"?: PropertyValueSpecification<number>;
854
+ };
855
+ };
856
+ export declare type FillExtrusionLayerSpecification = {
857
+ "id": string;
858
+ "type": "fill-extrusion";
859
+ "metadata"?: unknown;
860
+ "source": string;
861
+ "source-layer"?: string;
862
+ "minzoom"?: number;
863
+ "maxzoom"?: number;
864
+ "filter"?: FilterSpecification;
865
+ "layout"?: {
866
+ "visibility"?: "visible" | "none";
867
+ };
868
+ "paint"?: {
869
+ "fill-extrusion-opacity"?: PropertyValueSpecification<number>;
870
+ "fill-extrusion-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
871
+ "fill-extrusion-translate"?: PropertyValueSpecification<[
872
+ number,
873
+ number
874
+ ]>;
875
+ "fill-extrusion-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
876
+ "fill-extrusion-pattern"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
877
+ "fill-extrusion-height"?: DataDrivenPropertyValueSpecification<number>;
878
+ "fill-extrusion-base"?: DataDrivenPropertyValueSpecification<number>;
879
+ "fill-extrusion-vertical-gradient"?: PropertyValueSpecification<boolean>;
880
+ };
881
+ };
882
+ export declare type RasterLayerSpecification = {
883
+ "id": string;
884
+ "type": "raster";
885
+ "metadata"?: unknown;
886
+ "source": string;
887
+ "source-layer"?: string;
888
+ "minzoom"?: number;
889
+ "maxzoom"?: number;
890
+ "filter"?: FilterSpecification;
891
+ "layout"?: {
892
+ "visibility"?: "visible" | "none";
893
+ };
894
+ "paint"?: {
895
+ "raster-opacity"?: PropertyValueSpecification<number>;
896
+ "raster-hue-rotate"?: PropertyValueSpecification<number>;
897
+ "raster-brightness-min"?: PropertyValueSpecification<number>;
898
+ "raster-brightness-max"?: PropertyValueSpecification<number>;
899
+ "raster-saturation"?: PropertyValueSpecification<number>;
900
+ "raster-contrast"?: PropertyValueSpecification<number>;
901
+ "raster-resampling"?: PropertyValueSpecification<"linear" | "nearest">;
902
+ "raster-fade-duration"?: PropertyValueSpecification<number>;
903
+ };
904
+ };
905
+ export declare type HillshadeLayerSpecification = {
906
+ "id": string;
907
+ "type": "hillshade";
908
+ "metadata"?: unknown;
909
+ "source": string;
910
+ "source-layer"?: string;
911
+ "minzoom"?: number;
912
+ "maxzoom"?: number;
913
+ "filter"?: FilterSpecification;
914
+ "layout"?: {
915
+ "visibility"?: "visible" | "none";
916
+ };
917
+ "paint"?: {
918
+ "hillshade-illumination-direction"?: PropertyValueSpecification<number>;
919
+ "hillshade-illumination-anchor"?: PropertyValueSpecification<"map" | "viewport">;
920
+ "hillshade-exaggeration"?: PropertyValueSpecification<number>;
921
+ "hillshade-shadow-color"?: PropertyValueSpecification<ColorSpecification>;
922
+ "hillshade-highlight-color"?: PropertyValueSpecification<ColorSpecification>;
923
+ "hillshade-accent-color"?: PropertyValueSpecification<ColorSpecification>;
924
+ };
925
+ };
926
+ export declare type BackgroundLayerSpecification = {
927
+ "id": string;
928
+ "type": "background";
929
+ "metadata"?: unknown;
930
+ "minzoom"?: number;
931
+ "maxzoom"?: number;
932
+ "layout"?: {
933
+ "visibility"?: "visible" | "none";
934
+ };
935
+ "paint"?: {
936
+ "background-color"?: PropertyValueSpecification<ColorSpecification>;
937
+ "background-pattern"?: PropertyValueSpecification<ResolvedImageSpecification>;
938
+ "background-opacity"?: PropertyValueSpecification<number>;
939
+ };
940
+ };
941
+ export declare type LayerSpecification = FillLayerSpecification | LineLayerSpecification | SymbolLayerSpecification | CircleLayerSpecification | HeatmapLayerSpecification | FillExtrusionLayerSpecification | RasterLayerSpecification | HillshadeLayerSpecification | BackgroundLayerSpecification;
942
+ /**
943
+ * Migrate a Mapbox GL Style to the latest version.
944
+ *
945
+ * @private
946
+ * @alias migrate
947
+ * @param {StyleSpecification} style a MapLibre GL Style
948
+ * @returns {StyleSpecification} a migrated style
949
+ * @example
950
+ * var fs = require('fs');
951
+ * var migrate = require('maplibre-gl-style-spec').migrate;
952
+ * var style = fs.readFileSync('./style.json', 'utf8');
953
+ * fs.writeFileSync('./style.json', JSON.stringify(migrate(style)));
954
+ */
955
+ export function migrate(style: StyleSpecification): StyleSpecification;
956
+ export function composite(style: StyleSpecification): StyleSpecification;
957
+ /**
958
+ * Given an array of layers, some of which may contain `ref` properties
959
+ * whose value is the `id` of another property, return a new array where
960
+ * such layers have been augmented with the 'type', 'source', etc. properties
961
+ * from the parent layer, and the `ref` property has been removed.
962
+ *
963
+ * The input is not modified. The output may contain references to portions
964
+ * of the input.
965
+ *
966
+ * @private
967
+ * @param {Array<Layer>} layers
968
+ * @returns {Array<Layer>}
969
+ */
970
+ export declare function derefLayers(layers: any): any;
971
+ declare function diffStyles(before: any, after: any): any[];
972
+ export declare class ValidationError {
973
+ message: string;
974
+ identifier: string;
975
+ line: number;
976
+ constructor(key: string, value: any & {
977
+ __line__: number;
978
+ }, message: string, identifier?: string | null);
979
+ }
980
+ export declare class ParsingError {
981
+ message: string;
982
+ error: Error;
983
+ line: number;
984
+ constructor(error: Error);
985
+ }
986
+ declare class ExpressionParsingError extends Error {
987
+ key: string;
988
+ message: string;
989
+ constructor(key: string, message: string);
990
+ }
991
+ /**
992
+ * An RGBA color value. Create instances from color strings using the static
993
+ * method `Color.parse`. The constructor accepts RGB channel values in the range
994
+ * `[0, 1]`, premultiplied by A.
995
+ *
996
+ * @param {number} r The red channel.
997
+ * @param {number} g The green channel.
998
+ * @param {number} b The blue channel.
999
+ * @param {number} a The alpha channel.
1000
+ * @private
1001
+ */
1002
+ export declare class Color {
1003
+ r: number;
1004
+ g: number;
1005
+ b: number;
1006
+ a: number;
1007
+ constructor(r: number, g: number, b: number, a?: number);
1008
+ static black: Color;
1009
+ static white: Color;
1010
+ static transparent: Color;
1011
+ static red: Color;
1012
+ /**
1013
+ * Parses valid CSS color strings and returns a `Color` instance.
1014
+ * @returns A `Color` instance, or `undefined` if the input is not a valid color string.
1015
+ */
1016
+ static parse(input?: string | Color | null): Color | void;
1017
+ /**
1018
+ * Returns an RGBA string representing the color value.
1019
+ *
1020
+ * @returns An RGBA string.
1021
+ * @example
1022
+ * var purple = new Color.parse('purple');
1023
+ * purple.toString; // = "rgba(128,0,128,1)"
1024
+ * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)');
1025
+ * translucentGreen.toString(); // = "rgba(26,207,26,0.73)"
1026
+ */
1027
+ toString(): string;
1028
+ toArray(): [
1029
+ number,
1030
+ number,
1031
+ number,
1032
+ number
1033
+ ];
1034
+ }
1035
+ declare class Intl$Collator {
1036
+ constructor(locales?: string | string[], options?: CollatorOptions);
1037
+ compare(a: string, b: string): number;
1038
+ resolvedOptions(): any;
1039
+ }
1040
+ export declare type CollatorOptions = {
1041
+ localeMatcher?: "lookup" | "best fit";
1042
+ usage?: "sort" | "search";
1043
+ sensitivity?: "base" | "accent" | "case" | "variant";
1044
+ ignorePunctuation?: boolean;
1045
+ numeric?: boolean;
1046
+ caseFirst?: "upper" | "lower" | "false";
1047
+ };
1048
+ declare class Collator {
1049
+ locale: string | null;
1050
+ sensitivity: "base" | "accent" | "case" | "variant";
1051
+ collator: Intl$Collator;
1052
+ constructor(caseSensitive: boolean, diacriticSensitive: boolean, locale: string | null);
1053
+ compare(lhs: string, rhs: string): number;
1054
+ resolvedLocale(): string;
1055
+ }
1056
+ export declare type ResolvedImageOptions = {
1057
+ name: string;
1058
+ available: boolean;
1059
+ };
1060
+ declare class ResolvedImage {
1061
+ name: string;
1062
+ available: boolean;
1063
+ constructor(options: ResolvedImageOptions);
1064
+ toString(): string;
1065
+ static fromString(name: string): ResolvedImage | null;
1066
+ }
1067
+ declare class FormattedSection {
1068
+ text: string;
1069
+ image: ResolvedImage | null;
1070
+ scale: number | null;
1071
+ fontStack: string | null;
1072
+ textColor: Color | null;
1073
+ constructor(text: string, image: ResolvedImage | null, scale: number | null, fontStack: string | null, textColor: Color | null);
1074
+ }
1075
+ declare class Formatted {
1076
+ sections: Array<FormattedSection>;
1077
+ constructor(sections: Array<FormattedSection>);
1078
+ static fromString(unformatted: string): Formatted;
1079
+ isEmpty(): boolean;
1080
+ static factory(text: Formatted | string): Formatted;
1081
+ toString(): string;
1082
+ }
1083
+ /**
1084
+ * A set of four numbers representing padding around a box. Create instances from
1085
+ * bare arrays or numeric values using the static method `Padding.parse`.
1086
+ * @private
1087
+ */
1088
+ export declare class Padding {
1089
+ /** Padding values are in CSS order: top, right, bottom, left */
1090
+ values: [
1091
+ number,
1092
+ number,
1093
+ number,
1094
+ number
1095
+ ];
1096
+ constructor(values: [
1097
+ number,
1098
+ number,
1099
+ number,
1100
+ number
1101
+ ]);
1102
+ /**
1103
+ * Numeric padding values
1104
+ * @returns A `Padding` instance, or `undefined` if the input is not a valid padding value.
1105
+ */
1106
+ static parse(input?: number | number[] | Padding | null): Padding | void;
1107
+ toString(): string;
1108
+ }
1109
+ export declare type NullTypeT = {
1110
+ kind: "null";
1111
+ };
1112
+ export declare type NumberTypeT = {
1113
+ kind: "number";
1114
+ };
1115
+ export declare type StringTypeT = {
1116
+ kind: "string";
1117
+ };
1118
+ export declare type BooleanTypeT = {
1119
+ kind: "boolean";
1120
+ };
1121
+ export declare type ColorTypeT = {
1122
+ kind: "color";
1123
+ };
1124
+ export declare type ObjectTypeT = {
1125
+ kind: "object";
1126
+ };
1127
+ export declare type ValueTypeT = {
1128
+ kind: "value";
1129
+ };
1130
+ export declare type ErrorTypeT = {
1131
+ kind: "error";
1132
+ };
1133
+ export declare type CollatorTypeT = {
1134
+ kind: "collator";
1135
+ };
1136
+ export declare type FormattedTypeT = {
1137
+ kind: "formatted";
1138
+ };
1139
+ export declare type PaddingTypeT = {
1140
+ kind: "padding";
1141
+ };
1142
+ export declare type ResolvedImageTypeT = {
1143
+ kind: "resolvedImage";
1144
+ };
1145
+ export declare type EvaluationKind = "constant" | "source" | "camera" | "composite";
1146
+ export declare type Type = NullTypeT | NumberTypeT | StringTypeT | BooleanTypeT | ColorTypeT | ObjectTypeT | ValueTypeT | // eslint-disable-line no-use-before-define
1147
+ ArrayType | ErrorTypeT | CollatorTypeT | FormattedTypeT | PaddingTypeT | ResolvedImageTypeT;
1148
+ export declare type ArrayType = {
1149
+ kind: "array";
1150
+ itemType: Type;
1151
+ N: number;
1152
+ };
1153
+ export declare type Value = null | string | boolean | number | Color | Collator | Formatted | Padding | ResolvedImage | ReadonlyArray<Value> | {
1154
+ readonly [x: string]: Value;
1155
+ };
1156
+ declare class LngLatBounds {
1157
+ _ne: LngLat;
1158
+ _sw: LngLat;
1159
+ constructor(sw?: any, ne?: any);
1160
+ /**
1161
+ * Set the northeast corner of the bounding box
1162
+ *
1163
+ * @param {LngLatLike} ne a {@link LngLatLike} object describing the northeast corner of the bounding box.
1164
+ * @returns {LngLatBounds} `this`
1165
+ */
1166
+ setNorthEast(ne: LngLatLike): this;
1167
+ /**
1168
+ * Set the southwest corner of the bounding box
1169
+ *
1170
+ * @param {LngLatLike} sw a {@link LngLatLike} object describing the southwest corner of the bounding box.
1171
+ * @returns {LngLatBounds} `this`
1172
+ */
1173
+ setSouthWest(sw: LngLatLike): this;
1174
+ /**
1175
+ * Extend the bounds to include a given LngLatLike or LngLatBoundsLike.
1176
+ *
1177
+ * @param {LngLatLike|LngLatBoundsLike} obj object to extend to
1178
+ * @returns {LngLatBounds} `this`
1179
+ */
1180
+ extend(obj: LngLatLike | LngLatBoundsLike): any;
1181
+ /**
1182
+ * Returns the geographical coordinate equidistant from the bounding box's corners.
1183
+ *
1184
+ * @returns {LngLat} The bounding box's center.
1185
+ * @example
1186
+ * var llb = new maplibregl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);
1187
+ * llb.getCenter(); // = LngLat {lng: -73.96365, lat: 40.78315}
1188
+ */
1189
+ getCenter(): LngLat;
1190
+ /**
1191
+ * Returns the southwest corner of the bounding box.
1192
+ *
1193
+ * @returns {LngLat} The southwest corner of the bounding box.
1194
+ */
1195
+ getSouthWest(): LngLat;
1196
+ /**
1197
+ * Returns the northeast corner of the bounding box.
1198
+ *
1199
+ * @returns {LngLat} The northeast corner of the bounding box.
1200
+ */
1201
+ getNorthEast(): LngLat;
1202
+ /**
1203
+ * Returns the northwest corner of the bounding box.
1204
+ *
1205
+ * @returns {LngLat} The northwest corner of the bounding box.
1206
+ */
1207
+ getNorthWest(): LngLat;
1208
+ /**
1209
+ * Returns the southeast corner of the bounding box.
1210
+ *
1211
+ * @returns {LngLat} The southeast corner of the bounding box.
1212
+ */
1213
+ getSouthEast(): LngLat;
1214
+ /**
1215
+ * Returns the west edge of the bounding box.
1216
+ *
1217
+ * @returns {number} The west edge of the bounding box.
1218
+ */
1219
+ getWest(): number;
1220
+ /**
1221
+ * Returns the south edge of the bounding box.
1222
+ *
1223
+ * @returns {number} The south edge of the bounding box.
1224
+ */
1225
+ getSouth(): number;
1226
+ /**
1227
+ * Returns the east edge of the bounding box.
1228
+ *
1229
+ * @returns {number} The east edge of the bounding box.
1230
+ */
1231
+ getEast(): number;
1232
+ /**
1233
+ * Returns the north edge of the bounding box.
1234
+ *
1235
+ * @returns {number} The north edge of the bounding box.
1236
+ */
1237
+ getNorth(): number;
1238
+ /**
1239
+ * Returns the bounding box represented as an array.
1240
+ *
1241
+ * @returns {Array<Array<number>>} The bounding box represented as an array, consisting of the
1242
+ * southwest and northeast coordinates of the bounding represented as arrays of numbers.
1243
+ * @example
1244
+ * var llb = new maplibregl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);
1245
+ * llb.toArray(); // = [[-73.9876, 40.7661], [-73.9397, 40.8002]]
1246
+ */
1247
+ toArray(): number[][];
1248
+ /**
1249
+ * Return the bounding box represented as a string.
1250
+ *
1251
+ * @returns {string} The bounding box represents as a string of the format
1252
+ * `'LngLatBounds(LngLat(lng, lat), LngLat(lng, lat))'`.
1253
+ * @example
1254
+ * var llb = new maplibregl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002]);
1255
+ * llb.toString(); // = "LngLatBounds(LngLat(-73.9876, 40.7661), LngLat(-73.9397, 40.8002))"
1256
+ */
1257
+ toString(): string;
1258
+ /**
1259
+ * Check if the bounding box is an empty/`null`-type box.
1260
+ *
1261
+ * @returns {boolean} True if bounds have been defined, otherwise false.
1262
+ */
1263
+ isEmpty(): boolean;
1264
+ /**
1265
+ * Check if the point is within the bounding box.
1266
+ *
1267
+ * @param {LngLatLike} lnglat geographic point to check against.
1268
+ * @returns {boolean} True if the point is within the bounding box.
1269
+ * @example
1270
+ * var llb = new maplibregl.LngLatBounds(
1271
+ * new maplibregl.LngLat(-73.9876, 40.7661),
1272
+ * new maplibregl.LngLat(-73.9397, 40.8002)
1273
+ * );
1274
+ *
1275
+ * var ll = new maplibregl.LngLat(-73.9567, 40.7789);
1276
+ *
1277
+ * console.log(llb.contains(ll)); // = true
1278
+ */
1279
+ contains(lnglat: LngLatLike): boolean;
1280
+ /**
1281
+ * Converts an array to a `LngLatBounds` object.
1282
+ *
1283
+ * If a `LngLatBounds` object is passed in, the function returns it unchanged.
1284
+ *
1285
+ * Internally, the function calls `LngLat#convert` to convert arrays to `LngLat` values.
1286
+ *
1287
+ * @param {LngLatBoundsLike} input An array of two coordinates to convert, or a `LngLatBounds` object to return.
1288
+ * @returns {LngLatBounds} A new `LngLatBounds` object, if a conversion occurred, or the original `LngLatBounds` object.
1289
+ * @example
1290
+ * var arr = [[-73.9876, 40.7661], [-73.9397, 40.8002]];
1291
+ * var llb = maplibregl.LngLatBounds.convert(arr);
1292
+ * llb; // = LngLatBounds {_sw: LngLat {lng: -73.9876, lat: 40.7661}, _ne: LngLat {lng: -73.9397, lat: 40.8002}}
1293
+ */
1294
+ static convert(input: LngLatBoundsLike | null): LngLatBounds;
1295
+ }
1296
+ /**
1297
+ * A {@link LngLatBounds} object, an array of {@link LngLatLike} objects in [sw, ne] order,
1298
+ * or an array of numbers in [west, south, east, north] order.
1299
+ *
1300
+ * @typedef {LngLatBounds | [LngLatLike, LngLatLike] | [number, number, number, number]} LngLatBoundsLike
1301
+ * @example
1302
+ * var v1 = new maplibregl.LngLatBounds(
1303
+ * new maplibregl.LngLat(-73.9876, 40.7661),
1304
+ * new maplibregl.LngLat(-73.9397, 40.8002)
1305
+ * );
1306
+ * var v2 = new maplibregl.LngLatBounds([-73.9876, 40.7661], [-73.9397, 40.8002])
1307
+ * var v3 = [[-73.9876, 40.7661], [-73.9397, 40.8002]];
1308
+ */
1309
+ export declare type LngLatBoundsLike = LngLatBounds | [
1310
+ LngLatLike,
1311
+ LngLatLike
1312
+ ] | [
1313
+ number,
1314
+ number,
1315
+ number,
1316
+ number
1317
+ ];
1318
+ declare class LngLat {
1319
+ lng: number;
1320
+ lat: number;
1321
+ constructor(lng: number, lat: number);
1322
+ /**
1323
+ * Returns a new `LngLat` object whose longitude is wrapped to the range (-180, 180).
1324
+ *
1325
+ * @returns {LngLat} The wrapped `LngLat` object.
1326
+ * @example
1327
+ * var ll = new maplibregl.LngLat(286.0251, 40.7736);
1328
+ * var wrapped = ll.wrap();
1329
+ * wrapped.lng; // = -73.9749
1330
+ */
1331
+ wrap(): LngLat;
1332
+ /**
1333
+ * Returns the coordinates represented as an array of two numbers.
1334
+ *
1335
+ * @returns {Array<number>} The coordinates represeted as an array of longitude and latitude.
1336
+ * @example
1337
+ * var ll = new maplibregl.LngLat(-73.9749, 40.7736);
1338
+ * ll.toArray(); // = [-73.9749, 40.7736]
1339
+ */
1340
+ toArray(): number[];
1341
+ /**
1342
+ * Returns the coordinates represent as a string.
1343
+ *
1344
+ * @returns {string} The coordinates represented as a string of the format `'LngLat(lng, lat)'`.
1345
+ * @example
1346
+ * var ll = new maplibregl.LngLat(-73.9749, 40.7736);
1347
+ * ll.toString(); // = "LngLat(-73.9749, 40.7736)"
1348
+ */
1349
+ toString(): string;
1350
+ /**
1351
+ * Returns the approximate distance between a pair of coordinates in meters
1352
+ * Uses the Haversine Formula (from R.W. Sinnott, "Virtues of the Haversine", Sky and Telescope, vol. 68, no. 2, 1984, p. 159)
1353
+ *
1354
+ * @param {LngLat} lngLat coordinates to compute the distance to
1355
+ * @returns {number} Distance in meters between the two coordinates.
1356
+ * @example
1357
+ * var new_york = new maplibregl.LngLat(-74.0060, 40.7128);
1358
+ * var los_angeles = new maplibregl.LngLat(-118.2437, 34.0522);
1359
+ * new_york.distanceTo(los_angeles); // = 3935751.690893987, "true distance" using a non-spherical approximation is ~3966km
1360
+ */
1361
+ distanceTo(lngLat: LngLat): number;
1362
+ /**
1363
+ * Returns a `LngLatBounds` from the coordinates extended by a given `radius`. The returned `LngLatBounds` completely contains the `radius`.
1364
+ *
1365
+ * @param {number} [radius=0] Distance in meters from the coordinates to extend the bounds.
1366
+ * @returns {LngLatBounds} A new `LngLatBounds` object representing the coordinates extended by the `radius`.
1367
+ * @example
1368
+ * var ll = new maplibregl.LngLat(-73.9749, 40.7736);
1369
+ * ll.toBounds(100).toArray(); // = [[-73.97501862141328, 40.77351016847229], [-73.97478137858673, 40.77368983152771]]
1370
+ */
1371
+ toBounds(radius?: number): LngLatBounds;
1372
+ /**
1373
+ * Converts an array of two numbers or an object with `lng` and `lat` or `lon` and `lat` properties
1374
+ * to a `LngLat` object.
1375
+ *
1376
+ * If a `LngLat` object is passed in, the function returns it unchanged.
1377
+ *
1378
+ * @param {LngLatLike} input An array of two numbers or object to convert, or a `LngLat` object to return.
1379
+ * @returns {LngLat} A new `LngLat` object, if a conversion occurred, or the original `LngLat` object.
1380
+ * @example
1381
+ * var arr = [-73.9749, 40.7736];
1382
+ * var ll = maplibregl.LngLat.convert(arr);
1383
+ * ll; // = LngLat {lng: -73.9749, lat: 40.7736}
1384
+ */
1385
+ static convert(input: LngLatLike): LngLat;
1386
+ }
1387
+ /**
1388
+ * A {@link LngLat} object, an array of two numbers representing longitude and latitude,
1389
+ * or an object with `lng` and `lat` or `lon` and `lat` properties.
1390
+ *
1391
+ * @typedef {LngLat | {lng: number, lat: number} | {lon: number, lat: number} | [number, number]} LngLatLike
1392
+ * @example
1393
+ * var v1 = new maplibregl.LngLat(-122.420679, 37.772537);
1394
+ * var v2 = [-122.420679, 37.772537];
1395
+ * var v3 = {lon: -122.420679, lat: 37.772537};
1396
+ */
1397
+ export declare type LngLatLike = LngLat | {
1398
+ lng: number;
1399
+ lat: number;
1400
+ } | {
1401
+ lon: number;
1402
+ lat: number;
1403
+ } | [
1404
+ number,
1405
+ number
1406
+ ];
1407
+ declare class MercatorCoordinate {
1408
+ x: number;
1409
+ y: number;
1410
+ z: number;
1411
+ constructor(x: number, y: number, z?: number);
1412
+ /**
1413
+ * Project a `LngLat` to a `MercatorCoordinate`.
1414
+ *
1415
+ * @param {LngLatLike} lngLatLike The location to project.
1416
+ * @param {number} altitude The altitude in meters of the position.
1417
+ * @returns {MercatorCoordinate} The projected mercator coordinate.
1418
+ * @example
1419
+ * var coord = maplibregl.MercatorCoordinate.fromLngLat({ lng: 0, lat: 0}, 0);
1420
+ * coord; // MercatorCoordinate(0.5, 0.5, 0)
1421
+ */
1422
+ static fromLngLat(lngLatLike: LngLatLike, altitude?: number): MercatorCoordinate;
1423
+ /**
1424
+ * Returns the `LngLat` for the coordinate.
1425
+ *
1426
+ * @returns {LngLat} The `LngLat` object.
1427
+ * @example
1428
+ * var coord = new maplibregl.MercatorCoordinate(0.5, 0.5, 0);
1429
+ * var lngLat = coord.toLngLat(); // LngLat(0, 0)
1430
+ */
1431
+ toLngLat(): LngLat;
1432
+ /**
1433
+ * Returns the altitude in meters of the coordinate.
1434
+ *
1435
+ * @returns {number} The altitude in meters.
1436
+ * @example
1437
+ * var coord = new maplibregl.MercatorCoordinate(0, 0, 0.02);
1438
+ * coord.toAltitude(); // 6914.281956295339
1439
+ */
1440
+ toAltitude(): number;
1441
+ /**
1442
+ * Returns the distance of 1 meter in `MercatorCoordinate` units at this latitude.
1443
+ *
1444
+ * For coordinates in real world units using meters, this naturally provides the scale
1445
+ * to transform into `MercatorCoordinate`s.
1446
+ *
1447
+ * @returns {number} Distance of 1 meter in `MercatorCoordinate` units.
1448
+ */
1449
+ meterInMercatorCoordinateUnits(): number;
1450
+ }
1451
+ declare class CanonicalTileID {
1452
+ z: number;
1453
+ x: number;
1454
+ y: number;
1455
+ key: string;
1456
+ constructor(z: number, x: number, y: number);
1457
+ equals(id: CanonicalTileID): boolean;
1458
+ url(urls: Array<string>, pixelRatio: number, scheme?: string | null): string;
1459
+ isChildOf(parent: CanonicalTileID): boolean;
1460
+ getTilePoint(coord: MercatorCoordinate): Point;
1461
+ toString(): string;
1462
+ }
1463
+ declare class EvaluationContext {
1464
+ globals: GlobalProperties;
1465
+ feature: Feature;
1466
+ featureState: FeatureState;
1467
+ formattedSection: FormattedSection;
1468
+ availableImages: Array<string>;
1469
+ canonical: CanonicalTileID;
1470
+ _parseColorCache: {
1471
+ [_: string]: Color;
1472
+ };
1473
+ constructor();
1474
+ id(): any;
1475
+ geometryType(): string;
1476
+ geometry(): import("@mapbox/point-geometry")[][];
1477
+ canonicalID(): CanonicalTileID;
1478
+ properties(): {
1479
+ [_: string]: any;
1480
+ };
1481
+ parseColor(input: string): Color;
1482
+ }
1483
+ /**
1484
+ * Expression
1485
+ */
1486
+ export interface Expression {
1487
+ readonly type: Type;
1488
+ evaluate(ctx: EvaluationContext): any;
1489
+ eachChild(fn: (a: Expression) => void): void;
1490
+ /**
1491
+ * Statically analyze the expression, attempting to enumerate possible outputs. Returns
1492
+ * false if the complete set of outputs is statically undecidable, otherwise true.
1493
+ */
1494
+ outputDefined(): boolean;
1495
+ }
1496
+ /**
1497
+ * A type used for returning and propagating errors. The first element of the union
1498
+ * represents success and contains a value, and the second represents an error and
1499
+ * contains an error value.
1500
+ * @private
1501
+ */
1502
+ export declare type Result<T, E> = {
1503
+ result: "success";
1504
+ value: T;
1505
+ } | {
1506
+ result: "error";
1507
+ value: E;
1508
+ };
1509
+ export declare type InterpolationType = {
1510
+ name: "linear";
1511
+ } | {
1512
+ name: "exponential";
1513
+ base: number;
1514
+ } | {
1515
+ name: "cubic-bezier";
1516
+ controlPoints: [
1517
+ number,
1518
+ number,
1519
+ number,
1520
+ number
1521
+ ];
1522
+ };
1523
+ export declare type Feature = {
1524
+ readonly type: 1 | 2 | 3 | "Unknown" | "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon";
1525
+ readonly id?: any;
1526
+ readonly properties: {
1527
+ [_: string]: any;
1528
+ };
1529
+ readonly patterns?: {
1530
+ [_: string]: {
1531
+ "min": string;
1532
+ "mid": string;
1533
+ "max": string;
1534
+ };
1535
+ };
1536
+ readonly geometry?: Array<Array<Point>>;
1537
+ };
1538
+ export declare type FeatureState = {
1539
+ [_: string]: any;
1540
+ };
1541
+ export declare type GlobalProperties = Readonly<{
1542
+ zoom: number;
1543
+ heatmapDensity?: number;
1544
+ lineProgress?: number;
1545
+ isSupportedScript?: (_: string) => boolean;
1546
+ accumulated?: Value;
1547
+ }>;
1548
+ declare class StyleExpression {
1549
+ expression: Expression;
1550
+ _evaluator: EvaluationContext;
1551
+ _defaultValue: Value;
1552
+ _warningHistory: {
1553
+ [key: string]: boolean;
1554
+ };
1555
+ _enumValues: {
1556
+ [_: string]: any;
1557
+ };
1558
+ constructor(expression: Expression, propertySpec?: StylePropertySpecification | null);
1559
+ evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
1560
+ evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
1561
+ }
1562
+ declare function isExpression(expression: unknown): boolean;
1563
+ declare function createExpression(expression: unknown, propertySpec?: StylePropertySpecification | null): Result<StyleExpression, Array<ExpressionParsingError>>;
1564
+ declare class ZoomConstantExpression<Kind extends EvaluationKind> {
1565
+ kind: Kind;
1566
+ isStateDependent: boolean;
1567
+ _styleExpression: StyleExpression;
1568
+ constructor(kind: Kind, expression: StyleExpression);
1569
+ evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
1570
+ evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
1571
+ }
1572
+ declare class ZoomDependentExpression<Kind extends EvaluationKind> {
1573
+ kind: Kind;
1574
+ zoomStops: Array<number>;
1575
+ isStateDependent: boolean;
1576
+ _styleExpression: StyleExpression;
1577
+ interpolationType: InterpolationType;
1578
+ constructor(kind: Kind, expression: StyleExpression, zoomStops: Array<number>, interpolationType?: InterpolationType);
1579
+ evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
1580
+ evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any;
1581
+ interpolationFactor(input: number, lower: number, upper: number): number;
1582
+ }
1583
+ export declare type ConstantExpression = {
1584
+ kind: "constant";
1585
+ readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>) => any;
1586
+ };
1587
+ export declare type SourceExpression = {
1588
+ kind: "source";
1589
+ isStateDependent: boolean;
1590
+ readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection) => any;
1591
+ };
1592
+ export declare type CameraExpression = {
1593
+ kind: "camera";
1594
+ readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>) => any;
1595
+ readonly interpolationFactor: (input: number, lower: number, upper: number) => number;
1596
+ zoomStops: Array<number>;
1597
+ interpolationType: InterpolationType;
1598
+ };
1599
+ export declare type CompositeExpression = {
1600
+ kind: "composite";
1601
+ isStateDependent: boolean;
1602
+ readonly evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection) => any;
1603
+ readonly interpolationFactor: (input: number, lower: number, upper: number) => number;
1604
+ zoomStops: Array<number>;
1605
+ interpolationType: InterpolationType;
1606
+ };
1607
+ export declare type StylePropertyExpression = ConstantExpression | SourceExpression | CameraExpression | CompositeExpression;
1608
+ declare function createPropertyExpression(expressionInput: unknown, propertySpec: StylePropertySpecification): Result<StylePropertyExpression, Array<ExpressionParsingError>>;
1609
+ declare class StylePropertyFunction<T> {
1610
+ _parameters: PropertyValueSpecification<T>;
1611
+ _specification: StylePropertySpecification;
1612
+ kind: EvaluationKind;
1613
+ evaluate: (globals: GlobalProperties, feature?: Feature) => any;
1614
+ interpolationFactor: ((input: number, lower: number, upper: number) => number);
1615
+ zoomStops: Array<number>;
1616
+ constructor(parameters: PropertyValueSpecification<T>, specification: StylePropertySpecification);
1617
+ static deserialize<T>(serialized: {
1618
+ _parameters: PropertyValueSpecification<T>;
1619
+ _specification: StylePropertySpecification;
1620
+ }): StylePropertyFunction<T>;
1621
+ static serialize<T>(input: StylePropertyFunction<T>): {
1622
+ _parameters: PropertyValueSpecification<T>;
1623
+ _specification: StylePropertySpecification;
1624
+ };
1625
+ }
1626
+ declare function normalizePropertyExpression<T>(value: PropertyValueSpecification<T>, specification: StylePropertySpecification): StylePropertyExpression;
1627
+ export declare type FilterExpression = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID) => boolean;
1628
+ export declare type FeatureFilter = {
1629
+ filter: FilterExpression;
1630
+ needGeometry: boolean;
1631
+ };
1632
+ declare function isExpressionFilter(filter: any): filter is ExpressionFilterSpecification;
1633
+ declare function createFilter(filter: any): FeatureFilter;
1634
+ export declare type ExpectedTypes = {
1635
+ [_: string]: ExpressionInputType;
1636
+ };
1637
+ export function convertFilter(filter: FilterSpecification, expectedTypes?: ExpectedTypes): ExpressionFilterSpecification;
1638
+ declare function isFunction(value: any): boolean;
1639
+ declare function createFunction(parameters: any, propertySpec: any): {
1640
+ kind: string;
1641
+ interpolationType: {
1642
+ name: string;
1643
+ };
1644
+ interpolationFactor: any;
1645
+ zoomStops: any[];
1646
+ evaluate({ zoom }: {
1647
+ zoom: any;
1648
+ }, properties: any): any;
1649
+ } | {
1650
+ kind: string;
1651
+ interpolationType: {
1652
+ name: string;
1653
+ base: any;
1654
+ };
1655
+ interpolationFactor: any;
1656
+ zoomStops: any;
1657
+ evaluate: ({ zoom }: {
1658
+ zoom: any;
1659
+ }) => any;
1660
+ } | {
1661
+ kind: string;
1662
+ evaluate(_: any, feature: any): any;
1663
+ interpolationType?: undefined;
1664
+ interpolationFactor?: undefined;
1665
+ zoomStops?: undefined;
1666
+ };
1667
+ declare function convertFunction(parameters: any, propertySpec: StylePropertySpecification): any;
1668
+ declare function eachSource(style: StyleSpecification, callback: (_: SourceSpecification) => void): void;
1669
+ declare function eachLayer(style: StyleSpecification, callback: (_: LayerSpecification) => void): void;
1670
+ export declare type PropertyCallback = (a: {
1671
+ path: [
1672
+ string,
1673
+ "paint" | "layout",
1674
+ string
1675
+ ];
1676
+ key: string;
1677
+ value: PropertyValueSpecification<unknown> | DataDrivenPropertyValueSpecification<unknown>;
1678
+ reference: StylePropertySpecification;
1679
+ set: (a: PropertyValueSpecification<unknown> | DataDrivenPropertyValueSpecification<unknown>) => void;
1680
+ }) => void;
1681
+ declare function eachProperty(style: StyleSpecification, options: {
1682
+ paint?: boolean;
1683
+ layout?: boolean;
1684
+ }, callback: PropertyCallback): void;
1685
+ declare function validateStyle(style: StyleSpecification | string | Buffer, styleSpec?: any): Array<ValidationError>;
1686
+ export declare type ExpressionType = "data-driven" | "cross-faded" | "cross-faded-data-driven" | "color-ramp" | "data-constant" | "constant";
1687
+ export declare type ExpressionParameters = Array<"zoom" | "feature" | "feature-state" | "heatmap-density" | "line-progress">;
1688
+ export declare type ExpressionSpecificationDefinition = {
1689
+ interpolated: boolean;
1690
+ parameters: ExpressionParameters;
1691
+ };
1692
+ export declare type StylePropertySpecification = {
1693
+ type: "number";
1694
+ "property-type": ExpressionType;
1695
+ expression?: ExpressionSpecificationDefinition;
1696
+ transition: boolean;
1697
+ default?: number;
1698
+ } | {
1699
+ type: "string";
1700
+ "property-type": ExpressionType;
1701
+ expression?: ExpressionSpecificationDefinition;
1702
+ transition: boolean;
1703
+ default?: string;
1704
+ tokens?: boolean;
1705
+ } | {
1706
+ type: "boolean";
1707
+ "property-type": ExpressionType;
1708
+ expression?: ExpressionSpecificationDefinition;
1709
+ transition: boolean;
1710
+ default?: boolean;
1711
+ } | {
1712
+ type: "enum";
1713
+ "property-type": ExpressionType;
1714
+ expression?: ExpressionSpecificationDefinition;
1715
+ values: {
1716
+ [_: string]: {};
1717
+ };
1718
+ transition: boolean;
1719
+ default?: string;
1720
+ } | {
1721
+ type: "color";
1722
+ "property-type": ExpressionType;
1723
+ expression?: ExpressionSpecificationDefinition;
1724
+ transition: boolean;
1725
+ default?: string;
1726
+ overridable: boolean;
1727
+ } | {
1728
+ type: "array";
1729
+ value: "number";
1730
+ "property-type": ExpressionType;
1731
+ expression?: ExpressionSpecificationDefinition;
1732
+ length?: number;
1733
+ transition: boolean;
1734
+ default?: Array<number>;
1735
+ } | {
1736
+ type: "array";
1737
+ value: "string";
1738
+ "property-type": ExpressionType;
1739
+ expression?: ExpressionSpecificationDefinition;
1740
+ length?: number;
1741
+ transition: boolean;
1742
+ default?: Array<string>;
1743
+ } | {
1744
+ type: "padding";
1745
+ "property-type": ExpressionType;
1746
+ expression?: ExpressionSpecificationDefinition;
1747
+ transition: boolean;
1748
+ default?: number | Array<number>;
1749
+ };
1750
+ export declare const v8: any;
1751
+ export declare const expression: {
1752
+ StyleExpression: typeof StyleExpression;
1753
+ isExpression: typeof isExpression;
1754
+ isExpressionFilter: typeof isExpressionFilter;
1755
+ createExpression: typeof createExpression;
1756
+ createPropertyExpression: typeof createPropertyExpression;
1757
+ normalizePropertyExpression: typeof normalizePropertyExpression;
1758
+ ZoomConstantExpression: typeof ZoomConstantExpression;
1759
+ ZoomDependentExpression: typeof ZoomDependentExpression;
1760
+ StylePropertyFunction: typeof StylePropertyFunction;
1761
+ };
1762
+ declare const styleFunction: {
1763
+ convertFunction: typeof convertFunction;
1764
+ createFunction: typeof createFunction;
1765
+ isFunction: typeof isFunction;
1766
+ };
1767
+ export declare const visit: {
1768
+ eachSource: typeof eachSource;
1769
+ eachLayer: typeof eachLayer;
1770
+ eachProperty: typeof eachProperty;
1771
+ };
1772
+
1773
+ export {
1774
+ _default as latest,
1775
+ createFilter as featureFilter,
1776
+ diffStyles as diff,
1777
+ styleFunction as function,
1778
+ validateStyle as validate,
1779
+ };
1780
+
1781
+ export {};