maplibre-gl 2.2.1 → 2.3.1-pre.2

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 (78) hide show
  1. package/build/generate-query-test-fixtures.ts +3 -2
  2. package/build/generate-struct-arrays.ts +0 -2
  3. package/build/generate-style-spec.ts +12 -17
  4. package/build/generate-typings.ts +11 -1
  5. package/build/rollup_plugins.ts +0 -4
  6. package/dist/maplibre-gl-csp-worker.js +1 -1
  7. package/dist/maplibre-gl-csp.js +1 -1
  8. package/dist/maplibre-gl-dev.js +376 -1402
  9. package/dist/maplibre-gl.d.ts +13 -16
  10. package/dist/maplibre-gl.js +4 -4
  11. package/dist/style-spec/index.d.ts +1768 -0
  12. package/package.json +14 -16
  13. package/src/data/array_types.g.ts +0 -5
  14. package/src/data/bucket/fill_bucket.ts +0 -2
  15. package/src/data/bucket/fill_extrusion_bucket.ts +0 -2
  16. package/src/data/bucket/symbol_bucket.test.ts +30 -19
  17. package/src/data/feature_position_map.ts +1 -2
  18. package/src/gl/framebuffer.ts +3 -2
  19. package/src/gl/index_buffer.ts +1 -2
  20. package/src/gl/vertex_buffer.ts +1 -2
  21. package/src/index.test.ts +9 -0
  22. package/src/index.ts +12 -4
  23. package/src/render/image_manager.ts +5 -7
  24. package/src/render/program/pattern.ts +0 -2
  25. package/src/render/program.ts +12 -9
  26. package/src/render/vertex_array_object.ts +1 -3
  27. package/src/source/geojson_worker_source.ts +0 -4
  28. package/src/source/query_features.ts +0 -3
  29. package/src/source/rtl_text_plugin.ts +3 -4
  30. package/src/source/source_cache.ts +0 -2
  31. package/src/source/tile_id.ts +8 -8
  32. package/src/source/worker.ts +0 -7
  33. package/src/source/worker_tile.ts +12 -3
  34. package/src/style/format_section_override.ts +1 -2
  35. package/src/style/properties.ts +1 -3
  36. package/src/style/style.ts +5 -5
  37. package/src/style/style_layer/custom_style_layer.ts +1 -2
  38. package/src/style/style_layer/symbol_style_layer.ts +1 -3
  39. package/src/style-spec/CHANGELOG.md +10 -0
  40. package/src/style-spec/composite.test.ts +7 -8
  41. package/src/style-spec/expression/compound_expression.ts +0 -4
  42. package/src/style-spec/expression/definitions/assertion.ts +2 -4
  43. package/src/style-spec/expression/definitions/case.ts +1 -2
  44. package/src/style-spec/expression/definitions/coalesce.ts +1 -3
  45. package/src/style-spec/expression/definitions/coercion.ts +2 -4
  46. package/src/style-spec/expression/definitions/match.ts +0 -3
  47. package/src/style-spec/expression/index.ts +13 -15
  48. package/src/style-spec/expression/parsing_context.ts +4 -4
  49. package/src/style-spec/expression/parsing_error.ts +2 -2
  50. package/src/style-spec/expression/values.ts +0 -2
  51. package/src/style-spec/feature_filter/feature_filter.test.ts +39 -2
  52. package/src/style-spec/function/convert.ts +1 -3
  53. package/src/style-spec/migrate/v8.test.ts +12 -14
  54. package/src/style-spec/migrate/v9.test.ts +2 -4
  55. package/src/style-spec/migrate.test.ts +6 -8
  56. package/src/style-spec/package.json +2 -1
  57. package/src/style-spec/types.g.ts +12 -17
  58. package/src/symbol/collision_index.ts +0 -3
  59. package/src/symbol/path_interpolator.ts +0 -2
  60. package/src/symbol/placement.ts +14 -9
  61. package/src/symbol/shaping.ts +0 -4
  62. package/src/symbol/symbol_layout.ts +56 -56
  63. package/src/ui/camera.ts +0 -10
  64. package/src/ui/control/geolocate_control.ts +4 -6
  65. package/src/ui/handler/handler_util.ts +1 -2
  66. package/src/ui/handler/scroll_zoom.ts +0 -2
  67. package/src/ui/handler_manager.ts +0 -2
  68. package/src/ui/map.test.ts +11 -0
  69. package/src/ui/map.ts +11 -0
  70. package/src/util/ajax.ts +1 -2
  71. package/src/util/color_ramp.ts +1 -2
  72. package/src/util/dictionary_coder.ts +1 -3
  73. package/src/util/dispatcher.ts +1 -4
  74. package/src/util/dom.ts +0 -3
  75. package/src/util/image.ts +1 -3
  76. package/src/util/struct_array.ts +0 -5
  77. package/src/util/task_queue.ts +1 -3
  78. package/src/util/web_worker_transfer.ts +5 -6
