@mapbox/mapbox-gl-style-spec 14.5.2 → 14.6.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 CHANGED
@@ -1446,6 +1446,25 @@
1446
1446
  },
1447
1447
  "property-type": "data-constant",
1448
1448
  experimental: true
1449
+ },
1450
+ "clip-layer-scope": {
1451
+ type: "array",
1452
+ value: "string",
1453
+ "default": [
1454
+ ],
1455
+ doc: "Removes content from layers with the specified scope. By default all layers are affected. For example specifying `basemap` will only remove content from the Mapbox Standard style layers which have the same scope",
1456
+ "sdk-support": {
1457
+ "basic functionality": {
1458
+ js: "3.6.0",
1459
+ android: "11.7.0",
1460
+ ios: "11.7.0"
1461
+ }
1462
+ },
1463
+ expression: {
1464
+ interpolated: false
1465
+ },
1466
+ "property-type": "data-constant",
1467
+ experimental: true
1449
1468
  }
1450
1469
  };
1451
1470
  var layout_fill = {
@@ -5769,7 +5788,6 @@
5769
5788
  "default": 0,
5770
5789
  minimum: 0,
5771
5790
  maximum: 1,
5772
- experimental: true,
5773
5791
  doc: "Opacity multiplier (multiplies line-opacity value) of the line part that is occluded by 3D objects. Value 0 hides occluded part, value 1 means the same opacity as non-occluded part. The property is not supported when `line-opacity` has data-driven styling.",
5774
5792
  "sdk-support": {
5775
5793
  "basic functionality": {
@@ -5850,7 +5868,7 @@
5850
5868
  "circle-blur": {
5851
5869
  type: "number",
5852
5870
  "default": 0,
5853
- doc: "Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",
5871
+ 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
5872
  transition: true,
5855
5873
  "sdk-support": {
5856
5874
  "basic functionality": {
@@ -6311,11 +6329,11 @@
6311
6329
  "property-type": "data-driven"
6312
6330
  },
6313
6331
  "icon-occlusion-opacity": {
6314
- doc: "The opacity at which the icon will be drawn in case of being depth occluded. Not supported on globe zoom levels. Absent value means behavior prior to this property introduction.",
6332
+ doc: "The opacity at which the icon will be drawn in case of being depth occluded. Absent value means full occlusion against terrain only.",
6315
6333
  type: "number",
6316
6334
  minimum: 0,
6317
6335
  maximum: 1,
6318
- "default": 1,
6336
+ "default": 0,
6319
6337
  transition: true,
6320
6338
  requires: [
6321
6339
  "icon-image"
@@ -6661,10 +6679,10 @@
6661
6679
  },
6662
6680
  "text-occlusion-opacity": {
6663
6681
  type: "number",
6664
- doc: "The opacity at which the text will be drawn in case of being depth occluded. Not supported on globe zoom levels. Absent value means behavior prior to this property introduction.",
6682
+ doc: "The opacity at which the text will be drawn in case of being depth occluded. Absent value means full occlusion against terrain only.",
6665
6683
  minimum: 0,
6666
6684
  maximum: 1,
6667
- "default": 1,
6685
+ "default": 0,
6668
6686
  transition: true,
6669
6687
  requires: [
6670
6688
  "text-field"
@@ -8008,9 +8026,6 @@
8008
8026
  "default": true,
8009
8027
  doc: "Enable/Disable shadow casting for this layer",
8010
8028
  transition: false,
8011
- expression: {
8012
- interpolated: false
8013
- },
8014
8029
  "sdk-support": {
8015
8030
  "basic functionality": {
8016
8031
  js: "3.0.0",
@@ -8025,9 +8040,6 @@
8025
8040
  "default": true,
8026
8041
  doc: "Enable/Disable shadow receiving for this layer",
8027
8042
  transition: false,
8028
- expression: {
8029
- interpolated: false
8030
- },
8031
8043
  "sdk-support": {
8032
8044
  "basic functionality": {
8033
8045
  js: "3.0.0",
@@ -9089,6 +9101,57 @@
9089
9101
  ]
9090
9102
  },
9091
9103
  "property-type": "data-constant"
9104
+ },
9105
+ "fill-extrusion-line-width": {
9106
+ type: "number",
9107
+ "default": 0,
9108
+ minimum: 0,
9109
+ transition: true,
9110
+ units: "meters",
9111
+ doc: "If a non-zero value is provided, it sets the fill-extrusion layer into wall rendering mode. The value is used to render the feature with the given width over the outlines of the geometry. Note: This property is experimental and some other fill-extrusion properties might not be supported with non-zero line width.",
9112
+ "sdk-support": {
9113
+ "basic functionality": {
9114
+ js: "3.7.0"
9115
+ },
9116
+ "data-driven styling": {
9117
+ js: "3.7.0"
9118
+ }
9119
+ },
9120
+ expression: {
9121
+ interpolated: true,
9122
+ parameters: [
9123
+ "zoom",
9124
+ "feature",
9125
+ "feature-state",
9126
+ "measure-light"
9127
+ ]
9128
+ },
9129
+ "property-type": "data-driven"
9130
+ },
9131
+ "fill-extrusion-line-alignment": {
9132
+ type: "enum",
9133
+ values: {
9134
+ inside: {
9135
+ doc: "Aligns the wall inside of the outline."
9136
+ },
9137
+ outside: {
9138
+ doc: "Aligns the wall outside of the outline."
9139
+ },
9140
+ center: {
9141
+ doc: "Aligns the wall relative to the center of the outline."
9142
+ }
9143
+ },
9144
+ "default": "center",
9145
+ doc: "Specifies the alignment for offset of the walls relative to the outlines of the geometry. For open-ended line string geometries the positioning is considered based on the ordering of the points, where inside is in clockwise order and outside is counter-clockwise. This property only has an effect if a non-zero fill-extrusion-line-width is used. Center alignment is automatically used for non-closed lines.",
9146
+ requires: [
9147
+ "fill-extrusion-line-width"
9148
+ ],
9149
+ "sdk-support": {
9150
+ "basic functionality": {
9151
+ js: "3.7.0"
9152
+ }
9153
+ },
9154
+ "property-type": "data-constant"
9092
9155
  }
9093
9156
  },
9094
9157
  paint_line: paint_line,
@@ -9222,6 +9285,27 @@
9222
9285
  }
9223
9286
  },
9224
9287
  "property-type": "data-constant"
9288
+ },
9289
+ "raster-particle-elevation": {
9290
+ type: "number",
9291
+ doc: "Specifies an uniform elevation from the ground, in meters.",
9292
+ "default": 0,
9293
+ minimum: 0,
9294
+ transition: true,
9295
+ "sdk-support": {
9296
+ "basic functionality": {
9297
+ js: "3.7.0",
9298
+ android: "11.7.0",
9299
+ ios: "11.7.0"
9300
+ }
9301
+ },
9302
+ expression: {
9303
+ interpolated: true,
9304
+ parameters: [
9305
+ "zoom"
9306
+ ]
9307
+ },
9308
+ "property-type": "data-constant"
9225
9309
  }
9226
9310
  },
9227
9311
  paint_hillshade: paint_hillshade,
@@ -11307,7 +11391,7 @@
11307
11391
  if (!error) {
11308
11392
  return value;
11309
11393
  } 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.`);
11394
+ 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
11395
  }
11312
11396
  }
11313
11397
  return null;
@@ -13806,15 +13890,20 @@
13806
13890
  });
13807
13891
  return result;
13808
13892
  }
13809
- function isConfigConstant(e) {
13893
+ function getConfigDependencies(e) {
13810
13894
  if (e instanceof Config) {
13811
- return false;
13895
+ const singleConfig = /* @__PURE__ */
13896
+ new Set([e.key]);
13897
+ return singleConfig;
13812
13898
  }
13813
- let result = true;
13899
+ let result = /* @__PURE__ */
13900
+ new Set();
13814
13901
  e.eachChild(arg => {
13815
- if (result && !isConfigConstant(arg)) {
13816
- result = false;
13817
- }
13902
+ result = /* @__PURE__ */
13903
+ new Set([
13904
+ ...result,
13905
+ ...getConfigDependencies(arg)
13906
+ ]);
13818
13907
  });
13819
13908
  return result;
13820
13909
  }
@@ -16242,7 +16331,7 @@
16242
16331
  if (!this._warningHistory[e.message]) {
16243
16332
  this._warningHistory[e.message] = true;
16244
16333
  if (typeof console !== 'undefined') {
16245
- console.warn(e.message);
16334
+ console.warn(`Failed to evaluate expression "${ JSON.stringify(this.expression.serialize()) }". ${ e.message }`);
16246
16335
  }
16247
16336
  }
16248
16337
  return this._defaultValue;
@@ -16266,7 +16355,7 @@
16266
16355
  this._styleExpression = expression;
16267
16356
  this.isLightConstant = isLightConstant;
16268
16357
  this.isStateDependent = kind !== 'constant' && !isStateConstant(expression.expression);
16269
- this.isConfigDependent = !isConfigConstant(expression.expression);
16358
+ this.configDependencies = getConfigDependencies(expression.expression);
16270
16359
  }
16271
16360
  evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {
16272
16361
  return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);
@@ -16282,7 +16371,7 @@
16282
16371
  this._styleExpression = expression;
16283
16372
  this.isStateDependent = kind !== 'camera' && !isStateConstant(expression.expression);
16284
16373
  this.isLightConstant = isLightConstant;
16285
- this.isConfigDependent = !isConfigConstant(expression.expression);
16374
+ this.configDependencies = getConfigDependencies(expression.expression);
16286
16375
  this.interpolationType = interpolationType;
16287
16376
  }
16288
16377
  evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {
@@ -16372,7 +16461,8 @@
16372
16461
  }
16373
16462
  return {
16374
16463
  kind: 'constant',
16375
- isConfigDependent: false,
16464
+ configDependencies: /* @__PURE__ */
16465
+ new Set(),
16376
16466
  evaluate: () => constant
16377
16467
  };
16378
16468
  }
@@ -17201,8 +17291,7 @@ ${ JSON.stringify(filterExp, null, 2) }
17201
17291
  negate
17202
17292
  ];
17203
17293
  }
17204
- return [negate ? 'all' : 'any'].concat(// @ts-expect-error - TS2769 - No overload matches this call.
17205
- values.map(v => [
17294
+ return [negate ? 'all' : 'any'].concat(values.map(v => [
17206
17295
  negate ? '!=' : '==',
17207
17296
  get,
17208
17297
  v