@mapbox/mapbox-gl-style-spec 14.30.0 → 14.31.0-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapbox/mapbox-gl-style-spec",
3
- "version": "14.30.0",
3
+ "version": "14.31.0-rc.1",
4
4
  "description": "a specification for mapbox gl styles",
5
5
  "author": "Mapbox",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
package/reference/v8.json CHANGED
@@ -1647,6 +1647,14 @@
1647
1647
  }
1648
1648
  }
1649
1649
  },
1650
+ "placement-group": {
1651
+ "doc": "Marks a placement priority group relative to other layers, going from lower to higher priority. Symbols from groups with higher priorities will be placed first",
1652
+ "sdk-support": {
1653
+ "basic functionality": {}
1654
+ },
1655
+ "private": true,
1656
+ "experimental": true
1657
+ },
1650
1658
  "clip": {
1651
1659
  "doc": "Layer that removes 3D content from map.",
1652
1660
  "sdk-support": {
@@ -1667,7 +1675,7 @@
1667
1675
  },
1668
1676
  "source": {
1669
1677
  "type": "string",
1670
- "doc": "Name of a source description to be used for this layer. Required for all layer types except `background` and `slot`."
1678
+ "doc": "Name of a source description to be used for this layer. Required for all layer types except `background`, `slot`, and `placement-group`."
1671
1679
  },
1672
1680
  "source-layer": {
1673
1681
  "type": "string",
@@ -10316,6 +10324,56 @@
10316
10324
  ]
10317
10325
  },
10318
10326
  "property-type": "data-driven"
10327
+ },
10328
+ "placement-priority": {
10329
+ "type": "number",
10330
+ "doc": "In-group placement priority. Higher values are placed first within the symbol's placement group.",
10331
+ "default": 0,
10332
+ "minimum": 0,
10333
+ "transition": false,
10334
+ "appearance": true,
10335
+ "expression": {
10336
+ "interpolated": true,
10337
+ "parameters": [
10338
+ "zoom",
10339
+ "pitch",
10340
+ "feature",
10341
+ "feature-state",
10342
+ "measure-light",
10343
+ "distance-from-center"
10344
+ ]
10345
+ },
10346
+ "property-type": "data-driven",
10347
+ "sdk-support": {
10348
+ "basic functionality": {},
10349
+ "data-driven styling": {}
10350
+ },
10351
+ "private": true,
10352
+ "experimental": true
10353
+ },
10354
+ "placement-group": {
10355
+ "type": "string",
10356
+ "doc": "Assigns this symbol layer to the specified placement-group layer, placing its symbols as if they were drawn within that group. When unset, the layer's symbols use an implicitly created placement group located at the same position as the symbol layer.",
10357
+ "transition": false,
10358
+ "appearance": true,
10359
+ "expression": {
10360
+ "interpolated": false,
10361
+ "parameters": [
10362
+ "zoom",
10363
+ "pitch",
10364
+ "feature",
10365
+ "feature-state",
10366
+ "measure-light",
10367
+ "distance-from-center"
10368
+ ]
10369
+ },
10370
+ "property-type": "data-driven",
10371
+ "sdk-support": {
10372
+ "basic functionality": {},
10373
+ "data-driven styling": {}
10374
+ },
10375
+ "private": true,
10376
+ "experimental": true
10319
10377
  }
10320
10378
  },
10321
10379
  "paint_raster": {
@@ -10709,21 +10767,6 @@
10709
10767
  "interpolated": false
10710
10768
  },
10711
10769
  "property-type": "data-constant"
10712
- },
10713
- "raster-allow-draping": {
10714
- "type": "boolean",
10715
- "default": true,
10716
- "experimental": true,
10717
- "doc": "Whether the raster layer is allowed to drape over terrain and globe. When disabled, the layer is rendered after all draped layers, which can change its position in the layer order. Disabling draping has a performance cost, since the terrain/globe geometry must be rendered again for each such layer.",
10718
- "transition": false,
10719
- "property-type": "data-constant",
10720
- "sdk-support": {
10721
- "basic functionality": {
10722
- "js": "3.28.0",
10723
- "android": "11.28.0",
10724
- "ios": "11.28.0"
10725
- }
10726
- }
10727
10770
  }
