@mapbox/mapbox-gl-style-spec 14.4.0-beta.1 → 14.5.0-beta.1
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/bin/gl-style-composite.js +0 -5
- package/bin/gl-style-format.js +0 -5
- package/bin/gl-style-migrate.js +0 -5
- package/bin/gl-style-validate.js +0 -5
- package/{composite.js → composite.ts} +1 -1
- package/data/{extent.js → extent.ts} +0 -2
- package/{deref.js → deref.ts} +7 -9
- package/{diff.js → diff.ts} +44 -21
- package/dist/index.cjs +800 -1357
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1726 -0
- package/dist/index.es.js +800 -1357
- package/dist/index.es.js.map +1 -1
- package/{empty.js → empty.ts} +1 -2
- package/error/{parsing_error.js → parsing_error.ts} +0 -2
- package/error/{validation_error.js → validation_error.ts} +5 -5
- package/expression/{compound_expression.js → compound_expression.ts} +29 -19
- package/expression/definitions/{assertion.js → assertion.ts} +16 -13
- package/expression/definitions/{at.js → at.ts} +12 -13
- package/expression/definitions/{case.js → case.ts} +12 -11
- package/expression/definitions/{coalesce.js → coalesce.ts} +11 -11
- package/expression/definitions/{coercion.js → coercion.ts} +21 -20
- package/expression/definitions/{collator.js → collator.ts} +11 -11
- package/expression/definitions/{comparison.js → comparison.ts} +30 -24
- package/expression/definitions/{config.js → config.ts} +16 -16
- package/expression/definitions/{distance.js → distance.ts} +60 -52
- package/expression/definitions/{format.js → format.ts} +26 -15
- package/expression/definitions/{image.js → image.ts} +12 -12
- package/expression/definitions/{in.js → in.ts} +22 -13
- package/expression/definitions/{index.js → index.ts} +70 -83
- package/expression/definitions/{index_of.js → index_of.ts} +24 -15
- package/expression/definitions/{interpolate.js → interpolate.ts} +44 -25
- package/expression/definitions/{length.js → length.ts} +11 -10
- package/expression/definitions/{let.js → let.ts} +10 -7
- package/expression/definitions/{literal.js → literal.ts} +11 -12
- package/expression/definitions/{match.js → match.ts} +25 -15
- package/expression/definitions/{number_format.js → number_format.ts} +10 -10
- package/expression/definitions/{slice.js → slice.ts} +23 -15
- package/expression/definitions/{step.js → step.ts} +14 -12
- package/expression/definitions/{var.js → var.ts} +5 -7
- package/expression/definitions/{within.js → within.ts} +41 -29
- package/expression/{evaluation_context.js → evaluation_context.ts} +26 -23
- package/expression/expression.ts +29 -0
- package/expression/{index.js → index.ts} +208 -110
- package/expression/{is_constant.js → is_constant.ts} +5 -7
- package/expression/{parsing_context.js → parsing_context.ts} +47 -34
- package/expression/{parsing_error.js → parsing_error.ts} +0 -2
- package/expression/{runtime_error.js → runtime_error.ts} +0 -2
- package/expression/{scope.js → scope.ts} +5 -5
- package/expression/{stops.js → stops.ts} +2 -4
- package/expression/types/{collator.js → collator.ts} +1 -3
- package/expression/types/{formatted.js → formatted.ts} +8 -7
- package/expression/types/{resolved_image.js → resolved_image.ts} +5 -7
- package/expression/{types.js → types.ts} +53 -45
- package/expression/{values.js → values.ts} +12 -12
- package/feature_filter/{convert.js → convert.ts} +19 -18
- package/feature_filter/{index.js → index.ts} +33 -18
- package/{format.js → format.ts} +3 -3
- package/function/{convert.js → convert.ts} +36 -25
- package/function/{index.js → index.ts} +12 -12
- package/{group_by_layout.js → group_by_layout.ts} +11 -8
- package/migrate/{expressions.js → expressions.ts} +8 -14
- package/migrate/{v8.js → v8.ts} +2 -2
- package/migrate/{v9.js → v9.ts} +2 -2
- package/{migrate.js → migrate.ts} +3 -3
- package/package.json +20 -18
- package/{read_style.js → read_style.ts} +5 -4
- package/reference/latest.ts +5 -0
- package/reference/v8.json +224 -1
- package/rollup.config.js +6 -23
- package/{style-spec.js → style-spec.ts} +28 -30
- package/test.js +3 -2
- package/types/config_options.ts +13 -0
- package/types/lut.ts +7 -0
- package/types/tile_id.ts +5 -0
- package/{types.js → types.ts} +636 -183
- package/util/{color.js → color.ts} +89 -3
- package/util/{color_spaces.js → color_spaces.ts} +12 -14
- package/util/{deep_equal.js → deep_equal.ts} +1 -3
- package/util/{extend.js → extend.ts} +1 -3
- package/util/{geometry_util.js → geometry_util.ts} +23 -11
- package/util/{get_type.js → get_type.ts} +1 -3
- package/util/{interpolate.js → interpolate.ts} +1 -3
- package/util/{properties.js → properties.ts} +5 -4
- package/util/{random.js → random.ts} +0 -2
- package/util/{ref_properties.js → ref_properties.ts} +0 -1
- package/util/{result.js → result.ts} +7 -5
- package/util/{unbundle_jsonlint.js → unbundle_jsonlint.ts} +5 -5
- package/validate/{validate.js → validate.ts} +33 -35
- package/validate/{validate_array.js → validate_array.ts} +5 -7
- package/validate/{validate_boolean.js → validate_boolean.ts} +3 -5
- package/validate/{validate_color.js → validate_color.ts} +3 -5
- package/validate/{validate_enum.js → validate_enum.ts} +4 -5
- package/validate/{validate_expression.js → validate_expression.ts} +7 -9
- package/validate/{validate_filter.js → validate_filter.ts} +16 -12
- package/validate/{validate_fog.js → validate_fog.ts} +4 -6
- package/validate/validate_formatted.ts +13 -0
- package/validate/{validate_function.js → validate_function.ts} +14 -16
- package/validate/{validate_glyphs_url.js → validate_glyphs_url.ts} +3 -5
- package/validate/validate_image.ts +13 -0
- package/validate/{validate_import.js → validate_import.ts} +6 -8
- package/validate/{validate_layer.js → validate_layer.ts} +17 -15
- package/validate/{validate_layout_property.js → validate_layout_property.ts} +3 -5
- package/validate/{validate_light.js → validate_light.ts} +4 -6
- package/validate/{validate_lights.js → validate_lights.ts} +7 -9
- package/validate/{validate_model.js → validate_model.ts} +4 -6
- package/validate/{validate_number.js → validate_number.ts} +4 -6
- package/validate/{validate_object.js → validate_object.ts} +5 -8
- package/validate/{validate_paint_property.js → validate_paint_property.ts} +3 -5
- package/validate/{validate_projection.js → validate_projection.ts} +4 -6
- package/validate/{validate_property.js → validate_property.ts} +15 -15
- package/validate/{validate_source.js → validate_source.ts} +16 -13
- package/validate/validate_string.ts +16 -0
- package/validate/validate_style.ts +33 -0
- package/validate/{validate_terrain.js → validate_terrain.ts} +5 -7
- package/{validate_mapbox_api_supported.js → validate_mapbox_api_supported.ts} +22 -18
- package/{validate_style.min.js → validate_style.min.ts} +20 -21
- package/{validate_style.js → validate_style.ts} +9 -9
- package/{visit.js → visit.ts} +22 -17
- package/.eslintrc +0 -10
- package/expression/expression.js +0 -28
- package/flow-typed/cheap-ruler.js +0 -25
- package/flow-typed/geojson.js +0 -44
- package/flow-typed/gl-matrix.js +0 -119
- package/flow-typed/gl.js +0 -5
- package/flow-typed/intl.js +0 -58
- package/flow-typed/kdbush.js +0 -9
- package/flow-typed/mapbox-gl-supported.js +0 -16
- package/flow-typed/mapbox-unitbezier.js +0 -14
- package/flow-typed/offscreen-canvas.js +0 -9
- package/flow-typed/pbf.js +0 -26
- package/flow-typed/point-geometry.js +0 -46
- package/flow-typed/potpack.js +0 -13
- package/flow-typed/tiny-sdf.js +0 -31
- package/flow-typed/tracked_parameters_proxy.js +0 -82
- package/flow-typed/vector-tile.js +0 -49
- package/flow-typed/webgl2.js +0 -41
- package/reference/latest.js +0 -7
- package/validate/validate_formatted.js +0 -15
- package/validate/validate_image.js +0 -15
- package/validate/validate_string.js +0 -18
- package/validate/validate_style.js +0 -29
package/reference/v8.json
CHANGED
|
@@ -109,6 +109,10 @@
|
|
|
109
109
|
"type": "camera",
|
|
110
110
|
"doc": "Global setting to control additional camera intrinsics parameters, e.g. projection type (perspective / orthographic)."
|
|
111
111
|
},
|
|
112
|
+
"color-theme": {
|
|
113
|
+
"type": "colorTheme",
|
|
114
|
+
"doc": "A global modifier for the colors of the style."
|
|
115
|
+
},
|
|
112
116
|
"imports": {
|
|
113
117
|
"type": "array",
|
|
114
118
|
"value": "import",
|
|
@@ -239,6 +243,10 @@
|
|
|
239
243
|
"default": {
|
|
240
244
|
"type": "*",
|
|
241
245
|
"doc": "Default configuration value for this option.",
|
|
246
|
+
"property-type": "data-constant",
|
|
247
|
+
"expression": {
|
|
248
|
+
"interpolated": false
|
|
249
|
+
},
|
|
242
250
|
"required": true
|
|
243
251
|
},
|
|
244
252
|
"type": {
|
|
@@ -857,6 +865,7 @@
|
|
|
857
865
|
}
|
|
858
866
|
},
|
|
859
867
|
"source_raster_array": {
|
|
868
|
+
"experimental": true,
|
|
860
869
|
"type": {
|
|
861
870
|
"required": true,
|
|
862
871
|
"type": "enum",
|
|
@@ -1004,11 +1013,21 @@
|
|
|
1004
1013
|
"generateId": {
|
|
1005
1014
|
"type": "boolean",
|
|
1006
1015
|
"default": false,
|
|
1007
|
-
"doc": "Whether to generate ids for the
|
|
1016
|
+
"doc": "Whether to generate ids for the GeoJSON features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."
|
|
1008
1017
|
},
|
|
1009
1018
|
"promoteId": {
|
|
1010
1019
|
"type": "promoteId",
|
|
1011
1020
|
"doc": "A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."
|
|
1021
|
+
},
|
|
1022
|
+
"dynamic": {
|
|
1023
|
+
"type": "boolean",
|
|
1024
|
+
"default": false,
|
|
1025
|
+
"doc": "Whether to optimize this source for frequent data updates (e.g. animating features).",
|
|
1026
|
+
"sdk-support": {
|
|
1027
|
+
"basic functionality": {
|
|
1028
|
+
"js": "3.4.0"
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1012
1031
|
}
|
|
1013
1032
|
},
|
|
1014
1033
|
"source_video": {
|
|
@@ -1180,6 +1199,7 @@
|
|
|
1180
1199
|
}
|
|
1181
1200
|
},
|
|
1182
1201
|
"raster-particle": {
|
|
1202
|
+
"experimental": true,
|
|
1183
1203
|
"doc": "Particle animation driven by textures such as wind maps.",
|
|
1184
1204
|
"sdk-support": {
|
|
1185
1205
|
"basic functionality": {
|
|
@@ -1201,6 +1221,7 @@
|
|
|
1201
1221
|
},
|
|
1202
1222
|
"model": {
|
|
1203
1223
|
"doc": "A 3D model",
|
|
1224
|
+
"experimental": true,
|
|
1204
1225
|
"sdk-support": {
|
|
1205
1226
|
"basic functionality": {
|
|
1206
1227
|
"js": "3.0.0",
|
|
@@ -1238,6 +1259,17 @@
|
|
|
1238
1259
|
"ios": "11.0.0"
|
|
1239
1260
|
}
|
|
1240
1261
|
}
|
|
1262
|
+
},
|
|
1263
|
+
"clip": {
|
|
1264
|
+
"doc": "Layer that removes 3D content from map.",
|
|
1265
|
+
"sdk-support": {
|
|
1266
|
+
"basic functionality": {
|
|
1267
|
+
"js": "3.5.0",
|
|
1268
|
+
"android": "11.5.0",
|
|
1269
|
+
"ios": "11.5.0"
|
|
1270
|
+
},
|
|
1271
|
+
"experimental": true
|
|
1272
|
+
}
|
|
1241
1273
|
}
|
|
1242
1274
|
},
|
|
1243
1275
|
"doc": "Rendering type of this layer.",
|
|
@@ -1292,6 +1324,7 @@
|
|
|
1292
1324
|
}
|
|
1293
1325
|
},
|
|
1294
1326
|
"layout": [
|
|
1327
|
+
"layout_clip",
|
|
1295
1328
|
"layout_fill",
|
|
1296
1329
|
"layout_line",
|
|
1297
1330
|
"layout_circle",
|
|
@@ -1426,6 +1459,34 @@
|
|
|
1426
1459
|
}]
|
|
1427
1460
|
}
|
|
1428
1461
|
},
|
|
1462
|
+
"layout_clip": {
|
|
1463
|
+
"clip-layer-types": {
|
|
1464
|
+
"type": "array",
|
|
1465
|
+
"value": "enum",
|
|
1466
|
+
"values": {
|
|
1467
|
+
"model": {
|
|
1468
|
+
"doc": "If present the clip layer would remove all 3d model layers below it. Currently only instanced models (e.g. trees) are removed."
|
|
1469
|
+
},
|
|
1470
|
+
"symbol": {
|
|
1471
|
+
"doc": "If present the clip layer would remove all symbol layers below it."
|
|
1472
|
+
}
|
|
1473
|
+
},
|
|
1474
|
+
"default": [],
|
|
1475
|
+
"doc": "Layer types that will also be removed if fallen below this clip layer.",
|
|
1476
|
+
"sdk-support": {
|
|
1477
|
+
"basic functionality": {
|
|
1478
|
+
"js": "3.5.0",
|
|
1479
|
+
"android": "11.5.0",
|
|
1480
|
+
"ios": "11.5.0"
|
|
1481
|
+
}
|
|
1482
|
+
},
|
|
1483
|
+
"expression": {
|
|
1484
|
+
"interpolated": false
|
|
1485
|
+
},
|
|
1486
|
+
"property-type": "data-constant",
|
|
1487
|
+
"experimental": true
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1429
1490
|
"layout_fill": {
|
|
1430
1491
|
"fill-sort-key": {
|
|
1431
1492
|
"type": "number",
|
|
@@ -1599,6 +1660,7 @@
|
|
|
1599
1660
|
},
|
|
1600
1661
|
"fill-extrusion-edge-radius": {
|
|
1601
1662
|
"type": "number",
|
|
1663
|
+
"experimental": true,
|
|
1602
1664
|
"private": true,
|
|
1603
1665
|
"default": 0,
|
|
1604
1666
|
"minimum": 0,
|
|
@@ -1773,6 +1835,32 @@
|
|
|
1773
1835
|
},
|
|
1774
1836
|
"property-type": "data-driven"
|
|
1775
1837
|
},
|
|
1838
|
+
"line-z-offset": {
|
|
1839
|
+
"type": "number",
|
|
1840
|
+
"experimental": true,
|
|
1841
|
+
"doc": "Vertical offset from ground, in meters. Defaults to 0. Not supported for globe projection at the moment.",
|
|
1842
|
+
"sdk-support": {
|
|
1843
|
+
"basic functionality": {
|
|
1844
|
+
"js": "3.5.0",
|
|
1845
|
+
"android": "11.5.0",
|
|
1846
|
+
"ios": "11.5.0"
|
|
1847
|
+
},
|
|
1848
|
+
"data-driven styling": {
|
|
1849
|
+
"js": "3.5.0",
|
|
1850
|
+
"android": "11.5.0",
|
|
1851
|
+
"ios": "11.5.0"
|
|
1852
|
+
}
|
|
1853
|
+
},
|
|
1854
|
+
"expression": {
|
|
1855
|
+
"interpolated": false,
|
|
1856
|
+
"parameters": [
|
|
1857
|
+
"zoom",
|
|
1858
|
+
"feature",
|
|
1859
|
+
"line-progress"
|
|
1860
|
+
]
|
|
1861
|
+
},
|
|
1862
|
+
"property-type": "data-driven"
|
|
1863
|
+
},
|
|
1776
1864
|
"visibility": {
|
|
1777
1865
|
"type": "enum",
|
|
1778
1866
|
"values": {
|
|
@@ -4817,6 +4905,17 @@
|
|
|
4817
4905
|
"property-type": "data-constant"
|
|
4818
4906
|
}
|
|
4819
4907
|
},
|
|
4908
|
+
"colorTheme": {
|
|
4909
|
+
"data": {
|
|
4910
|
+
"type": "string",
|
|
4911
|
+
"doc": "Expects a base64 encoded PNG image which represents a cube strip LUT. The height of the image cannot exceed 32 pixels and the width must be equal to the height squared.",
|
|
4912
|
+
"transition": false,
|
|
4913
|
+
"property-type": "data-constant",
|
|
4914
|
+
"expression": {
|
|
4915
|
+
"interpolated": false
|
|
4916
|
+
}
|
|
4917
|
+
}
|
|
4918
|
+
},
|
|
4820
4919
|
"light": {
|
|
4821
4920
|
"anchor": {
|
|
4822
4921
|
"type": "enum",
|
|
@@ -5563,6 +5662,7 @@
|
|
|
5563
5662
|
"fill-extrusion-ambient-occlusion-wall-radius": {
|
|
5564
5663
|
"property-type": "data-constant",
|
|
5565
5664
|
"type": "number",
|
|
5665
|
+
"experimental": true,
|
|
5566
5666
|
"default": 3.0,
|
|
5567
5667
|
"minimum": 0,
|
|
5568
5668
|
"expression": {
|
|
@@ -5588,6 +5688,7 @@
|
|
|
5588
5688
|
"fill-extrusion-ambient-occlusion-ground-radius": {
|
|
5589
5689
|
"property-type": "data-constant",
|
|
5590
5690
|
"type": "number",
|
|
5691
|
+
"experimental": true,
|
|
5591
5692
|
"default": 3.0,
|
|
5592
5693
|
"minimum": 0,
|
|
5593
5694
|
"expression": {
|
|
@@ -5612,6 +5713,7 @@
|
|
|
5612
5713
|
"fill-extrusion-ambient-occlusion-ground-attenuation": {
|
|
5613
5714
|
"property-type": "data-constant",
|
|
5614
5715
|
"type": "number",
|
|
5716
|
+
"experimental": true,
|
|
5615
5717
|
"default": 0.69,
|
|
5616
5718
|
"minimum": 0.0,
|
|
5617
5719
|
"maximum": 1.0,
|
|
@@ -5637,6 +5739,7 @@
|
|
|
5637
5739
|
"fill-extrusion-flood-light-color": {
|
|
5638
5740
|
"property-type": "data-constant",
|
|
5639
5741
|
"type": "color",
|
|
5742
|
+
"experimental": true,
|
|
5640
5743
|
"default": "#ffffff",
|
|
5641
5744
|
"doc": "The color of the flood light effect on the walls of the extruded buildings.",
|
|
5642
5745
|
"requires": [
|
|
@@ -5661,6 +5764,7 @@
|
|
|
5661
5764
|
"fill-extrusion-flood-light-intensity": {
|
|
5662
5765
|
"property-type": "data-constant",
|
|
5663
5766
|
"type": "number",
|
|
5767
|
+
"experimental": true,
|
|
5664
5768
|
"default": 0.0,
|
|
5665
5769
|
"minimum": 0.0,
|
|
5666
5770
|
"maximum": 1.0,
|
|
@@ -5687,6 +5791,7 @@
|
|
|
5687
5791
|
"fill-extrusion-flood-light-wall-radius": {
|
|
5688
5792
|
"property-type": "data-driven",
|
|
5689
5793
|
"type": "number",
|
|
5794
|
+
"experimental": true,
|
|
5690
5795
|
"units": "meters",
|
|
5691
5796
|
"default": 0,
|
|
5692
5797
|
"minimum": 0,
|
|
@@ -5718,6 +5823,7 @@
|
|
|
5718
5823
|
"fill-extrusion-flood-light-ground-radius": {
|
|
5719
5824
|
"property-type": "data-driven",
|
|
5720
5825
|
"type": "number",
|
|
5826
|
+
"experimental": true,
|
|
5721
5827
|
"units": "meters",
|
|
5722
5828
|
"default": 0,
|
|
5723
5829
|
"doc": "The extent of the flood light effect on the ground beneath the extruded buildings in meters.",
|
|
@@ -5748,6 +5854,7 @@
|
|
|
5748
5854
|
"fill-extrusion-flood-light-ground-attenuation": {
|
|
5749
5855
|
"property-type": "data-constant",
|
|
5750
5856
|
"type": "number",
|
|
5857
|
+
"experimental": true,
|
|
5751
5858
|
"default": 0.69,
|
|
5752
5859
|
"minimum": 0.0,
|
|
5753
5860
|
"maximum": 1.0,
|
|
@@ -5773,6 +5880,7 @@
|
|
|
5773
5880
|
"fill-extrusion-vertical-scale": {
|
|
5774
5881
|
"property-type": "data-constant",
|
|
5775
5882
|
"type": "number",
|
|
5883
|
+
"experimental": true,
|
|
5776
5884
|
"default": 1.0,
|
|
5777
5885
|
"minimum": 0.0,
|
|
5778
5886
|
"doc": "A global multiplier that can be used to scale base, height, AO, and flood light of the fill extrusions.",
|
|
@@ -5795,6 +5903,7 @@
|
|
|
5795
5903
|
"property-type": "data-constant",
|
|
5796
5904
|
"type": "boolean",
|
|
5797
5905
|
"default": true,
|
|
5906
|
+
"experimental": true,
|
|
5798
5907
|
"doc": "Indicates whether top edges should be rounded when fill-extrusion-edge-radius has a value greater than 0. If false, rounded edges are only applied to the sides. Default is true.",
|
|
5799
5908
|
"requires": [
|
|
5800
5909
|
"fill-extrusion-edge-radius"
|
|
@@ -6311,6 +6420,29 @@
|
|
|
6311
6420
|
]
|
|
6312
6421
|
},
|
|
6313
6422
|
"property-type": "data-driven"
|
|
6423
|
+
},
|
|
6424
|
+
"line-occlusion-opacity": {
|
|
6425
|
+
"type": "number",
|
|
6426
|
+
"default": 0,
|
|
6427
|
+
"minimum": 0,
|
|
6428
|
+
"maximum": 1,
|
|
6429
|
+
"experimental": true,
|
|
6430
|
+
"doc": "Opacity multiplier (multiplies line-opacity value) of the line part that is occluded by 3D objects. Value 0 hides occluded part, value 1 means the same opacity as non-occluded part. The property is not supported when `line-opacity` has data-driven styling.",
|
|
6431
|
+
"sdk-support": {
|
|
6432
|
+
"basic functionality": {
|
|
6433
|
+
"js": "3.5.0",
|
|
6434
|
+
"android": "11.5.0",
|
|
6435
|
+
"ios": "11.5.0"
|
|
6436
|
+
}
|
|
6437
|
+
},
|
|
6438
|
+
"expression": {
|
|
6439
|
+
"interpolated": true,
|
|
6440
|
+
"parameters": [
|
|
6441
|
+
"zoom"
|
|
6442
|
+
]
|
|
6443
|
+
},
|
|
6444
|
+
"transition": true,
|
|
6445
|
+
"property-type": "data-constant"
|
|
6314
6446
|
}
|
|
6315
6447
|
},
|
|
6316
6448
|
"paint_circle": {
|
|
@@ -6834,6 +6966,39 @@
|
|
|
6834
6966
|
},
|
|
6835
6967
|
"property-type": "data-driven"
|
|
6836
6968
|
},
|
|
6969
|
+
"icon-occlusion-opacity": {
|
|
6970
|
+
"doc": "The opacity at which the icon will be drawn in case of being depth occluded. Not supported on globe zoom levels.",
|
|
6971
|
+
"type": "number",
|
|
6972
|
+
"default": 1.0,
|
|
6973
|
+
"minimum": 0,
|
|
6974
|
+
"maximum": 1,
|
|
6975
|
+
"transition": true,
|
|
6976
|
+
"requires": [
|
|
6977
|
+
"icon-image"
|
|
6978
|
+
],
|
|
6979
|
+
"sdk-support": {
|
|
6980
|
+
"basic functionality": {
|
|
6981
|
+
"js": "3.5.0",
|
|
6982
|
+
"android": "11.5.0",
|
|
6983
|
+
"ios": "11.6.0"
|
|
6984
|
+
},
|
|
6985
|
+
"data-driven styling": {
|
|
6986
|
+
"js": "3.5.0",
|
|
6987
|
+
"android": "11.5.0",
|
|
6988
|
+
"ios": "11.6.0"
|
|
6989
|
+
}
|
|
6990
|
+
},
|
|
6991
|
+
"expression": {
|
|
6992
|
+
"interpolated": true,
|
|
6993
|
+
"parameters": [
|
|
6994
|
+
"zoom",
|
|
6995
|
+
"feature",
|
|
6996
|
+
"feature-state",
|
|
6997
|
+
"measure-light"
|
|
6998
|
+
]
|
|
6999
|
+
},
|
|
7000
|
+
"property-type": "data-driven"
|
|
7001
|
+
},
|
|
6837
7002
|
"icon-emissive-strength": {
|
|
6838
7003
|
"type": "number",
|
|
6839
7004
|
"default": 1,
|
|
@@ -7150,6 +7315,39 @@
|
|
|
7150
7315
|
},
|
|
7151
7316
|
"property-type": "data-driven"
|
|
7152
7317
|
},
|
|
7318
|
+
"text-occlusion-opacity": {
|
|
7319
|
+
"type": "number",
|
|
7320
|
+
"doc": "The opacity at which the text will be drawn in case of being depth occluded. Not supported on globe zoom levels.",
|
|
7321
|
+
"default": 1.0,
|
|
7322
|
+
"minimum": 0,
|
|
7323
|
+
"maximum": 1,
|
|
7324
|
+
"transition": true,
|
|
7325
|
+
"requires": [
|
|
7326
|
+
"text-field"
|
|
7327
|
+
],
|
|
7328
|
+
"sdk-support": {
|
|
7329
|
+
"basic functionality": {
|
|
7330
|
+
"js": "3.5.0",
|
|
7331
|
+
"android": "11.5.0",
|
|
7332
|
+
"ios": "11.6.0"
|
|
7333
|
+
},
|
|
7334
|
+
"data-driven styling": {
|
|
7335
|
+
"js": "3.5.0",
|
|
7336
|
+
"android": "11.5.0",
|
|
7337
|
+
"ios": "11.6.0"
|
|
7338
|
+
}
|
|
7339
|
+
},
|
|
7340
|
+
"expression": {
|
|
7341
|
+
"interpolated": true,
|
|
7342
|
+
"parameters": [
|
|
7343
|
+
"zoom",
|
|
7344
|
+
"feature",
|
|
7345
|
+
"feature-state",
|
|
7346
|
+
"measure-light"
|
|
7347
|
+
]
|
|
7348
|
+
},
|
|
7349
|
+
"property-type": "data-driven"
|
|
7350
|
+
},
|
|
7153
7351
|
"text-color": {
|
|
7154
7352
|
"type": "color",
|
|
7155
7353
|
"doc": "The color with which the text will be drawn.",
|
|
@@ -7711,6 +7909,7 @@
|
|
|
7711
7909
|
"raster-array-band": {
|
|
7712
7910
|
"type": "string",
|
|
7713
7911
|
"required": false,
|
|
7912
|
+
"experimental": true,
|
|
7714
7913
|
"property-type": "data-constant",
|
|
7715
7914
|
"transition": false,
|
|
7716
7915
|
"requires": [
|
|
@@ -7734,6 +7933,7 @@
|
|
|
7734
7933
|
"default": 0,
|
|
7735
7934
|
"minimum": 0,
|
|
7736
7935
|
"transition": true,
|
|
7936
|
+
"experimental": true,
|
|
7737
7937
|
"sdk-support": {
|
|
7738
7938
|
"basic functionality": {
|
|
7739
7939
|
"js": "3.1.0",
|
|
@@ -8691,6 +8891,29 @@
|
|
|
8691
8891
|
}
|
|
8692
8892
|
},
|
|
8693
8893
|
"property-type": "data-constant"
|
|
8894
|
+
},
|
|
8895
|
+
"model-front-cutoff": {
|
|
8896
|
+
"type": "array",
|
|
8897
|
+
"private": true,
|
|
8898
|
+
"value": "number",
|
|
8899
|
+
"property-type": "data-constant",
|
|
8900
|
+
"transition": false,
|
|
8901
|
+
"expression": {
|
|
8902
|
+
"interpolated": true,
|
|
8903
|
+
"parameters": ["zoom"]
|
|
8904
|
+
},
|
|
8905
|
+
"length": 3,
|
|
8906
|
+
"default": [0.0, 0.0, 1.0],
|
|
8907
|
+
"minimum": [0.0, 0.0, 0.0],
|
|
8908
|
+
"maximum": [1.0, 1.0, 1.0],
|
|
8909
|
+
"doc": "An array for configuring the fade-out effect for the front cutoff of content on pitched map views. It contains three values: start, range and final opacity. The start parameter defines the point at which the fade-out effect begins, with smaller values causing the effect to start earlier. The range parameter specifies how long the fade-out effect will last. A value of 0.0 for range makes content disappear immediately without a fade-out effect. The final opacity determines content opacity at the end of the fade-out effect. A value of 1.0 for final opacity means that the cutoff is completely disabled.",
|
|
8910
|
+
"sdk-support": {
|
|
8911
|
+
"basic functionality": {
|
|
8912
|
+
"js": "3.5.0",
|
|
8913
|
+
"android": "11.5.0",
|
|
8914
|
+
"ios": "11.5.0"
|
|
8915
|
+
}
|
|
8916
|
+
}
|
|
8694
8917
|
}
|
|
8695
8918
|
},
|
|
8696
8919
|
"transition": {
|
package/rollup.config.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
// @noflow
|
|
2
|
-
|
|
3
1
|
import path from 'path';
|
|
4
2
|
import replace from '@rollup/plugin-replace';
|
|
5
3
|
import resolve from '@rollup/plugin-node-resolve';
|
|
6
4
|
import commonjs from '@rollup/plugin-commonjs';
|
|
7
5
|
import unassert from 'rollup-plugin-unassert';
|
|
8
6
|
import json from '@rollup/plugin-json';
|
|
9
|
-
import
|
|
7
|
+
import esbuild from 'rollup-plugin-esbuild';
|
|
10
8
|
|
|
11
9
|
// Build es modules?
|
|
12
10
|
const esm = 'esm' in process.env;
|
|
@@ -15,7 +13,7 @@ import {fileURLToPath} from 'url';
|
|
|
15
13
|
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
16
14
|
|
|
17
15
|
const config = [{
|
|
18
|
-
input: `${__dirname}
|
|
16
|
+
input: `${__dirname}style-spec.ts`,
|
|
19
17
|
output: {
|
|
20
18
|
name: 'mapboxGlStyleSpecification',
|
|
21
19
|
file: `${__dirname}/dist/${esm ? 'index.es.js' : 'index.cjs'}`,
|
|
@@ -23,34 +21,18 @@ const config = [{
|
|
|
23
21
|
sourcemap: true
|
|
24
22
|
},
|
|
25
23
|
plugins: [
|
|
26
|
-
{
|
|
27
|
-
name: 'dep-checker',
|
|
28
|
-
resolveId(source, importer) {
|
|
29
|
-
// Some users reference modules within style-spec package directly, instead of the bundle
|
|
30
|
-
// This means that files within the style-spec package should NOT import files from the parent mapbox-gl-js tree.
|
|
31
|
-
// This check will cause the build to fail on CI allowing these issues to be caught.
|
|
32
|
-
if (importer && !importer.includes('node_modules')) {
|
|
33
|
-
const resolvedPath = path.join(importer, source);
|
|
34
|
-
const fromRoot = path.relative(__dirname, resolvedPath);
|
|
35
|
-
if (fromRoot.length > 2 && fromRoot.slice(0, 2) === '..') {
|
|
36
|
-
throw new Error(`Module ${importer} imports ${source} from outside the style-spec package root directory.`);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
24
|
// https://github.com/zaach/jison/issues/351
|
|
44
25
|
replace({
|
|
26
|
+
preventAssignment: true,
|
|
45
27
|
include: /\/jsonlint-lines-primitives\/lib\/jsonlint.js/,
|
|
46
28
|
delimiters: ['', ''],
|
|
47
29
|
values: {
|
|
48
30
|
'_token_stack:': ''
|
|
49
31
|
}
|
|
50
32
|
}),
|
|
51
|
-
|
|
33
|
+
esbuild({tsconfig: `${__dirname}/../../tsconfig.json`}),
|
|
52
34
|
json(),
|
|
53
|
-
unassert(),
|
|
35
|
+
unassert({include: ['*.js', '**/*.js', '*.ts', '**/*.ts']}),
|
|
54
36
|
resolve({
|
|
55
37
|
browser: true,
|
|
56
38
|
preferBuiltins: false
|
|
@@ -58,4 +40,5 @@ const config = [{
|
|
|
58
40
|
commonjs()
|
|
59
41
|
]
|
|
60
42
|
}];
|
|
43
|
+
|
|
61
44
|
export default config;
|
|
@@ -1,45 +1,43 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
1
|
type ExpressionType = 'data-driven' | 'color-ramp' | 'data-constant' | 'constant';
|
|
4
2
|
type ExpressionParameters = Array<'zoom' | 'feature' | 'feature-state' | 'heatmap-density' | 'line-progress' | 'raster-value' | 'sky-radial-progress' | 'pitch' | 'distance-from-center' | 'measure-light' | 'raster-particle-speed'>;
|
|
5
3
|
|
|
6
4
|
export type ExpressionSpecification = {
|
|
7
5
|
interpolated: boolean,
|
|
8
|
-
parameters
|
|
9
|
-
relaxZoomRestriction
|
|
6
|
+
parameters?: ExpressionParameters,
|
|
7
|
+
relaxZoomRestriction?: boolean
|
|
10
8
|
}
|
|
11
9
|
|
|
12
10
|
export type StylePropertySpecification = {
|
|
13
11
|
type: 'number',
|
|
14
12
|
'property-type': ExpressionType,
|
|
15
13
|
expression?: ExpressionSpecification,
|
|
16
|
-
transition
|
|
14
|
+
transition?: boolean,
|
|
17
15
|
default?: number
|
|
18
16
|
} | {
|
|
19
17
|
type: 'string',
|
|
20
18
|
'property-type': ExpressionType,
|
|
21
19
|
expression?: ExpressionSpecification,
|
|
22
|
-
transition
|
|
20
|
+
transition?: boolean,
|
|
23
21
|
default?: string,
|
|
24
22
|
tokens?: boolean
|
|
25
23
|
} | {
|
|
26
24
|
type: 'boolean',
|
|
27
25
|
'property-type': ExpressionType,
|
|
28
26
|
expression?: ExpressionSpecification,
|
|
29
|
-
transition
|
|
27
|
+
transition?: boolean,
|
|
30
28
|
default?: boolean
|
|
31
29
|
} | {
|
|
32
30
|
type: 'enum',
|
|
33
31
|
'property-type': ExpressionType,
|
|
34
32
|
expression?: ExpressionSpecification,
|
|
35
|
-
values: {[_: string]:
|
|
36
|
-
transition
|
|
33
|
+
values: {[_: string]: unknown},
|
|
34
|
+
transition?: boolean,
|
|
37
35
|
default?: string
|
|
38
36
|
} | {
|
|
39
37
|
type: 'color',
|
|
40
38
|
'property-type': ExpressionType,
|
|
41
39
|
expression?: ExpressionSpecification,
|
|
42
|
-
transition
|
|
40
|
+
transition?: boolean,
|
|
43
41
|
default?: string,
|
|
44
42
|
overridable: boolean
|
|
45
43
|
} | {
|
|
@@ -48,7 +46,7 @@ export type StylePropertySpecification = {
|
|
|
48
46
|
'property-type': ExpressionType,
|
|
49
47
|
expression?: ExpressionSpecification,
|
|
50
48
|
length?: number,
|
|
51
|
-
transition
|
|
49
|
+
transition?: boolean,
|
|
52
50
|
default?: Array<number>
|
|
53
51
|
} | {
|
|
54
52
|
type: 'array',
|
|
@@ -56,36 +54,36 @@ export type StylePropertySpecification = {
|
|
|
56
54
|
'property-type': ExpressionType,
|
|
57
55
|
expression?: ExpressionSpecification,
|
|
58
56
|
length?: number,
|
|
59
|
-
transition
|
|
57
|
+
transition?: boolean,
|
|
60
58
|
default?: Array<string>
|
|
61
59
|
} | {
|
|
62
60
|
type: 'resolvedImage',
|
|
63
61
|
'property-type': ExpressionType,
|
|
64
62
|
expression?: ExpressionSpecification,
|
|
65
|
-
transition
|
|
63
|
+
transition?: boolean,
|
|
66
64
|
default?: string
|
|
67
65
|
};
|
|
68
66
|
|
|
69
67
|
import v8 from './reference/v8.json';
|
|
70
|
-
import latest from './reference/latest
|
|
71
|
-
import format from './format
|
|
72
|
-
import migrate from './migrate
|
|
73
|
-
import composite from './composite
|
|
74
|
-
import derefLayers from './deref
|
|
75
|
-
import diff from './diff
|
|
76
|
-
import ValidationError from './error/validation_error
|
|
77
|
-
import ParsingError from './error/parsing_error
|
|
78
|
-
import {StyleExpression, isExpression, createExpression, createPropertyExpression, normalizePropertyExpression, ZoomConstantExpression, ZoomDependentExpression, StylePropertyFunction} from './expression/index
|
|
79
|
-
import featureFilter, {isExpressionFilter} from './feature_filter/index
|
|
68
|
+
import latest from './reference/latest';
|
|
69
|
+
import format from './format';
|
|
70
|
+
import migrate from './migrate';
|
|
71
|
+
import composite from './composite';
|
|
72
|
+
import derefLayers from './deref';
|
|
73
|
+
import diff from './diff';
|
|
74
|
+
import ValidationError from './error/validation_error';
|
|
75
|
+
import ParsingError from './error/parsing_error';
|
|
76
|
+
import {StyleExpression, isExpression, createExpression, createPropertyExpression, normalizePropertyExpression, ZoomConstantExpression, ZoomDependentExpression, StylePropertyFunction} from './expression/index';
|
|
77
|
+
import featureFilter, {isExpressionFilter} from './feature_filter/index';
|
|
80
78
|
|
|
81
|
-
import convertFilter from './feature_filter/convert
|
|
82
|
-
import Color from './util/color
|
|
83
|
-
import {createFunction, isFunction} from './function/index
|
|
84
|
-
import convertFunction from './function/convert
|
|
85
|
-
import {eachSource, eachLayer, eachProperty} from './visit
|
|
79
|
+
import convertFilter from './feature_filter/convert';
|
|
80
|
+
import Color from './util/color';
|
|
81
|
+
import {createFunction, isFunction} from './function/index';
|
|
82
|
+
import convertFunction from './function/convert';
|
|
83
|
+
import {eachSource, eachLayer, eachProperty} from './visit';
|
|
86
84
|
|
|
87
|
-
import validate from './validate_style
|
|
88
|
-
import validateMapboxApiSupported from './validate_mapbox_api_supported
|
|
85
|
+
import validate from './validate_style';
|
|
86
|
+
import validateMapboxApiSupported from './validate_mapbox_api_supported';
|
|
89
87
|
|
|
90
88
|
const expression = {
|
|
91
89
|
StyleExpression,
|
package/test.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// @noflow
|
|
3
2
|
/* eslint-disable no-process-exit */
|
|
4
3
|
|
|
5
4
|
import fs from 'fs';
|
|
6
5
|
import {execSync} from 'child_process';
|
|
7
6
|
import {createRequire} from 'module';
|
|
8
7
|
|
|
8
|
+
// @ts-expect-error - TS2345 - Argument of type 'Buffer' is not assignable to parameter of type 'string'.
|
|
9
9
|
const packageJson = JSON.parse(fs.readFileSync('./package.json'));
|
|
10
10
|
|
|
11
|
-
process.on('unhandledRejection', error => {
|
|
11
|
+
process.on('unhandledRejection', (error) => {
|
|
12
12
|
// don't log `error` directly, because errors from child_process.execSync
|
|
13
13
|
// contain an (undocumented) `envPairs` with environment variable values
|
|
14
|
+
// @ts-expect-error - TS2339 - Property 'message' does not exist on type 'unknown'.
|
|
14
15
|
console.log(error.message || 'unhandledRejection');
|
|
15
16
|
process.exit(1);
|
|
16
17
|
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type {Expression} from '../expression/expression';
|
|
2
|
+
|
|
3
|
+
export type ConfigOptionValue = {
|
|
4
|
+
default: Expression;
|
|
5
|
+
value?: Expression;
|
|
6
|
+
values?: Array<unknown>;
|
|
7
|
+
minValue?: number;
|
|
8
|
+
maxValue?: number;
|
|
9
|
+
stepValue?: number;
|
|
10
|
+
type?: 'string' | 'number' | 'boolean' | 'color';
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type ConfigOptions = Map<string, ConfigOptionValue>;
|
package/types/lut.ts
ADDED