@mapbox/mapbox-gl-style-spec 13.27.0 → 13.28.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.cjs +23 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +23 -33
- package/dist/index.es.js.map +1 -1
- package/expression/index.js +1 -1
- package/package.json +1 -1
- package/reference/v8.json +11 -20
- package/style-spec.js +1 -1
- package/util/properties.js +1 -1
- package/validate/validate_source.js +11 -1
- package/validate_mapbox_api_supported.js +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4354,7 +4354,7 @@
|
|
|
4354
4354
|
},
|
|
4355
4355
|
"fill-pattern": {
|
|
4356
4356
|
type: "resolvedImage",
|
|
4357
|
-
transition:
|
|
4357
|
+
transition: false,
|
|
4358
4358
|
doc: "Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.",
|
|
4359
4359
|
"sdk-support": {
|
|
4360
4360
|
"basic functionality": {
|
|
@@ -4377,7 +4377,7 @@
|
|
|
4377
4377
|
"feature"
|
|
4378
4378
|
]
|
|
4379
4379
|
},
|
|
4380
|
-
"property-type": "
|
|
4380
|
+
"property-type": "data-driven"
|
|
4381
4381
|
}
|
|
4382
4382
|
};
|
|
4383
4383
|
var paint_line = {
|
|
@@ -4632,7 +4632,7 @@
|
|
|
4632
4632
|
value: "number",
|
|
4633
4633
|
doc: "Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",
|
|
4634
4634
|
minimum: 0,
|
|
4635
|
-
transition:
|
|
4635
|
+
transition: false,
|
|
4636
4636
|
units: "line widths",
|
|
4637
4637
|
requires: [
|
|
4638
4638
|
{
|
|
@@ -4657,11 +4657,11 @@
|
|
|
4657
4657
|
"feature"
|
|
4658
4658
|
]
|
|
4659
4659
|
},
|
|
4660
|
-
"property-type": "
|
|
4660
|
+
"property-type": "data-driven"
|
|
4661
4661
|
},
|
|
4662
4662
|
"line-pattern": {
|
|
4663
4663
|
type: "resolvedImage",
|
|
4664
|
-
transition:
|
|
4664
|
+
transition: false,
|
|
4665
4665
|
doc: "Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.",
|
|
4666
4666
|
"sdk-support": {
|
|
4667
4667
|
"basic functionality": {
|
|
@@ -4684,7 +4684,7 @@
|
|
|
4684
4684
|
"feature"
|
|
4685
4685
|
]
|
|
4686
4686
|
},
|
|
4687
|
-
"property-type": "
|
|
4687
|
+
"property-type": "data-driven"
|
|
4688
4688
|
},
|
|
4689
4689
|
"line-gradient": {
|
|
4690
4690
|
type: "color",
|
|
@@ -6052,7 +6052,7 @@
|
|
|
6052
6052
|
},
|
|
6053
6053
|
"background-pattern": {
|
|
6054
6054
|
type: "resolvedImage",
|
|
6055
|
-
transition:
|
|
6055
|
+
transition: false,
|
|
6056
6056
|
doc: "Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.",
|
|
6057
6057
|
"sdk-support": {
|
|
6058
6058
|
"basic functionality": {
|
|
@@ -6060,8 +6060,6 @@
|
|
|
6060
6060
|
android: "2.0.1",
|
|
6061
6061
|
ios: "2.0.0",
|
|
6062
6062
|
macos: "0.1.0"
|
|
6063
|
-
},
|
|
6064
|
-
"data-driven styling": {
|
|
6065
6063
|
}
|
|
6066
6064
|
},
|
|
6067
6065
|
expression: {
|
|
@@ -6070,7 +6068,7 @@
|
|
|
6070
6068
|
"zoom"
|
|
6071
6069
|
]
|
|
6072
6070
|
},
|
|
6073
|
-
"property-type": "
|
|
6071
|
+
"property-type": "data-constant"
|
|
6074
6072
|
},
|
|
6075
6073
|
"background-opacity": {
|
|
6076
6074
|
type: "number",
|
|
@@ -6641,7 +6639,7 @@
|
|
|
6641
6639
|
},
|
|
6642
6640
|
"fill-extrusion-pattern": {
|
|
6643
6641
|
type: "resolvedImage",
|
|
6644
|
-
transition:
|
|
6642
|
+
transition: false,
|
|
6645
6643
|
doc: "Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.",
|
|
6646
6644
|
"sdk-support": {
|
|
6647
6645
|
"basic functionality": {
|
|
@@ -6664,7 +6662,7 @@
|
|
|
6664
6662
|
"feature"
|
|
6665
6663
|
]
|
|
6666
6664
|
},
|
|
6667
|
-
"property-type": "
|
|
6665
|
+
"property-type": "data-driven"
|
|
6668
6666
|
},
|
|
6669
6667
|
"fill-extrusion-height": {
|
|
6670
6668
|
type: "number",
|
|
@@ -6815,14 +6813,6 @@
|
|
|
6815
6813
|
type: "property-type",
|
|
6816
6814
|
doc: "Property is interpolable and can be represented using a property expression."
|
|
6817
6815
|
},
|
|
6818
|
-
"cross-faded": {
|
|
6819
|
-
type: "property-type",
|
|
6820
|
-
doc: "Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."
|
|
6821
|
-
},
|
|
6822
|
-
"cross-faded-data-driven": {
|
|
6823
|
-
type: "property-type",
|
|
6824
|
-
doc: "Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."
|
|
6825
|
-
},
|
|
6826
6816
|
"color-ramp": {
|
|
6827
6817
|
type: "property-type",
|
|
6828
6818
|
doc: "Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."
|
|
@@ -13128,7 +13118,7 @@
|
|
|
13128
13118
|
|
|
13129
13119
|
//
|
|
13130
13120
|
function supportsPropertyExpression(spec) {
|
|
13131
|
-
return spec['property-type'] === 'data-driven'
|
|
13121
|
+
return spec['property-type'] === 'data-driven';
|
|
13132
13122
|
}
|
|
13133
13123
|
function supportsZoomExpression(spec) {
|
|
13134
13124
|
return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;
|
|
@@ -16038,21 +16028,21 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
16038
16028
|
return validateEnum({
|
|
16039
16029
|
key: `${ key }.type`,
|
|
16040
16030
|
value: value.type,
|
|
16041
|
-
valueSpec: {
|
|
16042
|
-
values: [
|
|
16043
|
-
'vector',
|
|
16044
|
-
'raster',
|
|
16045
|
-
'raster-dem',
|
|
16046
|
-
'geojson',
|
|
16047
|
-
'video',
|
|
16048
|
-
'image'
|
|
16049
|
-
]
|
|
16050
|
-
},
|
|
16031
|
+
valueSpec: { values: getSourceTypeValues(styleSpec) },
|
|
16051
16032
|
style,
|
|
16052
16033
|
styleSpec
|
|
16053
16034
|
});
|
|
16054
16035
|
}
|
|
16055
16036
|
}
|
|
16037
|
+
function getSourceTypeValues(styleSpec) {
|
|
16038
|
+
return styleSpec.source.reduce((memo, source) => {
|
|
16039
|
+
const sourceType = styleSpec[source];
|
|
16040
|
+
if (sourceType.type.type === 'enum') {
|
|
16041
|
+
memo = memo.concat(Object.keys(sourceType.type.values));
|
|
16042
|
+
}
|
|
16043
|
+
return memo;
|
|
16044
|
+
}, []);
|
|
16045
|
+
}
|
|
16056
16046
|
function validatePromoteId({key, value}) {
|
|
16057
16047
|
if (getType(value) === 'string') {
|
|
16058
16048
|
return validateString({
|
|
@@ -17585,14 +17575,14 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
17585
17575
|
* var validateMapboxApiSupported = require('mapbox-gl-style-spec/lib/validate_style_mapbox_api_supported.js');
|
|
17586
17576
|
* var errors = validateMapboxApiSupported(style);
|
|
17587
17577
|
*/
|
|
17588
|
-
function validateMapboxApiSupported(style) {
|
|
17578
|
+
function validateMapboxApiSupported(style, styleSpec = v8) {
|
|
17589
17579
|
let s = style;
|
|
17590
17580
|
try {
|
|
17591
17581
|
s = readStyle(s);
|
|
17592
17582
|
} catch (e) {
|
|
17593
17583
|
return [e];
|
|
17594
17584
|
}
|
|
17595
|
-
let errors = validateStyle$1(s,
|
|
17585
|
+
let errors = validateStyle$1(s, styleSpec).concat(getRootErrors(s, Object.keys(v8.$root)));
|
|
17596
17586
|
if (s.sources) {
|
|
17597
17587
|
errors = errors.concat(getSourcesErrors(s.sources));
|
|
17598
17588
|
}
|