zenit-sdk 0.1.6 → 0.1.7

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/README.md CHANGED
@@ -93,7 +93,7 @@ client.setAccessToken('token-2');
93
93
  client.setSdkToken('sdk-2');
94
94
  client.setAuth({ accessToken: 'token-3', sdkToken: 'sdk-3' });
95
95
 
96
- client.setDefaultFilters(normalizeFilters({ CODREGION: 10 }));
96
+ client.setDefaultFilters(normalizeFilters({ CODREGION: "10" }));
97
97
  const filters = mergeFilters(client.getDefaultFilters(), { CODDEPTO: 7 });
98
98
  console.log('filters', filters);
99
99
  ```
@@ -400,16 +400,16 @@ type ZenitRuntimeConfig = {
400
400
  accessToken?: string;
401
401
  sdkToken?: string;
402
402
  mapId?: number;
403
- defaultFilters?: Record<string, unknown>;
403
+ defaultFilters?: Record<string, string>;
404
404
  };
405
405
  /**
406
406
  * Normalize an unknown filters payload into a plain object.
407
407
  */
408
- declare const normalizeFilters: (filters: unknown) => Record<string, unknown>;
408
+ declare const normalizeFilters: (filters: unknown) => Record<string, string>;
409
409
  /**
410
410
  * Merge two filter objects into a new one (next overrides base).
411
411
  */
412
- declare const mergeFilters: (base?: Record<string, unknown>, next?: Record<string, unknown>) => Record<string, unknown>;
412
+ declare const mergeFilters: (base?: Record<string, string>, next?: Record<string, string>) => Record<string, string>;
413
413
  /**
414
414
  * Resolve runtime config from unknown input, validating and normalizing fields.
415
415
  */
@@ -425,7 +425,7 @@ interface ZenitSdkConfig {
425
425
  accessToken: string;
426
426
  refreshToken?: string;
427
427
  }): void;
428
- defaultFilters?: Record<string, unknown>;
428
+ defaultFilters?: Record<string, string>;
429
429
  }
430
430
  declare class ZenitClient {
431
431
  private readonly config;
@@ -470,11 +470,11 @@ declare class ZenitClient {
470
470
  /**
471
471
  * Store default filters for UI integrations.
472
472
  */
473
- setDefaultFilters(filters: Record<string, unknown> | undefined): void;
473
+ setDefaultFilters(filters: Record<string, string> | undefined): void;
474
474
  /**
475
475
  * Return default filters for UI integrations.
476
476
  */
477
- getDefaultFilters(): Record<string, unknown> | undefined;
477
+ getDefaultFilters(): Record<string, string> | undefined;
478
478
  /**
479
479
  * Get a readonly snapshot of the current SDK config.
480
480
  */
@@ -795,4 +795,4 @@ interface ZenitSelectProps {
795
795
  }
796
796
  declare const ZenitSelect: React.FC<ZenitSelectProps>;
797
797
 
798
- export { type LoadLayerDataParams as $, ZenitLayersClient as A, type Bbox as B, type LayerDto as C, DEFAULT_MAX_FEATURES_FULL_GEOJSON as D, type LayerSummary as E, type FilterMultipleMetadata as F, type GeoJsonFeature as G, type HttpClientOptions as H, type GeoJsonPoint as I, type GeoJsonGeometryCollection as J, type LayerDataStrategy as K, type LayerFilters as L, type MapDto as M, type NormalizedMapLayer as N, type ApiEnvelope as O, type ApiResponseData as P, type LayerMetadata as Q, type RefreshResponse as R, type SdkTokenValidateResponse as S, type GeoJsonBBoxRequest as T, type UserSummary as U, type ValidateResponse as V, type GeoJsonIntersectRequest as W, type LayerAoi as X, type ResolveLayerStrategyParams as Y, type ZenitSdkConfig as Z, type ResolveLayerStrategyResult as _, type GeoJsonFeatureCollection as a, type LoadLayerDataResult as a0, type LayerFeatureCatalogItem as a1, type LayerFeaturesCatalogDto as a2, type FilterValue as a3, type FilterMultipleLayerMeta as a4, type FilterMultipleWithFallbackResult as a5, type LayerBaseState as a6, type LayerOverrideState as a7, type EffectiveLayerState as a8, initLayerStates as a9, getLayerColor as aA, getStyleByLayerId as aB, getAccentByLayerId as aC, type ZoomOpacityOptions as aD, clampNumber as aE, clampOpacity as aF, isPolygonLayer as aG, getZoomOpacityFactor as aH, getLayerZoomOpacityFactor as aI, getEffectiveLayerOpacity as aJ, applyLayerOverrides as aa, resetOverrides as ab, type ChatServiceConfig as ac, type ChatRequestOptions as ad, type ChatStreamCallbacks as ae, sendMessage as af, sendMessageStream as ag, createChatService as ah, type ChatRequestDto as ai, type SuggestedAction as aj, type ChatResponseDto as ak, ZenitMap as al, type ZenitMapRef as am, type LayerSnapshot as an, type ZenitMapProps as ao, ZenitLayerManager as ap, ZenitFeatureFilterPanel as aq, FloatingChatBox as ar, type FloatingChatBoxProps as as, ZenitSelect as at, type ZenitSelectProps as au, type ZenitSelectOption as av, useSendMessage as aw, useSendMessageStream as ax, type LayerStyle$1 as ay, resolveLayerAccent as az, type GeoJsonRequestOptions as b, type GeoJsonPolygon as c, ZenitClient as d, type ZenitRuntimeConfig as e, type LoginRequest as f, type LoginResponse as g, type MeResponse as h, ZenitAuthClient as i, type SdkTokenExchangeResponse as j, ZenitSdkAuthClient as k, type ZenitSdkError as l, mergeFilters as m, normalizeFilters as n, HttpClient as o, ZenitMapsClient as p, type MapSettings as q, resolveRuntimeConfig as r, type MapLayerConfig as s, buildLayerFilters as t, buildFilterMultipleParams as u, shouldUseFilterMultiple as v, shouldSkipGeojsonDownload as w, buildAoiFromFeatureCollection as x, resolveLayerStrategy as y, buildLimitedMessage as z };
798
+ export { type LoadLayerDataParams as $, ZenitLayersClient as A, type Bbox as B, type LayerDto as C, DEFAULT_MAX_FEATURES_FULL_GEOJSON as D, type LayerSummary as E, type FilterMultipleMetadata as F, type GeoJsonFeature as G, type HttpClientOptions as H, type GeoJsonPoint as I, type GeoJsonGeometryCollection as J, type LayerDataStrategy as K, type LayerFilters as L, type MapDto as M, type NormalizedMapLayer as N, type ApiEnvelope as O, type ApiResponseData as P, type LayerMetadata as Q, type RefreshResponse as R, type SdkTokenValidateResponse as S, type GeoJsonBBoxRequest as T, type UserSummary as U, type ValidateResponse as V, type GeoJsonIntersectRequest as W, type LayerAoi as X, type ResolveLayerStrategyParams as Y, ZenitClient as Z, type ResolveLayerStrategyResult as _, type GeoJsonFeatureCollection as a, type LoadLayerDataResult as a0, type LayerFeatureCatalogItem as a1, type LayerFeaturesCatalogDto as a2, type FilterValue as a3, type FilterMultipleLayerMeta as a4, type FilterMultipleWithFallbackResult as a5, type LayerBaseState as a6, type LayerOverrideState as a7, type EffectiveLayerState as a8, initLayerStates as a9, getLayerColor as aA, getStyleByLayerId as aB, getAccentByLayerId as aC, type ZoomOpacityOptions as aD, clampNumber as aE, clampOpacity as aF, isPolygonLayer as aG, getZoomOpacityFactor as aH, getLayerZoomOpacityFactor as aI, getEffectiveLayerOpacity as aJ, applyLayerOverrides as aa, resetOverrides as ab, type ChatServiceConfig as ac, type ChatRequestOptions as ad, type ChatStreamCallbacks as ae, sendMessage as af, sendMessageStream as ag, createChatService as ah, type ChatRequestDto as ai, type SuggestedAction as aj, type ChatResponseDto as ak, ZenitMap as al, type ZenitMapRef as am, type LayerSnapshot as an, type ZenitMapProps as ao, ZenitLayerManager as ap, ZenitFeatureFilterPanel as aq, FloatingChatBox as ar, type FloatingChatBoxProps as as, ZenitSelect as at, type ZenitSelectProps as au, type ZenitSelectOption as av, useSendMessage as aw, useSendMessageStream as ax, type LayerStyle$1 as ay, resolveLayerAccent as az, type GeoJsonRequestOptions as b, type GeoJsonPolygon as c, type ZenitSdkConfig as d, type ZenitRuntimeConfig as e, type LoginRequest as f, type LoginResponse as g, type MeResponse as h, ZenitAuthClient as i, type SdkTokenExchangeResponse as j, ZenitSdkAuthClient as k, type ZenitSdkError as l, mergeFilters as m, normalizeFilters as n, HttpClient as o, ZenitMapsClient as p, type MapSettings as q, resolveRuntimeConfig as r, type MapLayerConfig as s, buildLayerFilters as t, buildFilterMultipleParams as u, shouldUseFilterMultiple as v, shouldSkipGeojsonDownload as w, buildAoiFromFeatureCollection as x, resolveLayerStrategy as y, buildLimitedMessage as z };
@@ -400,16 +400,16 @@ type ZenitRuntimeConfig = {
400
400
  accessToken?: string;
401
401
  sdkToken?: string;
402
402
  mapId?: number;
403
- defaultFilters?: Record<string, unknown>;
403
+ defaultFilters?: Record<string, string>;
404
404
  };
405
405
  /**
406
406
  * Normalize an unknown filters payload into a plain object.
407
407
  */
408
- declare const normalizeFilters: (filters: unknown) => Record<string, unknown>;
408
+ declare const normalizeFilters: (filters: unknown) => Record<string, string>;
409
409
  /**
410
410
  * Merge two filter objects into a new one (next overrides base).
411
411
  */
412
- declare const mergeFilters: (base?: Record<string, unknown>, next?: Record<string, unknown>) => Record<string, unknown>;
412
+ declare const mergeFilters: (base?: Record<string, string>, next?: Record<string, string>) => Record<string, string>;
413
413
  /**
414
414
  * Resolve runtime config from unknown input, validating and normalizing fields.
415
415
  */
@@ -425,7 +425,7 @@ interface ZenitSdkConfig {
425
425
  accessToken: string;
426
426
  refreshToken?: string;
427
427
  }): void;
428
- defaultFilters?: Record<string, unknown>;
428
+ defaultFilters?: Record<string, string>;
429
429
  }
430
430
  declare class ZenitClient {
431
431
  private readonly config;
@@ -470,11 +470,11 @@ declare class ZenitClient {
470
470
  /**
471
471
  * Store default filters for UI integrations.
472
472
  */
473
- setDefaultFilters(filters: Record<string, unknown> | undefined): void;
473
+ setDefaultFilters(filters: Record<string, string> | undefined): void;
474
474
  /**
475
475
  * Return default filters for UI integrations.
476
476
  */
477
- getDefaultFilters(): Record<string, unknown> | undefined;
477
+ getDefaultFilters(): Record<string, string> | undefined;
478
478
  /**
479
479
  * Get a readonly snapshot of the current SDK config.
480
480
  */
@@ -795,4 +795,4 @@ interface ZenitSelectProps {
795
795
  }
796
796
  declare const ZenitSelect: React.FC<ZenitSelectProps>;
797
797
 
798
- export { type LoadLayerDataParams as $, ZenitLayersClient as A, type Bbox as B, type LayerDto as C, DEFAULT_MAX_FEATURES_FULL_GEOJSON as D, type LayerSummary as E, type FilterMultipleMetadata as F, type GeoJsonFeature as G, type HttpClientOptions as H, type GeoJsonPoint as I, type GeoJsonGeometryCollection as J, type LayerDataStrategy as K, type LayerFilters as L, type MapDto as M, type NormalizedMapLayer as N, type ApiEnvelope as O, type ApiResponseData as P, type LayerMetadata as Q, type RefreshResponse as R, type SdkTokenValidateResponse as S, type GeoJsonBBoxRequest as T, type UserSummary as U, type ValidateResponse as V, type GeoJsonIntersectRequest as W, type LayerAoi as X, type ResolveLayerStrategyParams as Y, type ZenitSdkConfig as Z, type ResolveLayerStrategyResult as _, type GeoJsonFeatureCollection as a, type LoadLayerDataResult as a0, type LayerFeatureCatalogItem as a1, type LayerFeaturesCatalogDto as a2, type FilterValue as a3, type FilterMultipleLayerMeta as a4, type FilterMultipleWithFallbackResult as a5, type LayerBaseState as a6, type LayerOverrideState as a7, type EffectiveLayerState as a8, initLayerStates as a9, getLayerColor as aA, getStyleByLayerId as aB, getAccentByLayerId as aC, type ZoomOpacityOptions as aD, clampNumber as aE, clampOpacity as aF, isPolygonLayer as aG, getZoomOpacityFactor as aH, getLayerZoomOpacityFactor as aI, getEffectiveLayerOpacity as aJ, applyLayerOverrides as aa, resetOverrides as ab, type ChatServiceConfig as ac, type ChatRequestOptions as ad, type ChatStreamCallbacks as ae, sendMessage as af, sendMessageStream as ag, createChatService as ah, type ChatRequestDto as ai, type SuggestedAction as aj, type ChatResponseDto as ak, ZenitMap as al, type ZenitMapRef as am, type LayerSnapshot as an, type ZenitMapProps as ao, ZenitLayerManager as ap, ZenitFeatureFilterPanel as aq, FloatingChatBox as ar, type FloatingChatBoxProps as as, ZenitSelect as at, type ZenitSelectProps as au, type ZenitSelectOption as av, useSendMessage as aw, useSendMessageStream as ax, type LayerStyle$1 as ay, resolveLayerAccent as az, type GeoJsonRequestOptions as b, type GeoJsonPolygon as c, ZenitClient as d, type ZenitRuntimeConfig as e, type LoginRequest as f, type LoginResponse as g, type MeResponse as h, ZenitAuthClient as i, type SdkTokenExchangeResponse as j, ZenitSdkAuthClient as k, type ZenitSdkError as l, mergeFilters as m, normalizeFilters as n, HttpClient as o, ZenitMapsClient as p, type MapSettings as q, resolveRuntimeConfig as r, type MapLayerConfig as s, buildLayerFilters as t, buildFilterMultipleParams as u, shouldUseFilterMultiple as v, shouldSkipGeojsonDownload as w, buildAoiFromFeatureCollection as x, resolveLayerStrategy as y, buildLimitedMessage as z };
798
+ export { type LoadLayerDataParams as $, ZenitLayersClient as A, type Bbox as B, type LayerDto as C, DEFAULT_MAX_FEATURES_FULL_GEOJSON as D, type LayerSummary as E, type FilterMultipleMetadata as F, type GeoJsonFeature as G, type HttpClientOptions as H, type GeoJsonPoint as I, type GeoJsonGeometryCollection as J, type LayerDataStrategy as K, type LayerFilters as L, type MapDto as M, type NormalizedMapLayer as N, type ApiEnvelope as O, type ApiResponseData as P, type LayerMetadata as Q, type RefreshResponse as R, type SdkTokenValidateResponse as S, type GeoJsonBBoxRequest as T, type UserSummary as U, type ValidateResponse as V, type GeoJsonIntersectRequest as W, type LayerAoi as X, type ResolveLayerStrategyParams as Y, ZenitClient as Z, type ResolveLayerStrategyResult as _, type GeoJsonFeatureCollection as a, type LoadLayerDataResult as a0, type LayerFeatureCatalogItem as a1, type LayerFeaturesCatalogDto as a2, type FilterValue as a3, type FilterMultipleLayerMeta as a4, type FilterMultipleWithFallbackResult as a5, type LayerBaseState as a6, type LayerOverrideState as a7, type EffectiveLayerState as a8, initLayerStates as a9, getLayerColor as aA, getStyleByLayerId as aB, getAccentByLayerId as aC, type ZoomOpacityOptions as aD, clampNumber as aE, clampOpacity as aF, isPolygonLayer as aG, getZoomOpacityFactor as aH, getLayerZoomOpacityFactor as aI, getEffectiveLayerOpacity as aJ, applyLayerOverrides as aa, resetOverrides as ab, type ChatServiceConfig as ac, type ChatRequestOptions as ad, type ChatStreamCallbacks as ae, sendMessage as af, sendMessageStream as ag, createChatService as ah, type ChatRequestDto as ai, type SuggestedAction as aj, type ChatResponseDto as ak, ZenitMap as al, type ZenitMapRef as am, type LayerSnapshot as an, type ZenitMapProps as ao, ZenitLayerManager as ap, ZenitFeatureFilterPanel as aq, FloatingChatBox as ar, type FloatingChatBoxProps as as, ZenitSelect as at, type ZenitSelectProps as au, type ZenitSelectOption as av, useSendMessage as aw, useSendMessageStream as ax, type LayerStyle$1 as ay, resolveLayerAccent as az, type GeoJsonRequestOptions as b, type GeoJsonPolygon as c, type ZenitSdkConfig as d, type ZenitRuntimeConfig as e, type LoginRequest as f, type LoginResponse as g, type MeResponse as h, ZenitAuthClient as i, type SdkTokenExchangeResponse as j, ZenitSdkAuthClient as k, type ZenitSdkError as l, mergeFilters as m, normalizeFilters as n, HttpClient as o, ZenitMapsClient as p, type MapSettings as q, resolveRuntimeConfig as r, type MapLayerConfig as s, buildLayerFilters as t, buildFilterMultipleParams as u, shouldUseFilterMultiple as v, shouldSkipGeojsonDownload as w, buildAoiFromFeatureCollection as x, resolveLayerStrategy as y, buildLimitedMessage as z };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as MapDto, N as NormalizedMapLayer, G as GeoJsonFeature, B as Bbox, a as GeoJsonFeatureCollection, F as FilterMultipleMetadata, L as LayerFilters, b as GeoJsonRequestOptions, c as GeoJsonPolygon } from './index-uCIChcHJ.mjs';
2
- export { O as ApiEnvelope, P as ApiResponseData, ai as ChatRequestDto, ad as ChatRequestOptions, ak as ChatResponseDto, ac as ChatServiceConfig, ae as ChatStreamCallbacks, D as DEFAULT_MAX_FEATURES_FULL_GEOJSON, a8 as EffectiveLayerState, a4 as FilterMultipleLayerMeta, a5 as FilterMultipleWithFallbackResult, a3 as FilterValue, ar as FloatingChatBox, as as FloatingChatBoxProps, T as GeoJsonBBoxRequest, J as GeoJsonGeometryCollection, W as GeoJsonIntersectRequest, I as GeoJsonPoint, o as HttpClient, H as HttpClientOptions, X as LayerAoi, a6 as LayerBaseState, K as LayerDataStrategy, C as LayerDto, a1 as LayerFeatureCatalogItem, a2 as LayerFeaturesCatalogDto, Q as LayerMetadata, a7 as LayerOverrideState, an as LayerSnapshot, ay as LayerStyle, E as LayerSummary, $ as LoadLayerDataParams, a0 as LoadLayerDataResult, f as LoginRequest, g as LoginResponse, s as MapLayerConfig, q as MapSettings, h as MeResponse, R as RefreshResponse, Y as ResolveLayerStrategyParams, _ as ResolveLayerStrategyResult, j as SdkTokenExchangeResponse, S as SdkTokenValidateResponse, aj as SuggestedAction, U as UserSummary, V as ValidateResponse, i as ZenitAuthClient, d as ZenitClient, aq as ZenitFeatureFilterPanel, ap as ZenitLayerManager, A as ZenitLayersClient, al as ZenitMap, ao as ZenitMapProps, am as ZenitMapRef, p as ZenitMapsClient, e as ZenitRuntimeConfig, k as ZenitSdkAuthClient, Z as ZenitSdkConfig, l as ZenitSdkError, at as ZenitSelect, av as ZenitSelectOption, au as ZenitSelectProps, aD as ZoomOpacityOptions, aa as applyLayerOverrides, x as buildAoiFromFeatureCollection, u as buildFilterMultipleParams, t as buildLayerFilters, z as buildLimitedMessage, aE as clampNumber, aF as clampOpacity, ah as createChatService, aC as getAccentByLayerId, aJ as getEffectiveLayerOpacity, aA as getLayerColor, aI as getLayerZoomOpacityFactor, aB as getStyleByLayerId, aH as getZoomOpacityFactor, a9 as initLayerStates, aG as isPolygonLayer, m as mergeFilters, n as normalizeFilters, ab as resetOverrides, az as resolveLayerAccent, y as resolveLayerStrategy, r as resolveRuntimeConfig, af as sendMessage, ag as sendMessageStream, w as shouldSkipGeojsonDownload, v as shouldUseFilterMultiple, aw as useSendMessage, ax as useSendMessageStream } from './index-uCIChcHJ.mjs';
1
+ import { M as MapDto, N as NormalizedMapLayer, G as GeoJsonFeature, B as Bbox, a as GeoJsonFeatureCollection, F as FilterMultipleMetadata, L as LayerFilters, b as GeoJsonRequestOptions, c as GeoJsonPolygon, Z as ZenitClient } from './index-CUkyMRmp.mjs';
2
+ export { O as ApiEnvelope, P as ApiResponseData, ai as ChatRequestDto, ad as ChatRequestOptions, ak as ChatResponseDto, ac as ChatServiceConfig, ae as ChatStreamCallbacks, D as DEFAULT_MAX_FEATURES_FULL_GEOJSON, a8 as EffectiveLayerState, a4 as FilterMultipleLayerMeta, a5 as FilterMultipleWithFallbackResult, a3 as FilterValue, ar as FloatingChatBox, as as FloatingChatBoxProps, T as GeoJsonBBoxRequest, J as GeoJsonGeometryCollection, W as GeoJsonIntersectRequest, I as GeoJsonPoint, o as HttpClient, H as HttpClientOptions, X as LayerAoi, a6 as LayerBaseState, K as LayerDataStrategy, C as LayerDto, a1 as LayerFeatureCatalogItem, a2 as LayerFeaturesCatalogDto, Q as LayerMetadata, a7 as LayerOverrideState, an as LayerSnapshot, ay as LayerStyle, E as LayerSummary, $ as LoadLayerDataParams, a0 as LoadLayerDataResult, f as LoginRequest, g as LoginResponse, s as MapLayerConfig, q as MapSettings, h as MeResponse, R as RefreshResponse, Y as ResolveLayerStrategyParams, _ as ResolveLayerStrategyResult, j as SdkTokenExchangeResponse, S as SdkTokenValidateResponse, aj as SuggestedAction, U as UserSummary, V as ValidateResponse, i as ZenitAuthClient, aq as ZenitFeatureFilterPanel, ap as ZenitLayerManager, A as ZenitLayersClient, al as ZenitMap, ao as ZenitMapProps, am as ZenitMapRef, p as ZenitMapsClient, e as ZenitRuntimeConfig, k as ZenitSdkAuthClient, d as ZenitSdkConfig, l as ZenitSdkError, at as ZenitSelect, av as ZenitSelectOption, au as ZenitSelectProps, aD as ZoomOpacityOptions, aa as applyLayerOverrides, x as buildAoiFromFeatureCollection, u as buildFilterMultipleParams, t as buildLayerFilters, z as buildLimitedMessage, aE as clampNumber, aF as clampOpacity, ah as createChatService, aC as getAccentByLayerId, aJ as getEffectiveLayerOpacity, aA as getLayerColor, aI as getLayerZoomOpacityFactor, aB as getStyleByLayerId, aH as getZoomOpacityFactor, a9 as initLayerStates, aG as isPolygonLayer, m as mergeFilters, n as normalizeFilters, ab as resetOverrides, az as resolveLayerAccent, y as resolveLayerStrategy, r as resolveRuntimeConfig, af as sendMessage, ag as sendMessageStream, w as shouldSkipGeojsonDownload, v as shouldUseFilterMultiple, aw as useSendMessage, ax as useSendMessageStream } from './index-CUkyMRmp.mjs';
3
3
  export { ChevronDown, ChevronLeft, ChevronRight, Eye, EyeOff, Layers, Upload, X, ZoomIn } from 'lucide-react';
4
4
  import 'react';
5
5
  import 'leaflet';
@@ -102,4 +102,18 @@ declare const decorateFeaturesWithLayerId: (featureCollection: GeoJsonFeatureCol
102
102
  */
103
103
  declare function normalizeBbox(input: unknown): Bbox | null;
104
104
 
105
- export { Bbox, type CatalogSupport, type CatalogSupportReason, FilterEngine, type FilterEngineDecision, type FilterEngineParams, type FilterEngineRequest, FilterMultipleMetadata, type FilteredGeoJSONApplication, GeoJsonFeature, GeoJsonFeatureCollection, GeoJsonPolygon, GeoJsonRequestOptions, LayerFilters, MapDto, NormalizedMapLayer, type Prefilters, ZenitCatalogNotSupportedError, applyFilteredGeoJSONStrategy, applyPrefiltersToFeatureCollection, centroidFromBBox, computeBBoxFromFeature, decorateFeaturesWithLayerId, extractMapDto, filterEngine, getCatalogSupport, normalizeBbox, normalizeMapCenter, normalizeMapLayers };
105
+ interface InitZenitConfig {
106
+ baseUrl: string;
107
+ mapId: number;
108
+ accessToken?: string;
109
+ sdkToken?: string;
110
+ defaultFilters?: Record<string, string>;
111
+ }
112
+ interface InitZenitResult {
113
+ client: ZenitClient;
114
+ mapId: number;
115
+ defaultFilters?: Record<string, string>;
116
+ }
117
+ declare function initZenit(config: InitZenitConfig): InitZenitResult;
118
+
119
+ export { Bbox, type CatalogSupport, type CatalogSupportReason, FilterEngine, type FilterEngineDecision, type FilterEngineParams, type FilterEngineRequest, FilterMultipleMetadata, type FilteredGeoJSONApplication, GeoJsonFeature, GeoJsonFeatureCollection, GeoJsonPolygon, GeoJsonRequestOptions, type InitZenitConfig, type InitZenitResult, LayerFilters, MapDto, NormalizedMapLayer, type Prefilters, ZenitCatalogNotSupportedError, ZenitClient, applyFilteredGeoJSONStrategy, applyPrefiltersToFeatureCollection, centroidFromBBox, computeBBoxFromFeature, decorateFeaturesWithLayerId, extractMapDto, filterEngine, getCatalogSupport, initZenit, normalizeBbox, normalizeMapCenter, normalizeMapLayers };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as MapDto, N as NormalizedMapLayer, G as GeoJsonFeature, B as Bbox, a as GeoJsonFeatureCollection, F as FilterMultipleMetadata, L as LayerFilters, b as GeoJsonRequestOptions, c as GeoJsonPolygon } from './index-uCIChcHJ.js';
2
- export { O as ApiEnvelope, P as ApiResponseData, ai as ChatRequestDto, ad as ChatRequestOptions, ak as ChatResponseDto, ac as ChatServiceConfig, ae as ChatStreamCallbacks, D as DEFAULT_MAX_FEATURES_FULL_GEOJSON, a8 as EffectiveLayerState, a4 as FilterMultipleLayerMeta, a5 as FilterMultipleWithFallbackResult, a3 as FilterValue, ar as FloatingChatBox, as as FloatingChatBoxProps, T as GeoJsonBBoxRequest, J as GeoJsonGeometryCollection, W as GeoJsonIntersectRequest, I as GeoJsonPoint, o as HttpClient, H as HttpClientOptions, X as LayerAoi, a6 as LayerBaseState, K as LayerDataStrategy, C as LayerDto, a1 as LayerFeatureCatalogItem, a2 as LayerFeaturesCatalogDto, Q as LayerMetadata, a7 as LayerOverrideState, an as LayerSnapshot, ay as LayerStyle, E as LayerSummary, $ as LoadLayerDataParams, a0 as LoadLayerDataResult, f as LoginRequest, g as LoginResponse, s as MapLayerConfig, q as MapSettings, h as MeResponse, R as RefreshResponse, Y as ResolveLayerStrategyParams, _ as ResolveLayerStrategyResult, j as SdkTokenExchangeResponse, S as SdkTokenValidateResponse, aj as SuggestedAction, U as UserSummary, V as ValidateResponse, i as ZenitAuthClient, d as ZenitClient, aq as ZenitFeatureFilterPanel, ap as ZenitLayerManager, A as ZenitLayersClient, al as ZenitMap, ao as ZenitMapProps, am as ZenitMapRef, p as ZenitMapsClient, e as ZenitRuntimeConfig, k as ZenitSdkAuthClient, Z as ZenitSdkConfig, l as ZenitSdkError, at as ZenitSelect, av as ZenitSelectOption, au as ZenitSelectProps, aD as ZoomOpacityOptions, aa as applyLayerOverrides, x as buildAoiFromFeatureCollection, u as buildFilterMultipleParams, t as buildLayerFilters, z as buildLimitedMessage, aE as clampNumber, aF as clampOpacity, ah as createChatService, aC as getAccentByLayerId, aJ as getEffectiveLayerOpacity, aA as getLayerColor, aI as getLayerZoomOpacityFactor, aB as getStyleByLayerId, aH as getZoomOpacityFactor, a9 as initLayerStates, aG as isPolygonLayer, m as mergeFilters, n as normalizeFilters, ab as resetOverrides, az as resolveLayerAccent, y as resolveLayerStrategy, r as resolveRuntimeConfig, af as sendMessage, ag as sendMessageStream, w as shouldSkipGeojsonDownload, v as shouldUseFilterMultiple, aw as useSendMessage, ax as useSendMessageStream } from './index-uCIChcHJ.js';
1
+ import { M as MapDto, N as NormalizedMapLayer, G as GeoJsonFeature, B as Bbox, a as GeoJsonFeatureCollection, F as FilterMultipleMetadata, L as LayerFilters, b as GeoJsonRequestOptions, c as GeoJsonPolygon, Z as ZenitClient } from './index-CUkyMRmp.js';
2
+ export { O as ApiEnvelope, P as ApiResponseData, ai as ChatRequestDto, ad as ChatRequestOptions, ak as ChatResponseDto, ac as ChatServiceConfig, ae as ChatStreamCallbacks, D as DEFAULT_MAX_FEATURES_FULL_GEOJSON, a8 as EffectiveLayerState, a4 as FilterMultipleLayerMeta, a5 as FilterMultipleWithFallbackResult, a3 as FilterValue, ar as FloatingChatBox, as as FloatingChatBoxProps, T as GeoJsonBBoxRequest, J as GeoJsonGeometryCollection, W as GeoJsonIntersectRequest, I as GeoJsonPoint, o as HttpClient, H as HttpClientOptions, X as LayerAoi, a6 as LayerBaseState, K as LayerDataStrategy, C as LayerDto, a1 as LayerFeatureCatalogItem, a2 as LayerFeaturesCatalogDto, Q as LayerMetadata, a7 as LayerOverrideState, an as LayerSnapshot, ay as LayerStyle, E as LayerSummary, $ as LoadLayerDataParams, a0 as LoadLayerDataResult, f as LoginRequest, g as LoginResponse, s as MapLayerConfig, q as MapSettings, h as MeResponse, R as RefreshResponse, Y as ResolveLayerStrategyParams, _ as ResolveLayerStrategyResult, j as SdkTokenExchangeResponse, S as SdkTokenValidateResponse, aj as SuggestedAction, U as UserSummary, V as ValidateResponse, i as ZenitAuthClient, aq as ZenitFeatureFilterPanel, ap as ZenitLayerManager, A as ZenitLayersClient, al as ZenitMap, ao as ZenitMapProps, am as ZenitMapRef, p as ZenitMapsClient, e as ZenitRuntimeConfig, k as ZenitSdkAuthClient, d as ZenitSdkConfig, l as ZenitSdkError, at as ZenitSelect, av as ZenitSelectOption, au as ZenitSelectProps, aD as ZoomOpacityOptions, aa as applyLayerOverrides, x as buildAoiFromFeatureCollection, u as buildFilterMultipleParams, t as buildLayerFilters, z as buildLimitedMessage, aE as clampNumber, aF as clampOpacity, ah as createChatService, aC as getAccentByLayerId, aJ as getEffectiveLayerOpacity, aA as getLayerColor, aI as getLayerZoomOpacityFactor, aB as getStyleByLayerId, aH as getZoomOpacityFactor, a9 as initLayerStates, aG as isPolygonLayer, m as mergeFilters, n as normalizeFilters, ab as resetOverrides, az as resolveLayerAccent, y as resolveLayerStrategy, r as resolveRuntimeConfig, af as sendMessage, ag as sendMessageStream, w as shouldSkipGeojsonDownload, v as shouldUseFilterMultiple, aw as useSendMessage, ax as useSendMessageStream } from './index-CUkyMRmp.js';
3
3
  export { ChevronDown, ChevronLeft, ChevronRight, Eye, EyeOff, Layers, Upload, X, ZoomIn } from 'lucide-react';
4
4
  import 'react';
5
5
  import 'leaflet';
@@ -102,4 +102,18 @@ declare const decorateFeaturesWithLayerId: (featureCollection: GeoJsonFeatureCol
102
102
  */
103
103
  declare function normalizeBbox(input: unknown): Bbox | null;
104
104
 
105
- export { Bbox, type CatalogSupport, type CatalogSupportReason, FilterEngine, type FilterEngineDecision, type FilterEngineParams, type FilterEngineRequest, FilterMultipleMetadata, type FilteredGeoJSONApplication, GeoJsonFeature, GeoJsonFeatureCollection, GeoJsonPolygon, GeoJsonRequestOptions, LayerFilters, MapDto, NormalizedMapLayer, type Prefilters, ZenitCatalogNotSupportedError, applyFilteredGeoJSONStrategy, applyPrefiltersToFeatureCollection, centroidFromBBox, computeBBoxFromFeature, decorateFeaturesWithLayerId, extractMapDto, filterEngine, getCatalogSupport, normalizeBbox, normalizeMapCenter, normalizeMapLayers };
105
+ interface InitZenitConfig {
106
+ baseUrl: string;
107
+ mapId: number;
108
+ accessToken?: string;
109
+ sdkToken?: string;
110
+ defaultFilters?: Record<string, string>;
111
+ }
112
+ interface InitZenitResult {
113
+ client: ZenitClient;
114
+ mapId: number;
115
+ defaultFilters?: Record<string, string>;
116
+ }
117
+ declare function initZenit(config: InitZenitConfig): InitZenitResult;
118
+
119
+ export { Bbox, type CatalogSupport, type CatalogSupportReason, FilterEngine, type FilterEngineDecision, type FilterEngineParams, type FilterEngineRequest, FilterMultipleMetadata, type FilteredGeoJSONApplication, GeoJsonFeature, GeoJsonFeatureCollection, GeoJsonPolygon, GeoJsonRequestOptions, type InitZenitConfig, type InitZenitResult, LayerFilters, MapDto, NormalizedMapLayer, type Prefilters, ZenitCatalogNotSupportedError, ZenitClient, applyFilteredGeoJSONStrategy, applyPrefiltersToFeatureCollection, centroidFromBBox, computeBBoxFromFeature, decorateFeaturesWithLayerId, extractMapDto, filterEngine, getCatalogSupport, initZenit, normalizeBbox, normalizeMapCenter, normalizeMapLayers };
package/dist/index.js CHANGED
@@ -76,6 +76,7 @@ __export(src_exports, {
76
76
  getStyleByLayerId: () => getStyleByLayerId,
77
77
  getZoomOpacityFactor: () => getZoomOpacityFactor,
78
78
  initLayerStates: () => initLayerStates,
79
+ initZenit: () => initZenit,
79
80
  isPolygonLayer: () => isPolygonLayer,
80
81
  mergeFilters: () => mergeFilters,
81
82
  normalizeBbox: () => normalizeBbox,
@@ -1065,7 +1066,12 @@ var normalizeFilters = (filters) => {
1065
1066
  if (!isPlainRecord(filters)) {
1066
1067
  return {};
1067
1068
  }
1068
- return { ...filters };
1069
+ return Object.entries(filters).reduce((acc, [key, value]) => {
1070
+ if (typeof value === "string") {
1071
+ acc[key] = value;
1072
+ }
1073
+ return acc;
1074
+ }, {});
1069
1075
  };
1070
1076
  var mergeFilters = (base = {}, next = {}) => ({
1071
1077
  ...base,
@@ -1527,6 +1533,22 @@ function normalizeBbox(input) {
1527
1533
  return null;
1528
1534
  }
1529
1535
 
1536
+ // src/initZenit.ts
1537
+ function initZenit(config) {
1538
+ const sdkConfig = {
1539
+ baseUrl: config.baseUrl,
1540
+ accessToken: config.accessToken,
1541
+ sdkToken: config.sdkToken,
1542
+ defaultFilters: config.defaultFilters
1543
+ };
1544
+ const client = new ZenitClient(sdkConfig);
1545
+ return {
1546
+ client,
1547
+ mapId: config.mapId,
1548
+ defaultFilters: config.defaultFilters ? { ...config.defaultFilters } : void 0
1549
+ };
1550
+ }
1551
+
1530
1552
  // src/react/ZenitMap.tsx
1531
1553
  var import_react5 = __toESM(require("react"));
1532
1554
  var import_react_leaflet4 = require("react-leaflet");
@@ -6046,6 +6068,7 @@ var FloatingChatBox = ({
6046
6068
  getStyleByLayerId,
6047
6069
  getZoomOpacityFactor,
6048
6070
  initLayerStates,
6071
+ initZenit,
6049
6072
  isPolygonLayer,
6050
6073
  mergeFilters,
6051
6074
  normalizeBbox,