@mapbox/mapbox-gl-style-spec 14.28.0 → 14.29.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 (63) hide show
  1. package/composite.ts +5 -5
  2. package/diff.ts +38 -40
  3. package/dist/index.cjs +362 -238
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.ts +101 -13
  6. package/dist/index.es.js +362 -238
  7. package/dist/index.es.js.map +1 -1
  8. package/expression/compound_expression.ts +6 -6
  9. package/expression/definitions/assertion.ts +9 -12
  10. package/expression/definitions/at.ts +1 -1
  11. package/expression/definitions/at_interpolated.ts +1 -1
  12. package/expression/definitions/case.ts +1 -2
  13. package/expression/definitions/coalesce.ts +1 -1
  14. package/expression/definitions/coercion.ts +10 -12
  15. package/expression/definitions/collator.ts +8 -8
  16. package/expression/definitions/comparison.ts +0 -1
  17. package/expression/definitions/distance.ts +135 -73
  18. package/expression/definitions/format.ts +10 -13
  19. package/expression/definitions/image.ts +8 -8
  20. package/expression/definitions/index.ts +92 -90
  21. package/expression/definitions/interpolate.ts +18 -19
  22. package/expression/definitions/let.ts +1 -2
  23. package/expression/definitions/literal.ts +1 -1
  24. package/expression/definitions/match.ts +7 -8
  25. package/expression/definitions/number_format.ts +7 -8
  26. package/expression/definitions/step.ts +11 -11
  27. package/expression/definitions/within.ts +23 -24
  28. package/expression/evaluation_context.ts +4 -4
  29. package/expression/expression.ts +1 -1
  30. package/expression/index.ts +43 -21
  31. package/expression/parsing_context.ts +2 -2
  32. package/expression/stops.ts +2 -2
  33. package/expression/values.ts +2 -2
  34. package/feature_filter/index.ts +3 -3
  35. package/function/convert.ts +8 -8
  36. package/function/index.ts +4 -2
  37. package/group_by_layout.ts +6 -4
  38. package/package.json +1 -1
  39. package/read_style.ts +2 -2
  40. package/reference/v8.json +86 -5
  41. package/types/config_options.ts +1 -1
  42. package/types.ts +16 -6
  43. package/util/properties.ts +1 -1
  44. package/validate/validate.ts +15 -5
  45. package/validate/validate_appearance.ts +7 -7
  46. package/validate/validate_array.ts +7 -7
  47. package/validate/validate_enum.ts +2 -3
  48. package/validate/validate_fog.ts +2 -2
  49. package/validate/validate_function.ts +14 -13
  50. package/validate/validate_layer.ts +10 -9
  51. package/validate/validate_light.ts +2 -2
  52. package/validate/validate_lights.ts +3 -3
  53. package/validate/validate_number.ts +10 -7
  54. package/validate/validate_object.ts +11 -10
  55. package/validate/validate_option.ts +24 -9
  56. package/validate/validate_property.ts +4 -4
  57. package/validate/validate_rain.ts +1 -1
  58. package/validate/validate_snow.ts +1 -1
  59. package/validate/validate_style.ts +2 -1
  60. package/validate/validate_terrain.ts +2 -2
  61. package/validate_mapbox_api_supported.ts +5 -6
  62. package/validate_style.min.ts +2 -1
  63. package/visit.ts +11 -10
package/dist/index.d.ts CHANGED
@@ -374,6 +374,16 @@ declare const _exports: {
374
374
  color: {
375
375
  doc: string;
376
376
  };
377
+ object: {
378
+ doc: string;
379
+ "sdk-support": {
380
+ "basic functionality": {
381
+ js: string;
382
+ android: string;
383
+ ios: string;
384
+ };
385
+ };
386
+ };
377
387
  };
378
388
  };
