@versatiles/png-renderer 2.4.1 → 2.5.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.
- package/dist/index.d.ts +136 -61
- package/dist/index.js +133 -69
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
import { Canvas } from '@napi-rs/canvas';
|
|
3
3
|
export { Canvas } from '@napi-rs/canvas';
|
|
4
4
|
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/types.g.d.ts
|
|
7
5
|
type ColorSpecification = string;
|
|
8
6
|
type ProjectionDefinitionT = [string, string, number];
|
|
9
7
|
type ProjectionDefinitionSpecification = string | ProjectionDefinitionT | PropertyValueSpecification<ProjectionDefinitionT>;
|
|
@@ -209,7 +207,7 @@ type StyleSpecification = {
|
|
|
209
207
|
*/
|
|
210
208
|
"roll"?: number;
|
|
211
209
|
/**
|
|
212
|
-
* An object used to define default values when using the [`global-state`](
|
|
210
|
+
* An object used to define default values when using the [`global-state`](expressions/#global-state) expression.
|
|
213
211
|
*
|
|
214
212
|
* @default
|
|
215
213
|
* ```json
|
|
@@ -292,7 +290,7 @@ type StyleSpecification = {
|
|
|
292
290
|
/**
|
|
293
291
|
* Sources state which data the map should display. Specify the type of source with the `type` property. Adding a source isn't enough to make data appear on the map because sources don't contain styling details like color or width. Layers refer to a source and give it a visual representation. This makes it possible to style the same source in different ways, like differentiating between types of roads in a highways layer.
|
|
294
292
|
*
|
|
295
|
-
* Tiled sources (vector and raster) must specify their details according to
|
|
293
|
+
* Tiled sources (vector and raster) must specify their details according to [TileJSON](tilejson.md).
|
|
296
294
|
*
|
|
297
295
|
* @example
|
|
298
296
|
* ```json
|
|
@@ -338,7 +336,7 @@ type StyleSpecification = {
|
|
|
338
336
|
/**
|
|
339
337
|
* A URL template for loading signed-distance-field glyph sets in PBF format.
|
|
340
338
|
*
|
|
341
|
-
* If this property is set, any text in the `text-field` layout property is displayed in the font stack named by the `text-font` layout property based on glyphs located at the URL specified by this property. Otherwise, font faces will be determined by the `text-font` property based on the local environment.
|
|
339
|
+
* If this property is set, any text in the [`text-field`](layers/#text-field) layout property is displayed in the font stack named by the [`text-font`](layers/#text-font) layout property based on glyphs located at the URL specified by this property. Otherwise, font faces will be determined by the `text-font` property based on the local environment.
|
|
342
340
|
*
|
|
343
341
|
* The URL must include:
|
|
344
342
|
*
|
|
@@ -581,7 +579,19 @@ type VectorSourceSpecification = {
|
|
|
581
579
|
*/
|
|
582
580
|
"url"?: string;
|
|
583
581
|
/**
|
|
584
|
-
* An array of one or more tile source URLs, as in the TileJSON spec.
|
|
582
|
+
* An array of one or more tile source URLs, as in the TileJSON spec. These tokens in a URL are replaced for each tile:
|
|
583
|
+
*
|
|
584
|
+
* - `{z}`, `{x}` and `{y}` - The tile's zoom level, column and row. With `scheme` set to `tms`, the row counts from the bottom.
|
|
585
|
+
*
|
|
586
|
+
* - `{quadkey}` - The tile's quadkey, as Bing Maps addresses tiles.
|
|
587
|
+
*
|
|
588
|
+
* - `{bbox-epsg-3857}` - The tile's bounding box in EPSG:3857 meters, as `minX,minY,maxX,maxY`, for WMS requests.
|
|
589
|
+
*
|
|
590
|
+
* - `{bbox}` - Experimental. The tile's bounding box as `minX,minY,maxX,maxY` in the units of the map's coordinate system. With the `mercator`, `globe` and `vertical-perspective` projections this is the same as `{bbox-epsg-3857}`.
|
|
591
|
+
*
|
|
592
|
+
* - `{prefix}` - Two hexadecimal digits from the tile's column and row, to spread requests over host names.
|
|
593
|
+
*
|
|
594
|
+
* - `{ratio}` - `@2x` where the device pixel ratio is above 1, empty otherwise.
|
|
585
595
|
*/
|
|
586
596
|
"tiles"?: Array<string>;
|
|
587
597
|
/**
|
|
@@ -602,6 +612,15 @@ type VectorSourceSpecification = {
|
|
|
602
612
|
* ```
|
|
603
613
|
*/
|
|
604
614
|
"scheme"?: "xyz" | "tms";
|
|
615
|
+
/**
|
|
616
|
+
* Experimental. What an empty tile response (HTTP 204, or no tile data from an archive such as PMTiles) means in this tileset.
|
|
617
|
+
*
|
|
618
|
+
* @default
|
|
619
|
+
* ```json
|
|
620
|
+
* "blank"
|
|
621
|
+
* ```
|
|
622
|
+
*/
|
|
623
|
+
"emptyResponse"?: "blank" | "missing";
|
|
605
624
|
/**
|
|
606
625
|
* Minimum zoom level for which tiles are available, as in the TileJSON spec.
|
|
607
626
|
*/
|
|
@@ -647,7 +666,19 @@ type RasterSourceSpecification = {
|
|
|
647
666
|
*/
|
|
648
667
|
"url"?: string;
|
|
649
668
|
/**
|
|
650
|
-
* An array of one or more tile source URLs, as in the TileJSON spec.
|
|
669
|
+
* An array of one or more tile source URLs, as in the TileJSON spec. These tokens in a URL are replaced for each tile:
|
|
670
|
+
*
|
|
671
|
+
* - `{z}`, `{x}` and `{y}` - The tile's zoom level, column and row. With `scheme` set to `tms`, the row counts from the bottom.
|
|
672
|
+
*
|
|
673
|
+
* - `{quadkey}` - The tile's quadkey, as Bing Maps addresses tiles.
|
|
674
|
+
*
|
|
675
|
+
* - `{bbox-epsg-3857}` - The tile's bounding box in EPSG:3857 meters, as `minX,minY,maxX,maxY`, for WMS requests.
|
|
676
|
+
*
|
|
677
|
+
* - `{bbox}` - Experimental. The tile's bounding box as `minX,minY,maxX,maxY` in the units of the map's coordinate system. With the `mercator`, `globe` and `vertical-perspective` projections this is the same as `{bbox-epsg-3857}`.
|
|
678
|
+
*
|
|
679
|
+
* - `{prefix}` - Two hexadecimal digits from the tile's column and row, to spread requests over host names.
|
|
680
|
+
*
|
|
681
|
+
* - `{ratio}` - `@2x` where the device pixel ratio is above 1, empty otherwise.
|
|
651
682
|
*/
|
|
652
683
|
"tiles"?: Array<string>;
|
|
653
684
|
/**
|
|
@@ -673,7 +704,7 @@ type RasterSourceSpecification = {
|
|
|
673
704
|
*/
|
|
674
705
|
"maxzoom"?: number;
|
|
675
706
|
/**
|
|
676
|
-
* The minimum visual size to display tiles for this
|
|
707
|
+
* The minimum visual size to display tiles for this source.
|
|
677
708
|
*
|
|
678
709
|
* @default
|
|
679
710
|
* ```json
|
|
@@ -690,6 +721,15 @@ type RasterSourceSpecification = {
|
|
|
690
721
|
* ```
|
|
691
722
|
*/
|
|
692
723
|
"scheme"?: "xyz" | "tms";
|
|
724
|
+
/**
|
|
725
|
+
* Experimental. What an empty tile response (HTTP 204, or no tile data from an archive such as PMTiles) means in this tileset.
|
|
726
|
+
*
|
|
727
|
+
* @default
|
|
728
|
+
* ```json
|
|
729
|
+
* "blank"
|
|
730
|
+
* ```
|
|
731
|
+
*/
|
|
732
|
+
"emptyResponse"?: "blank" | "missing";
|
|
693
733
|
/**
|
|
694
734
|
* Contains an attribution to be displayed when the map is shown to a user.
|
|
695
735
|
*/
|
|
@@ -709,7 +749,19 @@ type RasterDEMSourceSpecification = {
|
|
|
709
749
|
*/
|
|
710
750
|
"url"?: string;
|
|
711
751
|
/**
|
|
712
|
-
* An array of one or more tile source URLs, as in the TileJSON spec.
|
|
752
|
+
* An array of one or more tile source URLs, as in the TileJSON spec. These tokens in a URL are replaced for each tile:
|
|
753
|
+
*
|
|
754
|
+
* - `{z}`, `{x}` and `{y}` - The tile's zoom level, column and row.
|
|
755
|
+
*
|
|
756
|
+
* - `{quadkey}` - The tile's quadkey, as Bing Maps addresses tiles.
|
|
757
|
+
*
|
|
758
|
+
* - `{bbox-epsg-3857}` - The tile's bounding box in EPSG:3857 meters, as `minX,minY,maxX,maxY`, for WMS requests.
|
|
759
|
+
*
|
|
760
|
+
* - `{bbox}` - Experimental. The tile's bounding box as `minX,minY,maxX,maxY` in the units of the map's coordinate system. With the `mercator`, `globe` and `vertical-perspective` projections this is the same as `{bbox-epsg-3857}`.
|
|
761
|
+
*
|
|
762
|
+
* - `{prefix}` - Two hexadecimal digits from the tile's column and row, to spread requests over host names.
|
|
763
|
+
*
|
|
764
|
+
* - `{ratio}` - `@2x` where the device pixel ratio is above 1, empty otherwise.
|
|
713
765
|
*/
|
|
714
766
|
"tiles"?: Array<string>;
|
|
715
767
|
/**
|
|
@@ -735,7 +787,7 @@ type RasterDEMSourceSpecification = {
|
|
|
735
787
|
*/
|
|
736
788
|
"maxzoom"?: number;
|
|
737
789
|
/**
|
|
738
|
-
* The minimum visual size to display tiles for this
|
|
790
|
+
* The minimum visual size to display tiles for this source.
|
|
739
791
|
*
|
|
740
792
|
* @default
|
|
741
793
|
* ```json
|
|
@@ -743,6 +795,15 @@ type RasterDEMSourceSpecification = {
|
|
|
743
795
|
* ```
|
|
744
796
|
*/
|
|
745
797
|
"tileSize"?: number;
|
|
798
|
+
/**
|
|
799
|
+
* Experimental. What an empty tile response (HTTP 204, or no tile data from an archive such as PMTiles) means in this tileset.
|
|
800
|
+
*
|
|
801
|
+
* @default
|
|
802
|
+
* ```json
|
|
803
|
+
* "blank"
|
|
804
|
+
* ```
|
|
805
|
+
*/
|
|
806
|
+
"emptyResponse"?: "blank" | "missing";
|
|
746
807
|
/**
|
|
747
808
|
* Contains an attribution to be displayed when the map is shown to a user.
|
|
748
809
|
*/
|
|
@@ -876,7 +937,7 @@ type GeoJSONSourceSpecification = {
|
|
|
876
937
|
*/
|
|
877
938
|
"clusterProperties"?: unknown;
|
|
878
939
|
/**
|
|
879
|
-
* Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values.
|
|
940
|
+
* Whether to calculate line distance metrics. This is required for line layers that specify [`line-gradient`](layers/#line-gradient) values.
|
|
880
941
|
*/
|
|
881
942
|
"lineMetrics"?: boolean;
|
|
882
943
|
/**
|
|
@@ -949,7 +1010,7 @@ type FillLayerSpecification = {
|
|
|
949
1010
|
*/
|
|
950
1011
|
"maxzoom"?: number;
|
|
951
1012
|
/**
|
|
952
|
-
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.
|
|
1013
|
+
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The [`feature-state`](expressions/#feature-state) expression is not supported in filter expressions.
|
|
953
1014
|
*/
|
|
954
1015
|
"filter"?: FilterSpecification;
|
|
955
1016
|
/**
|
|
@@ -984,7 +1045,7 @@ type FillLayerSpecification = {
|
|
|
984
1045
|
*/
|
|
985
1046
|
"fill-antialias"?: PropertyValueSpecification<boolean>;
|
|
986
1047
|
/**
|
|
987
|
-
* The opacity of the entire fill layer. In contrast to the `fill-color
|
|
1048
|
+
* The opacity of the entire fill layer. In contrast to the [`fill-color`](layers/#fill-color), this value will also affect the 1px stroke around the fill, if the stroke is used.
|
|
988
1049
|
*
|
|
989
1050
|
* @default
|
|
990
1051
|
* ```json
|
|
@@ -994,7 +1055,7 @@ type FillLayerSpecification = {
|
|
|
994
1055
|
"fill-opacity"?: DataDrivenPropertyValueSpecification<number>;
|
|
995
1056
|
"fill-opacity-transition"?: TransitionSpecification;
|
|
996
1057
|
/**
|
|
997
|
-
* Opacity applied to the layer as a whole. Unlike `fill-opacity` and alpha values in `fill-color
|
|
1058
|
+
* Opacity applied to the layer as a whole. Unlike [`fill-opacity`](layers/#fill-opacity) and alpha values in [`fill-color`](layers/#fill-color), which are applied per feature and accumulate where fills overlap, `fill-layer-opacity` is applied once so overlapping fills appear as a single surface at the given opacity. When both `fill-opacity` and `fill-layer-opacity` are set, the per-feature, overlap accumulation is preserved, then `fill-layer-opacity` composites the result. This property affects only the layer it is set on and cannot be used to composite multiple layers together or control how this layer blends with layers above or below it.
|
|
998
1059
|
*
|
|
999
1060
|
* 
|
|
1000
1061
|
*
|
|
@@ -1005,6 +1066,17 @@ type FillLayerSpecification = {
|
|
|
1005
1066
|
*/
|
|
1006
1067
|
"fill-layer-opacity"?: PropertyValueSpecification<number>;
|
|
1007
1068
|
"fill-layer-opacity-transition"?: TransitionSpecification;
|
|
1069
|
+
/**
|
|
1070
|
+
* Controls how the layer is composited with the content already rendered beneath it. Unlike per-feature opacity properties such as `fill-opacity`, this property affects the final composited layer output and determines how it interacts with the existing map contents.
|
|
1071
|
+
*
|
|
1072
|
+
* 
|
|
1073
|
+
*
|
|
1074
|
+
* @default
|
|
1075
|
+
* ```json
|
|
1076
|
+
* "normal"
|
|
1077
|
+
* ```
|
|
1078
|
+
*/
|
|
1079
|
+
"fill-layer-blend"?: "normal" | "multiply" | "color" | "luminosity" | "plus-lighter" | "screen" | "overlay";
|
|
1008
1080
|
/**
|
|
1009
1081
|
* The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used. When used with an SDF fill pattern, this serves as the foreground color of the pattern.
|
|
1010
1082
|
*
|
|
@@ -1016,7 +1088,7 @@ type FillLayerSpecification = {
|
|
|
1016
1088
|
"fill-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
|
1017
1089
|
"fill-color-transition"?: TransitionSpecification;
|
|
1018
1090
|
/**
|
|
1019
|
-
* The outline color of the fill. Matches the value of `fill-color` if unspecified.
|
|
1091
|
+
* The outline color of the fill. Matches the value of [`fill-color`](layers/#fill-color) if unspecified.
|
|
1020
1092
|
*/
|
|
1021
1093
|
"fill-outline-color"?: DataDrivenPropertyValueSpecification<ColorSpecification>;
|
|
1022
1094
|
"fill-outline-color-transition"?: TransitionSpecification;
|
|
@@ -1031,7 +1103,7 @@ type FillLayerSpecification = {
|
|
|
1031
1103
|
"fill-translate"?: PropertyValueSpecification<[number, number]>;
|
|
1032
1104
|
"fill-translate-transition"?: TransitionSpecification;
|
|
1033
1105
|
/**
|
|
1034
|
-
* Controls the frame of reference for `fill-translate
|
|
1106
|
+
* Controls the frame of reference for [`fill-translate`](layers/#fill-translate).
|
|
1035
1107
|
*
|
|
1036
1108
|
* @default
|
|
1037
1109
|
* ```json
|
|
@@ -1078,7 +1150,7 @@ type LineLayerSpecification = {
|
|
|
1078
1150
|
*/
|
|
1079
1151
|
"maxzoom"?: number;
|
|
1080
1152
|
/**
|
|
1081
|
-
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.
|
|
1153
|
+
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The [`feature-state`](expressions/#feature-state) expression is not supported in filter expressions.
|
|
1082
1154
|
*/
|
|
1083
1155
|
"filter"?: FilterSpecification;
|
|
1084
1156
|
/**
|
|
@@ -1150,7 +1222,7 @@ type LineLayerSpecification = {
|
|
|
1150
1222
|
"line-opacity"?: DataDrivenPropertyValueSpecification<number>;
|
|
1151
1223
|
"line-opacity-transition"?: TransitionSpecification;
|
|
1152
1224
|
/**
|
|
1153
|
-
* Opacity applied to the layer as a whole. Unlike `line-opacity` and alpha values in `line-color
|
|
1225
|
+
* Opacity applied to the layer as a whole. Unlike [`line-opacity`](layers/#line-opacity) and alpha values in [`line-color`](layers/#line-color), which are applied per feature and accumulate where lines overlap, `line-layer-opacity` is applied once so overlapping lines appear as a single surface at the given opacity. When both `line-opacity` and `line-layer-opacity` are set, the per-feature, overlap accumulation is preserved, then layer-opacity composites the result. This property affects only the layer it is set on and cannot be used to composite multiple layers together or control how this layer blends with layers above or below it.
|
|
1154
1226
|
*
|
|
1155
1227
|
* 
|
|
1156
1228
|
*
|
|
@@ -1161,6 +1233,17 @@ type LineLayerSpecification = {
|
|
|
1161
1233
|
*/
|
|
1162
1234
|
"line-layer-opacity"?: PropertyValueSpecification<number>;
|
|
1163
1235
|
"line-layer-opacity-transition"?: TransitionSpecification;
|
|
1236
|
+
/**
|
|
1237
|
+
* Controls how the layer is composited with the content already rendered beneath it. Unlike per-feature opacity properties such as [`line-opacity`](#line-opacity), this property affects the final composited layer output and determines how it interacts with the existing map contents.
|
|
1238
|
+
*
|
|
1239
|
+
* 
|
|
1240
|
+
*
|
|
1241
|
+
* @default
|
|
1242
|
+
* ```json
|
|
1243
|
+
* "normal"
|
|
1244
|
+
* ```
|
|
1245
|
+
*/
|
|
1246
|
+
"line-layer-blend"?: "normal" | "multiply" | "color" | "luminosity" | "plus-lighter" | "screen" | "overlay";
|
|
1164
1247
|
/**
|
|
1165
1248
|
* The color with which the line will be drawn.
|
|
1166
1249
|
*
|
|
@@ -1182,7 +1265,7 @@ type LineLayerSpecification = {
|
|
|
1182
1265
|
"line-translate"?: PropertyValueSpecification<[number, number]>;
|
|
1183
1266
|
"line-translate-transition"?: TransitionSpecification;
|
|
1184
1267
|
/**
|
|
1185
|
-
* Controls the frame of reference for `line-translate
|
|
1268
|
+
* Controls the frame of reference for [`line-translate`](layers/#line-translate).
|
|
1186
1269
|
*
|
|
1187
1270
|
* @default
|
|
1188
1271
|
* ```json
|
|
@@ -1263,7 +1346,7 @@ type SymbolLayerSpecification = {
|
|
|
1263
1346
|
*/
|
|
1264
1347
|
"maxzoom"?: number;
|
|
1265
1348
|
/**
|
|
1266
|
-
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.
|
|
1349
|
+
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The [`feature-state`](expressions/#feature-state) expression is not supported in filter expressions.
|
|
1267
1350
|
*/
|
|
1268
1351
|
"filter"?: FilterSpecification;
|
|
1269
1352
|
/**
|
|
@@ -1293,11 +1376,11 @@ type SymbolLayerSpecification = {
|
|
|
1293
1376
|
*/
|
|
1294
1377
|
"symbol-avoid-edges"?: PropertyValueSpecification<boolean>;
|
|
1295
1378
|
/**
|
|
1296
|
-
* Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.
|
|
1379
|
+
* Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When [`icon-allow-overlap`](layers/#icon-allow-overlap) or [`text-allow-overlap`](layers/#text-allow-overlap) is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.
|
|
1297
1380
|
*/
|
|
1298
1381
|
"symbol-sort-key"?: DataDrivenPropertyValueSpecification<number>;
|
|
1299
1382
|
/**
|
|
1300
|
-
* Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key
|
|
1383
|
+
* Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use [`symbol-sort-key`](layers/#symbol-sort-key).
|
|
1301
1384
|
*
|
|
1302
1385
|
* @default
|
|
1303
1386
|
* ```json
|
|
@@ -1310,7 +1393,7 @@ type SymbolLayerSpecification = {
|
|
|
1310
1393
|
*/
|
|
1311
1394
|
"icon-allow-overlap"?: PropertyValueSpecification<boolean>;
|
|
1312
1395
|
/**
|
|
1313
|
-
* Allows for control over whether to show an icon when it overlaps other symbols on the map. If `icon-overlap` is not set, `icon-allow-overlap` is used instead.
|
|
1396
|
+
* Allows for control over whether to show an icon when it overlaps other symbols on the map. If `icon-overlap` is not set, [`icon-allow-overlap`](layers/#icon-allow-overlap) is used instead.
|
|
1314
1397
|
*/
|
|
1315
1398
|
"icon-overlap"?: PropertyValueSpecification<"never" | "always" | "cooperative">;
|
|
1316
1399
|
/**
|
|
@@ -1322,7 +1405,7 @@ type SymbolLayerSpecification = {
|
|
|
1322
1405
|
*/
|
|
1323
1406
|
"icon-optional"?: PropertyValueSpecification<boolean>;
|
|
1324
1407
|
/**
|
|
1325
|
-
* In combination with `symbol-placement
|
|
1408
|
+
* In combination with [`symbol-placement`](layers/#symbol-placement), determines the rotation behavior of icons.
|
|
1326
1409
|
*
|
|
1327
1410
|
* @default
|
|
1328
1411
|
* ```json
|
|
@@ -1349,7 +1432,7 @@ type SymbolLayerSpecification = {
|
|
|
1349
1432
|
*/
|
|
1350
1433
|
"icon-text-fit"?: PropertyValueSpecification<"none" | "width" | "height" | "both">;
|
|
1351
1434
|
/**
|
|
1352
|
-
* Size of the additional area added to dimensions determined by `icon-text-fit
|
|
1435
|
+
* Size of the additional area added to dimensions determined by [`icon-text-fit`](layers/#icon-text-fit), in clockwise order: top, right, bottom, left.
|
|
1353
1436
|
*
|
|
1354
1437
|
* @default
|
|
1355
1438
|
* ```json
|
|
@@ -1379,7 +1462,7 @@ type SymbolLayerSpecification = {
|
|
|
1379
1462
|
*/
|
|
1380
1463
|
"icon-keep-upright"?: PropertyValueSpecification<boolean>;
|
|
1381
1464
|
/**
|
|
1382
|
-
* Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.
|
|
1465
|
+
* Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of [`icon-size`](layers/#icon-size) to obtain the final offset in pixels. When combined with [`icon-rotate`](layers/#icon-rotate) the offset will be as if the rotated direction was up.
|
|
1383
1466
|
*
|
|
1384
1467
|
* @default
|
|
1385
1468
|
* ```json
|
|
@@ -1415,7 +1498,7 @@ type SymbolLayerSpecification = {
|
|
|
1415
1498
|
*/
|
|
1416
1499
|
"text-pitch-alignment"?: PropertyValueSpecification<"map" | "viewport" | "auto">;
|
|
1417
1500
|
/**
|
|
1418
|
-
* In combination with `symbol-placement
|
|
1501
|
+
* In combination with [`symbol-placement`](layers/#symbol-placement), determines the rotation behavior of the individual glyphs forming the text.
|
|
1419
1502
|
*
|
|
1420
1503
|
* @default
|
|
1421
1504
|
* ```json
|
|
@@ -1477,11 +1560,11 @@ type SymbolLayerSpecification = {
|
|
|
1477
1560
|
*/
|
|
1478
1561
|
"text-justify"?: DataDrivenPropertyValueSpecification<"auto" | "left" | "center" | "right">;
|
|
1479
1562
|
/**
|
|
1480
|
-
* Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor
|
|
1563
|
+
* Radial offset of text, in the direction of the symbol's anchor. Useful in combination with [`text-variable-anchor`](layers/#text-variable-anchor), which defaults to using the two-dimensional [`text-offset`](layers/#text-offset) if present.
|
|
1481
1564
|
*/
|
|
1482
1565
|
"text-radial-offset"?: DataDrivenPropertyValueSpecification<number>;
|
|
1483
1566
|
/**
|
|
1484
|
-
* To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset
|
|
1567
|
+
* To increase the chance of placing high-priority labels on the map, you can provide an array of [`text-anchor`](layers/#text-anchor) locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the [`text-radial-offset`](layers/#text-radial-offset) or the two-dimensional [`text-offset`](layers/#text-offset).
|
|
1485
1568
|
*
|
|
1486
1569
|
* @example
|
|
1487
1570
|
* ```json
|
|
@@ -1490,11 +1573,11 @@ type SymbolLayerSpecification = {
|
|
|
1490
1573
|
*/
|
|
1491
1574
|
"text-variable-anchor"?: PropertyValueSpecification<Array<"center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">>;
|
|
1492
1575
|
/**
|
|
1493
|
-
* To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations, each paired with an offset value. The renderer will attempt to place the label at each location, in order, before moving on to the next location+offset. Use `text-justify: auto` to choose justification based on anchor position.
|
|
1576
|
+
* To increase the chance of placing high-priority labels on the map, you can provide an array of [`text-anchor`](layers/#text-anchor) locations, each paired with an offset value. The renderer will attempt to place the label at each location, in order, before moving on to the next location+offset. Use `text-justify: auto` to choose justification based on anchor position.
|
|
1494
1577
|
*
|
|
1495
1578
|
* The length of the array must be even, and must alternate between enum and point entries. i.e., each anchor location must be accompanied by a point, and that point defines the offset when the corresponding anchor location is used. Positive offset values indicate right and down, while negative values indicate left and up. Anchor locations may repeat, allowing the renderer to try multiple offsets to try and place a label using the same anchor.
|
|
1496
1579
|
*
|
|
1497
|
-
* When present, this property takes precedence over `text-anchor`, `text-variable-anchor
|
|
1580
|
+
* When present, this property takes precedence over `text-anchor`, [`text-variable-anchor`](layers/#text-variable-anchor), [`text-offset`](layers/#text-offset), and [`text-radial-offset`](layers/#text-radial-offset).
|
|
1498
1581
|
*
|
|
1499
1582
|
* ```json
|
|
1500
1583
|
*
|
|
@@ -1579,7 +1662,7 @@ type SymbolLayerSpecification = {
|
|
|
1579
1662
|
*/
|
|
1580
1663
|
"text-allow-overlap"?: PropertyValueSpecification<boolean>;
|
|
1581
1664
|
/**
|
|
1582
|
-
* Allows for control over whether to show symbol text when it overlaps other symbols on the map. If `text-overlap` is not set, `text-allow-overlap` is used instead
|
|
1665
|
+
* Allows for control over whether to show symbol text when it overlaps other symbols on the map. If `text-overlap` is not set, [`text-allow-overlap`](layers/#text-allow-overlap) is used instead
|
|
1583
1666
|
*/
|
|
1584
1667
|
"text-overlap"?: PropertyValueSpecification<"never" | "always" | "cooperative">;
|
|
1585
1668
|
/**
|
|
@@ -1591,11 +1674,11 @@ type SymbolLayerSpecification = {
|
|
|
1591
1674
|
*/
|
|
1592
1675
|
"text-optional"?: PropertyValueSpecification<boolean>;
|
|
1593
1676
|
/**
|
|
1594
|
-
* The height above the anchor, in meters, at which the symbol is placed. Use `symbol-height-anchor` to control what this height is measured from.
|
|
1677
|
+
* The height above the anchor, in meters, at which the symbol is placed. Use [`symbol-height-anchor`](layers/#symbol-height-anchor) to control what this height is measured from.
|
|
1595
1678
|
*/
|
|
1596
1679
|
"symbol-height-offset"?: DataDrivenPropertyValueSpecification<number>;
|
|
1597
1680
|
/**
|
|
1598
|
-
* Defines what `symbol-height-offset` is measured from.
|
|
1681
|
+
* Defines what [`symbol-height-offset`](layers/#symbol-height-offset) is measured from.
|
|
1599
1682
|
*
|
|
1600
1683
|
* @default
|
|
1601
1684
|
* ```json
|
|
@@ -1670,7 +1753,7 @@ type SymbolLayerSpecification = {
|
|
|
1670
1753
|
"icon-translate"?: PropertyValueSpecification<[number, number]>;
|
|
1671
1754
|
"icon-translate-transition"?: TransitionSpecification;
|
|
1672
1755
|
/**
|
|
1673
|
-
* Controls the frame of reference for `icon-translate
|
|
1756
|
+
* Controls the frame of reference for [`icon-translate`](layers/#icon-translate).
|
|
1674
1757
|
*
|
|
1675
1758
|
* @default
|
|
1676
1759
|
* ```json
|
|
@@ -1729,7 +1812,7 @@ type SymbolLayerSpecification = {
|
|
|
1729
1812
|
"text-translate"?: PropertyValueSpecification<[number, number]>;
|
|
1730
1813
|
"text-translate-transition"?: TransitionSpecification;
|
|
1731
1814
|
/**
|
|
1732
|
-
* Controls the frame of reference for `text-translate
|
|
1815
|
+
* Controls the frame of reference for [`text-translate`](layers/#text-translate).
|
|
1733
1816
|
*
|
|
1734
1817
|
* @default
|
|
1735
1818
|
* ```json
|
|
@@ -1771,7 +1854,7 @@ type CircleLayerSpecification = {
|
|
|
1771
1854
|
*/
|
|
1772
1855
|
"maxzoom"?: number;
|
|
1773
1856
|
/**
|
|
1774
|
-
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.
|
|
1857
|
+
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The [`feature-state`](expressions/#feature-state) expression is not supported in filter expressions.
|
|
1775
1858
|
*/
|
|
1776
1859
|
"filter"?: FilterSpecification;
|
|
1777
1860
|
/**
|
|
@@ -1842,7 +1925,7 @@ type CircleLayerSpecification = {
|
|
|
1842
1925
|
"circle-translate"?: PropertyValueSpecification<[number, number]>;
|
|
1843
1926
|
"circle-translate-transition"?: TransitionSpecification;
|
|
1844
1927
|
/**
|
|
1845
|
-
* Controls the frame of reference for `circle-translate
|
|
1928
|
+
* Controls the frame of reference for [`circle-translate`](layers/#circle-translate).
|
|
1846
1929
|
*
|
|
1847
1930
|
* @default
|
|
1848
1931
|
* ```json
|
|
@@ -1869,7 +1952,7 @@ type CircleLayerSpecification = {
|
|
|
1869
1952
|
*/
|
|
1870
1953
|
"circle-pitch-alignment"?: PropertyValueSpecification<"map" | "viewport">;
|
|
1871
1954
|
/**
|
|
1872
|
-
* The width of the circle's stroke. Strokes are placed outside of the `circle-radius
|
|
1955
|
+
* The width of the circle's stroke. Strokes are placed outside of the [`circle-radius`](layers/#circle-radius).
|
|
1873
1956
|
*/
|
|
1874
1957
|
"circle-stroke-width"?: DataDrivenPropertyValueSpecification<number>;
|
|
1875
1958
|
"circle-stroke-width-transition"?: TransitionSpecification;
|
|
@@ -1927,7 +2010,7 @@ type HeatmapLayerSpecification = {
|
|
|
1927
2010
|
*/
|
|
1928
2011
|
"maxzoom"?: number;
|
|
1929
2012
|
/**
|
|
1930
|
-
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.
|
|
2013
|
+
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The [`feature-state`](expressions/#feature-state) expression is not supported in filter expressions.
|
|
1931
2014
|
*/
|
|
1932
2015
|
"filter"?: FilterSpecification;
|
|
1933
2016
|
/**
|
|
@@ -1968,7 +2051,7 @@ type HeatmapLayerSpecification = {
|
|
|
1968
2051
|
*/
|
|
1969
2052
|
"heatmap-weight"?: DataDrivenPropertyValueSpecification<number>;
|
|
1970
2053
|
/**
|
|
1971
|
-
* Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.
|
|
2054
|
+
* Similar to [`heatmap-weight`](layers/#heatmap-weight) but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.
|
|
1972
2055
|
*
|
|
1973
2056
|
* @default
|
|
1974
2057
|
* ```json
|
|
@@ -2046,7 +2129,7 @@ type FillExtrusionLayerSpecification = {
|
|
|
2046
2129
|
*/
|
|
2047
2130
|
"maxzoom"?: number;
|
|
2048
2131
|
/**
|
|
2049
|
-
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.
|
|
2132
|
+
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The [`feature-state`](expressions/#feature-state) expression is not supported in filter expressions.
|
|
2050
2133
|
*/
|
|
2051
2134
|
"filter"?: FilterSpecification;
|
|
2052
2135
|
/**
|
|
@@ -2082,7 +2165,7 @@ type FillExtrusionLayerSpecification = {
|
|
|
2082
2165
|
"fill-extrusion-opacity"?: PropertyValueSpecification<number>;
|
|
2083
2166
|
"fill-extrusion-opacity-transition"?: TransitionSpecification;
|
|
2084
2167
|
/**
|
|
2085
|
-
* The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.
|
|
2168
|
+
* The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use [`fill-extrusion-opacity`](layers/#fill-extrusion-opacity) to set layer opacity.
|
|
2086
2169
|
*
|
|
2087
2170
|
* @default
|
|
2088
2171
|
* ```json
|
|
@@ -2102,7 +2185,7 @@ type FillExtrusionLayerSpecification = {
|
|
|
2102
2185
|
"fill-extrusion-translate"?: PropertyValueSpecification<[number, number]>;
|
|
2103
2186
|
"fill-extrusion-translate-transition"?: TransitionSpecification;
|
|
2104
2187
|
/**
|
|
2105
|
-
* Controls the frame of reference for `fill-extrusion-translate
|
|
2188
|
+
* Controls the frame of reference for [`fill-extrusion-translate`](layers/#fill-extrusion-translate).
|
|
2106
2189
|
*
|
|
2107
2190
|
* @default
|
|
2108
2191
|
* ```json
|
|
@@ -2121,7 +2204,7 @@ type FillExtrusionLayerSpecification = {
|
|
|
2121
2204
|
"fill-extrusion-height"?: DataDrivenPropertyValueSpecification<number>;
|
|
2122
2205
|
"fill-extrusion-height-transition"?: TransitionSpecification;
|
|
2123
2206
|
/**
|
|
2124
|
-
* The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height
|
|
2207
|
+
* The height with which to extrude the base of this layer. Must be less than or equal to [`fill-extrusion-height`](layers/#fill-extrusion-height). Negative values extrude below ground level, e.g. underground floors.
|
|
2125
2208
|
*/
|
|
2126
2209
|
"fill-extrusion-base"?: DataDrivenPropertyValueSpecification<number>;
|
|
2127
2210
|
"fill-extrusion-base-transition"?: TransitionSpecification;
|
|
@@ -2168,7 +2251,7 @@ type RasterLayerSpecification = {
|
|
|
2168
2251
|
*/
|
|
2169
2252
|
"maxzoom"?: number;
|
|
2170
2253
|
/**
|
|
2171
|
-
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.
|
|
2254
|
+
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The [`feature-state`](expressions/#feature-state) expression is not supported in filter expressions.
|
|
2172
2255
|
*/
|
|
2173
2256
|
"filter"?: FilterSpecification;
|
|
2174
2257
|
/**
|
|
@@ -2291,7 +2374,7 @@ type HillshadeLayerSpecification = {
|
|
|
2291
2374
|
*/
|
|
2292
2375
|
"maxzoom"?: number;
|
|
2293
2376
|
/**
|
|
2294
|
-
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.
|
|
2377
|
+
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The [`feature-state`](expressions/#feature-state) expression is not supported in filter expressions.
|
|
2295
2378
|
*/
|
|
2296
2379
|
"filter"?: FilterSpecification;
|
|
2297
2380
|
/**
|
|
@@ -2313,7 +2396,7 @@ type HillshadeLayerSpecification = {
|
|
|
2313
2396
|
*/
|
|
2314
2397
|
"paint"?: {
|
|
2315
2398
|
/**
|
|
2316
|
-
* The direction of the light source(s) used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`. Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.
|
|
2399
|
+
* The direction of the light source(s) used to generate the hillshading with 0 as the top of the viewport if [`hillshade-illumination-anchor`](layers/#hillshade-illumination-anchor) is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`. Only when [`hillshade-method`](layers/#hillshade-method) is set to `multidirectional` can you specify multiple light sources.
|
|
2317
2400
|
*
|
|
2318
2401
|
* @default
|
|
2319
2402
|
* ```json
|
|
@@ -2322,7 +2405,7 @@ type HillshadeLayerSpecification = {
|
|
|
2322
2405
|
*/
|
|
2323
2406
|
"hillshade-illumination-direction"?: PropertyValueSpecification<NumberArraySpecification>;
|
|
2324
2407
|
/**
|
|
2325
|
-
* The altitude of the light source(s) used to generate the hillshading with 0 as sunset and 90 as noon. Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.
|
|
2408
|
+
* The altitude of the light source(s) used to generate the hillshading with 0 as sunset and 90 as noon. Only when [`hillshade-method`](layers/#hillshade-method) is set to `multidirectional` can you specify multiple light sources.
|
|
2326
2409
|
*
|
|
2327
2410
|
* @default
|
|
2328
2411
|
* ```json
|
|
@@ -2350,7 +2433,7 @@ type HillshadeLayerSpecification = {
|
|
|
2350
2433
|
"hillshade-exaggeration"?: PropertyValueSpecification<number>;
|
|
2351
2434
|
"hillshade-exaggeration-transition"?: TransitionSpecification;
|
|
2352
2435
|
/**
|
|
2353
|
-
* The shading color of areas that face away from the light source(s). Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.
|
|
2436
|
+
* The shading color of areas that face away from the light source(s). Only when [`hillshade-method`](layers/#hillshade-method) is set to `multidirectional` can you specify multiple light sources.
|
|
2354
2437
|
*
|
|
2355
2438
|
* @default
|
|
2356
2439
|
* ```json
|
|
@@ -2360,7 +2443,7 @@ type HillshadeLayerSpecification = {
|
|
|
2360
2443
|
"hillshade-shadow-color"?: PropertyValueSpecification<ColorArraySpecification>;
|
|
2361
2444
|
"hillshade-shadow-color-transition"?: TransitionSpecification;
|
|
2362
2445
|
/**
|
|
2363
|
-
* The shading color of areas that faces towards the light source(s). Only when `hillshade-method` is set to `multidirectional` can you specify multiple light sources.
|
|
2446
|
+
* The shading color of areas that faces towards the light source(s). Only when [`hillshade-method`](layers/#hillshade-method) is set to `multidirectional` can you specify multiple light sources.
|
|
2364
2447
|
*
|
|
2365
2448
|
* @default
|
|
2366
2449
|
* ```json
|
|
@@ -2433,7 +2516,7 @@ type ColorReliefLayerSpecification = {
|
|
|
2433
2516
|
*/
|
|
2434
2517
|
"maxzoom"?: number;
|
|
2435
2518
|
/**
|
|
2436
|
-
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.
|
|
2519
|
+
* A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The [`feature-state`](expressions/#feature-state) expression is not supported in filter expressions.
|
|
2437
2520
|
*/
|
|
2438
2521
|
"filter"?: FilterSpecification;
|
|
2439
2522
|
/**
|
|
@@ -2465,7 +2548,7 @@ type ColorReliefLayerSpecification = {
|
|
|
2465
2548
|
"color-relief-opacity"?: PropertyValueSpecification<number>;
|
|
2466
2549
|
"color-relief-opacity-transition"?: TransitionSpecification;
|
|
2467
2550
|
/**
|
|
2468
|
-
* Defines the color of each pixel based on its elevation. Should be an expression that uses `
|
|
2551
|
+
* Defines the color of each pixel based on its elevation. Should be an expression that uses the [`elevation`](expressions/#elevation) expression as input.
|
|
2469
2552
|
*
|
|
2470
2553
|
* @example
|
|
2471
2554
|
* ```json
|
|
@@ -2562,8 +2645,6 @@ type BackgroundLayerSpecification = {
|
|
|
2562
2645
|
};
|
|
2563
2646
|
};
|
|
2564
2647
|
type LayerSpecification = FillLayerSpecification | LineLayerSpecification | SymbolLayerSpecification | CircleLayerSpecification | HeatmapLayerSpecification | FillExtrusionLayerSpecification | RasterLayerSpecification | HillshadeLayerSpecification | ColorReliefLayerSpecification | BackgroundLayerSpecification;
|
|
2565
|
-
//#endregion
|
|
2566
|
-
//#region src/expression/types/color_spaces.d.ts
|
|
2567
2648
|
/**
|
|
2568
2649
|
* @param r Red component 0..1
|
|
2569
2650
|
* @param g Green component 0..1
|
|
@@ -2585,8 +2666,6 @@ type HCLColor = [h: number, c: number, l: number, alpha: number];
|
|
|
2585
2666
|
* @param alpha Alpha component 0..1
|
|
2586
2667
|
*/
|
|
2587
2668
|
type LABColor = [l: number, a: number, b: number, alpha: number];
|
|
2588
|
-
//#endregion
|
|
2589
|
-
//#region src/expression/types/color.d.ts
|
|
2590
2669
|
type InterpolationColorSpace = 'rgb' | 'hcl' | 'lab';
|
|
2591
2670
|
/**
|
|
2592
2671
|
* Color representation used by WebGL.
|
|
@@ -2677,14 +2756,10 @@ declare class Color {
|
|
|
2677
2756
|
toString(): string;
|
|
2678
2757
|
static interpolate(from: Color, to: Color, t: number, spaceKey?: InterpolationColorSpace): Color;
|
|
2679
2758
|
}
|
|
2680
|
-
//#endregion
|
|
2681
|
-
//#region src/point2d.d.ts
|
|
2682
2759
|
interface Point2D$1 {
|
|
2683
2760
|
x: number;
|
|
2684
2761
|
y: number;
|
|
2685
2762
|
}
|
|
2686
|
-
//#endregion
|
|
2687
|
-
//#region src/expression/index.d.ts
|
|
2688
2763
|
type Feature$1 = {
|
|
2689
2764
|
readonly type: 0 | 1 | 2 | 3 | 'Unknown' | 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon';
|
|
2690
2765
|
readonly id?: any;
|
package/dist/index.js
CHANGED
|
@@ -7470,7 +7470,7 @@ function pixelAlignedBox(project) {
|
|
|
7470
7470
|
return [minX, minY, maxX, maxY];
|
|
7471
7471
|
}
|
|
7472
7472
|
|
|
7473
|
-
|
|
7473
|
+
// src/reference/v8.json
|
|
7474
7474
|
var v8_default = {
|
|
7475
7475
|
$version: 8,
|
|
7476
7476
|
$root: {
|
|
@@ -7565,6 +7565,14 @@ var v8_default = {
|
|
|
7565
7565
|
},
|
|
7566
7566
|
"default": "xyz"
|
|
7567
7567
|
},
|
|
7568
|
+
"emptyResponse": {
|
|
7569
|
+
"type": "enum",
|
|
7570
|
+
"values": {
|
|
7571
|
+
"blank": {},
|
|
7572
|
+
"missing": {}
|
|
7573
|
+
},
|
|
7574
|
+
"default": "blank"
|
|
7575
|
+
},
|
|
7568
7576
|
"minzoom": {
|
|
7569
7577
|
"type": "number",
|
|
7570
7578
|
"default": 0
|
|
@@ -7632,6 +7640,14 @@ var v8_default = {
|
|
|
7632
7640
|
},
|
|
7633
7641
|
"default": "xyz"
|
|
7634
7642
|
},
|
|
7643
|
+
"emptyResponse": {
|
|
7644
|
+
"type": "enum",
|
|
7645
|
+
"values": {
|
|
7646
|
+
"blank": {},
|
|
7647
|
+
"missing": {}
|
|
7648
|
+
},
|
|
7649
|
+
"default": "blank"
|
|
7650
|
+
},
|
|
7635
7651
|
"attribution": { "type": "string" },
|
|
7636
7652
|
"volatile": {
|
|
7637
7653
|
"type": "boolean",
|
|
@@ -7674,6 +7690,14 @@ var v8_default = {
|
|
|
7674
7690
|
"default": 512,
|
|
7675
7691
|
"units": "pixels"
|
|
7676
7692
|
},
|
|
7693
|
+
"emptyResponse": {
|
|
7694
|
+
"type": "enum",
|
|
7695
|
+
"values": {
|
|
7696
|
+
"blank": {},
|
|
7697
|
+
"missing": {}
|
|
7698
|
+
},
|
|
7699
|
+
"default": "blank"
|
|
7700
|
+
},
|
|
7677
7701
|
"attribution": { "type": "string" },
|
|
7678
7702
|
"encoding": {
|
|
7679
7703
|
"type": "enum",
|
|
@@ -8953,6 +8977,21 @@ var v8_default = {
|
|
|
8953
8977
|
},
|
|
8954
8978
|
"property-type": "data-constant"
|
|
8955
8979
|
},
|
|
8980
|
+
"fill-layer-blend": {
|
|
8981
|
+
"type": "enum",
|
|
8982
|
+
"values": {
|
|
8983
|
+
"normal": {},
|
|
8984
|
+
"multiply": {},
|
|
8985
|
+
"color": {},
|
|
8986
|
+
"luminosity": {},
|
|
8987
|
+
"plus-lighter": {},
|
|
8988
|
+
"screen": {},
|
|
8989
|
+
"overlay": {}
|
|
8990
|
+
},
|
|
8991
|
+
"default": "normal",
|
|
8992
|
+
"property-type": "constant",
|
|
8993
|
+
"transition": false
|
|
8994
|
+
},
|
|
8956
8995
|
"fill-color": {
|
|
8957
8996
|
"type": "color",
|
|
8958
8997
|
"default": "#000000",
|
|
@@ -9041,7 +9080,8 @@ var v8_default = {
|
|
|
9041
9080
|
"parameters": [
|
|
9042
9081
|
"zoom",
|
|
9043
9082
|
"feature",
|
|
9044
|
-
"feature-state"
|
|
9083
|
+
"feature-state",
|
|
9084
|
+
"elevation"
|
|
9045
9085
|
]
|
|
9046
9086
|
},
|
|
9047
9087
|
"property-type": "data-driven"
|
|
@@ -9153,6 +9193,21 @@ var v8_default = {
|
|
|
9153
9193
|
},
|
|
9154
9194
|
"property-type": "data-constant"
|
|
9155
9195
|
},
|
|
9196
|
+
"line-layer-blend": {
|
|
9197
|
+
"type": "enum",
|
|
9198
|
+
"values": {
|
|
9199
|
+
"normal": {},
|
|
9200
|
+
"multiply": {},
|
|
9201
|
+
"color": {},
|
|
9202
|
+
"luminosity": {},
|
|
9203
|
+
"plus-lighter": {},
|
|
9204
|
+
"screen": {},
|
|
9205
|
+
"overlay": {}
|
|
9206
|
+
},
|
|
9207
|
+
"default": "normal",
|
|
9208
|
+
"property-type": "constant",
|
|
9209
|
+
"transition": false
|
|
9210
|
+
},
|
|
9156
9211
|
"line-color": {
|
|
9157
9212
|
"type": "color",
|
|
9158
9213
|
"default": "#000000",
|
|
@@ -10135,10 +10190,10 @@ var v8_default = {
|
|
|
10135
10190
|
}
|
|
10136
10191
|
};
|
|
10137
10192
|
|
|
10138
|
-
|
|
10193
|
+
// src/reference/latest.ts
|
|
10139
10194
|
const latest = v8_default;
|
|
10140
10195
|
|
|
10141
|
-
|
|
10196
|
+
// src/expression/types.ts
|
|
10142
10197
|
const NullType = { kind: "null" };
|
|
10143
10198
|
const NumberType = { kind: "number" };
|
|
10144
10199
|
const StringType = { kind: "string" };
|
|
@@ -10234,7 +10289,7 @@ function verifyType(provided, sample) {
|
|
|
10234
10289
|
return provided.kind === sample.kind;
|
|
10235
10290
|
}
|
|
10236
10291
|
|
|
10237
|
-
|
|
10292
|
+
// src/expression/types/color_spaces.ts
|
|
10238
10293
|
const Xn = .96422;
|
|
10239
10294
|
const Yn = 1;
|
|
10240
10295
|
const Zn = .82521;
|
|
@@ -10329,7 +10384,7 @@ function hslToRgb([h, s, l, alpha]) {
|
|
|
10329
10384
|
];
|
|
10330
10385
|
}
|
|
10331
10386
|
|
|
10332
|
-
|
|
10387
|
+
// src/util/get_own.ts
|
|
10333
10388
|
const hasOwnProperty = Object.hasOwn || function hasOwnProperty(object, key) {
|
|
10334
10389
|
return Object.prototype.hasOwnProperty.call(object, key);
|
|
10335
10390
|
};
|
|
@@ -10337,7 +10392,7 @@ function getOwn(object, key) {
|
|
|
10337
10392
|
return hasOwnProperty(object, key) ? object[key] : void 0;
|
|
10338
10393
|
}
|
|
10339
10394
|
|
|
10340
|
-
|
|
10395
|
+
// src/expression/types/parse_css_color.ts
|
|
10341
10396
|
/**
|
|
10342
10397
|
* CSS color parser compliant with CSS Color 4 Specification.
|
|
10343
10398
|
* Supports: named colors, `transparent` keyword, all rgb hex notations,
|
|
@@ -11215,7 +11270,7 @@ const namedColors = {
|
|
|
11215
11270
|
]
|
|
11216
11271
|
};
|
|
11217
11272
|
|
|
11218
|
-
|
|
11273
|
+
// src/util/interpolate-primitives.ts
|
|
11219
11274
|
function interpolateNumber(from, to, t) {
|
|
11220
11275
|
return from + t * (to - from);
|
|
11221
11276
|
}
|
|
@@ -11225,7 +11280,7 @@ function interpolateArray(from, to, t) {
|
|
|
11225
11280
|
});
|
|
11226
11281
|
}
|
|
11227
11282
|
|
|
11228
|
-
|
|
11283
|
+
// src/expression/types/color.ts
|
|
11229
11284
|
/**
|
|
11230
11285
|
* Checks whether the specified color space is one of the supported interpolation color spaces.
|
|
11231
11286
|
*
|
|
@@ -11409,7 +11464,7 @@ var Color$1 = class Color {
|
|
|
11409
11464
|
}
|
|
11410
11465
|
};
|
|
11411
11466
|
|
|
11412
|
-
|
|
11467
|
+
// src/expression/types/formatted.ts
|
|
11413
11468
|
const VERTICAL_ALIGN_OPTIONS = [
|
|
11414
11469
|
"bottom",
|
|
11415
11470
|
"center",
|
|
@@ -11446,7 +11501,7 @@ var Formatted = class Formatted {
|
|
|
11446
11501
|
}
|
|
11447
11502
|
};
|
|
11448
11503
|
|
|
11449
|
-
|
|
11504
|
+
// src/expression/types/padding.ts
|
|
11450
11505
|
/**
|
|
11451
11506
|
* A set of four numbers representing padding around a box. Create instances from
|
|
11452
11507
|
* bare arrays or numeric values using the static method `Padding.parse`.
|
|
@@ -11506,7 +11561,7 @@ var Padding = class Padding {
|
|
|
11506
11561
|
}
|
|
11507
11562
|
};
|
|
11508
11563
|
|
|
11509
|
-
|
|
11564
|
+
// src/expression/types/number_array.ts
|
|
11510
11565
|
/**
|
|
11511
11566
|
* An array of numbers. Create instances from
|
|
11512
11567
|
* bare arrays or numeric values using the static method `NumberArray.parse`.
|
|
@@ -11536,7 +11591,7 @@ var NumberArray = class NumberArray {
|
|
|
11536
11591
|
}
|
|
11537
11592
|
};
|
|
11538
11593
|
|
|
11539
|
-
|
|
11594
|
+
// src/expression/types/color_array.ts
|
|
11540
11595
|
/**
|
|
11541
11596
|
* An array of colors. Create instances from
|
|
11542
11597
|
* bare arrays or strings using the static method `ColorArray.parse`.
|
|
@@ -11579,7 +11634,7 @@ var ColorArray = class ColorArray {
|
|
|
11579
11634
|
}
|
|
11580
11635
|
};
|
|
11581
11636
|
|
|
11582
|
-
|
|
11637
|
+
// src/expression/runtime_error.ts
|
|
11583
11638
|
var RuntimeError = class extends Error {
|
|
11584
11639
|
constructor(message, path) {
|
|
11585
11640
|
super(message);
|
|
@@ -11591,7 +11646,7 @@ var RuntimeError = class extends Error {
|
|
|
11591
11646
|
}
|
|
11592
11647
|
};
|
|
11593
11648
|
|
|
11594
|
-
|
|
11649
|
+
// src/expression/types/variable_anchor_offset_collection.ts
|
|
11595
11650
|
/** Set of valid anchor positions, as a set for validation */
|
|
11596
11651
|
const anchors = /* @__PURE__ */ new Set([
|
|
11597
11652
|
"center",
|
|
@@ -11643,7 +11698,7 @@ var VariableAnchorOffsetCollection = class VariableAnchorOffsetCollection {
|
|
|
11643
11698
|
}
|
|
11644
11699
|
};
|
|
11645
11700
|
|
|
11646
|
-
|
|
11701
|
+
// src/expression/types/resolved_image.ts
|
|
11647
11702
|
var ResolvedImage = class ResolvedImage {
|
|
11648
11703
|
constructor(options) {
|
|
11649
11704
|
this.name = options.name;
|
|
@@ -11661,7 +11716,7 @@ var ResolvedImage = class ResolvedImage {
|
|
|
11661
11716
|
}
|
|
11662
11717
|
};
|
|
11663
11718
|
|
|
11664
|
-
|
|
11719
|
+
// src/expression/types/projection_definition.ts
|
|
11665
11720
|
var ProjectionDefinition = class ProjectionDefinition {
|
|
11666
11721
|
constructor(from, to, transition) {
|
|
11667
11722
|
this.from = from;
|
|
@@ -11687,7 +11742,7 @@ var ProjectionDefinition = class ProjectionDefinition {
|
|
|
11687
11742
|
}
|
|
11688
11743
|
};
|
|
11689
11744
|
|
|
11690
|
-
|
|
11745
|
+
// src/expression/types/collator.ts
|
|
11691
11746
|
var Collator = class {
|
|
11692
11747
|
constructor(caseSensitive, diacriticSensitive, locale) {
|
|
11693
11748
|
if (caseSensitive) this.sensitivity = diacriticSensitive ? "variant" : "case";
|
|
@@ -11706,7 +11761,7 @@ var Collator = class {
|
|
|
11706
11761
|
}
|
|
11707
11762
|
};
|
|
11708
11763
|
|
|
11709
|
-
|
|
11764
|
+
// src/expression/values.ts
|
|
11710
11765
|
function validateRGBA(r, g, b, a) {
|
|
11711
11766
|
if (!(typeof r === "number" && r >= 0 && r <= 255 && typeof g === "number" && g >= 0 && g <= 255 && typeof b === "number" && b >= 0 && b <= 255)) return `Invalid rgba value [${(typeof a === "number" ? [
|
|
11712
11767
|
r,
|
|
@@ -11773,7 +11828,7 @@ function valueToString(value) {
|
|
|
11773
11828
|
else return JSON.stringify(value);
|
|
11774
11829
|
}
|
|
11775
11830
|
|
|
11776
|
-
|
|
11831
|
+
// src/expression/definitions/literal.ts
|
|
11777
11832
|
var Literal = class Literal {
|
|
11778
11833
|
constructor(type, value) {
|
|
11779
11834
|
this.type = type;
|
|
@@ -11797,7 +11852,7 @@ var Literal = class Literal {
|
|
|
11797
11852
|
}
|
|
11798
11853
|
};
|
|
11799
11854
|
|
|
11800
|
-
|
|
11855
|
+
// src/expression/evaluation_context.ts
|
|
11801
11856
|
const geometryTypes = [
|
|
11802
11857
|
"Unknown",
|
|
11803
11858
|
"Point",
|
|
@@ -11839,7 +11894,7 @@ var EvaluationContext = class {
|
|
|
11839
11894
|
}
|
|
11840
11895
|
};
|
|
11841
11896
|
|
|
11842
|
-
|
|
11897
|
+
// src/expression/stops.ts
|
|
11843
11898
|
/**
|
|
11844
11899
|
* Returns the index of the last stop <= input, or 0 if it doesn't exist.
|
|
11845
11900
|
* @private
|
|
@@ -11863,7 +11918,7 @@ function findStopLessThanOrEqualTo(stops, input, key) {
|
|
|
11863
11918
|
return 0;
|
|
11864
11919
|
}
|
|
11865
11920
|
|
|
11866
|
-
|
|
11921
|
+
// src/expression/definitions/step.ts
|
|
11867
11922
|
var Step = class Step {
|
|
11868
11923
|
constructor(type, input, stops, key) {
|
|
11869
11924
|
this.type = type;
|
|
@@ -11917,7 +11972,7 @@ var Step = class Step {
|
|
|
11917
11972
|
}
|
|
11918
11973
|
};
|
|
11919
11974
|
|
|
11920
|
-
|
|
11975
|
+
// node_modules/@mapbox/unitbezier/index.js
|
|
11921
11976
|
function unitBezier(p1x, p1y, p2x, p2y) {
|
|
11922
11977
|
const cx = 3 * p1x;
|
|
11923
11978
|
const bx = 3 * (p2x - p1x) - cx;
|
|
@@ -11950,7 +12005,7 @@ function unitBezier(p1x, p1y, p2x, p2y) {
|
|
|
11950
12005
|
};
|
|
11951
12006
|
}
|
|
11952
12007
|
|
|
11953
|
-
|
|
12008
|
+
// src/expression/definitions/interpolate.ts
|
|
11954
12009
|
var Interpolate = class Interpolate {
|
|
11955
12010
|
constructor(type, operator, interpolation, input, stops, key) {
|
|
11956
12011
|
this.type = type;
|
|
@@ -12112,7 +12167,7 @@ const interpolateFactory = {
|
|
|
12112
12167
|
array: interpolateArray
|
|
12113
12168
|
};
|
|
12114
12169
|
|
|
12115
|
-
|
|
12170
|
+
// src/expression/definitions/format.ts
|
|
12116
12171
|
var FormatExpression = class FormatExpression {
|
|
12117
12172
|
constructor(sections) {
|
|
12118
12173
|
this.type = FormattedType;
|
|
@@ -12193,7 +12248,7 @@ var FormatExpression = class FormatExpression {
|
|
|
12193
12248
|
}
|
|
12194
12249
|
};
|
|
12195
12250
|
|
|
12196
|
-
|
|
12251
|
+
// src/util/classify_rings.ts
|
|
12197
12252
|
/**
|
|
12198
12253
|
* Classifies an array of rings into polygons with outer rings and holes
|
|
12199
12254
|
* @param rings - the rings to classify
|
|
@@ -12236,7 +12291,7 @@ function calculateSignedArea(ring) {
|
|
|
12236
12291
|
return sum;
|
|
12237
12292
|
}
|
|
12238
12293
|
|
|
12239
|
-
|
|
12294
|
+
// src/expression/definitions/assertion.ts
|
|
12240
12295
|
const types$1 = {
|
|
12241
12296
|
string: StringType,
|
|
12242
12297
|
number: NumberType,
|
|
@@ -12297,7 +12352,7 @@ var Assertion = class Assertion {
|
|
|
12297
12352
|
}
|
|
12298
12353
|
};
|
|
12299
12354
|
|
|
12300
|
-
|
|
12355
|
+
// src/expression/definitions/coercion.ts
|
|
12301
12356
|
const types = {
|
|
12302
12357
|
"to-boolean": BooleanType,
|
|
12303
12358
|
"to-color": ColorType,
|
|
@@ -12417,7 +12472,7 @@ var Coercion = class Coercion {
|
|
|
12417
12472
|
}
|
|
12418
12473
|
};
|
|
12419
12474
|
|
|
12420
|
-
|
|
12475
|
+
// src/expression/definitions/let.ts
|
|
12421
12476
|
var Let = class Let {
|
|
12422
12477
|
constructor(bindings, result) {
|
|
12423
12478
|
this.type = result.type;
|
|
@@ -12451,7 +12506,7 @@ var Let = class Let {
|
|
|
12451
12506
|
}
|
|
12452
12507
|
};
|
|
12453
12508
|
|
|
12454
|
-
|
|
12509
|
+
// src/expression/definitions/var.ts
|
|
12455
12510
|
var Var = class Var {
|
|
12456
12511
|
constructor(name, boundExpression) {
|
|
12457
12512
|
this.type = boundExpression.type;
|
|
@@ -12473,7 +12528,7 @@ var Var = class Var {
|
|
|
12473
12528
|
}
|
|
12474
12529
|
};
|
|
12475
12530
|
|
|
12476
|
-
|
|
12531
|
+
// src/expression/definitions/at.ts
|
|
12477
12532
|
var At = class At {
|
|
12478
12533
|
constructor(type, index, input, key) {
|
|
12479
12534
|
this.type = type;
|
|
@@ -12506,7 +12561,7 @@ var At = class At {
|
|
|
12506
12561
|
}
|
|
12507
12562
|
};
|
|
12508
12563
|
|
|
12509
|
-
|
|
12564
|
+
// src/expression/definitions/in.ts
|
|
12510
12565
|
var In = class In {
|
|
12511
12566
|
constructor(needle, haystack, key) {
|
|
12512
12567
|
this.needle = needle;
|
|
@@ -12550,7 +12605,7 @@ var In = class In {
|
|
|
12550
12605
|
}
|
|
12551
12606
|
};
|
|
12552
12607
|
|
|
12553
|
-
|
|
12608
|
+
// src/expression/definitions/index_of.ts
|
|
12554
12609
|
var IndexOf = class IndexOf {
|
|
12555
12610
|
constructor(needle, haystack, key, fromIndex) {
|
|
12556
12611
|
this.needle = needle;
|
|
@@ -12605,7 +12660,7 @@ var IndexOf = class IndexOf {
|
|
|
12605
12660
|
}
|
|
12606
12661
|
};
|
|
12607
12662
|
|
|
12608
|
-
|
|
12663
|
+
// src/expression/definitions/match.ts
|
|
12609
12664
|
var Match = class Match {
|
|
12610
12665
|
constructor(inputType, outputType, input, cases, outputs, otherwise) {
|
|
12611
12666
|
this.inputType = inputType;
|
|
@@ -12664,7 +12719,7 @@ var Match = class Match {
|
|
|
12664
12719
|
}
|
|
12665
12720
|
};
|
|
12666
12721
|
|
|
12667
|
-
|
|
12722
|
+
// src/expression/definitions/case.ts
|
|
12668
12723
|
var Case = class Case {
|
|
12669
12724
|
constructor(type, branches, otherwise) {
|
|
12670
12725
|
this.type = type;
|
|
@@ -12706,7 +12761,7 @@ var Case = class Case {
|
|
|
12706
12761
|
}
|
|
12707
12762
|
};
|
|
12708
12763
|
|
|
12709
|
-
|
|
12764
|
+
// src/expression/definitions/slice.ts
|
|
12710
12765
|
var Slice = class Slice {
|
|
12711
12766
|
constructor(type, input, beginIndex, key, endIndex) {
|
|
12712
12767
|
this.type = type;
|
|
@@ -12750,7 +12805,7 @@ var Slice = class Slice {
|
|
|
12750
12805
|
}
|
|
12751
12806
|
};
|
|
12752
12807
|
|
|
12753
|
-
|
|
12808
|
+
// src/expression/definitions/coalesce.ts
|
|
12754
12809
|
var Coalesce = class Coalesce {
|
|
12755
12810
|
constructor(type, args) {
|
|
12756
12811
|
this.type = type;
|
|
@@ -12795,7 +12850,7 @@ var Coalesce = class Coalesce {
|
|
|
12795
12850
|
}
|
|
12796
12851
|
};
|
|
12797
12852
|
|
|
12798
|
-
|
|
12853
|
+
// src/expression/definitions/comparison.ts
|
|
12799
12854
|
function isComparableType(op, type) {
|
|
12800
12855
|
if (op === "==" || op === "!=") return type.kind === "boolean" || type.kind === "string" || type.kind === "number" || type.kind === "null" || type.kind === "value";
|
|
12801
12856
|
else return type.kind === "string" || type.kind === "number" || type.kind === "value";
|
|
@@ -12918,7 +12973,7 @@ const GreaterThan = makeComparison(">", gt, gtCollate);
|
|
|
12918
12973
|
const LessThanOrEqual = makeComparison("<=", lteq, lteqCollate);
|
|
12919
12974
|
const GreaterThanOrEqual = makeComparison(">=", gteq, gteqCollate);
|
|
12920
12975
|
|
|
12921
|
-
|
|
12976
|
+
// src/expression/definitions/collator.ts
|
|
12922
12977
|
var CollatorExpression = class CollatorExpression {
|
|
12923
12978
|
constructor(caseSensitive, diacriticSensitive, locale) {
|
|
12924
12979
|
this.type = CollatorType;
|
|
@@ -12954,7 +13009,7 @@ var CollatorExpression = class CollatorExpression {
|
|
|
12954
13009
|
}
|
|
12955
13010
|
};
|
|
12956
13011
|
|
|
12957
|
-
|
|
13012
|
+
// src/expression/definitions/number_format.ts
|
|
12958
13013
|
var NumberFormat = class NumberFormat {
|
|
12959
13014
|
constructor(number, locale, currency, unit, minFractionDigits, maxFractionDigits) {
|
|
12960
13015
|
this.type = StringType;
|
|
@@ -13021,7 +13076,7 @@ var NumberFormat = class NumberFormat {
|
|
|
13021
13076
|
}
|
|
13022
13077
|
};
|
|
13023
13078
|
|
|
13024
|
-
|
|
13079
|
+
// src/expression/definitions/image.ts
|
|
13025
13080
|
var ImageExpression = class ImageExpression {
|
|
13026
13081
|
constructor(input) {
|
|
13027
13082
|
this.type = ResolvedImageType;
|
|
@@ -13047,7 +13102,7 @@ var ImageExpression = class ImageExpression {
|
|
|
13047
13102
|
}
|
|
13048
13103
|
};
|
|
13049
13104
|
|
|
13050
|
-
|
|
13105
|
+
// src/expression/definitions/length.ts
|
|
13051
13106
|
var Length = class Length {
|
|
13052
13107
|
constructor(input, key) {
|
|
13053
13108
|
this.input = input;
|
|
@@ -13075,7 +13130,7 @@ var Length = class Length {
|
|
|
13075
13130
|
}
|
|
13076
13131
|
};
|
|
13077
13132
|
|
|
13078
|
-
|
|
13133
|
+
// src/util/geometry_util.ts
|
|
13079
13134
|
const EXTENT = 8192;
|
|
13080
13135
|
function getTileCoordinates(p, canonical) {
|
|
13081
13136
|
const x = mercatorXfromLng(p[0]);
|
|
@@ -13171,7 +13226,7 @@ function twoSided(p1, p2, q1, q2) {
|
|
|
13171
13226
|
return false;
|
|
13172
13227
|
}
|
|
13173
13228
|
|
|
13174
|
-
|
|
13229
|
+
// src/expression/definitions/within.ts
|
|
13175
13230
|
function getTilePolygon(coordinates, bbox, canonical) {
|
|
13176
13231
|
const polygon = [];
|
|
13177
13232
|
for (let i = 0; i < coordinates.length; i++) {
|
|
@@ -13333,7 +13388,7 @@ var Within = class Within {
|
|
|
13333
13388
|
}
|
|
13334
13389
|
};
|
|
13335
13390
|
|
|
13336
|
-
|
|
13391
|
+
// node_modules/tinyqueue/index.js
|
|
13337
13392
|
var TinyQueue = class {
|
|
13338
13393
|
constructor(data = [], compare = (a, b) => a < b ? -1 : a > b ? 1 : 0) {
|
|
13339
13394
|
this.data = data;
|
|
@@ -13386,7 +13441,7 @@ var TinyQueue = class {
|
|
|
13386
13441
|
}
|
|
13387
13442
|
};
|
|
13388
13443
|
|
|
13389
|
-
|
|
13444
|
+
// src/util/cheap_ruler.ts
|
|
13390
13445
|
const RE = 6378.137;
|
|
13391
13446
|
const E2 = .0066943799901413165;
|
|
13392
13447
|
const RAD = Math.PI / 180;
|
|
@@ -13469,7 +13524,7 @@ var CheapRuler = class {
|
|
|
13469
13524
|
}
|
|
13470
13525
|
};
|
|
13471
13526
|
|
|
13472
|
-
|
|
13527
|
+
// src/expression/definitions/distance.ts
|
|
13473
13528
|
const MinPointsSize = 100;
|
|
13474
13529
|
const MinLinePointsSize = 50;
|
|
13475
13530
|
function compareDistPair(a, b) {
|
|
@@ -13837,7 +13892,7 @@ var Distance = class Distance {
|
|
|
13837
13892
|
}
|
|
13838
13893
|
};
|
|
13839
13894
|
|
|
13840
|
-
|
|
13895
|
+
// src/expression/definitions/semiliteral.ts
|
|
13841
13896
|
var Semiliteral = class Semiliteral {
|
|
13842
13897
|
constructor(arr) {
|
|
13843
13898
|
let elementType = null;
|
|
@@ -13878,7 +13933,7 @@ var Semiliteral = class Semiliteral {
|
|
|
13878
13933
|
}
|
|
13879
13934
|
};
|
|
13880
13935
|
|
|
13881
|
-
|
|
13936
|
+
// src/expression/definitions/global_state.ts
|
|
13882
13937
|
var GlobalState = class GlobalState {
|
|
13883
13938
|
constructor(key) {
|
|
13884
13939
|
this.key = key;
|
|
@@ -13902,7 +13957,7 @@ var GlobalState = class GlobalState {
|
|
|
13902
13957
|
}
|
|
13903
13958
|
};
|
|
13904
13959
|
|
|
13905
|
-
|
|
13960
|
+
// src/expression/definitions/index.ts
|
|
13906
13961
|
const expressions = {
|
|
13907
13962
|
"==": Equals,
|
|
13908
13963
|
"!=": NotEquals,
|
|
@@ -13944,7 +13999,7 @@ const expressions = {
|
|
|
13944
13999
|
"global-state": GlobalState
|
|
13945
14000
|
};
|
|
13946
14001
|
|
|
13947
|
-
|
|
14002
|
+
// src/expression/parsing_error.ts
|
|
13948
14003
|
var ExpressionParsingError = class extends Error {
|
|
13949
14004
|
constructor(key, message) {
|
|
13950
14005
|
super(message);
|
|
@@ -13953,7 +14008,7 @@ var ExpressionParsingError = class extends Error {
|
|
|
13953
14008
|
}
|
|
13954
14009
|
};
|
|
13955
14010
|
|
|
13956
|
-
|
|
14011
|
+
// src/expression/scope.ts
|
|
13957
14012
|
/**
|
|
13958
14013
|
* Tracks `let` bindings during expression parsing.
|
|
13959
14014
|
* @private
|
|
@@ -13978,7 +14033,7 @@ var Scope = class Scope {
|
|
|
13978
14033
|
}
|
|
13979
14034
|
};
|
|
13980
14035
|
|
|
13981
|
-
|
|
14036
|
+
// src/expression/parsing_context.ts
|
|
13982
14037
|
/**
|
|
13983
14038
|
* State associated parsing at a given point in an expression tree.
|
|
13984
14039
|
* @private
|
|
@@ -14100,7 +14155,7 @@ var ParsingContext = class ParsingContext {
|
|
|
14100
14155
|
}
|
|
14101
14156
|
};
|
|
14102
14157
|
|
|
14103
|
-
|
|
14158
|
+
// src/expression/compound_expression.ts
|
|
14104
14159
|
var CompoundExpression = class CompoundExpression {
|
|
14105
14160
|
constructor(name, type, evaluate, args, key) {
|
|
14106
14161
|
this.name = name;
|
|
@@ -14675,7 +14730,7 @@ function isGlobalPropertyConstant(e, properties) {
|
|
|
14675
14730
|
return result;
|
|
14676
14731
|
}
|
|
14677
14732
|
|
|
14678
|
-
|
|
14733
|
+
// src/util/properties.ts
|
|
14679
14734
|
function supportsPropertyExpression(spec) {
|
|
14680
14735
|
return spec["property-type"] === "data-driven" || spec["property-type"] === "cross-faded-data-driven";
|
|
14681
14736
|
}
|
|
@@ -14686,13 +14741,13 @@ function supportsInterpolation(spec) {
|
|
|
14686
14741
|
return !!spec.expression && spec.expression.interpolated;
|
|
14687
14742
|
}
|
|
14688
14743
|
|
|
14689
|
-
|
|
14744
|
+
// src/util/extend.ts
|
|
14690
14745
|
function extendBy(output, ...inputs) {
|
|
14691
14746
|
for (const input of inputs) for (const k in input) output[k] = input[k];
|
|
14692
14747
|
return output;
|
|
14693
14748
|
}
|
|
14694
14749
|
|
|
14695
|
-
|
|
14750
|
+
// src/util/get_type.ts
|
|
14696
14751
|
function getType(val) {
|
|
14697
14752
|
if (val instanceof Number) return "number";
|
|
14698
14753
|
else if (val instanceof String) return "string";
|
|
@@ -14702,7 +14757,7 @@ function getType(val) {
|
|
|
14702
14757
|
else return typeof val;
|
|
14703
14758
|
}
|
|
14704
14759
|
|
|
14705
|
-
|
|
14760
|
+
// src/function/index.ts
|
|
14706
14761
|
function isFunction(value) {
|
|
14707
14762
|
return typeof value === "object" && value !== null && !Array.isArray(value) && typeOf(value) === ObjectType;
|
|
14708
14763
|
}
|
|
@@ -14911,7 +14966,7 @@ function interpolationFactor(input, base, lowerValue, upperValue) {
|
|
|
14911
14966
|
else return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);
|
|
14912
14967
|
}
|
|
14913
14968
|
|
|
14914
|
-
|
|
14969
|
+
// src/util/result.ts
|
|
14915
14970
|
function success(value) {
|
|
14916
14971
|
return {
|
|
14917
14972
|
result: "success",
|
|
@@ -14925,7 +14980,7 @@ function error(value) {
|
|
|
14925
14980
|
};
|
|
14926
14981
|
}
|
|
14927
14982
|
|
|
14928
|
-
|
|
14983
|
+
// src/expression/index.ts
|
|
14929
14984
|
var StyleExpression = class {
|
|
14930
14985
|
constructor(expression, rootKey, propertySpec, globalState) {
|
|
14931
14986
|
this.expression = expression;
|
|
@@ -15140,21 +15195,26 @@ function normalizePropertyExpression(value, rootKey, specification, globalState)
|
|
|
15140
15195
|
};
|
|
15141
15196
|
}
|
|
15142
15197
|
}
|
|
15143
|
-
function findZoomCurve(expression) {
|
|
15198
|
+
function findZoomCurve(expression, seen = /* @__PURE__ */ new Map()) {
|
|
15199
|
+
if (seen.has(expression)) return seen.get(expression);
|
|
15144
15200
|
let result = null;
|
|
15145
|
-
if (expression instanceof Let) result = findZoomCurve(expression.result);
|
|
15201
|
+
if (expression instanceof Let) result = findZoomCurve(expression.result, seen);
|
|
15146
15202
|
else if (expression instanceof Coalesce) for (const arg of expression.args) {
|
|
15147
|
-
result = findZoomCurve(arg);
|
|
15203
|
+
result = findZoomCurve(arg, seen);
|
|
15148
15204
|
if (result) break;
|
|
15149
15205
|
}
|
|
15150
15206
|
else if ((expression instanceof Step || expression instanceof Interpolate) && expression.input instanceof CompoundExpression && expression.input.name === "zoom") result = expression;
|
|
15151
|
-
if (result instanceof ExpressionParsingError)
|
|
15207
|
+
if (result instanceof ExpressionParsingError) {
|
|
15208
|
+
seen.set(expression, result);
|
|
15209
|
+
return result;
|
|
15210
|
+
}
|
|
15152
15211
|
expression.eachChild((child) => {
|
|
15153
|
-
const childResult = findZoomCurve(child);
|
|
15212
|
+
const childResult = findZoomCurve(child, seen);
|
|
15154
15213
|
if (childResult instanceof ExpressionParsingError) result = childResult;
|
|
15155
15214
|
else if (!result && childResult) result = new ExpressionParsingError("", "\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.");
|
|
15156
15215
|
else if (result && childResult && result !== childResult) result = new ExpressionParsingError("", "Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.");
|
|
15157
15216
|
});
|
|
15217
|
+
seen.set(expression, result);
|
|
15158
15218
|
return result;
|
|
15159
15219
|
}
|
|
15160
15220
|
function findGlobalStateRefs(expression, results = /* @__PURE__ */ new Set()) {
|
|
@@ -15207,7 +15267,7 @@ function addGlobalState(globals, globalState) {
|
|
|
15207
15267
|
};
|
|
15208
15268
|
}
|
|
15209
15269
|
|
|
15210
|
-
|
|
15270
|
+
// src/feature_filter/index.ts
|
|
15211
15271
|
function classifyChildren(children) {
|
|
15212
15272
|
let sawLegacy = false;
|
|
15213
15273
|
for (const child of children) {
|
|
@@ -15420,7 +15480,7 @@ function convertNegation(filter) {
|
|
|
15420
15480
|
return ["!", filter];
|
|
15421
15481
|
}
|
|
15422
15482
|
|
|
15423
|
-
|
|
15483
|
+
// src/expression/visibility.ts
|
|
15424
15484
|
const visibilitySpec = {
|
|
15425
15485
|
type: "enum",
|
|
15426
15486
|
"property-type": "data-constant",
|
|
@@ -21634,7 +21694,11 @@ class CanvasPatterns {
|
|
|
21634
21694
|
image
|
|
21635
21695
|
.getContext('2d')
|
|
21636
21696
|
.drawImage(sheet, sprite.x, sprite.y, sprite.width, sprite.height, 0, 0, sprite.width, sprite.height);
|
|
21637
|
-
|
|
21697
|
+
// Only an unloaded `Image` gives `null`; a canvas never does.
|
|
21698
|
+
const created = this.#ctx.createPattern(image, 'repeat');
|
|
21699
|
+
if (!created)
|
|
21700
|
+
throw new Error(`could not create a canvas pattern of "${pattern.name}"`);
|
|
21701
|
+
fill = created;
|
|
21638
21702
|
this.#patterns.set(key, fill);
|
|
21639
21703
|
}
|
|
21640
21704
|
const scale = (pattern.scale ?? 1) / sprite.pixelRatio;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versatiles/png-renderer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Renders MapLibre styles as PNG (and SVG) in Node.js.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"png",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node": ">= 22"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@napi-rs/canvas": "^1.0
|
|
44
|
+
"@napi-rs/canvas": "^1.1.0",
|
|
45
45
|
"@types/geojson": "^7946.0.16"
|
|
46
46
|
}
|
|
47
47
|
}
|