@mapbox/mapbox-gl-style-spec 14.12.0-beta.1 → 14.12.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.
Files changed (75) hide show
  1. package/composite.ts +2 -0
  2. package/deref.ts +5 -5
  3. package/diff.ts +18 -20
  4. package/dist/index.cjs +143 -13
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.ts +41 -7
  7. package/dist/index.es.js +143 -13
  8. package/dist/index.es.js.map +1 -1
  9. package/error/validation_error.ts +1 -3
  10. package/expression/definitions/assertion.ts +2 -1
  11. package/expression/definitions/at.ts +1 -1
  12. package/expression/definitions/at_interpolated.ts +1 -1
  13. package/expression/definitions/case.ts +3 -1
  14. package/expression/definitions/coalesce.ts +1 -0
  15. package/expression/definitions/coercion.ts +3 -1
  16. package/expression/definitions/collator.ts +2 -1
  17. package/expression/definitions/comparison.ts +15 -1
  18. package/expression/definitions/config.ts +3 -0
  19. package/expression/definitions/distance.ts +6 -4
  20. package/expression/definitions/format.ts +1 -1
  21. package/expression/definitions/index.ts +21 -0
  22. package/expression/definitions/index_of.ts +1 -0
  23. package/expression/definitions/interpolate.ts +5 -1
  24. package/expression/definitions/let.ts +1 -0
  25. package/expression/definitions/literal.ts +2 -2
  26. package/expression/definitions/match.ts +3 -1
  27. package/expression/definitions/number_format.ts +3 -4
  28. package/expression/definitions/slice.ts +1 -0
  29. package/expression/definitions/step.ts +1 -0
  30. package/expression/definitions/var.ts +1 -0
  31. package/expression/definitions/within.ts +6 -2
  32. package/expression/expression.ts +3 -0
  33. package/expression/index.ts +17 -3
  34. package/expression/types/image_variant.ts +2 -2
  35. package/expression/types.ts +1 -0
  36. package/feature_filter/convert.ts +13 -6
  37. package/feature_filter/index.ts +16 -0
  38. package/format.ts +1 -0
  39. package/function/convert.ts +5 -1
  40. package/function/index.ts +28 -0
  41. package/group_by_layout.ts +17 -8
  42. package/migrate/expressions.ts +2 -2
  43. package/migrate/v8.ts +9 -0
  44. package/migrate/v9.ts +1 -0
  45. package/migrate.ts +1 -0
  46. package/package.json +1 -1
  47. package/read_style.ts +1 -0
  48. package/reference/latest.ts +1 -0
  49. package/reference/v8.json +116 -11
  50. package/types.ts +12 -1
  51. package/union-to-intersection.ts +1 -0
  52. package/util/extend.ts +1 -0
  53. package/util/geometry_util.ts +7 -8
  54. package/validate/validate.ts +6 -0
  55. package/validate/validate_array.ts +2 -0
  56. package/validate/validate_enum.ts +1 -0
  57. package/validate/validate_expression.ts +4 -0
  58. package/validate/validate_filter.ts +4 -2
  59. package/validate/validate_fog.ts +3 -0
  60. package/validate/validate_function.ts +7 -2
  61. package/validate/validate_iconset.ts +1 -0
  62. package/validate/validate_layer.ts +1 -0
  63. package/validate/validate_light.ts +3 -0
  64. package/validate/validate_lights.ts +6 -0
  65. package/validate/validate_model.ts +4 -0
  66. package/validate/validate_object.ts +2 -2
  67. package/validate/validate_projection.ts +1 -0
  68. package/validate/validate_property.ts +4 -0
  69. package/validate/validate_rain.ts +3 -0
  70. package/validate/validate_snow.ts +3 -0
  71. package/validate/validate_source.ts +8 -6
  72. package/validate/validate_terrain.ts +4 -0
  73. package/validate_mapbox_api_supported.ts +30 -19
  74. package/validate_style.ts +1 -0
  75. package/visit.ts +3 -1
package/dist/index.d.ts CHANGED
@@ -489,6 +489,12 @@ type VectorSourceSpecification = {
489
489
  number,
490
490
  number
491
491
  ];