@@ -369,8 +369,6 @@ export declare type ExpressionSpecification = [
369
369
  ExpressionInputType | ExpressionSpecification
370
370
  ] | [
371
371
  "coalesce",
372
- ExpressionInputType | ExpressionSpecification,
373
- ExpressionInputType | ExpressionSpecification,
374
372
  ...(ExpressionInputType | ExpressionSpecification)[]
375
373
  ] | [
376
374
  "match",
@@ -386,27 +384,20 @@ export declare type ExpressionSpecification = [
386
384
  "interpolate",
387
385
  InterpolationSpecification,
388
386
  number | ExpressionSpecification,
389
- number | ExpressionSpecification,
390
- ExpressionInputType | ExpressionSpecification,
391
- ...(number | ExpressionInputType | ExpressionSpecification)[]
387
+ ...(number | number[] | ColorSpecification)[]
392
388
  ] | [
393
389
  "interpolate-hcl",
394
390
  InterpolationSpecification,
395
391
  number | ExpressionSpecification,
396
- number | ExpressionSpecification,
397
- ExpressionInputType | ExpressionSpecification,
398
- ...(number | ColorSpecification | ExpressionSpecification)[]
392
+ ...(number | ColorSpecification)[]
399
393
  ] | [
400
394
  "interpolate-lab",
401
395
  InterpolationSpecification,
402
396
  number | ExpressionSpecification,
403
- number | ExpressionSpecification,
404
- ExpressionInputType | ExpressionSpecification,
405
- ...(number | ColorSpecification | ExpressionSpecification)[]
397
+ ...(number | ColorSpecification)[]
406
398
  ] | [
407
399
  "step",
408
400
  number | ExpressionSpecification,
409
- number | ExpressionSpecification,
410
401
  ExpressionInputType | ExpressionSpecification,
411
402
  ...(number | ExpressionInputType | ExpressionSpecification)[]
412
403
  ] | [
@@ -419,8 +410,6 @@ export declare type ExpressionSpecification = [
419
410
  string
420
411
  ] | [
421
412
  "concat",
422
- ExpressionInputType | ExpressionSpecification,
423
- ExpressionInputType | ExpressionSpecification,
424
413
  ...(ExpressionInputType | ExpressionSpecification)[]
425
414
  ] | [
426
415
  "downcase",
@@ -471,8 +460,6 @@ export declare type ExpressionSpecification = [
471
460
  number | ExpressionSpecification
472
461
  ] | [
473
462
  "+",
474
- number | ExpressionSpecification,
475
- number | ExpressionSpecification,
476
463
  ...(number | ExpressionSpecification)[]
477
464
  ] | [
478
465
  "abs",
@@ -10885,6 +10872,11 @@ export declare class Map extends Camera {
10885
10872
  get vertices(): boolean;
10886
10873
  set vertices(value: boolean);
10887
10874
  _setCacheLimits(limit: number, checkThreshold: number): void;
10875
+ /**
10876
+ * Returns the package version of the library
10877
+ * @returns {string} Package version of the library
10878
+ */
10879
+ get version(): string;
10888
10880
  }
10889
10881
  export declare type NavigationOptions = {
10890
10882
  showCompass?: boolean;
@@ -11633,6 +11625,11 @@ declare const exported: {
11633
11625
  * maplibregl.clearPrewarmedResources()
11634
11626
  */
11635
11627
  clearPrewarmedResources: typeof clearPrewarmedResources;
11628
+ /**
11629
+ * Returns the package version of the library
11630
+ * @returns {string} Package version of the library
11631
+ */
11632
+ readonly version: string;
11636
11633
  /**
11637
11634
  * Gets and sets the number of web workers instantiated on a page with GL JS maps.
11638
11635
  * By default, it is set to half the number of CPU cores (capped at 6).