10728
10771
  },
10729
10772
  "paint_raster-particle": {
package/types.ts CHANGED
@@ -904,7 +904,15 @@ export type SymbolLayerSpecification = {
904
904
  "icon-color-brightness-min"?: number | ExpressionSpecification,
905
905
  "icon-color-brightness-max"?: number | ExpressionSpecification,
906
906
  "symbol-z-offset"?: DataDrivenPropertyValueSpecification<number>,
907
- "symbol-z-offset-transition"?: TransitionSpecification
907
+ "symbol-z-offset-transition"?: TransitionSpecification,
908
+ /**
909
+ * @experimental This property is experimental and subject to change in future versions.
910
+ */
911
+ "placement-priority"?: DataDrivenPropertyValueSpecification<number>,
912
+ /**
913
+ * @experimental This property is experimental and subject to change in future versions.
914
+ */
915
+ "placement-group"?: DataDrivenPropertyValueSpecification<string>
908
916
  },
909
917
  "appearances"?: Array<AppearanceSpecification>
910
918
  };
@@ -1262,11 +1270,7 @@ export type RasterLayerSpecification = {
1262
1270
  /**
1263
1271
  * @experimental This property is experimental and subject to change in future versions.
1264
1272
  */
1265
- "raster-elevation-reference"?: "sea" | "ground" | ExpressionSpecification,
1266
- /**
1267
- * @experimental This property is experimental and subject to change in future versions.
1268
- */
1269
- "raster-allow-draping"?: boolean
1273
+ "raster-elevation-reference"?: "sea" | "ground" | ExpressionSpecification
1270
1274
  },
1271
1275
  "appearances"?: Array<AppearanceSpecification>
1272
1276
  };
@@ -1524,6 +1528,21 @@ export type SlotLayerSpecification = {
1524
1528
  "paint"?: never
1525
1529
  };
1526
1530
 
1531
+ export type PlacementGroupLayerSpecification = {
1532
+ "id": string,
1533
+ "type": "placement-group",
1534
+ "metadata"?: unknown,
1535
+ "source"?: never,
1536
+ "source-layer"?: never,
1537
+ "slot"?: string,
1538
+ "minzoom"?: never,
1539
+ "maxzoom"?: never,
1540
+ "filter"?: never,
1541
+ "appearances"?: Array<AppearanceSpecification>,
1542
+ "layout"?: never,
1543
+ "paint"?: never
1544
+ };
1545
+
1527
1546
  export type ClipLayerSpecification = {
1528
1547
  "id": string,
1529
1548
  "type": "clip",
@@ -1563,6 +1582,7 @@ export type LayerSpecification =
1563
1582
  | BackgroundLayerSpecification
1564
1583
  | SkyLayerSpecification
1565
1584
  | SlotLayerSpecification
1585
+ | PlacementGroupLayerSpecification
1566
1586
  | ClipLayerSpecification;
1567
1587
 
1568
1588
  export type LayoutSpecification = UnionToIntersection<NonNullable<LayerSpecification['layout']>>;
@@ -1668,6 +1688,11 @@ export type SkyLayer = SkyLayerSpecification;
1668
1688
  */
1669
1689
  export type SlotLayer = SlotLayerSpecification;
1670
1690
 
1691
+ /**
1692
+ * @deprecated Use `PlacementGroupLayerSpecification` instead.
1693
+ */
1694
+ export type PlacementGroupLayer = PlacementGroupLayerSpecification;
1695
+
1671
1696
  /**
1672
1697
  * @deprecated Use `ClipLayerSpecification` instead.
1673
1698
  */
@@ -72,7 +72,7 @@ export default function validateLayer(options: LayerValidatorOptions): Validatio
72
72
  } else {
73
73
  type = unbundle(parent.type) as string;
74
74
  }
75
- } else if (!(type === 'background' || type === 'sky' || type === 'slot')) {
75
+ } else if (!(type === 'background' || type === 'sky' || type === 'slot' || type === 'placement-group')) {
76
76
  if (!layer.source) {
77
77
  errors.push(new ValidationError(key, layer, 'missing required property "source"'));
78
78
  } else if (!isString(layer.source)) {