@mapbox/mapbox-gl-style-spec 13.25.0 → 13.26.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.es.js CHANGED
@@ -2971,7 +2971,7 @@ var expression_name = {
2971
2971
  }
2972
2972
  },
2973
2973
  "number-format": {
2974
- doc: "Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",
2974
+ doc: "Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `unit` argument specifies a [simple ECMAScript unit](https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier) to use for unit-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",
2975
2975
  group: "Types",
2976
2976
  "sdk-support": {
2977
2977
  "basic functionality": {
@@ -3661,7 +3661,9 @@ var expression_name = {
3661
3661
  "sdk-support": {
3662
3662
  "basic functionality": {
3663
3663
  js: "0.45.0",
3664
- android: "6.6.0"
3664
+ android: "6.6.0",
3665
+ ios: "4.1.0",
3666
+ macos: "0.8.0"
3665
3667
  }
3666
3668
  }
3667
3669
  },
@@ -6388,6 +6390,20 @@ var v8 = {
6388
6390
  }
6389
6391
  },
6390
6392
  "property-type": "constant"
6393
+ },
6394
+ "fill-extrusion-edge-radius": {
6395
+ type: "number",
6396
+ "private": true,
6397
+ "default": 0,
6398
+ minimum: 0,
6399
+ maximum: 1,
6400
+ doc: "Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.",
6401
+ "sdk-support": {
6402
+ "basic functionality": {
6403
+ js: "v2.10.0"
6404
+ }
6405
+ },
6406
+ "property-type": "constant"
6391
6407
  }
6392
6408
  },
6393
6409
  layout_line: layout_line,
@@ -6715,6 +6731,51 @@ var v8 = {
6715
6731
  ]
6716
6732
  },
6717
6733
  "property-type": "data-constant"
6734
+ },
6735
+ "fill-extrusion-ambient-occlusion-intensity": {
6736
+ "property-type": "data-constant",
6737
+ type: "number",
6738
+ "private": true,
6739
+ "default": 0,
6740
+ minimum: 0,
6741
+ maximum: 1,
6742
+ expression: {
6743
+ interpolated: true,
6744
+ parameters: [
6745
+ "zoom"
6746
+ ]
6747
+ },
6748
+ transition: true,
6749
+ doc: "Controls the intensity of ambient occlusion (AO) shading. Current AO implementation is a low-cost best-effort approach that shades area near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.",
6750
+ "sdk-support": {
6751
+ "basic functionality": {
6752
+ js: "2.10.0",
6753
+ android: "10.7.0",
6754
+ ios: "10.7.0"
6755
+ }
6756
+ }
6757
+ },
6758
+ "fill-extrusion-ambient-occlusion-radius": {
6759
+ "property-type": "data-constant",
6760
+ type: "number",
6761
+ "private": true,
6762
+ "default": 3,
6763
+ minimum: 0,
6764
+ expression: {
6765
+ interpolated: true,
6766
+ parameters: [
6767
+ "zoom"
6768
+ ]
6769
+ },
6770
+ transition: true,
6771
+ doc: "The radius of ambient occlusion (AO) shading, in meters. Current AO implementation is a low-cost best-effort approach that shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to hight of one floor and brings the most plausible results for buildings.",
6772
+ "sdk-support": {
6773
+ "basic functionality": {
6774
+ js: "2.10.0",
6775
+ android: "10.7.0",
6776
+ ios: "10.7.0"
6777
+ }
6778
+ }
6718
6779
  }
6719
6780
  },
6720
6781
  paint_line: paint_line,
@@ -9463,7 +9524,7 @@ class EvaluationContext {
9463
9524
  this.featureDistanceData = null;
9464
9525
  }
9465
9526
  id() {
9466
- return this.feature && 'id' in this.feature && this.feature.id ? this.feature.id : null;
9527
+ return this.feature && this.feature.id !== undefined ? this.feature.id : null;
9467
9528
  }
9468
9529
  geometryType() {
9469
9530
  return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;
@@ -11397,11 +11458,12 @@ const LessThanOrEqual = makeComparison('<=', lteq, lteqCollate);
11397
11458
  const GreaterThanOrEqual = makeComparison('>=', gteq, gteqCollate);
11398
11459
 
11399
11460
  class NumberFormat {
11400
- constructor(number, locale, currency, minFractionDigits, maxFractionDigits) {
11461
+ constructor(number, locale, currency, unit, minFractionDigits, maxFractionDigits) {
11401
11462
  this.type = StringType;
11402
11463
  this.number = number;
11403
11464
  this.locale = locale;
11404
11465
  this.currency = currency;
11466
+ this.unit = unit;
11405
11467
  this.minFractionDigits = minFractionDigits;
11406
11468
  this.maxFractionDigits = maxFractionDigits;
11407
11469
  }
@@ -11426,6 +11488,12 @@ class NumberFormat {
11426
11488
  if (!currency)
11427
11489
  return null;
11428
11490
  }
11491
+ let unit = null;
11492
+ if (options['unit']) {
11493
+ unit = context.parse(options['unit'], 1, StringType);
11494
+ if (!unit)
11495
+ return null;
11496
+ }
11429
11497
  let minFractionDigits = null;
11430
11498
  if (options['min-fraction-digits']) {
11431
11499
  minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);
@@ -11438,12 +11506,13 @@ class NumberFormat {
11438
11506
  if (!maxFractionDigits)
11439
11507
  return null;
11440
11508
  }
11441
- return new NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits);
11509
+ return new NumberFormat(number, locale, currency, unit, minFractionDigits, maxFractionDigits);
11442
11510
  }
11443
11511
  evaluate(ctx) {
11444
11512
  return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [], {
11445
- style: this.currency ? 'currency' : 'decimal',
11513
+ style: this.currency && 'currency' || this.unit && 'unit' || 'decimal',
11446
11514
  currency: this.currency ? this.currency.evaluate(ctx) : undefined,
11515
+ unit: this.unit ? this.unit.evaluate(ctx) : undefined,
11447
11516
  minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(ctx) : undefined,
11448
11517
  maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : undefined
11449
11518
  }).format(this.number.evaluate(ctx));
@@ -11456,6 +11525,9 @@ class NumberFormat {
11456
11525
  if (this.currency) {
11457
11526
  fn(this.currency);
11458
11527
  }
11528
+ if (this.unit) {
11529
+ fn(this.unit);
11530
+ }
11459
11531
  if (this.minFractionDigits) {
11460
11532
  fn(this.minFractionDigits);
11461
11533
  }
@@ -11474,6 +11546,9 @@ class NumberFormat {
11474
11546
  if (this.currency) {
11475
11547
  options['currency'] = this.currency.serialize();
11476
11548
  }
11549
+ if (this.unit) {
11550
+ options['unit'] = this.unit.serialize();
11551
+ }
11477
11552
  if (this.minFractionDigits) {
11478
11553
  options['min-fraction-digits'] = this.minFractionDigits.serialize();
11479
11554
  }