@maptiler/sdk 4.0.0-rc.5 → 4.0.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.
package/dist/src/Map.d.ts CHANGED
@@ -24,10 +24,26 @@ export declare const GeolocationType: {
24
24
  * if falls back to the default Mercator
25
25
  */
26
26
  export type ProjectionTypes = "mercator" | "globe" | undefined;
27
+ /**
28
+ * The {@link AttributionControl} options object
29
+ */
30
+ export interface AttributionControlOptions {
31
+ /**
32
+ * If `true`, the attribution control will always collapse when moving the map.
33
+ * If `false` (default), use expanded attribution control that is always visible.
34
+ * If `"auto"` or `undefined`, use responsive attribution that collapses when the user moves the map on maps less than 640 pixels wide.
35
+ * **Attribution should not be collapsed if it can comfortably fit on the map. `compact` should only be used to modify default attribution when map size makes it impossible to fit default attribution. Always prefer `"auto"` to `true` to show the attribution uncollapsed on large maps.**
36
+ */
37
+ compact?: boolean | "auto";
38
+ /**
39
+ * Attributions to show in addition to any other attributions.
40
+ */
41
+ customAttribution?: string | Array<string>;
42
+ }
27
43
  /**
28
44
  * Options to provide to the `Map` constructor
29
45
  */
30
- export type MapOptions = Omit<MapOptionsML, "style" | "maplibreLogo"> & {
46
+ export type MapOptions = Omit<MapOptionsML, "style" | "maplibreLogo" | "attributionControl"> & {
31
47
  /**
32
48
  * Style of the map. Can be:
33
49
  * - a full style URL (possibly with API key)
@@ -63,7 +79,11 @@ export type MapOptions = Omit<MapOptionsML, "style" | "maplibreLogo"> & {
63
79
  */
64
80
  maptilerLogo?: boolean;
65
81
  /**
66
- * Attribution text to show in an {@link AttributionControl}.
82
+ * Options for an {@link AttributionControl}.
83
+ */
84
+ attributionControl?: AttributionControlOptions;
85
+ /**
86
+ * Attributions to show in addition to any other attributions in an {@link AttributionControl}.
67
87
  */
68
88
  customAttribution?: string | Array<string>;
69
89
  /**
@@ -83,7 +83,7 @@ export { MapWheelEvent } from './MLAdapters/MapWheelEvent';
83
83
  export { MapTouchEvent } from './MLAdapters/MapTouchEvent';
84
84
  export { MapMouseEvent } from './MLAdapters/MapMouseEvent';
85
85
  export * from './ml-types';
86
- export { Map, GeolocationType, type MapOptions, type LoadWithTerrainEvent } from './Map';
86
+ export { Map, GeolocationType, type AttributionControlOptions, type MapOptions, type LoadWithTerrainEvent } from './Map';
87
87
  export { type BaseGeocodingOptions, type ByIdGeocodingOptions, type CommonForwardAndReverseGeocodingOptions, type GeocodingOptions, type LanguageGeocodingOptions, type ReverseGeocodingOptions, geocoding, } from './geocoding';
88
88
  export * from './controls';
89
89
  export { type AutomaticStaticMapOptions, type BoundedStaticMapOptions, type BufferToPixelDataFunction, type CenteredStaticMapOptions, type CoordinateExport, type CoordinateGrid, type CoordinateId, type CoordinateSearch, type CoordinateSearchResult, type CoordinateTransformResult, type CoordinateTransformation, type Coordinates, type CoordinatesSearchOptions, type CoordinatesTransformOptions, type DefaultTransformation, type ElevationAtOptions, type ElevationBatchOptions, type FeatureHierarchy, type FetchFunction, type GeocodingFeature, type GeocodingSearchResult, type GeolocationInfoOptions, type GeolocationResult, type GetDataOptions, MapStyle, type MapStylePreset, type MapStyleType, MapStyleVariant, type PixelData, ReferenceMapStyle, ServiceError, type StaticMapBaseOptions, type StaticMapMarker, type TileJSON, type XYZ, bufferToPixelDataBrowser, circumferenceAtLatitude, coordinates, data, elevation, expandMapStyle, geolocation, getBufferToPixelDataParser, getTileCache, mapStylePresetList, math, misc, staticMaps, styleToStyle, type LanguageInfo, areSameLanguages, toLanguageInfo, isLanguageInfo, getAutoLanguage, getLanguageInfoFromFlag, getLanguageInfoFromCode, getLanguageInfoFromKey, canParsePixelData, } from '@maptiler/client';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/sdk",
3
- "version": "4.0.0-rc.5",
3
+ "version": "4.0.0",
4
4
  "description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
5
5
  "author": "MapTiler",
6
6
  "module": "dist/maptiler-sdk.mjs",
@@ -83,7 +83,7 @@
83
83
  "eslint": "^9.21.0",
84
84
  "eslint-config-prettier": "^10.0.2",
85
85
  "eslint-plugin-prettier": "^5.2.3",
86
- "happy-dom": "^17.4.4",
86
+ "happy-dom": "^20.8.9",
87
87
  "husky": "^8.0.0",
88
88
  "jiti": "^2.4.2",
89
89
  "lint-staged": "^15.4.3",
@@ -98,7 +98,7 @@
98
98
  },
99
99
  "dependencies": {
100
100
  "@maplibre/maplibre-gl-style-spec": "^24.7.0",
101
- "@maptiler/client": "^3.0.0-rc.2",
101
+ "@maptiler/client": "^3.0.0",
102
102
  "eslint-plugin-compat": "^6.1.0",
103
103
  "events": "^3.3.0",
104
104
  "gl-matrix": "^3.4.4",