@feltmaps/js-sdk 1.5.0-next.17 → 1.5.0-next.18

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/handler.js CHANGED
@@ -1 +1 @@
1
- import{b as _}from"./chunk-QXPO53SH.js";import{z as g}from"zod";import{z as u}from"zod";import{z as x}from"zod";function t(s,I){return x.strictObject({type:x.literal(s),params:I})}function h(s,I){return x.strictObject({eventName:x.literal(s),id:x.string(),options:I})}function l(s){return x.strictObject({eventName:x.literal(s),id:x.string()})}import{z as a}from"zod";var N=a.number(),j=a.number(),R=a.object({latitude:j,longitude:N}),L=a.tuple([N,j]),T=a.object({type:a.literal("Polygon"),coordinates:a.array(a.array(L).min(4).refine(s=>s[0][0]===s[s.length-1][0]&&s[0][1]===s[s.length-1][1],"The last point of each ring must be identical to the first"))}),ue=a.object({type:a.literal("MultiPolygon"),coordinates:a.array(T.shape.coordinates)}),rt=a.object({type:a.literal("LineString"),coordinates:a.array(L).min(2)}),F=a.object({type:a.literal("MultiLineString"),coordinates:a.array(rt.shape.coordinates)}),he=a.number().min(1).max(23),b=a.tuple([N,j,N,j]),C=a.object({show:a.array(a.string()).optional(),hide:a.array(a.string()).optional()}),nt=a.enum(["asc","desc"]),fe=a.object({attribute:a.string(),direction:nt});import{z as e}from"zod";var d=e.object({id:e.string(),groupId:e.string().nullable(),color:e.string(),name:e.string().nullable(),description:e.string().nullable(),attributes:e.record(e.string(),e.unknown()),interaction:e.enum(["default","locked"]).optional()}),Z=e.object({imageUrl:e.string().nullable()}),ee=e.object({strokeOpacity:e.number(),strokeWidth:e.number(),strokeStyle:e.enum(["solid","dashed","dotted"])}),at=e.enum(["meter","kilometer","foot","mile"]),A=d.extend(Z.shape).extend({type:e.literal("Place"),coordinates:L,symbol:e.string(),frame:e.enum(["frame-circle","frame-square"]).nullable(),hideLabel:e.boolean()}),k=d.extend(Z.shape).extend(ee.shape).extend({type:e.literal("Path"),coordinates:F.shape.coordinates,distanceMarker:e.boolean(),routingMode:e.enum(["driving","cycling","walking","flying"]).nullable(),endCaps:e.boolean()}),v=d.extend(Z.shape).extend(ee.shape).extend({type:e.literal("Polygon"),coordinates:T.shape.coordinates,fillOpacity:e.number().min(0).max(1),areaMarker:e.boolean()}),B=d.extend(Z.shape).extend(ee.shape).extend({type:e.literal("Circle"),center:L,radius:e.number(),radiusMarker:e.boolean(),radiusDisplayAngle:e.number(),radiusDisplayUnit:at.nullable(),fillOpacity:e.number().min(0).max(1)}),w=d.extend({type:e.literal("Marker"),coordinates:F.shape.coordinates,opacity:e.number().min(0).max(1),size:e.number().min(0).max(100),zoom:e.number().min(0).max(23)}),V=d.extend({type:e.literal("Highlighter"),coordinates:ue.shape.coordinates,renderHoles:e.boolean(),opacity:e.number().min(0).max(1)}),Se=e.object({position:L,rotation:e.number(),scale:e.number(),zoom:e.number().min(0).max(23),coordinates:T.shape.coordinates}),xe=e.object({text:e.string(),align:e.enum(["left","center","right"]),style:e.enum(["italic","light","regular","caps"]),name:e.string()}),H=d.extend(Se.shape).extend(xe.shape).extend({type:e.literal("Text")}),D=d.extend(Se.shape).extend(xe.shape).extend({type:e.literal("Note"),widthScale:e.number().min(0)}),O=d.extend({type:e.literal("Image"),coordinates:F.shape.coordinates,imageUrl:e.string(),opacity:e.number().min(0).max(1)}).omit({color:!0}),it=d.extend({type:e.literal("Link"),coordinates:F.shape.coordinates,url:e.string()}),E={type:!0,coordinates:!0},f={id:!0},te=A.partial().extend(A.pick(E).shape).omit(f),q=k.partial().extend(k.pick(E).shape).omit(f),oe=v.partial().extend(v.pick(E).shape).omit(f),re=B.partial().extend(B.pick({type:!0,center:!0,radius:!0}).shape).omit(f),ne=w.partial().extend(w.pick(E).shape).omit(f),ae=V.partial().extend(V.pick(E).shape).omit(f),ie=H.partial().omit({...f,coordinates:!0,name:!0,type:!0}).extend({type:e.literal("Text"),text:e.string()}),se=D.partial().omit({...f,coordinates:!0,name:!0,type:!0}).extend({type:e.literal("Note"),text:e.string()}),st=O.partial().extend(O.pick({...E,imageUrl:!0}).shape).omit(f),Le=e.discriminatedUnion("type",[te,q,oe,re,ne,ae,st,ie,se]);var cr=k.omit({coordinates:!0}),gr=v.omit({coordinates:!0});var yr=w.omit({coordinates:!0}),dr=V.omit({coordinates:!0}),ur=H.omit({coordinates:!0}),hr=D.omit({coordinates:!0}),fr=O.omit({coordinates:!0}),Sr=it.omit({coordinates:!0}),S={type:!0,id:!0},lt=A.partial().extend(A.pick(S).shape),pt=k.partial().extend(k.pick(S).shape),mt=v.partial().extend(v.pick(S).shape),ct=B.partial().extend(B.pick(S).shape),gt=w.partial().extend(w.pick(S).shape),yt=V.partial().extend(V.pick(S).shape),dt=H.partial().extend(H.pick(S).shape).omit({coordinates:!0,name:!0}),ut=D.partial().extend(D.pick(S).shape).omit({coordinates:!0,name:!0}),ht=O.partial().extend(O.pick(S).shape),Me=e.discriminatedUnion("type",[lt,pt,mt,ct,gt,yt,dt,ut,ht]),be=e.object({ids:e.array(e.string()).optional()}),Ce=e.object({ids:e.array(e.string()).optional()});var ft=t("getElement",u.string()),St=t("getElementGeometry",u.string()),xt=t("getElements",be.optional()),Lt=t("getElementGroup",u.string()),Mt=t("getElementGroups",Ce.optional()),bt=t("setElementGroupVisibility",C),Ct=h("onElementChange",u.object({id:u.string()})),Gt=l("onElementCreate"),It=l("onElementCreateEnd"),Tt=h("onElementDelete",u.object({id:u.string()})),Et=h("onElementGroupChange",u.object({id:u.string()})),zt=t("createElement",Le),Pt=t("updateElement",Me),Ft=t("deleteElement",u.string()),Ge={methods:[ft,St,xt,Lt,Mt,bt,zt,Pt,Ft],listeners:[Ct,Gt,It,Tt,Et]};var kt=l("onPointerClick"),vt=l("onPointerMove"),Ie={methods:null,listeners:[kt,vt]};import{z as i}from"zod";import{z as n}from"zod";var wt=n.enum(["in","ni"]),Vt=n.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),zr=n.enum(["and","or"]),Te=n.union([n.number(),n.string(),n.boolean(),n.null()]),Ee=n.string().or(n.null()),Ot=n.tuple([Ee,wt,n.array(Te).or(n.null())]),Ut=n.tuple([Ee,Vt,Te]),le=n.union([Ot,Ut]),pe=n.tuple([n.lazy(()=>n.union([pe,le,n.null(),n.boolean()])),n.enum(["and","or"]),n.lazy(()=>n.union([pe,le,n.null(),n.boolean()]))]),G=n.union([pe,le,n.null(),n.boolean()]);import{z as o}from"zod";var ze=o.enum(["avg","max","min","sum","median"]),Nt=o.object({method:ze,attribute:o.string()}),jt=o.object({methods:o.array(o.union([ze,o.literal("count")])),attribute:o.string().optional()}),J=o.union([b,T,o.array(L)]),Pe=o.object({boundary:J.optional(),filters:G.optional(),aggregation:Nt.optional()}),Fe=o.object({layerId:o.string(),attribute:o.string(),limit:o.number().optional(),boundary:J.optional(),filters:G.optional(),values:Pe.optional()}),wr=o.object({key:o.union([o.number(),o.string(),o.boolean()]),value:o.number().nullable()}),Rt=o.object({type:o.literal("equal-intervals"),count:o.number()}),At=o.object({type:o.literal("time-interval"),interval:o.enum(["hour","day","week","month","year"])}),ke=o.object({layerId:o.string(),attribute:o.string(),steps:o.union([Rt,At,o.array(o.number())]),boundary:J.optional(),filters:G.optional(),values:Pe.optional()}),Vr=o.object({min:o.number(),max:o.number(),value:o.number()}),ve=o.object({layerId:o.string(),boundary:J.optional(),filters:G.optional(),aggregation:jt});import{z as r}from"zod";var jr=r.enum(["processing","completed","failed","incomplete"]),we=r.object({ids:r.array(r.string()).optional()}),Ve=r.object({ids:r.array(r.string()).optional()}),z=r.object({id:r.string(),layerId:r.string()}),Oe=r.object({ids:z.array().optional(),layerIds:r.string().array().optional()}),Ue=r.object({layerIds:r.array(r.string()).optional(),areaQuery:r.union([r.object({coordinates:R}),r.object({boundary:b})]).optional()}),Bt=r.object({Point:r.object({}).passthrough().optional(),Line:r.object({}).passthrough().optional(),Polygon:r.object({}).passthrough().optional()}),me=r.object({type:r.literal("application/geo+json"),name:r.string(),geometryStyles:Bt.optional()}),Ht=me.extend({file:r.instanceof(File)}),Dt=me.extend({url:r.string().url()}),Zt=me.extend({arrayBuffer:r.instanceof(ArrayBuffer)}),Ne=r.union([Zt,Ht,Dt]);var qt=t("getLayer",i.string()),Jt=t("getLayers",we.optional()),Wt=t("setLayerVisibility",C),Qt=h("onLayerChange",i.object({id:i.string()})),$t=t("setLayerStyle",i.object({id:i.string(),style:i.object({}).passthrough()})),Kt=t("setLayerLegendVisibility",C),Xt=t("createLayer",i.object({source:Ne})),Yt=t("deleteLayer",i.string()),_t=t("getLayerGroup",i.string()),eo=t("getLayerGroups",Ve.optional()),to=t("setLayerGroupVisibility",C),oo=t("setLayerGroupLegendVisibility",C),ro=h("onLayerGroupChange",i.object({id:i.string()})),no=t("getLegendItem",z),ao=t("getLegendItems",Oe.optional()),io=h("onLegendItemChange",z),so=t("setLegendItemVisibility",i.object({show:z.array().optional(),hide:z.array().optional()})),lo=t("getLayerFilters",i.string()),po=t("setLayerFilters",i.object({layerId:i.string(),filters:G,note:i.string().optional()})),mo=h("onLayerFiltersChange",i.object({layerId:i.string()})),co=t("getRenderedFeatures",Ue.optional()),go=t("getFeature",i.object({id:i.string().or(i.number()),layerId:i.string()})),yo=t("getGeoJsonFeature",i.object({id:i.string().or(i.number()),layerId:i.string()})),uo=t("getCategoryData",Fe),ho=t("getHistogramData",ke),fo=t("getAggregates",ve),So=t("getLayerSchema",i.string()),je={methods:[qt,Jt,Wt,$t,Kt,Xt,Yt,_t,eo,to,oo,no,ao,so,lo,po,co,go,yo,uo,ho,fo,So],listeners:[Qt,ro,io,mo]};import{z as xo}from"zod";var Lo=t("getMapDetails",xo.undefined()),Re={methods:[Lo],listeners:[]};import{z as W}from"zod";import{z as M}from"zod";var Ae=M.object({id:M.string().or(M.number()),layerId:M.string(),showPopup:M.boolean().optional(),fitViewport:M.boolean().or(M.object({maxZoom:M.number()})).optional()});var Mo=t("getSelection",W.undefined()),bo=l("onSelectionChange"),Co=t("selectFeature",Ae),Go=t("clearSelection",W.object({features:W.boolean().optional(),elements:W.boolean().optional()}).optional()),Be={methods:[Mo,Co,Go],listeners:[bo]};import{z as Vo}from"zod";import{z as p}from"zod";var He=["pin","line","route","polygon","circle","marker","highlighter","text","note"],De=p.enum([...He,"link"]),Ze=p.enum(He),Io=te.pick({color:!0,symbol:!0,frame:!0}).extend({afterCreation:p.enum(["enter name","add another","select"])}).required(),To=q.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),Eo=q.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),zo=oe.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),Po=re.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),Fo=ne.pick({color:!0,opacity:!0,size:!0}).required(),ko=ae.pick({color:!0,opacity:!0,renderHoles:!0}).extend({size:p.number().min(0).max(200)}).required(),vo=ie.pick({color:!0,align:!0,style:!0}).required(),wo=se.pick({color:!0,align:!0,style:!0}).required(),qe=p.discriminatedUnion("tool",[Io.partial().extend({tool:p.literal("pin")}),To.partial().extend({tool:p.literal("line")}),Eo.partial().extend({tool:p.literal("route")}),zo.partial().extend({tool:p.literal("polygon")}),Po.partial().extend({tool:p.literal("circle")}),Fo.partial().extend({tool:p.literal("marker")}),ko.partial().extend({tool:p.literal("highlighter")}),vo.partial().extend({tool:p.literal("text")}),wo.partial().extend({tool:p.literal("note")})]);var Oo=t("setTool",De.nullable()),Uo=t("getTool",Vo.undefined()),No=l("onToolChange"),jo=t("setToolSettings",qe),Ro=t("getToolSettings",Ze),Ao=l("onToolSettingsChange"),Je={methods:[Oo,Uo,jo,Ro],listeners:[No,Ao]};import{z as ce}from"zod";import{z as c}from"zod";var We=c.object({showLegend:c.boolean().optional(),cooperativeGestures:c.boolean().optional(),fullScreenButton:c.boolean().optional(),geolocation:c.boolean().optional(),zoomControls:c.boolean().optional(),scaleBar:c.boolean().optional()}),Qe=c.object({featureSelectPanel:c.boolean().optional(),featureHoverPanel:c.boolean().optional(),elementSelectPanel:c.boolean().optional(),linkClickOpen:c.boolean().optional(),imageLightboxOpen:c.boolean().optional()});var Bo=t("updateUiControls",We),Ho=t("setOnMapInteractionsUi",Qe),Do=t("showLayerDataTable",ce.object({layerId:ce.string(),sorting:fe.optional()}).optional()),Zo=t("hideLayerDataTable",ce.undefined()),$e={methods:[Bo,Ho,Do,Zo],listeners:null};import{z as _e}from"zod";import{z as $}from"zod";var Q=$.object({center:R,zoom:he}),Ke=$.object({center:Q.shape.center.optional(),zoom:Q.shape.zoom.optional()}),Xe=$.object({minZoom:Q.shape.zoom.nullish(),maxZoom:Q.shape.zoom.nullish(),bounds:b.nullish()}).nullable(),Ye=$.object({bounds:b});var qo=t("getViewport",_e.undefined()),Jo=t("setViewport",Ke),Wo=t("getViewportConstraints",_e.undefined()),Qo=t("setViewportConstraints",Xe),$o=t("fitViewportToBounds",Ye),Ko=l("onViewportMove"),Xo=l("onViewportMoveEnd"),Yo=l("onMapIdle"),et={methods:[Jo,qo,Wo,Qo,$o],listeners:[Ko,Xo,Yo]};var ge=[$e,et,je,Ge,Be,Ie,Je,Re];function Nn(s,I,ye){let K=new Map;async function de(y){if(!rr.safeParse(y.data).success){ye?.onUnknownMessage?.(y.data);return}let U=ot.safeParse(y.data);if(!U.success){ye?.onInvalidMessage?.(y.data,U.error),y.ports[0]?.postMessage(_(U.error.message));return}let{data:m}=U;if(m.type==="felt.ready")y.ports[0]?.postMessage(!0);else if(m.type==="felt.addListener"){if(m.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let P="options"in m.event?{options:"options"in m.event?m.event.options:void 0,handler:Y=>{y.ports[0]?.postMessage(Y)}}:{handler:Y=>{y.ports[0]?.postMessage(Y)}},X=I.listeners[m.event.eventName](P);K.set(m.event.id,X)}else if(m.type==="felt.removeListener")K.get(m.id)?.(),K.delete(m.id);else try{let P=I.methods[m.type],X=await P(m.params);y.ports[0]?.postMessage(X)}catch(P){y.ports[0]?.postMessage(_(P))}}return s.addEventListener("message",de),()=>{s.removeEventListener("message",de)}}var tt={methods:ge.map(s=>s.methods??[]).flat(),listeners:ge.map(s=>s.listeners??[]).flat()},_o=g.discriminatedUnion("eventName",[g.strictObject({eventName:g.literal("")}),...tt.listeners]),er=g.strictObject({type:g.literal("felt.addListener"),event:_o}),tr=g.strictObject({type:g.literal("felt.removeListener"),id:g.string()}),or=g.strictObject({type:g.literal("felt.ready")}),ot=g.discriminatedUnion("type",[or,er,tr,...tt.methods]),rr=g.object({type:g.enum(ot.options.map(s=>s.shape.type.value))});export{Nn as createMessageHandler};
1
+ import{z as y}from"zod";import{z as u}from"zod";import{z as x}from"zod";function t(r,I){return x.strictObject({type:x.literal(r),params:I})}function h(r,I){return x.strictObject({eventName:x.literal(r),id:x.string(),options:I})}function l(r){return x.strictObject({eventName:x.literal(r),id:x.string()})}import{z as i}from"zod";var R=i.number(),N=i.number(),j=i.object({latitude:N,longitude:R}),L=i.tuple([R,N]),T=i.object({type:i.literal("Polygon"),coordinates:i.array(i.array(L).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"))}),A=i.object({type:i.literal("MultiPolygon"),coordinates:i.array(T.shape.coordinates)}),rt=i.object({type:i.literal("LineString"),coordinates:i.array(L).min(2)}),F=i.object({type:i.literal("MultiLineString"),coordinates:i.array(rt.shape.coordinates)}),ue=i.number().min(1).max(23),b=i.tuple([R,N,R,N]),C=i.object({show:i.array(i.string()).optional(),hide:i.array(i.string()).optional()}),nt=i.enum(["asc","desc"]),he=i.object({attribute:i.string(),direction:nt});import{z as e}from"zod";var d=e.object({id:e.string(),groupId:e.string().nullable(),color:e.string(),name:e.string().nullable(),description:e.string().nullable(),attributes:e.record(e.string(),e.unknown()),interaction:e.enum(["default","locked"]).optional()}),J=e.object({imageUrl:e.string().nullable()}),ee=e.object({strokeOpacity:e.number(),strokeWidth:e.number(),strokeStyle:e.enum(["solid","dashed","dotted"])}),at=e.enum(["meter","kilometer","foot","mile"]),H=d.extend(J.shape).extend({type:e.literal("Place"),coordinates:L,symbol:e.string(),frame:e.enum(["frame-circle","frame-square"]).nullable(),hideLabel:e.boolean()}),k=d.extend(J.shape).extend(ee.shape).extend({type:e.literal("Path"),coordinates:F.shape.coordinates,distanceMarker:e.boolean(),routingMode:e.enum(["driving","cycling","walking","flying"]).nullable(),endCaps:e.boolean()}),v=d.extend(J.shape).extend(ee.shape).extend({type:e.literal("Polygon"),coordinates:T.shape.coordinates,fillOpacity:e.number().min(0).max(1),areaMarker:e.boolean()}),B=d.extend(J.shape).extend(ee.shape).extend({type:e.literal("Circle"),center:L,radius:e.number(),radiusMarker:e.boolean(),radiusDisplayAngle:e.number(),radiusDisplayUnit:at.nullable(),fillOpacity:e.number().min(0).max(1)}),w=d.extend({type:e.literal("Marker"),coordinates:F.shape.coordinates,opacity:e.number().min(0).max(1),size:e.number().min(0).max(100),zoom:e.number().min(0).max(23)}),V=d.extend({type:e.literal("Highlighter"),coordinates:A.shape.coordinates,renderHoles:e.boolean(),opacity:e.number().min(0).max(1)}),fe=e.object({position:L,rotation:e.number(),scale:e.number(),zoom:e.number().min(0).max(23),coordinates:T.shape.coordinates}),Se=e.object({text:e.string(),align:e.enum(["left","center","right"]),style:e.enum(["italic","light","regular","caps"]),name:e.string()}),D=d.extend(fe.shape).extend(Se.shape).extend({type:e.literal("Text")}),Z=d.extend(fe.shape).extend(Se.shape).extend({type:e.literal("Note"),widthScale:e.number().min(0)}),O=d.extend({type:e.literal("Image"),coordinates:F.shape.coordinates,imageUrl:e.string(),opacity:e.number().min(0).max(1)}).omit({color:!0}),it=d.extend({type:e.literal("Link"),coordinates:F.shape.coordinates,url:e.string()}),E={type:!0,coordinates:!0},f={id:!0},te=H.partial().extend(H.pick(E).shape).omit(f),q=k.partial().extend(k.pick(E).shape).omit(f),oe=v.partial().extend(v.pick(E).shape).omit(f),re=B.partial().extend(B.pick({type:!0,center:!0,radius:!0}).shape).omit(f),ne=w.partial().extend(w.pick(E).shape).omit(f),ae=V.partial().extend(V.pick(E).shape).omit(f),ie=D.partial().omit({...f,coordinates:!0,name:!0,type:!0}).extend({type:e.literal("Text"),text:e.string()}),se=Z.partial().omit({...f,coordinates:!0,name:!0,type:!0}).extend({type:e.literal("Note"),text:e.string()}),st=O.partial().extend(O.pick({...E,imageUrl:!0}).shape).omit(f),xe=e.discriminatedUnion("type",[te,q,oe,re,ne,ae,st,ie,se]);var yr=k.omit({coordinates:!0}),gr=v.omit({coordinates:!0});var dr=w.omit({coordinates:!0}),ur=V.omit({coordinates:!0}),hr=D.omit({coordinates:!0}),fr=Z.omit({coordinates:!0}),Sr=O.omit({coordinates:!0}),xr=it.omit({coordinates:!0}),S={type:!0,id:!0},lt=H.partial().extend(H.pick(S).shape),pt=k.partial().extend(k.pick(S).shape),mt=v.partial().extend(v.pick(S).shape),ct=B.partial().extend(B.pick(S).shape),yt=w.partial().extend(w.pick(S).shape),gt=V.partial().extend(V.pick(S).shape),dt=D.partial().extend(D.pick(S).shape).omit({coordinates:!0,name:!0}),ut=Z.partial().extend(Z.pick(S).shape).omit({coordinates:!0,name:!0}),ht=O.partial().extend(O.pick(S).shape),Le=e.discriminatedUnion("type",[lt,pt,mt,ct,yt,gt,dt,ut,ht]),Me=e.object({ids:e.array(e.string()).optional()}),be=e.object({ids:e.array(e.string()).optional()});var ft=t("getElement",u.string()),St=t("getElementGeometry",u.string()),xt=t("getElements",Me.optional()),Lt=t("getElementGroup",u.string()),Mt=t("getElementGroups",be.optional()),bt=t("setElementGroupVisibility",C),Ct=h("onElementChange",u.object({id:u.string()})),Gt=l("onElementCreate"),It=l("onElementCreateEnd"),Tt=h("onElementDelete",u.object({id:u.string()})),Et=h("onElementGroupChange",u.object({id:u.string()})),zt=t("createElement",xe),Pt=t("updateElement",Le),Ft=t("deleteElement",u.string()),Ce={methods:[ft,St,xt,Lt,Mt,bt,zt,Pt,Ft],listeners:[Ct,Gt,It,Tt,Et]};var kt=l("onPointerClick"),vt=l("onPointerMove"),Ge={methods:null,listeners:[kt,vt]};import{z as s}from"zod";import{z as n}from"zod";var wt=n.enum(["in","ni"]),Vt=n.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),Pr=n.enum(["and","or"]),Ie=n.union([n.number(),n.string(),n.boolean(),n.null()]),Te=n.string().or(n.null()),Ot=n.tuple([Te,wt,n.array(Ie).or(n.null())]),Ut=n.tuple([Te,Vt,Ie]),le=n.union([Ot,Ut]),pe=n.tuple([n.lazy(()=>n.union([pe,le,n.null(),n.boolean()])),n.enum(["and","or"]),n.lazy(()=>n.union([pe,le,n.null(),n.boolean()]))]),G=n.union([pe,le,n.null(),n.boolean()]);import{z as o}from"zod";var Ee=o.enum(["avg","max","min","sum","median"]),Rt=o.object({method:Ee,attribute:o.string()}),Nt=o.object({methods:o.array(o.union([Ee,o.literal("count")])),attribute:o.string().optional()}),W=o.union([b,T,A,o.array(L)]),ze=o.object({boundary:W.optional(),filters:G.optional(),aggregation:Rt.optional()}),Pe=o.object({layerId:o.string(),attribute:o.string(),limit:o.number().optional(),boundary:W.optional(),filters:G.optional(),values:ze.optional()}),Vr=o.object({key:o.union([o.number(),o.string(),o.boolean()]),value:o.number().nullable()}),jt=o.object({type:o.literal("equal-intervals"),count:o.number()}),At=o.object({type:o.literal("time-interval"),interval:o.enum(["hour","day","week","month","year"])}),Fe=o.object({layerId:o.string(),attribute:o.string(),steps:o.union([jt,At,o.array(o.number())]),boundary:W.optional(),filters:G.optional(),values:ze.optional()}),Or=o.object({min:o.number(),max:o.number(),value:o.number()}),ke=o.object({layerId:o.string(),boundary:W.optional(),filters:G.optional(),aggregation:Nt});import{z as a}from"zod";var jr=a.enum(["processing","completed","failed","incomplete"]),ve=a.object({ids:a.array(a.string()).optional()}),we=a.object({ids:a.array(a.string()).optional()}),z=a.object({id:a.string(),layerId:a.string()}),Ve=a.object({ids:z.array().optional(),layerIds:a.string().array().optional()}),Oe=a.object({layerIds:a.array(a.string()).optional(),areaQuery:a.union([a.object({coordinates:j}),a.object({boundary:b})]).optional()}),Ht=a.object({Point:a.object({}).passthrough().optional(),Line:a.object({}).passthrough().optional(),Polygon:a.object({}).passthrough().optional()}),me=a.object({name:a.string(),geometryStyles:Ht.optional()}),Bt=me.extend({file:a.instanceof(File)}),Dt=me.extend({url:a.string().url()}),Zt=me.extend({arrayBuffer:a.instanceof(ArrayBuffer)}),Ue=a.union([Zt,Bt,Dt]);var Jt=t("getLayer",s.string()),qt=t("getLayers",ve.optional()),Wt=t("setLayerVisibility",C),_t=h("onLayerChange",s.object({id:s.string()})),Qt=t("setLayerStyle",s.object({id:s.string(),style:s.object({}).passthrough()})),$t=t("setLayerLegendVisibility",C),Kt=t("createLayersFromGeoJson",Ue),Xt=t("deleteLayer",s.string()),Yt=t("getLayerGroup",s.string()),eo=t("getLayerGroups",we.optional()),to=t("setLayerGroupVisibility",C),oo=t("setLayerGroupLegendVisibility",C),ro=h("onLayerGroupChange",s.object({id:s.string()})),no=t("getLegendItem",z),ao=t("getLegendItems",Ve.optional()),io=h("onLegendItemChange",z),so=t("setLegendItemVisibility",s.object({show:z.array().optional(),hide:z.array().optional()})),lo=t("getLayerFilters",s.string()),po=t("setLayerFilters",s.object({layerId:s.string(),filters:G,note:s.string().optional()})),mo=h("onLayerFiltersChange",s.object({layerId:s.string()})),co=t("getRenderedFeatures",Oe.optional()),yo=t("getFeature",s.object({id:s.string().or(s.number()),layerId:s.string()})),go=t("getGeoJsonFeature",s.object({id:s.string().or(s.number()),layerId:s.string()})),uo=t("getCategoryData",Pe),ho=t("getHistogramData",Fe),fo=t("getAggregates",ke),So=t("getLayerSchema",s.string()),Re={methods:[Jt,qt,Wt,Qt,$t,Kt,Xt,Yt,eo,to,oo,no,ao,so,lo,po,co,yo,go,uo,ho,fo,So],listeners:[_t,ro,io,mo]};import{z as xo}from"zod";var Lo=t("getMapDetails",xo.undefined()),Ne={methods:[Lo],listeners:[]};import{z as _}from"zod";import{z as M}from"zod";var je=M.object({id:M.string().or(M.number()),layerId:M.string(),showPopup:M.boolean().optional(),fitViewport:M.boolean().or(M.object({maxZoom:M.number()})).optional()});var Mo=t("getSelection",_.undefined()),bo=l("onSelectionChange"),Co=t("selectFeature",je),Go=t("clearSelection",_.object({features:_.boolean().optional(),elements:_.boolean().optional()}).optional()),Ae={methods:[Mo,Co,Go],listeners:[bo]};import{z as Vo}from"zod";import{z as p}from"zod";var He=["pin","line","route","polygon","circle","marker","highlighter","text","note"],Be=p.enum([...He,"link"]),De=p.enum(He),Io=te.pick({color:!0,symbol:!0,frame:!0}).extend({afterCreation:p.enum(["enter name","add another","select"])}).required(),To=q.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),Eo=q.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),zo=oe.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),Po=re.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),Fo=ne.pick({color:!0,opacity:!0,size:!0}).required(),ko=ae.pick({color:!0,opacity:!0,renderHoles:!0}).extend({size:p.number().min(0).max(200)}).required(),vo=ie.pick({color:!0,align:!0,style:!0}).required(),wo=se.pick({color:!0,align:!0,style:!0}).required(),Ze=p.discriminatedUnion("tool",[Io.partial().extend({tool:p.literal("pin")}),To.partial().extend({tool:p.literal("line")}),Eo.partial().extend({tool:p.literal("route")}),zo.partial().extend({tool:p.literal("polygon")}),Po.partial().extend({tool:p.literal("circle")}),Fo.partial().extend({tool:p.literal("marker")}),ko.partial().extend({tool:p.literal("highlighter")}),vo.partial().extend({tool:p.literal("text")}),wo.partial().extend({tool:p.literal("note")})]);var Oo=t("setTool",Be.nullable()),Uo=t("getTool",Vo.undefined()),Ro=l("onToolChange"),No=t("setToolSettings",Ze),jo=t("getToolSettings",De),Ao=l("onToolSettingsChange"),Je={methods:[Oo,Uo,No,jo],listeners:[Ro,Ao]};import{z as ce}from"zod";import{z as c}from"zod";var qe=c.object({showLegend:c.boolean().optional(),cooperativeGestures:c.boolean().optional(),fullScreenButton:c.boolean().optional(),geolocation:c.boolean().optional(),zoomControls:c.boolean().optional(),scaleBar:c.boolean().optional()}),We=c.object({featureSelectPanel:c.boolean().optional(),featureHoverPanel:c.boolean().optional(),elementSelectPanel:c.boolean().optional(),linkClickOpen:c.boolean().optional(),imageLightboxOpen:c.boolean().optional()});var Ho=t("updateUiControls",qe),Bo=t("setOnMapInteractionsUi",We),Do=t("showLayerDataTable",ce.object({layerId:ce.string(),sorting:he.optional()}).optional()),Zo=t("hideLayerDataTable",ce.undefined()),_e={methods:[Ho,Bo,Do,Zo],listeners:null};import{z as Xe}from"zod";import{z as $}from"zod";var Q=$.object({center:j,zoom:ue}),Qe=$.object({center:Q.shape.center.optional(),zoom:Q.shape.zoom.optional()}),$e=$.object({minZoom:Q.shape.zoom.nullish(),maxZoom:Q.shape.zoom.nullish(),bounds:b.nullish()}).nullable(),Ke=$.object({bounds:b});var Jo=t("getViewport",Xe.undefined()),qo=t("setViewport",Qe),Wo=t("getViewportConstraints",Xe.undefined()),_o=t("setViewportConstraints",$e),Qo=t("fitViewportToBounds",Ke),$o=l("onViewportMove"),Ko=l("onViewportMoveEnd"),Xo=l("onMapIdle"),Ye={methods:[qo,Jo,Wo,_o,Qo],listeners:[$o,Ko,Xo]};var ye=[_e,Ye,Re,Ce,Ae,Ge,Je,Ne];function Rn(r,I,ge){let K=new Map;async function de(g){if(!rr.safeParse(g.data).success){ge?.onUnknownMessage?.(g.data);return}let U=ot.safeParse(g.data);if(!U.success){ge?.onInvalidMessage?.(g.data,U.error),g.ports[0]?.postMessage(et(U.error.message));return}let{data:m}=U;if(m.type==="felt.ready")g.ports[0]?.postMessage(!0);else if(m.type==="felt.addListener"){if(m.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let P="options"in m.event?{options:"options"in m.event?m.event.options:void 0,handler:Y=>{g.ports[0]?.postMessage(Y)}}:{handler:Y=>{g.ports[0]?.postMessage(Y)}},X=I.listeners[m.event.eventName](P);K.set(m.event.id,X)}else if(m.type==="felt.removeListener")K.get(m.id)?.(),K.delete(m.id);else try{let P=I.methods[m.type],X=await P(m.params);g.ports[0]?.postMessage(X)}catch(P){g.ports[0]?.postMessage(et(P))}}return r.addEventListener("message",de),()=>{r.removeEventListener("message",de)}}var tt={methods:ye.map(r=>r.methods??[]).flat(),listeners:ye.map(r=>r.listeners??[]).flat()},Yo=y.discriminatedUnion("eventName",[y.strictObject({eventName:y.literal("")}),...tt.listeners]),er=y.strictObject({type:y.literal("felt.addListener"),event:Yo}),tr=y.strictObject({type:y.literal("felt.removeListener"),id:y.string()}),or=y.strictObject({type:y.literal("felt.ready")}),ot=y.discriminatedUnion("type",[or,er,tr,...tt.methods]),rr=y.object({type:y.enum(ot.options.map(r=>r.shape.type.value))});function et(r){return{__error__:nr(r)}}function nr(r){return r instanceof Error?r.message:typeof r=="object"&&r!==null&&"message"in r?String(r.message):typeof r=="string"?r:"Unknown error"}export{Rn as createMessageHandler};
@@ -4637,7 +4637,6 @@ interface LayerSchemaDateTimeAttribute extends LayerSchemaCommonAttribute {
4637
4637
  }>;
4638
4638
  }
4639
4639
  declare const EphemeralLayerSourceSchema: z.ZodObject<{
4640
- type: z.ZodLiteral<"application/geo+json">;
4641
4640
  name: z.ZodString;
4642
4641
  geometryStyles: z.ZodOptional<z.ZodObject<{
4643
4642
  Point: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
@@ -4653,7 +4652,6 @@ declare const EphemeralLayerSourceSchema: z.ZodObject<{
4653
4652
  Line?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
4654
4653
  }>>;
4655
4654
  }, "strip", z.ZodTypeAny, {
4656
- type: "application/geo+json";
4657
4655
  name: string;
4658
4656
  geometryStyles?: {
4659
4657
  Point?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
@@ -4661,7 +4659,6 @@ declare const EphemeralLayerSourceSchema: z.ZodObject<{
4661
4659
  Line?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
4662
4660
  } | undefined;
4663
4661
  }, {
4664
- type: "application/geo+json";
4665
4662
  name: string;
4666
4663
  geometryStyles?: {
4667
4664
  Point?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
@@ -4670,9 +4667,41 @@ declare const EphemeralLayerSourceSchema: z.ZodObject<{
4670
4667
  } | undefined;
4671
4668
  }>;
4672
4669
  interface EphemeralLayerSource extends zInfer<typeof EphemeralLayerSourceSchema> {
4670
+ /**
4671
+ * The styles to apply to each geometry on the layer.
4672
+ *
4673
+ * Each style should be a valid FSL style, as described in {@link Layer.style}.
4674
+ *
4675
+ * These are optional, and if missing will use a default style determined by
4676
+ * Felt, which you can consider to be undefined behaviour.
4677
+ *
4678
+ * @example
4679
+ * ```typescript
4680
+ * const layer = await layersController.createLayersFromGeoJson({
4681
+ * name: "My Layer",
4682
+ * geometryStyles: {
4683
+ * Point: {
4684
+ * paint: { color: "red", size: 8 },
4685
+ * },
4686
+ * Line: {
4687
+ * paint: { color: "blue", size: 4 },
4688
+ * config: { labelAttribute: ["name"] },
4689
+ * label: { minZoom: 0 },
4690
+ * },
4691
+ * Polygon: {
4692
+ * paint: { color: "green", strokeColor: "darkgreen" },
4693
+ * },
4694
+ * },
4695
+ * });
4696
+ * ```
4697
+ */
4698
+ geometryStyles?: {
4699
+ Point?: Record<string, unknown>;
4700
+ Line?: Record<string, unknown>;
4701
+ Polygon?: Record<string, unknown>;
4702
+ };
4673
4703
  }
4674
4704
  declare const GeoJsonFileSourceSchema: z.ZodObject<z.objectUtil.extendShape<{
4675
- type: z.ZodLiteral<"application/geo+json">;
4676
4705
  name: z.ZodString;
4677
4706
  geometryStyles: z.ZodOptional<z.ZodObject<{
4678
4707
  Point: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
@@ -4690,7 +4719,6 @@ declare const GeoJsonFileSourceSchema: z.ZodObject<z.objectUtil.extendShape<{
4690
4719
  }, {
4691
4720
  file: z.ZodType<File, z.ZodTypeDef, File>;
4692
4721
  }>, "strip", z.ZodTypeAny, {
4693
- type: "application/geo+json";
4694
4722
  name: string;
4695
4723
  file: File;
4696
4724
  geometryStyles?: {
@@ -4699,7 +4727,6 @@ declare const GeoJsonFileSourceSchema: z.ZodObject<z.objectUtil.extendShape<{
4699
4727
  Line?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
4700
4728
  } | undefined;
4701
4729
  }, {
4702
- type: "application/geo+json";
4703
4730
  name: string;
4704
4731
  file: File;
4705
4732
  geometryStyles?: {
@@ -4708,10 +4735,9 @@ declare const GeoJsonFileSourceSchema: z.ZodObject<z.objectUtil.extendShape<{
4708
4735
  Line?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
4709
4736
  } | undefined;
4710
4737
  }>;
4711
- interface GeoJsonFileSource extends zInfer<typeof GeoJsonFileSourceSchema>, EphemeralLayerSource {
4738
+ interface GeoJsonFileSource extends Omit<zInfer<typeof GeoJsonFileSourceSchema>, "geometryStyles">, EphemeralLayerSource {
4712
4739
  }
4713
4740
  declare const GeoJsonUrlSourceSchema: z.ZodObject<z.objectUtil.extendShape<{
4714
- type: z.ZodLiteral<"application/geo+json">;
4715
4741
  name: z.ZodString;
4716
4742
  geometryStyles: z.ZodOptional<z.ZodObject<{
4717
4743
  Point: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
@@ -4729,7 +4755,6 @@ declare const GeoJsonUrlSourceSchema: z.ZodObject<z.objectUtil.extendShape<{
4729
4755
  }, {
4730
4756
  url: z.ZodString;
4731
4757
  }>, "strip", z.ZodTypeAny, {
4732
- type: "application/geo+json";
4733
4758
  name: string;
4734
4759
  url: string;
4735
4760
  geometryStyles?: {
@@ -4738,7 +4763,6 @@ declare const GeoJsonUrlSourceSchema: z.ZodObject<z.objectUtil.extendShape<{
4738
4763
  Line?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
4739
4764
  } | undefined;
4740
4765
  }, {
4741
- type: "application/geo+json";
4742
4766
  name: string;
4743
4767
  url: string;
4744
4768
  geometryStyles?: {
@@ -4747,10 +4771,9 @@ declare const GeoJsonUrlSourceSchema: z.ZodObject<z.objectUtil.extendShape<{
4747
4771
  Line?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
4748
4772
  } | undefined;
4749
4773
  }>;
4750
- interface GeoJsonUrlSource extends z.infer<typeof GeoJsonUrlSourceSchema>, EphemeralLayerSource {
4774
+ interface GeoJsonUrlSource extends Omit<zInfer<typeof GeoJsonUrlSourceSchema>, "geometryStyles">, EphemeralLayerSource {
4751
4775
  }
4752
4776
  declare const GeoJsonArrayBufferSourceSchema: z.ZodObject<z.objectUtil.extendShape<{
4753
- type: z.ZodLiteral<"application/geo+json">;
4754
4777
  name: z.ZodString;
4755
4778
  geometryStyles: z.ZodOptional<z.ZodObject<{
4756
4779
  Point: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
@@ -4768,7 +4791,6 @@ declare const GeoJsonArrayBufferSourceSchema: z.ZodObject<z.objectUtil.extendSha
4768
4791
  }, {
4769
4792
  arrayBuffer: z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>;
4770
4793
  }>, "strip", z.ZodTypeAny, {
4771
- type: "application/geo+json";
4772
4794
  name: string;
4773
4795
  arrayBuffer: ArrayBuffer;
4774
4796
  geometryStyles?: {
@@ -4777,7 +4799,6 @@ declare const GeoJsonArrayBufferSourceSchema: z.ZodObject<z.objectUtil.extendSha
4777
4799
  Line?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
4778
4800
  } | undefined;
4779
4801
  }, {
4780
- type: "application/geo+json";
4781
4802
  name: string;
4782
4803
  arrayBuffer: ArrayBuffer;
4783
4804
  geometryStyles?: {
@@ -4786,7 +4807,7 @@ declare const GeoJsonArrayBufferSourceSchema: z.ZodObject<z.objectUtil.extendSha
4786
4807
  Line?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
4787
4808
  } | undefined;
4788
4809
  }>;
4789
- interface GeoJsonArrayBufferSource extends zInfer<typeof GeoJsonArrayBufferSourceSchema>, EphemeralLayerSource {
4810
+ interface GeoJsonArrayBufferSource extends Omit<zInfer<typeof GeoJsonArrayBufferSourceSchema>, "geometryStyles">, EphemeralLayerSource {
4790
4811
  }
4791
4812
 
4792
4813
  /**
@@ -5035,6 +5056,16 @@ interface MultiAggregationConfig<T extends AggregationMethod | "count"> extends
5035
5056
  */
5036
5057
  attribute?: string;
5037
5058
  }
5059
+ /**
5060
+ * The common type for filtering data by a spatial boundary.
5061
+ *
5062
+ * This can be either:
5063
+ * - `FeltBoundary`: a [w, s, e, n] bounding box
5064
+ * - `PolygonGeometry`: a GeoJSON Polygon geometry
5065
+ * - `MultiPolygonGeometry`: a GeoJSON MultiPolygon geometry
5066
+ * - `LngLatTuple[]`: a list of coordinates describing a single ring of a polygon
5067
+ */
5068
+ type GeometryFilter = FeltBoundary | PolygonGeometry | MultiPolygonGeometry | LngLatTuple[];
5038
5069
  declare const ValueConfigurationSchema: z.ZodObject<{
5039
5070
  boundary: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
5040
5071
  type: z.ZodLiteral<"Polygon">;
@@ -5045,6 +5076,15 @@ declare const ValueConfigurationSchema: z.ZodObject<{
5045
5076
  }, {
5046
5077
  type: "Polygon";
5047
5078
  coordinates: [number, number][][];
5079
+ }>, z.ZodObject<{
5080
+ type: z.ZodLiteral<"MultiPolygon">;
5081
+ coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
5082
+ }, "strip", z.ZodTypeAny, {
5083
+ type: "MultiPolygon";
5084
+ coordinates: [number, number][][][];
5085
+ }, {
5086
+ type: "MultiPolygon";
5087
+ coordinates: [number, number][][][];
5048
5088
  }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
5049
5089
  filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
5050
5090
  aggregation: z.ZodOptional<z.ZodObject<{
@@ -5067,6 +5107,9 @@ declare const ValueConfigurationSchema: z.ZodObject<{
5067
5107
  boundary?: [number, number, number, number] | [number, number][] | {
5068
5108
  type: "Polygon";
5069
5109
  coordinates: [number, number][][];
5110
+ } | {
5111
+ type: "MultiPolygon";
5112
+ coordinates: [number, number][][][];
5070
5113
  } | undefined;
5071
5114
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5072
5115
  aggregation?: {
@@ -5077,6 +5120,9 @@ declare const ValueConfigurationSchema: z.ZodObject<{
5077
5120
  boundary?: [number, number, number, number] | [number, number][] | {
5078
5121
  type: "Polygon";
5079
5122
  coordinates: [number, number][][];
5123
+ } | {
5124
+ type: "MultiPolygon";
5125
+ coordinates: [number, number][][][];
5080
5126
  } | undefined;
5081
5127
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5082
5128
  aggregation?: {
@@ -5094,13 +5140,11 @@ declare const ValueConfigurationSchema: z.ZodObject<{
5094
5140
  */
5095
5141
  interface ValueConfiguration extends zInfer<typeof ValueConfigurationSchema> {
5096
5142
  /**
5097
- * A spatial boundary to filter what gets counted or aggregated, while still including
5098
- * all possible categories or bin ranges in the results.
5143
+ * The spatial boundary for what to count or aggregate.
5099
5144
  */
5100
- boundary?: PolygonGeometry | LngLatTuple[] | FeltBoundary;
5145
+ boundary?: GeometryFilter;
5101
5146
  /**
5102
- * Attribute filters to determine what gets counted or aggregated, while still including
5103
- * all possible categories or bin ranges in the results.
5147
+ * Attribute filters to determine what gets counted or aggregated.
5104
5148
  */
5105
5149
  filters?: Filters;
5106
5150
  /**
@@ -5135,6 +5179,15 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
5135
5179
  }, {
5136
5180
  type: "Polygon";
5137
5181
  coordinates: [number, number][][];
5182
+ }>, z.ZodObject<{
5183
+ type: z.ZodLiteral<"MultiPolygon">;
5184
+ coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
5185
+ }, "strip", z.ZodTypeAny, {
5186
+ type: "MultiPolygon";
5187
+ coordinates: [number, number][][][];
5188
+ }, {
5189
+ type: "MultiPolygon";
5190
+ coordinates: [number, number][][][];
5138
5191
  }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
5139
5192
  filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
5140
5193
  values: z.ZodOptional<z.ZodObject<{
@@ -5147,6 +5200,15 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
5147
5200
  }, {
5148
5201
  type: "Polygon";
5149
5202
  coordinates: [number, number][][];
5203
+ }>, z.ZodObject<{
5204
+ type: z.ZodLiteral<"MultiPolygon">;
5205
+ coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
5206
+ }, "strip", z.ZodTypeAny, {
5207
+ type: "MultiPolygon";
5208
+ coordinates: [number, number][][][];
5209
+ }, {
5210
+ type: "MultiPolygon";
5211
+ coordinates: [number, number][][][];
5150
5212
  }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
5151
5213
  filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
5152
5214
  aggregation: z.ZodOptional<z.ZodObject<{
@@ -5169,6 +5231,9 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
5169
5231
  boundary?: [number, number, number, number] | [number, number][] | {
5170
5232
  type: "Polygon";
5171
5233
  coordinates: [number, number][][];
5234
+ } | {
5235
+ type: "MultiPolygon";
5236
+ coordinates: [number, number][][][];
5172
5237
  } | undefined;
5173
5238
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5174
5239
  aggregation?: {
@@ -5179,6 +5244,9 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
5179
5244
  boundary?: [number, number, number, number] | [number, number][] | {
5180
5245
  type: "Polygon";
5181
5246
  coordinates: [number, number][][];
5247
+ } | {
5248
+ type: "MultiPolygon";
5249
+ coordinates: [number, number][][][];
5182
5250
  } | undefined;
5183
5251
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5184
5252
  aggregation?: {
@@ -5193,6 +5261,9 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
5193
5261
  boundary?: [number, number, number, number] | [number, number][] | {
5194
5262
  type: "Polygon";
5195
5263
  coordinates: [number, number][][];
5264
+ } | {
5265
+ type: "MultiPolygon";
5266
+ coordinates: [number, number][][][];
5196
5267
  } | undefined;
5197
5268
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5198
5269
  aggregation?: {
@@ -5203,6 +5274,9 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
5203
5274
  boundary?: [number, number, number, number] | [number, number][] | {
5204
5275
  type: "Polygon";
5205
5276
  coordinates: [number, number][][];
5277
+ } | {
5278
+ type: "MultiPolygon";
5279
+ coordinates: [number, number][][][];
5206
5280
  } | undefined;
5207
5281
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5208
5282
  limit?: number | undefined;
@@ -5213,6 +5287,9 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
5213
5287
  boundary?: [number, number, number, number] | [number, number][] | {
5214
5288
  type: "Polygon";
5215
5289
  coordinates: [number, number][][];
5290
+ } | {
5291
+ type: "MultiPolygon";
5292
+ coordinates: [number, number][][][];
5216
5293
  } | undefined;
5217
5294
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5218
5295
  aggregation?: {
@@ -5223,6 +5300,9 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
5223
5300
  boundary?: [number, number, number, number] | [number, number][] | {
5224
5301
  type: "Polygon";
5225
5302
  coordinates: [number, number][][];
5303
+ } | {
5304
+ type: "MultiPolygon";
5305
+ coordinates: [number, number][][][];
5226
5306
  } | undefined;
5227
5307
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5228
5308
  limit?: number | undefined;
@@ -5233,15 +5313,13 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
5233
5313
  */
5234
5314
  interface GetLayerCategoriesParams extends zInfer<typeof GetLayerCategoriesParamsSchema> {
5235
5315
  /**
5236
- * Attribute filters to determine what gets counted or aggregated.
5316
+ * Attribute filters for the features to include when calculating the categories.
5237
5317
  */
5238
5318
  filters?: Filters;
5239
5319
  /**
5240
- * A spatial boundary to filter what gets counted or aggregated. This can be either
5241
- * a [w, s, e, n] bounding box, a GeoJSON Polygon geometry, or a list of coordinates
5242
- * that form a polyline.
5320
+ * The spatial boundary for the features to include when calculating the categories.
5243
5321
  */
5244
- boundary?: PolygonGeometry | LngLatTuple[] | FeltBoundary;
5322
+ boundary?: GeometryFilter;
5245
5323
  /**
5246
5324
  * Configuration for filtering and aggregating values while preserving the full set of
5247
5325
  * categories in the results.
@@ -5313,6 +5391,15 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
5313
5391
  }, {
5314
5392
  type: "Polygon";
5315
5393
  coordinates: [number, number][][];
5394
+ }>, z.ZodObject<{
5395
+ type: z.ZodLiteral<"MultiPolygon">;
5396
+ coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
5397
+ }, "strip", z.ZodTypeAny, {
5398
+ type: "MultiPolygon";
5399
+ coordinates: [number, number][][][];
5400
+ }, {
5401
+ type: "MultiPolygon";
5402
+ coordinates: [number, number][][][];
5316
5403
  }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
5317
5404
  filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
5318
5405
  /**
@@ -5338,6 +5425,15 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
5338
5425
  }, {
5339
5426
  type: "Polygon";
5340
5427
  coordinates: [number, number][][];
5428
+ }>, z.ZodObject<{
5429
+ type: z.ZodLiteral<"MultiPolygon">;
5430
+ coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
5431
+ }, "strip", z.ZodTypeAny, {
5432
+ type: "MultiPolygon";
5433
+ coordinates: [number, number][][][];
5434
+ }, {
5435
+ type: "MultiPolygon";
5436
+ coordinates: [number, number][][][];
5341
5437
  }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
5342
5438
  filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
5343
5439
  aggregation: z.ZodOptional<z.ZodObject<{
@@ -5360,6 +5456,9 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
5360
5456
  boundary?: [number, number, number, number] | [number, number][] | {
5361
5457
  type: "Polygon";
5362
5458
  coordinates: [number, number][][];
5459
+ } | {
5460
+ type: "MultiPolygon";
5461
+ coordinates: [number, number][][][];
5363
5462
  } | undefined;
5364
5463
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5365
5464
  aggregation?: {
@@ -5370,6 +5469,9 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
5370
5469
  boundary?: [number, number, number, number] | [number, number][] | {
5371
5470
  type: "Polygon";
5372
5471
  coordinates: [number, number][][];
5472
+ } | {
5473
+ type: "MultiPolygon";
5474
+ coordinates: [number, number][][][];
5373
5475
  } | undefined;
5374
5476
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5375
5477
  aggregation?: {
@@ -5391,6 +5493,9 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
5391
5493
  boundary?: [number, number, number, number] | [number, number][] | {
5392
5494
  type: "Polygon";
5393
5495
  coordinates: [number, number][][];
5496
+ } | {
5497
+ type: "MultiPolygon";
5498
+ coordinates: [number, number][][][];
5394
5499
  } | undefined;
5395
5500
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5396
5501
  aggregation?: {
@@ -5401,6 +5506,9 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
5401
5506
  boundary?: [number, number, number, number] | [number, number][] | {
5402
5507
  type: "Polygon";
5403
5508
  coordinates: [number, number][][];
5509
+ } | {
5510
+ type: "MultiPolygon";
5511
+ coordinates: [number, number][][][];
5404
5512
  } | undefined;
5405
5513
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5406
5514
  }, {
@@ -5417,6 +5525,9 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
5417
5525
  boundary?: [number, number, number, number] | [number, number][] | {
5418
5526
  type: "Polygon";
5419
5527
  coordinates: [number, number][][];
5528
+ } | {
5529
+ type: "MultiPolygon";
5530
+ coordinates: [number, number][][][];
5420
5531
  } | undefined;
5421
5532
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5422
5533
  aggregation?: {
@@ -5427,6 +5538,9 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
5427
5538
  boundary?: [number, number, number, number] | [number, number][] | {
5428
5539
  type: "Polygon";
5429
5540
  coordinates: [number, number][][];
5541
+ } | {
5542
+ type: "MultiPolygon";
5543
+ coordinates: [number, number][][][];
5430
5544
  } | undefined;
5431
5545
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5432
5546
  }>;
@@ -5436,15 +5550,13 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
5436
5550
  */
5437
5551
  interface GetLayerHistogramParams extends zInfer<typeof GetLayerHistogramParamsSchema> {
5438
5552
  /**
5439
- * Attribute filters to determine what gets counted or aggregated.
5553
+ * Attribute filters for the features to include when calculating the histogram bins.
5440
5554
  */
5441
5555
  filters?: Filters;
5442
5556
  /**
5443
- * A spatial boundary to filter what gets counted or aggregated. This can be either
5444
- * a [w, s, e, n] bounding box, a GeoJSON Polygon geometry, or a list of coordinates
5445
- * that form a polyline.
5557
+ * The spatial boundary for the features to include when calculating the histogram bins.
5446
5558
  */
5447
- boundary?: PolygonGeometry | LngLatTuple[] | FeltBoundary;
5559
+ boundary?: GeometryFilter;
5448
5560
  }
5449
5561
  declare const GetLayerHistogramBinSchema: z.ZodObject<{
5450
5562
  /**
@@ -5487,6 +5599,15 @@ declare const GetLayerCalculationParamsSchema: z.ZodObject<{
5487
5599
  }, {
5488
5600
  type: "Polygon";
5489
5601
  coordinates: [number, number][][];
5602
+ }>, z.ZodObject<{
5603
+ type: z.ZodLiteral<"MultiPolygon">;
5604
+ coordinates: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, [number, number][], [number, number][]>, "many">, "many">;
5605
+ }, "strip", z.ZodTypeAny, {
5606
+ type: "MultiPolygon";
5607
+ coordinates: [number, number][][][];
5608
+ }, {
5609
+ type: "MultiPolygon";
5610
+ coordinates: [number, number][][][];
5490
5611
  }>, z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">]>>;
5491
5612
  filters: z.ZodOptional<z.ZodUnion<[z.ZodType<FilterTernary, z.ZodTypeDef, FilterTernary>, z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>, z.ZodNull, z.ZodBoolean]>>;
5492
5613
  aggregation: z.ZodObject<{
@@ -5514,6 +5635,9 @@ declare const GetLayerCalculationParamsSchema: z.ZodObject<{
5514
5635
  boundary?: [number, number, number, number] | [number, number][] | {
5515
5636
  type: "Polygon";
5516
5637
  coordinates: [number, number][][];
5638
+ } | {
5639
+ type: "MultiPolygon";
5640
+ coordinates: [number, number][][][];
5517
5641
  } | undefined;
5518
5642
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5519
5643
  }, {
@@ -5525,6 +5649,9 @@ declare const GetLayerCalculationParamsSchema: z.ZodObject<{
5525
5649
  boundary?: [number, number, number, number] | [number, number][] | {
5526
5650
  type: "Polygon";
5527
5651
  coordinates: [number, number][][];
5652
+ } | {
5653
+ type: "MultiPolygon";
5654
+ coordinates: [number, number][][][];
5528
5655
  } | undefined;
5529
5656
  filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
5530
5657
  }>;
@@ -5534,15 +5661,13 @@ declare const GetLayerCalculationParamsSchema: z.ZodObject<{
5534
5661
  */
5535
5662
  interface GetLayerCalculationParams<T extends AggregationMethod | "count"> extends z.infer<typeof GetLayerCalculationParamsSchema> {
5536
5663
  /**
5537
- * Attribute filters to determine what gets counted or aggregated.
5664
+ * Attribute filters for the features to include when calculating the aggregate value.
5538
5665
  */
5539
5666
  filters?: Filters;
5540
5667
  /**
5541
- * A spatial boundary to filter what gets counted or aggregated. This can be either
5542
- * a [w, s, e, n] bounding box, a GeoJSON Polygon geometry, or a list of coordinates
5543
- * that form a polyline.
5668
+ * The spatial boundary for the features to include when calculating the aggregate value.
5544
5669
  */
5545
- boundary?: PolygonGeometry | LngLatTuple[] | FeltBoundary;
5670
+ boundary?: GeometryFilter;
5546
5671
  /**
5547
5672
  * Specifies how to aggregate values within each category or bin. When omitted,
5548
5673
  * features are counted. When specified, the chosen calculation (avg, sum, etc.)
@@ -6102,4 +6227,4 @@ declare const ViewportFitBoundsParamsSchema: z.ZodObject<{
6102
6227
  bounds: [number, number, number, number];
6103
6228
  }>;
6104
6229
 
6105
- export type { CircleElementUpdate as $, GetLayerHistogramBin as A, AggregationMethod as B, GetLayerCalculationParams as C, LayerSchema as D, Element as E, Filters as F, GeoJsonGeometry as G, MapDetails as H, EntityNode as I, FeatureSelection as J, InputToolSettings as K, Layer as L, MapInteractionEvent as M, ConfigurableToolType as N, ToolSettingsMap as O, ToolSettingsChangeEvent as P, zInfer as Q, SortConfig as R, SetVisibilityRequest as S, ToolType as T, SetViewportCenterZoomParams as U, ViewportState as V, ViewportConstraints as W, ViewportFitBoundsParams as X, ViewportCenterZoom as Y, CircleElementCreate as Z, CircleElementRead as _, GetElementsConstraint as a, PinToolSettings as a$, HighlighterElementCreate as a0, HighlighterElementRead as a1, HighlighterElementUpdate as a2, ImageElementCreate as a3, ImageElementRead as a4, ImageElementUpdate as a5, LinkElementRead as a6, MarkerElementCreate as a7, MarkerElementRead as a8, MarkerElementUpdate as a9, FilterLogicGate as aA, FilterTernary as aB, AggregationConfig as aC, MultiAggregationConfig as aD, ValueConfiguration as aE, ElementGroupNode as aF, ElementNode as aG, FeatureNode as aH, LayerGroupNode as aI, LayerNode as aJ, FeltBoundary as aK, FeltZoom as aL, GeoJsonProperties as aM, LatLng as aN, LineStringGeometry as aO, LngLatTuple as aP, MultiLineStringGeometry as aQ, MultiPointGeometry as aR, MultiPolygonGeometry as aS, PointGeometry as aT, PolygonGeometry as aU, SortDirection as aV, CircleToolSettings as aW, HighlighterToolSettings as aX, LineToolSettings as aY, MarkerToolSettings as aZ, NoteToolSettings as a_, NoteElementCreate as aa, NoteElementRead as ab, NoteElementUpdate as ac, PathElementCreate as ad, PathElementRead as ae, PathElementUpdate as af, PlaceElementCreate as ag, PlaceElementRead as ah, PlaceElementUpdate as ai, PolygonElementCreate as aj, PolygonElementRead as ak, PolygonElementUpdate as al, TextElementCreate as am, TextElementRead as an, TextElementUpdate as ao, EphemeralLayerSource as ap, LayerProcessingStatus as aq, RasterValue as ar, LayerSchemaAttribute as as, LayerSchemaBooleanAttribute as at, LayerSchemaCommonAttribute as au, LayerSchemaDateAttribute as av, LayerSchemaDateTimeAttribute as aw, LayerSchemaNumericAttribute as ax, LayerSchemaTextAttribute as ay, FilterExpression as az, ElementGroup as b, PlaceFrame as b0, PlaceSymbol as b1, PolygonToolSettings as b2, RouteToolSettings as b3, TextToolSettings as b4, UnionToIntersection as b5, PromiseOrNot as b6, GetElementGroupsConstraint as c, ElementChangeCallbackParams as d, ElementGroupChangeCallbackParams as e, ElementCreate as f, ElementUpdate as g, GetLayersConstraint as h, LayerChangeCallbackParams as i, GeoJsonArrayBufferSource as j, GeoJsonFileSource as k, GeoJsonUrlSource as l, LayerGroup as m, GetLayerGroupsConstraint as n, LayerGroupChangeCallbackParams as o, LegendItemIdentifier as p, LegendItem as q, LegendItemsConstraint as r, LegendItemChangeCallbackParams as s, LayerFilters as t, GetRenderedFeaturesConstraint as u, LayerFeature as v, GeoJsonFeature as w, GetLayerCategoriesParams as x, GetLayerCategoriesGroup as y, GetLayerHistogramParams as z };
6230
+ export type { CircleElementUpdate as $, GetLayerHistogramBin as A, AggregationMethod as B, GetLayerCalculationParams as C, LayerSchema as D, Element as E, Filters as F, GeoJsonGeometry as G, MapDetails as H, EntityNode as I, FeatureSelection as J, InputToolSettings as K, Layer as L, MapInteractionEvent as M, ConfigurableToolType as N, ToolSettingsMap as O, ToolSettingsChangeEvent as P, zInfer as Q, SortConfig as R, SetVisibilityRequest as S, ToolType as T, SetViewportCenterZoomParams as U, ViewportState as V, ViewportConstraints as W, ViewportFitBoundsParams as X, ViewportCenterZoom as Y, CircleElementCreate as Z, CircleElementRead as _, GetElementsConstraint as a, NoteToolSettings as a$, HighlighterElementCreate as a0, HighlighterElementRead as a1, HighlighterElementUpdate as a2, ImageElementCreate as a3, ImageElementRead as a4, ImageElementUpdate as a5, LinkElementRead as a6, MarkerElementCreate as a7, MarkerElementRead as a8, MarkerElementUpdate as a9, FilterLogicGate as aA, FilterTernary as aB, AggregationConfig as aC, GeometryFilter as aD, MultiAggregationConfig as aE, ValueConfiguration as aF, ElementGroupNode as aG, ElementNode as aH, FeatureNode as aI, LayerGroupNode as aJ, LayerNode as aK, FeltBoundary as aL, FeltZoom as aM, GeoJsonProperties as aN, LatLng as aO, LineStringGeometry as aP, LngLatTuple as aQ, MultiLineStringGeometry as aR, MultiPointGeometry as aS, MultiPolygonGeometry as aT, PointGeometry as aU, PolygonGeometry as aV, SortDirection as aW, CircleToolSettings as aX, HighlighterToolSettings as aY, LineToolSettings as aZ, MarkerToolSettings as a_, NoteElementCreate as aa, NoteElementRead as ab, NoteElementUpdate as ac, PathElementCreate as ad, PathElementRead as ae, PathElementUpdate as af, PlaceElementCreate as ag, PlaceElementRead as ah, PlaceElementUpdate as ai, PolygonElementCreate as aj, PolygonElementRead as ak, PolygonElementUpdate as al, TextElementCreate as am, TextElementRead as an, TextElementUpdate as ao, EphemeralLayerSource as ap, LayerProcessingStatus as aq, RasterValue as ar, LayerSchemaAttribute as as, LayerSchemaBooleanAttribute as at, LayerSchemaCommonAttribute as au, LayerSchemaDateAttribute as av, LayerSchemaDateTimeAttribute as aw, LayerSchemaNumericAttribute as ax, LayerSchemaTextAttribute as ay, FilterExpression as az, ElementGroup as b, PinToolSettings as b0, PlaceFrame as b1, PlaceSymbol as b2, PolygonToolSettings as b3, RouteToolSettings as b4, TextToolSettings as b5, UnionToIntersection as b6, PromiseOrNot as b7, GetElementGroupsConstraint as c, ElementChangeCallbackParams as d, ElementGroupChangeCallbackParams as e, ElementCreate as f, ElementUpdate as g, GetLayersConstraint as h, LayerChangeCallbackParams as i, GeoJsonArrayBufferSource as j, GeoJsonFileSource as k, GeoJsonUrlSource as l, LayerGroup as m, GetLayerGroupsConstraint as n, LayerGroupChangeCallbackParams as o, LegendItemIdentifier as p, LegendItem as q, LegendItemsConstraint as r, LegendItemChangeCallbackParams as s, LayerFilters as t, GetRenderedFeaturesConstraint as u, LayerFeature as v, GeoJsonFeature as w, GetLayerCategoriesParams as x, GetLayerCategoriesGroup as y, GetLayerHistogramParams as z };