@mapbox/mapbox-gl-style-spec 14.0.0-beta.2 → 14.0.0-beta.3

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
@@ -1729,6 +1729,37 @@ var layout_symbol = {
1729
1729
  },
1730
1730
  "property-type": "data-constant"
1731
1731
  },
1732
+ "symbol-z-elevate": {
1733
+ type: "boolean",
1734
+ "default": false,
1735
+ doc: "Position symbol on buildings (both fill extrusions and models) roof tops. In order to have minimal impact on performance, this is supported only when `fill-extrusion-height` is not zoom-dependent and not edited after initial bucket creation. For fading in buildings when zooming in, fill-extrusion-vertical-scale should be used and symbols would raise with building roofs. Symbols are sorted by elevation, except in case when `viewport-y` sorting or `symbol-sort-key` are applied.",
1736
+ "sdk-support": {
1737
+ "basic functionality": {
1738
+ js: "3.0.0",
1739
+ android: "11.0.0",
1740
+ ios: "11.0.0"
1741
+ }
1742
+ },
1743
+ requires: [
1744
+ {
1745
+ "symbol-placement": [
1746
+ "point"
1747
+ ]
1748
+ },
1749
+ {
1750
+ "symbol-z-order": [
1751
+ "auto"
1752
+ ]
1753
+ }
1754
+ ],
1755
+ expression: {
1756
+ interpolated: false,
1757
+ parameters: [
1758
+ "zoom"
1759
+ ]
1760
+ },
1761
+ "property-type": "data-constant"
1762
+ },
1732
1763
  "icon-allow-overlap": {
1733
1764
  type: "boolean",
1734
1765
  "default": false,
@@ -4570,6 +4601,34 @@ var fog = {
4570
4601
  ios: "10.6.0"
4571
4602
  }
4572
4603
  }
4604
+ },
4605
+ "vertical-range": {
4606
+ type: "array",
4607
+ "default": [
4608
+ 0,
4609
+ 0
4610
+ ],
4611
+ minimum: 0,
4612
+ length: 2,
4613
+ value: "number",
4614
+ "property-type": "data-constant",
4615
+ transition: true,
4616
+ expression: {
4617
+ interpolated: true,
4618
+ parameters: [
4619
+ "zoom",
4620
+ "measure-light"
4621
+ ],
4622
+ relaxZoomRestriction: true
4623
+ },
4624
+ doc: "Specify the vertical range, measured in meters, over which the fog should gradually fade out. When both parameters are set to zero, the fog will be rendered without any vertical constraints.",
4625
+ "sdk-support": {
4626
+ "basic functionality": {
4627
+ js: "3.0.0",
4628
+ android: "11.0.0",
4629
+ ios: "11.0.0"
4630
+ }
4631
+ }
4573
4632
  }
4574
4633
  };
