@mapbox/mapbox-gl-style-spec 14.5.1 → 14.6.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/dist/index.cjs CHANGED
@@ -1221,13 +1221,13 @@
1221
1221
  },
1222
1222
  clip: {
1223
1223
  doc: "Layer that removes 3D content from map.",
1224
+ experimental: true,
1224
1225
  "sdk-support": {
1225
1226
  "basic functionality": {
1226
1227
  js: "3.5.0",
1227
- android: "11.5.0",
1228
- ios: "11.5.0"
1229
- },
1230
- experimental: true
1228
+ android: "11.6.0",
1229
+ ios: "11.6.0"
1230
+ }
1231
1231
  }
1232
1232
  }
1233
1233
  },
@@ -1437,8 +1437,8 @@
1437
1437
  "sdk-support": {
1438
1438
  "basic functionality": {
1439
1439
  js: "3.5.0",
1440
- android: "11.5.0",
1441
- ios: "11.5.0"
1440
+ android: "11.6.0",
1441
+ ios: "11.6.0"
1442
1442
  }
1443
1443
  },
1444
1444
  expression: {
@@ -5850,7 +5850,7 @@
5850
5850
  "circle-blur": {
5851
5851
  type: "number",
5852
5852
  "default": 0,
5853
- doc: "Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",
5853
+ doc: "Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity. Setting a negative value renders the blur as an inner glow effect.",
5854
5854
  transition: true,
5855
5855
  "sdk-support": {
5856
5856
  "basic functionality": {
@@ -11307,7 +11307,7 @@
11307
11307
  if (!error) {
11308
11308
  return value;
11309
11309
  } else if (i === this.args.length - 1) {
11310
- throw new RuntimeError(`Expected value to be of type ${ toString$1(this.type) }, but found ${ toString$1(typeOf(value)) } instead.`);
11310
+ throw new RuntimeError(`The expression ${ JSON.stringify(this.args[i].serialize()) } evaluated to ${ toString$1(typeOf(value)) } but was expected to be of type ${ toString$1(this.type) }.`);
11311
11311
  }
11312
11312
  }
11313
11313
  return null;
@@ -12982,7 +12982,7 @@
12982
12982
  };
12983
12983
 
12984
12984
  class TinyQueue {
12985
- constructor(data = [], compare = defaultCompare) {
12985
+ constructor(data = [], compare = (a, b) => a < b ? -1 : a > b ? 1 : 0) {
12986
12986
  this.data = data;
12987
12987
  this.length = this.data.length;
12988
12988
  this.compare = compare;
@@ -12993,16 +12993,14 @@
12993
12993
  }
12994
12994
  push(item) {
12995
12995
  this.data.push(item);
12996
- this.length++;
12997
- this._up(this.length - 1);
12996
+ this._up(this.length++);
12998
12997
  }
12999
12998
  pop() {
13000
12999
  if (this.length === 0)
13001
13000
  return undefined;
13002
13001
  const top = this.data[0];
13003
13002
  const bottom = this.data.pop();
13004
- this.length--;
13005
- if (this.length > 0) {
13003
+ if (--this.length > 0) {
13006
13004
  this.data[0] = bottom;
13007
13005
  this._down(0);
13008
13006
  }
@@ -13029,24 +13027,20 @@
13029
13027
  const halfLength = this.length >> 1;
13030
13028
  const item = data[pos];
13031
13029
  while (pos < halfLength) {
13032
- let left = (pos << 1) + 1;
13033
- let best = data[left];
13034
- const right = left + 1;
13035
- if (right < this.length && compare(data[right], best) < 0) {
13036
- left = right;
13037
- best = data[right];
13030
+ let bestChild = (pos << 1) + 1;
13031
+ // initially it is the left child
13032
+ const right = bestChild + 1;
13033
+ if (right < this.length && compare(data[right], data[bestChild]) < 0) {
13034
+ bestChild = right;
13038
13035
  }
13039
- if (compare(best, item) >= 0)
13036
+ if (compare(data[bestChild], item) >= 0)
13040
13037
  break;
13041
- data[pos] = best;
13042
- pos = left;
13038
+ data[pos] = data[bestChild];
13039
+ pos = bestChild;
13043
13040
  }
13044
13041
  data[pos] = item;
13045
13042
  }
13046
13043
  }
13047
- function defaultCompare(a, b) {
13048
- return a < b ? -1 : a > b ? 1 : 0;
13049
- }
13050
13044
 
13051
13045
  var EXTENT = 8192;
13052
13046
 
@@ -13812,15 +13806,20 @@
13812
13806
  });
13813
13807
  return result;
13814
13808
  }
13815
- function isConfigConstant(e) {
13809
+ function getConfigDependencies(e) {
13816
13810
  if (e instanceof Config) {
13817
- return false;
13811
+ const singleConfig = /* @__PURE__ */
13812
+ new Set([e.key]);
13813
+ return singleConfig;
13818
13814
  }
13819
- let result = true;
13815
+ let result = /* @__PURE__ */
13816
+ new Set();
13820
13817
  e.eachChild(arg => {
13821
- if (result && !isConfigConstant(arg)) {
13822
- result = false;
13823
- }
13818
+ result = /* @__PURE__ */
13819
+ new Set([
13820
+ ...result,
13821
+ ...getConfigDependencies(arg)
13822
+ ]);
13824
13823
  });
13825
13824
  return result;
13826
13825
  }
@@ -16248,7 +16247,7 @@
16248
16247
  if (!this._warningHistory[e.message]) {
16249
16248
  this._warningHistory[e.message] = true;
16250
16249
  if (typeof console !== 'undefined') {
16251
- console.warn(e.message);
16250
+ console.warn(`Failed to evaluate expression "${ JSON.stringify(this.expression.serialize()) }". ${ e.message }`);
16252
16251
  }
16253
16252
  }
16254
16253
  return this._defaultValue;
@@ -16272,7 +16271,7 @@
16272
16271
  this._styleExpression = expression;
16273
16272
  this.isLightConstant = isLightConstant;
16274
16273
  this.isStateDependent = kind !== 'constant' && !isStateConstant(expression.expression);
16275
- this.isConfigDependent = !isConfigConstant(expression.expression);
16274
+ this.configDependencies = getConfigDependencies(expression.expression);
16276
16275
  }
16277
16276
  evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {
16278
16277
  return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);
@@ -16288,7 +16287,7 @@
16288
16287
  this._styleExpression = expression;
16289
16288
  this.isStateDependent = kind !== 'camera' && !isStateConstant(expression.expression);
16290
16289
  this.isLightConstant = isLightConstant;
16291
- this.isConfigDependent = !isConfigConstant(expression.expression);
16290
+ this.configDependencies = getConfigDependencies(expression.expression);
16292
16291
  this.interpolationType = interpolationType;
16293
16292
  }
16294
16293
  evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {
@@ -16378,7 +16377,8 @@
16378
16377
  }
16379
16378
  return {
16380
16379
  kind: 'constant',
16381
- isConfigDependent: false,
16380
+ configDependencies: /* @__PURE__ */
16381
+ new Set(),
16382
16382
  evaluate: () => constant
16383
16383
  };
16384
16384
  }
@@ -17207,8 +17207,7 @@ ${ JSON.stringify(filterExp, null, 2) }
17207
17207
  negate
17208
17208
  ];
17209
17209
  }
17210
- return [negate ? 'all' : 'any'].concat(// @ts-expect-error - TS2769 - No overload matches this call.
17211
- values.map(v => [
17210
+ return [negate ? 'all' : 'any'].concat(values.map(v => [
17212
17211
  negate ? '!=' : '==',
17213
17212
  get,
17214
17213
  v