@feltmaps/js-sdk 1.7.0-next.11 → 1.7.0-next.12
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/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/controller-bundled.d.ts +17 -9
- package/dist/{controller-Bg7dynri.d.cts → controller-g5AHQrRU.d.cts} +17 -9
- package/dist/{controller-Bg7dynri.d.ts → controller-g5AHQrRU.d.ts} +17 -9
- package/dist/handler.cjs +1 -1
- package/dist/handler.d.cts +46 -1
- package/dist/handler.d.ts +46 -1
- package/dist/handler.js +1 -1
- package/package.json +1 -1
package/dist/client.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as zInfer, U as UiControlsOptions, V as ViewportCenterZoom, F as FeltController } from './controller-
|
|
2
|
-
export { au as AggregatedGridConfig, av as AggregationConfig, aw as AggregationMethod, C as CircleElementCreate, a as CircleElementRead, b as CircleElementUpdate, b8 as CircleToolSettings, b9 as ConfigurableToolType, ax as CountGridConfig, bp as CreateActionTriggerParams, K as CreateLayersFromGeoJsonParams, bq as CreatePanelElementsParams, br as CreatePanelParams, O as DataOnlyLayer, bs as DeletePanelElementsParams, E as Element, c as ElementChangeCallbackParams, d as ElementCreate, e as ElementGroup, f as ElementGroupChangeCallbackParams, aM as ElementGroupNode, aN as ElementNode, g as ElementUpdate, B as ElementsController, aO as EntityNode, aP as FeatureNode, aQ as FeatureSelection, aU as FeltBoundary, Q as FeltTiledVectorSource, aV as FeltZoom, an as FilterExpression, ao as FilterLogicGate, ap as FilterTernary, aq as Filters, R as GeoJsonDataVectorSource, aW as GeoJsonFeature, S as GeoJsonFileVectorSource, aX as GeoJsonGeometry, aY as GeoJsonProperties, W as GeoJsonUrlVectorSource, ar as GeometryFilter, G as GetElementGroupsConstraint, h as GetElementsConstraint, ay as GetLayerCalculationParams, az as GetLayerCategoriesGroup, aA as GetLayerCategoriesParams, X as GetLayerGroupsConstraint, aB as GetLayerHistogramBin, aC as GetLayerHistogramParams, aD as GetLayerPrecomputedCalculationParams, Y as GetLayersConstraint, Z as GetRenderedFeaturesConstraint, aE as GridConfig, aF as GridType, H as HighlighterElementCreate, i as HighlighterElementRead, j as HighlighterElementUpdate, ba as HighlighterToolSettings, I as ImageElementCreate, k as ImageElementRead, l as ImageElementUpdate, bb as InputToolSettings, J as InteractionsController, aZ as LatLng, _ as Layer, as as LayerBoundaries, $ as LayerChangeCallbackParams, a0 as LayerCommon, ad as LayerFeature, at as LayerFilters, a1 as LayerGroup, a2 as LayerGroupChangeCallbackParams, aR as LayerGroupNode, aS as LayerNode, a3 as LayerProcessingStatus, af as LayerSchema, ag as LayerSchemaAttribute, ah as LayerSchemaBooleanAttribute, ai as LayerSchemaCommonAttribute, aj as LayerSchemaDateAttribute, ak as LayerSchemaDateTimeAttribute, al as LayerSchemaNumericAttribute, am as LayerSchemaTextAttribute, aJ as LayersController, a4 as LegendItem, a5 as LegendItemChangeCallbackParams, a6 as LegendItemIdentifier, a7 as LegendItemsConstraint, a_ as LineStringGeometry, bc as LineToolSettings, L as LinkElementRead, a$ as LngLatTuple, aK as MapDetails, D as MapInteractionEvent, M as MarkerElementCreate, m as MarkerElementRead, n as MarkerElementUpdate, bd as MarkerToolSettings, aL as MiscController, aG as MultiAggregationConfig, b0 as MultiLineStringGeometry, b1 as MultiPointGeometry, b2 as MultiPolygonGeometry, N as NoteElementCreate, o as NoteElementRead, p as NoteElementUpdate, be as NoteToolSettings, bt as OnMapInteractionsOptions, P as PathElementCreate, q as PathElementRead, r as PathElementUpdate, bf as PinToolSettings, s as PlaceElementCreate, t as PlaceElementRead, u as PlaceElementUpdate, bg as PlaceFrame, bh as PlaceSymbol, bx as PlacementForUIElement, b3 as PointGeometry, v as PolygonElementCreate, w as PolygonElementRead, x as PolygonElementUpdate, b4 as PolygonGeometry, bi as PolygonToolSettings, aH as PrecomputedAggregationMethod, a8 as RasterBand, a9 as RasterLayer, aa as RasterLayerSource, ae as RasterValue, bj as RouteToolSettings, aT as SelectionController, b_ as SetViewportCenterZoomParams, b5 as SetVisibilityRequest, b6 as SortConfig, b7 as SortDirection, T as TextElementCreate, y as TextElementRead, A as TextElementUpdate, bk as TextToolSettings, bl as ToolSettingsChangeEvent, bm as ToolSettingsMap, bn as ToolType, bo as ToolsController, bY as UIActionTriggerCreate, bA as UIButtonElement, bB as UIButtonElementCreate, bC as UIButtonElementUpdate, bG as UIButtonGroupElement, bH as UIButtonGroupElementCreate, bI as UIButtonGroupElementUpdate, bM as UIDividerElement, bN as UIDividerElementCreate, bO as UIDividerElementUpdate, bJ as UIFlexibleSpaceElement, bK as UIFlexibleSpaceElementCreate, bL as UIFlexibleSpaceElementUpdate, by as UIPanel, bz as UIPanelCreate, bV as UIPanelElements, bW as UIPanelElementsCreate, bX as UIPanelElementsUpdate, bS as UISelectElement, bT as UISelectElementCreate, bU as UISelectElementUpdate, bD as UITextElement, bE as UITextElementCreate, bF as UITextElementUpdate, bP as UITextInputElement, bQ as UITextInputElementCreate, bR as UITextInputElementUpdate, bZ as UiController, bu as UpdateActionTriggerParams, ab as UpdateLayerParams, bv as UpdatePanelElementsParams, bw as UpdatePanelParams, aI as ValueConfiguration, ac as VectorLayer, b$ as ViewportConstraints, c2 as ViewportController, c0 as ViewportFitBoundsParams, c1 as ViewportState } from './controller-
|
|
1
|
+
import { z as zInfer, U as UiControlsOptions, V as ViewportCenterZoom, F as FeltController } from './controller-g5AHQrRU.cjs';
|
|
2
|
+
export { au as AggregatedGridConfig, av as AggregationConfig, aw as AggregationMethod, C as CircleElementCreate, a as CircleElementRead, b as CircleElementUpdate, b8 as CircleToolSettings, b9 as ConfigurableToolType, ax as CountGridConfig, bp as CreateActionTriggerParams, K as CreateLayersFromGeoJsonParams, bq as CreatePanelElementsParams, br as CreatePanelParams, O as DataOnlyLayer, bs as DeletePanelElementsParams, E as Element, c as ElementChangeCallbackParams, d as ElementCreate, e as ElementGroup, f as ElementGroupChangeCallbackParams, aM as ElementGroupNode, aN as ElementNode, g as ElementUpdate, B as ElementsController, aO as EntityNode, aP as FeatureNode, aQ as FeatureSelection, aU as FeltBoundary, Q as FeltTiledVectorSource, aV as FeltZoom, an as FilterExpression, ao as FilterLogicGate, ap as FilterTernary, aq as Filters, R as GeoJsonDataVectorSource, aW as GeoJsonFeature, S as GeoJsonFileVectorSource, aX as GeoJsonGeometry, aY as GeoJsonProperties, W as GeoJsonUrlVectorSource, ar as GeometryFilter, G as GetElementGroupsConstraint, h as GetElementsConstraint, ay as GetLayerCalculationParams, az as GetLayerCategoriesGroup, aA as GetLayerCategoriesParams, X as GetLayerGroupsConstraint, aB as GetLayerHistogramBin, aC as GetLayerHistogramParams, aD as GetLayerPrecomputedCalculationParams, Y as GetLayersConstraint, Z as GetRenderedFeaturesConstraint, aE as GridConfig, aF as GridType, H as HighlighterElementCreate, i as HighlighterElementRead, j as HighlighterElementUpdate, ba as HighlighterToolSettings, I as ImageElementCreate, k as ImageElementRead, l as ImageElementUpdate, bb as InputToolSettings, J as InteractionsController, aZ as LatLng, _ as Layer, as as LayerBoundaries, $ as LayerChangeCallbackParams, a0 as LayerCommon, ad as LayerFeature, at as LayerFilters, a1 as LayerGroup, a2 as LayerGroupChangeCallbackParams, aR as LayerGroupNode, aS as LayerNode, a3 as LayerProcessingStatus, af as LayerSchema, ag as LayerSchemaAttribute, ah as LayerSchemaBooleanAttribute, ai as LayerSchemaCommonAttribute, aj as LayerSchemaDateAttribute, ak as LayerSchemaDateTimeAttribute, al as LayerSchemaNumericAttribute, am as LayerSchemaTextAttribute, aJ as LayersController, a4 as LegendItem, a5 as LegendItemChangeCallbackParams, a6 as LegendItemIdentifier, a7 as LegendItemsConstraint, a_ as LineStringGeometry, bc as LineToolSettings, L as LinkElementRead, a$ as LngLatTuple, aK as MapDetails, D as MapInteractionEvent, M as MarkerElementCreate, m as MarkerElementRead, n as MarkerElementUpdate, bd as MarkerToolSettings, aL as MiscController, aG as MultiAggregationConfig, b0 as MultiLineStringGeometry, b1 as MultiPointGeometry, b2 as MultiPolygonGeometry, N as NoteElementCreate, o as NoteElementRead, p as NoteElementUpdate, be as NoteToolSettings, bt as OnMapInteractionsOptions, P as PathElementCreate, q as PathElementRead, r as PathElementUpdate, bf as PinToolSettings, s as PlaceElementCreate, t as PlaceElementRead, u as PlaceElementUpdate, bg as PlaceFrame, bh as PlaceSymbol, bx as PlacementForUIElement, b3 as PointGeometry, v as PolygonElementCreate, w as PolygonElementRead, x as PolygonElementUpdate, b4 as PolygonGeometry, bi as PolygonToolSettings, aH as PrecomputedAggregationMethod, a8 as RasterBand, a9 as RasterLayer, aa as RasterLayerSource, ae as RasterValue, bj as RouteToolSettings, aT as SelectionController, b_ as SetViewportCenterZoomParams, b5 as SetVisibilityRequest, b6 as SortConfig, b7 as SortDirection, T as TextElementCreate, y as TextElementRead, A as TextElementUpdate, bk as TextToolSettings, bl as ToolSettingsChangeEvent, bm as ToolSettingsMap, bn as ToolType, bo as ToolsController, bY as UIActionTriggerCreate, bA as UIButtonElement, bB as UIButtonElementCreate, bC as UIButtonElementUpdate, bG as UIButtonGroupElement, bH as UIButtonGroupElementCreate, bI as UIButtonGroupElementUpdate, bM as UIDividerElement, bN as UIDividerElementCreate, bO as UIDividerElementUpdate, bJ as UIFlexibleSpaceElement, bK as UIFlexibleSpaceElementCreate, bL as UIFlexibleSpaceElementUpdate, by as UIPanel, bz as UIPanelCreate, bV as UIPanelElements, bW as UIPanelElementsCreate, bX as UIPanelElementsUpdate, bS as UISelectElement, bT as UISelectElementCreate, bU as UISelectElementUpdate, bD as UITextElement, bE as UITextElementCreate, bF as UITextElementUpdate, bP as UITextInputElement, bQ as UITextInputElementCreate, bR as UITextInputElementUpdate, bZ as UiController, bu as UpdateActionTriggerParams, ab as UpdateLayerParams, bv as UpdatePanelElementsParams, bw as UpdatePanelParams, aI as ValueConfiguration, ac as VectorLayer, b$ as ViewportConstraints, c2 as ViewportController, c0 as ViewportFitBoundsParams, c1 as ViewportState } from './controller-g5AHQrRU.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as zInfer, U as UiControlsOptions, V as ViewportCenterZoom, F as FeltController } from './controller-
|
|
2
|
-
export { au as AggregatedGridConfig, av as AggregationConfig, aw as AggregationMethod, C as CircleElementCreate, a as CircleElementRead, b as CircleElementUpdate, b8 as CircleToolSettings, b9 as ConfigurableToolType, ax as CountGridConfig, bp as CreateActionTriggerParams, K as CreateLayersFromGeoJsonParams, bq as CreatePanelElementsParams, br as CreatePanelParams, O as DataOnlyLayer, bs as DeletePanelElementsParams, E as Element, c as ElementChangeCallbackParams, d as ElementCreate, e as ElementGroup, f as ElementGroupChangeCallbackParams, aM as ElementGroupNode, aN as ElementNode, g as ElementUpdate, B as ElementsController, aO as EntityNode, aP as FeatureNode, aQ as FeatureSelection, aU as FeltBoundary, Q as FeltTiledVectorSource, aV as FeltZoom, an as FilterExpression, ao as FilterLogicGate, ap as FilterTernary, aq as Filters, R as GeoJsonDataVectorSource, aW as GeoJsonFeature, S as GeoJsonFileVectorSource, aX as GeoJsonGeometry, aY as GeoJsonProperties, W as GeoJsonUrlVectorSource, ar as GeometryFilter, G as GetElementGroupsConstraint, h as GetElementsConstraint, ay as GetLayerCalculationParams, az as GetLayerCategoriesGroup, aA as GetLayerCategoriesParams, X as GetLayerGroupsConstraint, aB as GetLayerHistogramBin, aC as GetLayerHistogramParams, aD as GetLayerPrecomputedCalculationParams, Y as GetLayersConstraint, Z as GetRenderedFeaturesConstraint, aE as GridConfig, aF as GridType, H as HighlighterElementCreate, i as HighlighterElementRead, j as HighlighterElementUpdate, ba as HighlighterToolSettings, I as ImageElementCreate, k as ImageElementRead, l as ImageElementUpdate, bb as InputToolSettings, J as InteractionsController, aZ as LatLng, _ as Layer, as as LayerBoundaries, $ as LayerChangeCallbackParams, a0 as LayerCommon, ad as LayerFeature, at as LayerFilters, a1 as LayerGroup, a2 as LayerGroupChangeCallbackParams, aR as LayerGroupNode, aS as LayerNode, a3 as LayerProcessingStatus, af as LayerSchema, ag as LayerSchemaAttribute, ah as LayerSchemaBooleanAttribute, ai as LayerSchemaCommonAttribute, aj as LayerSchemaDateAttribute, ak as LayerSchemaDateTimeAttribute, al as LayerSchemaNumericAttribute, am as LayerSchemaTextAttribute, aJ as LayersController, a4 as LegendItem, a5 as LegendItemChangeCallbackParams, a6 as LegendItemIdentifier, a7 as LegendItemsConstraint, a_ as LineStringGeometry, bc as LineToolSettings, L as LinkElementRead, a$ as LngLatTuple, aK as MapDetails, D as MapInteractionEvent, M as MarkerElementCreate, m as MarkerElementRead, n as MarkerElementUpdate, bd as MarkerToolSettings, aL as MiscController, aG as MultiAggregationConfig, b0 as MultiLineStringGeometry, b1 as MultiPointGeometry, b2 as MultiPolygonGeometry, N as NoteElementCreate, o as NoteElementRead, p as NoteElementUpdate, be as NoteToolSettings, bt as OnMapInteractionsOptions, P as PathElementCreate, q as PathElementRead, r as PathElementUpdate, bf as PinToolSettings, s as PlaceElementCreate, t as PlaceElementRead, u as PlaceElementUpdate, bg as PlaceFrame, bh as PlaceSymbol, bx as PlacementForUIElement, b3 as PointGeometry, v as PolygonElementCreate, w as PolygonElementRead, x as PolygonElementUpdate, b4 as PolygonGeometry, bi as PolygonToolSettings, aH as PrecomputedAggregationMethod, a8 as RasterBand, a9 as RasterLayer, aa as RasterLayerSource, ae as RasterValue, bj as RouteToolSettings, aT as SelectionController, b_ as SetViewportCenterZoomParams, b5 as SetVisibilityRequest, b6 as SortConfig, b7 as SortDirection, T as TextElementCreate, y as TextElementRead, A as TextElementUpdate, bk as TextToolSettings, bl as ToolSettingsChangeEvent, bm as ToolSettingsMap, bn as ToolType, bo as ToolsController, bY as UIActionTriggerCreate, bA as UIButtonElement, bB as UIButtonElementCreate, bC as UIButtonElementUpdate, bG as UIButtonGroupElement, bH as UIButtonGroupElementCreate, bI as UIButtonGroupElementUpdate, bM as UIDividerElement, bN as UIDividerElementCreate, bO as UIDividerElementUpdate, bJ as UIFlexibleSpaceElement, bK as UIFlexibleSpaceElementCreate, bL as UIFlexibleSpaceElementUpdate, by as UIPanel, bz as UIPanelCreate, bV as UIPanelElements, bW as UIPanelElementsCreate, bX as UIPanelElementsUpdate, bS as UISelectElement, bT as UISelectElementCreate, bU as UISelectElementUpdate, bD as UITextElement, bE as UITextElementCreate, bF as UITextElementUpdate, bP as UITextInputElement, bQ as UITextInputElementCreate, bR as UITextInputElementUpdate, bZ as UiController, bu as UpdateActionTriggerParams, ab as UpdateLayerParams, bv as UpdatePanelElementsParams, bw as UpdatePanelParams, aI as ValueConfiguration, ac as VectorLayer, b$ as ViewportConstraints, c2 as ViewportController, c0 as ViewportFitBoundsParams, c1 as ViewportState } from './controller-
|
|
1
|
+
import { z as zInfer, U as UiControlsOptions, V as ViewportCenterZoom, F as FeltController } from './controller-g5AHQrRU.js';
|
|
2
|
+
export { au as AggregatedGridConfig, av as AggregationConfig, aw as AggregationMethod, C as CircleElementCreate, a as CircleElementRead, b as CircleElementUpdate, b8 as CircleToolSettings, b9 as ConfigurableToolType, ax as CountGridConfig, bp as CreateActionTriggerParams, K as CreateLayersFromGeoJsonParams, bq as CreatePanelElementsParams, br as CreatePanelParams, O as DataOnlyLayer, bs as DeletePanelElementsParams, E as Element, c as ElementChangeCallbackParams, d as ElementCreate, e as ElementGroup, f as ElementGroupChangeCallbackParams, aM as ElementGroupNode, aN as ElementNode, g as ElementUpdate, B as ElementsController, aO as EntityNode, aP as FeatureNode, aQ as FeatureSelection, aU as FeltBoundary, Q as FeltTiledVectorSource, aV as FeltZoom, an as FilterExpression, ao as FilterLogicGate, ap as FilterTernary, aq as Filters, R as GeoJsonDataVectorSource, aW as GeoJsonFeature, S as GeoJsonFileVectorSource, aX as GeoJsonGeometry, aY as GeoJsonProperties, W as GeoJsonUrlVectorSource, ar as GeometryFilter, G as GetElementGroupsConstraint, h as GetElementsConstraint, ay as GetLayerCalculationParams, az as GetLayerCategoriesGroup, aA as GetLayerCategoriesParams, X as GetLayerGroupsConstraint, aB as GetLayerHistogramBin, aC as GetLayerHistogramParams, aD as GetLayerPrecomputedCalculationParams, Y as GetLayersConstraint, Z as GetRenderedFeaturesConstraint, aE as GridConfig, aF as GridType, H as HighlighterElementCreate, i as HighlighterElementRead, j as HighlighterElementUpdate, ba as HighlighterToolSettings, I as ImageElementCreate, k as ImageElementRead, l as ImageElementUpdate, bb as InputToolSettings, J as InteractionsController, aZ as LatLng, _ as Layer, as as LayerBoundaries, $ as LayerChangeCallbackParams, a0 as LayerCommon, ad as LayerFeature, at as LayerFilters, a1 as LayerGroup, a2 as LayerGroupChangeCallbackParams, aR as LayerGroupNode, aS as LayerNode, a3 as LayerProcessingStatus, af as LayerSchema, ag as LayerSchemaAttribute, ah as LayerSchemaBooleanAttribute, ai as LayerSchemaCommonAttribute, aj as LayerSchemaDateAttribute, ak as LayerSchemaDateTimeAttribute, al as LayerSchemaNumericAttribute, am as LayerSchemaTextAttribute, aJ as LayersController, a4 as LegendItem, a5 as LegendItemChangeCallbackParams, a6 as LegendItemIdentifier, a7 as LegendItemsConstraint, a_ as LineStringGeometry, bc as LineToolSettings, L as LinkElementRead, a$ as LngLatTuple, aK as MapDetails, D as MapInteractionEvent, M as MarkerElementCreate, m as MarkerElementRead, n as MarkerElementUpdate, bd as MarkerToolSettings, aL as MiscController, aG as MultiAggregationConfig, b0 as MultiLineStringGeometry, b1 as MultiPointGeometry, b2 as MultiPolygonGeometry, N as NoteElementCreate, o as NoteElementRead, p as NoteElementUpdate, be as NoteToolSettings, bt as OnMapInteractionsOptions, P as PathElementCreate, q as PathElementRead, r as PathElementUpdate, bf as PinToolSettings, s as PlaceElementCreate, t as PlaceElementRead, u as PlaceElementUpdate, bg as PlaceFrame, bh as PlaceSymbol, bx as PlacementForUIElement, b3 as PointGeometry, v as PolygonElementCreate, w as PolygonElementRead, x as PolygonElementUpdate, b4 as PolygonGeometry, bi as PolygonToolSettings, aH as PrecomputedAggregationMethod, a8 as RasterBand, a9 as RasterLayer, aa as RasterLayerSource, ae as RasterValue, bj as RouteToolSettings, aT as SelectionController, b_ as SetViewportCenterZoomParams, b5 as SetVisibilityRequest, b6 as SortConfig, b7 as SortDirection, T as TextElementCreate, y as TextElementRead, A as TextElementUpdate, bk as TextToolSettings, bl as ToolSettingsChangeEvent, bm as ToolSettingsMap, bn as ToolType, bo as ToolsController, bY as UIActionTriggerCreate, bA as UIButtonElement, bB as UIButtonElementCreate, bC as UIButtonElementUpdate, bG as UIButtonGroupElement, bH as UIButtonGroupElementCreate, bI as UIButtonGroupElementUpdate, bM as UIDividerElement, bN as UIDividerElementCreate, bO as UIDividerElementUpdate, bJ as UIFlexibleSpaceElement, bK as UIFlexibleSpaceElementCreate, bL as UIFlexibleSpaceElementUpdate, by as UIPanel, bz as UIPanelCreate, bV as UIPanelElements, bW as UIPanelElementsCreate, bX as UIPanelElementsUpdate, bS as UISelectElement, bT as UISelectElementCreate, bU as UISelectElementUpdate, bD as UITextElement, bE as UITextElementCreate, bF as UITextElementUpdate, bP as UITextInputElement, bQ as UITextInputElementCreate, bR as UITextInputElementUpdate, bZ as UiController, bu as UpdateActionTriggerParams, ab as UpdateLayerParams, bv as UpdatePanelElementsParams, bw as UpdatePanelParams, aI as ValueConfiguration, ac as VectorLayer, b$ as ViewportConstraints, c2 as ViewportController, c0 as ViewportFitBoundsParams, c1 as ViewportState } from './controller-g5AHQrRU.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -8978,6 +8978,14 @@ interface SelectionController {
|
|
|
8978
8978
|
|
|
8979
8979
|
type ToolType = "circle" | "highlighter" | "line" | "link" | "marker" | "note" | "pin" | "polygon" | "route" | "text";
|
|
8980
8980
|
type ConfigurableToolType = Exclude<ToolType, "link">;
|
|
8981
|
+
interface ShowToolInspectorSettings {
|
|
8982
|
+
/**
|
|
8983
|
+
* Whether to show the tool inspector.
|
|
8984
|
+
*
|
|
8985
|
+
* @defaultValue `false`
|
|
8986
|
+
*/
|
|
8987
|
+
showInspector: boolean;
|
|
8988
|
+
}
|
|
8981
8989
|
declare const PinToolSettingsSchema: ZodObject<{
|
|
8982
8990
|
symbol: ZodString;
|
|
8983
8991
|
color: ZodString;
|
|
@@ -8994,7 +9002,7 @@ declare const PinToolSettingsSchema: ZodObject<{
|
|
|
8994
9002
|
frame: "frame-circle" | "frame-square" | null;
|
|
8995
9003
|
afterCreation: "enter name" | "add another" | "select";
|
|
8996
9004
|
}>;
|
|
8997
|
-
interface PinToolSettings extends zInfer<typeof PinToolSettingsSchema
|
|
9005
|
+
interface PinToolSettings extends zInfer<typeof PinToolSettingsSchema>, ShowToolInspectorSettings {
|
|
8998
9006
|
symbol: PlaceSymbol;
|
|
8999
9007
|
/**
|
|
9000
9008
|
* What to do after creating the Place element.
|
|
@@ -9026,7 +9034,7 @@ declare const LineToolSettingsSchema: ZodObject<{
|
|
|
9026
9034
|
strokeStyle: "solid" | "dashed" | "dotted";
|
|
9027
9035
|
distanceMarker: boolean;
|
|
9028
9036
|
}>;
|
|
9029
|
-
interface LineToolSettings extends zInfer<typeof LineToolSettingsSchema
|
|
9037
|
+
interface LineToolSettings extends zInfer<typeof LineToolSettingsSchema>, ShowToolInspectorSettings {
|
|
9030
9038
|
}
|
|
9031
9039
|
declare const RouteToolSettingsSchema: ZodObject<{
|
|
9032
9040
|
color: ZodString;
|
|
@@ -9053,7 +9061,7 @@ declare const RouteToolSettingsSchema: ZodObject<{
|
|
|
9053
9061
|
routingMode: "driving" | "cycling" | "walking" | "flying" | null;
|
|
9054
9062
|
endCaps: boolean;
|
|
9055
9063
|
}>;
|
|
9056
|
-
interface RouteToolSettings extends zInfer<typeof RouteToolSettingsSchema
|
|
9064
|
+
interface RouteToolSettings extends zInfer<typeof RouteToolSettingsSchema>, ShowToolInspectorSettings {
|
|
9057
9065
|
}
|
|
9058
9066
|
declare const PolygonToolSettingsSchema: ZodObject<{
|
|
9059
9067
|
color: ZodString;
|
|
@@ -9077,7 +9085,7 @@ declare const PolygonToolSettingsSchema: ZodObject<{
|
|
|
9077
9085
|
fillOpacity: number;
|
|
9078
9086
|
areaMarker: boolean;
|
|
9079
9087
|
}>;
|
|
9080
|
-
interface PolygonToolSettings extends zInfer<typeof PolygonToolSettingsSchema
|
|
9088
|
+
interface PolygonToolSettings extends zInfer<typeof PolygonToolSettingsSchema>, ShowToolInspectorSettings {
|
|
9081
9089
|
}
|
|
9082
9090
|
declare const CircleToolSettingsSchema: ZodObject<{
|
|
9083
9091
|
color: ZodString;
|
|
@@ -9101,7 +9109,7 @@ declare const CircleToolSettingsSchema: ZodObject<{
|
|
|
9101
9109
|
fillOpacity: number;
|
|
9102
9110
|
radiusMarker: boolean;
|
|
9103
9111
|
}>;
|
|
9104
|
-
interface CircleToolSettings extends zInfer<typeof CircleToolSettingsSchema
|
|
9112
|
+
interface CircleToolSettings extends zInfer<typeof CircleToolSettingsSchema>, ShowToolInspectorSettings {
|
|
9105
9113
|
}
|
|
9106
9114
|
declare const MarkerToolSettingsSchema: ZodObject<{
|
|
9107
9115
|
color: ZodString;
|
|
@@ -9116,7 +9124,7 @@ declare const MarkerToolSettingsSchema: ZodObject<{
|
|
|
9116
9124
|
opacity: number;
|
|
9117
9125
|
size: number;
|
|
9118
9126
|
}>;
|
|
9119
|
-
interface MarkerToolSettings extends zInfer<typeof MarkerToolSettingsSchema
|
|
9127
|
+
interface MarkerToolSettings extends zInfer<typeof MarkerToolSettingsSchema>, ShowToolInspectorSettings {
|
|
9120
9128
|
}
|
|
9121
9129
|
declare const HighlighterToolSettingsSchema: ZodObject<{
|
|
9122
9130
|
color: ZodString;
|
|
@@ -9134,7 +9142,7 @@ declare const HighlighterToolSettingsSchema: ZodObject<{
|
|
|
9134
9142
|
size: number;
|
|
9135
9143
|
renderHoles: boolean;
|
|
9136
9144
|
}>;
|
|
9137
|
-
interface HighlighterToolSettings extends zInfer<typeof HighlighterToolSettingsSchema
|
|
9145
|
+
interface HighlighterToolSettings extends zInfer<typeof HighlighterToolSettingsSchema>, ShowToolInspectorSettings {
|
|
9138
9146
|
}
|
|
9139
9147
|
declare const TextToolSettingsSchema: ZodObject<{
|
|
9140
9148
|
color: ZodString;
|
|
@@ -9149,7 +9157,7 @@ declare const TextToolSettingsSchema: ZodObject<{
|
|
|
9149
9157
|
align: "center" | "left" | "right";
|
|
9150
9158
|
style: "italic" | "light" | "regular" | "caps";
|
|
9151
9159
|
}>;
|
|
9152
|
-
interface TextToolSettings extends zInfer<typeof TextToolSettingsSchema
|
|
9160
|
+
interface TextToolSettings extends zInfer<typeof TextToolSettingsSchema>, ShowToolInspectorSettings {
|
|
9153
9161
|
}
|
|
9154
9162
|
declare const NoteToolSettingsSchema: ZodObject<{
|
|
9155
9163
|
color: ZodString;
|
|
@@ -9164,7 +9172,7 @@ declare const NoteToolSettingsSchema: ZodObject<{
|
|
|
9164
9172
|
align: "center" | "left" | "right";
|
|
9165
9173
|
style: "italic" | "light" | "regular" | "caps";
|
|
9166
9174
|
}>;
|
|
9167
|
-
interface NoteToolSettings extends zInfer<typeof NoteToolSettingsSchema
|
|
9175
|
+
interface NoteToolSettings extends zInfer<typeof NoteToolSettingsSchema>, ShowToolInspectorSettings {
|
|
9168
9176
|
}
|
|
9169
9177
|
/**
|
|
9170
9178
|
* The parameters for changing the settings of each tool.
|
|
@@ -7870,6 +7870,14 @@ interface SelectionController {
|
|
|
7870
7870
|
|
|
7871
7871
|
type ToolType = "circle" | "highlighter" | "line" | "link" | "marker" | "note" | "pin" | "polygon" | "route" | "text";
|
|
7872
7872
|
type ConfigurableToolType = Exclude<ToolType, "link">;
|
|
7873
|
+
interface ShowToolInspectorSettings {
|
|
7874
|
+
/**
|
|
7875
|
+
* Whether to show the tool inspector.
|
|
7876
|
+
*
|
|
7877
|
+
* @defaultValue `false`
|
|
7878
|
+
*/
|
|
7879
|
+
showInspector: boolean;
|
|
7880
|
+
}
|
|
7873
7881
|
declare const PinToolSettingsSchema: z.ZodObject<{
|
|
7874
7882
|
symbol: z.ZodString;
|
|
7875
7883
|
color: z.ZodString;
|
|
@@ -7886,7 +7894,7 @@ declare const PinToolSettingsSchema: z.ZodObject<{
|
|
|
7886
7894
|
frame: "frame-circle" | "frame-square" | null;
|
|
7887
7895
|
afterCreation: "enter name" | "add another" | "select";
|
|
7888
7896
|
}>;
|
|
7889
|
-
interface PinToolSettings extends zInfer<typeof PinToolSettingsSchema
|
|
7897
|
+
interface PinToolSettings extends zInfer<typeof PinToolSettingsSchema>, ShowToolInspectorSettings {
|
|
7890
7898
|
symbol: PlaceSymbol;
|
|
7891
7899
|
/**
|
|
7892
7900
|
* What to do after creating the Place element.
|
|
@@ -7918,7 +7926,7 @@ declare const LineToolSettingsSchema: z.ZodObject<{
|
|
|
7918
7926
|
strokeStyle: "solid" | "dashed" | "dotted";
|
|
7919
7927
|
distanceMarker: boolean;
|
|
7920
7928
|
}>;
|
|
7921
|
-
interface LineToolSettings extends zInfer<typeof LineToolSettingsSchema
|
|
7929
|
+
interface LineToolSettings extends zInfer<typeof LineToolSettingsSchema>, ShowToolInspectorSettings {
|
|
7922
7930
|
}
|
|
7923
7931
|
declare const RouteToolSettingsSchema: z.ZodObject<{
|
|
7924
7932
|
color: z.ZodString;
|
|
@@ -7945,7 +7953,7 @@ declare const RouteToolSettingsSchema: z.ZodObject<{
|
|
|
7945
7953
|
routingMode: "driving" | "cycling" | "walking" | "flying" | null;
|
|
7946
7954
|
endCaps: boolean;
|
|
7947
7955
|
}>;
|
|
7948
|
-
interface RouteToolSettings extends zInfer<typeof RouteToolSettingsSchema
|
|
7956
|
+
interface RouteToolSettings extends zInfer<typeof RouteToolSettingsSchema>, ShowToolInspectorSettings {
|
|
7949
7957
|
}
|
|
7950
7958
|
declare const PolygonToolSettingsSchema: z.ZodObject<{
|
|
7951
7959
|
color: z.ZodString;
|
|
@@ -7969,7 +7977,7 @@ declare const PolygonToolSettingsSchema: z.ZodObject<{
|
|
|
7969
7977
|
fillOpacity: number;
|
|
7970
7978
|
areaMarker: boolean;
|
|
7971
7979
|
}>;
|
|
7972
|
-
interface PolygonToolSettings extends zInfer<typeof PolygonToolSettingsSchema
|
|
7980
|
+
interface PolygonToolSettings extends zInfer<typeof PolygonToolSettingsSchema>, ShowToolInspectorSettings {
|
|
7973
7981
|
}
|
|
7974
7982
|
declare const CircleToolSettingsSchema: z.ZodObject<{
|
|
7975
7983
|
color: z.ZodString;
|
|
@@ -7993,7 +8001,7 @@ declare const CircleToolSettingsSchema: z.ZodObject<{
|
|
|
7993
8001
|
fillOpacity: number;
|
|
7994
8002
|
radiusMarker: boolean;
|
|
7995
8003
|
}>;
|
|
7996
|
-
interface CircleToolSettings extends zInfer<typeof CircleToolSettingsSchema
|
|
8004
|
+
interface CircleToolSettings extends zInfer<typeof CircleToolSettingsSchema>, ShowToolInspectorSettings {
|
|
7997
8005
|
}
|
|
7998
8006
|
declare const MarkerToolSettingsSchema: z.ZodObject<{
|
|
7999
8007
|
color: z.ZodString;
|
|
@@ -8008,7 +8016,7 @@ declare const MarkerToolSettingsSchema: z.ZodObject<{
|
|
|
8008
8016
|
opacity: number;
|
|
8009
8017
|
size: number;
|
|
8010
8018
|
}>;
|
|
8011
|
-
interface MarkerToolSettings extends zInfer<typeof MarkerToolSettingsSchema
|
|
8019
|
+
interface MarkerToolSettings extends zInfer<typeof MarkerToolSettingsSchema>, ShowToolInspectorSettings {
|
|
8012
8020
|
}
|
|
8013
8021
|
declare const HighlighterToolSettingsSchema: z.ZodObject<{
|
|
8014
8022
|
color: z.ZodString;
|
|
@@ -8026,7 +8034,7 @@ declare const HighlighterToolSettingsSchema: z.ZodObject<{
|
|
|
8026
8034
|
size: number;
|
|
8027
8035
|
renderHoles: boolean;
|
|
8028
8036
|
}>;
|
|
8029
|
-
interface HighlighterToolSettings extends zInfer<typeof HighlighterToolSettingsSchema
|
|
8037
|
+
interface HighlighterToolSettings extends zInfer<typeof HighlighterToolSettingsSchema>, ShowToolInspectorSettings {
|
|
8030
8038
|
}
|
|
8031
8039
|
declare const TextToolSettingsSchema: z.ZodObject<{
|
|
8032
8040
|
color: z.ZodString;
|
|
@@ -8041,7 +8049,7 @@ declare const TextToolSettingsSchema: z.ZodObject<{
|
|
|
8041
8049
|
align: "center" | "left" | "right";
|
|
8042
8050
|
style: "italic" | "light" | "regular" | "caps";
|
|
8043
8051
|
}>;
|
|
8044
|
-
interface TextToolSettings extends zInfer<typeof TextToolSettingsSchema
|
|
8052
|
+
interface TextToolSettings extends zInfer<typeof TextToolSettingsSchema>, ShowToolInspectorSettings {
|
|
8045
8053
|
}
|
|
8046
8054
|
declare const NoteToolSettingsSchema: z.ZodObject<{
|
|
8047
8055
|
color: z.ZodString;
|
|
@@ -8056,7 +8064,7 @@ declare const NoteToolSettingsSchema: z.ZodObject<{
|
|
|
8056
8064
|
align: "center" | "left" | "right";
|
|
8057
8065
|
style: "italic" | "light" | "regular" | "caps";
|
|
8058
8066
|
}>;
|
|
8059
|
-
interface NoteToolSettings extends zInfer<typeof NoteToolSettingsSchema
|
|
8067
|
+
interface NoteToolSettings extends zInfer<typeof NoteToolSettingsSchema>, ShowToolInspectorSettings {
|
|
8060
8068
|
}
|
|
8061
8069
|
/**
|
|
8062
8070
|
* The parameters for changing the settings of each tool.
|
|
@@ -7870,6 +7870,14 @@ interface SelectionController {
|
|
|
7870
7870
|
|
|
7871
7871
|
type ToolType = "circle" | "highlighter" | "line" | "link" | "marker" | "note" | "pin" | "polygon" | "route" | "text";
|
|
7872
7872
|
type ConfigurableToolType = Exclude<ToolType, "link">;
|
|
7873
|
+
interface ShowToolInspectorSettings {
|
|
7874
|
+
/**
|
|
7875
|
+
* Whether to show the tool inspector.
|
|
7876
|
+
*
|
|
7877
|
+
* @defaultValue `false`
|
|
7878
|
+
*/
|
|
7879
|
+
showInspector: boolean;
|
|
7880
|
+
}
|
|
7873
7881
|
declare const PinToolSettingsSchema: z.ZodObject<{
|
|
7874
7882
|
symbol: z.ZodString;
|
|
7875
7883
|
color: z.ZodString;
|
|
@@ -7886,7 +7894,7 @@ declare const PinToolSettingsSchema: z.ZodObject<{
|
|
|
7886
7894
|
frame: "frame-circle" | "frame-square" | null;
|
|
7887
7895
|
afterCreation: "enter name" | "add another" | "select";
|
|
7888
7896
|
}>;
|
|
7889
|
-
interface PinToolSettings extends zInfer<typeof PinToolSettingsSchema
|
|
7897
|
+
interface PinToolSettings extends zInfer<typeof PinToolSettingsSchema>, ShowToolInspectorSettings {
|
|
7890
7898
|
symbol: PlaceSymbol;
|
|
7891
7899
|
/**
|
|
7892
7900
|
* What to do after creating the Place element.
|
|
@@ -7918,7 +7926,7 @@ declare const LineToolSettingsSchema: z.ZodObject<{
|
|
|
7918
7926
|
strokeStyle: "solid" | "dashed" | "dotted";
|
|
7919
7927
|
distanceMarker: boolean;
|
|
7920
7928
|
}>;
|
|
7921
|
-
interface LineToolSettings extends zInfer<typeof LineToolSettingsSchema
|
|
7929
|
+
interface LineToolSettings extends zInfer<typeof LineToolSettingsSchema>, ShowToolInspectorSettings {
|
|
7922
7930
|
}
|
|
7923
7931
|
declare const RouteToolSettingsSchema: z.ZodObject<{
|
|
7924
7932
|
color: z.ZodString;
|
|
@@ -7945,7 +7953,7 @@ declare const RouteToolSettingsSchema: z.ZodObject<{
|
|
|
7945
7953
|
routingMode: "driving" | "cycling" | "walking" | "flying" | null;
|
|
7946
7954
|
endCaps: boolean;
|
|
7947
7955
|
}>;
|
|
7948
|
-
interface RouteToolSettings extends zInfer<typeof RouteToolSettingsSchema
|
|
7956
|
+
interface RouteToolSettings extends zInfer<typeof RouteToolSettingsSchema>, ShowToolInspectorSettings {
|
|
7949
7957
|
}
|
|
7950
7958
|
declare const PolygonToolSettingsSchema: z.ZodObject<{
|
|
7951
7959
|
color: z.ZodString;
|
|
@@ -7969,7 +7977,7 @@ declare const PolygonToolSettingsSchema: z.ZodObject<{
|
|
|
7969
7977
|
fillOpacity: number;
|
|
7970
7978
|
areaMarker: boolean;
|
|
7971
7979
|
}>;
|
|
7972
|
-
interface PolygonToolSettings extends zInfer<typeof PolygonToolSettingsSchema
|
|
7980
|
+
interface PolygonToolSettings extends zInfer<typeof PolygonToolSettingsSchema>, ShowToolInspectorSettings {
|
|
7973
7981
|
}
|
|
7974
7982
|
declare const CircleToolSettingsSchema: z.ZodObject<{
|
|
7975
7983
|
color: z.ZodString;
|
|
@@ -7993,7 +8001,7 @@ declare const CircleToolSettingsSchema: z.ZodObject<{
|
|
|
7993
8001
|
fillOpacity: number;
|
|
7994
8002
|
radiusMarker: boolean;
|
|
7995
8003
|
}>;
|
|
7996
|
-
interface CircleToolSettings extends zInfer<typeof CircleToolSettingsSchema
|
|
8004
|
+
interface CircleToolSettings extends zInfer<typeof CircleToolSettingsSchema>, ShowToolInspectorSettings {
|
|
7997
8005
|
}
|
|
7998
8006
|
declare const MarkerToolSettingsSchema: z.ZodObject<{
|
|
7999
8007
|
color: z.ZodString;
|
|
@@ -8008,7 +8016,7 @@ declare const MarkerToolSettingsSchema: z.ZodObject<{
|
|
|
8008
8016
|
opacity: number;
|
|
8009
8017
|
size: number;
|
|
8010
8018
|
}>;
|
|
8011
|
-
interface MarkerToolSettings extends zInfer<typeof MarkerToolSettingsSchema
|
|
8019
|
+
interface MarkerToolSettings extends zInfer<typeof MarkerToolSettingsSchema>, ShowToolInspectorSettings {
|
|
8012
8020
|
}
|
|
8013
8021
|
declare const HighlighterToolSettingsSchema: z.ZodObject<{
|
|
8014
8022
|
color: z.ZodString;
|
|
@@ -8026,7 +8034,7 @@ declare const HighlighterToolSettingsSchema: z.ZodObject<{
|
|
|
8026
8034
|
size: number;
|
|
8027
8035
|
renderHoles: boolean;
|
|
8028
8036
|
}>;
|
|
8029
|
-
interface HighlighterToolSettings extends zInfer<typeof HighlighterToolSettingsSchema
|
|
8037
|
+
interface HighlighterToolSettings extends zInfer<typeof HighlighterToolSettingsSchema>, ShowToolInspectorSettings {
|
|
8030
8038
|
}
|
|
8031
8039
|
declare const TextToolSettingsSchema: z.ZodObject<{
|
|
8032
8040
|
color: z.ZodString;
|
|
@@ -8041,7 +8049,7 @@ declare const TextToolSettingsSchema: z.ZodObject<{
|
|
|
8041
8049
|
align: "center" | "left" | "right";
|
|
8042
8050
|
style: "italic" | "light" | "regular" | "caps";
|
|
8043
8051
|
}>;
|
|
8044
|
-
interface TextToolSettings extends zInfer<typeof TextToolSettingsSchema
|
|
8052
|
+
interface TextToolSettings extends zInfer<typeof TextToolSettingsSchema>, ShowToolInspectorSettings {
|
|
8045
8053
|
}
|
|
8046
8054
|
declare const NoteToolSettingsSchema: z.ZodObject<{
|
|
8047
8055
|
color: z.ZodString;
|
|
@@ -8056,7 +8064,7 @@ declare const NoteToolSettingsSchema: z.ZodObject<{
|
|
|
8056
8064
|
align: "center" | "left" | "right";
|
|
8057
8065
|
style: "italic" | "light" | "regular" | "caps";
|
|
8058
8066
|
}>;
|
|
8059
|
-
interface NoteToolSettings extends zInfer<typeof NoteToolSettingsSchema
|
|
8067
|
+
interface NoteToolSettings extends zInfer<typeof NoteToolSettingsSchema>, ShowToolInspectorSettings {
|
|
8060
8068
|
}
|
|
8061
8069
|
/**
|
|
8062
8070
|
* The parameters for changing the settings of each tool.
|
package/dist/handler.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ge=Object.defineProperty;var xo=Object.getOwnPropertyDescriptor;var bo=Object.getOwnPropertyNames;var Eo=Object.prototype.hasOwnProperty;var Io=(r,y)=>{for(var N in y)Ge(r,N,{get:y[N],enumerable:!0})},Co=(r,y,N,Z)=>{if(y&&typeof y=="object"||typeof y=="function")for(let V of bo(y))!Eo.call(r,V)&&V!==N&&Ge(r,V,{get:()=>y[V],enumerable:!(Z=xo(y,V))||Z.enumerable});return r};var Lo=r=>Co(Ge({},"__esModule",{value:!0}),r);var Zn={};Io(Zn,{createMessageHandler:()=>An});module.exports=Lo(Zn);var d=require("zod");var I=require("zod");var P=require("zod");function e(r,y){return P.z.strictObject({type:P.z.literal(r),params:y})}function M(r,y){return P.z.strictObject({eventName:P.z.literal(r),id:P.z.string(),options:y})}function u(r){return P.z.strictObject({eventName:P.z.literal(r),id:P.z.string()})}var s=require("zod"),he=s.z.number(),fe=s.z.number(),Se=s.z.object({latitude:fe,longitude:he}),A=s.z.tuple([he,fe]),Y=s.z.object({type:s.z.literal("Polygon"),coordinates:s.z.array(s.z.array(A).min(4).refine(r=>r[0][0]===r[r.length-1][0]&&r[0][1]===r[r.length-1][1],"The last point of each ring must be identical to the first"))}),xe=s.z.object({type:s.z.literal("MultiPolygon"),coordinates:s.z.array(Y.shape.coordinates)}),Mo=s.z.object({type:s.z.literal("LineString"),coordinates:s.z.array(A).min(2)}),ee=s.z.object({type:s.z.literal("MultiLineString"),coordinates:s.z.array(Mo.shape.coordinates)}),it=s.z.number().min(1).max(23),T=s.z.tuple([he,fe,he,fe]),H=s.z.object({show:s.z.array(s.z.string()).optional(),hide:s.z.array(s.z.string()).optional()}),Uo=s.z.enum(["asc","desc"]),be=s.z.object({attribute:s.z.string(),direction:Uo});var t=require("zod");var U=t.z.object({id:t.z.string(),groupId:t.z.string().nullable(),color:t.z.string(),name:t.z.string().nullable(),description:t.z.string().nullable(),attributes:t.z.record(t.z.string(),t.z.unknown()),interaction:t.z.enum(["default","locked"]).optional()}),Ce=t.z.object({imageUrl:t.z.string().nullable()}),ke=t.z.object({strokeOpacity:t.z.number(),strokeWidth:t.z.number(),strokeStyle:t.z.enum(["solid","dashed","dotted"])}),Po=t.z.enum(["meter","kilometer","foot","mile"]),Ee=U.extend(Ce.shape).extend({type:t.z.literal("Place"),coordinates:A,symbol:t.z.string(),frame:t.z.enum(["frame-circle","frame-square"]).nullable(),hideLabel:t.z.boolean()}),te=U.extend(Ce.shape).extend(ke.shape).extend({type:t.z.literal("Path"),coordinates:ee.shape.coordinates,distanceMarker:t.z.boolean(),routingMode:t.z.enum(["driving","cycling","walking","flying"]).nullable(),endCaps:t.z.boolean()}),oe=U.extend(Ce.shape).extend(ke.shape).extend({type:t.z.literal("Polygon"),coordinates:Y.shape.coordinates,fillOpacity:t.z.number().min(0).max(1),areaMarker:t.z.boolean()}),Ie=U.extend(Ce.shape).extend(ke.shape).extend({type:t.z.literal("Circle"),center:A,radius:t.z.number(),radiusMarker:t.z.boolean(),radiusDisplayAngle:t.z.number(),radiusDisplayUnit:Po.nullable(),fillOpacity:t.z.number().min(0).max(1)}),ae=U.extend({type:t.z.literal("Marker"),coordinates:ee.shape.coordinates,opacity:t.z.number().min(0).max(1),size:t.z.number().min(0).max(100),zoom:t.z.number().min(0).max(23)}),ne=U.extend({type:t.z.literal("Highlighter"),coordinates:xe.shape.coordinates,renderHoles:t.z.boolean(),opacity:t.z.number().min(0).max(1)}),lt=t.z.object({position:A,rotation:t.z.number(),scale:t.z.number(),zoom:t.z.number().min(0).max(23),text:t.z.string(),align:t.z.enum(["left","center","right"]),style:t.z.enum(["italic","light","regular","caps"]),name:t.z.string()}),ze=U.extend(lt.shape).extend({type:t.z.literal("Text")}),Fe=U.extend(lt.shape).extend({type:t.z.literal("Note"),widthScale:t.z.number().min(0)}),re=U.extend({type:t.z.literal("Image"),coordinates:ee.shape.coordinates,imageUrl:t.z.string(),opacity:t.z.number().min(0).max(1)}).omit({color:!0}),To=U.extend({type:t.z.literal("Link"),coordinates:ee.shape.coordinates,url:t.z.string()}),q={type:!0,coordinates:!0},G={id:!0},Be=Ee.partial().extend(Ee.pick(q).shape).omit(G),Le=te.partial().extend(te.pick(q).shape).omit(G),ve=oe.partial().extend(oe.pick(q).shape).omit(G),Oe=Ie.partial().extend(Ie.pick({type:!0,center:!0,radius:!0}).shape).omit(G),je=ae.partial().extend(ae.pick(q).shape).omit(G),Ve=ne.partial().extend(ne.pick(q).shape).omit(G),Ae=ze.partial().omit({...G,name:!0,type:!0}).extend({type:t.z.literal("Text"),text:t.z.string()}),we=Fe.partial().omit({...G,name:!0,type:!0}).extend({type:t.z.literal("Note"),text:t.z.string()}),Go=re.partial().extend(re.pick({...q,imageUrl:!0}).shape).omit(G),st=t.z.discriminatedUnion("type",[Be,Le,ve,Oe,je,Ve,Go,Ae,we]);var $n=te.omit({coordinates:!0}),Xn=oe.omit({coordinates:!0});var Yn=ae.omit({coordinates:!0}),er=ne.omit({coordinates:!0});var tr=re.omit({coordinates:!0}),or=To.omit({coordinates:!0}),z={type:!0,id:!0},zo=Ee.partial().extend(Ee.pick(z).shape),Fo=te.partial().extend(te.pick(z).shape),ko=oe.partial().extend(oe.pick(z).shape),Bo=Ie.partial().extend(Ie.pick(z).shape),vo=ae.partial().extend(ae.pick(z).shape),Oo=ne.partial().extend(ne.pick(z).shape),jo=ze.partial().extend(ze.pick(z).shape).omit({name:!0}),Vo=Fe.partial().extend(Fe.pick(z).shape).omit({name:!0}),Ao=re.partial().extend(re.pick(z).shape),mt=t.z.discriminatedUnion("type",[zo,Fo,ko,Bo,vo,Oo,jo,Vo,Ao]),pt=t.z.object({ids:t.z.array(t.z.string()).optional()}),ct=t.z.object({ids:t.z.array(t.z.string()).optional()});var wo=e("getElement",I.z.string()),Ro=e("getElementGeometry",I.z.string()),Do=e("getElements",pt.optional()),No=e("getElementGroup",I.z.string()),Ho=e("getElementGroups",ct.optional()),Jo=e("setElementGroupVisibility",H),Zo=M("onElementChange",I.z.object({id:I.z.string()})),qo=u("onElementCreate"),Wo=u("onElementCreateEnd"),Ko=M("onElementDelete",I.z.object({id:I.z.string()})),_o=M("onElementGroupChange",I.z.object({id:I.z.string()})),Qo=e("createElement",st),$o=e("updateElement",mt),Xo=e("deleteElement",I.z.string()),dt={methods:[wo,Ro,Do,No,Ho,Jo,Qo,$o,Xo],listeners:[Zo,qo,Wo,Ko,_o]};var Yo=u("onPointerClick"),ea=u("onPointerMove"),yt={methods:null,listeners:[Yo,ea]};var i=require("zod");var l=require("zod");var ta=l.z.enum(["in","ni"]),oa=l.z.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),cr=l.z.enum(["and","or"]),gt=l.z.union([l.z.number(),l.z.string(),l.z.boolean(),l.z.null()]),ut=l.z.string().or(l.z.null()),aa=l.z.tuple([ut,ta,l.z.array(gt).or(l.z.null())]),na=l.z.tuple([ut,oa,gt]),Re=l.z.union([aa,na]),De=l.z.tuple([l.z.lazy(()=>l.z.union([De,Re,l.z.null(),l.z.boolean()])),l.z.enum(["and","or"]),l.z.lazy(()=>l.z.union([De,Re,l.z.null(),l.z.boolean()]))]),F=l.z.union([De,Re,l.z.null(),l.z.boolean()]),k=l.z.union([T,Y,xe,l.z.array(A)]);var a=require("zod");var ht=a.z.enum(["avg","max","min","sum","median"]),ft=a.z.enum(["avg","max","min","sum","count"]),ra=a.z.object({method:ht,attribute:a.z.string()}),ia=a.z.object({methods:a.z.array(a.z.union([ht,a.z.literal("count")])),attribute:a.z.string().optional()}),St=a.z.object({boundary:k.optional(),filters:F.optional(),aggregation:ra.optional()}),xt=a.z.object({layerId:a.z.string(),attribute:a.z.string(),limit:a.z.number().optional(),boundary:k.optional(),filters:F.optional(),values:St.optional()}),gr=a.z.object({key:a.z.union([a.z.number(),a.z.string(),a.z.boolean()]),value:a.z.number().nullable()}),la=a.z.object({type:a.z.literal("equal-intervals"),count:a.z.number()}),sa=a.z.object({type:a.z.literal("time-interval"),interval:a.z.enum(["hour","day","week","month","year"])}),bt=a.z.object({layerId:a.z.string(),attribute:a.z.string(),steps:a.z.union([la,sa,a.z.array(a.z.number())]),boundary:k.optional(),filters:F.optional(),values:St.optional()}),ur=a.z.object({min:a.z.number(),max:a.z.number(),value:a.z.number()}),Et=a.z.object({layerId:a.z.string(),boundary:k.optional(),filters:F.optional(),aggregation:ia}),It=a.z.enum(["h3"]),ma=a.z.object({type:It,resolution:a.z.number(),method:ft.extract(["count"])}),pa=a.z.object({type:It,resolution:a.z.number(),method:ft.exclude(["count"]),attribute:a.z.string()}),ca=a.z.union([ma,pa]),Ct=a.z.object({layerId:a.z.string(),boundary:k.optional(),filters:F.optional(),gridConfig:ca});var n=require("zod");var Sr=n.z.enum(["processing","completed","failed","incomplete"]),Lt=n.z.object({type:n.z.literal("geoJsonUrl"),url:n.z.string().url(),refreshInterval:n.z.number().min(250).max(5*60*1e3).nullable().optional()}),Mt=n.z.object({type:n.z.literal("geoJsonData"),data:n.z.object({}).passthrough().or(n.z.instanceof(ArrayBuffer))}),Ut=n.z.object({type:n.z.literal("geoJsonFile"),file:n.z.instanceof(File)}),Pt=n.z.object({id:n.z.string(),style:n.z.object({}).passthrough().optional(),shownInLegend:n.z.boolean().optional(),name:n.z.string().optional(),caption:n.z.string().optional(),description:n.z.string().optional(),bounds:T.optional(),source:n.z.union([Lt,Mt,Ut]).optional()}),Tt=n.z.object({ids:n.z.array(n.z.string()).optional()}),Gt=n.z.object({ids:n.z.array(n.z.string()).optional()}),W=n.z.object({id:n.z.string(),layerId:n.z.string()}),zt=n.z.object({ids:W.array().optional(),layerIds:n.z.string().array().optional()}),Ft=n.z.object({layerIds:n.z.array(n.z.string()).optional(),areaQuery:n.z.union([n.z.object({coordinates:Se}),n.z.object({boundary:T})]).optional()}),da=n.z.object({Point:n.z.object({}).passthrough().optional(),Line:n.z.object({}).passthrough().optional(),Polygon:n.z.object({}).passthrough().optional()}),kt=n.z.object({source:n.z.union([Lt,Mt,Ut]),name:n.z.string(),bounds:T.optional(),caption:n.z.string().optional(),description:n.z.string().optional(),geometryStyles:da.optional()});var ya=e("getLayer",i.z.string()),ga=e("getLayers",Tt.optional()),ua=e("setLayerVisibility",H),ha=M("onLayerChange",i.z.object({id:i.z.string()})),fa=e("setLayerStyle",i.z.object({id:i.z.string(),style:i.z.object({}).passthrough()})),Sa=e("setLayerLegendVisibility",H),xa=e("createLayersFromGeoJson",kt),ba=e("updateLayer",Pt),Ea=e("deleteLayer",i.z.string()),Ia=e("getLayerGroup",i.z.string()),Ca=e("getLayerGroups",Gt.optional()),La=e("setLayerGroupVisibility",H),Ma=e("setLayerGroupLegendVisibility",H),Ua=M("onLayerGroupChange",i.z.object({id:i.z.string()})),Pa=e("getLegendItem",W),Ta=e("getLegendItems",zt.optional()),Ga=M("onLegendItemChange",W),za=e("setLegendItemVisibility",i.z.object({show:W.array().optional(),hide:W.array().optional()})),Fa=e("getLayerFilters",i.z.string()),ka=e("setLayerFilters",i.z.object({layerId:i.z.string(),filters:F,note:i.z.string().optional()})),Ba=M("onLayerFiltersChange",i.z.object({layerId:i.z.string()})),va=e("getLayerBoundaries",i.z.string()),Oa=e("setLayerBoundary",i.z.object({layerIds:i.z.array(i.z.string()),boundary:k.nullable()})),ja=M("onLayerBoundariesChange",i.z.object({layerId:i.z.string()})),Va=e("getRenderedFeatures",Ft.optional()),Aa=e("getFeature",i.z.object({id:i.z.string().or(i.z.number()),layerId:i.z.string()})),wa=e("getFeatures",i.z.object({layerId:i.z.string(),filters:F.optional(),sorting:be.optional(),boundary:k.optional(),search:i.z.string().optional(),pagination:i.z.string().optional().nullish()})),Ra=e("getGeoJsonFeature",i.z.object({id:i.z.string().or(i.z.number()),layerId:i.z.string()})),Da=e("getCategoryData",xt),Na=e("getHistogramData",bt),Ha=e("getAggregates",Et),Ja=e("getPrecomputedAggregates",Ct),Za=e("getLayerSchema",i.z.string()),Bt={methods:[ya,ga,ua,fa,Sa,xa,Ea,ba,Ia,Ca,La,Ma,Pa,Ta,za,Fa,ka,va,Oa,Va,Aa,wa,Ra,Da,Na,Ha,Ja,Za],listeners:[ha,Ua,Ga,Ba,ja]};var vt=require("zod");var qa=e("getMapDetails",vt.z.undefined()),Ot={methods:[qa],listeners:[]};var ie=require("zod");var B=require("zod"),jt=B.z.object({id:B.z.string().or(B.z.number()),layerId:B.z.string(),showPopup:B.z.boolean().optional(),fitViewport:B.z.boolean().or(B.z.object({maxZoom:B.z.number()})).optional()});var Wa=e("getSelection",ie.z.undefined()),Ka=u("onSelectionChange"),_a=e("selectFeature",jt),Qa=e("clearSelection",ie.z.object({features:ie.z.boolean().optional(),elements:ie.z.boolean().optional()}).optional()),Vt={methods:[Wa,_a,Qa],listeners:[Ka]};var Nt=require("zod");var h=require("zod");var At=["circle","highlighter","line","marker","note","pin","polygon","route","text"],$a=[...At,"link"],wt=h.z.enum($a),Rt=h.z.enum(At),Xa=Be.pick({color:!0,symbol:!0,frame:!0}).extend({afterCreation:h.z.enum(["enter name","add another","select"])}).required(),Ya=Le.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),en=Le.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),tn=ve.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),on=Oe.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),an=je.pick({color:!0,opacity:!0,size:!0}).required(),nn=Ve.pick({color:!0,opacity:!0,renderHoles:!0}).extend({size:h.z.number().min(0).max(200)}).required(),rn=Ae.pick({color:!0,align:!0,style:!0}).required(),ln=we.pick({color:!0,align:!0,style:!0}).required(),Dt=h.z.discriminatedUnion("tool",[Xa.partial().extend({tool:h.z.literal("pin")}),Ya.partial().extend({tool:h.z.literal("line")}),en.partial().extend({tool:h.z.literal("route")}),tn.partial().extend({tool:h.z.literal("polygon")}),on.partial().extend({tool:h.z.literal("circle")}),an.partial().extend({tool:h.z.literal("marker")}),nn.partial().extend({tool:h.z.literal("highlighter")}),rn.partial().extend({tool:h.z.literal("text")}),ln.partial().extend({tool:h.z.literal("note")})]);var sn=e("setTool",wt.nullable()),mn=e("getTool",Nt.z.undefined()),pn=u("onToolChange"),cn=e("setToolSettings",Dt),dn=e("getToolSettings",Rt),yn=u("onToolSettingsChange"),Ht={methods:[sn,mn,cn,dn],listeners:[pn,yn]};var $=require("zod");var o=require("zod");var w=require("zod"),J=w.z.union([w.z.object({after:w.z.string()}),w.z.object({before:w.z.string()}),w.z.object({at:w.z.enum(["start","end"])})]);var b=require("zod");var x=require("zod"),gn=x.z.object({onCreate:x.z.function().args().returns(x.z.void()).optional(),onDestroy:x.z.function().args().returns(x.z.void()).optional()}),un=x.z.object({onCreate:x.z.string().optional(),onDestroy:x.z.string().optional()}),g=gn.extend({id:x.z.string()}),Jt=g.partial({id:!0}),m={params:Jt,clonable:Jt.extend(un.shape)},K=g.extend({label:x.z.string().optional()}),_={params:K.extend(m.params.shape),clonable:K.extend(m.clonable.shape)};function p(r){return r.partial().extend({id:x.z.string(),type:r.shape.type})}var Ne=b.z.object({type:b.z.literal("ActionTrigger"),label:b.z.string(),disabled:b.z.boolean().optional()}),le={read:g.extend(Ne.shape).extend({onTrigger:b.z.function().returns(b.z.void())}),create:m.params.extend(Ne.shape).extend({type:b.z.undefined()}).extend({onTrigger:b.z.function().returns(b.z.void())}),clonable:m.clonable.extend(Ne.shape).extend({type:b.z.undefined()}).extend({onTrigger:b.z.string()})};var qt=require("zod");var He=g.extend({type:qt.z.literal("FlexibleSpace")}),Zt=He.partial({id:!0}),v={params:Zt,clonable:Zt.extend(m.clonable.shape)},Je={params:p(v.params),clonable:p(v.clonable)};var E=require("zod");var Q=require("zod");var R=require("zod");var se=g.extend({type:R.z.literal("Button"),label:R.z.string(),variant:R.z.enum(["primary","outlined","transparent","transparentThin"]).optional(),disabled:R.z.boolean().optional(),onClick:R.z.function().returns(R.z.void())}),Wt=se.extend(m.params.shape),O={params:Wt,clonable:Wt.extend(m.clonable.shape).extend({onClick:R.z.string()})},Ze={params:p(O.params),clonable:p(O.clonable)};var C=require("zod");var qe=require("zod");var me=g.extend({type:qe.z.literal("Text"),content:qe.z.string()}),Kt=me.extend(m.params.shape),j={params:Kt,clonable:Kt.extend(m.clonable.shape)},We={params:p(j.params),clonable:p(j.clonable)};var Ke=g.extend({type:C.z.literal("ButtonGroup"),align:C.z.enum(["start","end"]).optional(),items:C.z.array(C.z.union([se,me,He]))}),_t=Ke.extend(m.params.shape).omit({items:!0}).extend({items:C.z.array(C.z.union([O.params,j.params,v.params]))}),pe={params:_t,clonable:_t.extend(m.clonable.shape).extend({items:C.z.array(C.z.union([O.clonable,j.clonable,v.clonable]))})},_e={params:p(pe.params),clonable:p(pe.clonable.extend({items:C.z.array(C.z.union([O.clonable,j.clonable,v.clonable]))}))};var $t=require("zod");var Qe=g.extend({type:$t.z.literal("Divider")}),Qt=Qe.partial({id:!0}),ce={params:Qt,clonable:Qt.extend(m.clonable.shape)},$e={params:p(ce.params),clonable:p(ce.clonable)};var f=require("zod");var Xe=K.extend({type:f.z.literal("Select"),options:f.z.array(f.z.object({label:f.z.string(),value:f.z.string()})),value:f.z.string().optional(),placeholder:f.z.string().optional(),search:f.z.boolean().optional(),onChange:f.z.function().args(f.z.object({value:f.z.string()})).returns(f.z.void())}),Xt=Xe.extend(_.params.shape),de={params:Xt,clonable:Xt.extend(_.clonable.shape).extend({onChange:f.z.string()})},Ye={params:p(de.params),clonable:p(de.clonable)};var c=require("zod");var et=K.extend({type:c.z.literal("TextInput"),value:c.z.string(),placeholder:c.z.string().optional(),onChange:c.z.function().args(c.z.object({value:c.z.string()})).returns(c.z.void()).optional(),onBlur:c.z.function().args(c.z.object({value:c.z.string()})).returns(c.z.void()).optional(),onFocus:c.z.function().args(c.z.object({value:c.z.string()})).returns(c.z.void()).optional()}),Yt=et.extend(_.params.shape),ye={params:Yt,clonable:Yt.extend(_.clonable.shape).extend({onChange:c.z.string().optional(),onBlur:c.z.string().optional(),onFocus:c.z.string().optional()})},tt={params:p(ye.params),clonable:p(ye.clonable)};var ot=Q.z.discriminatedUnion("type",[se,me,Ke,Qe,et,Xe]),D={params:Q.z.discriminatedUnion("type",[O.params,j.params,pe.params,ce.params,ye.params,de.params]),clonable:Q.z.discriminatedUnion("type",[O.clonable,j.clonable,pe.clonable,ce.clonable,ye.clonable,de.clonable])},at={params:Q.z.discriminatedUnion("type",[Ze.params,We.params,_e.params,tt.params,Ye.params,Je.params,$e.params]),clonable:Q.z.discriminatedUnion("type",[Ze.clonable,We.clonable,_e.clonable,tt.clonable,Ye.clonable,Je.clonable,$e.clonable])};var hn=g.extend({type:E.z.literal("Panel"),title:E.z.string().optional(),body:E.z.array(ot),footer:E.z.array(ot).optional(),onClickClose:E.z.function().returns(E.z.void()).optional()}),eo=hn.extend(m.params.shape).partial({type:!0}).omit({body:!0,footer:!0}).extend({body:E.z.array(D.params),footer:E.z.array(D.params).optional()}),Me={params:eo,clonable:eo.extend(m.clonable.shape).extend({onClickClose:E.z.string().optional(),body:E.z.array(D.clonable),footer:E.z.array(D.clonable).optional()})};var bi=o.z.object({actionTrigger:le.create,placement:J.optional()}),to=o.z.object({actionTrigger:le.clonable,placement:J.optional()}),Ei=le.create.partial().required({id:!0}),oo=le.clonable.partial().required({id:!0}),Ii=o.z.object({panel:Me.params,placement:J.optional()}),ao=o.z.object({panel:Me.clonable,placement:J.optional()}),no=Me.clonable.partial().required({id:!0}),Ci=o.z.object({panelId:o.z.string(),elements:o.z.array(o.z.object({element:o.z.union([D.params,v.params]),container:o.z.union([o.z.literal("body"),o.z.literal("footer"),o.z.object({id:o.z.string()})]).optional(),placement:J.optional()}))}),ro=o.z.object({panelId:o.z.string(),elements:o.z.array(o.z.object({element:o.z.union([D.clonable,v.clonable]),container:o.z.union([o.z.literal("body"),o.z.literal("footer"),o.z.object({id:o.z.string()})]).optional(),placement:J.optional()}))}),Li=o.z.object({panelId:o.z.string(),elements:o.z.array(o.z.object({element:at.params}))}),io=o.z.object({panelId:o.z.string(),elements:o.z.array(o.z.object({element:at.clonable}))}),lo=o.z.object({panelId:o.z.string(),elements:o.z.array(o.z.string())}),so=o.z.object({showLegend:o.z.boolean().optional(),cooperativeGestures:o.z.boolean().optional(),fullScreenButton:o.z.boolean().optional(),geolocation:o.z.boolean().optional(),zoomControls:o.z.boolean().optional(),scaleBar:o.z.boolean().optional()}),mo=o.z.object({featureSelectPanel:o.z.boolean().optional(),featureHoverPanel:o.z.boolean().optional(),elementSelectPanel:o.z.boolean().optional(),linkClickOpen:o.z.boolean().optional(),imageLightboxOpen:o.z.boolean().optional()});var fn=e("createActionTrigger",to),Sn=e("updateActionTrigger",oo),xn=e("deleteActionTrigger",$.z.string()),bn=e("createPanel",ao),En=e("updatePanel",no),In=e("deletePanel",$.z.string()),Cn=e("createPanelElements",ro),Ln=e("updatePanelElements",io),Mn=e("deletePanelElements",lo),Un=e("updateUiControls",so),Pn=e("setOnMapInteractionsUi",mo),Tn=e("showLayerDataTable",$.z.object({layerId:$.z.string(),sorting:be.optional()}).optional()),Gn=e("hideLayerDataTable",$.z.undefined()),po={methods:[fn,Sn,xn,bn,En,In,Cn,Ln,Mn,Un,Pn,Tn,Gn],listeners:null};var nt=require("zod");var ge=require("zod");var Ue=ge.z.object({center:Se,zoom:it}),co=ge.z.object({center:Ue.shape.center.optional(),zoom:Ue.shape.zoom.optional()}),yo=ge.z.object({minZoom:Ue.shape.zoom.nullish(),maxZoom:Ue.shape.zoom.nullish(),bounds:T.nullish()}).nullable(),go=ge.z.object({bounds:T});var zn=e("getViewport",nt.z.undefined()),Fn=e("setViewport",co),kn=e("getViewportConstraints",nt.z.undefined()),Bn=e("setViewportConstraints",yo),vn=e("fitViewportToBounds",go),On=u("onViewportMove"),jn=u("onViewportMoveEnd"),Vn=u("onMapIdle"),uo={methods:[Fn,zn,kn,Bn,vn],listeners:[On,jn,Vn]};var rt=[po,uo,Bt,dt,Vt,yt,Ht,Ot];function An(r,y,N){let Z=new Map;async function V(L){if(!Hn.safeParse(L.data).success){N?.onUnknownMessage?.(L.data);return}let ue=So.safeParse(L.data);if(!ue.success){N?.onInvalidMessage?.(L.data,ue.error),L.ports[0]?.postMessage(ho(ue.error.message));return}let{data:S}=ue;if(S.type==="felt.ready")L.ports[0]?.postMessage(!0);else if(S.type==="felt.addListener"){if(S.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let X="options"in S.event?{options:"options"in S.event?S.event.options:void 0,handler:Te=>{L.ports[0]?.postMessage(Te)}}:{handler:Te=>{L.ports[0]?.postMessage(Te)}},Pe=y.listeners[S.event.eventName](X);Z.set(S.event.id,Pe)}else if(S.type==="felt.removeListener")Z.get(S.id)?.(),Z.delete(S.id);else try{let X=y.methods[S.type],Pe=await X(S.params);L.ports[0]?.postMessage(Pe)}catch(X){L.ports[0]?.postMessage(ho(X))}}return r.addEventListener("message",V),()=>{r.removeEventListener("message",V)}}var fo={methods:rt.map(r=>r.methods??[]).flat(),listeners:rt.map(r=>r.listeners??[]).flat()},wn=d.z.discriminatedUnion("eventName",[d.z.strictObject({eventName:d.z.literal("")}),d.z.strictObject({eventName:d.z.literal("onGenericEvent"),id:d.z.string(),options:d.z.object({id:d.z.string()})}),...fo.listeners]),Rn=d.z.strictObject({type:d.z.literal("felt.addListener"),event:wn}),Dn=d.z.strictObject({type:d.z.literal("felt.removeListener"),id:d.z.string()}),Nn=d.z.strictObject({type:d.z.literal("felt.ready")}),So=d.z.discriminatedUnion("type",[Nn,Rn,Dn,...fo.methods]),Hn=d.z.object({type:d.z.enum(So.options.map(r=>r.shape.type.value))});function ho(r){return{__error__:Jn(r)}}function Jn(r){return r instanceof Error?r.message:typeof r=="object"&&r!==null&&"message"in r?String(r.message):typeof r=="string"?r:"Unknown error"}0&&(module.exports={createMessageHandler});
|
|
1
|
+
"use strict";var ze=Object.defineProperty;var bo=Object.getOwnPropertyDescriptor;var Io=Object.getOwnPropertyNames;var Eo=Object.prototype.hasOwnProperty;var Co=(r,g)=>{for(var H in g)ze(r,H,{get:g[H],enumerable:!0})},Lo=(r,g,H,q)=>{if(g&&typeof g=="object"||typeof g=="function")for(let V of Io(g))!Eo.call(r,V)&&V!==H&&ze(r,V,{get:()=>g[V],enumerable:!(q=bo(g,V))||q.enumerable});return r};var Mo=r=>Lo(ze({},"__esModule",{value:!0}),r);var qa={};Co(qa,{createMessageHandler:()=>Aa});module.exports=Mo(qa);var d=require("zod");var E=require("zod");var P=require("zod");function e(r,g){return P.z.strictObject({type:P.z.literal(r),params:g})}function M(r,g){return P.z.strictObject({eventName:P.z.literal(r),id:P.z.string(),options:g})}function h(r){return P.z.strictObject({eventName:P.z.literal(r),id:P.z.string()})}var l=require("zod"),fe=l.z.number(),Se=l.z.number(),xe=l.z.object({latitude:Se,longitude:fe}),A=l.z.tuple([fe,Se]),ee=l.z.object({type:l.z.literal("Polygon"),coordinates:l.z.array(l.z.array(A).min(4).refine(r=>r[0][0]===r[r.length-1][0]&&r[0][1]===r[r.length-1][1],"The last point of each ring must be identical to the first"))}),be=l.z.object({type:l.z.literal("MultiPolygon"),coordinates:l.z.array(ee.shape.coordinates)}),Uo=l.z.object({type:l.z.literal("LineString"),coordinates:l.z.array(A).min(2)}),te=l.z.object({type:l.z.literal("MultiLineString"),coordinates:l.z.array(Uo.shape.coordinates)}),st=l.z.number().min(1).max(23),T=l.z.tuple([fe,Se,fe,Se]),J=l.z.object({show:l.z.array(l.z.string()).optional(),hide:l.z.array(l.z.string()).optional()}),Po=l.z.enum(["asc","desc"]),Ie=l.z.object({attribute:l.z.string(),direction:Po});var t=require("zod");var U=t.z.object({id:t.z.string(),groupId:t.z.string().nullable(),color:t.z.string(),name:t.z.string().nullable(),description:t.z.string().nullable(),attributes:t.z.record(t.z.string(),t.z.unknown()),interaction:t.z.enum(["default","locked"]).optional()}),Le=t.z.object({imageUrl:t.z.string().nullable()}),Be=t.z.object({strokeOpacity:t.z.number(),strokeWidth:t.z.number(),strokeStyle:t.z.enum(["solid","dashed","dotted"])}),To=t.z.enum(["meter","kilometer","foot","mile"]),Ee=U.extend(Le.shape).extend({type:t.z.literal("Place"),coordinates:A,symbol:t.z.string(),frame:t.z.enum(["frame-circle","frame-square"]).nullable(),hideLabel:t.z.boolean()}),oe=U.extend(Le.shape).extend(Be.shape).extend({type:t.z.literal("Path"),coordinates:te.shape.coordinates,distanceMarker:t.z.boolean(),routingMode:t.z.enum(["driving","cycling","walking","flying"]).nullable(),endCaps:t.z.boolean()}),ne=U.extend(Le.shape).extend(Be.shape).extend({type:t.z.literal("Polygon"),coordinates:ee.shape.coordinates,fillOpacity:t.z.number().min(0).max(1),areaMarker:t.z.boolean()}),Ce=U.extend(Le.shape).extend(Be.shape).extend({type:t.z.literal("Circle"),center:A,radius:t.z.number(),radiusMarker:t.z.boolean(),radiusDisplayAngle:t.z.number(),radiusDisplayUnit:To.nullable(),fillOpacity:t.z.number().min(0).max(1)}),ae=U.extend({type:t.z.literal("Marker"),coordinates:te.shape.coordinates,opacity:t.z.number().min(0).max(1),size:t.z.number().min(0).max(100),zoom:t.z.number().min(0).max(23)}),re=U.extend({type:t.z.literal("Highlighter"),coordinates:be.shape.coordinates,renderHoles:t.z.boolean(),opacity:t.z.number().min(0).max(1)}),lt=t.z.object({position:A,rotation:t.z.number(),scale:t.z.number(),zoom:t.z.number().min(0).max(23),text:t.z.string(),align:t.z.enum(["left","center","right"]),style:t.z.enum(["italic","light","regular","caps"]),name:t.z.string()}),Fe=U.extend(lt.shape).extend({type:t.z.literal("Text")}),ke=U.extend(lt.shape).extend({type:t.z.literal("Note"),widthScale:t.z.number().min(0)}),ie=U.extend({type:t.z.literal("Image"),coordinates:te.shape.coordinates,imageUrl:t.z.string(),opacity:t.z.number().min(0).max(1)}).omit({color:!0}),Go=U.extend({type:t.z.literal("Link"),coordinates:te.shape.coordinates,url:t.z.string()}),W={type:!0,coordinates:!0},G={id:!0},ve=Ee.partial().extend(Ee.pick(W).shape).omit(G),Me=oe.partial().extend(oe.pick(W).shape).omit(G),Oe=ne.partial().extend(ne.pick(W).shape).omit(G),je=Ce.partial().extend(Ce.pick({type:!0,center:!0,radius:!0}).shape).omit(G),we=ae.partial().extend(ae.pick(W).shape).omit(G),Ve=re.partial().extend(re.pick(W).shape).omit(G),Ae=Fe.partial().omit({...G,name:!0,type:!0}).extend({type:t.z.literal("Text"),text:t.z.string()}),Re=ke.partial().omit({...G,name:!0,type:!0}).extend({type:t.z.literal("Note"),text:t.z.string()}),zo=ie.partial().extend(ie.pick({...W,imageUrl:!0}).shape).omit(G),mt=t.z.discriminatedUnion("type",[ve,Me,Oe,je,we,Ve,zo,Ae,Re]);var Xa=oe.omit({coordinates:!0}),Ya=ne.omit({coordinates:!0});var er=ae.omit({coordinates:!0}),tr=re.omit({coordinates:!0});var or=ie.omit({coordinates:!0}),nr=Go.omit({coordinates:!0}),z={type:!0,id:!0},Fo=Ee.partial().extend(Ee.pick(z).shape),ko=oe.partial().extend(oe.pick(z).shape),Bo=ne.partial().extend(ne.pick(z).shape),vo=Ce.partial().extend(Ce.pick(z).shape),Oo=ae.partial().extend(ae.pick(z).shape),jo=re.partial().extend(re.pick(z).shape),wo=Fe.partial().extend(Fe.pick(z).shape).omit({name:!0}),Vo=ke.partial().extend(ke.pick(z).shape).omit({name:!0}),Ao=ie.partial().extend(ie.pick(z).shape),pt=t.z.discriminatedUnion("type",[Fo,ko,Bo,vo,Oo,jo,wo,Vo,Ao]),ct=t.z.object({ids:t.z.array(t.z.string()).optional()}),dt=t.z.object({ids:t.z.array(t.z.string()).optional()});var Ro=e("getElement",E.z.string()),Do=e("getElementGeometry",E.z.string()),No=e("getElements",ct.optional()),Ho=e("getElementGroup",E.z.string()),Jo=e("getElementGroups",dt.optional()),Zo=e("setElementGroupVisibility",J),qo=M("onElementChange",E.z.object({id:E.z.string()})),Wo=h("onElementCreate"),Ko=h("onElementCreateEnd"),_o=M("onElementDelete",E.z.object({id:E.z.string()})),Qo=M("onElementGroupChange",E.z.object({id:E.z.string()})),$o=e("createElement",mt),Xo=e("updateElement",pt),Yo=e("deleteElement",E.z.string()),gt={methods:[Ro,Do,No,Ho,Jo,Zo,$o,Xo,Yo],listeners:[qo,Wo,Ko,_o,Qo]};var en=h("onPointerClick"),tn=h("onPointerMove"),yt={methods:null,listeners:[en,tn]};var i=require("zod");var s=require("zod");var on=s.z.enum(["in","ni"]),nn=s.z.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),dr=s.z.enum(["and","or"]),ut=s.z.union([s.z.number(),s.z.string(),s.z.boolean(),s.z.null()]),ht=s.z.string().or(s.z.null()),an=s.z.tuple([ht,on,s.z.array(ut).or(s.z.null())]),rn=s.z.tuple([ht,nn,ut]),De=s.z.union([an,rn]),Ne=s.z.tuple([s.z.lazy(()=>s.z.union([Ne,De,s.z.null(),s.z.boolean()])),s.z.enum(["and","or"]),s.z.lazy(()=>s.z.union([Ne,De,s.z.null(),s.z.boolean()]))]),F=s.z.union([Ne,De,s.z.null(),s.z.boolean()]),k=s.z.union([T,ee,be,s.z.array(A)]);var n=require("zod");var ft=n.z.enum(["avg","max","min","sum","median"]),St=n.z.enum(["avg","max","min","sum","count"]),sn=n.z.object({method:ft,attribute:n.z.string()}),ln=n.z.object({methods:n.z.array(n.z.union([ft,n.z.literal("count")])),attribute:n.z.string().optional()}),xt=n.z.object({boundary:k.optional(),filters:F.optional(),aggregation:sn.optional()}),bt=n.z.object({layerId:n.z.string(),attribute:n.z.string(),limit:n.z.number().optional(),boundary:k.optional(),filters:F.optional(),values:xt.optional()}),ur=n.z.object({key:n.z.union([n.z.number(),n.z.string(),n.z.boolean()]),value:n.z.number().nullable()}),mn=n.z.object({type:n.z.literal("equal-intervals"),count:n.z.number()}),pn=n.z.object({type:n.z.literal("time-interval"),interval:n.z.enum(["hour","day","week","month","year"])}),It=n.z.object({layerId:n.z.string(),attribute:n.z.string(),steps:n.z.union([mn,pn,n.z.array(n.z.number())]),boundary:k.optional(),filters:F.optional(),values:xt.optional()}),hr=n.z.object({min:n.z.number(),max:n.z.number(),value:n.z.number()}),Et=n.z.object({layerId:n.z.string(),boundary:k.optional(),filters:F.optional(),aggregation:ln}),Ct=n.z.enum(["h3"]),cn=n.z.object({type:Ct,resolution:n.z.number(),method:St.extract(["count"])}),dn=n.z.object({type:Ct,resolution:n.z.number(),method:St.exclude(["count"]),attribute:n.z.string()}),gn=n.z.union([cn,dn]),Lt=n.z.object({layerId:n.z.string(),boundary:k.optional(),filters:F.optional(),gridConfig:gn});var a=require("zod");var xr=a.z.enum(["processing","completed","failed","incomplete"]),Mt=a.z.object({type:a.z.literal("geoJsonUrl"),url:a.z.string().url(),refreshInterval:a.z.number().min(250).max(5*60*1e3).nullable().optional()}),Ut=a.z.object({type:a.z.literal("geoJsonData"),data:a.z.object({}).passthrough().or(a.z.instanceof(ArrayBuffer))}),Pt=a.z.object({type:a.z.literal("geoJsonFile"),file:a.z.instanceof(File)}),Tt=a.z.object({id:a.z.string(),style:a.z.object({}).passthrough().optional(),shownInLegend:a.z.boolean().optional(),name:a.z.string().optional(),caption:a.z.string().optional(),description:a.z.string().optional(),bounds:T.optional(),source:a.z.union([Mt,Ut,Pt]).optional()}),Gt=a.z.object({ids:a.z.array(a.z.string()).optional()}),zt=a.z.object({ids:a.z.array(a.z.string()).optional()}),K=a.z.object({id:a.z.string(),layerId:a.z.string()}),Ft=a.z.object({ids:K.array().optional(),layerIds:a.z.string().array().optional()}),kt=a.z.object({layerIds:a.z.array(a.z.string()).optional(),areaQuery:a.z.union([a.z.object({coordinates:xe}),a.z.object({boundary:T})]).optional()}),yn=a.z.object({Point:a.z.object({}).passthrough().optional(),Line:a.z.object({}).passthrough().optional(),Polygon:a.z.object({}).passthrough().optional()}),Bt=a.z.object({source:a.z.union([Mt,Ut,Pt]),name:a.z.string(),bounds:T.optional(),caption:a.z.string().optional(),description:a.z.string().optional(),geometryStyles:yn.optional()});var un=e("getLayer",i.z.string()),hn=e("getLayers",Gt.optional()),fn=e("setLayerVisibility",J),Sn=M("onLayerChange",i.z.object({id:i.z.string()})),xn=e("setLayerStyle",i.z.object({id:i.z.string(),style:i.z.object({}).passthrough()})),bn=e("setLayerLegendVisibility",J),In=e("createLayersFromGeoJson",Bt),En=e("updateLayer",Tt),Cn=e("deleteLayer",i.z.string()),Ln=e("getLayerGroup",i.z.string()),Mn=e("getLayerGroups",zt.optional()),Un=e("setLayerGroupVisibility",J),Pn=e("setLayerGroupLegendVisibility",J),Tn=M("onLayerGroupChange",i.z.object({id:i.z.string()})),Gn=e("getLegendItem",K),zn=e("getLegendItems",Ft.optional()),Fn=M("onLegendItemChange",K),kn=e("setLegendItemVisibility",i.z.object({show:K.array().optional(),hide:K.array().optional()})),Bn=e("getLayerFilters",i.z.string()),vn=e("setLayerFilters",i.z.object({layerId:i.z.string(),filters:F,note:i.z.string().optional()})),On=M("onLayerFiltersChange",i.z.object({layerId:i.z.string()})),jn=e("getLayerBoundaries",i.z.string()),wn=e("setLayerBoundary",i.z.object({layerIds:i.z.array(i.z.string()),boundary:k.nullable()})),Vn=M("onLayerBoundariesChange",i.z.object({layerId:i.z.string()})),An=e("getRenderedFeatures",kt.optional()),Rn=e("getFeature",i.z.object({id:i.z.string().or(i.z.number()),layerId:i.z.string()})),Dn=e("getFeatures",i.z.object({layerId:i.z.string(),filters:F.optional(),sorting:Ie.optional(),boundary:k.optional(),search:i.z.string().optional(),pagination:i.z.string().optional().nullish()})),Nn=e("getGeoJsonFeature",i.z.object({id:i.z.string().or(i.z.number()),layerId:i.z.string()})),Hn=e("getCategoryData",bt),Jn=e("getHistogramData",It),Zn=e("getAggregates",Et),qn=e("getPrecomputedAggregates",Lt),Wn=e("getLayerSchema",i.z.string()),vt={methods:[un,hn,fn,xn,bn,In,Cn,En,Ln,Mn,Un,Pn,Gn,zn,kn,Bn,vn,jn,wn,An,Rn,Dn,Nn,Hn,Jn,Zn,qn,Wn],listeners:[Sn,Tn,Fn,On,Vn]};var Ot=require("zod");var Kn=e("getMapDetails",Ot.z.undefined()),jt={methods:[Kn],listeners:[]};var se=require("zod");var B=require("zod"),wt=B.z.object({id:B.z.string().or(B.z.number()),layerId:B.z.string(),showPopup:B.z.boolean().optional(),fitViewport:B.z.boolean().or(B.z.object({maxZoom:B.z.number()})).optional()});var _n=e("getSelection",se.z.undefined()),Qn=h("onSelectionChange"),$n=e("selectFeature",wt),Xn=e("clearSelection",se.z.object({features:se.z.boolean().optional(),elements:se.z.boolean().optional()}).optional()),Vt={methods:[_n,$n,Xn],listeners:[Qn]};var Ht=require("zod");var y=require("zod");var At=["circle","highlighter","line","marker","note","pin","polygon","route","text"],Yn=[...At,"link"],Rt=y.z.enum(Yn),Dt=y.z.enum(At),v={showInspector:y.z.boolean().optional()},ea=ve.pick({color:!0,symbol:!0,frame:!0}).extend({afterCreation:y.z.enum(["enter name","add another","select"])}).required(),ta=Me.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),oa=Me.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),na=Oe.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),aa=je.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),ra=we.pick({color:!0,opacity:!0,size:!0}).required(),ia=Ve.pick({color:!0,opacity:!0,renderHoles:!0}).extend({size:y.z.number().min(0).max(200)}).required(),sa=Ae.pick({color:!0,align:!0,style:!0}).required(),la=Re.pick({color:!0,align:!0,style:!0}).required(),Nt=y.z.discriminatedUnion("tool",[ea.partial().extend({tool:y.z.literal("pin"),...v}),ta.partial().extend({tool:y.z.literal("line"),...v}),oa.partial().extend({tool:y.z.literal("route"),...v}),na.partial().extend({tool:y.z.literal("polygon"),...v}),aa.partial().extend({tool:y.z.literal("circle"),...v}),ra.partial().extend({tool:y.z.literal("marker"),...v}),ia.partial().extend({tool:y.z.literal("highlighter"),...v}),sa.partial().extend({tool:y.z.literal("text"),...v}),la.partial().extend({tool:y.z.literal("note"),...v})]);var ma=e("setTool",Rt.nullable()),pa=e("getTool",Ht.z.undefined()),ca=h("onToolChange"),da=e("setToolSettings",Nt),ga=e("getToolSettings",Dt),ya=h("onToolSettingsChange"),Jt={methods:[ma,pa,da,ga],listeners:[ca,ya]};var X=require("zod");var o=require("zod");var R=require("zod"),Z=R.z.union([R.z.object({after:R.z.string()}),R.z.object({before:R.z.string()}),R.z.object({at:R.z.enum(["start","end"])})]);var b=require("zod");var x=require("zod"),ua=x.z.object({onCreate:x.z.function().args().returns(x.z.void()).optional(),onDestroy:x.z.function().args().returns(x.z.void()).optional()}),ha=x.z.object({onCreate:x.z.string().optional(),onDestroy:x.z.string().optional()}),u=ua.extend({id:x.z.string()}),Zt=u.partial({id:!0}),m={params:Zt,clonable:Zt.extend(ha.shape)},_=u.extend({label:x.z.string().optional()}),Q={params:_.extend(m.params.shape),clonable:_.extend(m.clonable.shape)};function p(r){return r.partial().extend({id:x.z.string(),type:r.shape.type})}var He=b.z.object({type:b.z.literal("ActionTrigger"),label:b.z.string(),disabled:b.z.boolean().optional()}),le={read:u.extend(He.shape).extend({onTrigger:b.z.function().returns(b.z.void())}),create:m.params.extend(He.shape).extend({type:b.z.undefined()}).extend({onTrigger:b.z.function().returns(b.z.void())}),clonable:m.clonable.extend(He.shape).extend({type:b.z.undefined()}).extend({onTrigger:b.z.string()})};var Wt=require("zod");var Je=u.extend({type:Wt.z.literal("FlexibleSpace")}),qt=Je.partial({id:!0}),O={params:qt,clonable:qt.extend(m.clonable.shape)},Ze={params:p(O.params),clonable:p(O.clonable)};var I=require("zod");var $=require("zod");var D=require("zod");var me=u.extend({type:D.z.literal("Button"),label:D.z.string(),variant:D.z.enum(["primary","outlined","transparent","transparentThin"]).optional(),disabled:D.z.boolean().optional(),onClick:D.z.function().returns(D.z.void())}),Kt=me.extend(m.params.shape),j={params:Kt,clonable:Kt.extend(m.clonable.shape).extend({onClick:D.z.string()})},qe={params:p(j.params),clonable:p(j.clonable)};var C=require("zod");var We=require("zod");var pe=u.extend({type:We.z.literal("Text"),content:We.z.string()}),_t=pe.extend(m.params.shape),w={params:_t,clonable:_t.extend(m.clonable.shape)},Ke={params:p(w.params),clonable:p(w.clonable)};var _e=u.extend({type:C.z.literal("ButtonGroup"),align:C.z.enum(["start","end"]).optional(),items:C.z.array(C.z.union([me,pe,Je]))}),Qt=_e.extend(m.params.shape).omit({items:!0}).extend({items:C.z.array(C.z.union([j.params,w.params,O.params]))}),ce={params:Qt,clonable:Qt.extend(m.clonable.shape).extend({items:C.z.array(C.z.union([j.clonable,w.clonable,O.clonable]))})},Qe={params:p(ce.params),clonable:p(ce.clonable.extend({items:C.z.array(C.z.union([j.clonable,w.clonable,O.clonable]))}))};var Xt=require("zod");var $e=u.extend({type:Xt.z.literal("Divider")}),$t=$e.partial({id:!0}),de={params:$t,clonable:$t.extend(m.clonable.shape)},Xe={params:p(de.params),clonable:p(de.clonable)};var f=require("zod");var Ye=_.extend({type:f.z.literal("Select"),options:f.z.array(f.z.object({label:f.z.string(),value:f.z.string()})),value:f.z.string().optional(),placeholder:f.z.string().optional(),search:f.z.boolean().optional(),onChange:f.z.function().args(f.z.object({value:f.z.string()})).returns(f.z.void())}),Yt=Ye.extend(Q.params.shape),ge={params:Yt,clonable:Yt.extend(Q.clonable.shape).extend({onChange:f.z.string()})},et={params:p(ge.params),clonable:p(ge.clonable)};var c=require("zod");var tt=_.extend({type:c.z.literal("TextInput"),value:c.z.string(),placeholder:c.z.string().optional(),onChange:c.z.function().args(c.z.object({value:c.z.string()})).returns(c.z.void()).optional(),onBlur:c.z.function().args(c.z.object({value:c.z.string()})).returns(c.z.void()).optional(),onFocus:c.z.function().args(c.z.object({value:c.z.string()})).returns(c.z.void()).optional()}),eo=tt.extend(Q.params.shape),ye={params:eo,clonable:eo.extend(Q.clonable.shape).extend({onChange:c.z.string().optional(),onBlur:c.z.string().optional(),onFocus:c.z.string().optional()})},ot={params:p(ye.params),clonable:p(ye.clonable)};var nt=$.z.discriminatedUnion("type",[me,pe,_e,$e,tt,Ye]),N={params:$.z.discriminatedUnion("type",[j.params,w.params,ce.params,de.params,ye.params,ge.params]),clonable:$.z.discriminatedUnion("type",[j.clonable,w.clonable,ce.clonable,de.clonable,ye.clonable,ge.clonable])},at={params:$.z.discriminatedUnion("type",[qe.params,Ke.params,Qe.params,ot.params,et.params,Ze.params,Xe.params]),clonable:$.z.discriminatedUnion("type",[qe.clonable,Ke.clonable,Qe.clonable,ot.clonable,et.clonable,Ze.clonable,Xe.clonable])};var fa=u.extend({type:I.z.literal("Panel"),title:I.z.string().optional(),body:I.z.array(nt),footer:I.z.array(nt).optional(),onClickClose:I.z.function().returns(I.z.void()).optional()}),to=fa.extend(m.params.shape).partial({type:!0}).omit({body:!0,footer:!0}).extend({body:I.z.array(N.params),footer:I.z.array(N.params).optional()}),Ue={params:to,clonable:to.extend(m.clonable.shape).extend({onClickClose:I.z.string().optional(),body:I.z.array(N.clonable),footer:I.z.array(N.clonable).optional()})};var Ii=o.z.object({actionTrigger:le.create,placement:Z.optional()}),oo=o.z.object({actionTrigger:le.clonable,placement:Z.optional()}),Ei=le.create.partial().required({id:!0}),no=le.clonable.partial().required({id:!0}),Ci=o.z.object({panel:Ue.params,placement:Z.optional()}),ao=o.z.object({panel:Ue.clonable,placement:Z.optional()}),ro=Ue.clonable.partial().required({id:!0}),Li=o.z.object({panelId:o.z.string(),elements:o.z.array(o.z.object({element:o.z.union([N.params,O.params]),container:o.z.union([o.z.literal("body"),o.z.literal("footer"),o.z.object({id:o.z.string()})]).optional(),placement:Z.optional()}))}),io=o.z.object({panelId:o.z.string(),elements:o.z.array(o.z.object({element:o.z.union([N.clonable,O.clonable]),container:o.z.union([o.z.literal("body"),o.z.literal("footer"),o.z.object({id:o.z.string()})]).optional(),placement:Z.optional()}))}),Mi=o.z.object({panelId:o.z.string(),elements:o.z.array(o.z.object({element:at.params}))}),so=o.z.object({panelId:o.z.string(),elements:o.z.array(o.z.object({element:at.clonable}))}),lo=o.z.object({panelId:o.z.string(),elements:o.z.array(o.z.string())}),mo=o.z.object({showLegend:o.z.boolean().optional(),cooperativeGestures:o.z.boolean().optional(),fullScreenButton:o.z.boolean().optional(),geolocation:o.z.boolean().optional(),zoomControls:o.z.boolean().optional(),scaleBar:o.z.boolean().optional()}),po=o.z.object({featureSelectPanel:o.z.boolean().optional(),featureHoverPanel:o.z.boolean().optional(),elementSelectPanel:o.z.boolean().optional(),linkClickOpen:o.z.boolean().optional(),imageLightboxOpen:o.z.boolean().optional()});var Sa=e("createActionTrigger",oo),xa=e("updateActionTrigger",no),ba=e("deleteActionTrigger",X.z.string()),Ia=e("createPanel",ao),Ea=e("updatePanel",ro),Ca=e("deletePanel",X.z.string()),La=e("createPanelElements",io),Ma=e("updatePanelElements",so),Ua=e("deletePanelElements",lo),Pa=e("updateUiControls",mo),Ta=e("setOnMapInteractionsUi",po),Ga=e("showLayerDataTable",X.z.object({layerId:X.z.string(),sorting:Ie.optional()}).optional()),za=e("hideLayerDataTable",X.z.undefined()),co={methods:[Sa,xa,ba,Ia,Ea,Ca,La,Ma,Ua,Pa,Ta,Ga,za],listeners:null};var rt=require("zod");var ue=require("zod");var Pe=ue.z.object({center:xe,zoom:st}),go=ue.z.object({center:Pe.shape.center.optional(),zoom:Pe.shape.zoom.optional()}),yo=ue.z.object({minZoom:Pe.shape.zoom.nullish(),maxZoom:Pe.shape.zoom.nullish(),bounds:T.nullish()}).nullable(),uo=ue.z.object({bounds:T});var Fa=e("getViewport",rt.z.undefined()),ka=e("setViewport",go),Ba=e("getViewportConstraints",rt.z.undefined()),va=e("setViewportConstraints",yo),Oa=e("fitViewportToBounds",uo),ja=h("onViewportMove"),wa=h("onViewportMoveEnd"),Va=h("onMapIdle"),ho={methods:[ka,Fa,Ba,va,Oa],listeners:[ja,wa,Va]};var it=[co,ho,vt,gt,Vt,yt,Jt,jt];function Aa(r,g,H){let q=new Map;async function V(L){if(!Ja.safeParse(L.data).success){H?.onUnknownMessage?.(L.data);return}let he=xo.safeParse(L.data);if(!he.success){H?.onInvalidMessage?.(L.data,he.error),L.ports[0]?.postMessage(fo(he.error.message));return}let{data:S}=he;if(S.type==="felt.ready")L.ports[0]?.postMessage(!0);else if(S.type==="felt.addListener"){if(S.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let Y="options"in S.event?{options:"options"in S.event?S.event.options:void 0,handler:Ge=>{L.ports[0]?.postMessage(Ge)}}:{handler:Ge=>{L.ports[0]?.postMessage(Ge)}},Te=g.listeners[S.event.eventName](Y);q.set(S.event.id,Te)}else if(S.type==="felt.removeListener")q.get(S.id)?.(),q.delete(S.id);else try{let Y=g.methods[S.type],Te=await Y(S.params);L.ports[0]?.postMessage(Te)}catch(Y){L.ports[0]?.postMessage(fo(Y))}}return r.addEventListener("message",V),()=>{r.removeEventListener("message",V)}}var So={methods:it.map(r=>r.methods??[]).flat(),listeners:it.map(r=>r.listeners??[]).flat()},Ra=d.z.discriminatedUnion("eventName",[d.z.strictObject({eventName:d.z.literal("")}),d.z.strictObject({eventName:d.z.literal("onGenericEvent"),id:d.z.string(),options:d.z.object({id:d.z.string()})}),...So.listeners]),Da=d.z.strictObject({type:d.z.literal("felt.addListener"),event:Ra}),Na=d.z.strictObject({type:d.z.literal("felt.removeListener"),id:d.z.string()}),Ha=d.z.strictObject({type:d.z.literal("felt.ready")}),xo=d.z.discriminatedUnion("type",[Ha,Da,Na,...So.methods]),Ja=d.z.object({type:d.z.enum(xo.options.map(r=>r.shape.type.value))});function fo(r){return{__error__:Za(r)}}function Za(r){return r instanceof Error?r.message:typeof r=="object"&&r!==null&&"message"in r?String(r.message):typeof r=="string"?r:"Unknown error"}0&&(module.exports={createMessageHandler});
|
package/dist/handler.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z, ZodError } from 'zod';
|
|
2
|
-
import { F as FeltController, c3 as UnwrapPromise, z as zInfer, c as ElementChangeCallbackParams, f as ElementGroupChangeCallbackParams, E as Element, D as MapInteractionEvent, ap as FilterTernary, $ as LayerChangeCallbackParams, a2 as LayerGroupChangeCallbackParams, a5 as LegendItemChangeCallbackParams, at as LayerFilters, as as LayerBoundaries, aO as EntityNode, bn as ToolType, bl as ToolSettingsChangeEvent, c4 as uiActionTriggerSchema, c5 as uiPanelCreateSchema, c1 as ViewportState, c6 as PromiseOrNot, c7 as UnionToIntersection } from './controller-
|
|
2
|
+
import { F as FeltController, c3 as UnwrapPromise, z as zInfer, c as ElementChangeCallbackParams, f as ElementGroupChangeCallbackParams, E as Element, D as MapInteractionEvent, ap as FilterTernary, $ as LayerChangeCallbackParams, a2 as LayerGroupChangeCallbackParams, a5 as LegendItemChangeCallbackParams, at as LayerFilters, as as LayerBoundaries, aO as EntityNode, bn as ToolType, bl as ToolSettingsChangeEvent, c4 as uiActionTriggerSchema, c5 as uiPanelCreateSchema, c1 as ViewportState, c6 as PromiseOrNot, c7 as UnionToIntersection } from './controller-g5AHQrRU.cjs';
|
|
3
3
|
|
|
4
4
|
type FeltControllerFunctions = Omit<FeltController, "iframe">;
|
|
5
5
|
type Method<TRequest extends {
|
|
@@ -3767,6 +3767,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3767
3767
|
frame: z.ZodOptional<z.ZodNullable<z.ZodEnum<["frame-circle", "frame-square"]>>>;
|
|
3768
3768
|
afterCreation: z.ZodOptional<z.ZodEnum<["enter name", "add another", "select"]>>;
|
|
3769
3769
|
}, {
|
|
3770
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3770
3771
|
tool: z.ZodLiteral<"pin">;
|
|
3771
3772
|
}>, "strip", z.ZodTypeAny, {
|
|
3772
3773
|
tool: "pin";
|
|
@@ -3774,12 +3775,14 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3774
3775
|
color?: string | undefined;
|
|
3775
3776
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
3776
3777
|
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
3778
|
+
showInspector?: boolean | undefined;
|
|
3777
3779
|
}, {
|
|
3778
3780
|
tool: "pin";
|
|
3779
3781
|
symbol?: string | undefined;
|
|
3780
3782
|
color?: string | undefined;
|
|
3781
3783
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
3782
3784
|
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
3785
|
+
showInspector?: boolean | undefined;
|
|
3783
3786
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3784
3787
|
color: z.ZodOptional<z.ZodString>;
|
|
3785
3788
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3787,6 +3790,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3787
3790
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
3788
3791
|
distanceMarker: z.ZodOptional<z.ZodBoolean>;
|
|
3789
3792
|
}, {
|
|
3793
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3790
3794
|
tool: z.ZodLiteral<"line">;
|
|
3791
3795
|
}>, "strip", z.ZodTypeAny, {
|
|
3792
3796
|
tool: "line";
|
|
@@ -3795,6 +3799,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3795
3799
|
strokeWidth?: number | undefined;
|
|
3796
3800
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3797
3801
|
distanceMarker?: boolean | undefined;
|
|
3802
|
+
showInspector?: boolean | undefined;
|
|
3798
3803
|
}, {
|
|
3799
3804
|
tool: "line";
|
|
3800
3805
|
color?: string | undefined;
|
|
@@ -3802,6 +3807,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3802
3807
|
strokeWidth?: number | undefined;
|
|
3803
3808
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3804
3809
|
distanceMarker?: boolean | undefined;
|
|
3810
|
+
showInspector?: boolean | undefined;
|
|
3805
3811
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3806
3812
|
color: z.ZodOptional<z.ZodString>;
|
|
3807
3813
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3811,6 +3817,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3811
3817
|
routingMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["driving", "cycling", "walking", "flying"]>>>;
|
|
3812
3818
|
endCaps: z.ZodOptional<z.ZodBoolean>;
|
|
3813
3819
|
}, {
|
|
3820
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3814
3821
|
tool: z.ZodLiteral<"route">;
|
|
3815
3822
|
}>, "strip", z.ZodTypeAny, {
|
|
3816
3823
|
tool: "route";
|
|
@@ -3821,6 +3828,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3821
3828
|
distanceMarker?: boolean | undefined;
|
|
3822
3829
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
3823
3830
|
endCaps?: boolean | undefined;
|
|
3831
|
+
showInspector?: boolean | undefined;
|
|
3824
3832
|
}, {
|
|
3825
3833
|
tool: "route";
|
|
3826
3834
|
color?: string | undefined;
|
|
@@ -3830,6 +3838,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3830
3838
|
distanceMarker?: boolean | undefined;
|
|
3831
3839
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
3832
3840
|
endCaps?: boolean | undefined;
|
|
3841
|
+
showInspector?: boolean | undefined;
|
|
3833
3842
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3834
3843
|
color: z.ZodOptional<z.ZodString>;
|
|
3835
3844
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3838,6 +3847,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3838
3847
|
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
3839
3848
|
areaMarker: z.ZodOptional<z.ZodBoolean>;
|
|
3840
3849
|
}, {
|
|
3850
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3841
3851
|
tool: z.ZodLiteral<"polygon">;
|
|
3842
3852
|
}>, "strip", z.ZodTypeAny, {
|
|
3843
3853
|
tool: "polygon";
|
|
@@ -3847,6 +3857,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3847
3857
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3848
3858
|
fillOpacity?: number | undefined;
|
|
3849
3859
|
areaMarker?: boolean | undefined;
|
|
3860
|
+
showInspector?: boolean | undefined;
|
|
3850
3861
|
}, {
|
|
3851
3862
|
tool: "polygon";
|
|
3852
3863
|
color?: string | undefined;
|
|
@@ -3855,6 +3866,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3855
3866
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3856
3867
|
fillOpacity?: number | undefined;
|
|
3857
3868
|
areaMarker?: boolean | undefined;
|
|
3869
|
+
showInspector?: boolean | undefined;
|
|
3858
3870
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3859
3871
|
color: z.ZodOptional<z.ZodString>;
|
|
3860
3872
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3863,6 +3875,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3863
3875
|
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
3864
3876
|
radiusMarker: z.ZodOptional<z.ZodBoolean>;
|
|
3865
3877
|
}, {
|
|
3878
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3866
3879
|
tool: z.ZodLiteral<"circle">;
|
|
3867
3880
|
}>, "strip", z.ZodTypeAny, {
|
|
3868
3881
|
tool: "circle";
|
|
@@ -3872,6 +3885,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3872
3885
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3873
3886
|
fillOpacity?: number | undefined;
|
|
3874
3887
|
radiusMarker?: boolean | undefined;
|
|
3888
|
+
showInspector?: boolean | undefined;
|
|
3875
3889
|
}, {
|
|
3876
3890
|
tool: "circle";
|
|
3877
3891
|
color?: string | undefined;
|
|
@@ -3880,28 +3894,33 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3880
3894
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3881
3895
|
fillOpacity?: number | undefined;
|
|
3882
3896
|
radiusMarker?: boolean | undefined;
|
|
3897
|
+
showInspector?: boolean | undefined;
|
|
3883
3898
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3884
3899
|
color: z.ZodOptional<z.ZodString>;
|
|
3885
3900
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
3886
3901
|
size: z.ZodOptional<z.ZodNumber>;
|
|
3887
3902
|
}, {
|
|
3903
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3888
3904
|
tool: z.ZodLiteral<"marker">;
|
|
3889
3905
|
}>, "strip", z.ZodTypeAny, {
|
|
3890
3906
|
tool: "marker";
|
|
3891
3907
|
color?: string | undefined;
|
|
3892
3908
|
opacity?: number | undefined;
|
|
3893
3909
|
size?: number | undefined;
|
|
3910
|
+
showInspector?: boolean | undefined;
|
|
3894
3911
|
}, {
|
|
3895
3912
|
tool: "marker";
|
|
3896
3913
|
color?: string | undefined;
|
|
3897
3914
|
opacity?: number | undefined;
|
|
3898
3915
|
size?: number | undefined;
|
|
3916
|
+
showInspector?: boolean | undefined;
|
|
3899
3917
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3900
3918
|
color: z.ZodOptional<z.ZodString>;
|
|
3901
3919
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
3902
3920
|
renderHoles: z.ZodOptional<z.ZodBoolean>;
|
|
3903
3921
|
size: z.ZodOptional<z.ZodNumber>;
|
|
3904
3922
|
}, {
|
|
3923
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3905
3924
|
tool: z.ZodLiteral<"highlighter">;
|
|
3906
3925
|
}>, "strip", z.ZodTypeAny, {
|
|
3907
3926
|
tool: "highlighter";
|
|
@@ -3909,44 +3928,52 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3909
3928
|
opacity?: number | undefined;
|
|
3910
3929
|
size?: number | undefined;
|
|
3911
3930
|
renderHoles?: boolean | undefined;
|
|
3931
|
+
showInspector?: boolean | undefined;
|
|
3912
3932
|
}, {
|
|
3913
3933
|
tool: "highlighter";
|
|
3914
3934
|
color?: string | undefined;
|
|
3915
3935
|
opacity?: number | undefined;
|
|
3916
3936
|
size?: number | undefined;
|
|
3917
3937
|
renderHoles?: boolean | undefined;
|
|
3938
|
+
showInspector?: boolean | undefined;
|
|
3918
3939
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3919
3940
|
color: z.ZodOptional<z.ZodString>;
|
|
3920
3941
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
3921
3942
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
3922
3943
|
}, {
|
|
3944
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3923
3945
|
tool: z.ZodLiteral<"text">;
|
|
3924
3946
|
}>, "strip", z.ZodTypeAny, {
|
|
3925
3947
|
tool: "text";
|
|
3926
3948
|
color?: string | undefined;
|
|
3927
3949
|
align?: "center" | "left" | "right" | undefined;
|
|
3928
3950
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
3951
|
+
showInspector?: boolean | undefined;
|
|
3929
3952
|
}, {
|
|
3930
3953
|
tool: "text";
|
|
3931
3954
|
color?: string | undefined;
|
|
3932
3955
|
align?: "center" | "left" | "right" | undefined;
|
|
3933
3956
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
3957
|
+
showInspector?: boolean | undefined;
|
|
3934
3958
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3935
3959
|
color: z.ZodOptional<z.ZodString>;
|
|
3936
3960
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
3937
3961
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
3938
3962
|
}, {
|
|
3963
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3939
3964
|
tool: z.ZodLiteral<"note">;
|
|
3940
3965
|
}>, "strip", z.ZodTypeAny, {
|
|
3941
3966
|
tool: "note";
|
|
3942
3967
|
color?: string | undefined;
|
|
3943
3968
|
align?: "center" | "left" | "right" | undefined;
|
|
3944
3969
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
3970
|
+
showInspector?: boolean | undefined;
|
|
3945
3971
|
}, {
|
|
3946
3972
|
tool: "note";
|
|
3947
3973
|
color?: string | undefined;
|
|
3948
3974
|
align?: "center" | "left" | "right" | undefined;
|
|
3949
3975
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
3976
|
+
showInspector?: boolean | undefined;
|
|
3950
3977
|
}>]>;
|
|
3951
3978
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
3952
3979
|
params: {
|
|
@@ -3955,6 +3982,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3955
3982
|
color?: string | undefined;
|
|
3956
3983
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
3957
3984
|
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
3985
|
+
showInspector?: boolean | undefined;
|
|
3958
3986
|
} | {
|
|
3959
3987
|
tool: "line";
|
|
3960
3988
|
color?: string | undefined;
|
|
@@ -3962,6 +3990,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3962
3990
|
strokeWidth?: number | undefined;
|
|
3963
3991
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3964
3992
|
distanceMarker?: boolean | undefined;
|
|
3993
|
+
showInspector?: boolean | undefined;
|
|
3965
3994
|
} | {
|
|
3966
3995
|
tool: "route";
|
|
3967
3996
|
color?: string | undefined;
|
|
@@ -3971,6 +4000,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3971
4000
|
distanceMarker?: boolean | undefined;
|
|
3972
4001
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
3973
4002
|
endCaps?: boolean | undefined;
|
|
4003
|
+
showInspector?: boolean | undefined;
|
|
3974
4004
|
} | {
|
|
3975
4005
|
tool: "polygon";
|
|
3976
4006
|
color?: string | undefined;
|
|
@@ -3979,6 +4009,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3979
4009
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3980
4010
|
fillOpacity?: number | undefined;
|
|
3981
4011
|
areaMarker?: boolean | undefined;
|
|
4012
|
+
showInspector?: boolean | undefined;
|
|
3982
4013
|
} | {
|
|
3983
4014
|
tool: "circle";
|
|
3984
4015
|
color?: string | undefined;
|
|
@@ -3987,27 +4018,32 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3987
4018
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3988
4019
|
fillOpacity?: number | undefined;
|
|
3989
4020
|
radiusMarker?: boolean | undefined;
|
|
4021
|
+
showInspector?: boolean | undefined;
|
|
3990
4022
|
} | {
|
|
3991
4023
|
tool: "marker";
|
|
3992
4024
|
color?: string | undefined;
|
|
3993
4025
|
opacity?: number | undefined;
|
|
3994
4026
|
size?: number | undefined;
|
|
4027
|
+
showInspector?: boolean | undefined;
|
|
3995
4028
|
} | {
|
|
3996
4029
|
tool: "highlighter";
|
|
3997
4030
|
color?: string | undefined;
|
|
3998
4031
|
opacity?: number | undefined;
|
|
3999
4032
|
size?: number | undefined;
|
|
4000
4033
|
renderHoles?: boolean | undefined;
|
|
4034
|
+
showInspector?: boolean | undefined;
|
|
4001
4035
|
} | {
|
|
4002
4036
|
tool: "text";
|
|
4003
4037
|
color?: string | undefined;
|
|
4004
4038
|
align?: "center" | "left" | "right" | undefined;
|
|
4005
4039
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
4040
|
+
showInspector?: boolean | undefined;
|
|
4006
4041
|
} | {
|
|
4007
4042
|
tool: "note";
|
|
4008
4043
|
color?: string | undefined;
|
|
4009
4044
|
align?: "center" | "left" | "right" | undefined;
|
|
4010
4045
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
4046
|
+
showInspector?: boolean | undefined;
|
|
4011
4047
|
};
|
|
4012
4048
|
type: "setToolSettings";
|
|
4013
4049
|
}, {
|
|
@@ -4017,6 +4053,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
4017
4053
|
color?: string | undefined;
|
|
4018
4054
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
4019
4055
|
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
4056
|
+
showInspector?: boolean | undefined;
|
|
4020
4057
|
} | {
|
|
4021
4058
|
tool: "line";
|
|
4022
4059
|
color?: string | undefined;
|
|
@@ -4024,6 +4061,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
4024
4061
|
strokeWidth?: number | undefined;
|
|
4025
4062
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
4026
4063
|
distanceMarker?: boolean | undefined;
|
|
4064
|
+
showInspector?: boolean | undefined;
|
|
4027
4065
|
} | {
|
|
4028
4066
|
tool: "route";
|
|
4029
4067
|
color?: string | undefined;
|
|
@@ -4033,6 +4071,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
4033
4071
|
distanceMarker?: boolean | undefined;
|
|
4034
4072
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
4035
4073
|
endCaps?: boolean | undefined;
|
|
4074
|
+
showInspector?: boolean | undefined;
|
|
4036
4075
|
} | {
|
|
4037
4076
|
tool: "polygon";
|
|
4038
4077
|
color?: string | undefined;
|
|
@@ -4041,6 +4080,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
4041
4080
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
4042
4081
|
fillOpacity?: number | undefined;
|
|
4043
4082
|
areaMarker?: boolean | undefined;
|
|
4083
|
+
showInspector?: boolean | undefined;
|
|
4044
4084
|
} | {
|
|
4045
4085
|
tool: "circle";
|
|
4046
4086
|
color?: string | undefined;
|
|
@@ -4049,27 +4089,32 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
4049
4089
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
4050
4090
|
fillOpacity?: number | undefined;
|
|
4051
4091
|
radiusMarker?: boolean | undefined;
|
|
4092
|
+
showInspector?: boolean | undefined;
|
|
4052
4093
|
} | {
|
|
4053
4094
|
tool: "marker";
|
|
4054
4095
|
color?: string | undefined;
|
|
4055
4096
|
opacity?: number | undefined;
|
|
4056
4097
|
size?: number | undefined;
|
|
4098
|
+
showInspector?: boolean | undefined;
|
|
4057
4099
|
} | {
|
|
4058
4100
|
tool: "highlighter";
|
|
4059
4101
|
color?: string | undefined;
|
|
4060
4102
|
opacity?: number | undefined;
|
|
4061
4103
|
size?: number | undefined;
|
|
4062
4104
|
renderHoles?: boolean | undefined;
|
|
4105
|
+
showInspector?: boolean | undefined;
|
|
4063
4106
|
} | {
|
|
4064
4107
|
tool: "text";
|
|
4065
4108
|
color?: string | undefined;
|
|
4066
4109
|
align?: "center" | "left" | "right" | undefined;
|
|
4067
4110
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
4111
|
+
showInspector?: boolean | undefined;
|
|
4068
4112
|
} | {
|
|
4069
4113
|
tool: "note";
|
|
4070
4114
|
color?: string | undefined;
|
|
4071
4115
|
align?: "center" | "left" | "right" | undefined;
|
|
4072
4116
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
4117
|
+
showInspector?: boolean | undefined;
|
|
4073
4118
|
};
|
|
4074
4119
|
type: "setToolSettings";
|
|
4075
4120
|
}>;
|
package/dist/handler.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z, ZodError } from 'zod';
|
|
2
|
-
import { F as FeltController, c3 as UnwrapPromise, z as zInfer, c as ElementChangeCallbackParams, f as ElementGroupChangeCallbackParams, E as Element, D as MapInteractionEvent, ap as FilterTernary, $ as LayerChangeCallbackParams, a2 as LayerGroupChangeCallbackParams, a5 as LegendItemChangeCallbackParams, at as LayerFilters, as as LayerBoundaries, aO as EntityNode, bn as ToolType, bl as ToolSettingsChangeEvent, c4 as uiActionTriggerSchema, c5 as uiPanelCreateSchema, c1 as ViewportState, c6 as PromiseOrNot, c7 as UnionToIntersection } from './controller-
|
|
2
|
+
import { F as FeltController, c3 as UnwrapPromise, z as zInfer, c as ElementChangeCallbackParams, f as ElementGroupChangeCallbackParams, E as Element, D as MapInteractionEvent, ap as FilterTernary, $ as LayerChangeCallbackParams, a2 as LayerGroupChangeCallbackParams, a5 as LegendItemChangeCallbackParams, at as LayerFilters, as as LayerBoundaries, aO as EntityNode, bn as ToolType, bl as ToolSettingsChangeEvent, c4 as uiActionTriggerSchema, c5 as uiPanelCreateSchema, c1 as ViewportState, c6 as PromiseOrNot, c7 as UnionToIntersection } from './controller-g5AHQrRU.js';
|
|
3
3
|
|
|
4
4
|
type FeltControllerFunctions = Omit<FeltController, "iframe">;
|
|
5
5
|
type Method<TRequest extends {
|
|
@@ -3767,6 +3767,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3767
3767
|
frame: z.ZodOptional<z.ZodNullable<z.ZodEnum<["frame-circle", "frame-square"]>>>;
|
|
3768
3768
|
afterCreation: z.ZodOptional<z.ZodEnum<["enter name", "add another", "select"]>>;
|
|
3769
3769
|
}, {
|
|
3770
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3770
3771
|
tool: z.ZodLiteral<"pin">;
|
|
3771
3772
|
}>, "strip", z.ZodTypeAny, {
|
|
3772
3773
|
tool: "pin";
|
|
@@ -3774,12 +3775,14 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3774
3775
|
color?: string | undefined;
|
|
3775
3776
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
3776
3777
|
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
3778
|
+
showInspector?: boolean | undefined;
|
|
3777
3779
|
}, {
|
|
3778
3780
|
tool: "pin";
|
|
3779
3781
|
symbol?: string | undefined;
|
|
3780
3782
|
color?: string | undefined;
|
|
3781
3783
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
3782
3784
|
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
3785
|
+
showInspector?: boolean | undefined;
|
|
3783
3786
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3784
3787
|
color: z.ZodOptional<z.ZodString>;
|
|
3785
3788
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3787,6 +3790,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3787
3790
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
3788
3791
|
distanceMarker: z.ZodOptional<z.ZodBoolean>;
|
|
3789
3792
|
}, {
|
|
3793
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3790
3794
|
tool: z.ZodLiteral<"line">;
|
|
3791
3795
|
}>, "strip", z.ZodTypeAny, {
|
|
3792
3796
|
tool: "line";
|
|
@@ -3795,6 +3799,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3795
3799
|
strokeWidth?: number | undefined;
|
|
3796
3800
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3797
3801
|
distanceMarker?: boolean | undefined;
|
|
3802
|
+
showInspector?: boolean | undefined;
|
|
3798
3803
|
}, {
|
|
3799
3804
|
tool: "line";
|
|
3800
3805
|
color?: string | undefined;
|
|
@@ -3802,6 +3807,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3802
3807
|
strokeWidth?: number | undefined;
|
|
3803
3808
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3804
3809
|
distanceMarker?: boolean | undefined;
|
|
3810
|
+
showInspector?: boolean | undefined;
|
|
3805
3811
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3806
3812
|
color: z.ZodOptional<z.ZodString>;
|
|
3807
3813
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3811,6 +3817,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3811
3817
|
routingMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["driving", "cycling", "walking", "flying"]>>>;
|
|
3812
3818
|
endCaps: z.ZodOptional<z.ZodBoolean>;
|
|
3813
3819
|
}, {
|
|
3820
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3814
3821
|
tool: z.ZodLiteral<"route">;
|
|
3815
3822
|
}>, "strip", z.ZodTypeAny, {
|
|
3816
3823
|
tool: "route";
|
|
@@ -3821,6 +3828,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3821
3828
|
distanceMarker?: boolean | undefined;
|
|
3822
3829
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
3823
3830
|
endCaps?: boolean | undefined;
|
|
3831
|
+
showInspector?: boolean | undefined;
|
|
3824
3832
|
}, {
|
|
3825
3833
|
tool: "route";
|
|
3826
3834
|
color?: string | undefined;
|
|
@@ -3830,6 +3838,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3830
3838
|
distanceMarker?: boolean | undefined;
|
|
3831
3839
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
3832
3840
|
endCaps?: boolean | undefined;
|
|
3841
|
+
showInspector?: boolean | undefined;
|
|
3833
3842
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3834
3843
|
color: z.ZodOptional<z.ZodString>;
|
|
3835
3844
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3838,6 +3847,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3838
3847
|
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
3839
3848
|
areaMarker: z.ZodOptional<z.ZodBoolean>;
|
|
3840
3849
|
}, {
|
|
3850
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3841
3851
|
tool: z.ZodLiteral<"polygon">;
|
|
3842
3852
|
}>, "strip", z.ZodTypeAny, {
|
|
3843
3853
|
tool: "polygon";
|
|
@@ -3847,6 +3857,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3847
3857
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3848
3858
|
fillOpacity?: number | undefined;
|
|
3849
3859
|
areaMarker?: boolean | undefined;
|
|
3860
|
+
showInspector?: boolean | undefined;
|
|
3850
3861
|
}, {
|
|
3851
3862
|
tool: "polygon";
|
|
3852
3863
|
color?: string | undefined;
|
|
@@ -3855,6 +3866,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3855
3866
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3856
3867
|
fillOpacity?: number | undefined;
|
|
3857
3868
|
areaMarker?: boolean | undefined;
|
|
3869
|
+
showInspector?: boolean | undefined;
|
|
3858
3870
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3859
3871
|
color: z.ZodOptional<z.ZodString>;
|
|
3860
3872
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3863,6 +3875,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3863
3875
|
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
3864
3876
|
radiusMarker: z.ZodOptional<z.ZodBoolean>;
|
|
3865
3877
|
}, {
|
|
3878
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3866
3879
|
tool: z.ZodLiteral<"circle">;
|
|
3867
3880
|
}>, "strip", z.ZodTypeAny, {
|
|
3868
3881
|
tool: "circle";
|
|
@@ -3872,6 +3885,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3872
3885
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3873
3886
|
fillOpacity?: number | undefined;
|
|
3874
3887
|
radiusMarker?: boolean | undefined;
|
|
3888
|
+
showInspector?: boolean | undefined;
|
|
3875
3889
|
}, {
|
|
3876
3890
|
tool: "circle";
|
|
3877
3891
|
color?: string | undefined;
|
|
@@ -3880,28 +3894,33 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3880
3894
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3881
3895
|
fillOpacity?: number | undefined;
|
|
3882
3896
|
radiusMarker?: boolean | undefined;
|
|
3897
|
+
showInspector?: boolean | undefined;
|
|
3883
3898
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3884
3899
|
color: z.ZodOptional<z.ZodString>;
|
|
3885
3900
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
3886
3901
|
size: z.ZodOptional<z.ZodNumber>;
|
|
3887
3902
|
}, {
|
|
3903
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3888
3904
|
tool: z.ZodLiteral<"marker">;
|
|
3889
3905
|
}>, "strip", z.ZodTypeAny, {
|
|
3890
3906
|
tool: "marker";
|
|
3891
3907
|
color?: string | undefined;
|
|
3892
3908
|
opacity?: number | undefined;
|
|
3893
3909
|
size?: number | undefined;
|
|
3910
|
+
showInspector?: boolean | undefined;
|
|
3894
3911
|
}, {
|
|
3895
3912
|
tool: "marker";
|
|
3896
3913
|
color?: string | undefined;
|
|
3897
3914
|
opacity?: number | undefined;
|
|
3898
3915
|
size?: number | undefined;
|
|
3916
|
+
showInspector?: boolean | undefined;
|
|
3899
3917
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3900
3918
|
color: z.ZodOptional<z.ZodString>;
|
|
3901
3919
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
3902
3920
|
renderHoles: z.ZodOptional<z.ZodBoolean>;
|
|
3903
3921
|
size: z.ZodOptional<z.ZodNumber>;
|
|
3904
3922
|
}, {
|
|
3923
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3905
3924
|
tool: z.ZodLiteral<"highlighter">;
|
|
3906
3925
|
}>, "strip", z.ZodTypeAny, {
|
|
3907
3926
|
tool: "highlighter";
|
|
@@ -3909,44 +3928,52 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3909
3928
|
opacity?: number | undefined;
|
|
3910
3929
|
size?: number | undefined;
|
|
3911
3930
|
renderHoles?: boolean | undefined;
|
|
3931
|
+
showInspector?: boolean | undefined;
|
|
3912
3932
|
}, {
|
|
3913
3933
|
tool: "highlighter";
|
|
3914
3934
|
color?: string | undefined;
|
|
3915
3935
|
opacity?: number | undefined;
|
|
3916
3936
|
size?: number | undefined;
|
|
3917
3937
|
renderHoles?: boolean | undefined;
|
|
3938
|
+
showInspector?: boolean | undefined;
|
|
3918
3939
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3919
3940
|
color: z.ZodOptional<z.ZodString>;
|
|
3920
3941
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
3921
3942
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
3922
3943
|
}, {
|
|
3944
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3923
3945
|
tool: z.ZodLiteral<"text">;
|
|
3924
3946
|
}>, "strip", z.ZodTypeAny, {
|
|
3925
3947
|
tool: "text";
|
|
3926
3948
|
color?: string | undefined;
|
|
3927
3949
|
align?: "center" | "left" | "right" | undefined;
|
|
3928
3950
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
3951
|
+
showInspector?: boolean | undefined;
|
|
3929
3952
|
}, {
|
|
3930
3953
|
tool: "text";
|
|
3931
3954
|
color?: string | undefined;
|
|
3932
3955
|
align?: "center" | "left" | "right" | undefined;
|
|
3933
3956
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
3957
|
+
showInspector?: boolean | undefined;
|
|
3934
3958
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3935
3959
|
color: z.ZodOptional<z.ZodString>;
|
|
3936
3960
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
3937
3961
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
3938
3962
|
}, {
|
|
3963
|
+
showInspector: z.ZodOptional<z.ZodBoolean>;
|
|
3939
3964
|
tool: z.ZodLiteral<"note">;
|
|
3940
3965
|
}>, "strip", z.ZodTypeAny, {
|
|
3941
3966
|
tool: "note";
|
|
3942
3967
|
color?: string | undefined;
|
|
3943
3968
|
align?: "center" | "left" | "right" | undefined;
|
|
3944
3969
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
3970
|
+
showInspector?: boolean | undefined;
|
|
3945
3971
|
}, {
|
|
3946
3972
|
tool: "note";
|
|
3947
3973
|
color?: string | undefined;
|
|
3948
3974
|
align?: "center" | "left" | "right" | undefined;
|
|
3949
3975
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
3976
|
+
showInspector?: boolean | undefined;
|
|
3950
3977
|
}>]>;
|
|
3951
3978
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
3952
3979
|
params: {
|
|
@@ -3955,6 +3982,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3955
3982
|
color?: string | undefined;
|
|
3956
3983
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
3957
3984
|
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
3985
|
+
showInspector?: boolean | undefined;
|
|
3958
3986
|
} | {
|
|
3959
3987
|
tool: "line";
|
|
3960
3988
|
color?: string | undefined;
|
|
@@ -3962,6 +3990,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3962
3990
|
strokeWidth?: number | undefined;
|
|
3963
3991
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3964
3992
|
distanceMarker?: boolean | undefined;
|
|
3993
|
+
showInspector?: boolean | undefined;
|
|
3965
3994
|
} | {
|
|
3966
3995
|
tool: "route";
|
|
3967
3996
|
color?: string | undefined;
|
|
@@ -3971,6 +4000,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3971
4000
|
distanceMarker?: boolean | undefined;
|
|
3972
4001
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
3973
4002
|
endCaps?: boolean | undefined;
|
|
4003
|
+
showInspector?: boolean | undefined;
|
|
3974
4004
|
} | {
|
|
3975
4005
|
tool: "polygon";
|
|
3976
4006
|
color?: string | undefined;
|
|
@@ -3979,6 +4009,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3979
4009
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3980
4010
|
fillOpacity?: number | undefined;
|
|
3981
4011
|
areaMarker?: boolean | undefined;
|
|
4012
|
+
showInspector?: boolean | undefined;
|
|
3982
4013
|
} | {
|
|
3983
4014
|
tool: "circle";
|
|
3984
4015
|
color?: string | undefined;
|
|
@@ -3987,27 +4018,32 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
3987
4018
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
3988
4019
|
fillOpacity?: number | undefined;
|
|
3989
4020
|
radiusMarker?: boolean | undefined;
|
|
4021
|
+
showInspector?: boolean | undefined;
|
|
3990
4022
|
} | {
|
|
3991
4023
|
tool: "marker";
|
|
3992
4024
|
color?: string | undefined;
|
|
3993
4025
|
opacity?: number | undefined;
|
|
3994
4026
|
size?: number | undefined;
|
|
4027
|
+
showInspector?: boolean | undefined;
|
|
3995
4028
|
} | {
|
|
3996
4029
|
tool: "highlighter";
|
|
3997
4030
|
color?: string | undefined;
|
|
3998
4031
|
opacity?: number | undefined;
|
|
3999
4032
|
size?: number | undefined;
|
|
4000
4033
|
renderHoles?: boolean | undefined;
|
|
4034
|
+
showInspector?: boolean | undefined;
|
|
4001
4035
|
} | {
|
|
4002
4036
|
tool: "text";
|
|
4003
4037
|
color?: string | undefined;
|
|
4004
4038
|
align?: "center" | "left" | "right" | undefined;
|
|
4005
4039
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
4040
|
+
showInspector?: boolean | undefined;
|
|
4006
4041
|
} | {
|
|
4007
4042
|
tool: "note";
|
|
4008
4043
|
color?: string | undefined;
|
|
4009
4044
|
align?: "center" | "left" | "right" | undefined;
|
|
4010
4045
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
4046
|
+
showInspector?: boolean | undefined;
|
|
4011
4047
|
};
|
|
4012
4048
|
type: "setToolSettings";
|
|
4013
4049
|
}, {
|
|
@@ -4017,6 +4053,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
4017
4053
|
color?: string | undefined;
|
|
4018
4054
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
4019
4055
|
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
4056
|
+
showInspector?: boolean | undefined;
|
|
4020
4057
|
} | {
|
|
4021
4058
|
tool: "line";
|
|
4022
4059
|
color?: string | undefined;
|
|
@@ -4024,6 +4061,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
4024
4061
|
strokeWidth?: number | undefined;
|
|
4025
4062
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
4026
4063
|
distanceMarker?: boolean | undefined;
|
|
4064
|
+
showInspector?: boolean | undefined;
|
|
4027
4065
|
} | {
|
|
4028
4066
|
tool: "route";
|
|
4029
4067
|
color?: string | undefined;
|
|
@@ -4033,6 +4071,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
4033
4071
|
distanceMarker?: boolean | undefined;
|
|
4034
4072
|
routingMode?: "driving" | "cycling" | "walking" | "flying" | null | undefined;
|
|
4035
4073
|
endCaps?: boolean | undefined;
|
|
4074
|
+
showInspector?: boolean | undefined;
|
|
4036
4075
|
} | {
|
|
4037
4076
|
tool: "polygon";
|
|
4038
4077
|
color?: string | undefined;
|
|
@@ -4041,6 +4080,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
4041
4080
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
4042
4081
|
fillOpacity?: number | undefined;
|
|
4043
4082
|
areaMarker?: boolean | undefined;
|
|
4083
|
+
showInspector?: boolean | undefined;
|
|
4044
4084
|
} | {
|
|
4045
4085
|
tool: "circle";
|
|
4046
4086
|
color?: string | undefined;
|
|
@@ -4049,27 +4089,32 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
4049
4089
|
strokeStyle?: "solid" | "dashed" | "dotted" | undefined;
|
|
4050
4090
|
fillOpacity?: number | undefined;
|
|
4051
4091
|
radiusMarker?: boolean | undefined;
|
|
4092
|
+
showInspector?: boolean | undefined;
|
|
4052
4093
|
} | {
|
|
4053
4094
|
tool: "marker";
|
|
4054
4095
|
color?: string | undefined;
|
|
4055
4096
|
opacity?: number | undefined;
|
|
4056
4097
|
size?: number | undefined;
|
|
4098
|
+
showInspector?: boolean | undefined;
|
|
4057
4099
|
} | {
|
|
4058
4100
|
tool: "highlighter";
|
|
4059
4101
|
color?: string | undefined;
|
|
4060
4102
|
opacity?: number | undefined;
|
|
4061
4103
|
size?: number | undefined;
|
|
4062
4104
|
renderHoles?: boolean | undefined;
|
|
4105
|
+
showInspector?: boolean | undefined;
|
|
4063
4106
|
} | {
|
|
4064
4107
|
tool: "text";
|
|
4065
4108
|
color?: string | undefined;
|
|
4066
4109
|
align?: "center" | "left" | "right" | undefined;
|
|
4067
4110
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
4111
|
+
showInspector?: boolean | undefined;
|
|
4068
4112
|
} | {
|
|
4069
4113
|
tool: "note";
|
|
4070
4114
|
color?: string | undefined;
|
|
4071
4115
|
align?: "center" | "left" | "right" | undefined;
|
|
4072
4116
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
4117
|
+
showInspector?: boolean | undefined;
|
|
4073
4118
|
};
|
|
4074
4119
|
type: "setToolSettings";
|
|
4075
4120
|
}>;
|
package/dist/handler.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as d}from"zod";import{z as L}from"zod";import{z as v}from"zod";function e(i,N){return v.strictObject({type:v.literal(i),params:N})}function I(i,N){return v.strictObject({eventName:v.literal(i),id:v.string(),options:N})}function g(i){return v.strictObject({eventName:v.literal(i),id:v.string()})}import{z as s}from"zod";var ce=s.number(),de=s.number(),ye=s.object({latitude:de,longitude:ce}),O=s.tuple([ce,de]),K=s.object({type:s.literal("Polygon"),coordinates:s.array(s.array(O).min(4).refine(i=>i[0][0]===i[i.length-1][0]&&i[0][1]===i[i.length-1][1],"The last point of each ring must be identical to the first"))}),ge=s.object({type:s.literal("MultiPolygon"),coordinates:s.array(K.shape.coordinates)}),go=s.object({type:s.literal("LineString"),coordinates:s.array(O).min(2)}),_=s.object({type:s.literal("MultiLineString"),coordinates:s.array(go.shape.coordinates)}),at=s.number().min(1).max(23),U=s.tuple([ce,de,ce,de]),A=s.object({show:s.array(s.string()).optional(),hide:s.array(s.string()).optional()}),uo=s.enum(["asc","desc"]),ue=s.object({attribute:s.string(),direction:uo});import{z as t}from"zod";var C=t.object({id:t.string(),groupId:t.string().nullable(),color:t.string(),name:t.string().nullable(),description:t.string().nullable(),attributes:t.record(t.string(),t.unknown()),interaction:t.enum(["default","locked"]).optional()}),Se=t.object({imageUrl:t.string().nullable()}),Ge=t.object({strokeOpacity:t.number(),strokeWidth:t.number(),strokeStyle:t.enum(["solid","dashed","dotted"])}),ho=t.enum(["meter","kilometer","foot","mile"]),he=C.extend(Se.shape).extend({type:t.literal("Place"),coordinates:O,symbol:t.string(),frame:t.enum(["frame-circle","frame-square"]).nullable(),hideLabel:t.boolean()}),Q=C.extend(Se.shape).extend(Ge.shape).extend({type:t.literal("Path"),coordinates:_.shape.coordinates,distanceMarker:t.boolean(),routingMode:t.enum(["driving","cycling","walking","flying"]).nullable(),endCaps:t.boolean()}),$=C.extend(Se.shape).extend(Ge.shape).extend({type:t.literal("Polygon"),coordinates:K.shape.coordinates,fillOpacity:t.number().min(0).max(1),areaMarker:t.boolean()}),fe=C.extend(Se.shape).extend(Ge.shape).extend({type:t.literal("Circle"),center:O,radius:t.number(),radiusMarker:t.boolean(),radiusDisplayAngle:t.number(),radiusDisplayUnit:ho.nullable(),fillOpacity:t.number().min(0).max(1)}),X=C.extend({type:t.literal("Marker"),coordinates:_.shape.coordinates,opacity:t.number().min(0).max(1),size:t.number().min(0).max(100),zoom:t.number().min(0).max(23)}),Y=C.extend({type:t.literal("Highlighter"),coordinates:ge.shape.coordinates,renderHoles:t.boolean(),opacity:t.number().min(0).max(1)}),nt=t.object({position:O,rotation:t.number(),scale:t.number(),zoom:t.number().min(0).max(23),text:t.string(),align:t.enum(["left","center","right"]),style:t.enum(["italic","light","regular","caps"]),name:t.string()}),Pe=C.extend(nt.shape).extend({type:t.literal("Text")}),Te=C.extend(nt.shape).extend({type:t.literal("Note"),widthScale:t.number().min(0)}),ee=C.extend({type:t.literal("Image"),coordinates:_.shape.coordinates,imageUrl:t.string(),opacity:t.number().min(0).max(1)}).omit({color:!0}),fo=C.extend({type:t.literal("Link"),coordinates:_.shape.coordinates,url:t.string()}),H={type:!0,coordinates:!0},P={id:!0},ze=he.partial().extend(he.pick(H).shape).omit(P),xe=Q.partial().extend(Q.pick(H).shape).omit(P),Fe=$.partial().extend($.pick(H).shape).omit(P),ke=fe.partial().extend(fe.pick({type:!0,center:!0,radius:!0}).shape).omit(P),Be=X.partial().extend(X.pick(H).shape).omit(P),ve=Y.partial().extend(Y.pick(H).shape).omit(P),Oe=Pe.partial().omit({...P,name:!0,type:!0}).extend({type:t.literal("Text"),text:t.string()}),je=Te.partial().omit({...P,name:!0,type:!0}).extend({type:t.literal("Note"),text:t.string()}),So=ee.partial().extend(ee.pick({...H,imageUrl:!0}).shape).omit(P),rt=t.discriminatedUnion("type",[ze,xe,Fe,ke,Be,ve,So,Oe,je]);var Jn=Q.omit({coordinates:!0}),Zn=$.omit({coordinates:!0});var qn=X.omit({coordinates:!0}),Wn=Y.omit({coordinates:!0});var Kn=ee.omit({coordinates:!0}),_n=fo.omit({coordinates:!0}),T={type:!0,id:!0},xo=he.partial().extend(he.pick(T).shape),bo=Q.partial().extend(Q.pick(T).shape),Eo=$.partial().extend($.pick(T).shape),Io=fe.partial().extend(fe.pick(T).shape),Co=X.partial().extend(X.pick(T).shape),Lo=Y.partial().extend(Y.pick(T).shape),Mo=Pe.partial().extend(Pe.pick(T).shape).omit({name:!0}),Uo=Te.partial().extend(Te.pick(T).shape).omit({name:!0}),Po=ee.partial().extend(ee.pick(T).shape),it=t.discriminatedUnion("type",[xo,bo,Eo,Io,Co,Lo,Mo,Uo,Po]),lt=t.object({ids:t.array(t.string()).optional()}),st=t.object({ids:t.array(t.string()).optional()});var To=e("getElement",L.string()),Go=e("getElementGeometry",L.string()),zo=e("getElements",lt.optional()),Fo=e("getElementGroup",L.string()),ko=e("getElementGroups",st.optional()),Bo=e("setElementGroupVisibility",A),vo=I("onElementChange",L.object({id:L.string()})),Oo=g("onElementCreate"),jo=g("onElementCreateEnd"),Vo=I("onElementDelete",L.object({id:L.string()})),Ao=I("onElementGroupChange",L.object({id:L.string()})),wo=e("createElement",rt),Ro=e("updateElement",it),Do=e("deleteElement",L.string()),mt={methods:[To,Go,zo,Fo,ko,Bo,wo,Ro,Do],listeners:[vo,Oo,jo,Vo,Ao]};var No=g("onPointerClick"),Ho=g("onPointerMove"),pt={methods:null,listeners:[No,Ho]};import{z as r}from"zod";import{z as l}from"zod";var Jo=l.enum(["in","ni"]),Zo=l.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),ir=l.enum(["and","or"]),ct=l.union([l.number(),l.string(),l.boolean(),l.null()]),dt=l.string().or(l.null()),qo=l.tuple([dt,Jo,l.array(ct).or(l.null())]),Wo=l.tuple([dt,Zo,ct]),Ve=l.union([qo,Wo]),Ae=l.tuple([l.lazy(()=>l.union([Ae,Ve,l.null(),l.boolean()])),l.enum(["and","or"]),l.lazy(()=>l.union([Ae,Ve,l.null(),l.boolean()]))]),G=l.union([Ae,Ve,l.null(),l.boolean()]),z=l.union([U,K,ge,l.array(O)]);import{z as a}from"zod";var yt=a.enum(["avg","max","min","sum","median"]),gt=a.enum(["avg","max","min","sum","count"]),Ko=a.object({method:yt,attribute:a.string()}),_o=a.object({methods:a.array(a.union([yt,a.literal("count")])),attribute:a.string().optional()}),ut=a.object({boundary:z.optional(),filters:G.optional(),aggregation:Ko.optional()}),ht=a.object({layerId:a.string(),attribute:a.string(),limit:a.number().optional(),boundary:z.optional(),filters:G.optional(),values:ut.optional()}),pr=a.object({key:a.union([a.number(),a.string(),a.boolean()]),value:a.number().nullable()}),Qo=a.object({type:a.literal("equal-intervals"),count:a.number()}),$o=a.object({type:a.literal("time-interval"),interval:a.enum(["hour","day","week","month","year"])}),ft=a.object({layerId:a.string(),attribute:a.string(),steps:a.union([Qo,$o,a.array(a.number())]),boundary:z.optional(),filters:G.optional(),values:ut.optional()}),cr=a.object({min:a.number(),max:a.number(),value:a.number()}),St=a.object({layerId:a.string(),boundary:z.optional(),filters:G.optional(),aggregation:_o}),xt=a.enum(["h3"]),Xo=a.object({type:xt,resolution:a.number(),method:gt.extract(["count"])}),Yo=a.object({type:xt,resolution:a.number(),method:gt.exclude(["count"]),attribute:a.string()}),ea=a.union([Xo,Yo]),bt=a.object({layerId:a.string(),boundary:z.optional(),filters:G.optional(),gridConfig:ea});import{z as n}from"zod";var ur=n.enum(["processing","completed","failed","incomplete"]),Et=n.object({type:n.literal("geoJsonUrl"),url:n.string().url(),refreshInterval:n.number().min(250).max(5*60*1e3).nullable().optional()}),It=n.object({type:n.literal("geoJsonData"),data:n.object({}).passthrough().or(n.instanceof(ArrayBuffer))}),Ct=n.object({type:n.literal("geoJsonFile"),file:n.instanceof(File)}),Lt=n.object({id:n.string(),style:n.object({}).passthrough().optional(),shownInLegend:n.boolean().optional(),name:n.string().optional(),caption:n.string().optional(),description:n.string().optional(),bounds:U.optional(),source:n.union([Et,It,Ct]).optional()}),Mt=n.object({ids:n.array(n.string()).optional()}),Ut=n.object({ids:n.array(n.string()).optional()}),J=n.object({id:n.string(),layerId:n.string()}),Pt=n.object({ids:J.array().optional(),layerIds:n.string().array().optional()}),Tt=n.object({layerIds:n.array(n.string()).optional(),areaQuery:n.union([n.object({coordinates:ye}),n.object({boundary:U})]).optional()}),ta=n.object({Point:n.object({}).passthrough().optional(),Line:n.object({}).passthrough().optional(),Polygon:n.object({}).passthrough().optional()}),Gt=n.object({source:n.union([Et,It,Ct]),name:n.string(),bounds:U.optional(),caption:n.string().optional(),description:n.string().optional(),geometryStyles:ta.optional()});var oa=e("getLayer",r.string()),aa=e("getLayers",Mt.optional()),na=e("setLayerVisibility",A),ra=I("onLayerChange",r.object({id:r.string()})),ia=e("setLayerStyle",r.object({id:r.string(),style:r.object({}).passthrough()})),la=e("setLayerLegendVisibility",A),sa=e("createLayersFromGeoJson",Gt),ma=e("updateLayer",Lt),pa=e("deleteLayer",r.string()),ca=e("getLayerGroup",r.string()),da=e("getLayerGroups",Ut.optional()),ya=e("setLayerGroupVisibility",A),ga=e("setLayerGroupLegendVisibility",A),ua=I("onLayerGroupChange",r.object({id:r.string()})),ha=e("getLegendItem",J),fa=e("getLegendItems",Pt.optional()),Sa=I("onLegendItemChange",J),xa=e("setLegendItemVisibility",r.object({show:J.array().optional(),hide:J.array().optional()})),ba=e("getLayerFilters",r.string()),Ea=e("setLayerFilters",r.object({layerId:r.string(),filters:G,note:r.string().optional()})),Ia=I("onLayerFiltersChange",r.object({layerId:r.string()})),Ca=e("getLayerBoundaries",r.string()),La=e("setLayerBoundary",r.object({layerIds:r.array(r.string()),boundary:z.nullable()})),Ma=I("onLayerBoundariesChange",r.object({layerId:r.string()})),Ua=e("getRenderedFeatures",Tt.optional()),Pa=e("getFeature",r.object({id:r.string().or(r.number()),layerId:r.string()})),Ta=e("getFeatures",r.object({layerId:r.string(),filters:G.optional(),sorting:ue.optional(),boundary:z.optional(),search:r.string().optional(),pagination:r.string().optional().nullish()})),Ga=e("getGeoJsonFeature",r.object({id:r.string().or(r.number()),layerId:r.string()})),za=e("getCategoryData",ht),Fa=e("getHistogramData",ft),ka=e("getAggregates",St),Ba=e("getPrecomputedAggregates",bt),va=e("getLayerSchema",r.string()),zt={methods:[oa,aa,na,ia,la,sa,pa,ma,ca,da,ya,ga,ha,fa,xa,ba,Ea,Ca,La,Ua,Pa,Ta,Ga,za,Fa,ka,Ba,va],listeners:[ra,ua,Sa,Ia,Ma]};import{z as Oa}from"zod";var ja=e("getMapDetails",Oa.undefined()),Ft={methods:[ja],listeners:[]};import{z as be}from"zod";import{z as j}from"zod";var kt=j.object({id:j.string().or(j.number()),layerId:j.string(),showPopup:j.boolean().optional(),fitViewport:j.boolean().or(j.object({maxZoom:j.number()})).optional()});var Va=e("getSelection",be.undefined()),Aa=g("onSelectionChange"),wa=e("selectFeature",kt),Ra=e("clearSelection",be.object({features:be.boolean().optional(),elements:be.boolean().optional()}).optional()),Bt={methods:[Va,wa,Ra],listeners:[Aa]};import{z as $a}from"zod";import{z as u}from"zod";var vt=["circle","highlighter","line","marker","note","pin","polygon","route","text"],Da=[...vt,"link"],Ot=u.enum(Da),jt=u.enum(vt),Na=ze.pick({color:!0,symbol:!0,frame:!0}).extend({afterCreation:u.enum(["enter name","add another","select"])}).required(),Ha=xe.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),Ja=xe.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),Za=Fe.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),qa=ke.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),Wa=Be.pick({color:!0,opacity:!0,size:!0}).required(),Ka=ve.pick({color:!0,opacity:!0,renderHoles:!0}).extend({size:u.number().min(0).max(200)}).required(),_a=Oe.pick({color:!0,align:!0,style:!0}).required(),Qa=je.pick({color:!0,align:!0,style:!0}).required(),Vt=u.discriminatedUnion("tool",[Na.partial().extend({tool:u.literal("pin")}),Ha.partial().extend({tool:u.literal("line")}),Ja.partial().extend({tool:u.literal("route")}),Za.partial().extend({tool:u.literal("polygon")}),qa.partial().extend({tool:u.literal("circle")}),Wa.partial().extend({tool:u.literal("marker")}),Ka.partial().extend({tool:u.literal("highlighter")}),_a.partial().extend({tool:u.literal("text")}),Qa.partial().extend({tool:u.literal("note")})]);var Xa=e("setTool",Ot.nullable()),Ya=e("getTool",$a.undefined()),en=g("onToolChange"),tn=e("setToolSettings",Vt),on=e("getToolSettings",jt),an=g("onToolSettingsChange"),At={methods:[Xa,Ya,tn,on],listeners:[en,an]};import{z as me}from"zod";import{z as o}from"zod";import{z as w}from"zod";var R=w.union([w.object({after:w.string()}),w.object({before:w.string()}),w.object({at:w.enum(["start","end"])})]);import{z as x}from"zod";import{z as S}from"zod";var nn=S.object({onCreate:S.function().args().returns(S.void()).optional(),onDestroy:S.function().args().returns(S.void()).optional()}),rn=S.object({onCreate:S.string().optional(),onDestroy:S.string().optional()}),y=nn.extend({id:S.string()}),wt=y.partial({id:!0}),m={params:wt,clonable:wt.extend(rn.shape)},Z=y.extend({label:S.string().optional()}),q={params:Z.extend(m.params.shape),clonable:Z.extend(m.clonable.shape)};function p(i){return i.partial().extend({id:S.string(),type:i.shape.type})}var we=x.object({type:x.literal("ActionTrigger"),label:x.string(),disabled:x.boolean().optional()}),te={read:y.extend(we.shape).extend({onTrigger:x.function().returns(x.void())}),create:m.params.extend(we.shape).extend({type:x.undefined()}).extend({onTrigger:x.function().returns(x.void())}),clonable:m.clonable.extend(we.shape).extend({type:x.undefined()}).extend({onTrigger:x.string()})};import{z as ln}from"zod";var Re=y.extend({type:ln.literal("FlexibleSpace")}),Rt=Re.partial({id:!0}),F={params:Rt,clonable:Rt.extend(m.clonable.shape)},De={params:p(F.params),clonable:p(F.clonable)};import{z as b}from"zod";import{z as se}from"zod";import{z as D}from"zod";var oe=y.extend({type:D.literal("Button"),label:D.string(),variant:D.enum(["primary","outlined","transparent","transparentThin"]).optional(),disabled:D.boolean().optional(),onClick:D.function().returns(D.void())}),Dt=oe.extend(m.params.shape),k={params:Dt,clonable:Dt.extend(m.clonable.shape).extend({onClick:D.string()})},Ne={params:p(k.params),clonable:p(k.clonable)};import{z as M}from"zod";import{z as Nt}from"zod";var ae=y.extend({type:Nt.literal("Text"),content:Nt.string()}),Ht=ae.extend(m.params.shape),B={params:Ht,clonable:Ht.extend(m.clonable.shape)},He={params:p(B.params),clonable:p(B.clonable)};var Je=y.extend({type:M.literal("ButtonGroup"),align:M.enum(["start","end"]).optional(),items:M.array(M.union([oe,ae,Re]))}),Jt=Je.extend(m.params.shape).omit({items:!0}).extend({items:M.array(M.union([k.params,B.params,F.params]))}),ne={params:Jt,clonable:Jt.extend(m.clonable.shape).extend({items:M.array(M.union([k.clonable,B.clonable,F.clonable]))})},Ze={params:p(ne.params),clonable:p(ne.clonable.extend({items:M.array(M.union([k.clonable,B.clonable,F.clonable]))}))};import{z as sn}from"zod";var qe=y.extend({type:sn.literal("Divider")}),Zt=qe.partial({id:!0}),re={params:Zt,clonable:Zt.extend(m.clonable.shape)},We={params:p(re.params),clonable:p(re.clonable)};import{z as f}from"zod";var Ke=Z.extend({type:f.literal("Select"),options:f.array(f.object({label:f.string(),value:f.string()})),value:f.string().optional(),placeholder:f.string().optional(),search:f.boolean().optional(),onChange:f.function().args(f.object({value:f.string()})).returns(f.void())}),qt=Ke.extend(q.params.shape),ie={params:qt,clonable:qt.extend(q.clonable.shape).extend({onChange:f.string()})},_e={params:p(ie.params),clonable:p(ie.clonable)};import{z as c}from"zod";var Qe=Z.extend({type:c.literal("TextInput"),value:c.string(),placeholder:c.string().optional(),onChange:c.function().args(c.object({value:c.string()})).returns(c.void()).optional(),onBlur:c.function().args(c.object({value:c.string()})).returns(c.void()).optional(),onFocus:c.function().args(c.object({value:c.string()})).returns(c.void()).optional()}),Wt=Qe.extend(q.params.shape),le={params:Wt,clonable:Wt.extend(q.clonable.shape).extend({onChange:c.string().optional(),onBlur:c.string().optional(),onFocus:c.string().optional()})},$e={params:p(le.params),clonable:p(le.clonable)};var Xe=se.discriminatedUnion("type",[oe,ae,Je,qe,Qe,Ke]),V={params:se.discriminatedUnion("type",[k.params,B.params,ne.params,re.params,le.params,ie.params]),clonable:se.discriminatedUnion("type",[k.clonable,B.clonable,ne.clonable,re.clonable,le.clonable,ie.clonable])},Ye={params:se.discriminatedUnion("type",[Ne.params,He.params,Ze.params,$e.params,_e.params,De.params,We.params]),clonable:se.discriminatedUnion("type",[Ne.clonable,He.clonable,Ze.clonable,$e.clonable,_e.clonable,De.clonable,We.clonable])};var mn=y.extend({type:b.literal("Panel"),title:b.string().optional(),body:b.array(Xe),footer:b.array(Xe).optional(),onClickClose:b.function().returns(b.void()).optional()}),Kt=mn.extend(m.params.shape).partial({type:!0}).omit({body:!0,footer:!0}).extend({body:b.array(V.params),footer:b.array(V.params).optional()}),Ee={params:Kt,clonable:Kt.extend(m.clonable.shape).extend({onClickClose:b.string().optional(),body:b.array(V.clonable),footer:b.array(V.clonable).optional()})};var ji=o.object({actionTrigger:te.create,placement:R.optional()}),_t=o.object({actionTrigger:te.clonable,placement:R.optional()}),Vi=te.create.partial().required({id:!0}),Qt=te.clonable.partial().required({id:!0}),Ai=o.object({panel:Ee.params,placement:R.optional()}),$t=o.object({panel:Ee.clonable,placement:R.optional()}),Xt=Ee.clonable.partial().required({id:!0}),wi=o.object({panelId:o.string(),elements:o.array(o.object({element:o.union([V.params,F.params]),container:o.union([o.literal("body"),o.literal("footer"),o.object({id:o.string()})]).optional(),placement:R.optional()}))}),Yt=o.object({panelId:o.string(),elements:o.array(o.object({element:o.union([V.clonable,F.clonable]),container:o.union([o.literal("body"),o.literal("footer"),o.object({id:o.string()})]).optional(),placement:R.optional()}))}),Ri=o.object({panelId:o.string(),elements:o.array(o.object({element:Ye.params}))}),eo=o.object({panelId:o.string(),elements:o.array(o.object({element:Ye.clonable}))}),to=o.object({panelId:o.string(),elements:o.array(o.string())}),oo=o.object({showLegend:o.boolean().optional(),cooperativeGestures:o.boolean().optional(),fullScreenButton:o.boolean().optional(),geolocation:o.boolean().optional(),zoomControls:o.boolean().optional(),scaleBar:o.boolean().optional()}),ao=o.object({featureSelectPanel:o.boolean().optional(),featureHoverPanel:o.boolean().optional(),elementSelectPanel:o.boolean().optional(),linkClickOpen:o.boolean().optional(),imageLightboxOpen:o.boolean().optional()});var pn=e("createActionTrigger",_t),cn=e("updateActionTrigger",Qt),dn=e("deleteActionTrigger",me.string()),yn=e("createPanel",$t),gn=e("updatePanel",Xt),un=e("deletePanel",me.string()),hn=e("createPanelElements",Yt),fn=e("updatePanelElements",eo),Sn=e("deletePanelElements",to),xn=e("updateUiControls",oo),bn=e("setOnMapInteractionsUi",ao),En=e("showLayerDataTable",me.object({layerId:me.string(),sorting:ue.optional()}).optional()),In=e("hideLayerDataTable",me.undefined()),no={methods:[pn,cn,dn,yn,gn,un,hn,fn,Sn,xn,bn,En,In],listeners:null};import{z as so}from"zod";import{z as Ce}from"zod";var Ie=Ce.object({center:ye,zoom:at}),ro=Ce.object({center:Ie.shape.center.optional(),zoom:Ie.shape.zoom.optional()}),io=Ce.object({minZoom:Ie.shape.zoom.nullish(),maxZoom:Ie.shape.zoom.nullish(),bounds:U.nullish()}).nullable(),lo=Ce.object({bounds:U});var Cn=e("getViewport",so.undefined()),Ln=e("setViewport",ro),Mn=e("getViewportConstraints",so.undefined()),Un=e("setViewportConstraints",io),Pn=e("fitViewportToBounds",lo),Tn=g("onViewportMove"),Gn=g("onViewportMoveEnd"),zn=g("onMapIdle"),mo={methods:[Ln,Cn,Mn,Un,Pn],listeners:[Tn,Gn,zn]};var et=[no,mo,zt,mt,Bt,pt,At,Ft];function dl(i,N,tt){let Le=new Map;async function ot(E){if(!On.safeParse(E.data).success){tt?.onUnknownMessage?.(E.data);return}let pe=yo.safeParse(E.data);if(!pe.success){tt?.onInvalidMessage?.(E.data,pe.error),E.ports[0]?.postMessage(po(pe.error.message));return}let{data:h}=pe;if(h.type==="felt.ready")E.ports[0]?.postMessage(!0);else if(h.type==="felt.addListener"){if(h.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let W="options"in h.event?{options:"options"in h.event?h.event.options:void 0,handler:Ue=>{E.ports[0]?.postMessage(Ue)}}:{handler:Ue=>{E.ports[0]?.postMessage(Ue)}},Me=N.listeners[h.event.eventName](W);Le.set(h.event.id,Me)}else if(h.type==="felt.removeListener")Le.get(h.id)?.(),Le.delete(h.id);else try{let W=N.methods[h.type],Me=await W(h.params);E.ports[0]?.postMessage(Me)}catch(W){E.ports[0]?.postMessage(po(W))}}return i.addEventListener("message",ot),()=>{i.removeEventListener("message",ot)}}var co={methods:et.map(i=>i.methods??[]).flat(),listeners:et.map(i=>i.listeners??[]).flat()},Fn=d.discriminatedUnion("eventName",[d.strictObject({eventName:d.literal("")}),d.strictObject({eventName:d.literal("onGenericEvent"),id:d.string(),options:d.object({id:d.string()})}),...co.listeners]),kn=d.strictObject({type:d.literal("felt.addListener"),event:Fn}),Bn=d.strictObject({type:d.literal("felt.removeListener"),id:d.string()}),vn=d.strictObject({type:d.literal("felt.ready")}),yo=d.discriminatedUnion("type",[vn,kn,Bn,...co.methods]),On=d.object({type:d.enum(yo.options.map(i=>i.shape.type.value))});function po(i){return{__error__:jn(i)}}function jn(i){return i instanceof Error?i.message:typeof i=="object"&&i!==null&&"message"in i?String(i.message):typeof i=="string"?i:"Unknown error"}export{dl as createMessageHandler};
|
|
1
|
+
import{z as d}from"zod";import{z as L}from"zod";import{z as O}from"zod";function e(i,H){return O.strictObject({type:O.literal(i),params:H})}function E(i,H){return O.strictObject({eventName:O.literal(i),id:O.string(),options:H})}function y(i){return O.strictObject({eventName:O.literal(i),id:O.string()})}import{z as l}from"zod";var de=l.number(),ge=l.number(),ye=l.object({latitude:ge,longitude:de}),j=l.tuple([de,ge]),_=l.object({type:l.literal("Polygon"),coordinates:l.array(l.array(j).min(4).refine(i=>i[0][0]===i[i.length-1][0]&&i[0][1]===i[i.length-1][1],"The last point of each ring must be identical to the first"))}),ue=l.object({type:l.literal("MultiPolygon"),coordinates:l.array(_.shape.coordinates)}),uo=l.object({type:l.literal("LineString"),coordinates:l.array(j).min(2)}),Q=l.object({type:l.literal("MultiLineString"),coordinates:l.array(uo.shape.coordinates)}),at=l.number().min(1).max(23),U=l.tuple([de,ge,de,ge]),A=l.object({show:l.array(l.string()).optional(),hide:l.array(l.string()).optional()}),ho=l.enum(["asc","desc"]),he=l.object({attribute:l.string(),direction:ho});import{z as t}from"zod";var C=t.object({id:t.string(),groupId:t.string().nullable(),color:t.string(),name:t.string().nullable(),description:t.string().nullable(),attributes:t.record(t.string(),t.unknown()),interaction:t.enum(["default","locked"]).optional()}),xe=t.object({imageUrl:t.string().nullable()}),ze=t.object({strokeOpacity:t.number(),strokeWidth:t.number(),strokeStyle:t.enum(["solid","dashed","dotted"])}),fo=t.enum(["meter","kilometer","foot","mile"]),fe=C.extend(xe.shape).extend({type:t.literal("Place"),coordinates:j,symbol:t.string(),frame:t.enum(["frame-circle","frame-square"]).nullable(),hideLabel:t.boolean()}),$=C.extend(xe.shape).extend(ze.shape).extend({type:t.literal("Path"),coordinates:Q.shape.coordinates,distanceMarker:t.boolean(),routingMode:t.enum(["driving","cycling","walking","flying"]).nullable(),endCaps:t.boolean()}),X=C.extend(xe.shape).extend(ze.shape).extend({type:t.literal("Polygon"),coordinates:_.shape.coordinates,fillOpacity:t.number().min(0).max(1),areaMarker:t.boolean()}),Se=C.extend(xe.shape).extend(ze.shape).extend({type:t.literal("Circle"),center:j,radius:t.number(),radiusMarker:t.boolean(),radiusDisplayAngle:t.number(),radiusDisplayUnit:fo.nullable(),fillOpacity:t.number().min(0).max(1)}),Y=C.extend({type:t.literal("Marker"),coordinates:Q.shape.coordinates,opacity:t.number().min(0).max(1),size:t.number().min(0).max(100),zoom:t.number().min(0).max(23)}),ee=C.extend({type:t.literal("Highlighter"),coordinates:ue.shape.coordinates,renderHoles:t.boolean(),opacity:t.number().min(0).max(1)}),rt=t.object({position:j,rotation:t.number(),scale:t.number(),zoom:t.number().min(0).max(23),text:t.string(),align:t.enum(["left","center","right"]),style:t.enum(["italic","light","regular","caps"]),name:t.string()}),Te=C.extend(rt.shape).extend({type:t.literal("Text")}),Ge=C.extend(rt.shape).extend({type:t.literal("Note"),widthScale:t.number().min(0)}),te=C.extend({type:t.literal("Image"),coordinates:Q.shape.coordinates,imageUrl:t.string(),opacity:t.number().min(0).max(1)}).omit({color:!0}),So=C.extend({type:t.literal("Link"),coordinates:Q.shape.coordinates,url:t.string()}),J={type:!0,coordinates:!0},P={id:!0},Fe=fe.partial().extend(fe.pick(J).shape).omit(P),be=$.partial().extend($.pick(J).shape).omit(P),ke=X.partial().extend(X.pick(J).shape).omit(P),Be=Se.partial().extend(Se.pick({type:!0,center:!0,radius:!0}).shape).omit(P),ve=Y.partial().extend(Y.pick(J).shape).omit(P),Oe=ee.partial().extend(ee.pick(J).shape).omit(P),je=Te.partial().omit({...P,name:!0,type:!0}).extend({type:t.literal("Text"),text:t.string()}),we=Ge.partial().omit({...P,name:!0,type:!0}).extend({type:t.literal("Note"),text:t.string()}),xo=te.partial().extend(te.pick({...J,imageUrl:!0}).shape).omit(P),it=t.discriminatedUnion("type",[Fe,be,ke,Be,ve,Oe,xo,je,we]);var Za=$.omit({coordinates:!0}),qa=X.omit({coordinates:!0});var Wa=Y.omit({coordinates:!0}),Ka=ee.omit({coordinates:!0});var _a=te.omit({coordinates:!0}),Qa=So.omit({coordinates:!0}),T={type:!0,id:!0},bo=fe.partial().extend(fe.pick(T).shape),Io=$.partial().extend($.pick(T).shape),Eo=X.partial().extend(X.pick(T).shape),Co=Se.partial().extend(Se.pick(T).shape),Lo=Y.partial().extend(Y.pick(T).shape),Mo=ee.partial().extend(ee.pick(T).shape),Uo=Te.partial().extend(Te.pick(T).shape).omit({name:!0}),Po=Ge.partial().extend(Ge.pick(T).shape).omit({name:!0}),To=te.partial().extend(te.pick(T).shape),st=t.discriminatedUnion("type",[bo,Io,Eo,Co,Lo,Mo,Uo,Po,To]),lt=t.object({ids:t.array(t.string()).optional()}),mt=t.object({ids:t.array(t.string()).optional()});var Go=e("getElement",L.string()),zo=e("getElementGeometry",L.string()),Fo=e("getElements",lt.optional()),ko=e("getElementGroup",L.string()),Bo=e("getElementGroups",mt.optional()),vo=e("setElementGroupVisibility",A),Oo=E("onElementChange",L.object({id:L.string()})),jo=y("onElementCreate"),wo=y("onElementCreateEnd"),Vo=E("onElementDelete",L.object({id:L.string()})),Ao=E("onElementGroupChange",L.object({id:L.string()})),Ro=e("createElement",it),Do=e("updateElement",st),No=e("deleteElement",L.string()),pt={methods:[Go,zo,Fo,ko,Bo,vo,Ro,Do,No],listeners:[Oo,jo,wo,Vo,Ao]};var Ho=y("onPointerClick"),Jo=y("onPointerMove"),ct={methods:null,listeners:[Ho,Jo]};import{z as r}from"zod";import{z as s}from"zod";var Zo=s.enum(["in","ni"]),qo=s.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),sr=s.enum(["and","or"]),dt=s.union([s.number(),s.string(),s.boolean(),s.null()]),gt=s.string().or(s.null()),Wo=s.tuple([gt,Zo,s.array(dt).or(s.null())]),Ko=s.tuple([gt,qo,dt]),Ve=s.union([Wo,Ko]),Ae=s.tuple([s.lazy(()=>s.union([Ae,Ve,s.null(),s.boolean()])),s.enum(["and","or"]),s.lazy(()=>s.union([Ae,Ve,s.null(),s.boolean()]))]),G=s.union([Ae,Ve,s.null(),s.boolean()]),z=s.union([U,_,ue,s.array(j)]);import{z as n}from"zod";var yt=n.enum(["avg","max","min","sum","median"]),ut=n.enum(["avg","max","min","sum","count"]),_o=n.object({method:yt,attribute:n.string()}),Qo=n.object({methods:n.array(n.union([yt,n.literal("count")])),attribute:n.string().optional()}),ht=n.object({boundary:z.optional(),filters:G.optional(),aggregation:_o.optional()}),ft=n.object({layerId:n.string(),attribute:n.string(),limit:n.number().optional(),boundary:z.optional(),filters:G.optional(),values:ht.optional()}),cr=n.object({key:n.union([n.number(),n.string(),n.boolean()]),value:n.number().nullable()}),$o=n.object({type:n.literal("equal-intervals"),count:n.number()}),Xo=n.object({type:n.literal("time-interval"),interval:n.enum(["hour","day","week","month","year"])}),St=n.object({layerId:n.string(),attribute:n.string(),steps:n.union([$o,Xo,n.array(n.number())]),boundary:z.optional(),filters:G.optional(),values:ht.optional()}),dr=n.object({min:n.number(),max:n.number(),value:n.number()}),xt=n.object({layerId:n.string(),boundary:z.optional(),filters:G.optional(),aggregation:Qo}),bt=n.enum(["h3"]),Yo=n.object({type:bt,resolution:n.number(),method:ut.extract(["count"])}),en=n.object({type:bt,resolution:n.number(),method:ut.exclude(["count"]),attribute:n.string()}),tn=n.union([Yo,en]),It=n.object({layerId:n.string(),boundary:z.optional(),filters:G.optional(),gridConfig:tn});import{z as a}from"zod";var hr=a.enum(["processing","completed","failed","incomplete"]),Et=a.object({type:a.literal("geoJsonUrl"),url:a.string().url(),refreshInterval:a.number().min(250).max(5*60*1e3).nullable().optional()}),Ct=a.object({type:a.literal("geoJsonData"),data:a.object({}).passthrough().or(a.instanceof(ArrayBuffer))}),Lt=a.object({type:a.literal("geoJsonFile"),file:a.instanceof(File)}),Mt=a.object({id:a.string(),style:a.object({}).passthrough().optional(),shownInLegend:a.boolean().optional(),name:a.string().optional(),caption:a.string().optional(),description:a.string().optional(),bounds:U.optional(),source:a.union([Et,Ct,Lt]).optional()}),Ut=a.object({ids:a.array(a.string()).optional()}),Pt=a.object({ids:a.array(a.string()).optional()}),Z=a.object({id:a.string(),layerId:a.string()}),Tt=a.object({ids:Z.array().optional(),layerIds:a.string().array().optional()}),Gt=a.object({layerIds:a.array(a.string()).optional(),areaQuery:a.union([a.object({coordinates:ye}),a.object({boundary:U})]).optional()}),on=a.object({Point:a.object({}).passthrough().optional(),Line:a.object({}).passthrough().optional(),Polygon:a.object({}).passthrough().optional()}),zt=a.object({source:a.union([Et,Ct,Lt]),name:a.string(),bounds:U.optional(),caption:a.string().optional(),description:a.string().optional(),geometryStyles:on.optional()});var nn=e("getLayer",r.string()),an=e("getLayers",Ut.optional()),rn=e("setLayerVisibility",A),sn=E("onLayerChange",r.object({id:r.string()})),ln=e("setLayerStyle",r.object({id:r.string(),style:r.object({}).passthrough()})),mn=e("setLayerLegendVisibility",A),pn=e("createLayersFromGeoJson",zt),cn=e("updateLayer",Mt),dn=e("deleteLayer",r.string()),gn=e("getLayerGroup",r.string()),yn=e("getLayerGroups",Pt.optional()),un=e("setLayerGroupVisibility",A),hn=e("setLayerGroupLegendVisibility",A),fn=E("onLayerGroupChange",r.object({id:r.string()})),Sn=e("getLegendItem",Z),xn=e("getLegendItems",Tt.optional()),bn=E("onLegendItemChange",Z),In=e("setLegendItemVisibility",r.object({show:Z.array().optional(),hide:Z.array().optional()})),En=e("getLayerFilters",r.string()),Cn=e("setLayerFilters",r.object({layerId:r.string(),filters:G,note:r.string().optional()})),Ln=E("onLayerFiltersChange",r.object({layerId:r.string()})),Mn=e("getLayerBoundaries",r.string()),Un=e("setLayerBoundary",r.object({layerIds:r.array(r.string()),boundary:z.nullable()})),Pn=E("onLayerBoundariesChange",r.object({layerId:r.string()})),Tn=e("getRenderedFeatures",Gt.optional()),Gn=e("getFeature",r.object({id:r.string().or(r.number()),layerId:r.string()})),zn=e("getFeatures",r.object({layerId:r.string(),filters:G.optional(),sorting:he.optional(),boundary:z.optional(),search:r.string().optional(),pagination:r.string().optional().nullish()})),Fn=e("getGeoJsonFeature",r.object({id:r.string().or(r.number()),layerId:r.string()})),kn=e("getCategoryData",ft),Bn=e("getHistogramData",St),vn=e("getAggregates",xt),On=e("getPrecomputedAggregates",It),jn=e("getLayerSchema",r.string()),Ft={methods:[nn,an,rn,ln,mn,pn,dn,cn,gn,yn,un,hn,Sn,xn,In,En,Cn,Mn,Un,Tn,Gn,zn,Fn,kn,Bn,vn,On,jn],listeners:[sn,fn,bn,Ln,Pn]};import{z as wn}from"zod";var Vn=e("getMapDetails",wn.undefined()),kt={methods:[Vn],listeners:[]};import{z as Ie}from"zod";import{z as w}from"zod";var Bt=w.object({id:w.string().or(w.number()),layerId:w.string(),showPopup:w.boolean().optional(),fitViewport:w.boolean().or(w.object({maxZoom:w.number()})).optional()});var An=e("getSelection",Ie.undefined()),Rn=y("onSelectionChange"),Dn=e("selectFeature",Bt),Nn=e("clearSelection",Ie.object({features:Ie.boolean().optional(),elements:Ie.boolean().optional()}).optional()),vt={methods:[An,Dn,Nn],listeners:[Rn]};import{z as Yn}from"zod";import{z as u}from"zod";var Ot=["circle","highlighter","line","marker","note","pin","polygon","route","text"],Hn=[...Ot,"link"],jt=u.enum(Hn),wt=u.enum(Ot),F={showInspector:u.boolean().optional()},Jn=Fe.pick({color:!0,symbol:!0,frame:!0}).extend({afterCreation:u.enum(["enter name","add another","select"])}).required(),Zn=be.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),qn=be.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),Wn=ke.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),Kn=Be.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),_n=ve.pick({color:!0,opacity:!0,size:!0}).required(),Qn=Oe.pick({color:!0,opacity:!0,renderHoles:!0}).extend({size:u.number().min(0).max(200)}).required(),$n=je.pick({color:!0,align:!0,style:!0}).required(),Xn=we.pick({color:!0,align:!0,style:!0}).required(),Vt=u.discriminatedUnion("tool",[Jn.partial().extend({tool:u.literal("pin"),...F}),Zn.partial().extend({tool:u.literal("line"),...F}),qn.partial().extend({tool:u.literal("route"),...F}),Wn.partial().extend({tool:u.literal("polygon"),...F}),Kn.partial().extend({tool:u.literal("circle"),...F}),_n.partial().extend({tool:u.literal("marker"),...F}),Qn.partial().extend({tool:u.literal("highlighter"),...F}),$n.partial().extend({tool:u.literal("text"),...F}),Xn.partial().extend({tool:u.literal("note"),...F})]);var ea=e("setTool",jt.nullable()),ta=e("getTool",Yn.undefined()),oa=y("onToolChange"),na=e("setToolSettings",Vt),aa=e("getToolSettings",wt),ra=y("onToolSettingsChange"),At={methods:[ea,ta,na,aa],listeners:[oa,ra]};import{z as pe}from"zod";import{z as o}from"zod";import{z as R}from"zod";var D=R.union([R.object({after:R.string()}),R.object({before:R.string()}),R.object({at:R.enum(["start","end"])})]);import{z as x}from"zod";import{z as S}from"zod";var ia=S.object({onCreate:S.function().args().returns(S.void()).optional(),onDestroy:S.function().args().returns(S.void()).optional()}),sa=S.object({onCreate:S.string().optional(),onDestroy:S.string().optional()}),g=ia.extend({id:S.string()}),Rt=g.partial({id:!0}),m={params:Rt,clonable:Rt.extend(sa.shape)},q=g.extend({label:S.string().optional()}),W={params:q.extend(m.params.shape),clonable:q.extend(m.clonable.shape)};function p(i){return i.partial().extend({id:S.string(),type:i.shape.type})}var Re=x.object({type:x.literal("ActionTrigger"),label:x.string(),disabled:x.boolean().optional()}),oe={read:g.extend(Re.shape).extend({onTrigger:x.function().returns(x.void())}),create:m.params.extend(Re.shape).extend({type:x.undefined()}).extend({onTrigger:x.function().returns(x.void())}),clonable:m.clonable.extend(Re.shape).extend({type:x.undefined()}).extend({onTrigger:x.string()})};import{z as la}from"zod";var De=g.extend({type:la.literal("FlexibleSpace")}),Dt=De.partial({id:!0}),k={params:Dt,clonable:Dt.extend(m.clonable.shape)},Ne={params:p(k.params),clonable:p(k.clonable)};import{z as b}from"zod";import{z as me}from"zod";import{z as N}from"zod";var ne=g.extend({type:N.literal("Button"),label:N.string(),variant:N.enum(["primary","outlined","transparent","transparentThin"]).optional(),disabled:N.boolean().optional(),onClick:N.function().returns(N.void())}),Nt=ne.extend(m.params.shape),B={params:Nt,clonable:Nt.extend(m.clonable.shape).extend({onClick:N.string()})},He={params:p(B.params),clonable:p(B.clonable)};import{z as M}from"zod";import{z as Ht}from"zod";var ae=g.extend({type:Ht.literal("Text"),content:Ht.string()}),Jt=ae.extend(m.params.shape),v={params:Jt,clonable:Jt.extend(m.clonable.shape)},Je={params:p(v.params),clonable:p(v.clonable)};var Ze=g.extend({type:M.literal("ButtonGroup"),align:M.enum(["start","end"]).optional(),items:M.array(M.union([ne,ae,De]))}),Zt=Ze.extend(m.params.shape).omit({items:!0}).extend({items:M.array(M.union([B.params,v.params,k.params]))}),re={params:Zt,clonable:Zt.extend(m.clonable.shape).extend({items:M.array(M.union([B.clonable,v.clonable,k.clonable]))})},qe={params:p(re.params),clonable:p(re.clonable.extend({items:M.array(M.union([B.clonable,v.clonable,k.clonable]))}))};import{z as ma}from"zod";var We=g.extend({type:ma.literal("Divider")}),qt=We.partial({id:!0}),ie={params:qt,clonable:qt.extend(m.clonable.shape)},Ke={params:p(ie.params),clonable:p(ie.clonable)};import{z as f}from"zod";var _e=q.extend({type:f.literal("Select"),options:f.array(f.object({label:f.string(),value:f.string()})),value:f.string().optional(),placeholder:f.string().optional(),search:f.boolean().optional(),onChange:f.function().args(f.object({value:f.string()})).returns(f.void())}),Wt=_e.extend(W.params.shape),se={params:Wt,clonable:Wt.extend(W.clonable.shape).extend({onChange:f.string()})},Qe={params:p(se.params),clonable:p(se.clonable)};import{z as c}from"zod";var $e=q.extend({type:c.literal("TextInput"),value:c.string(),placeholder:c.string().optional(),onChange:c.function().args(c.object({value:c.string()})).returns(c.void()).optional(),onBlur:c.function().args(c.object({value:c.string()})).returns(c.void()).optional(),onFocus:c.function().args(c.object({value:c.string()})).returns(c.void()).optional()}),Kt=$e.extend(W.params.shape),le={params:Kt,clonable:Kt.extend(W.clonable.shape).extend({onChange:c.string().optional(),onBlur:c.string().optional(),onFocus:c.string().optional()})},Xe={params:p(le.params),clonable:p(le.clonable)};var Ye=me.discriminatedUnion("type",[ne,ae,Ze,We,$e,_e]),V={params:me.discriminatedUnion("type",[B.params,v.params,re.params,ie.params,le.params,se.params]),clonable:me.discriminatedUnion("type",[B.clonable,v.clonable,re.clonable,ie.clonable,le.clonable,se.clonable])},et={params:me.discriminatedUnion("type",[He.params,Je.params,qe.params,Xe.params,Qe.params,Ne.params,Ke.params]),clonable:me.discriminatedUnion("type",[He.clonable,Je.clonable,qe.clonable,Xe.clonable,Qe.clonable,Ne.clonable,Ke.clonable])};var pa=g.extend({type:b.literal("Panel"),title:b.string().optional(),body:b.array(Ye),footer:b.array(Ye).optional(),onClickClose:b.function().returns(b.void()).optional()}),_t=pa.extend(m.params.shape).partial({type:!0}).omit({body:!0,footer:!0}).extend({body:b.array(V.params),footer:b.array(V.params).optional()}),Ee={params:_t,clonable:_t.extend(m.clonable.shape).extend({onClickClose:b.string().optional(),body:b.array(V.clonable),footer:b.array(V.clonable).optional()})};var wi=o.object({actionTrigger:oe.create,placement:D.optional()}),Qt=o.object({actionTrigger:oe.clonable,placement:D.optional()}),Vi=oe.create.partial().required({id:!0}),$t=oe.clonable.partial().required({id:!0}),Ai=o.object({panel:Ee.params,placement:D.optional()}),Xt=o.object({panel:Ee.clonable,placement:D.optional()}),Yt=Ee.clonable.partial().required({id:!0}),Ri=o.object({panelId:o.string(),elements:o.array(o.object({element:o.union([V.params,k.params]),container:o.union([o.literal("body"),o.literal("footer"),o.object({id:o.string()})]).optional(),placement:D.optional()}))}),eo=o.object({panelId:o.string(),elements:o.array(o.object({element:o.union([V.clonable,k.clonable]),container:o.union([o.literal("body"),o.literal("footer"),o.object({id:o.string()})]).optional(),placement:D.optional()}))}),Di=o.object({panelId:o.string(),elements:o.array(o.object({element:et.params}))}),to=o.object({panelId:o.string(),elements:o.array(o.object({element:et.clonable}))}),oo=o.object({panelId:o.string(),elements:o.array(o.string())}),no=o.object({showLegend:o.boolean().optional(),cooperativeGestures:o.boolean().optional(),fullScreenButton:o.boolean().optional(),geolocation:o.boolean().optional(),zoomControls:o.boolean().optional(),scaleBar:o.boolean().optional()}),ao=o.object({featureSelectPanel:o.boolean().optional(),featureHoverPanel:o.boolean().optional(),elementSelectPanel:o.boolean().optional(),linkClickOpen:o.boolean().optional(),imageLightboxOpen:o.boolean().optional()});var ca=e("createActionTrigger",Qt),da=e("updateActionTrigger",$t),ga=e("deleteActionTrigger",pe.string()),ya=e("createPanel",Xt),ua=e("updatePanel",Yt),ha=e("deletePanel",pe.string()),fa=e("createPanelElements",eo),Sa=e("updatePanelElements",to),xa=e("deletePanelElements",oo),ba=e("updateUiControls",no),Ia=e("setOnMapInteractionsUi",ao),Ea=e("showLayerDataTable",pe.object({layerId:pe.string(),sorting:he.optional()}).optional()),Ca=e("hideLayerDataTable",pe.undefined()),ro={methods:[ca,da,ga,ya,ua,ha,fa,Sa,xa,ba,Ia,Ea,Ca],listeners:null};import{z as mo}from"zod";import{z as Le}from"zod";var Ce=Le.object({center:ye,zoom:at}),io=Le.object({center:Ce.shape.center.optional(),zoom:Ce.shape.zoom.optional()}),so=Le.object({minZoom:Ce.shape.zoom.nullish(),maxZoom:Ce.shape.zoom.nullish(),bounds:U.nullish()}).nullable(),lo=Le.object({bounds:U});var La=e("getViewport",mo.undefined()),Ma=e("setViewport",io),Ua=e("getViewportConstraints",mo.undefined()),Pa=e("setViewportConstraints",so),Ta=e("fitViewportToBounds",lo),Ga=y("onViewportMove"),za=y("onViewportMoveEnd"),Fa=y("onMapIdle"),po={methods:[Ma,La,Ua,Pa,Ta],listeners:[Ga,za,Fa]};var tt=[ro,po,Ft,pt,vt,ct,At,kt];function gs(i,H,ot){let Me=new Map;async function nt(I){if(!ja.safeParse(I.data).success){ot?.onUnknownMessage?.(I.data);return}let ce=yo.safeParse(I.data);if(!ce.success){ot?.onInvalidMessage?.(I.data,ce.error),I.ports[0]?.postMessage(co(ce.error.message));return}let{data:h}=ce;if(h.type==="felt.ready")I.ports[0]?.postMessage(!0);else if(h.type==="felt.addListener"){if(h.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let K="options"in h.event?{options:"options"in h.event?h.event.options:void 0,handler:Pe=>{I.ports[0]?.postMessage(Pe)}}:{handler:Pe=>{I.ports[0]?.postMessage(Pe)}},Ue=H.listeners[h.event.eventName](K);Me.set(h.event.id,Ue)}else if(h.type==="felt.removeListener")Me.get(h.id)?.(),Me.delete(h.id);else try{let K=H.methods[h.type],Ue=await K(h.params);I.ports[0]?.postMessage(Ue)}catch(K){I.ports[0]?.postMessage(co(K))}}return i.addEventListener("message",nt),()=>{i.removeEventListener("message",nt)}}var go={methods:tt.map(i=>i.methods??[]).flat(),listeners:tt.map(i=>i.listeners??[]).flat()},ka=d.discriminatedUnion("eventName",[d.strictObject({eventName:d.literal("")}),d.strictObject({eventName:d.literal("onGenericEvent"),id:d.string(),options:d.object({id:d.string()})}),...go.listeners]),Ba=d.strictObject({type:d.literal("felt.addListener"),event:ka}),va=d.strictObject({type:d.literal("felt.removeListener"),id:d.string()}),Oa=d.strictObject({type:d.literal("felt.ready")}),yo=d.discriminatedUnion("type",[Oa,Ba,va,...go.methods]),ja=d.object({type:d.enum(yo.options.map(i=>i.shape.type.value))});function co(i){return{__error__:wa(i)}}function wa(i){return i instanceof Error?i.message:typeof i=="object"&&i!==null&&"message"in i?String(i.message):typeof i=="string"?i:"Unknown error"}export{gs as createMessageHandler};
|