@mapbox/mapbox-gl-style-spec 14.28.0 → 14.29.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.
Files changed (63) hide show
  1. package/composite.ts +5 -5
  2. package/diff.ts +38 -40
  3. package/dist/index.cjs +339 -238
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.ts +75 -13
  6. package/dist/index.es.js +339 -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 +63 -5
  41. package/types/config_options.ts +1 -1
  42. package/types.ts +10 -5
  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
  "==": {
@@ -9077,7 +9093,6 @@ declare const _exports: {
9077
9093
  default: number;
9078
9094
  minimum: number;
9079
9095
  transition: boolean;
9080
- experimental: boolean;
9081
9096
  appearance: boolean;
9082
9097
  "sdk-support": {
9083
9098
  "basic functionality": {
@@ -9184,6 +9199,33 @@ declare const _exports: {
9184
9199
  };
9185
9200
  };
9186
9201
  };
9202
+ "raster-color-scale": {
9203
+ type: string;
9204
+ doc: string;
9205
+ values: {
9206
+ linear: {
9207
+ doc: string;
9208
+ };
9209
+ log: {
9210
+ doc: string;
9211
+ };
9212
+ };
9213
+ default: string;
9214
+ requires: (string | {
9215
+ source: string;
9216
+ })[];
9217
+ expression: {
9218
+ interpolated: boolean;
9219
+ parameters: any[];
9220
+ };
9221
+ "property-type": string;
9222
+ experimental: boolean;
9223
+ "sdk-support": {
9224
+ "basic functionality": {
9225
+ js: string;
9226
+ };
9227
+ };
9228
+ };
9187
9229
  "raster-hue-rotate": {
9188
9230
  type: string;
9189
9231
  default: number;
@@ -9415,6 +9457,21 @@ declare const _exports: {
9415
9457
  };
9416
9458
  "property-type": string;
9417
9459
  };
9460
+ "raster-allow-draping": {
9461
+ type: string;
9462
+ default: boolean;
9463
+ experimental: boolean;
9464
+ doc: string;
9465
+ transition: boolean;
9466
+ "property-type": string;
9467
+ "sdk-support": {
9468
+ "basic functionality": {
9469
+ js: string;
9470
+ android: string;
9471
+ ios: string;
9472
+ };
9473
+ };
9474
+ };
9418
9475
  };
9419
9476
  "paint_raster-particle": {
9420
9477
  "raster-particle-array-band": {
@@ -10850,7 +10907,7 @@ type SchemaSpecification = {
10850
10907
  };
10851
10908
  type OptionSpecification = {
10852
10909
  "default": unknown | ExpressionSpecification;
10853
- "type"?: "string" | "number" | "boolean" | "color";
10910
+ "type"?: "string" | "number" | "boolean" | "color" | "object";
10854
10911
  "array"?: boolean;
10855
10912
  "minValue"?: number;
10856
10913
  "maxValue"?: number;
@@ -11342,9 +11399,6 @@ type SymbolLayerSpecification = {
11342
11399
  "icon-color-contrast"?: number | ExpressionSpecification;
11343
11400
  "icon-color-brightness-min"?: number | ExpressionSpecification;
11344
11401
  "icon-color-brightness-max"?: number | ExpressionSpecification;
11345
- /**
11346
- * @experimental This property is experimental and subject to change in future versions.
11347
- */
11348
11402
  "symbol-z-offset"?: DataDrivenPropertyValueSpecification<number>;
11349
11403
  "symbol-z-offset-transition"?: TransitionSpecification;
11350
11404
  };
@@ -11659,6 +11713,10 @@ type RasterLayerSpecification = {
11659
11713
  "raster-color-mix-transition"?: TransitionSpecification;
11660
11714
  "raster-color-range"?: PropertyValueSpecification<[number, number]>;
11661
11715
  "raster-color-range-transition"?: TransitionSpecification;
11716
+ /**
11717
+ * @experimental This property is experimental and subject to change in future versions.
11718
+ */
11719
+ "raster-color-scale"?: "linear" | "log" | ExpressionSpecification;
11662
11720
  "raster-hue-rotate"?: PropertyValueSpecification<number>;
11663
11721
  "raster-hue-rotate-transition"?: TransitionSpecification;
11664
11722
  "raster-brightness-min"?: PropertyValueSpecification<number>;
@@ -11686,6 +11744,10 @@ type RasterLayerSpecification = {
11686
11744
  * @experimental This property is experimental and subject to change in future versions.
11687
11745
  */
11688
11746
  "raster-elevation-reference"?: "sea" | "ground" | ExpressionSpecification;
11747
+ /**
11748
+ * @experimental This property is experimental and subject to change in future versions.
11749
+ */
11750
+ "raster-allow-draping"?: boolean;
11689
11751
  };
11690
11752
  "appearances"?: Array<AppearanceSpecification>;
11691
11753
  };
@@ -12405,7 +12467,7 @@ type ConfigOptionValue = {
12405
12467
  minValue?: number;
12406
12468
  maxValue?: number;
12407
12469
  stepValue?: number;
12408
- type?: 'string' | 'number' | 'boolean' | 'color';
12470
+ type?: 'string' | 'number' | 'boolean' | 'color' | 'object';
12409
12471
  };
12410
12472
  type ConfigOptions = Map<string, ConfigOptionValue>;
12411
12473
 
@@ -12436,7 +12498,7 @@ declare function isExpressionFilter(filter: unknown): boolean;
12436
12498
  declare function createFilter(filter?: FilterSpecification, scope?: string, options?: ConfigOptions | null, layerType?: string): FeatureFilter;
12437
12499
 
12438
12500
  declare class EvaluationContext {
12439
- globals: GlobalProperties;
12501
+ globals: GlobalProperties | null;
12440
12502
  feature: Feature | null | undefined;
12441
12503
  featureState: FeatureState | null | undefined;
12442
12504
  formattedSection: FormattedSection | null | undefined;
@@ -12447,7 +12509,7 @@ declare class EvaluationContext {
12447
12509
  scope: string | null | undefined;
12448
12510
  options: ConfigOptions | null | undefined;
12449
12511
  iconImageUseTheme: string | null | undefined;
12450
- constructor(scope?: string | null, options?: ConfigOptions | null, iconImageUseTheme?: string);
12512
+ constructor(scope?: string | null, options?: ConfigOptions | null, iconImageUseTheme?: string | null);
12451
12513
  id(): string | number | null;
12452
12514
  geometryType(): null | string;
12453
12515
  geometry(): Array<Array<Point>> | null | undefined;
@@ -12511,9 +12573,9 @@ interface GlobalProperties {
12511
12573
  }
12512
12574
  declare class StyleExpression {
12513
12575
  expression: Expression;
12514
- _scope?: string;
12515
- _options?: ConfigOptions;
12516
- _iconImageUseTheme?: string;
12576
+ _scope?: string | null;
12577
+ _options?: ConfigOptions | null;
12578
+ _iconImageUseTheme?: string | null;
12517
12579
  _evaluator?: EvaluationContext;
12518
12580
  _defaultValue: Value;
12519
12581
  _warningHistory: {
@@ -12521,10 +12583,10 @@ declare class StyleExpression {
12521
12583
  };
12522
12584
  _enumValues?: {
12523
12585
  [_: string]: unknown;
12524
- };
12586
+ } | null;
12525
12587
  configDependencies: Set<string>;
12526
12588
  isIndoorDependent: boolean;
12527
- constructor(expression: Expression, propertySpec?: StylePropertySpecification, scope?: string, options?: ConfigOptions, iconImageUseTheme?: string);
12589
+ constructor(expression: Expression, propertySpec?: StylePropertySpecification | null, scope?: string | null, options?: ConfigOptions | null, iconImageUseTheme?: string | null);
12528
12590
  evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any;
12529
12591
  evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: ImageId[], formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData, iconImageUseTheme?: string): any;
12530
12592
  }