492
+ "extra_bounds"?: Array<[
493
+ number,
494
+ number,
495
+ number,
496
+ number
497
+ ]>;
492
498
  "scheme"?: "xyz" | "tms";
493
499
  "minzoom"?: number;
494
500
  "maxzoom"?: number;
@@ -507,6 +513,12 @@ type RasterSourceSpecification = {
507
513
  number,
508
514
  number
509
515
  ];
516
+ "extra_bounds"?: Array<[
517
+ number,
518
+ number,
519
+ number,
520
+ number
521
+ ]>;
510
522
  "minzoom"?: number;
511
523
  "maxzoom"?: number;
512
524
  "tileSize"?: number;
@@ -525,6 +537,12 @@ type RasterDEMSourceSpecification = {
525
537
  number,
526
538
  number
527
539
  ];
540
+ "extra_bounds"?: Array<[
541
+ number,
542
+ number,
543
+ number,
544
+ number
545
+ ]>;
528
546
  "minzoom"?: number;
529
547
  "maxzoom"?: number;
530
548
  "tileSize"?: number;
@@ -543,6 +561,12 @@ type RasterArraySourceSpecification = {
543
561
  number,
544
562
  number
545
563
  ];
564
+ "extra_bounds"?: Array<[
565
+ number,
566
+ number,
567
+ number,
568
+ number
569
+ ]>;
546
570
  "minzoom"?: number;
547
571
  "maxzoom"?: number;
548
572
  "tileSize"?: number;
