@gooddata/sdk-ui-geo 11.58.0-alpha.0 → 11.58.0-alpha.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.
@@ -1,4 +1,4 @@
1
- import type { CircleLayerSpecification as MapLibreCircleLayerSpecification, ExpressionSpecification as MapLibreExpressionSpecification, FillLayerSpecification as MapLibreFillLayerSpecification, FilterSpecification as MapLibreFilterSpecification, GeoJSONSourceSpecification as MapLibreGeoJSONSourceSpecification, LineLayerSpecification as MapLibreLineLayerSpecification, LngLatBoundsLike as MapLibreLngLatBoundsLike, LngLatLike as MapLibreLngLatLike, Map as MapLibreMap, MapMouseEvent as MapLibreMapMouseEvent, MapOptions as MapLibreMapOptions, Popup as MapLibrePopup, PopupOptions as MapLibrePopupOptions, StyleSpecification as MapLibreStyleSpecification, SymbolLayerSpecification as MapLibreSymbolLayerSpecification } from "maplibre-gl";
1
+ import type { AddProtocolAction as MapLibreAddProtocolAction, CircleLayerSpecification as MapLibreCircleLayerSpecification, ExpressionSpecification as MapLibreExpressionSpecification, FillLayerSpecification as MapLibreFillLayerSpecification, FilterSpecification as MapLibreFilterSpecification, GeoJSONSourceSpecification as MapLibreGeoJSONSourceSpecification, LineLayerSpecification as MapLibreLineLayerSpecification, LngLatBoundsLike as MapLibreLngLatBoundsLike, LngLatLike as MapLibreLngLatLike, Map as MapLibreMap, MapEventType as MapLibreMapEventType, MapMouseEvent as MapLibreMapMouseEvent, MapOptions as MapLibreMapOptions, Popup as MapLibrePopup, PopupOptions as MapLibrePopupOptions, StyleSpecification as MapLibreStyleSpecification, SymbolLayerSpecification as MapLibreSymbolLayerSpecification } from "maplibre-gl";
2
2
  import type { IGeoLngLatBounds } from "../../types/common/coordinates.js";
3
3
  export type Map = MapLibreMap;
4
4
  export type Popup = MapLibrePopup;
@@ -20,9 +20,22 @@ export type LngLatBoundsLike = MapLibreLngLatBoundsLike;
20
20
  export type MapOptions = MapLibreMapOptions;
21
21
  export type PopupOptions = MapLibrePopupOptions;
22
22
  export type MapMouseEvent = MapLibreMapMouseEvent;
23
- type OnceArgs = Parameters<MapLibreMap["once"]>;
24
- type OnArgs = Parameters<MapLibreMap["on"]>;
25
- type OffArgs = Parameters<MapLibreMap["off"]>;
23
+ /**
24
+ * Signature of a handler registered through `maplibregl.addProtocol`.
25
+ */
26
+ export type AddProtocolAction = MapLibreAddProtocolAction;
27
+ /**
28
+ * Name of a map-level MapLibre event.
29
+ *
30
+ * @internal
31
+ */
32
+ export type MapEventName = keyof MapLibreMapEventType;
33
+ /**
34
+ * Listener of one map-level MapLibre event, typed by the event name.
35
+ *
36
+ * @internal
37
+ */
38
+ export type MapEventListener<T extends MapEventName> = (event: MapLibreMapEventType[T]) => void;
26
39
  type AddSourceArgs = Parameters<MapLibreMap["addSource"]>;
27
40
  type AddLayerArgs = Parameters<MapLibreMap["addLayer"]>;
28
41
  type GetLayerArgs = Parameters<MapLibreMap["getLayer"]>;
@@ -53,9 +66,9 @@ type TilesLoadedResult = ReturnType<MapLibreMap["areTilesLoaded"]>;
53
66
  export declare const MAP_FACADE_SOURCE: unique symbol;
