zenit-sdk 0.0.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.
@@ -0,0 +1,105 @@
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-C_2fk0Fk.mjs';
2
+ export { E as ApiEnvelope, I as ApiResponseData, ae as ChatRequestDto, a9 as ChatRequestOptions, ag as ChatResponseDto, a8 as ChatServiceConfig, aa as ChatStreamCallbacks, D as DEFAULT_MAX_FEATURES_FULL_GEOJSON, a4 as EffectiveLayerState, a0 as FilterMultipleLayerMeta, a1 as FilterMultipleWithFallbackResult, $ as FilterValue, an as FloatingChatBox, ao as FloatingChatBoxProps, K as GeoJsonBBoxRequest, A as GeoJsonGeometryCollection, O as GeoJsonIntersectRequest, z as GeoJsonPoint, l as HttpClient, H as HttpClientOptions, P as LayerAoi, a2 as LayerBaseState, C as LayerDataStrategy, x as LayerDto, Y as LayerFeatureCatalogItem, _ as LayerFeaturesCatalogDto, J as LayerMetadata, a3 as LayerOverrideState, aj as LayerSnapshot, ar as LayerStyle, y as LayerSummary, W as LoadLayerDataParams, X as LoadLayerDataResult, e as LoginRequest, f as LoginResponse, o as MapLayerConfig, n as MapSettings, g as MeResponse, R as RefreshResponse, Q as ResolveLayerStrategyParams, T as ResolveLayerStrategyResult, i as SdkTokenExchangeResponse, S as SdkTokenValidateResponse, af as SuggestedAction, U as UserSummary, V as ValidateResponse, h as ZenitAuthClient, d as ZenitClient, am as ZenitFeatureFilterPanel, al as ZenitLayerManager, w as ZenitLayersClient, ah as ZenitMap, ak as ZenitMapProps, ai as ZenitMapRef, m as ZenitMapsClient, j as ZenitSdkAuthClient, Z as ZenitSdkConfig, k as ZenitSdkError, aw as ZoomOpacityOptions, a6 as applyLayerOverrides, t as buildAoiFromFeatureCollection, q as buildFilterMultipleParams, p as buildLayerFilters, v as buildLimitedMessage, ax as clampNumber, ay as clampOpacity, ad as createChatService, av as getAccentByLayerId, aC as getEffectiveLayerOpacity, at as getLayerColor, aB as getLayerZoomOpacityFactor, au as getStyleByLayerId, aA as getZoomOpacityFactor, a5 as initLayerStates, az as isPolygonLayer, a7 as resetOverrides, as as resolveLayerAccent, u as resolveLayerStrategy, ab as sendMessage, ac as sendMessageStream, r as shouldSkipGeojsonDownload, s as shouldUseFilterMultiple, ap as useSendMessage, aq as useSendMessageStream } from './index-C_2fk0Fk.mjs';
3
+ export { ChevronLeft, ChevronRight, Eye, EyeOff, Layers, Upload, X, ZoomIn } from 'lucide-react';
4
+ import 'react';
5
+ import 'leaflet';
6
+
7
+ declare function extractMapDto(map: unknown): MapDto | null;
8
+ declare function normalizeMapCenter(map: MapDto): MapDto;
9
+ declare function normalizeMapLayers(mapOrResponse: unknown): NormalizedMapLayer[];
10
+ declare function computeBBoxFromFeature(feature?: GeoJsonFeature | null): Bbox | null;
11
+ declare function centroidFromBBox(bbox: Bbox): [number, number];
12
+ interface FilteredGeoJSONApplication {
13
+ overlay: GeoJsonFeatureCollection | null;
14
+ metadata?: FilterMultipleMetadata;
15
+ layerControls: Array<{
16
+ layerId: number | string;
17
+ visible: boolean;
18
+ opacity: number;
19
+ }>;
20
+ }
21
+ declare function applyFilteredGeoJSONStrategy(options: {
22
+ normalizedLayers: NormalizedMapLayer[];
23
+ filteredGeojson: GeoJsonFeatureCollection | null;
24
+ metadata?: FilterMultipleMetadata;
25
+ }): FilteredGeoJSONApplication;
26
+
27
+ type CatalogSupportReason = 'supported' | 'unsupported-geometry' | 'unknown-geometry';
28
+ type CatalogSupport = {
29
+ supported: boolean;
30
+ reason: CatalogSupportReason;
31
+ layerType?: string;
32
+ geometryType?: string;
33
+ };
34
+ declare function getCatalogSupport(args: {
35
+ layerType?: string;
36
+ geometryType?: string;
37
+ }): CatalogSupport;
38
+ declare class ZenitCatalogNotSupportedError extends Error {
39
+ name: string;
40
+ support: CatalogSupport;
41
+ constructor(support: CatalogSupport, message?: string);
42
+ }
43
+
44
+ type FilterEngineRequest = {
45
+ type: 'filter-multiple';
46
+ layerIds: Array<number | string>;
47
+ filters: LayerFilters;
48
+ } | {
49
+ type: 'filter-layer';
50
+ layerId: number | string;
51
+ filters: LayerFilters;
52
+ } | {
53
+ type: 'geojson';
54
+ layerId: number | string;
55
+ options?: GeoJsonRequestOptions;
56
+ } | {
57
+ type: 'bbox';
58
+ layerId: number | string;
59
+ bbox: Bbox;
60
+ options?: GeoJsonRequestOptions;
61
+ } | {
62
+ type: 'intersect';
63
+ layerId: number | string;
64
+ geometry: GeoJsonPolygon;
65
+ options?: GeoJsonRequestOptions;
66
+ };
67
+ interface FilterEngineDecision {
68
+ nextRequest: FilterEngineRequest;
69
+ reason?: string;
70
+ }
71
+ interface FilterEngineParams {
72
+ layerIds?: Array<number | string>;
73
+ layerId?: number | string;
74
+ filters?: LayerFilters;
75
+ bbox?: Bbox;
76
+ geometry?: GeoJsonPolygon;
77
+ options?: GeoJsonRequestOptions;
78
+ request?: FilterEngineRequest;
79
+ }
80
+ declare class FilterEngine {
81
+ decide(params: FilterEngineParams): FilterEngineDecision;
82
+ }
83
+ declare const filterEngine: FilterEngine;
84
+
85
+ type Prefilters = Record<string, unknown> | null | undefined;
86
+ declare const applyPrefiltersToFeatureCollection: (featureCollection: GeoJsonFeatureCollection, prefilters: Prefilters) => GeoJsonFeatureCollection;
87
+ declare const decorateFeaturesWithLayerId: (featureCollection: GeoJsonFeatureCollection, layerId: number | string) => GeoJsonFeatureCollection;
88
+
89
+ /**
90
+ * Normalizes a bbox input to a standard Bbox object format.
91
+ *
92
+ * Accepts:
93
+ * - Array tuple: [minLon, minLat, maxLon, maxLat]
94
+ * - Object: { minLon, minLat, maxLon, maxLat }
95
+ *
96
+ * Returns:
97
+ * - A valid Bbox object with { minLon, minLat, maxLon, maxLat }
98
+ * - null if the input is invalid or contains non-finite numbers
99
+ *
100
+ * @param input - The bbox to normalize (can be array or object)
101
+ * @returns A normalized Bbox object or null if invalid
102
+ */
103
+ declare function normalizeBbox(input: unknown): Bbox | null;
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 };
@@ -0,0 +1,105 @@
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-C_2fk0Fk.js';
2
+ export { E as ApiEnvelope, I as ApiResponseData, ae as ChatRequestDto, a9 as ChatRequestOptions, ag as ChatResponseDto, a8 as ChatServiceConfig, aa as ChatStreamCallbacks, D as DEFAULT_MAX_FEATURES_FULL_GEOJSON, a4 as EffectiveLayerState, a0 as FilterMultipleLayerMeta, a1 as FilterMultipleWithFallbackResult, $ as FilterValue, an as FloatingChatBox, ao as FloatingChatBoxProps, K as GeoJsonBBoxRequest, A as GeoJsonGeometryCollection, O as GeoJsonIntersectRequest, z as GeoJsonPoint, l as HttpClient, H as HttpClientOptions, P as LayerAoi, a2 as LayerBaseState, C as LayerDataStrategy, x as LayerDto, Y as LayerFeatureCatalogItem, _ as LayerFeaturesCatalogDto, J as LayerMetadata, a3 as LayerOverrideState, aj as LayerSnapshot, ar as LayerStyle, y as LayerSummary, W as LoadLayerDataParams, X as LoadLayerDataResult, e as LoginRequest, f as LoginResponse, o as MapLayerConfig, n as MapSettings, g as MeResponse, R as RefreshResponse, Q as ResolveLayerStrategyParams, T as ResolveLayerStrategyResult, i as SdkTokenExchangeResponse, S as SdkTokenValidateResponse, af as SuggestedAction, U as UserSummary, V as ValidateResponse, h as ZenitAuthClient, d as ZenitClient, am as ZenitFeatureFilterPanel, al as ZenitLayerManager, w as ZenitLayersClient, ah as ZenitMap, ak as ZenitMapProps, ai as ZenitMapRef, m as ZenitMapsClient, j as ZenitSdkAuthClient, Z as ZenitSdkConfig, k as ZenitSdkError, aw as ZoomOpacityOptions, a6 as applyLayerOverrides, t as buildAoiFromFeatureCollection, q as buildFilterMultipleParams, p as buildLayerFilters, v as buildLimitedMessage, ax as clampNumber, ay as clampOpacity, ad as createChatService, av as getAccentByLayerId, aC as getEffectiveLayerOpacity, at as getLayerColor, aB as getLayerZoomOpacityFactor, au as getStyleByLayerId, aA as getZoomOpacityFactor, a5 as initLayerStates, az as isPolygonLayer, a7 as resetOverrides, as as resolveLayerAccent, u as resolveLayerStrategy, ab as sendMessage, ac as sendMessageStream, r as shouldSkipGeojsonDownload, s as shouldUseFilterMultiple, ap as useSendMessage, aq as useSendMessageStream } from './index-C_2fk0Fk.js';
3
+ export { ChevronLeft, ChevronRight, Eye, EyeOff, Layers, Upload, X, ZoomIn } from 'lucide-react';
4
+ import 'react';
5
+ import 'leaflet';
6
+
7
+ declare function extractMapDto(map: unknown): MapDto | null;
8
+ declare function normalizeMapCenter(map: MapDto): MapDto;
9
+ declare function normalizeMapLayers(mapOrResponse: unknown): NormalizedMapLayer[];
10
+ declare function computeBBoxFromFeature(feature?: GeoJsonFeature | null): Bbox | null;
11
+ declare function centroidFromBBox(bbox: Bbox): [number, number];
12
+ interface FilteredGeoJSONApplication {
13
+ overlay: GeoJsonFeatureCollection | null;
14
+ metadata?: FilterMultipleMetadata;
15
+ layerControls: Array<{
16
+ layerId: number | string;
17
+ visible: boolean;
18
+ opacity: number;
19
+ }>;
20
+ }
21
+ declare function applyFilteredGeoJSONStrategy(options: {
22
+ normalizedLayers: NormalizedMapLayer[];
23
+ filteredGeojson: GeoJsonFeatureCollection | null;
24
+ metadata?: FilterMultipleMetadata;
25
+ }): FilteredGeoJSONApplication;
26
+
27
+ type CatalogSupportReason = 'supported' | 'unsupported-geometry' | 'unknown-geometry';
28
+ type CatalogSupport = {
29
+ supported: boolean;
30
+ reason: CatalogSupportReason;
31
+ layerType?: string;
32
+ geometryType?: string;
33
+ };
34
+ declare function getCatalogSupport(args: {
35
+ layerType?: string;
36
+ geometryType?: string;
37
+ }): CatalogSupport;
38
+ declare class ZenitCatalogNotSupportedError extends Error {
39
+ name: string;
40
+ support: CatalogSupport;
41
+ constructor(support: CatalogSupport, message?: string);
42
+ }
43
+
44
+ type FilterEngineRequest = {
45
+ type: 'filter-multiple';
46
+ layerIds: Array<number | string>;
47
+ filters: LayerFilters;
48
+ } | {
49
+ type: 'filter-layer';
50
+ layerId: number | string;
51
+ filters: LayerFilters;
52
+ } | {
53
+ type: 'geojson';
54
+ layerId: number | string;
55
+ options?: GeoJsonRequestOptions;
56
+ } | {
57
+ type: 'bbox';
58
+ layerId: number | string;
59
+ bbox: Bbox;
60
+ options?: GeoJsonRequestOptions;
61
+ } | {
62
+ type: 'intersect';
63
+ layerId: number | string;
64
+ geometry: GeoJsonPolygon;
65
+ options?: GeoJsonRequestOptions;
66
+ };
67
+ interface FilterEngineDecision {
68
+ nextRequest: FilterEngineRequest;
69
+ reason?: string;
70
+ }
71
+ interface FilterEngineParams {
72
+ layerIds?: Array<number | string>;
73
+ layerId?: number | string;
74
+ filters?: LayerFilters;
75
+ bbox?: Bbox;
76
+ geometry?: GeoJsonPolygon;
77
+ options?: GeoJsonRequestOptions;
78
+ request?: FilterEngineRequest;
79
+ }
80
+ declare class FilterEngine {
81
+ decide(params: FilterEngineParams): FilterEngineDecision;
82
+ }
83
+ declare const filterEngine: FilterEngine;
84
+
85
+ type Prefilters = Record<string, unknown> | null | undefined;
86
+ declare const applyPrefiltersToFeatureCollection: (featureCollection: GeoJsonFeatureCollection, prefilters: Prefilters) => GeoJsonFeatureCollection;
87
+ declare const decorateFeaturesWithLayerId: (featureCollection: GeoJsonFeatureCollection, layerId: number | string) => GeoJsonFeatureCollection;
88
+
89
+ /**
90
+ * Normalizes a bbox input to a standard Bbox object format.
91
+ *
92
+ * Accepts:
93
+ * - Array tuple: [minLon, minLat, maxLon, maxLat]
94
+ * - Object: { minLon, minLat, maxLon, maxLat }
95
+ *
96
+ * Returns:
97
+ * - A valid Bbox object with { minLon, minLat, maxLon, maxLat }
98
+ * - null if the input is invalid or contains non-finite numbers
99
+ *
100
+ * @param input - The bbox to normalize (can be array or object)
101
+ * @returns A normalized Bbox object or null if invalid
102
+ */
103
+ declare function normalizeBbox(input: unknown): Bbox | null;
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 };