4575
4634
  var camera = {
@@ -5085,7 +5144,7 @@ var paint_fill = {
5085
5144
  minimum: 0,
5086
5145
  transition: true,
5087
5146
  units: "intensity",
5088
- doc: "Emission strength",
5147
+ doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
5089
5148
  "sdk-support": {
5090
5149
  "basic functionality": {
5091
5150
  js: "3.0.0",
@@ -5417,7 +5476,28 @@ var paint_line = {
5417
5476
  },
5418
5477
  "line-gradient": {
5419
5478
  type: "color",
5420
- doc: "Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\"lineMetrics\": true`.",
5479
+ doc: "A gradient used to color a line feature at various distances along its length. Defined using a `step` or `interpolate` expression which outputs a color for each corresponding `line-progress` input value. `line-progress` is a percentage of the line feature's total length as measured on the webmercator projected coordinate plane (a `number` between `0` and `1`). Can only be used with GeoJSON sources that specify `\"lineMetrics\": true`.",
5480
+ example: [
5481
+ "interpolate",
5482
+ [
5483
+ "linear"
5484
+ ],
5485
+ [
5486
+ "line-progress"
5487
+ ],
5488
+ 0,
5489
+ "blue",
5490
+ 0.1,
5491
+ "royalblue",
5492
+ 0.3,
5493
+ "cyan",
5494
+ 0.5,
5495
+ "lime",
5496
+ 0.7,
5497
+ "yellow",
5498
+ 1,
5499
+ "red"
5500
+ ],
5421
5501
  transition: false,
5422
5502
  requires: [
5423
5503
  {
@@ -5490,7 +5570,7 @@ var paint_line = {
5490
5570
  minimum: 0,
5491
5571
  transition: true,
5492
5572
  units: "intensity",
5493
- doc: "Emission strength",
5573
+ doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
5494
5574
  "sdk-support": {
5495
5575
  "basic functionality": {
5496
5576
  js: "3.0.0",
@@ -5904,7 +5984,7 @@ var paint_circle = {
5904
5984
  minimum: 0,
5905
5985
  transition: true,
5906
5986
  units: "intensity",
5907
- doc: "Emission strength",
5987
+ doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
5908
5988
  "sdk-support": {
5909
5989
  "basic functionality": {
5910
5990
  js: "3.0.0",
@@ -6117,7 +6197,7 @@ var paint_symbol = {
6117
6197
  minimum: 0,
6118
6198
  transition: true,
6119
6199
  units: "intensity",
6120
- doc: "Emission strength",
6200
+ doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
6121
6201
  "sdk-support": {
6122
6202
  "basic functionality": {
6123
6203
  js: "3.0.0",
@@ -6145,7 +6225,7 @@ var paint_symbol = {
6145
6225
  minimum: 0,
6146
6226
  transition: true,
6147
6227
  units: "intensity",
6148
- doc: "Emission strength",
6228
+ doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
6149
6229
  "sdk-support": {
6150
6230
  "basic functionality": {
6151
6231
  js: "3.0.0",
@@ -6687,6 +6767,9 @@ var paint_raster = {
6687
6767
  value: "number",
6688
6768
  "property-type": "data-constant",
6689
6769
  transition: true,
6770
+ requires: [
6771
+ "raster-color"
6772
+ ],
6690
6773
  expression: {
6691
6774
  interpolated: true,
6692
6775
  parameters: [
@@ -6718,6 +6801,9 @@ var paint_raster = {
6718
6801
  value: "number",
6719
6802
  "property-type": "data-constant",
6720
6803
  transition: true,
6804
+ requires: [
6805
+ "raster-color"
6806
+ ],
6721
6807
  expression: {
6722
6808
  interpolated: true,
6723
6809
  parameters: [
@@ -7119,7 +7205,7 @@ var paint_background = {
7119
7205
  minimum: 0,
7120
7206
  transition: true,
7121
7207
  units: "intensity",
7122
- doc: "Emission strength",
7208
+ doc: "Controls the intensity of light emitted on the source features. This property works only with 3D light, i.e. when `lights` root property is defined.",
7123
7209
  "sdk-support": {
7124
7210
  "basic functionality": {
7125
7211
  js: "3.0.0",
@@ -7734,6 +7820,25 @@ var paint_model = {
7734
7820
  }
7735
7821
  },
7736
7822
  transition: true
7823
+ },
7824
+ "model-cutoff-fade-range": {
7825
+ type: "number",
7826
+ "default": 0,
7827
+ minimum: 0,
7828
+ maximum: 1,
7829
+ doc: "This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled.",
7830
+ transition: false,
7831
+ expression: {
7832
+ interpolated: false
7833
+ },
7834
+ "sdk-support": {
7835
+ "basic functionality": {
7836
+ js: "3.0.0",
7837
+ android: "11.0.0",
7838
+ ios: "11.0.0"
7839
+ }
7840
+ },
7841
+ "property-type": "data-constant"
7737
7842
  }
7738
7843
  };
7739
7844
  var transition = {
@@ -8522,6 +8627,25 @@ var v8 = {
8522
8627
  "zoom"
8523
8628
  ]
8524
8629
  }
8630
+ },
8631
+ "fill-extrusion-cutoff-fade-range": {
8632
+ type: "number",
8633
+ "default": 0,
8634
+ minimum: 0,
8635
+ maximum: 1,
8636
+ doc: "This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled.",
8637
+ transition: false,
8638
+ expression: {
8639
+ interpolated: false
8640
+ },
8641
+ "sdk-support": {
8642
+ "basic functionality": {
8643
+ js: "3.0.0",
8644
+ android: "11.0.0",
8645
+ ios: "11.0.0"
8646
+ }
8647
+ },
8648
+ "property-type": "data-constant"
8525
8649
  }
8526
8650
  },
8527
8651
  paint_line: paint_line,
@@ -18423,7 +18547,15 @@ const operations = {
18423
18547
  /*
18424
18548
  * { command: 'setProjection', args: [projectionProperties] }
18425
18549
  */
18426
- setProjection: 'setProjection'
18550
+ setProjection: 'setProjection',
18551
+ /*
18552
+ * { command: 'addImport', args: [importProperties] }
18553
+ */
18554
+ addImport: 'addImport',
18555
+ /*
18556
+ * { command: 'removeImport', args: [importId] }
18557
+ */
18558
+ removeImport: 'removeImport'
18427
18559
  };
18428
18560
  function addSource(sourceId, after, commands) {
18429
18561
  commands.push({
@@ -18686,6 +18818,21 @@ function diffLayers(before, after, commands) {
18686
18818
  }
18687
18819
  }
18688
18820
  }
18821
+ function diffImports(before = [], after = [], commands) {
18822
+ // no diff for the imports, must remove then add
18823
+ for (const beforeImport of before) {
18824
+ commands.push({
18825
+ command: operations.removeImport,
18826
+ args: [beforeImport.id]
18827
+ });
18828
+ }
18829
+ for (const afterImport of after) {
18830
+ commands.push({
18831
+ command: operations.addImport,
18832
+ args: [afterImport]
18833
+ });
18834
+ }
18835
+ }
18689
18836
  /**
18690
18837
  * Diff two stylesheet
18691
18838
  *
@@ -18838,6 +18985,8 @@ function diffStyles(before, after) {
18838
18985
  }
18839
18986
  // Handle changes to `layers`
18840
18987
  diffLayers(beforeLayers, after.layers, commands);
18988
+ // Handle changes to `imports`
18989
+ diffImports(before.imports, after.imports, commands);
18841
18990
  } catch (e) {
18842
18991
  // fall back to setStyle
18843
18992
  console.warn('Unable to compute style diff:', e);