@@ -721,6 +745,8 @@ type FillLayerSpecification = {
721
745
  "fill-translate-transition"?: TransitionSpecification;
722
746
  "fill-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
723
747
  "fill-pattern"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
748
+ "fill-pattern-cross-fade"?: PropertyValueSpecification<number>;
749
+ "fill-pattern-cross-fade-transition"?: TransitionSpecification;
724
750
  "fill-emissive-strength"?: PropertyValueSpecification<number>;
725
751
  "fill-emissive-strength-transition"?: TransitionSpecification;
726
752
  /**
@@ -798,6 +824,8 @@ type LineLayerSpecification = {
798
824
  "line-blur-transition"?: TransitionSpecification;
799
825
  "line-dasharray"?: DataDrivenPropertyValueSpecification<Array<number>>;
800
826
  "line-pattern"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
827
+ "line-pattern-cross-fade"?: PropertyValueSpecification<number>;
828
+ "line-pattern-cross-fade-transition"?: TransitionSpecification;
801
829
  "line-gradient"?: ExpressionSpecification;
802
830
  "line-gradient-use-theme"?: PropertyValueSpecification<string>;
803
831
  "line-trim-offset"?: [
@@ -931,7 +959,7 @@ type SymbolLayerSpecification = {
931
959
  ]>;
932
960
  "icon-translate-transition"?: TransitionSpecification;
933
961
  "icon-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
934
- "icon-image-cross-fade"?: DataDrivenPropertyValueSpecification<number>;
962
+ "icon-image-cross-fade"?: PropertyValueSpecification<number>;
935
963
  "icon-image-cross-fade-transition"?: TransitionSpecification;
936
964
  "text-opacity"?: DataDrivenPropertyValueSpecification<number>;
937
965
  "text-opacity-transition"?: TransitionSpecification;
@@ -1066,6 +1094,8 @@ type FillExtrusionLayerSpecification = {
1066
1094
  "fill-extrusion-translate-transition"?: TransitionSpecification;
1067
1095
  "fill-extrusion-translate-anchor"?: PropertyValueSpecification<"map" | "viewport">;
1068
1096
  "fill-extrusion-pattern"?: DataDrivenPropertyValueSpecification<ResolvedImageSpecification>;
1097
+ "fill-extrusion-pattern-cross-fade"?: PropertyValueSpecification<number>;
1098
+ "fill-extrusion-pattern-cross-fade-transition"?: TransitionSpecification;
1069
1099
  "fill-extrusion-height"?: DataDrivenPropertyValueSpecification<number>;
1070
1100
  "fill-extrusion-height-transition"?: TransitionSpecification;
1071
1101
  "fill-extrusion-base"?: DataDrivenPropertyValueSpecification<number>;
@@ -1505,7 +1535,7 @@ type LayerSpecification = FillLayerSpecification | LineLayerSpecification | Symb
1505
1535
  export function derefLayers(layers: Array<LayerSpecification>): Array<LayerSpecification>;
1506
1536
  type Command = {
1507
1537
  command: string;
1508
- args: Array<any>;
1538
+ args: unknown[];
1509
1539
  };
1510
1540
  /**
1511
1541
  * Diff two stylesheet
@@ -1530,8 +1560,8 @@ export declare class ValidationError {
1530
1560
  message: string;
1531
1561
  identifier: string | null | undefined;
1532
1562
  line: number | null | undefined;
1533
- constructor(key: string | null | undefined, value: {
1534
- __line__: number;
1563
+ constructor(key: string | null | undefined, value: (string | number | boolean) & {
1564
+ __line__?: number;
1535
1565
  } | null | undefined, message: string, identifier?: string | null);
1536
1566
  }
1537
1567
  export declare class ParsingError {
@@ -1706,7 +1736,7 @@ declare class ImageVariant {
1706
1736
  constructor(id: string | ImageIdSpec, options?: RasterizationOptions);
1707
1737
  toString(): StringifiedImageVariant;
1708
1738
  static parse(str: StringifiedImageVariant): ImageVariant | null;
1709
- scaleSelf(factor: number): this;
1739
+ scaleSelf(factor: number, yFactor?: number): this;
1710
1740
  }
1711
1741
  declare class ResolvedImage {
1712
1742
  primaryId: ImageId;
@@ -1893,7 +1923,7 @@ interface Feature {
1893
1923
  readonly type: 0 | 1 | 2 | 3 | "Unknown" | "Point" | "LineString" | "Polygon";
1894
1924
  readonly id?: string | number | null;
1895
1925
  readonly properties: Record<PropertyKey, unknown>;
1896
- readonly patterns?: Record<PropertyKey, string>;
1926
+ readonly patterns?: Record<PropertyKey, string[]>;
1897
1927
  readonly geometry?: Array<Array<Point>>;
1898
1928
  }
1899
1929
  type FeatureState = {
@@ -2081,6 +2111,10 @@ type ValidationErrors = ReadonlyArray<ValidationError$1>;
2081
2111
  * var errors = validate(style);
2082
2112
  */
2083
2113
  declare function validateStyle(style: StyleSpecification | string | Buffer, styleSpec?: StyleReference): ValidationErrors;
2114
+ type MapboxStyleSpecification = StyleSpecification & {
2115
+ visibility?: "public" | "private";
2116
+ protected?: boolean;
2117
+ };
2084
2118
  /**
2085
2119
  * Validate a Mapbox GL style against the style specification and check for
2086
2120
  * compatibility with the Mapbox Styles API.
@@ -2091,7 +2125,7 @@ declare function validateStyle(style: StyleSpecification | string | Buffer, styl
2091
2125
  * var validateMapboxApiSupported = require('mapbox-gl-style-spec/lib/validate_style_mapbox_api_supported.js');
2092
2126
  * var errors = validateMapboxApiSupported(style);
2093
2127
  */
2094
- export function validateMapboxApiSupported(style: any, styleSpec?: any): ValidationErrors;
2128
+ export function validateMapboxApiSupported(style: MapboxStyleSpecification, styleSpec?: StyleReference): ValidationErrors;
2095
2129
  type ExpressionType = "data-driven" | "color-ramp" | "data-constant" | "constant";
2096
2130
  type ExpressionParameters = Array<"zoom" | "feature" | "feature-state" | "heatmap-density" | "line-progress" | "raster-value" | "sky-radial-progress" | "pitch" | "distance-from-center" | "measure-light" | "raster-particle-speed">;
2097
2131
  type ExpressionSpecification$1 = {
package/dist/index.es.js CHANGED
@@ -788,6 +788,16 @@ var source_vector = {
788
788
  ],
789
789
  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."
790
790
  },
791
+ extra_bounds: {
792
+ type: "array",
793
+ value: {
794
+ type: "array",
795
+ value: "number",
796
+ length: 4,
797
+ 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]`."
798
+ },
799
+ doc: "An array of additional discrete geographic regions where tiles are available. When used alongside the `bounds` property, these regions act as an additional filter - Mapbox GL will only request tiles that are both within the `bounds` and any of the regions defined in `extra_bounds`. When used independently (without `bounds`), Mapbox GL will request tiles that fall within any of the regions in `extra_bounds`. This allows for more fine-grained control over tile requests, particularly when dealing with sparse data coverage."
800
+ },
791
801
  scheme: {
792
802
  type: "enum",
793
803
  values: {
@@ -867,6 +877,16 @@ var source_raster = {
867
877
  ],
868
878
  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."
869
879
  },
880
+ extra_bounds: {
881
+ type: "array",
882
+ value: {
883
+ type: "array",
884
+ value: "number",
885
+ length: 4,
886
+ 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]`."
887
+ },
888
+ doc: "An array of additional discrete geographic regions where tiles are available. When used alongside the `bounds` property, these regions act as an additional filter - Mapbox GL will only request tiles that are both within the `bounds` and any of the regions defined in `extra_bounds`. When used independently (without `bounds`), Mapbox GL will request tiles that fall within any of the regions in `extra_bounds`. This allows for more fine-grained control over tile requests, particularly when dealing with sparse data coverage."
889
+ },
870
890
  minzoom: {
871
891
  type: "number",
872
892
  "default": 0,
@@ -948,6 +968,16 @@ var source_raster_dem = {
948
968
  ],
949
969
  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."
950
970
  },
