@mapbox/mapbox-gl-style-spec 14.0.0 → 14.1.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/diff.js CHANGED
@@ -462,7 +462,7 @@ export function diffImports(before: Array<ImportSpecification> = [], after: Arra
462
462
  export default function diffStyles(before: StyleSpecification, after: StyleSpecification): Array<Command> {
463
463
  if (!before) return [{command: operations.setStyle, args: [after]}];
464
464
 
465
- let commands = [];
465
+ let commands: Array<Command> = [];
466
466
 
467
467
  try {
468
468
  // Handle changes to top-level properties
@@ -487,6 +487,10 @@ export default function diffStyles(before: StyleSpecification, after: StyleSpeci
487
487
  if (!isEqual(before.glyphs, after.glyphs)) {
488
488
  commands.push({command: operations.setGlyphs, args: [after.glyphs]});
489
489
  }
490
+ // Handle changes to `imports` before other mergable top-level properties
491
+ if (!isEqual(before.imports, after.imports)) {
492
+ diffImports(before.imports, after.imports, commands);
493
+ }
490
494
  if (!isEqual(before.transition, after.transition)) {
491
495
  commands.push({command: operations.setTransition, args: [after.transition]});
492
496
  }
@@ -550,9 +554,6 @@ export default function diffStyles(before: StyleSpecification, after: StyleSpeci
550
554
 
551
555
  // Handle changes to `layers`
552
556
  diffLayers(beforeLayers, after.layers, commands);
553
-
554
- // Handle changes to `imports`
555
- diffImports(before.imports, after.imports, commands);
556
557
  } catch (e) {
557
558
  // fall back to setStyle
558
559
  console.warn('Unable to compute style diff:', e);
package/dist/index.cjs CHANGED
@@ -570,6 +570,7 @@
570
570
  "source_vector",
571
571
  "source_raster",
572
572
  "source_raster_dem",
573
+ "source_raster_array",
573
574
  "source_geojson",
574
575
  "source_video",
575
576
  "source_image",
@@ -816,6 +817,67 @@
816
817
  doc: "Other keys to configure the data source."
817
818
  }
818
819
  };
820
+ var source_raster_array = {
821
+ type: {
822
+ required: true,
823
+ type: "enum",
824
+ values: {
825
+ "raster-array": {
826
+ doc: "A raster array source"
827
+ }
828
+ },
829
+ doc: "The type of the source."
830
+ },
831
+ url: {
832
+ type: "string",
833
+ doc: "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."
834
+ },
835
+ tiles: {
836
+ type: "array",
837
+ value: "string",
838
+ doc: "An array of one or more tile source URLs, as in the TileJSON spec."
839
+ },
840
+ bounds: {
841
+ type: "array",
842
+ value: "number",
843
+ length: 4,
844
+ "default": [
845
+ -180,
846
+ -85.051129,
847
+ 180,
848
+ 85.051129
849
+ ],
850
+ doc: "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."
851
+ },
852
+ minzoom: {
853
+ type: "number",
854
+ "default": 0,
855
+ doc: "Minimum zoom level for which tiles are available, as in the TileJSON spec."
856
+ },
857
+ maxzoom: {
858
+ type: "number",
859
+ "default": 22,
860
+ doc: "Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."
861
+ },
862
+ tileSize: {
863
+ type: "number",
864
+ "default": 512,
865
+ units: "pixels",
866
+ doc: "The minimum visual size to display tiles for this layer. Only configurable for raster layers."
867
+ },
868
+ attribution: {
869
+ type: "string",
870
+ doc: "Contains an attribution to be displayed when the map is shown to a user."
871
+ },
872
+ rasterLayers: {
873
+ type: "*",
874
+ doc: "Contains the description of the raster data layers and the bands contained within the tiles."
875
+ },
876
+ "*": {
877
+ type: "*",
878
+ doc: "Other keys to configure the data source."
879
+ }
880
+ };
819
881
  var source_geojson = {
820
882
  type: {
821
883
  required: true,
@@ -7063,6 +7125,66 @@
7063
7125
  ]
7064
7126
  },
7065
7127
  "property-type": "data-constant"
7128
+ },
7129
+ "raster-emissive-strength": {
7130
+ type: "number",
7131
+ "default": 0,
7132
+ minimum: 0,
7133
+ transition: true,
7134
+ units: "intensity",
7135
+ doc: "Controls the intensity of light emitted on the source features.",
7136
+ requires: [
7137
+ "lights"
7138
+ ],
7139
+ "sdk-support": {
7140
+ "basic functionality": {
7141
+ js: "3.0.0",
7142
+ android: "11.0.0",
7143
+ ios: "11.0.0"
7144
+ }
7145
+ },
7146
+ expression: {
7147
+ interpolated: true,
7148
+ parameters: [
7149
+ "zoom",
7150
+ "measure-light"
7151
+ ]
7152
+ },
7153
+ "property-type": "data-constant"
7154
+ },
7155
+ "raster-array-band": {
7156
+ type: "string",
7157
+ required: false,
7158
+ "property-type": "data-constant",
7159
+ transition: false,
7160
+ doc: "Displayed band of raster array source layer",
7161
+ example: "band-name",
7162
+ "sdk-support": {
7163
+ "basic functionality": {
7164
+ js: "3.1.0",
7165
+ android: "11.1.0",
7166
+ ios: "11.1.0"
7167
+ }
7168
+ }
7169
+ },
7170
+ "raster-elevation": {
7171
+ type: "number",
7172
+ doc: "Specifies an uniform elevation from the ground, in meters. Only supported with image sources.",
7173
+ "default": 0,
7174
+ minimum: 0,
7175
+ transition: true,
7176
+ "sdk-support": {
7177
+ "basic functionality": {
7178
+ js: "3.1.0"
7179
+ }
7180
+ },
7181
+ expression: {
7182
+ interpolated: true,
7183
+ parameters: [
7184
+ "zoom"
7185
+ ]
7186
+ },
7187
+ "property-type": "data-constant"
7066
7188
  }
7067
7189
  };
7068
7190
  var paint_hillshade = {
@@ -8057,6 +8179,7 @@
8057
8179
  source_vector: source_vector,
8058
8180
  source_raster: source_raster,
8059
8181
  source_raster_dem: source_raster_dem,
8182
+ source_raster_array: source_raster_array,
8060
8183
  source_geojson: source_geojson,
8061
8184
  source_video: source_video,
8062
8185
  source_image: source_image,
@@ -8809,6 +8932,32 @@
8809
8932
  }
8810
8933
  },
