@mapbox/mapbox-gl-style-spec 13.23.0-beta.1 → 13.23.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/CHANGELOG.md +7 -1
- package/dist/index.cjs +27 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +27 -27
- package/dist/index.es.js.map +1 -1
- package/expression/definitions/coalesce.js +7 -5
- package/expression/types/formatted.js +2 -1
- package/feature_filter/index.js +2 -1
- package/package.json +1 -1
- package/reference/v8.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -95,7 +95,7 @@ var $root = {
|
|
|
95
95
|
},
|
|
96
96
|
projection: {
|
|
97
97
|
type: "projection",
|
|
98
|
-
doc: "The projection the map should be rendered in.
|
|
98
|
+
doc: "The projection the map should be rendered in. Supported projections are Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Mercator, Natural Earth, and Winkel Tripel. Terrain, fog, sky and CustomLayerInterface are not supported for projections other than mercator.",
|
|
99
99
|
example: {
|
|
100
100
|
name: "albers",
|
|
101
101
|
center: [
|
|
@@ -8680,7 +8680,7 @@ class Collator {
|
|
|
8680
8680
|
|
|
8681
8681
|
class FormattedSection {
|
|
8682
8682
|
constructor(text, image, scale, fontStack, textColor) {
|
|
8683
|
-
this.text = text;
|
|
8683
|
+
this.text = text.normalize ? text.normalize() : text;
|
|
8684
8684
|
this.image = image;
|
|
8685
8685
|
this.scale = scale;
|
|
8686
8686
|
this.fontStack = fontStack;
|
|
@@ -10517,17 +10517,17 @@ class Coalesce {
|
|
|
10517
10517
|
evaluate(ctx) {
|
|
10518
10518
|
let result = null;
|
|
10519
10519
|
let argCount = 0;
|
|
10520
|
-
let
|
|
10520
|
+
let firstImage;
|
|
10521
10521
|
for (const arg of this.args) {
|
|
10522
10522
|
argCount++;
|
|
10523
10523
|
result = arg.evaluate(ctx);
|
|
10524
10524
|
if (result && result instanceof ResolvedImage && !result.available) {
|
|
10525
|
-
if (!
|
|
10526
|
-
|
|
10525
|
+
if (!firstImage) {
|
|
10526
|
+
firstImage = result;
|
|
10527
10527
|
}
|
|
10528
10528
|
result = null;
|
|
10529
10529
|
if (argCount === this.args.length) {
|
|
10530
|
-
|
|
10530
|
+
return firstImage;
|
|
10531
10531
|
}
|
|
10532
10532
|
}
|
|
10533
10533
|
if (result !== null)
|
|
@@ -12638,6 +12638,26 @@ function convertTokenString(s) {
|
|
|
12638
12638
|
return result;
|
|
12639
12639
|
}
|
|
12640
12640
|
|
|
12641
|
+
function unbundle(value) {
|
|
12642
|
+
if (value instanceof Number || value instanceof String || value instanceof Boolean) {
|
|
12643
|
+
return value.valueOf();
|
|
12644
|
+
} else {
|
|
12645
|
+
return value;
|
|
12646
|
+
}
|
|
12647
|
+
}
|
|
12648
|
+
function deepUnbundle(value) {
|
|
12649
|
+
if (Array.isArray(value)) {
|
|
12650
|
+
return value.map(deepUnbundle);
|
|
12651
|
+
} else if (value instanceof Object && !(value instanceof Number || value instanceof String || value instanceof Boolean)) {
|
|
12652
|
+
const unbundledValue = {};
|
|
12653
|
+
for (const key in value) {
|
|
12654
|
+
unbundledValue[key] = deepUnbundle(value[key]);
|
|
12655
|
+
}
|
|
12656
|
+
return unbundledValue;
|
|
12657
|
+
}
|
|
12658
|
+
return unbundle(value);
|
|
12659
|
+
}
|
|
12660
|
+
|
|
12641
12661
|
function isExpressionFilter(filter) {
|
|
12642
12662
|
if (filter === true || filter === false) {
|
|
12643
12663
|
return true;
|
|
@@ -12729,7 +12749,7 @@ function extractStaticFilter(filter) {
|
|
|
12729
12749
|
if (!isDynamicFilter(filter)) {
|
|
12730
12750
|
return filter;
|
|
12731
12751
|
}
|
|
12732
|
-
let result = filter
|
|
12752
|
+
let result = deepUnbundle(filter);
|
|
12733
12753
|
unionDynamicBranches(result);
|
|
12734
12754
|
result = collapseDynamicBooleanExpressions(result);
|
|
12735
12755
|
return result;
|
|
@@ -13658,26 +13678,6 @@ function validateConstants(options) {
|
|
|
13658
13678
|
}
|
|
13659
13679
|
}
|
|
13660
13680
|
|
|
13661
|
-
function unbundle(value) {
|
|
13662
|
-
if (value instanceof Number || value instanceof String || value instanceof Boolean) {
|
|
13663
|
-
return value.valueOf();
|
|
13664
|
-
} else {
|
|
13665
|
-
return value;
|
|
13666
|
-
}
|
|
13667
|
-
}
|
|
13668
|
-
function deepUnbundle(value) {
|
|
13669
|
-
if (Array.isArray(value)) {
|
|
13670
|
-
return value.map(deepUnbundle);
|
|
13671
|
-
} else if (value instanceof Object && !(value instanceof Number || value instanceof String || value instanceof Boolean)) {
|
|
13672
|
-
const unbundledValue = {};
|
|
13673
|
-
for (const key in value) {
|
|
13674
|
-
unbundledValue[key] = deepUnbundle(value[key]);
|
|
13675
|
-
}
|
|
13676
|
-
return unbundledValue;
|
|
13677
|
-
}
|
|
13678
|
-
return unbundle(value);
|
|
13679
|
-
}
|
|
13680
|
-
|
|
13681
13681
|
function validateObject(options) {
|
|
13682
13682
|
const key = options.key;
|
|
13683
13683
|
const object = options.value;
|