971
+ extra_bounds: {
972
+ type: "array",
973
+ value: {
974
+ type: "array",
975
+ value: "number",
976
+ length: 4,
977
+ 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]`."
978
+ },
979
+ doc: "An array of additional discrete geographic regions where tiles are available. When used alongside the `bounds` property, these regions act as an additional filter - Mapbox GL will only request tiles that are both within the `bounds` and any of the regions defined in `extra_bounds`. When used independently (without `bounds`), Mapbox GL will request tiles that fall within any of the regions in `extra_bounds`. This allows for more fine-grained control over tile requests, particularly when dealing with sparse data coverage."
980
+ },
951
981
  minzoom: {
952
982
  type: "number",
953
983
  "default": 0,
@@ -1030,6 +1060,16 @@ var source_raster_array = {
1030
1060
  ],
1031
1061
  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."
1032
1062
  },
1063
+ extra_bounds: {
1064
+ type: "array",
1065
+ value: {
1066
+ type: "array",
1067
+ value: "number",
1068
+ length: 4,
1069
+ 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]`."
1070
+ },
1071
+ doc: "An array of additional discrete geographic regions where tiles are available. When used alongside the `bounds` property, these regions act as an additional filter - Mapbox GL will only request tiles that are both within the `bounds` and any of the regions defined in `extra_bounds`. When used independently (without `bounds`), Mapbox GL will request tiles that fall within any of the regions in `extra_bounds`. This allows for more fine-grained control over tile requests, particularly when dealing with sparse data coverage."
1072
+ },
1033
1073
  minzoom: {
1034
1074
  type: "number",
1035
1075
  "default": 0,
@@ -6444,6 +6484,30 @@ var paint_fill = {
6444
6484
  },
6445
6485
  "property-type": "data-driven"
6446
6486
  },
6487
+ "fill-pattern-cross-fade": {
6488
+ type: "number",
6489
+ "property-type": "data-constant",
6490
+ "default": 0,
6491
+ minimum: 0,
6492
+ maximum: 1,
6493
+ expression: {
6494
+ interpolated: true,
6495
+ parameters: [
6496
+ "zoom",
6497
+ "measure-light"
6498
+ ]
6499
+ },
6500
+ requires: [
6501
+ "line-pattern"
6502
+ ],
6503
+ "sdk-support": {
6504
+ "basic functionality": {
6505
+ js: "3.12.0"
6506
+ }
6507
+ },
6508
+ doc: "Controls the transition progress between the image variants of fill-pattern. Zero means the first variant is used, one is the second, and in between they are blended together.",
6509
+ transition: true
6510
+ },
6447
6511
  "fill-emissive-strength": {
6448
6512
  type: "number",
6449
6513
  "default": 0,
@@ -7028,6 +7092,30 @@ var paint_line = {
7028
7092
  },
7029
7093
  "property-type": "data-driven"
7030
7094
  },
