@mapbox/mapbox-gl-style-spec 14.16.0-beta.2 → 14.16.0-beta.3
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 +27 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.es.js +27 -25
- package/dist/index.es.js.map +1 -1
- package/package.json +3 -2
- package/reference/v8.json +19 -14
- package/types.ts +6 -2
- package/validate/validate_appearance.ts +5 -7
- package/validate/validate_filter.ts +0 -2
- package/validate/validate_layer.ts +3 -2
- package/validate/validate_property.ts +11 -20
package/dist/index.cjs
CHANGED
|
@@ -133,6 +133,7 @@
|
|
|
133
133
|
},
|
|
134
134
|
indoor: {
|
|
135
135
|
type: "indoor",
|
|
136
|
+
"private": true,
|
|
136
137
|
experimental: true,
|
|
137
138
|
doc: "Controls the behaviour of indoor features."
|
|
138
139
|
},
|
|
@@ -5609,6 +5610,7 @@
|
|
|
5609
5610
|
doc: "Experimental. Returns `true` if the input floor id belongs to one of the active indoor floors, `false` otherwise. In case of array of strings, returns `true` if any of the input floor ids belongs to one of the active indoor floors, `false` otherwise. Only supported in filters.",
|
|
5610
5611
|
group: "Indoor",
|
|
5611
5612
|
experimental: true,
|
|
5613
|
+
"private": true,
|
|
5612
5614
|
"sdk-support": {
|
|
5613
5615
|
"basic functionality": {
|
|
5614
5616
|
js: "3.16.0",
|
|
@@ -6476,26 +6478,29 @@
|
|
|
6476
6478
|
}
|
|
6477
6479
|
}
|
|
6478
6480
|
};
|
|
6479
|
-
var
|
|
6480
|
-
|
|
6481
|
+
var indoor_source = {
|
|
6482
|
+
sourceId: {
|
|
6481
6483
|
type: "string",
|
|
6482
|
-
doc: "
|
|
6484
|
+
doc: "Source ID of a source to be used to retrieve indoor data.",
|
|
6483
6485
|
experimental: true,
|
|
6486
|
+
"private": true,
|
|
6484
6487
|
transition: false,
|
|
6485
|
-
"property-type": "data-constant"
|
|
6486
|
-
expression: {
|
|
6487
|
-
interpolated: false
|
|
6488
|
-
}
|
|
6488
|
+
"property-type": "data-constant"
|
|
6489
6489
|
},
|
|
6490
|
-
|
|
6491
|
-
type: "
|
|
6492
|
-
|
|
6490
|
+
sourceLayers: {
|
|
6491
|
+
type: "array",
|
|
6492
|
+
value: "string",
|
|
6493
|
+
doc: "An array of source layers to be used to retrieve indoor data.",
|
|
6493
6494
|
experimental: true,
|
|
6495
|
+
"private": true,
|
|
6494
6496
|
transition: false,
|
|
6495
|
-
"property-type": "data-constant"
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6497
|
+
"property-type": "data-constant"
|
|
6498
|
+
}
|
|
6499
|
+
};
|
|
6500
|
+
var indoor = {
|
|
6501
|
+
"*": {
|
|
6502
|
+
type: "indoor_source",
|
|
6503
|
+
doc: "Specification of an indoor source - sourceId and sourceLayer required for vector source, for GeoJSON sourceLayers should be omitted."
|
|
6499
6504
|
}
|
|
6500
6505
|
};
|
|
6501
6506
|
var light = {
|
|
@@ -10913,6 +10918,7 @@
|
|
|
10913
10918
|
rain: rain,
|
|
10914
10919
|
camera: camera,
|
|
10915
10920
|
colorTheme: colorTheme,
|
|
10921
|
+
indoor_source: indoor_source,
|
|
10916
10922
|
indoor: indoor,
|
|
10917
10923
|
light: light,
|
|
10918
10924
|
projection: projection,
|
|
@@ -21643,14 +21649,12 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
21643
21649
|
case '<':
|
|
21644
21650
|
case '<=':
|
|
21645
21651
|
case '>':
|
|
21646
|
-
// @ts-expect-error - falls through
|
|
21647
21652
|
case '>=':
|
|
21648
21653
|
if (value.length >= 2 && unbundle(value[1]) === '$type') {
|
|
21649
21654
|
errors.push(new ValidationError(key, value, `"$type" cannot be use with operator "${ value[0] }"`));
|
|
21650
21655
|
}
|
|
21651
21656
|
/* falls through */
|
|
21652
21657
|
case '==':
|
|
21653
|
-
// @ts-expect-error - falls through
|
|
21654
21658
|
case '!=':
|
|
21655
21659
|
if (value.length !== 3) {
|
|
21656
21660
|
errors.push(new ValidationError(key, value, `filter array for operator "${ value[0] }" must have 3 elements`));
|
|
@@ -21712,16 +21716,16 @@ ${ JSON.stringify(filterExp, null, 2) }
|
|
|
21712
21716
|
return [];
|
|
21713
21717
|
const useThemeMatch = propertyKey.match(/^(.*)-use-theme$/);
|
|
21714
21718
|
if (useThemeMatch && layerSpec[useThemeMatch[1]]) {
|
|
21715
|
-
if (isExpression(value)) {
|
|
21719
|
+
if (isExpression(deepUnbundle(value))) {
|
|
21716
21720
|
const errors2 = [];
|
|
21717
21721
|
return errors2.concat(validate({
|
|
21718
|
-
key
|
|
21722
|
+
key,
|
|
21719
21723
|
value,
|
|
21720
21724
|
valueSpec: {
|
|
21721
|
-
|
|
21722
|
-
|
|
21723
|
-
|
|
21724
|
-
|
|
21725
|
+
type: 'string',
|
|
21726
|
+
expression: {
|
|
21727
|
+
interpolated: false,
|
|
21728
|
+
parameters: [
|
|
21725
21729
|
'zoom',
|
|
21726
21730
|
'feature'
|
|
21727
21731
|
]
|
|
@@ -21786,7 +21790,6 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21786
21790
|
return errors.concat(validate({
|
|
21787
21791
|
key: options.key,
|
|
21788
21792
|
value,
|
|
21789
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
21790
21793
|
valueSpec,
|
|
21791
21794
|
style,
|
|
21792
21795
|
styleSpec,
|
|
@@ -21818,7 +21821,7 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21818
21821
|
}, options2))
|
|
21819
21822
|
}
|
|
21820
21823
|
});
|
|
21821
|
-
if (name !== 'hidden' &&
|
|
21824
|
+
if (name !== 'hidden' && condition === void 0) {
|
|
21822
21825
|
errors.push(new ValidationError(options.key, 'name', `Appearance with name different than "hidden" must have a condition`));
|
|
21823
21826
|
}
|
|
21824
21827
|
return errors;
|
|
@@ -21842,7 +21845,6 @@ Use an identity property function instead: ${ example }.`)];
|
|
|
21842
21845
|
layer,
|
|
21843
21846
|
layerType,
|
|
21844
21847
|
value: properties[propertyKey],
|
|
21845
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
21846
21848
|
valueSpec: propertyType === 'paint' ? paintProperties[propertyKey] : layoutProperties[propertyKey]
|
|
21847
21849
|
});
|
|
21848
21850
|
errors.push(...validateProperty(propertyValidationOptions, propertyType));
|