maplibre-gl 2.2.0 → 2.3.1-pre.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 (80) hide show
  1. package/build/generate-struct-arrays.ts +0 -2
  2. package/build/generate-style-spec.ts +2 -3
  3. package/build/generate-typings.ts +12 -2
  4. package/build/rollup_plugins.ts +0 -4
  5. package/dist/maplibre-gl-csp-worker.js +1 -1
  6. package/dist/maplibre-gl-csp.js +1 -1
  7. package/dist/maplibre-gl-dev.js +368 -1404
  8. package/dist/maplibre-gl.d.ts +19 -11
  9. package/dist/maplibre-gl.js +4 -4
  10. package/dist/style-spec/index.d.ts +1779 -0
  11. package/package.json +10 -12
  12. package/src/data/array_types.g.ts +0 -5
  13. package/src/data/bucket/fill_bucket.ts +0 -2
  14. package/src/data/bucket/fill_extrusion_bucket.ts +0 -2
  15. package/src/data/bucket/symbol_bucket.test.ts +30 -19
  16. package/src/data/feature_position_map.ts +1 -2
  17. package/src/gl/framebuffer.ts +3 -2
  18. package/src/gl/index_buffer.ts +1 -2
  19. package/src/gl/vertex_buffer.ts +1 -2
  20. package/src/index.test.ts +9 -0
  21. package/src/index.ts +12 -4
  22. package/src/render/image_manager.ts +5 -7
  23. package/src/render/program/pattern.ts +0 -2
  24. package/src/render/program.ts +0 -4
  25. package/src/render/vertex_array_object.ts +1 -3
  26. package/src/source/geojson_worker_source.ts +0 -4
  27. package/src/source/query_features.ts +0 -3
  28. package/src/source/rtl_text_plugin.ts +3 -4
  29. package/src/source/source_cache.ts +0 -2
  30. package/src/source/tile_id.ts +8 -8
  31. package/src/source/worker.ts +2 -11
  32. package/src/source/worker_tile.ts +12 -3
  33. package/src/style/format_section_override.ts +1 -2
  34. package/src/style/properties.ts +1 -3
  35. package/src/style/style.ts +5 -5
  36. package/src/style/style_layer/custom_style_layer.ts +1 -2
  37. package/src/style/style_layer/symbol_style_layer.ts +1 -3
  38. package/src/style-spec/CHANGELOG.md +10 -0
  39. package/src/style-spec/composite.test.ts +7 -8
  40. package/src/style-spec/expression/compound_expression.ts +0 -4
  41. package/src/style-spec/expression/definitions/assertion.ts +2 -4
  42. package/src/style-spec/expression/definitions/case.ts +1 -2
  43. package/src/style-spec/expression/definitions/coalesce.ts +1 -3
  44. package/src/style-spec/expression/definitions/coercion.ts +2 -4
  45. package/src/style-spec/expression/definitions/match.ts +0 -3
  46. package/src/style-spec/expression/index.ts +13 -15
  47. package/src/style-spec/expression/parsing_context.ts +4 -4
  48. package/src/style-spec/expression/parsing_error.ts +2 -2
  49. package/src/style-spec/expression/values.ts +0 -2
  50. package/src/style-spec/feature_filter/feature_filter.test.ts +7 -0
  51. package/src/style-spec/function/convert.ts +1 -3
  52. package/src/style-spec/migrate/v8.test.ts +12 -14
  53. package/src/style-spec/migrate/v9.test.ts +2 -4
  54. package/src/style-spec/migrate.test.ts +6 -8
  55. package/src/style-spec/package.json +2 -1
  56. package/src/style-spec/reference/latest.ts +1 -1
  57. package/src/style-spec/style-spec.ts +11 -10
  58. package/src/style-spec/types.g.ts +2 -3
  59. package/src/symbol/collision_index.ts +0 -3
  60. package/src/symbol/path_interpolator.ts +0 -2
  61. package/src/symbol/placement.ts +14 -9
  62. package/src/symbol/shaping.ts +0 -4
  63. package/src/symbol/symbol_layout.ts +56 -56
  64. package/src/ui/camera.ts +0 -10
  65. package/src/ui/control/geolocate_control.ts +4 -6
  66. package/src/ui/handler/handler_util.ts +1 -2
  67. package/src/ui/handler/scroll_zoom.ts +0 -2
  68. package/src/ui/handler_manager.ts +0 -2
  69. package/src/ui/map.test.ts +11 -0
  70. package/src/ui/map.ts +11 -0
  71. package/src/util/ajax.ts +1 -2
  72. package/src/util/color_ramp.ts +1 -2
  73. package/src/util/dictionary_coder.ts +1 -3
  74. package/src/util/dispatcher.ts +1 -4
  75. package/src/util/dom.ts +0 -3
  76. package/src/util/image.ts +1 -3
  77. package/src/util/struct_array.ts +0 -5
  78. package/src/util/task_queue.ts +1 -3
  79. package/src/util/util.ts +2 -3
  80. package/src/util/web_worker_transfer.ts +5 -6