8811
8934
  "property-type": "data-constant"
8935
+ },
8936
+ "fill-extrusion-emissive-strength": {
8937
+ type: "number",
8938
+ "default": 0,
8939
+ minimum: 0,
8940
+ transition: true,
8941
+ units: "intensity",
8942
+ doc: "Controls the intensity of light emitted on the source features.",
8943
+ requires: [
8944
+ "lights"
8945
+ ],
8946
+ "sdk-support": {
8947
+ "basic functionality": {
8948
+ js: "3.0.0",
8949
+ android: "11.0.0",
8950
+ ios: "11.0.0"
8951
+ }
8952
+ },
8953
+ expression: {
8954
+ interpolated: true,
8955
+ parameters: [
8956
+ "zoom",
8957
+ "measure-light"
8958
+ ]
8959
+ },
8960
+ "property-type": "data-constant"
8812
8961
  }
8813
8962
  },
8814
8963
  paint_line: paint_line,
@@ -19165,6 +19314,10 @@ ${ JSON.stringify(filterExp, null, 2) }
19165
19314
  args: [after.glyphs]
19166
19315
  });
19167
19316
  }
19317
+ // Handle changes to `imports` before other mergable top-level properties
19318
+ if (!deepEqual(before.imports, after.imports)) {
19319
+ diffImports(before.imports, after.imports, commands);
19320
+ }
19168
19321
  if (!deepEqual(before.transition, after.transition)) {
19169
19322
  commands.push({
19170
19323
  command: operations.setTransition,
@@ -19248,8 +19401,6 @@ ${ JSON.stringify(filterExp, null, 2) }
19248
19401
  }
19249
19402
  // Handle changes to `layers`
19250
19403
  diffLayers(beforeLayers, after.layers, commands);
19251
- // Handle changes to `imports`
19252
- diffImports(before.imports, after.imports, commands);
19253
19404
  } catch (e) {
19254
19405
  // fall back to setStyle
19255
19406
  console.warn('Unable to compute style diff:', e);