379
389
  array: {
@@ -2895,6 +2905,7 @@ declare const _exports: {
2895
2905
  experimental: boolean;
2896
2906
  "sdk-support": {
2897
2907
  "basic functionality": {
2908
+ js: string;
2898
2909
  android: string;
2899
2910
  ios: string;
2900
2911
  };
@@ -5234,6 +5245,11 @@ declare const _exports: {
5234
5245
  android: string;
5235
5246
  ios: string;
5236
5247
  };
5248
+ "expressions support": {
5249
+ js: string;
5250
+ android: string;
5251
+ ios: string;
5252
+ };
5237
5253
  };
5238
5254
  };
5239
5255
  "==": {
@@ -8099,6 +8115,27 @@ declare const _exports: {
8099
8115
  };
8100
8116
  "property-type": string;
8101
8117
  };
8118
+ "line-cutout-depth": {
8119
+ type: string;
8120
+ default: number;
8121
+ minimum: number;
8122
+ units: string;
8123
+ doc: string;
8124
+ experimental: boolean;
8125
+ private: boolean;
8126
+ transition: boolean;
8127
+ "sdk-support": {
8128
+ "basic functionality": {
8129
+ android: string;
8130
+ ios: string;
8131
+ };
8132
+ };
8133
+ expression: {
8134
+ interpolated: boolean;
8135
+ parameters: string[];
8136
+ };
8137
+ "property-type": string;
8138
+ };
8102
8139
  };
