zenit-sdk 0.0.2 → 0.0.3
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/chunk-R73LRYVJ.mjs +3060 -0
- package/dist/chunk-R73LRYVJ.mjs.map +1 -0
- package/dist/{chat.service-Dr9qCnuT.d.mts → index-Da0hFqDL.d.mts} +187 -1
- package/dist/{chat.service-Dr9qCnuT.d.ts → index-Da0hFqDL.d.ts} +187 -1
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +2764 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +51 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.d.mts +3 -183
- package/dist/react/index.d.ts +3 -183
- package/dist/react/index.js +38 -35
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +25 -2712
- package/dist/react/index.mjs.map +1 -1
- package/package.json +27 -7
- package/dist/chunk-4Y7JCMGR.mjs +0 -330
- package/dist/chunk-4Y7JCMGR.mjs.map +0 -1
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import L, { PathOptions } from 'leaflet';
|
|
3
|
+
import 'lucide-react';
|
|
4
|
+
|
|
1
5
|
interface ZenitSdkError {
|
|
2
6
|
success: false;
|
|
3
7
|
statusCode: number;
|
|
@@ -505,4 +509,186 @@ declare const createChatService: (config: ChatServiceConfig) => {
|
|
|
505
509
|
sendMessageStream: (mapId: number, request: ChatRequestDto, callbacks?: ChatStreamCallbacks, options?: ChatRequestOptions) => Promise<ChatResponseDto>;
|
|
506
510
|
};
|
|
507
511
|
|
|
508
|
-
|
|
512
|
+
interface LayerStyle$1 {
|
|
513
|
+
color?: string;
|
|
514
|
+
weight?: number;
|
|
515
|
+
fillColor?: string;
|
|
516
|
+
fillOpacity?: number;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Resuelve el color de acento para una capa basado en su estilo.
|
|
520
|
+
* Prioridad: fillColor → color → null
|
|
521
|
+
*/
|
|
522
|
+
declare function resolveLayerAccent(style?: LayerStyle$1 | null): string | null;
|
|
523
|
+
/**
|
|
524
|
+
* Obtiene el color de acento para una capa, con fallback a un color neutral.
|
|
525
|
+
* @param style - El estilo de la capa
|
|
526
|
+
* @param fallback - Color de fallback (por defecto gris neutral)
|
|
527
|
+
*/
|
|
528
|
+
declare function getLayerColor(style?: LayerStyle$1 | null, fallback?: string): string;
|
|
529
|
+
/**
|
|
530
|
+
* Busca el estilo de una capa en un arreglo de mapLayers por su layerId.
|
|
531
|
+
*/
|
|
532
|
+
declare function getStyleByLayerId(layerId: string | number, mapLayers?: Array<{
|
|
533
|
+
layerId: number | string;
|
|
534
|
+
style?: LayerStyle$1 | null;
|
|
535
|
+
}>): LayerStyle$1 | null;
|
|
536
|
+
/**
|
|
537
|
+
* Obtiene el color de acento de una capa por su layerId.
|
|
538
|
+
*/
|
|
539
|
+
declare function getAccentByLayerId(layerId: string | number, mapLayers?: Array<{
|
|
540
|
+
layerId: number | string;
|
|
541
|
+
style?: LayerStyle$1 | null;
|
|
542
|
+
}>): string | null;
|
|
543
|
+
|
|
544
|
+
interface LayerSnapshot {
|
|
545
|
+
layerId: number | string;
|
|
546
|
+
visible: boolean;
|
|
547
|
+
opacity: number;
|
|
548
|
+
}
|
|
549
|
+
interface ZenitMapRef {
|
|
550
|
+
setLayerOpacity: (layerId: number | string, opacity: number) => void;
|
|
551
|
+
setLayerVisibility: (layerId: number | string, visible: boolean) => void;
|
|
552
|
+
fitBounds: (bbox: Bbox, options?: {
|
|
553
|
+
padding?: [number, number];
|
|
554
|
+
animate?: boolean;
|
|
555
|
+
}) => void;
|
|
556
|
+
setView: (coordinates: {
|
|
557
|
+
lat: number;
|
|
558
|
+
lon: number;
|
|
559
|
+
}, zoom?: number) => void;
|
|
560
|
+
getLayerSnapshot: () => LayerSnapshot[];
|
|
561
|
+
restoreLayerSnapshot: (snapshot: LayerSnapshot[]) => void;
|
|
562
|
+
highlightFeature: (layerId: number | string, featureId?: number | string) => void;
|
|
563
|
+
getMapInstance: () => L.Map | null;
|
|
564
|
+
}
|
|
565
|
+
interface ZenitMapProps {
|
|
566
|
+
client: ZenitClient;
|
|
567
|
+
mapId: number;
|
|
568
|
+
height?: string;
|
|
569
|
+
width?: string;
|
|
570
|
+
initialZoom?: number;
|
|
571
|
+
initialCenter?: [number, number];
|
|
572
|
+
showLayerPanel?: boolean;
|
|
573
|
+
overlayGeojson?: GeoJsonFeatureCollection | null;
|
|
574
|
+
overlayStyle?: PathOptions;
|
|
575
|
+
layerControls?: Array<{
|
|
576
|
+
layerId: number | string;
|
|
577
|
+
visible?: boolean;
|
|
578
|
+
opacity?: number;
|
|
579
|
+
}>;
|
|
580
|
+
layerStates?: EffectiveLayerState[];
|
|
581
|
+
layerGeojson?: Record<string | number, GeoJsonFeatureCollection | null | undefined>;
|
|
582
|
+
onLayerStateChange?: (states: EffectiveLayerState[]) => void;
|
|
583
|
+
onError?: (error: unknown, ctx: 'map') => void;
|
|
584
|
+
onLoadingChange?: (ctx: 'map', loading: boolean) => void;
|
|
585
|
+
onFeatureClick?: (feature: any, layerId?: number | string) => void;
|
|
586
|
+
onFeatureHover?: (feature: any, layerId?: number | string) => void;
|
|
587
|
+
featureInfoMode?: 'popup' | 'none';
|
|
588
|
+
mapLayers?: Array<{
|
|
589
|
+
layerId: number | string;
|
|
590
|
+
style?: LayerStyle$1 | null;
|
|
591
|
+
}>;
|
|
592
|
+
zoomToBbox?: Bbox | null;
|
|
593
|
+
zoomToGeojson?: GeoJsonFeatureCollection | null;
|
|
594
|
+
onZoomChange?: (zoom: number) => void;
|
|
595
|
+
onMapReady?: (map: L.Map) => void;
|
|
596
|
+
}
|
|
597
|
+
declare const ZenitMap: React.ForwardRefExoticComponent<ZenitMapProps & React.RefAttributes<ZenitMapRef>>;
|
|
598
|
+
|
|
599
|
+
interface LayerStyle {
|
|
600
|
+
color?: string;
|
|
601
|
+
weight?: number;
|
|
602
|
+
fillColor?: string;
|
|
603
|
+
fillOpacity?: number;
|
|
604
|
+
}
|
|
605
|
+
interface ZenitLayerManagerProps {
|
|
606
|
+
client: ZenitClient;
|
|
607
|
+
mapId: number | string;
|
|
608
|
+
side?: 'left' | 'right';
|
|
609
|
+
className?: string;
|
|
610
|
+
style?: React.CSSProperties;
|
|
611
|
+
height?: string;
|
|
612
|
+
layerStates?: EffectiveLayerState[];
|
|
613
|
+
onLayerStatesChange?: (states: EffectiveLayerState[]) => void;
|
|
614
|
+
mapZoom?: number;
|
|
615
|
+
autoOpacityOnZoom?: boolean;
|
|
616
|
+
autoOpacityConfig?: {
|
|
617
|
+
minZoom?: number;
|
|
618
|
+
maxZoom?: number;
|
|
619
|
+
minOpacity?: number;
|
|
620
|
+
maxOpacity?: number;
|
|
621
|
+
};
|
|
622
|
+
showUploadTab?: boolean;
|
|
623
|
+
showLayerVisibilityIcon?: boolean;
|
|
624
|
+
layerFeatureCounts?: Record<string | number, number | null | undefined>;
|
|
625
|
+
mapLayers?: Array<{
|
|
626
|
+
layerId: number | string;
|
|
627
|
+
geometryType?: string | null;
|
|
628
|
+
layerType?: string | null;
|
|
629
|
+
name?: string | null;
|
|
630
|
+
style?: LayerStyle | null;
|
|
631
|
+
bboxGeometry?: GeoJsonPolygon | null;
|
|
632
|
+
displayOrder?: number | null;
|
|
633
|
+
}>;
|
|
634
|
+
onZoomToLayer?: (layerId: number | string, bboxGeometry?: GeoJsonPolygon | null) => void;
|
|
635
|
+
}
|
|
636
|
+
declare const ZenitLayerManager: React.FC<ZenitLayerManagerProps>;
|
|
637
|
+
|
|
638
|
+
interface ZenitFeatureFilterPanelProps {
|
|
639
|
+
title?: string;
|
|
640
|
+
description?: string;
|
|
641
|
+
className?: string;
|
|
642
|
+
style?: React.CSSProperties;
|
|
643
|
+
filters?: LayerFilters;
|
|
644
|
+
onChange?: (filters: LayerFilters) => void;
|
|
645
|
+
children?: React.ReactNode;
|
|
646
|
+
}
|
|
647
|
+
declare const ZenitFeatureFilterPanel: React.FC<ZenitFeatureFilterPanelProps>;
|
|
648
|
+
|
|
649
|
+
interface FloatingChatBoxProps {
|
|
650
|
+
mapId?: number;
|
|
651
|
+
filteredLayerIds?: number[];
|
|
652
|
+
filters?: Record<string, unknown>;
|
|
653
|
+
userId?: number | null;
|
|
654
|
+
baseUrl?: string;
|
|
655
|
+
accessToken?: string;
|
|
656
|
+
getAccessToken?: () => string | Promise<string>;
|
|
657
|
+
onActionClick?: (action: SuggestedAction) => void;
|
|
658
|
+
/** Called when the chat panel opens or closes. */
|
|
659
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
660
|
+
/** When true, the floating action button is hidden (panel can still be open). */
|
|
661
|
+
hideButton?: boolean;
|
|
662
|
+
}
|
|
663
|
+
declare const FloatingChatBox: React.FC<FloatingChatBoxProps>;
|
|
664
|
+
|
|
665
|
+
declare const useSendMessage: (config?: ChatServiceConfig) => {
|
|
666
|
+
sendMessage: (mapId: number, request: ChatRequestDto, options?: ChatRequestOptions) => Promise<ChatResponseDto>;
|
|
667
|
+
isLoading: boolean;
|
|
668
|
+
error: unknown;
|
|
669
|
+
};
|
|
670
|
+
declare const useSendMessageStream: (config?: ChatServiceConfig) => {
|
|
671
|
+
sendMessage: (mapId: number, request: ChatRequestDto, options?: ChatRequestOptions) => Promise<ChatResponseDto>;
|
|
672
|
+
isStreaming: boolean;
|
|
673
|
+
streamingText: string;
|
|
674
|
+
completeResponse: ChatResponseDto | null;
|
|
675
|
+
error: unknown;
|
|
676
|
+
reset: () => void;
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
interface ZoomOpacityOptions {
|
|
680
|
+
minZoom?: number;
|
|
681
|
+
maxZoom?: number;
|
|
682
|
+
minFactor?: number;
|
|
683
|
+
maxFactor?: number;
|
|
684
|
+
minOpacity?: number;
|
|
685
|
+
maxOpacity?: number;
|
|
686
|
+
}
|
|
687
|
+
declare function clampNumber(value: number, min: number, max: number): number;
|
|
688
|
+
declare function clampOpacity(value: number): number;
|
|
689
|
+
declare function isPolygonLayer(layerType?: string, geometryType?: string): boolean;
|
|
690
|
+
declare function getZoomOpacityFactor(zoom: number, options?: ZoomOpacityOptions): number;
|
|
691
|
+
declare function getLayerZoomOpacityFactor(zoom: number, layerType?: string, geometryType?: string, options?: ZoomOpacityOptions): number;
|
|
692
|
+
declare function getEffectiveLayerOpacity(baseOpacity: number, zoom: number, layerType?: string, geometryType?: string, options?: ZoomOpacityOptions): number;
|
|
693
|
+
|
|
694
|
+
export { type FilterValue as $, type GeoJsonGeometryCollection as A, type Bbox as B, type LayerDataStrategy as C, DEFAULT_MAX_FEATURES_FULL_GEOJSON as D, type ApiEnvelope as E, type FilterMultipleMetadata as F, type GeoJsonFeature as G, type HttpClientOptions as H, type ApiResponseData as I, type LayerMetadata as J, type GeoJsonBBoxRequest as K, type LayerFilters as L, type MapDto as M, type NormalizedMapLayer as N, type GeoJsonIntersectRequest as O, type LayerAoi as P, type ResolveLayerStrategyParams as Q, type RefreshResponse as R, type SdkTokenValidateResponse as S, type ResolveLayerStrategyResult as T, type UserSummary as U, type ValidateResponse as V, type LoadLayerDataParams as W, type LoadLayerDataResult as X, type LayerFeatureCatalogItem as Y, type ZenitSdkConfig as Z, type LayerFeaturesCatalogDto as _, type GeoJsonFeatureCollection as a, type FilterMultipleLayerMeta as a0, type FilterMultipleWithFallbackResult as a1, type LayerBaseState as a2, type LayerOverrideState as a3, type EffectiveLayerState as a4, initLayerStates as a5, applyLayerOverrides as a6, resetOverrides as a7, type ChatServiceConfig as a8, type ChatRequestOptions as a9, getZoomOpacityFactor as aA, getLayerZoomOpacityFactor as aB, getEffectiveLayerOpacity as aC, type ChatStreamCallbacks as aa, sendMessage as ab, sendMessageStream as ac, createChatService as ad, type ChatRequestDto as ae, type SuggestedAction as af, type ChatResponseDto as ag, ZenitMap as ah, type ZenitMapRef as ai, type LayerSnapshot as aj, type ZenitMapProps as ak, ZenitLayerManager as al, ZenitFeatureFilterPanel as am, FloatingChatBox as an, type FloatingChatBoxProps as ao, useSendMessage as ap, useSendMessageStream as aq, type LayerStyle$1 as ar, resolveLayerAccent as as, getLayerColor as at, getStyleByLayerId as au, getAccentByLayerId as av, type ZoomOpacityOptions as aw, clampNumber as ax, clampOpacity as ay, isPolygonLayer as az, type GeoJsonRequestOptions as b, type GeoJsonPolygon as c, ZenitClient as d, type LoginRequest as e, type LoginResponse as f, type MeResponse as g, ZenitAuthClient as h, type SdkTokenExchangeResponse as i, ZenitSdkAuthClient as j, type ZenitSdkError as k, HttpClient as l, ZenitMapsClient as m, type MapSettings as n, type MapLayerConfig as o, buildLayerFilters as p, buildFilterMultipleParams as q, shouldSkipGeojsonDownload as r, shouldUseFilterMultiple as s, buildAoiFromFeatureCollection as t, resolveLayerStrategy as u, buildLimitedMessage as v, ZenitLayersClient as w, type LayerDto as x, type LayerSummary as y, type GeoJsonPoint as z };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import L, { PathOptions } from 'leaflet';
|
|
3
|
+
import 'lucide-react';
|
|
4
|
+
|
|
1
5
|
interface ZenitSdkError {
|
|
2
6
|
success: false;
|
|
3
7
|
statusCode: number;
|
|
@@ -505,4 +509,186 @@ declare const createChatService: (config: ChatServiceConfig) => {
|
|
|
505
509
|
sendMessageStream: (mapId: number, request: ChatRequestDto, callbacks?: ChatStreamCallbacks, options?: ChatRequestOptions) => Promise<ChatResponseDto>;
|
|
506
510
|
};
|
|
507
511
|
|
|
508
|
-
|
|
512
|
+
interface LayerStyle$1 {
|
|
513
|
+
color?: string;
|
|
514
|
+
weight?: number;
|
|
515
|
+
fillColor?: string;
|
|
516
|
+
fillOpacity?: number;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Resuelve el color de acento para una capa basado en su estilo.
|
|
520
|
+
* Prioridad: fillColor → color → null
|
|
521
|
+
*/
|
|
522
|
+
declare function resolveLayerAccent(style?: LayerStyle$1 | null): string | null;
|
|
523
|
+
/**
|
|
524
|
+
* Obtiene el color de acento para una capa, con fallback a un color neutral.
|
|
525
|
+
* @param style - El estilo de la capa
|
|
526
|
+
* @param fallback - Color de fallback (por defecto gris neutral)
|
|
527
|
+
*/
|
|
528
|
+
declare function getLayerColor(style?: LayerStyle$1 | null, fallback?: string): string;
|
|
529
|
+
/**
|
|
530
|
+
* Busca el estilo de una capa en un arreglo de mapLayers por su layerId.
|
|
531
|
+
*/
|
|
532
|
+
declare function getStyleByLayerId(layerId: string | number, mapLayers?: Array<{
|
|
533
|
+
layerId: number | string;
|
|
534
|
+
style?: LayerStyle$1 | null;
|
|
535
|
+
}>): LayerStyle$1 | null;
|
|
536
|
+
/**
|
|
537
|
+
* Obtiene el color de acento de una capa por su layerId.
|
|
538
|
+
*/
|
|
539
|
+
declare function getAccentByLayerId(layerId: string | number, mapLayers?: Array<{
|
|
540
|
+
layerId: number | string;
|
|
541
|
+
style?: LayerStyle$1 | null;
|
|
542
|
+
}>): string | null;
|
|
543
|
+
|
|
544
|
+
interface LayerSnapshot {
|
|
545
|
+
layerId: number | string;
|
|
546
|
+
visible: boolean;
|
|
547
|
+
opacity: number;
|
|
548
|
+
}
|
|
549
|
+
interface ZenitMapRef {
|
|
550
|
+
setLayerOpacity: (layerId: number | string, opacity: number) => void;
|
|
551
|
+
setLayerVisibility: (layerId: number | string, visible: boolean) => void;
|
|
552
|
+
fitBounds: (bbox: Bbox, options?: {
|
|
553
|
+
padding?: [number, number];
|
|
554
|
+
animate?: boolean;
|
|
555
|
+
}) => void;
|
|
556
|
+
setView: (coordinates: {
|
|
557
|
+
lat: number;
|
|
558
|
+
lon: number;
|
|
559
|
+
}, zoom?: number) => void;
|
|
560
|
+
getLayerSnapshot: () => LayerSnapshot[];
|
|
561
|
+
restoreLayerSnapshot: (snapshot: LayerSnapshot[]) => void;
|
|
562
|
+
highlightFeature: (layerId: number | string, featureId?: number | string) => void;
|
|
563
|
+
getMapInstance: () => L.Map | null;
|
|
564
|
+
}
|
|
565
|
+
interface ZenitMapProps {
|
|
566
|
+
client: ZenitClient;
|
|
567
|
+
mapId: number;
|
|
568
|
+
height?: string;
|
|
569
|
+
width?: string;
|
|
570
|
+
initialZoom?: number;
|
|
571
|
+
initialCenter?: [number, number];
|
|
572
|
+
showLayerPanel?: boolean;
|
|
573
|
+
overlayGeojson?: GeoJsonFeatureCollection | null;
|
|
574
|
+
overlayStyle?: PathOptions;
|
|
575
|
+
layerControls?: Array<{
|
|
576
|
+
layerId: number | string;
|
|
577
|
+
visible?: boolean;
|
|
578
|
+
opacity?: number;
|
|
579
|
+
}>;
|
|
580
|
+
layerStates?: EffectiveLayerState[];
|
|
581
|
+
layerGeojson?: Record<string | number, GeoJsonFeatureCollection | null | undefined>;
|
|
582
|
+
onLayerStateChange?: (states: EffectiveLayerState[]) => void;
|
|
583
|
+
onError?: (error: unknown, ctx: 'map') => void;
|
|
584
|
+
onLoadingChange?: (ctx: 'map', loading: boolean) => void;
|
|
585
|
+
onFeatureClick?: (feature: any, layerId?: number | string) => void;
|
|
586
|
+
onFeatureHover?: (feature: any, layerId?: number | string) => void;
|
|
587
|
+
featureInfoMode?: 'popup' | 'none';
|
|
588
|
+
mapLayers?: Array<{
|
|
589
|
+
layerId: number | string;
|
|
590
|
+
style?: LayerStyle$1 | null;
|
|
591
|
+
}>;
|
|
592
|
+
zoomToBbox?: Bbox | null;
|
|
593
|
+
zoomToGeojson?: GeoJsonFeatureCollection | null;
|
|
594
|
+
onZoomChange?: (zoom: number) => void;
|
|
595
|
+
onMapReady?: (map: L.Map) => void;
|
|
596
|
+
}
|
|
597
|
+
declare const ZenitMap: React.ForwardRefExoticComponent<ZenitMapProps & React.RefAttributes<ZenitMapRef>>;
|
|
598
|
+
|
|
599
|
+
interface LayerStyle {
|
|
600
|
+
color?: string;
|
|
601
|
+
weight?: number;
|
|
602
|
+
fillColor?: string;
|
|
603
|
+
fillOpacity?: number;
|
|
604
|
+
}
|
|
605
|
+
interface ZenitLayerManagerProps {
|
|
606
|
+
client: ZenitClient;
|
|
607
|
+
mapId: number | string;
|
|
608
|
+
side?: 'left' | 'right';
|
|
609
|
+
className?: string;
|
|
610
|
+
style?: React.CSSProperties;
|
|
611
|
+
height?: string;
|
|
612
|
+
layerStates?: EffectiveLayerState[];
|
|
613
|
+
onLayerStatesChange?: (states: EffectiveLayerState[]) => void;
|
|
614
|
+
mapZoom?: number;
|
|
615
|
+
autoOpacityOnZoom?: boolean;
|
|
616
|
+
autoOpacityConfig?: {
|
|
617
|
+
minZoom?: number;
|
|
618
|
+
maxZoom?: number;
|
|
619
|
+
minOpacity?: number;
|
|
620
|
+
maxOpacity?: number;
|
|
621
|
+
};
|
|
622
|
+
showUploadTab?: boolean;
|
|
623
|
+
showLayerVisibilityIcon?: boolean;
|
|
624
|
+
layerFeatureCounts?: Record<string | number, number | null | undefined>;
|
|
625
|
+
mapLayers?: Array<{
|
|
626
|
+
layerId: number | string;
|
|
627
|
+
geometryType?: string | null;
|
|
628
|
+
layerType?: string | null;
|
|
629
|
+
name?: string | null;
|
|
630
|
+
style?: LayerStyle | null;
|
|
631
|
+
bboxGeometry?: GeoJsonPolygon | null;
|
|
632
|
+
displayOrder?: number | null;
|
|
633
|
+
}>;
|
|
634
|
+
onZoomToLayer?: (layerId: number | string, bboxGeometry?: GeoJsonPolygon | null) => void;
|
|
635
|
+
}
|
|
636
|
+
declare const ZenitLayerManager: React.FC<ZenitLayerManagerProps>;
|
|
637
|
+
|
|
638
|
+
interface ZenitFeatureFilterPanelProps {
|
|
639
|
+
title?: string;
|
|
640
|
+
description?: string;
|
|
641
|
+
className?: string;
|
|
642
|
+
style?: React.CSSProperties;
|
|
643
|
+
filters?: LayerFilters;
|
|
644
|
+
onChange?: (filters: LayerFilters) => void;
|
|
645
|
+
children?: React.ReactNode;
|
|
646
|
+
}
|
|
647
|
+
declare const ZenitFeatureFilterPanel: React.FC<ZenitFeatureFilterPanelProps>;
|
|
648
|
+
|
|
649
|
+
interface FloatingChatBoxProps {
|
|
650
|
+
mapId?: number;
|
|
651
|
+
filteredLayerIds?: number[];
|
|
652
|
+
filters?: Record<string, unknown>;
|
|
653
|
+
userId?: number | null;
|
|
654
|
+
baseUrl?: string;
|
|
655
|
+
accessToken?: string;
|
|
656
|
+
getAccessToken?: () => string | Promise<string>;
|
|
657
|
+
onActionClick?: (action: SuggestedAction) => void;
|
|
658
|
+
/** Called when the chat panel opens or closes. */
|
|
659
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
660
|
+
/** When true, the floating action button is hidden (panel can still be open). */
|
|
661
|
+
hideButton?: boolean;
|
|
662
|
+
}
|
|
663
|
+
declare const FloatingChatBox: React.FC<FloatingChatBoxProps>;
|
|
664
|
+
|
|
665
|
+
declare const useSendMessage: (config?: ChatServiceConfig) => {
|
|
666
|
+
sendMessage: (mapId: number, request: ChatRequestDto, options?: ChatRequestOptions) => Promise<ChatResponseDto>;
|
|
667
|
+
isLoading: boolean;
|
|
668
|
+
error: unknown;
|
|
669
|
+
};
|
|
670
|
+
declare const useSendMessageStream: (config?: ChatServiceConfig) => {
|
|
671
|
+
sendMessage: (mapId: number, request: ChatRequestDto, options?: ChatRequestOptions) => Promise<ChatResponseDto>;
|
|
672
|
+
isStreaming: boolean;
|
|
673
|
+
streamingText: string;
|
|
674
|
+
completeResponse: ChatResponseDto | null;
|
|
675
|
+
error: unknown;
|
|
676
|
+
reset: () => void;
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
interface ZoomOpacityOptions {
|
|
680
|
+
minZoom?: number;
|
|
681
|
+
maxZoom?: number;
|
|
682
|
+
minFactor?: number;
|
|
683
|
+
maxFactor?: number;
|
|
684
|
+
minOpacity?: number;
|
|
685
|
+
maxOpacity?: number;
|
|
686
|
+
}
|
|
687
|
+
declare function clampNumber(value: number, min: number, max: number): number;
|
|
688
|
+
declare function clampOpacity(value: number): number;
|
|
689
|
+
declare function isPolygonLayer(layerType?: string, geometryType?: string): boolean;
|
|
690
|
+
declare function getZoomOpacityFactor(zoom: number, options?: ZoomOpacityOptions): number;
|
|
691
|
+
declare function getLayerZoomOpacityFactor(zoom: number, layerType?: string, geometryType?: string, options?: ZoomOpacityOptions): number;
|
|
692
|
+
declare function getEffectiveLayerOpacity(baseOpacity: number, zoom: number, layerType?: string, geometryType?: string, options?: ZoomOpacityOptions): number;
|
|
693
|
+
|
|
694
|
+
export { type FilterValue as $, type GeoJsonGeometryCollection as A, type Bbox as B, type LayerDataStrategy as C, DEFAULT_MAX_FEATURES_FULL_GEOJSON as D, type ApiEnvelope as E, type FilterMultipleMetadata as F, type GeoJsonFeature as G, type HttpClientOptions as H, type ApiResponseData as I, type LayerMetadata as J, type GeoJsonBBoxRequest as K, type LayerFilters as L, type MapDto as M, type NormalizedMapLayer as N, type GeoJsonIntersectRequest as O, type LayerAoi as P, type ResolveLayerStrategyParams as Q, type RefreshResponse as R, type SdkTokenValidateResponse as S, type ResolveLayerStrategyResult as T, type UserSummary as U, type ValidateResponse as V, type LoadLayerDataParams as W, type LoadLayerDataResult as X, type LayerFeatureCatalogItem as Y, type ZenitSdkConfig as Z, type LayerFeaturesCatalogDto as _, type GeoJsonFeatureCollection as a, type FilterMultipleLayerMeta as a0, type FilterMultipleWithFallbackResult as a1, type LayerBaseState as a2, type LayerOverrideState as a3, type EffectiveLayerState as a4, initLayerStates as a5, applyLayerOverrides as a6, resetOverrides as a7, type ChatServiceConfig as a8, type ChatRequestOptions as a9, getZoomOpacityFactor as aA, getLayerZoomOpacityFactor as aB, getEffectiveLayerOpacity as aC, type ChatStreamCallbacks as aa, sendMessage as ab, sendMessageStream as ac, createChatService as ad, type ChatRequestDto as ae, type SuggestedAction as af, type ChatResponseDto as ag, ZenitMap as ah, type ZenitMapRef as ai, type LayerSnapshot as aj, type ZenitMapProps as ak, ZenitLayerManager as al, ZenitFeatureFilterPanel as am, FloatingChatBox as an, type FloatingChatBoxProps as ao, useSendMessage as ap, useSendMessageStream as aq, type LayerStyle$1 as ar, resolveLayerAccent as as, getLayerColor as at, getStyleByLayerId as au, getAccentByLayerId as av, type ZoomOpacityOptions as aw, clampNumber as ax, clampOpacity as ay, isPolygonLayer as az, type GeoJsonRequestOptions as b, type GeoJsonPolygon as c, ZenitClient as d, type LoginRequest as e, type LoginResponse as f, type MeResponse as g, ZenitAuthClient as h, type SdkTokenExchangeResponse as i, ZenitSdkAuthClient as j, type ZenitSdkError as k, HttpClient as l, ZenitMapsClient as m, type MapSettings as n, type MapLayerConfig as o, buildLayerFilters as p, buildFilterMultipleParams as q, shouldSkipGeojsonDownload as r, shouldUseFilterMultiple as s, buildAoiFromFeatureCollection as t, resolveLayerStrategy as u, buildLimitedMessage as v, ZenitLayersClient as w, type LayerDto as x, type LayerSummary as y, type GeoJsonPoint as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
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 './
|
|
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, 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, 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, w as ZenitLayersClient, m as ZenitMapsClient, j as ZenitSdkAuthClient, Z as ZenitSdkConfig, k as ZenitSdkError, a6 as applyLayerOverrides, t as buildAoiFromFeatureCollection, q as buildFilterMultipleParams, p as buildLayerFilters, v as buildLimitedMessage, ad as createChatService, a5 as initLayerStates, a7 as resetOverrides, u as resolveLayerStrategy, ab as sendMessage, ac as sendMessageStream, r as shouldSkipGeojsonDownload, s as shouldUseFilterMultiple } from './
|
|
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-Da0hFqDL.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-Da0hFqDL.mjs';
|
|
3
|
+
export { ChevronLeft, ChevronRight, Eye, EyeOff, Layers, Upload, X, ZoomIn } from 'lucide-react';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'leaflet';
|
|
3
6
|
|
|
4
7
|
declare function extractMapDto(map: unknown): MapDto | null;
|
|
5
8
|
declare function normalizeMapCenter(map: MapDto): MapDto;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
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 './
|
|
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, 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, 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, w as ZenitLayersClient, m as ZenitMapsClient, j as ZenitSdkAuthClient, Z as ZenitSdkConfig, k as ZenitSdkError, a6 as applyLayerOverrides, t as buildAoiFromFeatureCollection, q as buildFilterMultipleParams, p as buildLayerFilters, v as buildLimitedMessage, ad as createChatService, a5 as initLayerStates, a7 as resetOverrides, u as resolveLayerStrategy, ab as sendMessage, ac as sendMessageStream, r as shouldSkipGeojsonDownload, s as shouldUseFilterMultiple } from './
|
|
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-Da0hFqDL.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-Da0hFqDL.js';
|
|
3
|
+
export { ChevronLeft, ChevronRight, Eye, EyeOff, Layers, Upload, X, ZoomIn } from 'lucide-react';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'leaflet';
|
|
3
6
|
|
|
4
7
|
declare function extractMapDto(map: unknown): MapDto | null;
|
|
5
8
|
declare function normalizeMapCenter(map: MapDto): MapDto;
|