7095
+ "line-pattern-cross-fade": {
7096
+ type: "number",
7097
+ "property-type": "data-constant",
7098
+ "default": 0,
7099
+ minimum: 0,
7100
+ maximum: 1,
7101
+ expression: {
7102
+ interpolated: true,
7103
+ parameters: [
7104
+ "zoom",
7105
+ "measure-light"
7106
+ ]
7107
+ },
7108
+ requires: [
7109
+ "line-pattern"
7110
+ ],
7111
+ "sdk-support": {
7112
+ "basic functionality": {
7113
+ js: "3.12.0"
7114
+ }
7115
+ },
7116
+ doc: "Controls the transition progress between the image variants of line-pattern. Zero means the first variant is used, one is the second, and in between they are blended together.",
7117
+ transition: true
7118
+ },
7031
7119
  "line-gradient": {
7032
7120
  type: "color",
7033
7121
  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`.",
@@ -8106,7 +8194,7 @@ var paint_symbol = {
8106
8194
  },
8107
8195
  "icon-image-cross-fade": {
8108
8196
  type: "number",
8109
- "property-type": "data-driven",
8197
+ "property-type": "data-constant",
8110
8198
  "default": 0,
8111
8199
  minimum: 0,
8112
8200
  maximum: 1,
@@ -8114,8 +8202,6 @@ var paint_symbol = {
8114
8202
  interpolated: true,
8115
8203
  parameters: [
8116
8204
  "zoom",
8117
- "feature",
8118
- "feature-state",
8119
8205
  "measure-light"
8120
8206
  ]
8121
8207
  },
@@ -8127,11 +8213,6 @@ var paint_symbol = {
8127
8213
  js: "3.0.0",
8128
8214
  android: "11.0.0",
8129
8215
  ios: "11.0.0"
8130
- },
8131
- "data-driven styling": {
8132
- js: "3.0.0",
8133
- android: "11.0.0",
8134
- ios: "11.0.0"
8135
8216
  }
8136
8217
  },
8137
8218
  doc: "Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together.",
@@ -10252,6 +10333,30 @@ var v8 = {
10252
10333
  },
10253
10334
  "property-type": "data-driven"
10254
10335
  },
10336
+ "fill-extrusion-pattern-cross-fade": {
10337
+ type: "number",
10338
+ "property-type": "data-constant",
10339
+ "default": 0,
10340
+ minimum: 0,
10341
+ maximum: 1,
10342
+ expression: {
10343
+ interpolated: true,
10344
+ parameters: [
10345
+ "zoom",
10346
+ "measure-light"
10347
+ ]
10348
+ },
10349
+ requires: [
10350
+ "line-pattern"
10351
+ ],
10352
+ "sdk-support": {
10353
+ "basic functionality": {
10354
+ js: "3.12.0"
10355
+ }
10356
+ },
10357
+ doc: "Controls the transition progress between the image variants of fill-extrusion-pattern. Zero means the first variant is used, one is the second, and in between they are blended together.",
10358
+ transition: true
10359
+ },
10255
10360
  "fill-extrusion-height": {
10256
10361
  type: "number",
10257
10362
  "default": 0,
@@ -12919,8 +13024,8 @@ class ImageVariant {
12919
13024
  ])
12920
13025
  });
12921
13026
  }
12922
- scaleSelf(factor) {
12923
- this.options.transform.scaleSelf(factor);
13027
+ scaleSelf(factor, yFactor) {
13028
+ this.options.transform.scaleSelf(factor, yFactor);
12924
13029
  return this;
12925
13030
  }
12926
13031
  }
@@ -13215,6 +13320,7 @@ class Assertion {
13215
13320
  }
13216
13321
  return new Assertion(type, parsed);
13217
13322
  }
13323
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13218
13324
  evaluate(ctx) {
13219
13325
  for (let i = 0; i < this.args.length; i++) {
13220
13326
  const value = this.args[i].evaluate(ctx);
@@ -13634,6 +13740,7 @@ class Coercion {
13634
13740
  }
13635
13741
  return new Coercion(type, parsed);
13636
13742
  }
13743
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13637
13744
  evaluate(ctx) {
13638
13745
  if (this.type.kind === 'boolean') {
13639
13746
  return Boolean(this.args[0].evaluate(ctx));
@@ -15770,6 +15877,7 @@ class Config {
15770
15877
  }
15771
15878
  return new Config(type, toString(configKey.value));
15772
15879
  }
15880
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15773
15881
  evaluate(ctx) {
15774
15882
  const FQIDSeparator = '\x1F';
15775
15883
  const configKey = [
@@ -15914,6 +16022,7 @@ class Var {
15914
16022
  }
15915
16023
  return new Var(name, context.scope.get(name));
15916
16024
  }
16025
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15917
16026
  evaluate(ctx) {
15918
16027
  return this.boundExpression.evaluate(ctx);
15919
16028
  }
@@ -16179,6 +16288,7 @@ class Step {
16179
16288
  }
16180
16289
  return new Step(outputType, input, stops);
16181
16290
  }
16291
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16182
16292
  evaluate(ctx) {
16183
16293
  const labels = this.labels;
16184
16294
  const outputs = this.outputs;
@@ -16581,6 +16691,7 @@ class Coalesce {
16581
16691
  const needsAnnotation = expectedType && parsedArgs.some(arg => checkSubtype(expectedType, arg.type));
16582
16692
  return needsAnnotation ? new Coalesce(ValueType, parsedArgs) : new Coalesce(outputType, parsedArgs);
16583
16693
  }
16694
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16584
16695
  evaluate(ctx) {
16585
16696
  let result = null;
16586
16697
  let argCount = 0;
@@ -16623,6 +16734,7 @@ class Let {
16623
16734
  this.bindings = [].concat(bindings);
16624
16735
  this.result = result;
16625
16736
  }
16737
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16626
16738
  evaluate(ctx) {
16627
16739
  return this.result.evaluate(ctx);
16628
16740
  }
@@ -16865,6 +16977,7 @@ class IndexOf {
16865
16977
  return new IndexOf(needle, haystack);
16866
16978
  }
16867
16979
  }
16980
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16868
16981
  evaluate(ctx) {
16869
16982
  const needle = this.needle.evaluate(ctx);
16870
16983
  const haystack = this.haystack.evaluate(ctx);
@@ -16981,6 +17094,7 @@ class Match {
16981
17094
  }
16982
17095
  return new Match(inputType, outputType, input, cases, outputs, otherwise);
16983
17096
  }
17097
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16984
17098
  evaluate(ctx) {
16985
17099
  const input = this.input.evaluate(ctx);
16986
17100
  const output = typeOf(input) === this.inputType && this.outputs[this.cases[input]] || this.otherwise;
@@ -17062,6 +17176,7 @@ class Case {
17062
17176
  return null;
17063
17177
  return new Case(outputType, branches, otherwise);
17064
17178
  }
17179
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17065
17180
  evaluate(ctx) {
17066
17181
  for (const [test, expression] of this.branches) {
17067
17182
  if (test.evaluate(ctx)) {
@@ -17120,6 +17235,7 @@ class Slice {
17120
17235
  return new Slice(input.type, input, beginIndex);
17121
17236
  }
17122
17237
  }
17238
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17123
17239
  evaluate(ctx) {
17124
17240
  const input = this.input.evaluate(ctx);
17125
17241
  const beginIndex = this.beginIndex.evaluate(ctx);
@@ -17640,6 +17756,7 @@ CompoundExpression.register(expressions, {
17640
17756
  overloads: [
17641
17757
  [
17642
17758
  [StringType],
17759
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
17643
17760
  (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())
17644
17761
  ],
17645
17762
  [
@@ -17647,6 +17764,7 @@ CompoundExpression.register(expressions, {
17647
17764
  StringType,
17648
17765
  ObjectType
17649
17766
  ],
17767
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
17650
17768
  (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))
17651
17769
  ]
17652
17770
  ]
@@ -17654,6 +17772,7 @@ CompoundExpression.register(expressions, {
17654
17772
  'feature-state': [
17655
17773
  ValueType,
17656
17774
  [StringType],
17775
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
17657
17776
  (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})
17658
17777
  ],
17659
17778
  'properties': [
@@ -17851,11 +17970,13 @@ CompoundExpression.register(expressions, {
17851
17970
  'min': [
17852
17971
  NumberType,
17853
17972
  varargs(NumberType),
17973
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
17854
17974
  (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx)))
17855
17975
  ],
17856
17976
  'max': [
17857
17977
  NumberType,
17858
17978
  varargs(NumberType),
17979
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
17859
17980
  (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))
17860
17981
  ],
17861
17982
  'abs': [
@@ -18029,6 +18150,7 @@ CompoundExpression.register(expressions, {
18029
18150
  BooleanType,
18030
18151
  BooleanType
18031
18152
  ],
18153
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18032
18154
  (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx)
18033
18155
  ],
18034
18156
  [
@@ -18051,6 +18173,7 @@ CompoundExpression.register(expressions, {
18051
18173
  BooleanType,
18052
18174
  BooleanType
18053
18175
  ],
18176
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18054
18177
  (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx)
18055
18178
  ],
18056
18179
  [
@@ -18085,11 +18208,13 @@ CompoundExpression.register(expressions, {
18085
18208
  'upcase': [
18086
18209
  StringType,
18087
18210
  [StringType],
18211
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18088
18212
  (ctx, [s]) => s.evaluate(ctx).toUpperCase()
18089
18213
  ],
18090
18214
  'downcase': [
18091
18215
  StringType,
18092
18216
  [StringType],
18217
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18093
18218
  (ctx, [s]) => s.evaluate(ctx).toLowerCase()
18094
18219
  ],
18095
18220
  'concat': [
@@ -18100,6 +18225,7 @@ CompoundExpression.register(expressions, {
18100
18225
  'resolved-locale': [
18101
18226
  StringType,
18102
18227
  [CollatorType],
18228
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18103
18229
  (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()
18104
18230
  ],
18105
18231
  'random': [
@@ -18247,6 +18373,7 @@ function createFunction(parameters, propertySpec) {
18247
18373
  kind: 'composite',
18248
18374
  interpolationType,
18249
18375
  interpolationFactor: Interpolate.interpolationFactor.bind(void 0, interpolationType),
18376
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18250
18377
  zoomStops: featureFunctionStops.map(s => s[0]),
18251
18378
  evaluate({zoom}, properties) {
18252
18379
  return evaluateExponentialFunction({
@@ -18264,7 +18391,9 @@ function createFunction(parameters, propertySpec) {
18264
18391
  kind: 'camera',
18265
18392
  interpolationType,
18266
18393
  interpolationFactor: Interpolate.interpolationFactor.bind(void 0, interpolationType),
18394
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18267
18395
  zoomStops: parameters.stops.map(s => s[0]),
18396
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
18268
18397
  evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)
18269
18398
  };
18270
18399
  } else {
@@ -19370,7 +19499,8 @@ function convertInOp(property, values, negate = false) {
19370
19499
  negate
19371
19500
  ];
19372
19501
  }
19373
- return [negate ? 'all' : 'any'].concat(values.map(v => [
19502
+ return [negate ? 'all' : 'any'].concat(// eslint-disable-next-line @typescript-eslint/no-explicit-any
19503
+ values.map(v => [
19374
19504
  negate ? '!=' : '==',
19375
19505
  get,
19376
19506
  v
@@ -22626,7 +22756,7 @@ function isValid(value, regex) {
22626
22756
  return !!value.match(regex);
22627
22757
  }
22628
22758
  function getSourceCount(source) {
22629
- if (source.url) {
22759
+ if ('url' in source) {
22630
22760
  return source.url.split(',').length;
22631
22761
  } else {
22632
22762
  return 0;
@@ -22665,7 +22795,7 @@ function getSourceErrors(source, i) {
22665
22795
  errors.push(new ValidationError(`sources[${ i }].type`, source.type, `Expected one of [${ Array.from(acceptedSourceTypes).join(', ') }]`));
22666
22796
  }
22667
22797
  const sourceUrlPattern = /^mapbox:\/\/([^/]*)$/;
22668
- if (!source.url || !isValid(source.url, sourceUrlPattern)) {
22798
+ if (!('url' in source) || !isValid(source.url, sourceUrlPattern)) {
22669
22799
  errors.push(new ValidationError(`sources[${ i }].url`, source.url, 'Expected a valid Mapbox tileset url'));
22670
22800
  }
22671
22801
  return errors;