@mapbox/mapbox-gl-style-spec 14.5.2 → 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
@@ -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;
@@ -13806,15 +13806,20 @@
13806
13806
  });
13807
13807
  return result;
13808
13808
  }
13809
- function isConfigConstant(e) {
13809
+ function getConfigDependencies(e) {
13810
13810
  if (e instanceof Config) {
13811
- return false;
13811
+ const singleConfig = /* @__PURE__ */
13812
+ new Set([e.key]);
13813
+ return singleConfig;
13812
13814
  }
13813
- let result = true;
13815
+ let result = /* @__PURE__ */
13816
+ new Set();
13814
13817
  e.eachChild(arg => {
13815
- if (result && !isConfigConstant(arg)) {
13816
- result = false;
13817
- }
13818
+ result = /* @__PURE__ */
13819
+ new Set([
13820
+ ...result,
13821
+ ...getConfigDependencies(arg)
13822
+ ]);
13818
13823
  });
13819
13824
  return result;
13820
13825
  }
@@ -16242,7 +16247,7 @@
16242
16247
  if (!this._warningHistory[e.message]) {
16243
16248
  this._warningHistory[e.message] = true;
16244
16249
  if (typeof console !== 'undefined') {
16245
- console.warn(e.message);
16250
+ console.warn(`Failed to evaluate expression "${ JSON.stringify(this.expression.serialize()) }". ${ e.message }`);
16246
16251
  }
16247
16252
  }
16248
16253
  return this._defaultValue;
@@ -16266,7 +16271,7 @@
16266
16271
  this._styleExpression = expression;
16267
16272
  this.isLightConstant = isLightConstant;
16268
16273
  this.isStateDependent = kind !== 'constant' && !isStateConstant(expression.expression);
16269
- this.isConfigDependent = !isConfigConstant(expression.expression);
16274
+ this.configDependencies = getConfigDependencies(expression.expression);
16270
16275
  }
16271
16276
  evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {
16272
16277
  return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);
@@ -16282,7 +16287,7 @@
16282
16287
  this._styleExpression = expression;
16283
16288
  this.isStateDependent = kind !== 'camera' && !isStateConstant(expression.expression);
16284
16289
  this.isLightConstant = isLightConstant;
16285
- this.isConfigDependent = !isConfigConstant(expression.expression);
16290
+ this.configDependencies = getConfigDependencies(expression.expression);
16286
16291
  this.interpolationType = interpolationType;
16287
16292
  }
16288
16293
  evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {
@@ -16372,7 +16377,8 @@
16372
16377
  }
16373
16378
  return {
16374
16379
  kind: 'constant',
16375
- isConfigDependent: false,
16380
+ configDependencies: /* @__PURE__ */
16381
+ new Set(),
16376
16382
  evaluate: () => constant
16377
16383
  };
16378
16384
  }
@@ -17201,8 +17207,7 @@ ${ JSON.stringify(filterExp, null, 2) }
17201
17207
  negate
17202
17208
  ];
17203
17209
  }
17204
- return [negate ? 'all' : 'any'].concat(// @ts-expect-error - TS2769 - No overload matches this call.
17205
- values.map(v => [
17210
+ return [negate ? 'all' : 'any'].concat(values.map(v => [
17206
17211
  negate ? '!=' : '==',
17207
17212
  get,
17208
17213
  v