@feltmaps/js-sdk 1.5.0-next.16 → 1.5.0-next.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-QXPO53SH.js +1 -0
- package/dist/client.cjs +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1 -1
- package/dist/handler.cjs +1 -1
- package/dist/handler.d.cts +20 -20
- package/dist/handler.d.ts +20 -20
- package/dist/handler.js +1 -1
- package/dist/tsdoc-metadata.json +11 -0
- package/dist/{types-C0CJJN-7.d.cts → types-DrMm8Los.d.cts} +32 -25
- package/dist/{types-C0CJJN-7.d.ts → types-DrMm8Los.d.ts} +32 -25
- package/handler.d.ts +20 -20
- package/handler.js +1 -1
- package/package.json +1 -1
- package/{types-C0CJJN-7.d.ts → types-DrMm8Los.d.ts} +32 -25
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(n){return n.data&&typeof n.data=="object"&&"__error__"in n.data}function t(n){return{__error__:e(n)}}function e(n){return n instanceof Error?n.message:typeof n=="object"&&n!==null&&"message"in n?String(n.message):typeof n=="string"?n:"Unknown error"}export{r as a,t as b};
|
package/dist/client.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
"use strict";var c=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var f=(e,r)=>{for(var n in r)c(e,n,{get:r[n],enumerable:!0})},I=(e,r,n,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of V(r))!b.call(e,a)&&a!==n&&c(e,a,{get:()=>r[a],enumerable:!(s=G(r,a))||s.enumerable});return e};var x=e=>I(c({},"__esModule",{value:!0}),e);var K={};f(K,{Felt:()=>S});module.exports=x(K);function u(e){return e.data&&typeof e.data=="object"&&"__error__"in e.data}function o(e,r){return n=>{let s=new MessageChannel,a=n.handler,i="options"in n?n.options:void 0,m=crypto.randomUUID();return e.postMessage({type:"felt.addListener",event:i?{eventName:r,id:m,options:i}:{eventName:r,id:m}},"*",[s.port2]),s.port1.onmessage=g=>{u(g)||a(g.data)},()=>{s.port1.onmessage=null,s.port1.close(),s.port2.close(),e.postMessage({type:"felt.removeListener",id:m},"*")}}}function t(e,r,n){return async s=>{let a=new MessageChannel,i=s&&n?await n(s):s;return e.postMessage({type:r,params:i},"*",[a.port2]),new Promise((m,g)=>{a.port1.onmessage=y=>{u(y)?g(new Error(y.data.__error__)):m(y.data),a.port1.close(),a.port2.close()}})}}var C=e=>({getElement:t(e,"getElement"),getElementGeometry:t(e,"getElementGeometry"),getElements:t(e,"getElements"),setElementGroupVisibility:t(e,"setElementGroupVisibility"),getElementGroup:t(e,"getElementGroup"),getElementGroups:t(e,"getElementGroups"),onElementChange:o(e,"onElementChange"),onElementCreate:o(e,"onElementCreate"),onElementCreateEnd:o(e,"onElementCreateEnd"),onElementDelete:o(e,"onElementDelete"),onElementGroupChange:o(e,"onElementGroupChange"),createElement:t(e,"createElement"),updateElement:t(e,"updateElement"),deleteElement:t(e,"deleteElement")});var L=e=>({onPointerClick:o(e,"onPointerClick"),onPointerMove:o(e,"onPointerMove")});var h=e=>({getLayer:t(e,"getLayer"),getLayers:t(e,"getLayers"),setLayerVisibility:t(e,"setLayerVisibility"),setLayerStyle:t(e,"setLayerStyle"),setLayerLegendVisibility:t(e,"setLayerLegendVisibility"),onLayerChange:o(e,"onLayerChange"),createLayer:t(e,"createLayer",async r=>"url"in r.source||"arrayBuffer"in r.source?r:{source:{...r.source,arrayBuffer:await r.source.file.arrayBuffer()}}),deleteLayer:t(e,"deleteLayer"),getLayerGroup:t(e,"getLayerGroup"),getLayerGroups:t(e,"getLayerGroups"),setLayerGroupVisibility:t(e,"setLayerGroupVisibility"),setLayerGroupLegendVisibility:t(e,"setLayerGroupLegendVisibility"),onLayerGroupChange:o(e,"onLayerGroupChange"),getLegendItem:t(e,"getLegendItem"),getLegendItems:t(e,"getLegendItems"),setLegendItemVisibility:t(e,"setLegendItemVisibility"),onLegendItemChange:o(e,"onLegendItemChange"),getLayerFilters:t(e,"getLayerFilters"),setLayerFilters:t(e,"setLayerFilters"),onLayerFiltersChange:o(e,"onLayerFiltersChange"),getRenderedFeatures:t(e,"getRenderedFeatures"),getFeature:t(e,"getFeature"),getGeoJsonFeature:t(e,"getGeoJsonFeature"),getCategoryData:t(e,"getCategoryData"),getHistogramData:t(e,"getHistogramData"),getAggregates:t(e,"getAggregates"),getLayerSchema:t(e,"getLayerSchema")});var T=e=>({getMapDetails:t(e,"getMapDetails")});var E=e=>({onSelectionChange:o(e,"onSelectionChange"),getSelection:t(e,"getSelection"),selectFeature:t(e,"selectFeature"),clearSelection:t(e,"clearSelection")});var P=e=>({setTool:t(e,"setTool"),getTool:t(e,"getTool"),onToolChange:o(e,"onToolChange"),setToolSettings:t(e,"setToolSettings"),getToolSettings:t(e,"getToolSettings"),onToolSettingsChange:o(e,"onToolSettingsChange")});var v=e=>({updateUiControls:t(e,"updateUiControls"),setOnMapInteractionsUi:t(e,"setOnMapInteractionsUi"),showLayerDataTable:t(e,"showLayerDataTable"),hideLayerDataTable:t(e,"hideLayerDataTable")});var M=e=>({getViewport:t(e,"getViewport"),setViewport:t(e,"setViewport"),getViewportConstraints:t(e,"getViewportConstraints"),setViewportConstraints:t(e,"setViewportConstraints"),fitViewportToBounds:t(e,"fitViewportToBounds"),onViewportMove:o(e,"onViewportMove"),onViewportMoveEnd:o(e,"onViewportMoveEnd"),onMapIdle:o(e,"onMapIdle")});function F(e){return{iframe:null,...M(e),...v(e),...h(e),...C(e),...E(e),...L(e),...P(e),...T(e)}}var S={embed(e,r,n){let s={uiControls:{showLegend:!0,cooperativeGestures:!0,fullScreenButton:!0,geolocation:!1,zoomControls:!0,scaleBar:!0},initialViewport:void 0,origin:"https://felt.com"},a=n?.origin??s.origin,i=new URL(`${a}/embed/map/${r}`),m={showLegend:"legend",cooperativeGestures:"cooperativeGestures",fullScreenButton:"link",geolocation:"geolocation",zoomControls:"zoomControls",scaleBar:"scaleBar"},g={...s.uiControls,...n?.uiControls};for(let[p,d]of k(g))d!=null&&i.searchParams.set(m[p],d?"1":"0");if(n?.token&&i.searchParams.set("token",n.token),n?.initialViewport){let p=n.initialViewport;i.searchParams.set("loc",`${p.center.latitude},${p.center.longitude},${p.zoom}z`)}let y=e.tagName==="IFRAME",l=y?e:e.ownerDocument.createElement("iframe");return l.src=i.toString(),y||(l.style.width="100%",l.style.height="100%",l.style.border="none",l.style.margin="0",e.appendChild(l)),l.referrerPolicy="strict-origin-when-cross-origin",new Promise((p,d)=>{l.addEventListener("load",()=>{l.contentWindow==null?d(new Error("Failed to load Felt map")):p(l.contentWindow)},{once:!0})}).then(S.connect).then(p=>(Object.defineProperties(p,{iframe:{value:l,writable:!1,configurable:!1}}),p))},connect(e){let r=F(e);return new Promise((n,s)=>{let a=setTimeout(()=>{s(new Error("Failed to load Felt map")),clearInterval(m)},5e3),i=new MessageChannel,m=setInterval(()=>{e.postMessage({type:"felt.ready"},"*",[i.port2])},100);i.port1.onmessage=g=>{g.data===!0&&(clearInterval(m),clearTimeout(a),i.port1.close(),i.port2.close(),n(r))}})}},k=Object.entries;0&&(module.exports={Felt});
|
package/dist/client.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as Element, G as GeoJsonGeometry, a as GetElementsConstraint, b as ElementGroup, c as GetElementGroupsConstraint, S as SetVisibilityRequest, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, f as ElementCreate, g as ElementUpdate, L as Layer, h as GetLayersConstraint, i as LayerChangeCallbackParams, j as GeoJsonArrayBufferSource, k as GeoJsonFileSource, l as GeoJsonUrlSource, m as LayerGroup, n as GetLayerGroupsConstraint, o as LayerGroupChangeCallbackParams, p as LegendItemIdentifier, q as LegendItem, r as LegendItemsConstraint, s as LegendItemChangeCallbackParams, t as LayerFilters, F as Filters, u as GetRenderedFeaturesConstraint, v as LayerFeature, w as GeoJsonFeature, x as GetLayerCategoriesParams, y as GetLayerCategoriesGroup, z as GetLayerHistogramParams, A as GetLayerHistogramBin, B as AggregationMethod, C as GetLayerCalculationParams, D as LayerSchema, M as MapInteractionEvent, H as MapDetails, I as EntityNode, J as FeatureSelection, T as ToolType, K as InputToolSettings, N as ConfigurableToolType, O as ToolSettingsMap, P as ToolSettingsChangeEvent, Q as zInfer, R as SortConfig, V as ViewportState, U as SetViewportCenterZoomParams, W as ViewportConstraints, X as ViewportFitBoundsParams, Y as ViewportCenterZoom } from './types-
|
|
2
|
-
export { aC as AggregationConfig, Z as CircleElementCreate, _ as CircleElementRead, $ as CircleElementUpdate, aW as CircleToolSettings, aF as ElementGroupNode, aG as ElementNode, ap as EphemeralLayerSource, aH as FeatureNode, aK as FeltBoundary, aL as FeltZoom, az as FilterExpression, aA as FilterLogicGate, aB as FilterTernary, aM as GeoJsonProperties, a0 as HighlighterElementCreate, a1 as HighlighterElementRead, a2 as HighlighterElementUpdate, aX as HighlighterToolSettings, a3 as ImageElementCreate, a4 as ImageElementRead, a5 as ImageElementUpdate, aN as LatLng, aI as LayerGroupNode, aJ as LayerNode, aq as LayerProcessingStatus, as as LayerSchemaAttribute, at as LayerSchemaBooleanAttribute, au as LayerSchemaCommonAttribute, av as LayerSchemaDateAttribute, aw as LayerSchemaDateTimeAttribute, ax as LayerSchemaNumericAttribute, ay as LayerSchemaTextAttribute, aO as LineStringGeometry, aY as LineToolSettings, a6 as LinkElementRead, aP as LngLatTuple, a7 as MarkerElementCreate, a8 as MarkerElementRead, a9 as MarkerElementUpdate, aZ as MarkerToolSettings, aD as MultiAggregationConfig, aQ as MultiLineStringGeometry, aR as MultiPointGeometry, aS as MultiPolygonGeometry, aa as NoteElementCreate, ab as NoteElementRead, ac as NoteElementUpdate, a_ as NoteToolSettings, ad as PathElementCreate, ae as PathElementRead, af as PathElementUpdate, a$ as PinToolSettings, ag as PlaceElementCreate, ah as PlaceElementRead, ai as PlaceElementUpdate, b0 as PlaceFrame, b1 as PlaceSymbol, aT as PointGeometry, aj as PolygonElementCreate, ak as PolygonElementRead, al as PolygonElementUpdate, aU as PolygonGeometry, b2 as PolygonToolSettings, ar as RasterValue, b3 as RouteToolSettings, aV as SortDirection, am as TextElementCreate, an as TextElementRead, ao as TextElementUpdate, b4 as TextToolSettings, aE as ValueConfiguration } from './types-
|
|
1
|
+
import { E as Element, G as GeoJsonGeometry, a as GetElementsConstraint, b as ElementGroup, c as GetElementGroupsConstraint, S as SetVisibilityRequest, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, f as ElementCreate, g as ElementUpdate, L as Layer, h as GetLayersConstraint, i as LayerChangeCallbackParams, j as GeoJsonArrayBufferSource, k as GeoJsonFileSource, l as GeoJsonUrlSource, m as LayerGroup, n as GetLayerGroupsConstraint, o as LayerGroupChangeCallbackParams, p as LegendItemIdentifier, q as LegendItem, r as LegendItemsConstraint, s as LegendItemChangeCallbackParams, t as LayerFilters, F as Filters, u as GetRenderedFeaturesConstraint, v as LayerFeature, w as GeoJsonFeature, x as GetLayerCategoriesParams, y as GetLayerCategoriesGroup, z as GetLayerHistogramParams, A as GetLayerHistogramBin, B as AggregationMethod, C as GetLayerCalculationParams, D as LayerSchema, M as MapInteractionEvent, H as MapDetails, I as EntityNode, J as FeatureSelection, T as ToolType, K as InputToolSettings, N as ConfigurableToolType, O as ToolSettingsMap, P as ToolSettingsChangeEvent, Q as zInfer, R as SortConfig, V as ViewportState, U as SetViewportCenterZoomParams, W as ViewportConstraints, X as ViewportFitBoundsParams, Y as ViewportCenterZoom } from './types-DrMm8Los.cjs';
|
|
2
|
+
export { aC as AggregationConfig, Z as CircleElementCreate, _ as CircleElementRead, $ as CircleElementUpdate, aW as CircleToolSettings, aF as ElementGroupNode, aG as ElementNode, ap as EphemeralLayerSource, aH as FeatureNode, aK as FeltBoundary, aL as FeltZoom, az as FilterExpression, aA as FilterLogicGate, aB as FilterTernary, aM as GeoJsonProperties, a0 as HighlighterElementCreate, a1 as HighlighterElementRead, a2 as HighlighterElementUpdate, aX as HighlighterToolSettings, a3 as ImageElementCreate, a4 as ImageElementRead, a5 as ImageElementUpdate, aN as LatLng, aI as LayerGroupNode, aJ as LayerNode, aq as LayerProcessingStatus, as as LayerSchemaAttribute, at as LayerSchemaBooleanAttribute, au as LayerSchemaCommonAttribute, av as LayerSchemaDateAttribute, aw as LayerSchemaDateTimeAttribute, ax as LayerSchemaNumericAttribute, ay as LayerSchemaTextAttribute, aO as LineStringGeometry, aY as LineToolSettings, a6 as LinkElementRead, aP as LngLatTuple, a7 as MarkerElementCreate, a8 as MarkerElementRead, a9 as MarkerElementUpdate, aZ as MarkerToolSettings, aD as MultiAggregationConfig, aQ as MultiLineStringGeometry, aR as MultiPointGeometry, aS as MultiPolygonGeometry, aa as NoteElementCreate, ab as NoteElementRead, ac as NoteElementUpdate, a_ as NoteToolSettings, ad as PathElementCreate, ae as PathElementRead, af as PathElementUpdate, a$ as PinToolSettings, ag as PlaceElementCreate, ah as PlaceElementRead, ai as PlaceElementUpdate, b0 as PlaceFrame, b1 as PlaceSymbol, aT as PointGeometry, aj as PolygonElementCreate, ak as PolygonElementRead, al as PolygonElementUpdate, aU as PolygonGeometry, b2 as PolygonToolSettings, ar as RasterValue, b3 as RouteToolSettings, aV as SortDirection, am as TextElementCreate, an as TextElementRead, ao as TextElementUpdate, b4 as TextToolSettings, aE as ValueConfiguration } from './types-DrMm8Los.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as Element, G as GeoJsonGeometry, a as GetElementsConstraint, b as ElementGroup, c as GetElementGroupsConstraint, S as SetVisibilityRequest, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, f as ElementCreate, g as ElementUpdate, L as Layer, h as GetLayersConstraint, i as LayerChangeCallbackParams, j as GeoJsonArrayBufferSource, k as GeoJsonFileSource, l as GeoJsonUrlSource, m as LayerGroup, n as GetLayerGroupsConstraint, o as LayerGroupChangeCallbackParams, p as LegendItemIdentifier, q as LegendItem, r as LegendItemsConstraint, s as LegendItemChangeCallbackParams, t as LayerFilters, F as Filters, u as GetRenderedFeaturesConstraint, v as LayerFeature, w as GeoJsonFeature, x as GetLayerCategoriesParams, y as GetLayerCategoriesGroup, z as GetLayerHistogramParams, A as GetLayerHistogramBin, B as AggregationMethod, C as GetLayerCalculationParams, D as LayerSchema, M as MapInteractionEvent, H as MapDetails, I as EntityNode, J as FeatureSelection, T as ToolType, K as InputToolSettings, N as ConfigurableToolType, O as ToolSettingsMap, P as ToolSettingsChangeEvent, Q as zInfer, R as SortConfig, V as ViewportState, U as SetViewportCenterZoomParams, W as ViewportConstraints, X as ViewportFitBoundsParams, Y as ViewportCenterZoom } from './types-
|
|
2
|
-
export { aC as AggregationConfig, Z as CircleElementCreate, _ as CircleElementRead, $ as CircleElementUpdate, aW as CircleToolSettings, aF as ElementGroupNode, aG as ElementNode, ap as EphemeralLayerSource, aH as FeatureNode, aK as FeltBoundary, aL as FeltZoom, az as FilterExpression, aA as FilterLogicGate, aB as FilterTernary, aM as GeoJsonProperties, a0 as HighlighterElementCreate, a1 as HighlighterElementRead, a2 as HighlighterElementUpdate, aX as HighlighterToolSettings, a3 as ImageElementCreate, a4 as ImageElementRead, a5 as ImageElementUpdate, aN as LatLng, aI as LayerGroupNode, aJ as LayerNode, aq as LayerProcessingStatus, as as LayerSchemaAttribute, at as LayerSchemaBooleanAttribute, au as LayerSchemaCommonAttribute, av as LayerSchemaDateAttribute, aw as LayerSchemaDateTimeAttribute, ax as LayerSchemaNumericAttribute, ay as LayerSchemaTextAttribute, aO as LineStringGeometry, aY as LineToolSettings, a6 as LinkElementRead, aP as LngLatTuple, a7 as MarkerElementCreate, a8 as MarkerElementRead, a9 as MarkerElementUpdate, aZ as MarkerToolSettings, aD as MultiAggregationConfig, aQ as MultiLineStringGeometry, aR as MultiPointGeometry, aS as MultiPolygonGeometry, aa as NoteElementCreate, ab as NoteElementRead, ac as NoteElementUpdate, a_ as NoteToolSettings, ad as PathElementCreate, ae as PathElementRead, af as PathElementUpdate, a$ as PinToolSettings, ag as PlaceElementCreate, ah as PlaceElementRead, ai as PlaceElementUpdate, b0 as PlaceFrame, b1 as PlaceSymbol, aT as PointGeometry, aj as PolygonElementCreate, ak as PolygonElementRead, al as PolygonElementUpdate, aU as PolygonGeometry, b2 as PolygonToolSettings, ar as RasterValue, b3 as RouteToolSettings, aV as SortDirection, am as TextElementCreate, an as TextElementRead, ao as TextElementUpdate, b4 as TextToolSettings, aE as ValueConfiguration } from './types-
|
|
1
|
+
import { E as Element, G as GeoJsonGeometry, a as GetElementsConstraint, b as ElementGroup, c as GetElementGroupsConstraint, S as SetVisibilityRequest, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, f as ElementCreate, g as ElementUpdate, L as Layer, h as GetLayersConstraint, i as LayerChangeCallbackParams, j as GeoJsonArrayBufferSource, k as GeoJsonFileSource, l as GeoJsonUrlSource, m as LayerGroup, n as GetLayerGroupsConstraint, o as LayerGroupChangeCallbackParams, p as LegendItemIdentifier, q as LegendItem, r as LegendItemsConstraint, s as LegendItemChangeCallbackParams, t as LayerFilters, F as Filters, u as GetRenderedFeaturesConstraint, v as LayerFeature, w as GeoJsonFeature, x as GetLayerCategoriesParams, y as GetLayerCategoriesGroup, z as GetLayerHistogramParams, A as GetLayerHistogramBin, B as AggregationMethod, C as GetLayerCalculationParams, D as LayerSchema, M as MapInteractionEvent, H as MapDetails, I as EntityNode, J as FeatureSelection, T as ToolType, K as InputToolSettings, N as ConfigurableToolType, O as ToolSettingsMap, P as ToolSettingsChangeEvent, Q as zInfer, R as SortConfig, V as ViewportState, U as SetViewportCenterZoomParams, W as ViewportConstraints, X as ViewportFitBoundsParams, Y as ViewportCenterZoom } from './types-DrMm8Los.js';
|
|
2
|
+
export { aC as AggregationConfig, Z as CircleElementCreate, _ as CircleElementRead, $ as CircleElementUpdate, aW as CircleToolSettings, aF as ElementGroupNode, aG as ElementNode, ap as EphemeralLayerSource, aH as FeatureNode, aK as FeltBoundary, aL as FeltZoom, az as FilterExpression, aA as FilterLogicGate, aB as FilterTernary, aM as GeoJsonProperties, a0 as HighlighterElementCreate, a1 as HighlighterElementRead, a2 as HighlighterElementUpdate, aX as HighlighterToolSettings, a3 as ImageElementCreate, a4 as ImageElementRead, a5 as ImageElementUpdate, aN as LatLng, aI as LayerGroupNode, aJ as LayerNode, aq as LayerProcessingStatus, as as LayerSchemaAttribute, at as LayerSchemaBooleanAttribute, au as LayerSchemaCommonAttribute, av as LayerSchemaDateAttribute, aw as LayerSchemaDateTimeAttribute, ax as LayerSchemaNumericAttribute, ay as LayerSchemaTextAttribute, aO as LineStringGeometry, aY as LineToolSettings, a6 as LinkElementRead, aP as LngLatTuple, a7 as MarkerElementCreate, a8 as MarkerElementRead, a9 as MarkerElementUpdate, aZ as MarkerToolSettings, aD as MultiAggregationConfig, aQ as MultiLineStringGeometry, aR as MultiPointGeometry, aS as MultiPolygonGeometry, aa as NoteElementCreate, ab as NoteElementRead, ac as NoteElementUpdate, a_ as NoteToolSettings, ad as PathElementCreate, ae as PathElementRead, af as PathElementUpdate, a$ as PinToolSettings, ag as PlaceElementCreate, ah as PlaceElementRead, ai as PlaceElementUpdate, b0 as PlaceFrame, b1 as PlaceSymbol, aT as PointGeometry, aj as PolygonElementCreate, ak as PolygonElementRead, al as PolygonElementUpdate, aU as PolygonGeometry, b2 as PolygonToolSettings, ar as RasterValue, b3 as RouteToolSettings, aV as SortDirection, am as TextElementCreate, an as TextElementRead, ao as TextElementUpdate, b4 as TextToolSettings, aE as ValueConfiguration } from './types-DrMm8Los.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function r(e,n){return o=>{let s=new MessageChannel,l=o.handler,a="options"in o?o.options:void 0,m=crypto.randomUUID();return e.postMessage({type:"felt.addListener",event:a?{eventName:n,id:m,options:a}:{eventName:n,id:m}},"*",[s.port2]),s.port1.onmessage=g=>{l(g.data)},()=>{s.port1.onmessage=null,s.port1.close(),s.port2.close(),e.postMessage({type:"felt.removeListener",id:m},"*")}}}function t(e,n,o){return async s=>{let l=new MessageChannel,a=s&&o?await o(s):s;return e.postMessage({type:n,params:a},"*",[l.port2]),new Promise((m,g)=>{l.port1.onmessage=y=>{y
|
|
1
|
+
import{a as c}from"./chunk-QXPO53SH.js";function r(e,n){return o=>{let s=new MessageChannel,l=o.handler,a="options"in o?o.options:void 0,m=crypto.randomUUID();return e.postMessage({type:"felt.addListener",event:a?{eventName:n,id:m,options:a}:{eventName:n,id:m}},"*",[s.port2]),s.port1.onmessage=g=>{c(g)||l(g.data)},()=>{s.port1.onmessage=null,s.port1.close(),s.port2.close(),e.postMessage({type:"felt.removeListener",id:m},"*")}}}function t(e,n,o){return async s=>{let l=new MessageChannel,a=s&&o?await o(s):s;return e.postMessage({type:n,params:a},"*",[l.port2]),new Promise((m,g)=>{l.port1.onmessage=y=>{c(y)?g(new Error(y.data.__error__)):m(y.data),l.port1.close(),l.port2.close()}})}}var u=e=>({getElement:t(e,"getElement"),getElementGeometry:t(e,"getElementGeometry"),getElements:t(e,"getElements"),setElementGroupVisibility:t(e,"setElementGroupVisibility"),getElementGroup:t(e,"getElementGroup"),getElementGroups:t(e,"getElementGroups"),onElementChange:r(e,"onElementChange"),onElementCreate:r(e,"onElementCreate"),onElementCreateEnd:r(e,"onElementCreateEnd"),onElementDelete:r(e,"onElementDelete"),onElementGroupChange:r(e,"onElementGroupChange"),createElement:t(e,"createElement"),updateElement:t(e,"updateElement"),deleteElement:t(e,"deleteElement")});var C=e=>({onPointerClick:r(e,"onPointerClick"),onPointerMove:r(e,"onPointerMove")});var L=e=>({getLayer:t(e,"getLayer"),getLayers:t(e,"getLayers"),setLayerVisibility:t(e,"setLayerVisibility"),setLayerStyle:t(e,"setLayerStyle"),setLayerLegendVisibility:t(e,"setLayerLegendVisibility"),onLayerChange:r(e,"onLayerChange"),createLayer:t(e,"createLayer",async n=>"url"in n.source||"arrayBuffer"in n.source?n:{source:{...n.source,arrayBuffer:await n.source.file.arrayBuffer()}}),deleteLayer:t(e,"deleteLayer"),getLayerGroup:t(e,"getLayerGroup"),getLayerGroups:t(e,"getLayerGroups"),setLayerGroupVisibility:t(e,"setLayerGroupVisibility"),setLayerGroupLegendVisibility:t(e,"setLayerGroupLegendVisibility"),onLayerGroupChange:r(e,"onLayerGroupChange"),getLegendItem:t(e,"getLegendItem"),getLegendItems:t(e,"getLegendItems"),setLegendItemVisibility:t(e,"setLegendItemVisibility"),onLegendItemChange:r(e,"onLegendItemChange"),getLayerFilters:t(e,"getLayerFilters"),setLayerFilters:t(e,"setLayerFilters"),onLayerFiltersChange:r(e,"onLayerFiltersChange"),getRenderedFeatures:t(e,"getRenderedFeatures"),getFeature:t(e,"getFeature"),getGeoJsonFeature:t(e,"getGeoJsonFeature"),getCategoryData:t(e,"getCategoryData"),getHistogramData:t(e,"getHistogramData"),getAggregates:t(e,"getAggregates"),getLayerSchema:t(e,"getLayerSchema")});var h=e=>({getMapDetails:t(e,"getMapDetails")});var T=e=>({onSelectionChange:r(e,"onSelectionChange"),getSelection:t(e,"getSelection"),selectFeature:t(e,"selectFeature"),clearSelection:t(e,"clearSelection")});var P=e=>({setTool:t(e,"setTool"),getTool:t(e,"getTool"),onToolChange:r(e,"onToolChange"),setToolSettings:t(e,"setToolSettings"),getToolSettings:t(e,"getToolSettings"),onToolSettingsChange:r(e,"onToolSettingsChange")});var E=e=>({updateUiControls:t(e,"updateUiControls"),setOnMapInteractionsUi:t(e,"setOnMapInteractionsUi"),showLayerDataTable:t(e,"showLayerDataTable"),hideLayerDataTable:t(e,"hideLayerDataTable")});var v=e=>({getViewport:t(e,"getViewport"),setViewport:t(e,"setViewport"),getViewportConstraints:t(e,"getViewportConstraints"),setViewportConstraints:t(e,"setViewportConstraints"),fitViewportToBounds:t(e,"fitViewportToBounds"),onViewportMove:r(e,"onViewportMove"),onViewportMoveEnd:r(e,"onViewportMoveEnd"),onMapIdle:r(e,"onMapIdle")});function M(e){return{iframe:null,...v(e),...E(e),...L(e),...u(e),...T(e),...C(e),...P(e),...h(e)}}var F={embed(e,n,o){let s={uiControls:{showLegend:!0,cooperativeGestures:!0,fullScreenButton:!0,geolocation:!1,zoomControls:!0,scaleBar:!0},initialViewport:void 0,origin:"https://felt.com"},l=o?.origin??s.origin,a=new URL(`${l}/embed/map/${n}`),m={showLegend:"legend",cooperativeGestures:"cooperativeGestures",fullScreenButton:"link",geolocation:"geolocation",zoomControls:"zoomControls",scaleBar:"scaleBar"},g={...s.uiControls,...o?.uiControls};for(let[p,d]of G(g))d!=null&&a.searchParams.set(m[p],d?"1":"0");if(o?.token&&a.searchParams.set("token",o.token),o?.initialViewport){let p=o.initialViewport;a.searchParams.set("loc",`${p.center.latitude},${p.center.longitude},${p.zoom}z`)}let y=e.tagName==="IFRAME",i=y?e:e.ownerDocument.createElement("iframe");return i.src=a.toString(),y||(i.style.width="100%",i.style.height="100%",i.style.border="none",i.style.margin="0",e.appendChild(i)),i.referrerPolicy="strict-origin-when-cross-origin",new Promise((p,d)=>{i.addEventListener("load",()=>{i.contentWindow==null?d(new Error("Failed to load Felt map")):p(i.contentWindow)},{once:!0})}).then(F.connect).then(p=>(Object.defineProperties(p,{iframe:{value:i,writable:!1,configurable:!1}}),p))},connect(e){let n=M(e);return new Promise((o,s)=>{let l=setTimeout(()=>{s(new Error("Failed to load Felt map")),clearInterval(m)},5e3),a=new MessageChannel,m=setInterval(()=>{e.postMessage({type:"felt.ready"},"*",[a.port2])},100);a.port1.onmessage=g=>{g.data===!0&&(clearInterval(m),clearTimeout(l),a.port1.close(),a.port2.close(),o(n))}})}},G=Object.entries;export{F as Felt};
|
package/dist/handler.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var oe=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var it=Object.getOwnPropertyNames;var st=Object.prototype.hasOwnProperty;var lt=(r,l)=>{for(var G in l)oe(r,G,{get:l[G],enumerable:!0})},pt=(r,l,G,z)=>{if(l&&typeof l=="object"||typeof l=="function")for(let M of it(l))!st.call(r,M)&&M!==G&&oe(r,M,{get:()=>l[M],enumerable:!(z=at(l,M))||z.enumerable});return r};var mt=r=>pt(oe({},"__esModule",{value:!0}),r);var gr={};lt(gr,{createMessageHandler:()=>ar});module.exports=mt(gr);var g=require("zod");var d=require("zod");var f=require("zod");function t(r,l){return f.z.strictObject({type:f.z.literal(r),params:l})}function S(r,l){return f.z.strictObject({eventName:f.z.literal(r),id:f.z.string(),options:l})}function p(r){return f.z.strictObject({eventName:f.z.literal(r),id:f.z.string()})}var i=require("zod"),B=i.z.number(),H=i.z.number(),D=i.z.object({latitude:H,longitude:B}),C=i.z.tuple([B,H]),w=i.z.object({type:i.z.literal("Polygon"),coordinates:i.z.array(i.z.array(C))}),he=i.z.object({type:i.z.literal("MultiPolygon"),coordinates:i.z.array(w.shape.coordinates)}),ct=i.z.object({type:i.z.literal("LineString"),coordinates:i.z.array(C)}),P=i.z.object({type:i.z.literal("MultiLineString"),coordinates:i.z.array(ct.shape.coordinates)}),fe=i.z.number().min(1).max(23),I=i.z.tuple([B,H,B,H]),T=i.z.object({show:i.z.array(i.z.string()).optional(),hide:i.z.array(i.z.string()).optional()}),gt=i.z.enum(["asc","desc"]),Se=i.z.object({attribute:i.z.string(),direction:gt});var e=require("zod");var u=e.z.object({id:e.z.string(),groupId:e.z.string().nullable(),color:e.z.string(),name:e.z.string().nullable(),description:e.z.string().nullable(),attributes:e.z.record(e.z.string(),e.z.unknown()),interaction:e.z.enum(["default","locked"]).optional()}),_=e.z.object({imageUrl:e.z.string().nullable()}),re=e.z.object({strokeOpacity:e.z.number(),strokeWidth:e.z.number(),strokeStyle:e.z.enum(["solid","dashed","dotted"])}),yt=e.z.enum(["meter","kilometer","foot","mile"]),Z=u.extend(_.shape).extend({type:e.z.literal("Place"),coordinates:C,symbol:e.z.string(),frame:e.z.enum(["frame-circle","frame-square"]).nullable(),hideLabel:e.z.boolean()}),V=u.extend(_.shape).extend(re.shape).extend({type:e.z.literal("Path"),coordinates:P.shape.coordinates,distanceMarker:e.z.boolean(),routingMode:e.z.enum(["driving","cycling","walking","flying"]).nullable(),endCaps:e.z.boolean()}),O=u.extend(_.shape).extend(re.shape).extend({type:e.z.literal("Polygon"),coordinates:P.shape.coordinates,fillOpacity:e.z.number().min(0).max(1),areaMarker:e.z.boolean()}),q=u.extend(_.shape).extend(re.shape).extend({type:e.z.literal("Circle"),center:C,radius:e.z.number(),radiusMarker:e.z.boolean(),radiusDisplayAngle:e.z.number(),radiusDisplayUnit:yt.nullable(),fillOpacity:e.z.number().min(0).max(1)}),U=u.extend({type:e.z.literal("Marker"),coordinates:P.shape.coordinates,opacity:e.z.number().min(0).max(1),size:e.z.number().min(0).max(100),zoom:e.z.number().min(0).max(23)}),N=u.extend({type:e.z.literal("Highlighter"),coordinates:he.shape.coordinates,renderHoles:e.z.boolean(),opacity:e.z.number().min(0).max(1)}),xe=e.z.object({position:C,rotation:e.z.number(),scale:e.z.number(),zoom:e.z.number().min(0).max(23),coordinates:w.shape.coordinates}),Le=e.z.object({text:e.z.string(),align:e.z.enum(["left","center","right"]),style:e.z.enum(["italic","light","regular","caps"]),name:e.z.string()}),J=u.extend(xe.shape).extend(Le.shape).extend({type:e.z.literal("Text")}),W=u.extend(xe.shape).extend(Le.shape).extend({type:e.z.literal("Note"),widthScale:e.z.number().min(0)}),j=u.extend({type:e.z.literal("Image"),coordinates:P.shape.coordinates,imageUrl:e.z.string(),opacity:e.z.number().min(0).max(1)}).omit({color:!0}),dt=u.extend({type:e.z.literal("Link"),coordinates:P.shape.coordinates,url:e.z.string()}),F={type:!0,coordinates:!0},x={id:!0},ne=Z.partial().extend(Z.pick(F).shape).omit(x),Q=V.partial().extend(V.pick(F).shape).omit(x),ae=O.partial().extend(O.pick(F).shape).omit(x),ie=q.partial().extend(q.pick({type:!0,center:!0,radius:!0}).shape).omit(x),se=U.partial().extend(U.pick(F).shape).omit(x),le=N.partial().extend(N.pick(F).shape).omit(x),pe=J.partial().omit({...x,coordinates:!0,name:!0,type:!0}).extend({type:e.z.literal("Text"),text:e.z.string()}),me=W.partial().omit({...x,coordinates:!0,name:!0,type:!0}).extend({type:e.z.literal("Note"),text:e.z.string()}),ut=j.partial().extend(j.pick({...F,imageUrl:!0}).shape).omit(x),be=e.z.discriminatedUnion("type",[ne,Q,ae,ie,se,le,ut,pe,me]);var Sr=V.omit({coordinates:!0}),xr=O.omit({coordinates:!0});var Lr=U.omit({coordinates:!0}),br=N.omit({coordinates:!0}),Mr=J.omit({coordinates:!0}),Cr=W.omit({coordinates:!0}),Gr=j.omit({coordinates:!0}),Ir=dt.omit({coordinates:!0}),L={type:!0,id:!0},ht=Z.partial().extend(Z.pick(L).shape),ft=V.partial().extend(V.pick(L).shape),St=O.partial().extend(O.pick(L).shape),xt=q.partial().extend(q.pick(L).shape),Lt=U.partial().extend(U.pick(L).shape),bt=N.partial().extend(N.pick(L).shape),Mt=J.partial().extend(J.pick(L).shape).omit({coordinates:!0,name:!0}),Ct=W.partial().extend(W.pick(L).shape).omit({coordinates:!0,name:!0}),Gt=j.partial().extend(j.pick(L).shape),Me=e.z.discriminatedUnion("type",[ht,ft,St,xt,Lt,bt,Mt,Ct,Gt]),Ce=e.z.object({ids:e.z.array(e.z.string()).optional()}),Ge=e.z.object({ids:e.z.array(e.z.string()).optional()});var It=t("getElement",d.z.string()),Tt=t("getElementGeometry",d.z.string()),Et=t("getElements",Ce.optional()),zt=t("getElementGroup",d.z.string()),Pt=t("getElementGroups",Ge.optional()),Ft=t("setElementGroupVisibility",T),kt=S("onElementChange",d.z.object({id:d.z.string()})),vt=p("onElementCreate"),wt=p("onElementCreateEnd"),Vt=S("onElementDelete",d.z.object({id:d.z.string()})),Ot=S("onElementGroupChange",d.z.object({id:d.z.string()})),Ut=t("createElement",be),Nt=t("updateElement",Me),jt=t("deleteElement",d.z.string()),Ie={methods:[It,Tt,Et,zt,Pt,Ft,Ut,Nt,jt],listeners:[kt,vt,wt,Vt,Ot]};var Rt=p("onPointerClick"),At=p("onPointerMove"),Te={methods:null,listeners:[Rt,At]};var s=require("zod");var a=require("zod"),Bt=a.z.enum(["in","ni"]),Ht=a.z.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),wr=a.z.enum(["and","or"]),Ee=a.z.union([a.z.number(),a.z.string(),a.z.boolean(),a.z.null()]),ze=a.z.string().or(a.z.null()),Dt=a.z.tuple([ze,Bt,a.z.array(Ee).or(a.z.null())]),Zt=a.z.tuple([ze,Ht,Ee]),ce=a.z.union([Dt,Zt]),ge=a.z.tuple([a.z.lazy(()=>a.z.union([ge,ce,a.z.null(),a.z.boolean()])),a.z.enum(["and","or"]),a.z.lazy(()=>a.z.union([ge,ce,a.z.null(),a.z.boolean()]))]),E=a.z.union([ge,ce,a.z.null(),a.z.boolean()]);var o=require("zod");var Pe=o.z.enum(["avg","max","min","sum","median"]),qt=o.z.object({method:Pe,attribute:o.z.string()}),Jt=o.z.object({methods:o.z.array(o.z.union([Pe,o.z.literal("count")])),attribute:o.z.string().optional()}),$=o.z.union([I,w,o.z.array(C)]),Fe=o.z.object({boundary:$.optional(),filters:E.optional(),aggregation:qt.optional()}),ke=o.z.object({layerId:o.z.string(),attribute:o.z.string(),limit:o.z.number().optional(),boundary:$.optional(),filters:E.optional(),values:Fe.optional()}),Nr=o.z.object({key:o.z.union([o.z.number(),o.z.string(),o.z.boolean()]),value:o.z.number().nullable()}),Wt=o.z.object({type:o.z.literal("equal-intervals"),count:o.z.number()}),_t=o.z.object({type:o.z.literal("time-interval"),interval:o.z.enum(["hour","day","week","month","year"])}),ve=o.z.object({layerId:o.z.string(),attribute:o.z.string(),steps:o.z.union([Wt,_t,o.z.array(o.z.number())]),boundary:$.optional(),filters:E.optional(),values:Fe.optional()}),jr=o.z.object({min:o.z.number(),max:o.z.number(),value:o.z.number()}),we=o.z.object({layerId:o.z.string(),boundary:$.optional(),filters:E.optional(),aggregation:Jt});var n=require("zod");var Br=n.z.enum(["processing","completed","failed","incomplete"]),Ve=n.z.object({ids:n.z.array(n.z.string()).optional()}),Oe=n.z.object({ids:n.z.array(n.z.string()).optional()}),k=n.z.object({id:n.z.string(),layerId:n.z.string()}),Ue=n.z.object({ids:k.array().optional(),layerIds:n.z.string().array().optional()}),Ne=n.z.object({layerIds:n.z.array(n.z.string()).optional(),areaQuery:n.z.union([n.z.object({coordinates:D}),n.z.object({boundary:I})]).optional()}),Qt=n.z.object({Point:n.z.object({}).passthrough().optional(),Line:n.z.object({}).passthrough().optional(),Polygon:n.z.object({}).passthrough().optional()}),ye=n.z.object({type:n.z.literal("application/geo+json"),name:n.z.string(),geometryStyles:Qt.optional()}),$t=ye.extend({file:n.z.instanceof(File)}),Kt=ye.extend({url:n.z.string().url()}),Xt=ye.extend({arrayBuffer:n.z.instanceof(ArrayBuffer)}),je=n.z.union([Xt,$t,Kt]);var Yt=t("getLayer",s.z.string()),eo=t("getLayers",Ve.optional()),to=t("setLayerVisibility",T),oo=S("onLayerChange",s.z.object({id:s.z.string()})),ro=t("setLayerStyle",s.z.object({id:s.z.string(),style:s.z.object({}).passthrough()})),no=t("setLayerLegendVisibility",T),ao=t("createLayer",s.z.object({source:je})),io=t("deleteLayer",s.z.string()),so=t("getLayerGroup",s.z.string()),lo=t("getLayerGroups",Oe.optional()),po=t("setLayerGroupVisibility",T),mo=t("setLayerGroupLegendVisibility",T),co=S("onLayerGroupChange",s.z.object({id:s.z.string()})),go=t("getLegendItem",k),yo=t("getLegendItems",Ue.optional()),uo=S("onLegendItemChange",k),ho=t("setLegendItemVisibility",s.z.object({show:k.array().optional(),hide:k.array().optional()})),fo=t("getLayerFilters",s.z.string()),So=t("setLayerFilters",s.z.object({layerId:s.z.string(),filters:E,note:s.z.string().optional()})),xo=S("onLayerFiltersChange",s.z.object({layerId:s.z.string()})),Lo=t("getRenderedFeatures",Ne.optional()),bo=t("getFeature",s.z.object({id:s.z.string().or(s.z.number()),layerId:s.z.string()})),Mo=t("getGeoJsonFeature",s.z.object({id:s.z.string().or(s.z.number()),layerId:s.z.string()})),Co=t("getCategoryData",ke),Go=t("getHistogramData",ve),Io=t("getAggregates",we),To=t("getLayerSchema",s.z.string()),Re={methods:[Yt,eo,to,ro,no,ao,io,so,lo,po,mo,go,yo,ho,fo,So,Lo,bo,Mo,Co,Go,Io,To],listeners:[oo,co,uo,xo]};var Ae=require("zod");var Eo=t("getMapDetails",Ae.z.undefined()),Be={methods:[Eo],listeners:[]};var R=require("zod");var b=require("zod"),He=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 zo=t("getSelection",R.z.undefined()),Po=p("onSelectionChange"),Fo=t("selectFeature",He),ko=t("clearSelection",R.z.object({features:R.z.boolean().optional(),elements:R.z.boolean().optional()}).optional()),De={methods:[zo,Fo,ko],listeners:[Po]};var _e=require("zod");var m=require("zod");var Ze=["pin","line","route","polygon","circle","marker","highlighter","text","note"],qe=m.z.enum([...Ze,"link"]),Je=m.z.enum(Ze),vo=ne.pick({color:!0,symbol:!0,frame:!0}).extend({afterCreation:m.z.enum(["enter name","add another","select"])}).required(),wo=Q.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),Vo=Q.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),Oo=ae.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),Uo=ie.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),No=se.pick({color:!0,opacity:!0,size:!0}).required(),jo=le.pick({color:!0,opacity:!0,renderHoles:!0}).extend({size:m.z.number().min(0).max(200)}).required(),Ro=pe.pick({color:!0,align:!0,style:!0}).required(),Ao=me.pick({color:!0,align:!0,style:!0}).required(),We=m.z.discriminatedUnion("tool",[vo.partial().extend({tool:m.z.literal("pin")}),wo.partial().extend({tool:m.z.literal("line")}),Vo.partial().extend({tool:m.z.literal("route")}),Oo.partial().extend({tool:m.z.literal("polygon")}),Uo.partial().extend({tool:m.z.literal("circle")}),No.partial().extend({tool:m.z.literal("marker")}),jo.partial().extend({tool:m.z.literal("highlighter")}),Ro.partial().extend({tool:m.z.literal("text")}),Ao.partial().extend({tool:m.z.literal("note")})]);var Bo=t("setTool",qe.nullable()),Ho=t("getTool",_e.z.undefined()),Do=p("onToolChange"),Zo=t("setToolSettings",We),qo=t("getToolSettings",Je),Jo=p("onToolSettingsChange"),Qe={methods:[Bo,Ho,Zo,qo],listeners:[Do,Jo]};var K=require("zod");var c=require("zod"),$e=c.z.object({showLegend:c.z.boolean().optional(),cooperativeGestures:c.z.boolean().optional(),fullScreenButton:c.z.boolean().optional(),geolocation:c.z.boolean().optional(),zoomControls:c.z.boolean().optional(),scaleBar:c.z.boolean().optional()}),Ke=c.z.object({featureSelectPanel:c.z.boolean().optional(),featureHoverPanel:c.z.boolean().optional(),elementSelectPanel:c.z.boolean().optional(),linkClickOpen:c.z.boolean().optional(),imageLightboxOpen:c.z.boolean().optional()});var Wo=t("updateUiControls",$e),_o=t("setOnMapInteractionsUi",Ke),Qo=t("showLayerDataTable",K.z.object({layerId:K.z.string(),sorting:Se.optional()}).optional()),$o=t("hideLayerDataTable",K.z.undefined()),Xe={methods:[Wo,_o,Qo,$o],listeners:null};var de=require("zod");var A=require("zod");var X=A.z.object({center:D,zoom:fe}),Ye=A.z.object({center:X.shape.center.optional(),zoom:X.shape.zoom.optional()}),et=A.z.object({minZoom:X.shape.zoom.nullish(),maxZoom:X.shape.zoom.nullish(),bounds:I.nullish()}).nullable(),tt=A.z.object({bounds:I});var Ko=t("getViewport",de.z.undefined()),Xo=t("setViewport",Ye),Yo=t("getViewportConstraints",de.z.undefined()),er=t("setViewportConstraints",et),tr=t("fitViewportToBounds",tt),or=p("onViewportMove"),rr=p("onViewportMoveEnd"),nr=p("onMapIdle"),ot={methods:[Xo,Ko,Yo,er,tr],listeners:[or,rr,nr]};var ue=[Xe,ot,Re,Ie,De,Te,Qe,Be];function ar(r,l,G){let z=new Map;async function M(h){if(!cr.safeParse(h.data).success){G?.onUnknownMessage?.(h.data);return}let Y=nt.safeParse(h.data);if(!Y.success){G?.onInvalidMessage?.(h.data,Y.error);return}let{data:y}=Y;if(y.type==="felt.ready")h.ports[0]?.postMessage(!0);else if(y.type==="felt.addListener"){if(y.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let v="options"in y.event?{options:"options"in y.event?y.event.options:void 0,handler:te=>{h.ports[0]?.postMessage(te)}}:{handler:te=>{h.ports[0]?.postMessage(te)}},ee=l.listeners[y.event.eventName](v);z.set(y.event.id,ee)}else if(y.type==="felt.removeListener")z.get(y.id)?.(),z.delete(y.id);else try{let v=l.methods[y.type],ee=await v(y.params);h.ports[0]?.postMessage(ee)}catch(v){h.ports[0]?.postMessage({__error__:ir(v)})}}return r.addEventListener("message",M),()=>{r.removeEventListener("message",M)}}function ir(r){return r instanceof Error?r.message:typeof r=="object"&&r!==null&&"message"in r?String(r.message):typeof r=="string"?r:"Unknown error"}var rt={methods:ue.map(r=>r.methods??[]).flat(),listeners:ue.map(r=>r.listeners??[]).flat()},sr=g.z.discriminatedUnion("eventName",[g.z.strictObject({eventName:g.z.literal("")}),...rt.listeners]),lr=g.z.strictObject({type:g.z.literal("felt.addListener"),event:sr}),pr=g.z.strictObject({type:g.z.literal("felt.removeListener"),id:g.z.string()}),mr=g.z.strictObject({type:g.z.literal("felt.ready")}),nt=g.z.discriminatedUnion("type",[mr,lr,pr,...rt.methods]),cr=g.z.object({type:g.z.enum(nt.options.map(r=>r.shape.type.value))});0&&(module.exports={createMessageHandler});
|
|
1
|
+
"use strict";var oe=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var st=Object.getOwnPropertyNames;var lt=Object.prototype.hasOwnProperty;var pt=(o,l)=>{for(var G in l)oe(o,G,{get:l[G],enumerable:!0})},mt=(o,l,G,z)=>{if(l&&typeof l=="object"||typeof l=="function")for(let b of st(l))!lt.call(o,b)&&b!==G&&oe(o,b,{get:()=>l[b],enumerable:!(z=it(l,b))||z.enumerable});return o};var ct=o=>mt(oe({},"__esModule",{value:!0}),o);var yr={};pt(yr,{createMessageHandler:()=>sr});module.exports=ct(yr);var g=require("zod");function re(o){return{__error__:gt(o)}}function gt(o){return o instanceof Error?o.message:typeof o=="object"&&o!==null&&"message"in o?String(o.message):typeof o=="string"?o:"Unknown error"}var d=require("zod");var f=require("zod");function t(o,l){return f.z.strictObject({type:f.z.literal(o),params:l})}function S(o,l){return f.z.strictObject({eventName:f.z.literal(o),id:f.z.string(),options:l})}function p(o){return f.z.strictObject({eventName:f.z.literal(o),id:f.z.string()})}var i=require("zod"),H=i.z.number(),D=i.z.number(),Z=i.z.object({latitude:D,longitude:H}),C=i.z.tuple([H,D]),P=i.z.object({type:i.z.literal("Polygon"),coordinates:i.z.array(i.z.array(C).min(4).refine(o=>o[0][0]===o[o.length-1][0]&&o[0][1]===o[o.length-1][1],"The last point of each ring must be identical to the first"))}),fe=i.z.object({type:i.z.literal("MultiPolygon"),coordinates:i.z.array(P.shape.coordinates)}),yt=i.z.object({type:i.z.literal("LineString"),coordinates:i.z.array(C).min(2)}),w=i.z.object({type:i.z.literal("MultiLineString"),coordinates:i.z.array(yt.shape.coordinates)}),Se=i.z.number().min(1).max(23),I=i.z.tuple([H,D,H,D]),T=i.z.object({show:i.z.array(i.z.string()).optional(),hide:i.z.array(i.z.string()).optional()}),dt=i.z.enum(["asc","desc"]),xe=i.z.object({attribute:i.z.string(),direction:dt});var e=require("zod");var h=e.z.object({id:e.z.string(),groupId:e.z.string().nullable(),color:e.z.string(),name:e.z.string().nullable(),description:e.z.string().nullable(),attributes:e.z.record(e.z.string(),e.z.unknown()),interaction:e.z.enum(["default","locked"]).optional()}),Q=e.z.object({imageUrl:e.z.string().nullable()}),ne=e.z.object({strokeOpacity:e.z.number(),strokeWidth:e.z.number(),strokeStyle:e.z.enum(["solid","dashed","dotted"])}),ut=e.z.enum(["meter","kilometer","foot","mile"]),q=h.extend(Q.shape).extend({type:e.z.literal("Place"),coordinates:C,symbol:e.z.string(),frame:e.z.enum(["frame-circle","frame-square"]).nullable(),hideLabel:e.z.boolean()}),V=h.extend(Q.shape).extend(ne.shape).extend({type:e.z.literal("Path"),coordinates:w.shape.coordinates,distanceMarker:e.z.boolean(),routingMode:e.z.enum(["driving","cycling","walking","flying"]).nullable(),endCaps:e.z.boolean()}),O=h.extend(Q.shape).extend(ne.shape).extend({type:e.z.literal("Polygon"),coordinates:P.shape.coordinates,fillOpacity:e.z.number().min(0).max(1),areaMarker:e.z.boolean()}),J=h.extend(Q.shape).extend(ne.shape).extend({type:e.z.literal("Circle"),center:C,radius:e.z.number(),radiusMarker:e.z.boolean(),radiusDisplayAngle:e.z.number(),radiusDisplayUnit:ut.nullable(),fillOpacity:e.z.number().min(0).max(1)}),U=h.extend({type:e.z.literal("Marker"),coordinates:w.shape.coordinates,opacity:e.z.number().min(0).max(1),size:e.z.number().min(0).max(100),zoom:e.z.number().min(0).max(23)}),j=h.extend({type:e.z.literal("Highlighter"),coordinates:fe.shape.coordinates,renderHoles:e.z.boolean(),opacity:e.z.number().min(0).max(1)}),Le=e.z.object({position:C,rotation:e.z.number(),scale:e.z.number(),zoom:e.z.number().min(0).max(23),coordinates:P.shape.coordinates}),Me=e.z.object({text:e.z.string(),align:e.z.enum(["left","center","right"]),style:e.z.enum(["italic","light","regular","caps"]),name:e.z.string()}),_=h.extend(Le.shape).extend(Me.shape).extend({type:e.z.literal("Text")}),W=h.extend(Le.shape).extend(Me.shape).extend({type:e.z.literal("Note"),widthScale:e.z.number().min(0)}),N=h.extend({type:e.z.literal("Image"),coordinates:w.shape.coordinates,imageUrl:e.z.string(),opacity:e.z.number().min(0).max(1)}).omit({color:!0}),ht=h.extend({type:e.z.literal("Link"),coordinates:w.shape.coordinates,url:e.z.string()}),F={type:!0,coordinates:!0},x={id:!0},ae=q.partial().extend(q.pick(F).shape).omit(x),$=V.partial().extend(V.pick(F).shape).omit(x),ie=O.partial().extend(O.pick(F).shape).omit(x),se=J.partial().extend(J.pick({type:!0,center:!0,radius:!0}).shape).omit(x),le=U.partial().extend(U.pick(F).shape).omit(x),pe=j.partial().extend(j.pick(F).shape).omit(x),me=_.partial().omit({...x,coordinates:!0,name:!0,type:!0}).extend({type:e.z.literal("Text"),text:e.z.string()}),ce=W.partial().omit({...x,coordinates:!0,name:!0,type:!0}).extend({type:e.z.literal("Note"),text:e.z.string()}),ft=N.partial().extend(N.pick({...F,imageUrl:!0}).shape).omit(x),be=e.z.discriminatedUnion("type",[ae,$,ie,se,le,pe,ft,me,ce]);var Lr=V.omit({coordinates:!0}),Mr=O.omit({coordinates:!0});var br=U.omit({coordinates:!0}),Cr=j.omit({coordinates:!0}),Gr=_.omit({coordinates:!0}),Ir=W.omit({coordinates:!0}),Tr=N.omit({coordinates:!0}),Er=ht.omit({coordinates:!0}),L={type:!0,id:!0},St=q.partial().extend(q.pick(L).shape),xt=V.partial().extend(V.pick(L).shape),Lt=O.partial().extend(O.pick(L).shape),Mt=J.partial().extend(J.pick(L).shape),bt=U.partial().extend(U.pick(L).shape),Ct=j.partial().extend(j.pick(L).shape),Gt=_.partial().extend(_.pick(L).shape).omit({coordinates:!0,name:!0}),It=W.partial().extend(W.pick(L).shape).omit({coordinates:!0,name:!0}),Tt=N.partial().extend(N.pick(L).shape),Ce=e.z.discriminatedUnion("type",[St,xt,Lt,Mt,bt,Ct,Gt,It,Tt]),Ge=e.z.object({ids:e.z.array(e.z.string()).optional()}),Ie=e.z.object({ids:e.z.array(e.z.string()).optional()});var Et=t("getElement",d.z.string()),zt=t("getElementGeometry",d.z.string()),Pt=t("getElements",Ge.optional()),Ft=t("getElementGroup",d.z.string()),kt=t("getElementGroups",Ie.optional()),vt=t("setElementGroupVisibility",T),wt=S("onElementChange",d.z.object({id:d.z.string()})),Vt=p("onElementCreate"),Ot=p("onElementCreateEnd"),Ut=S("onElementDelete",d.z.object({id:d.z.string()})),jt=S("onElementGroupChange",d.z.object({id:d.z.string()})),Nt=t("createElement",be),Rt=t("updateElement",Ce),At=t("deleteElement",d.z.string()),Te={methods:[Et,zt,Pt,Ft,kt,vt,Nt,Rt,At],listeners:[wt,Vt,Ot,Ut,jt]};var Bt=p("onPointerClick"),Ht=p("onPointerMove"),Ee={methods:null,listeners:[Bt,Ht]};var s=require("zod");var a=require("zod"),Dt=a.z.enum(["in","ni"]),Zt=a.z.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),Or=a.z.enum(["and","or"]),ze=a.z.union([a.z.number(),a.z.string(),a.z.boolean(),a.z.null()]),Pe=a.z.string().or(a.z.null()),qt=a.z.tuple([Pe,Dt,a.z.array(ze).or(a.z.null())]),Jt=a.z.tuple([Pe,Zt,ze]),ge=a.z.union([qt,Jt]),ye=a.z.tuple([a.z.lazy(()=>a.z.union([ye,ge,a.z.null(),a.z.boolean()])),a.z.enum(["and","or"]),a.z.lazy(()=>a.z.union([ye,ge,a.z.null(),a.z.boolean()]))]),E=a.z.union([ye,ge,a.z.null(),a.z.boolean()]);var r=require("zod");var Fe=r.z.enum(["avg","max","min","sum","median"]),_t=r.z.object({method:Fe,attribute:r.z.string()}),Wt=r.z.object({methods:r.z.array(r.z.union([Fe,r.z.literal("count")])),attribute:r.z.string().optional()}),K=r.z.union([I,P,r.z.array(C)]),ke=r.z.object({boundary:K.optional(),filters:E.optional(),aggregation:_t.optional()}),ve=r.z.object({layerId:r.z.string(),attribute:r.z.string(),limit:r.z.number().optional(),boundary:K.optional(),filters:E.optional(),values:ke.optional()}),Rr=r.z.object({key:r.z.union([r.z.number(),r.z.string(),r.z.boolean()]),value:r.z.number().nullable()}),Qt=r.z.object({type:r.z.literal("equal-intervals"),count:r.z.number()}),$t=r.z.object({type:r.z.literal("time-interval"),interval:r.z.enum(["hour","day","week","month","year"])}),we=r.z.object({layerId:r.z.string(),attribute:r.z.string(),steps:r.z.union([Qt,$t,r.z.array(r.z.number())]),boundary:K.optional(),filters:E.optional(),values:ke.optional()}),Ar=r.z.object({min:r.z.number(),max:r.z.number(),value:r.z.number()}),Ve=r.z.object({layerId:r.z.string(),boundary:K.optional(),filters:E.optional(),aggregation:Wt});var n=require("zod");var Dr=n.z.enum(["processing","completed","failed","incomplete"]),Oe=n.z.object({ids:n.z.array(n.z.string()).optional()}),Ue=n.z.object({ids:n.z.array(n.z.string()).optional()}),k=n.z.object({id:n.z.string(),layerId:n.z.string()}),je=n.z.object({ids:k.array().optional(),layerIds:n.z.string().array().optional()}),Ne=n.z.object({layerIds:n.z.array(n.z.string()).optional(),areaQuery:n.z.union([n.z.object({coordinates:Z}),n.z.object({boundary:I})]).optional()}),Kt=n.z.object({Point:n.z.object({}).passthrough().optional(),Line:n.z.object({}).passthrough().optional(),Polygon:n.z.object({}).passthrough().optional()}),de=n.z.object({type:n.z.literal("application/geo+json"),name:n.z.string(),geometryStyles:Kt.optional()}),Xt=de.extend({file:n.z.instanceof(File)}),Yt=de.extend({url:n.z.string().url()}),eo=de.extend({arrayBuffer:n.z.instanceof(ArrayBuffer)}),Re=n.z.union([eo,Xt,Yt]);var to=t("getLayer",s.z.string()),oo=t("getLayers",Oe.optional()),ro=t("setLayerVisibility",T),no=S("onLayerChange",s.z.object({id:s.z.string()})),ao=t("setLayerStyle",s.z.object({id:s.z.string(),style:s.z.object({}).passthrough()})),io=t("setLayerLegendVisibility",T),so=t("createLayer",s.z.object({source:Re})),lo=t("deleteLayer",s.z.string()),po=t("getLayerGroup",s.z.string()),mo=t("getLayerGroups",Ue.optional()),co=t("setLayerGroupVisibility",T),go=t("setLayerGroupLegendVisibility",T),yo=S("onLayerGroupChange",s.z.object({id:s.z.string()})),uo=t("getLegendItem",k),ho=t("getLegendItems",je.optional()),fo=S("onLegendItemChange",k),So=t("setLegendItemVisibility",s.z.object({show:k.array().optional(),hide:k.array().optional()})),xo=t("getLayerFilters",s.z.string()),Lo=t("setLayerFilters",s.z.object({layerId:s.z.string(),filters:E,note:s.z.string().optional()})),Mo=S("onLayerFiltersChange",s.z.object({layerId:s.z.string()})),bo=t("getRenderedFeatures",Ne.optional()),Co=t("getFeature",s.z.object({id:s.z.string().or(s.z.number()),layerId:s.z.string()})),Go=t("getGeoJsonFeature",s.z.object({id:s.z.string().or(s.z.number()),layerId:s.z.string()})),Io=t("getCategoryData",ve),To=t("getHistogramData",we),Eo=t("getAggregates",Ve),zo=t("getLayerSchema",s.z.string()),Ae={methods:[to,oo,ro,ao,io,so,lo,po,mo,co,go,uo,ho,So,xo,Lo,bo,Co,Go,Io,To,Eo,zo],listeners:[no,yo,fo,Mo]};var Be=require("zod");var Po=t("getMapDetails",Be.z.undefined()),He={methods:[Po],listeners:[]};var R=require("zod");var M=require("zod"),De=M.z.object({id:M.z.string().or(M.z.number()),layerId:M.z.string(),showPopup:M.z.boolean().optional(),fitViewport:M.z.boolean().or(M.z.object({maxZoom:M.z.number()})).optional()});var Fo=t("getSelection",R.z.undefined()),ko=p("onSelectionChange"),vo=t("selectFeature",De),wo=t("clearSelection",R.z.object({features:R.z.boolean().optional(),elements:R.z.boolean().optional()}).optional()),Ze={methods:[Fo,vo,wo],listeners:[ko]};var Qe=require("zod");var m=require("zod");var qe=["pin","line","route","polygon","circle","marker","highlighter","text","note"],Je=m.z.enum([...qe,"link"]),_e=m.z.enum(qe),Vo=ae.pick({color:!0,symbol:!0,frame:!0}).extend({afterCreation:m.z.enum(["enter name","add another","select"])}).required(),Oo=$.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),Uo=$.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),jo=ie.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),No=se.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),Ro=le.pick({color:!0,opacity:!0,size:!0}).required(),Ao=pe.pick({color:!0,opacity:!0,renderHoles:!0}).extend({size:m.z.number().min(0).max(200)}).required(),Bo=me.pick({color:!0,align:!0,style:!0}).required(),Ho=ce.pick({color:!0,align:!0,style:!0}).required(),We=m.z.discriminatedUnion("tool",[Vo.partial().extend({tool:m.z.literal("pin")}),Oo.partial().extend({tool:m.z.literal("line")}),Uo.partial().extend({tool:m.z.literal("route")}),jo.partial().extend({tool:m.z.literal("polygon")}),No.partial().extend({tool:m.z.literal("circle")}),Ro.partial().extend({tool:m.z.literal("marker")}),Ao.partial().extend({tool:m.z.literal("highlighter")}),Bo.partial().extend({tool:m.z.literal("text")}),Ho.partial().extend({tool:m.z.literal("note")})]);var Do=t("setTool",Je.nullable()),Zo=t("getTool",Qe.z.undefined()),qo=p("onToolChange"),Jo=t("setToolSettings",We),_o=t("getToolSettings",_e),Wo=p("onToolSettingsChange"),$e={methods:[Do,Zo,Jo,_o],listeners:[qo,Wo]};var X=require("zod");var c=require("zod"),Ke=c.z.object({showLegend:c.z.boolean().optional(),cooperativeGestures:c.z.boolean().optional(),fullScreenButton:c.z.boolean().optional(),geolocation:c.z.boolean().optional(),zoomControls:c.z.boolean().optional(),scaleBar:c.z.boolean().optional()}),Xe=c.z.object({featureSelectPanel:c.z.boolean().optional(),featureHoverPanel:c.z.boolean().optional(),elementSelectPanel:c.z.boolean().optional(),linkClickOpen:c.z.boolean().optional(),imageLightboxOpen:c.z.boolean().optional()});var Qo=t("updateUiControls",Ke),$o=t("setOnMapInteractionsUi",Xe),Ko=t("showLayerDataTable",X.z.object({layerId:X.z.string(),sorting:xe.optional()}).optional()),Xo=t("hideLayerDataTable",X.z.undefined()),Ye={methods:[Qo,$o,Ko,Xo],listeners:null};var ue=require("zod");var A=require("zod");var Y=A.z.object({center:Z,zoom:Se}),et=A.z.object({center:Y.shape.center.optional(),zoom:Y.shape.zoom.optional()}),tt=A.z.object({minZoom:Y.shape.zoom.nullish(),maxZoom:Y.shape.zoom.nullish(),bounds:I.nullish()}).nullable(),ot=A.z.object({bounds:I});var Yo=t("getViewport",ue.z.undefined()),er=t("setViewport",et),tr=t("getViewportConstraints",ue.z.undefined()),or=t("setViewportConstraints",tt),rr=t("fitViewportToBounds",ot),nr=p("onViewportMove"),ar=p("onViewportMoveEnd"),ir=p("onMapIdle"),rt={methods:[er,Yo,tr,or,rr],listeners:[nr,ar,ir]};var he=[Ye,rt,Ae,Te,Ze,Ee,$e,He];function sr(o,l,G){let z=new Map;async function b(u){if(!gr.safeParse(u.data).success){G?.onUnknownMessage?.(u.data);return}let B=at.safeParse(u.data);if(!B.success){G?.onInvalidMessage?.(u.data,B.error),u.ports[0]?.postMessage(re(B.error.message));return}let{data:y}=B;if(y.type==="felt.ready")u.ports[0]?.postMessage(!0);else if(y.type==="felt.addListener"){if(y.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let v="options"in y.event?{options:"options"in y.event?y.event.options:void 0,handler:te=>{u.ports[0]?.postMessage(te)}}:{handler:te=>{u.ports[0]?.postMessage(te)}},ee=l.listeners[y.event.eventName](v);z.set(y.event.id,ee)}else if(y.type==="felt.removeListener")z.get(y.id)?.(),z.delete(y.id);else try{let v=l.methods[y.type],ee=await v(y.params);u.ports[0]?.postMessage(ee)}catch(v){u.ports[0]?.postMessage(re(v))}}return o.addEventListener("message",b),()=>{o.removeEventListener("message",b)}}var nt={methods:he.map(o=>o.methods??[]).flat(),listeners:he.map(o=>o.listeners??[]).flat()},lr=g.z.discriminatedUnion("eventName",[g.z.strictObject({eventName:g.z.literal("")}),...nt.listeners]),pr=g.z.strictObject({type:g.z.literal("felt.addListener"),event:lr}),mr=g.z.strictObject({type:g.z.literal("felt.removeListener"),id:g.z.string()}),cr=g.z.strictObject({type:g.z.literal("felt.ready")}),at=g.z.discriminatedUnion("type",[cr,pr,mr,...nt.methods]),gr=g.z.object({type:g.z.enum(at.options.map(o=>o.shape.type.value))});0&&(module.exports={createMessageHandler});
|
package/dist/handler.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z, ZodError } from 'zod';
|
|
2
|
-
import { Q as zInfer, E as Element, G as GeoJsonGeometry, b as ElementGroup, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, M as MapInteractionEvent, L as Layer, m as LayerGroup, q as LegendItem, t as LayerFilters, v as LayerFeature, w as GeoJsonFeature, y as GetLayerCategoriesGroup, A as GetLayerHistogramBin, B as AggregationMethod, D as LayerSchema, i as LayerChangeCallbackParams, o as LayerGroupChangeCallbackParams, s as LegendItemChangeCallbackParams, aB as FilterTernary, H as MapDetails, I as EntityNode, T as ToolType, O as ToolSettingsMap, P as ToolSettingsChangeEvent, V as ViewportState, W as ViewportConstraints, b5 as UnionToIntersection, b6 as PromiseOrNot } from './types-
|
|
2
|
+
import { Q as zInfer, E as Element, G as GeoJsonGeometry, b as ElementGroup, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, M as MapInteractionEvent, L as Layer, m as LayerGroup, q as LegendItem, t as LayerFilters, v as LayerFeature, w as GeoJsonFeature, y as GetLayerCategoriesGroup, A as GetLayerHistogramBin, B as AggregationMethod, D as LayerSchema, i as LayerChangeCallbackParams, o as LayerGroupChangeCallbackParams, s as LegendItemChangeCallbackParams, aB as FilterTernary, H as MapDetails, I as EntityNode, T as ToolType, O as ToolSettingsMap, P as ToolSettingsChangeEvent, V as ViewportState, W as ViewportConstraints, b5 as UnionToIntersection, b6 as PromiseOrNot } from './types-DrMm8Los.cjs';
|
|
3
3
|
|
|
4
4
|
type Method<TRequest extends {
|
|
5
5
|
type: string;
|
|
@@ -320,7 +320,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
320
320
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
321
321
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
322
322
|
type: z.ZodOptional<z.ZodLiteral<"Polygon">>;
|
|
323
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
323
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
324
324
|
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
325
325
|
areaMarker: z.ZodOptional<z.ZodBoolean>;
|
|
326
326
|
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
@@ -339,7 +339,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
339
339
|
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
340
340
|
}>, {
|
|
341
341
|
type: z.ZodLiteral<"Polygon">;
|
|
342
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
342
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
343
343
|
fillOpacity: z.ZodNumber;
|
|
344
344
|
areaMarker: z.ZodBoolean;
|
|
345
345
|
}>, "type" | "coordinates">>, "id">, "strip", z.ZodTypeAny, {
|
|
@@ -509,7 +509,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
509
509
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
510
510
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
511
511
|
type: z.ZodOptional<z.ZodLiteral<"Highlighter">>;
|
|
512
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">, "many">>;
|
|
512
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">>;
|
|
513
513
|
renderHoles: z.ZodOptional<z.ZodBoolean>;
|
|
514
514
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
515
515
|
}, Pick<z.objectUtil.extendShape<{
|
|
@@ -522,7 +522,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
522
522
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
523
523
|
}, {
|
|
524
524
|
type: z.ZodLiteral<"Highlighter">;
|
|
525
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">, "many">;
|
|
525
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
|
|
526
526
|
renderHoles: z.ZodBoolean;
|
|
527
527
|
opacity: z.ZodNumber;
|
|
528
528
|
}>, "type" | "coordinates">>, "id">, "strip", z.ZodTypeAny, {
|
|
@@ -602,7 +602,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
602
602
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
603
603
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
604
604
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
605
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
605
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
606
606
|
text: z.ZodOptional<z.ZodString>;
|
|
607
607
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
608
608
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
@@ -650,7 +650,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
650
650
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
651
651
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
652
652
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
653
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
653
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
654
654
|
text: z.ZodOptional<z.ZodString>;
|
|
655
655
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
656
656
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
@@ -1090,7 +1090,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1090
1090
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
1091
1091
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
1092
1092
|
type: z.ZodOptional<z.ZodLiteral<"Polygon">>;
|
|
1093
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1093
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
1094
1094
|
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
1095
1095
|
areaMarker: z.ZodOptional<z.ZodBoolean>;
|
|
1096
1096
|
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
@@ -1109,7 +1109,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1109
1109
|
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
1110
1110
|
}>, {
|
|
1111
1111
|
type: z.ZodLiteral<"Polygon">;
|
|
1112
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1112
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
1113
1113
|
fillOpacity: z.ZodNumber;
|
|
1114
1114
|
areaMarker: z.ZodBoolean;
|
|
1115
1115
|
}>, "type" | "id">>, "strip", z.ZodTypeAny, {
|
|
@@ -1285,7 +1285,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1285
1285
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1286
1286
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
1287
1287
|
type: z.ZodOptional<z.ZodLiteral<"Highlighter">>;
|
|
1288
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">, "many">>;
|
|
1288
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">>;
|
|
1289
1289
|
renderHoles: z.ZodOptional<z.ZodBoolean>;
|
|
1290
1290
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1291
1291
|
}, Pick<z.objectUtil.extendShape<{
|
|
@@ -1298,7 +1298,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1298
1298
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
1299
1299
|
}, {
|
|
1300
1300
|
type: z.ZodLiteral<"Highlighter">;
|
|
1301
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">, "many">;
|
|
1301
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
|
|
1302
1302
|
renderHoles: z.ZodBoolean;
|
|
1303
1303
|
opacity: z.ZodNumber;
|
|
1304
1304
|
}>, "type" | "id">>, "strip", z.ZodTypeAny, {
|
|
@@ -1336,7 +1336,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1336
1336
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
1337
1337
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
1338
1338
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1339
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1339
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
1340
1340
|
text: z.ZodOptional<z.ZodString>;
|
|
1341
1341
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
1342
1342
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
@@ -1355,7 +1355,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1355
1355
|
rotation: z.ZodNumber;
|
|
1356
1356
|
scale: z.ZodNumber;
|
|
1357
1357
|
zoom: z.ZodNumber;
|
|
1358
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1358
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
1359
1359
|
}>, {
|
|
1360
1360
|
text: z.ZodString;
|
|
1361
1361
|
align: z.ZodEnum<["left", "center", "right"]>;
|
|
@@ -1404,7 +1404,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1404
1404
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
1405
1405
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
1406
1406
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1407
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1407
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
1408
1408
|
text: z.ZodOptional<z.ZodString>;
|
|
1409
1409
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
1410
1410
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
@@ -1424,7 +1424,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1424
1424
|
rotation: z.ZodNumber;
|
|
1425
1425
|
scale: z.ZodNumber;
|
|
1426
1426
|
zoom: z.ZodNumber;
|
|
1427
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1427
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
1428
1428
|
}>, {
|
|
1429
1429
|
text: z.ZodString;
|
|
1430
1430
|
align: z.ZodEnum<["left", "center", "right"]>;
|
|
@@ -2678,7 +2678,7 @@ declare const GetLayerCategoriesMessage: z.ZodObject<{
|
|
|
2678
2678
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2679
2679
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2680
2680
|
type: z.ZodLiteral<"Polygon">;
|
|
2681
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2681
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2682
2682
|
}, "strip", z.ZodTypeAny, {
|
|
2683
2683
|
type: "Polygon";
|
|
2684
2684
|
coordinates: [number, number][][];
|
|
@@ -2690,7 +2690,7 @@ declare const GetLayerCategoriesMessage: z.ZodObject<{
|
|
|
2690
2690
|
values: z.ZodOptional<z.ZodObject<{
|
|
2691
2691
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2692
2692
|
type: z.ZodLiteral<"Polygon">;
|
|
2693
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2693
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2694
2694
|
}, "strip", z.ZodTypeAny, {
|
|
2695
2695
|
type: "Polygon";
|
|
2696
2696
|
coordinates: [number, number][][];
|
|
@@ -2844,7 +2844,7 @@ declare const GetLayerHistogramMessage: z.ZodObject<{
|
|
|
2844
2844
|
}>, z.ZodArray<z.ZodNumber, "many">]>;
|
|
2845
2845
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2846
2846
|
type: z.ZodLiteral<"Polygon">;
|
|
2847
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2847
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2848
2848
|
}, "strip", z.ZodTypeAny, {
|
|
2849
2849
|
type: "Polygon";
|
|
2850
2850
|
coordinates: [number, number][][];
|
|
@@ -2856,7 +2856,7 @@ declare const GetLayerHistogramMessage: z.ZodObject<{
|
|
|
2856
2856
|
values: z.ZodOptional<z.ZodObject<{
|
|
2857
2857
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2858
2858
|
type: z.ZodLiteral<"Polygon">;
|
|
2859
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2859
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2860
2860
|
}, "strip", z.ZodTypeAny, {
|
|
2861
2861
|
type: "Polygon";
|
|
2862
2862
|
coordinates: [number, number][][];
|
|
@@ -3014,7 +3014,7 @@ declare const GetLayerCalculationMessage: z.ZodObject<{
|
|
|
3014
3014
|
layerId: z.ZodString;
|
|
3015
3015
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
3016
3016
|
type: z.ZodLiteral<"Polygon">;
|
|
3017
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
3017
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
3018
3018
|
}, "strip", z.ZodTypeAny, {
|
|
3019
3019
|
type: "Polygon";
|
|
3020
3020
|
coordinates: [number, number][][];
|
package/dist/handler.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z, ZodError } from 'zod';
|
|
2
|
-
import { Q as zInfer, E as Element, G as GeoJsonGeometry, b as ElementGroup, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, M as MapInteractionEvent, L as Layer, m as LayerGroup, q as LegendItem, t as LayerFilters, v as LayerFeature, w as GeoJsonFeature, y as GetLayerCategoriesGroup, A as GetLayerHistogramBin, B as AggregationMethod, D as LayerSchema, i as LayerChangeCallbackParams, o as LayerGroupChangeCallbackParams, s as LegendItemChangeCallbackParams, aB as FilterTernary, H as MapDetails, I as EntityNode, T as ToolType, O as ToolSettingsMap, P as ToolSettingsChangeEvent, V as ViewportState, W as ViewportConstraints, b5 as UnionToIntersection, b6 as PromiseOrNot } from './types-
|
|
2
|
+
import { Q as zInfer, E as Element, G as GeoJsonGeometry, b as ElementGroup, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, M as MapInteractionEvent, L as Layer, m as LayerGroup, q as LegendItem, t as LayerFilters, v as LayerFeature, w as GeoJsonFeature, y as GetLayerCategoriesGroup, A as GetLayerHistogramBin, B as AggregationMethod, D as LayerSchema, i as LayerChangeCallbackParams, o as LayerGroupChangeCallbackParams, s as LegendItemChangeCallbackParams, aB as FilterTernary, H as MapDetails, I as EntityNode, T as ToolType, O as ToolSettingsMap, P as ToolSettingsChangeEvent, V as ViewportState, W as ViewportConstraints, b5 as UnionToIntersection, b6 as PromiseOrNot } from './types-DrMm8Los.js';
|
|
3
3
|
|
|
4
4
|
type Method<TRequest extends {
|
|
5
5
|
type: string;
|
|
@@ -320,7 +320,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
320
320
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
321
321
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
322
322
|
type: z.ZodOptional<z.ZodLiteral<"Polygon">>;
|
|
323
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
323
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
324
324
|
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
325
325
|
areaMarker: z.ZodOptional<z.ZodBoolean>;
|
|
326
326
|
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
@@ -339,7 +339,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
339
339
|
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
340
340
|
}>, {
|
|
341
341
|
type: z.ZodLiteral<"Polygon">;
|
|
342
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
342
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
343
343
|
fillOpacity: z.ZodNumber;
|
|
344
344
|
areaMarker: z.ZodBoolean;
|
|
345
345
|
}>, "type" | "coordinates">>, "id">, "strip", z.ZodTypeAny, {
|
|
@@ -509,7 +509,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
509
509
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
510
510
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
511
511
|
type: z.ZodOptional<z.ZodLiteral<"Highlighter">>;
|
|
512
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">, "many">>;
|
|
512
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">>;
|
|
513
513
|
renderHoles: z.ZodOptional<z.ZodBoolean>;
|
|
514
514
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
515
515
|
}, Pick<z.objectUtil.extendShape<{
|
|
@@ -522,7 +522,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
522
522
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
523
523
|
}, {
|
|
524
524
|
type: z.ZodLiteral<"Highlighter">;
|
|
525
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">, "many">;
|
|
525
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
|
|
526
526
|
renderHoles: z.ZodBoolean;
|
|
527
527
|
opacity: z.ZodNumber;
|
|
528
528
|
}>, "type" | "coordinates">>, "id">, "strip", z.ZodTypeAny, {
|
|
@@ -602,7 +602,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
602
602
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
603
603
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
604
604
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
605
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
605
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
606
606
|
text: z.ZodOptional<z.ZodString>;
|
|
607
607
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
608
608
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
@@ -650,7 +650,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
650
650
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
651
651
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
652
652
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
653
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
653
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
654
654
|
text: z.ZodOptional<z.ZodString>;
|
|
655
655
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
656
656
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
@@ -1090,7 +1090,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1090
1090
|
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
1091
1091
|
strokeStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted"]>>;
|
|
1092
1092
|
type: z.ZodOptional<z.ZodLiteral<"Polygon">>;
|
|
1093
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1093
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
1094
1094
|
fillOpacity: z.ZodOptional<z.ZodNumber>;
|
|
1095
1095
|
areaMarker: z.ZodOptional<z.ZodBoolean>;
|
|
1096
1096
|
}, Pick<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
@@ -1109,7 +1109,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1109
1109
|
strokeStyle: z.ZodEnum<["solid", "dashed", "dotted"]>;
|
|
1110
1110
|
}>, {
|
|
1111
1111
|
type: z.ZodLiteral<"Polygon">;
|
|
1112
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1112
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
1113
1113
|
fillOpacity: z.ZodNumber;
|
|
1114
1114
|
areaMarker: z.ZodBoolean;
|
|
1115
1115
|
}>, "type" | "id">>, "strip", z.ZodTypeAny, {
|
|
@@ -1285,7 +1285,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1285
1285
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1286
1286
|
interaction: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "locked"]>>>;
|
|
1287
1287
|
type: z.ZodOptional<z.ZodLiteral<"Highlighter">>;
|
|
1288
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">, "many">>;
|
|
1288
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">>;
|
|
1289
1289
|
renderHoles: z.ZodOptional<z.ZodBoolean>;
|
|
1290
1290
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1291
1291
|
}, Pick<z.objectUtil.extendShape<{
|
|
@@ -1298,7 +1298,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1298
1298
|
interaction: z.ZodOptional<z.ZodEnum<["default", "locked"]>>;
|
|
1299
1299
|
}, {
|
|
1300
1300
|
type: z.ZodLiteral<"Highlighter">;
|
|
1301
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">, "many">;
|
|
1301
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
|
|
1302
1302
|
renderHoles: z.ZodBoolean;
|
|
1303
1303
|
opacity: z.ZodNumber;
|
|
1304
1304
|
}>, "type" | "id">>, "strip", z.ZodTypeAny, {
|
|
@@ -1336,7 +1336,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1336
1336
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
1337
1337
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
1338
1338
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1339
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1339
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
1340
1340
|
text: z.ZodOptional<z.ZodString>;
|
|
1341
1341
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
1342
1342
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
@@ -1355,7 +1355,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1355
1355
|
rotation: z.ZodNumber;
|
|
1356
1356
|
scale: z.ZodNumber;
|
|
1357
1357
|
zoom: z.ZodNumber;
|
|
1358
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1358
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
1359
1359
|
}>, {
|
|
1360
1360
|
text: z.ZodString;
|
|
1361
1361
|
align: z.ZodEnum<["left", "center", "right"]>;
|
|
@@ -1404,7 +1404,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1404
1404
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
1405
1405
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
1406
1406
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1407
|
-
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1407
|
+
coordinates: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">>;
|
|
1408
1408
|
text: z.ZodOptional<z.ZodString>;
|
|
1409
1409
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
1410
1410
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
@@ -1424,7 +1424,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1424
1424
|
rotation: z.ZodNumber;
|
|
1425
1425
|
scale: z.ZodNumber;
|
|
1426
1426
|
zoom: z.ZodNumber;
|
|
1427
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
1427
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
1428
1428
|
}>, {
|
|
1429
1429
|
text: z.ZodString;
|
|
1430
1430
|
align: z.ZodEnum<["left", "center", "right"]>;
|
|
@@ -2678,7 +2678,7 @@ declare const GetLayerCategoriesMessage: z.ZodObject<{
|
|
|
2678
2678
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2679
2679
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2680
2680
|
type: z.ZodLiteral<"Polygon">;
|
|
2681
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2681
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2682
2682
|
}, "strip", z.ZodTypeAny, {
|
|
2683
2683
|
type: "Polygon";
|
|
2684
2684
|
coordinates: [number, number][][];
|
|
@@ -2690,7 +2690,7 @@ declare const GetLayerCategoriesMessage: z.ZodObject<{
|
|
|
2690
2690
|
values: z.ZodOptional<z.ZodObject<{
|
|
2691
2691
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2692
2692
|
type: z.ZodLiteral<"Polygon">;
|
|
2693
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2693
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2694
2694
|
}, "strip", z.ZodTypeAny, {
|
|
2695
2695
|
type: "Polygon";
|
|
2696
2696
|
coordinates: [number, number][][];
|
|
@@ -2844,7 +2844,7 @@ declare const GetLayerHistogramMessage: z.ZodObject<{
|
|
|
2844
2844
|
}>, z.ZodArray<z.ZodNumber, "many">]>;
|
|
2845
2845
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2846
2846
|
type: z.ZodLiteral<"Polygon">;
|
|
2847
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2847
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2848
2848
|
}, "strip", z.ZodTypeAny, {
|
|
2849
2849
|
type: "Polygon";
|
|
2850
2850
|
coordinates: [number, number][][];
|
|
@@ -2856,7 +2856,7 @@ declare const GetLayerHistogramMessage: z.ZodObject<{
|
|
|
2856
2856
|
values: z.ZodOptional<z.ZodObject<{
|
|
2857
2857
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
2858
2858
|
type: z.ZodLiteral<"Polygon">;
|
|
2859
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
2859
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
2860
2860
|
}, "strip", z.ZodTypeAny, {
|
|
2861
2861
|
type: "Polygon";
|
|
2862
2862
|
coordinates: [number, number][][];
|
|
@@ -3014,7 +3014,7 @@ declare const GetLayerCalculationMessage: z.ZodObject<{
|
|
|
3014
3014
|
layerId: z.ZodString;
|
|
3015
3015
|
boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
|
|
3016
3016
|
type: z.ZodLiteral<"Polygon">;
|
|
3017
|
-
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
3017
|
+
coordinates: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">;
|
|
3018
3018
|
}, "strip", z.ZodTypeAny, {
|
|
3019
3019
|
type: "Polygon";
|
|
3020
3020
|
coordinates: [number, number][][];
|