8103
8140
  paint_circle: {
8104
8141
  "circle-radius": {
@@ -9077,7 +9114,6 @@ declare const _exports: {
9077
9114
  default: number;
9078
9115
  minimum: number;
9079
9116
  transition: boolean;
9080
- experimental: boolean;
9081
9117
  appearance: boolean;
9082
9118
  "sdk-support": {
9083
9119
  "basic functionality": {
@@ -9184,6 +9220,33 @@ declare const _exports: {
9184
9220
  };
9185
9221
  };
9186
9222
  };
9223
+ "raster-color-scale": {
9224
+ type: string;
9225
+ doc: string;
9226
+ values: {
9227
+ linear: {
9228
+ doc: string;
9229
+ };
9230
+ log: {
9231
+ doc: string;
9232
+ };
9233
+ };
9234
+ default: string;
9235
+ requires: (string | {
9236
+ source: string;
9237
+ })[];
9238
+ expression: {
9239
+ interpolated: boolean;
9240
+ parameters: any[];
9241
+ };
9242
+ "property-type": string;
9243
+ experimental: boolean;
9244
+ "sdk-support": {
9245
+ "basic functionality": {
9246
+ js: string;
9247
+ };
9248
+ };
9249
+ };
9187
9250
  "raster-hue-rotate": {
9188
9251
  type: string;
9189
9252
  default: number;
@@ -9415,6 +9478,21 @@ declare const _exports: {
9415
9478
  };
9416
9479
  "property-type": string;
9417
9480
  };
9481
+ "raster-allow-draping": {
9482
+ type: string;
9483
+ default: boolean;
9484
+ experimental: boolean;
9485
+ doc: string;
9486
+ transition: boolean;
9487
+ "property-type": string;
9488
+ "sdk-support": {
9489
+ "basic functionality": {
9490
+ js: string;
9491
+ android: string;
9492
+ ios: string;
9493
+ };
9494
+ };
9495
+ };
9418
9496
  };
9419
9497
  "paint_raster-particle": {
9420
9498
  "raster-particle-array-band": {
@@ -10850,7 +10928,7 @@ type SchemaSpecification = {
10850
10928
  };
10851
10929
  type OptionSpecification = {
10852
10930
  "default": unknown | ExpressionSpecification;
10853
- "type"?: "string" | "number" | "boolean" | "color";
10931
+ "type"?: "string" | "number" | "boolean" | "color" | "object";
10854
10932
  "array"?: boolean;
10855
10933
  "minValue"?: number;
10856
10934
  "maxValue"?: number;
@@ -11219,6 +11297,11 @@ type LineLayerSpecification = {
11219
11297
  * @experimental This property is experimental and subject to change in future versions.
11220
11298
  */
11221
11299
  "line-blend-additive-clamp"?: PropertyValueSpecification<number>;
11300
+ /**
11301
+ * @experimental This property is experimental and subject to change in future versions.
11302
+ */
11303
+ "line-cutout-depth"?: PropertyValueSpecification<number>;
11304
+ "line-cutout-depth-transition"?: TransitionSpecification;
11222
11305
  };
11223
11306
  "appearances"?: Array<AppearanceSpecification>;
11224
11307
  };
@@ -11342,9 +11425,6 @@ type SymbolLayerSpecification = {
11342
11425
  "icon-color-contrast"?: number | ExpressionSpecification;
11343
11426
  "icon-color-brightness-min"?: number | ExpressionSpecification;
11344
11427
  "icon-color-brightness-max"?: number | ExpressionSpecification;
11345
- /**
11346
- * @experimental This property is experimental and subject to change in future versions.
11347
- */
11348
11428
  "symbol-z-offset"?: DataDrivenPropertyValueSpecification<number>;
11349
11429
  "symbol-z-offset-transition"?: TransitionSpecification;
11350
11430
  };
@@ -11659,6 +11739,10 @@ type RasterLayerSpecification = {
11659
11739
  "raster-color-mix-transition"?: TransitionSpecification;
11660
11740
  "raster-color-range"?: PropertyValueSpecification<[number, number]>;
11661
11741
  "raster-color-range-transition"?: TransitionSpecification;
11742
+ /**
11743
+ * @experimental This property is experimental and subject to change in future versions.
11744
+ */
11745
+ "raster-color-scale"?: "linear" | "log" | ExpressionSpecification;
11662
11746
  "raster-hue-rotate"?: PropertyValueSpecification<number>;
11663
11747
  "raster-hue-rotate-transition"?: TransitionSpecification;
11664
11748
  "raster-brightness-min"?: PropertyValueSpecification<number>;
@@ -11686,6 +11770,10 @@ type RasterLayerSpecification = {
11686
11770
  * @experimental This property is experimental and subject to change in future versions.
11687
11771
  */
11688
11772
  "raster-elevation-reference"?: "sea" | "ground" | ExpressionSpecification;
11773
+ /**
11774
+ * @experimental This property is experimental and subject to change in future versions.
11775
+ */
11776
+ "raster-allow-draping"?: boolean;
11689
11777
  };
11690
11778
  "appearances"?: Array<AppearanceSpecification>;
11691
11779
  };
@@ -12405,7 +12493,7 @@ type ConfigOptionValue = {
12405
12493
  minValue?: number;
12406
12494
  maxValue?: number;
12407
12495
  stepValue?: number;
12408
- type?: 'string' | 'number' | 'boolean' | 'color';
12496
+ type?: 'string' | 'number' | 'boolean' | 'color' | 'object';
12409
12497
  };
12410
12498
  type ConfigOptions = Map<string, ConfigOptionValue>;
12411
12499
 
@@ -12436,7 +12524,7 @@ declare function isExpressionFilter(filter: unknown): boolean;
12436
12524
  declare function createFilter(filter?: FilterSpecification, scope?: string, options?: ConfigOptions | null, layerType?: string): FeatureFilter;
12437
12525
 
12438
12526
  declare class EvaluationContext {
12439
- globals: GlobalProperties;
12527
+ globals: GlobalProperties | null;
12440
12528
  feature: Feature | null | undefined;
12441
12529
  featureState: FeatureState | null | undefined;
12442
12530
  formattedSection: FormattedSection | null | undefined;
@@ -12447,7 +12535,7 @@ declare class EvaluationContext {
12447
12535
  scope: string | null | undefined;
12448
12536
  options: ConfigOptions | null | undefined;
12449
12537
  iconImageUseTheme: string | null | undefined;
12450
- constructor(scope?: string | null, options?: ConfigOptions | null, iconImageUseTheme?: string);
12538
+ constructor(scope?: string | null, options?: ConfigOptions | null, iconImageUseTheme?: string | null);
12451
12539
  id(): string | number | null;
12452
12540
  geometryType(): null | string;
12453
12541
  geometry(): Array<Array<Point>> | null | undefined;
@@ -12511,9 +12599,9 @@ interface GlobalProperties {
12511
12599
  }
12512
12600
  declare class StyleExpression {
12513
12601
  expression: Expression;
12514
- _scope?: string;
12515
- _options?: ConfigOptions;
12516
- _iconImageUseTheme?: string;
12602
+ _scope?: string | null;
12603
+ _options?: ConfigOptions | null;
12604
+ _iconImageUseTheme?: string | null;
12517
12605
  _evaluator?: EvaluationContext;
12518
12606
  _defaultValue: Value;
12519
12607
  _warningHistory: {
@@ -12521,10 +12609,10 @@ declare class StyleExpression {
12521
12609
  };
12522
12610
  _enumValues?: {
12523
12611
  [_: string]: unknown;
12524
- };
12612
+ } | null;
12525
12613
  configDependencies: Set<string>;
12526
12614
  isIndoorDependent: boolean;
12527
- constructor(expression: Expression, propertySpec?: StylePropertySpecification, scope?: string, options?: ConfigOptions, iconImageUseTheme?: string);
12615
+ constructor(expression: Expression, propertySpec?: StylePropertySpecification | null, scope?: string | null, options?: ConfigOptions | null, iconImageUseTheme?: string | null);
12528
12616
  evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any;
12529
12617
  evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData, iconImageUseTheme?: string): any;
12530
12618
  }