54
67
  export interface IMapFacade {
55
68
  isStyleLoaded(): boolean;
56
- once(...args: OnceArgs): IMapFacade;
57
- on(...args: OnArgs): IMapFacade;
58
- off(...args: OffArgs): IMapFacade;
69
+ once<T extends MapEventName>(type: T, listener: MapEventListener<T>): IMapFacade;
70
+ on<T extends MapEventName>(type: T, listener: MapEventListener<T>): IMapFacade;
71
+ off<T extends MapEventName>(type: T, listener: MapEventListener<T>): IMapFacade;
59
72
  addSource(...args: AddSourceArgs): IMapFacade;
60
73
  addLayer(...args: AddLayerArgs): IMapFacade;
61
74
  getLayer(...args: GetLayerArgs): ReturnType<MapLibreMap["getLayer"]>;
@@ -1 +1 @@
1
- {"version":3,"file":"mapFacade.d.ts","sourceRoot":"","sources":["../../../../src/next/layers/common/mapFacade.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACR,wBAAwB,IAA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I,IAAI,CAAC;KAC3B,CAAC;IACF,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAAC,EAAE,WAAW,CAAC;CAC9C;AAED,KAAK,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;AACpD,KAAK,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AAChD,KAAK,eAAe,GAAG,UAAU,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IACzB,SAAS,CAAC,GAAG,IAAI,EAAE,aAAa,GAAG,YAAY,CAAC;IAChD,OAAO,CAAC,GAAG,IAAI,EAAE,WAAW,GAAG,YAAY,CAAC;IAC5C,WAAW,CAAC,GAAG,IAAI,EAAE,eAAe,GAAG,YAAY,CAAC;IACpD,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,YAAY,CAAC;IACxD,KAAK,CAAC,GAAG,EAAE,UAAU,GAAG,YAAY,CAAC;IACrC,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,OAAO,CAAC;IAClB,UAAU,IAAI,WAAW,GAAG,SAAS,CAAC;CACzC;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,UAAU,CAyF5D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,CAiC5D;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,CAEzE"}
@@ -16,16 +16,16 @@ export const MAP_FACADE_SOURCE = Symbol("mapFacadeSource");
16
16
  export function createMapFacade(map) {
17
17
  const facade = {
18
18
  isStyleLoaded: () => Boolean(map.isStyleLoaded()),
19
- once: (...args) => {
20
- void map.once(...args);
19
+ once: (type, listener) => {
20
+ void map.once(type, listener);
21
21
  return facade;
22
22
  },
23
- on: (...args) => {
24
- map.on(...args);
23
+ on: (type, listener) => {
24
+ map.on(type, listener);
25
25
  return facade;
26
26
  },
27
- off: (...args) => {
28
- map.off(...args);
27
+ off: (type, listener) => {
28
+ map.off(type, listener);
29
29
  return facade;
30
30
  },
31
31
  addSource: (...args) => {
@@ -23,9 +23,9 @@ interface IMapInitializationOptions extends IMapOptions {
23
23
  *
24
24
  * @remarks
25
25
  * This function handles the creation of a MapLibre GL map instance with all necessary
26
- * configuration. It dynamically imports maplibre-gl to avoid bundling issues, sets up
27
- * the map with safe default options, and ensures glyphs are properly configured for
28
- * text rendering.
26
+ * configuration. It dynamically imports maplibre-gl to avoid bundling issues, points MapLibre
27
+ * at the worker script this package ships, sets up the map with safe default options, and
28
+ * ensures glyphs are properly configured for text rendering.
29
29
  *
30
30
  * @param options - Map initialization options including container, center, zoom, bounds, etc.
31
31
  * @param locale - Optional MapLibre locale configuration for cooperative gestures
@@ -1 +1 @@
1
- {"version":3,"file":"mapInitialization.d.ts","sourceRoot":"","sources":["../../../../src/next/map/runtime/mapInitialization.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,KAAK,EAGR,GAAG,IAAI,WAAW,EAElB,KAAK,EACR,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAIhE,OAAO,EAGH,KAAK,sBAAsB,EAE9B,MAAM,gBAAgB,CAAC;AAExB;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,WAAW,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IAEf,UAAU,EAAE,cAAc,aAAa,CAAC,CAAC;CAC5C;AAED,UAAU,yBAA0B,SAAQ,WAAW;IACnD,UAAU,CAAC,EAAE,sBAAsB,CAAC,YAAY,CAAC,CAAC;IAClD,eAAe,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;IAC5D,eAAe,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;CAC/D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,qBAAqB,CACvC,EACI,SAAS,EACT,MAAM,EACN,IAAI,EACJ,MAAM,EACN,aAAa,EACb,WAAkB,EAClB,UAAU,EACV,eAAe,EACf,eAAe,EACf,UAAU,EACV,6BAAoC,EACpC,qBAA6B,EAC7B,mBAA0B,EAC1B,OAAO,EACP,KAAK,EACL,OAAO,EACP,QAAQ,GACX,EAAE,yBAAyB,EAC5B,MAAM,CAAC,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,kBAAkB,GAC7B,OAAO,CAAC,cAAc,CAAC,CAwGzB"}
1
+ {"version":3,"file":"mapInitialization.d.ts","sourceRoot":"","sources":["../../../../src/next/map/runtime/mapInitialization.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,KAAK,EAGR,GAAG,IAAI,WAAW,EAElB,KAAK,EACR,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAKhE,OAAO,EAGH,KAAK,sBAAsB,EAE9B,MAAM,gBAAgB,CAAC;AAGxB;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,WAAW,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IAEf,UAAU,EAAE,cAAc,aAAa,CAAC,CAAC;CAC5C;AAED,UAAU,yBAA0B,SAAQ,WAAW;IACnD,UAAU,CAAC,EAAE,sBAAsB,CAAC,YAAY,CAAC,CAAC;IAClD,eAAe,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;IAC5D,eAAe,CAAC,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;CAC/D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,qBAAqB,CACvC,EACI,SAAS,EACT,MAAM,EACN,IAAI,EACJ,MAAM,EACN,aAAa,EACb,WAAkB,EAClB,UAAU,EACV,eAAe,EACf,eAAe,EACf,UAAU,EACV,6BAAoC,EACpC,qBAA6B,EAC7B,mBAA0B,EAC1B,OAAO,EACP,KAAK,EACL,OAAO,EACP,QAAQ,GACX,EAAE,yBAAyB,EAC5B,MAAM,CAAC,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,kBAAkB,GAC7B,OAAO,CAAC,cAAc,CAAC,CA6HzB"}
@@ -1,15 +1,17 @@
1
1
  // (C) 2025-2026 GoodData Corporation
2
+ import { registerGeoAssetProtocol } from "../style/geoAssetProtocol.js";
2
3
  import { fetchMapStyle } from "../style/styleEndpoint.js";
3
4
  import { normalizeBoundsForShortestPath } from "./bounds.js";
4
5
  import { DEFAULT_MAPLIBRE_OPTIONS, DEFAULT_TOOLTIP_OPTIONS, resolveMapInteractionOptions, } from "./mapConfig.js";
6
+ import { ensureMapLibreWorkerUrl } from "./mapWorker.js";
5
7
  /**
6
8
  * Initialize MapLibre GL map instance with options
7
9
  *
8
10
  * @remarks
9
11
  * This function handles the creation of a MapLibre GL map instance with all necessary
10
- * configuration. It dynamically imports maplibre-gl to avoid bundling issues, sets up
11
- * the map with safe default options, and ensures glyphs are properly configured for
12
- * text rendering.
12
+ * configuration. It dynamically imports maplibre-gl to avoid bundling issues, points MapLibre
13
+ * at the worker script this package ships, sets up the map with safe default options, and
14
+ * ensures glyphs are properly configured for text rendering.
13
15
  *
14
16
  * @param options - Map initialization options including container, center, zoom, bounds, etc.
15
17
  * @param locale - Optional MapLibre locale configuration for cooperative gestures
@@ -19,6 +21,7 @@ import { DEFAULT_MAPLIBRE_OPTIONS, DEFAULT_TOOLTIP_OPTIONS, resolveMapInteractio
19
21
  */
20
22
  export async function initializeMapLibreMap({ container, center, zoom, bounds, boundsPadding, interactive = true, dragRotate, pitchWithRotate, touchZoomRotate, navigation, enableGeoChartsViewportConfig = true, preserveDrawingBuffer = false, cooperativeGestures = true, maxZoom, style, basemap, language, }, locale, backend) {
21
23
  const maplibregl = await import("maplibre-gl");
24
+ ensureMapLibreWorkerUrl(maplibregl);
22
25
  const styleSpecification = style ?? (backend ? await fetchMapStyle(backend, basemap, language) : undefined);
23
26
  if (!styleSpecification) {
24
27
  throw new Error("Map style is required. Provide either a style option or a backend instance.");
@@ -29,14 +32,18 @@ export async function initializeMapLibreMap({ container, center, zoom, bounds, b
29
32
  pitchWithRotate,
30
33
  touchZoomRotate,
31
34
  });
35
+ // Tiles, glyphs and sprites served by the backend are loaded through its authenticated call
36
+ // path. Assets on third-party hosts are still fetched by MapLibre directly.
37
+ const geoAssets = backend ? registerGeoAssetProtocol(maplibregl, backend) : undefined;
32
38
  const mapOptions = {
33
39
  ...DEFAULT_MAPLIBRE_OPTIONS,
34
40
  ...interactionOptions,
35
41
  style: styleSpecification,
36
42
  container,
43
+ transformRequest: geoAssets?.transformRequest,
37
44
  ...getNavigationOptions(navigation, interactionOptions),
38
45
  cooperativeGestures,
39
- preserveDrawingBuffer,
46
+ canvasContextAttributes: { preserveDrawingBuffer },
40
47
  ...(cooperativeGestures && locale ? { locale } : {}),
41
48
  };
42
49
  if (maxZoom === null) {
@@ -65,7 +72,19 @@ export async function initializeMapLibreMap({ container, center, zoom, bounds, b
65
72
  else if (typeof zoom === "number") {
66
73
  mapOptions.zoom = zoom;
67
74
  }
68
- const map = new maplibregl.Map(mapOptions);
75
+ let map;
76
+ try {
77
+ map = new maplibregl.Map(mapOptions);
78
+ }
79
+ catch (error) {
80
+ geoAssets?.release();
81
+ throw error;
82
+ }
83
+ // Released only once the map is removed: MapLibre still settles in-flight asset requests
84
+ // while it tears down, and those need the protocol to stay registered.
85
+ if (geoAssets) {
86
+ map.once("remove", geoAssets.release);
87
+ }
69
88
  if (navigation !== undefined &&
70
89
  interactionOptions.interactive &&
71
90
  (navigation?.zoom ?? true) &&
@@ -91,6 +110,7 @@ export async function initializeMapLibreMap({ container, center, zoom, bounds, b
91
110
  cleanup();
92
111
  console.error("[initializeMapLibreMap] Map error", event);
93
112
  reject(new Error(`MapLibre initialization error: ${getMaplibreErrorMessage(event)}`));
113
+ map.remove();
94
114
  };
95
115
  const tryResolveFromCurrentState = () => {
96
116
  if (!isSettled && map.loaded() && map.isStyleLoaded()) {
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Part of the maplibre-gl module this file uses. Declared structurally so that tests need not
3
+ * load the real bundle.
4
+ *
5
+ * @internal
6
+ */
7
+ export interface IMapLibreWorkerConfig {
8
+ getWorkerUrl: () => string;
9
+ setWorkerUrl: (url: string) => void;
10
+ }
11
+ /**
12
+ * URL of the self-contained MapLibre worker script that this package ships.
13
+ *
14
+ * @remarks
15
+ * maplibre-gl 6 does not inline its web worker. It resolves `maplibre-gl-worker.mjs` next to its
16
+ * own module through `import.meta.url`, which does not survive bundling: Vite emits no worker file
17
+ * and webpack replaces `import.meta.url` with a build-time `file:` path. The build of this package
18
+ * bundles the worker and its shared chunk into `worker/maplibre-gl-worker.js` (see
19
+ * `scripts/build.sh`), and this URL points at that file relative to this module.
20
+ *
21
+ * The relative path is the same from `src/next/map/runtime/` and from `esm/next/map/runtime/`, so
22
+ * it also holds when a dev server aliases this package to its sources. Bundlers recognise the
23
+ * `new URL("...", import.meta.url)` pattern and emit the file as an asset.
24
+ *
25
+ * @internal
26
+ */
27
+ export declare function getBundledMapLibreWorkerUrl(): string;
28
+ /**
29
+ * Points MapLibre at the bundled worker unless a worker URL is configured already.
30
+ *
31
+ * @remarks
32
+ * The worker URL is global to the maplibre-gl module. A consumer that called `setWorkerUrl`
33
+ * before the first map is created keeps its own worker.
34
+ *
35
+ * @internal
36
+ */
37
+ export declare function ensureMapLibreWorkerUrl(maplibregl: IMapLibreWorkerConfig): void;
38
+ //# sourceMappingURL=mapWorker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapWorker.d.ts","sourceRoot":"","sources":["../../../../src/next/map/runtime/mapWorker.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IAClC,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,CAEpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAM/E"}
@@ -0,0 +1,35 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /**
3
+ * URL of the self-contained MapLibre worker script that this package ships.
4
+ *
5
+ * @remarks
6
+ * maplibre-gl 6 does not inline its web worker. It resolves `maplibre-gl-worker.mjs` next to its
7
+ * own module through `import.meta.url`, which does not survive bundling: Vite emits no worker file
8
+ * and webpack replaces `import.meta.url` with a build-time `file:` path. The build of this package
9
+ * bundles the worker and its shared chunk into `worker/maplibre-gl-worker.js` (see
10
+ * `scripts/build.sh`), and this URL points at that file relative to this module.
11
+ *
12
+ * The relative path is the same from `src/next/map/runtime/` and from `esm/next/map/runtime/`, so
13
+ * it also holds when a dev server aliases this package to its sources. Bundlers recognise the
14
+ * `new URL("...", import.meta.url)` pattern and emit the file as an asset.
15
+ *
16
+ * @internal
17
+ */
18
+ export function getBundledMapLibreWorkerUrl() {
19
+ return new URL("../../../../worker/maplibre-gl-worker.js", import.meta.url).href;
20
+ }
21
+ /**
22
+ * Points MapLibre at the bundled worker unless a worker URL is configured already.
23
+ *
24
+ * @remarks
25
+ * The worker URL is global to the maplibre-gl module. A consumer that called `setWorkerUrl`
26
+ * before the first map is created keeps its own worker.
27
+ *
28
+ * @internal
29
+ */
30
+ export function ensureMapLibreWorkerUrl(maplibregl) {
31
+ if (maplibregl.getWorkerUrl()) {
32
+ return;
33
+ }
34
+ maplibregl.setWorkerUrl(getBundledMapLibreWorkerUrl());
35
+ }
@@ -0,0 +1,46 @@
1
+ import { type IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
2
+ import type { AddProtocolAction, MapOptions } from "../../layers/common/mapFacade.js";
3
+ /**
4
+ * Part of the maplibre-gl module this file uses. Declared structurally so that tests need not
5
+ * load the real bundle.
6
+ *
7
+ * @internal
8
+ */
9
+ export interface IMapLibreProtocolRegistry {
10
+ addProtocol: (customProtocol: string, loadFn: AddProtocolAction) => void;
11
+ removeProtocol: (customProtocol: string) => void;
12
+ }
13
+ /**
14
+ * Authenticated geo asset protocol of one map.
15
+ *
16
+ * @internal
17
+ */
18
+ export interface IGeoAssetProtocol {
19
+ /**
20
+ * Map option that moves every GoodData-served asset URL onto the protocol. URLs on third-party
21
+ * hosts are left alone: MapLibre keeps fetching them directly, so they never receive credentials.
22
+ */
23
+ transformRequest: NonNullable<MapOptions["transformRequest"]>;
24
+ /**
25
+ * Unregisters the protocol. Call once the map is removed.
26
+ */
27
+ release: () => void;
28
+ }
29
+ /**
30
+ * Registers a MapLibre protocol that loads tiles, glyphs and sprites through the backend's
31
+ * authenticated call path.
32
+ *
33
+ * @remarks
34
+ * MapLibre consults its protocol registry only for URLs whose scheme is neither `http(s):` nor
35
+ * `file:`, so the returned `transformRequest` swaps the scheme of GoodData-served asset URLs. The
36
+ * registry is global to the maplibre-gl module, not per map, so each map gets a protocol of its own,
37
+ * bound to its own backend.
38
+ *
39
+ * The handler runs on the main thread. MapLibre's workers do not know the protocol and forward the
40
+ * request to the main thread themselves, which is what lets the handler read the current credential
41
+ * at request time.
42
+ *
43
+ * @internal
44
+ */
45
+ export declare function registerGeoAssetProtocol(maplibregl: IMapLibreProtocolRegistry, backend: IAnalyticalBackend): IGeoAssetProtocol;
46
+ //# sourceMappingURL=geoAssetProtocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geoAssetProtocol.d.ts","sourceRoot":"","sources":["../../../../src/next/map/style/geoAssetProtocol.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,2BAA2B,CAAC;AAEnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAItF;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACtC,WAAW,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACzE,cAAc,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;OAGG;IACH,gBAAgB,EAAE,WAAW,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC9D;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CACpC,UAAU,EAAE,yBAAyB,EACrC,OAAO,EAAE,kBAAkB,GAC5B,iBAAiB,CAgBnB"}
@@ -0,0 +1,32 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { isGeoAssetUrl } from "@gooddata/sdk-backend-spi";
3
+ let nextProtocolSeq = 0;
4
+ /**
5
+ * Registers a MapLibre protocol that loads tiles, glyphs and sprites through the backend's
6
+ * authenticated call path.
7
+ *
8
+ * @remarks
9
+ * MapLibre consults its protocol registry only for URLs whose scheme is neither `http(s):` nor
10
+ * `file:`, so the returned `transformRequest` swaps the scheme of GoodData-served asset URLs. The
11
+ * registry is global to the maplibre-gl module, not per map, so each map gets a protocol of its own,
12
+ * bound to its own backend.
13
+ *
14
+ * The handler runs on the main thread. MapLibre's workers do not know the protocol and forward the
15
+ * request to the main thread themselves, which is what lets the handler read the current credential
16
+ * at request time.
17
+ *
18
+ * @internal
19
+ */
20
+ export function registerGeoAssetProtocol(maplibregl, backend) {
21
+ const protocol = `gdc-geo-${nextProtocolSeq++}`;
22
+ const prefix = `${protocol}://`;
23
+ maplibregl.addProtocol(protocol, ({ url, type }, abortController) => backend.geo().getAsset(url.slice(prefix.length), {
24
+ // MapLibre expects parsed JSON for "json" requests and raw bytes for everything else.
25
+ responseType: type === "json" ? "json" : "arraybuffer",
26
+ signal: abortController.signal,
27
+ }));
28
+ return {
29
+ transformRequest: (url) => (isGeoAssetUrl(url) ? { url: `${prefix}${url}` } : undefined),
30
+ release: () => maplibregl.removeProtocol(protocol),
31
+ };
32
+ }
@@ -4,11 +4,11 @@ import { type IntlShape } from "react-intl";
4
4
  *
5
5
  * @internal
6
6
  */
7
- export interface IMapLibreLocale {
7
+ export type IMapLibreLocale = {
8
8
  "ScrollZoomBlocker.CtrlMessage": string;
9
9
  "ScrollZoomBlocker.CmdMessage": string;
10
10
  "TouchPanBlocker.Message": string;
11
- }
11
+ };
12
12
  /**
13
13
  * Generate MapLibre locale configuration with translated messages
14
14
  *
@@ -1 +1 @@
1
- {"version":3,"file":"mapLocale.d.ts","sourceRoot":"","sources":["../../../src/next/utils/mapLocale.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC5B,+BAA+B,EAAE,MAAM,CAAC;IACxC,8BAA8B,EAAE,MAAM,CAAC;IACvC,yBAAyB,EAAE,MAAM,CAAC;CACrC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,CAYvE"}
1
+ {"version":3,"file":"mapLocale.d.ts","sourceRoot":"","sources":["../../../src/next/utils/mapLocale.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC1B,+BAA+B,EAAE,MAAM,CAAC;IACxC,8BAA8B,EAAE,MAAM,CAAC;IACvC,yBAAyB,EAAE,MAAM,CAAC;CACrC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,CAYvE"}
@@ -1,4 +1,4 @@
1
- // (C) 2025 GoodData Corporation
1
+ // (C) 2025-2026 GoodData Corporation
2
2
  /**
3
3
  * Generate MapLibre locale configuration with translated messages
4
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-geo",
3
- "version": "11.58.0-alpha.0",
3
+ "version": "11.58.0-alpha.1",
4
4
  "description": "GoodData.UI SDK - Geo Charts",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -15,7 +15,8 @@
15
15
  "esm/**/*.d.ts",
16
16
  "esm/**/*.map",
17
17
  "esm/**/*.svg",
18
- "styles"
18
+ "styles",
19
+ "worker/*.js"
19
20
  ],
20
21
  "type": "module",
21
22
  "sideEffects": [
@@ -37,18 +38,18 @@
37
38
  "default-import": "1.1.5",
38
39
  "lodash-es": "^4.17.23",
39
40
  "mapbox-gl": "^2.6.1",
40
- "maplibre-gl": "^4.7.1",
41
+ "maplibre-gl": "^6.10.0",
41
42
  "react-intl": "10.1.25",
42
43
  "react-measure": "^2.5.2",
43
44
  "ts-invariant": "0.10.3",
44
45
  "tslib": "2.8.1",
45
46
  "uuid": "11.1.1",
46
- "@gooddata/sdk-backend-spi": "11.58.0-alpha.0",
47
- "@gooddata/sdk-model": "11.58.0-alpha.0",
48
- "@gooddata/sdk-ui": "11.58.0-alpha.0",
49
- "@gooddata/sdk-ui-kit": "11.58.0-alpha.0",
50
- "@gooddata/sdk-ui-theme-provider": "11.58.0-alpha.0",
51
- "@gooddata/sdk-ui-vis-commons": "11.58.0-alpha.0"
47
+ "@gooddata/sdk-model": "11.58.0-alpha.1",
48
+ "@gooddata/sdk-backend-spi": "11.58.0-alpha.1",
49
+ "@gooddata/sdk-ui-kit": "11.58.0-alpha.1",
50
+ "@gooddata/sdk-ui": "11.58.0-alpha.1",
51
+ "@gooddata/sdk-ui-theme-provider": "11.58.0-alpha.1",
52
+ "@gooddata/sdk-ui-vis-commons": "11.58.0-alpha.1"
52
53
  },
53
54
  "devDependencies": {
54
55
  "@microsoft/api-documenter": "7.30.10",
@@ -58,7 +59,6 @@
58
59
  "@types/geojson": "^7946.0.16",
59
60
  "@types/lodash-es": "4.17.12",
60
61
  "@types/mapbox-gl": "2.7.21",
61
- "@types/maplibre-gl": "1.14.0",
62
62
  "@types/node": "24.12.0",
63
63
  "@types/react": "19.1.11",
64
64
  "@types/react-dom": "19.1.7",
@@ -82,15 +82,16 @@
82
82
  "raf": "3.4.1",
83
83
  "react": "19.1.1",
84
84
  "react-dom": "19.1.1",
85
+ "rolldown": "1.0.3",
85
86
  "sass": "1.104.1",
86
87
  "stylelint": "16.26.1",
87
88
  "typescript": "7.0.2",
88
89
  "vitest": "4.1.8",
89
90
  "vitest-dom": "0.1.1",
90
- "@gooddata/eslint-config": "11.58.0-alpha.0",
91
- "@gooddata/oxlint-config": "11.58.0-alpha.0",
92
- "@gooddata/sdk-backend-mockingbird": "11.58.0-alpha.0",
93
- "@gooddata/stylelint-config": "11.58.0-alpha.0"
91
+ "@gooddata/oxlint-config": "11.58.0-alpha.1",
92
+ "@gooddata/eslint-config": "11.58.0-alpha.1",
93
+ "@gooddata/stylelint-config": "11.58.0-alpha.1",
94
+ "@gooddata/sdk-backend-mockingbird": "11.58.0-alpha.1"
94
95
  },
95
96
  "peerDependencies": {
96
97
  "react": "^18.0.0 || ^19.0.0",
@@ -104,7 +105,7 @@
104
105
  "build": "bash scripts/build.sh",
105
106
  "build-check": "tsc",
106
107
  "build-ts": "tsc -p tsconfig.build.json",
107
- "clean": "../../common/scripts/clean-command-state.sh && rm -rf ci dist esm styles/css coverage temp *.log tsconfig.tsbuildinfo",
108
+ "clean": "../../common/scripts/clean-command-state.sh && rm -rf ci dist esm worker styles/css coverage temp *.log tsconfig.tsbuildinfo",
108
109
  "dep-cruiser": "depcruise --validate .dependency-cruiser.js --output-type err-long src/",
109
110
  "format-check": "oxfmt --check .",
110
111
  "format-write": "oxfmt .",