@@ -386,8 +386,6 @@ export declare type ExpressionSpecification = [
386
386
  "interpolate",
387
387
  InterpolationSpecification,
388
388
  number | ExpressionSpecification,
389
- number | ExpressionSpecification,
390
- ExpressionInputType | ExpressionSpecification,
391
389
  ...(number | ExpressionInputType | ExpressionSpecification)[]
392
390
  ] | [
393
391
  "interpolate-hcl",
@@ -1594,33 +1592,33 @@ export declare type FeatureFilter = {
1594
1592
  };
1595
1593
  export declare type ExpressionType = "data-driven" | "cross-faded" | "cross-faded-data-driven" | "color-ramp" | "data-constant" | "constant";
1596
1594
  export declare type ExpressionParameters = Array<"zoom" | "feature" | "feature-state" | "heatmap-density" | "line-progress">;
1597
- export declare type ExpressionSpecification = {
1595
+ export declare type ExpressionSpecificationDefinition = {
1598
1596
  interpolated: boolean;
1599
1597
  parameters: ExpressionParameters;
1600
1598
  };
1601
1599
  export declare type StylePropertySpecification = {
1602
1600
  type: "number";
1603
1601
  "property-type": ExpressionType;
1604
- expression?: ExpressionSpecification;
1602
+ expression?: ExpressionSpecificationDefinition;
1605
1603
  transition: boolean;
1606
1604
  default?: number;
1607
1605
  } | {
1608
1606
  type: "string";
1609
1607
  "property-type": ExpressionType;
1610
- expression?: ExpressionSpecification;
1608
+ expression?: ExpressionSpecificationDefinition;
1611
1609
  transition: boolean;
1612
1610
  default?: string;
1613
1611
  tokens?: boolean;
1614
1612
  } | {
1615
1613
  type: "boolean";
1616
1614
  "property-type": ExpressionType;
1617
- expression?: ExpressionSpecification;
1615
+ expression?: ExpressionSpecificationDefinition;
1618
1616
  transition: boolean;
1619
1617
  default?: boolean;
1620
1618
  } | {
1621
1619
  type: "enum";
1622
1620
  "property-type": ExpressionType;
1623
- expression?: ExpressionSpecification;
1621
+ expression?: ExpressionSpecificationDefinition;
1624
1622
  values: {
1625
1623
  [_: string]: {};
1626
1624
  };
@@ -1629,7 +1627,7 @@ export declare type StylePropertySpecification = {
1629
1627
  } | {
1630
1628
  type: "color";
1631
1629
  "property-type": ExpressionType;
1632
- expression?: ExpressionSpecification;
1630
+ expression?: ExpressionSpecificationDefinition;
1633
1631
  transition: boolean;
1634
1632
  default?: string;
1635
1633
  overridable: boolean;
@@ -1637,7 +1635,7 @@ export declare type StylePropertySpecification = {
1637
1635
  type: "array";
1638
1636
  value: "number";
1639
1637
  "property-type": ExpressionType;
1640
- expression?: ExpressionSpecification;
1638
+ expression?: ExpressionSpecificationDefinition;
1641
1639
  length?: number;
1642
1640
  transition: boolean;
1643
1641
  default?: Array<number>;
@@ -1645,14 +1643,14 @@ export declare type StylePropertySpecification = {
1645
1643
  type: "array";
1646
1644
  value: "string";
1647
1645
  "property-type": ExpressionType;
1648
- expression?: ExpressionSpecification;
1646
+ expression?: ExpressionSpecificationDefinition;
1649
1647
  length?: number;
1650
1648
  transition: boolean;
1651
1649
  default?: Array<string>;
1652
1650
  } | {
1653
1651
  type: "padding";
1654
1652
  "property-type": ExpressionType;
1655
- expression?: ExpressionSpecification;
1653
+ expression?: ExpressionSpecificationDefinition;
1656
1654
  transition: boolean;
1657
1655
  default?: number | Array<number>;
1658
1656
  };
@@ -10885,6 +10883,11 @@ export declare class Map extends Camera {
10885
10883
  get vertices(): boolean;
10886
10884
  set vertices(value: boolean);
10887
10885
  _setCacheLimits(limit: number, checkThreshold: number): void;
10886
+ /**
10887
+ * Returns the package version of the library
10888
+ * @returns {string} Package version of the library
10889
+ */
10890
+ get version(): string;
10888
10891
  }
10889
10892
  export declare type NavigationOptions = {
10890
10893
  showCompass?: boolean;
@@ -11633,6 +11636,11 @@ declare const exported: {
11633
11636
  * maplibregl.clearPrewarmedResources()
11634
11637
  */
11635
11638
  clearPrewarmedResources: typeof clearPrewarmedResources;
11639
+ /**
11640
+ * Returns the package version of the library
11641
+ * @returns {string} Package version of the library
11642
+ */
11643
+ readonly version: string;
11636
11644
  /**
11637
11645
  * Gets and sets the number of web workers instantiated on a page with GL JS maps.
11638
11646
  * By default, it is set to half the number of CPU cores (capped at 6).