@feltmaps/js-sdk 1.5.0-next.3 → 1.5.0-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.cjs +1 -1
- package/dist/client.d.cts +74 -10
- package/dist/client.d.ts +74 -10
- package/dist/client.js +1 -1
- package/dist/handler.cjs +1 -1
- package/dist/handler.d.cts +120 -61
- package/dist/handler.d.ts +120 -61
- package/dist/handler.js +1 -1
- package/dist/{types-C1KBpQWi.d.cts → types-BKxKmuZn.d.cts} +67 -36
- package/dist/{types-C1KBpQWi.d.ts → types-BKxKmuZn.d.ts} +67 -36
- package/handler.d.ts +120 -61
- package/handler.js +1 -1
- package/package.json +1 -1
- package/{types-C1KBpQWi.d.ts → types-BKxKmuZn.d.ts} +67 -36
package/dist/handler.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as m}from"zod";import{z as x}from"zod";import{z as f}from"zod";function t(r,C){return f.strictObject({type:f.literal(r),params:C})}function b(r,C){return f.strictObject({eventName:f.literal(r),id:f.string(),options:C})}function c(r){return f.strictObject({eventName:f.literal(r),id:f.string()})}import{z as n}from"zod";var z=n.number(),P=n.number(),k=n.object({latitude:P,longitude:z}),T=n.tuple([z,P]),le=n.object({type:n.literal("Point"),coordinates:T}),He=n.object({type:n.literal("LineString"),coordinates:n.array(T)}),S=n.object({type:n.literal("MultiLineString"),coordinates:n.array(He.shape.coordinates)}),pe=n.number().min(1).max(23),G=n.tuple([z,P,z,P]),L=n.object({show:n.array(n.string()).optional(),hide:n.array(n.string()).optional()});import{z as e}from"zod";var d=e.object({id:e.string(),groupId:e.string().nullable(),color:e.string(),name:e.union([e.string(),e.null()]),description:e.union([e.string(),e.null()]),attributes:e.record(e.string(),e.unknown())}),F=e.object({imageUrl:e.string().nullable()}),j=e.object({strokeOpacity:e.number(),strokeWidth:e.number(),strokeStyle:e.enum(["solid","dashed","dotted"])}),Ae=e.enum(["meter","kilometer","foot","mile"]),q=d.extend(F.shape).extend({type:e.literal("Place"),coordinates:le.shape.coordinates,symbol:e.string(),frame:e.enum(["frame-circle","frame-square"]).nullable(),hideLabel:e.boolean()}),Z=d.extend(F.shape).extend(j.shape).extend({type:e.literal("Path"),coordinates:S.shape.coordinates,distanceMarker:e.boolean(),endCaps:e.boolean(),routingMode:e.enum(["driving","cycling","walking","flying"]).nullable()}),B=d.extend(F.shape).extend(j.shape).extend({type:e.literal("Polygon"),coordinates:S.shape.coordinates,fillOpacity:e.number().min(0).max(1),areaMarker:e.boolean()}),H=d.extend(F.shape).extend(j.shape).extend({type:e.literal("Circle"),coordinates:T,radius:e.number(),radiusDisplayAngle:e.number(),radiusDisplayUnit:Ae.nullable(),fillOpacity:e.number().min(0).max(1),radiusMarker:e.boolean()}),A=d.extend({type:e.literal("Marker"),coordinates:S.shape.coordinates,opacity:e.number().min(0).max(1),size:e.number().min(0).max(100)}),W=d.extend({type:e.literal("Highlighter"),coordinates:S.shape.coordinates,opacity:e.number().min(0).max(1)}),me=e.object({position:T,rotation:e.number(),scale:e.number(),coordinates:S.shape.coordinates}),ce=e.object({text:e.string(),align:e.enum(["left","center","right"]),style:e.enum(["italic","light","regular","caps"]),name:e.string()}),D=d.extend(me.shape).extend(ce.shape).extend({type:e.literal("Text")}),K=d.extend(me.shape).extend(ce.shape).extend({type:e.literal("Note"),widthMultiplier:e.number().min(0)}),_=d.extend({type:e.literal("Image"),coordinates:S.shape.coordinates,imageUrl:e.string(),opacity:e.number().min(0).max(1)}),We=d.extend({type:e.literal("Link"),coordinates:S.shape.coordinates,url:e.string()}),g={type:!0,coordinates:!0},u={id:!0},Q=q.partial().required(g).omit(u),w=Z.partial().required(g).omit(u),$=B.partial().required(g).omit(u),J=H.partial().required(g).required({radius:!0}).omit(u),X=A.partial().required(g).omit(u),Y=W.partial().required(g).omit(u),ee=D.partial().required(g).required({text:!0}).omit(u).omit({coordinates:!0,name:!0}),te=K.partial().required(g).required({text:!0}).omit(u).omit({coordinates:!0,name:!0}),De=_.partial().required(g).required({imageUrl:!0}).omit(u),de=e.discriminatedUnion("type",[Q,w,$,J,X,Y,De,ee,te]),Go=q.omit({coordinates:!0}),zo=Z.omit({coordinates:!0}),Po=B.omit({coordinates:!0}),ko=H.omit({coordinates:!0}),Fo=A.omit({coordinates:!0}),wo=W.omit({coordinates:!0}),vo=D.omit({coordinates:!0}),Vo=K.omit({coordinates:!0}),Uo=_.omit({coordinates:!0}),Ro=We.omit({coordinates:!0}),h={type:!0,id:!0},Ke=q.partial().required(h),_e=Z.partial().required(h),Qe=B.partial().required(h),$e=H.partial().required(h),Je=A.partial().required(h),Xe=W.partial().required(h),Ye=D.partial().required(h),et=K.partial().required(h),tt=_.partial().required(h),ye=e.discriminatedUnion("type",[Ke,_e,Qe,$e,Je,Xe,Ye,et,tt]),ge=e.object({ids:e.array(e.string()).optional()}),ue=e.object({ids:e.array(e.string()).optional()});var ot=t("getElement",x.string()),rt=t("getElementGeometry",x.string()),nt=t("getElements",ge.optional()),at=t("getElementGroup",x.string()),it=t("getElementGroups",ue.optional()),st=t("setElementGroupVisibility",L),lt=b("onElementChange",x.object({id:x.string()})),pt=b("onElementGroupChange",x.object({id:x.string()})),mt=t("createElement",de),ct=t("updateElement",ye),dt=t("deleteElement",x.string()),he={methods:[ot,rt,nt,at,it,st,mt,ct,dt],listeners:[lt,pt]};var yt=c("onPointerClick"),gt=c("onPointerMove"),fe={methods:null,listeners:[yt,gt]};import{z as i}from"zod";import{z as o}from"zod";var ut=o.enum(["in","ni"]),ht=o.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),Do=o.enum(["and","or"]),Se=o.union([o.number(),o.string(),o.boolean(),o.null()]),xe=o.string().or(o.null()),ft=o.tuple([xe,ut,o.array(Se).or(o.null())]),St=o.tuple([xe,ht,Se]),oe=o.union([ft,St]),re=o.tuple([o.lazy(()=>o.union([re,oe,o.null(),o.boolean()])),o.enum(["and","or"]),o.lazy(()=>o.union([re,oe,o.null(),o.boolean()]))]),Me=o.union([re,oe,o.null(),o.boolean()]);import{z as a}from"zod";var $o=a.enum(["processing","completed","failed","incomplete"]),be=a.object({ids:a.array(a.string()).optional()}),Le=a.object({ids:a.array(a.string()).optional()}),I=a.object({id:a.string(),layerId:a.string()}),Ce=a.object({ids:I.array().optional(),layerIds:a.string().array().optional()}),Ie=a.object({layerIds:a.array(a.string()).optional(),areaQuery:a.union([a.object({coordinates:k}),a.object({boundary:G})]).optional()});var xt=t("getLayer",i.string()),Mt=t("getLayers",be.optional()),bt=t("setLayerVisibility",L),Lt=b("onLayerChange",i.object({id:i.string()})),Ct=t("setLayerStyle",i.object({id:i.string(),style:i.object({}).passthrough()})),It=t("setLayerLegendVisibility",L),Et=t("getLayerGroup",i.string()),Tt=t("getLayerGroups",Le.optional()),Gt=t("setLayerGroupVisibility",L),zt=t("setLayerGroupLegendVisibility",L),Pt=b("onLayerGroupChange",i.object({id:i.string()})),kt=t("getLegendItem",I),Ft=t("getLegendItems",Ce.optional()),wt=b("onLegendItemChange",I),vt=t("setLegendItemVisibility",i.object({show:I.array().optional(),hide:I.array().optional()})),Vt=t("getLayerFilters",i.string()),Ut=t("setLayerFilters",i.object({layerId:i.string(),filters:Me,note:i.string().optional()})),Rt=t("getRenderedFeatures",Ie.optional()),Ee={methods:[xt,Mt,bt,Ct,It,Et,Tt,Gt,zt,kt,Ft,vt,Vt,Ut,Rt],listeners:[Lt,Pt,wt]};import{z as v}from"zod";import{z as M}from"zod";var Te=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 Ot=t("getSelection",v.undefined()),Nt=c("onSelectionChange"),jt=t("selectFeature",Te),qt=t("clearSelection",v.object({features:v.boolean().optional(),elements:v.boolean().optional()}).optional()),Ge={methods:[Ot,jt,qt],listeners:[Nt]};import{z as $t}from"zod";import{z as l}from"zod";var ze=["pin","line","route","polygon","circle","marker","highlighter","text","note"],Pe=l.enum([...ze,"link"]),ke=l.enum(ze),Zt=Q.pick({color:!0,symbol:!0,frame:!0}).required(),Bt=w.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),Ht=w.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),At=$.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),Wt=J.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),Dt=X.pick({color:!0,opacity:!0,size:!0}).required(),Kt=Y.pick({color:!0,opacity:!0}).extend({size:l.number().min(0).max(200)}).required(),_t=ee.pick({color:!0,align:!0,style:!0}).required(),Qt=te.pick({color:!0,align:!0,style:!0}).required(),Fe=l.discriminatedUnion("tool",[Zt.partial().extend({tool:l.literal("pin")}),Bt.partial().extend({tool:l.literal("line")}),Ht.partial().extend({tool:l.literal("route")}),At.partial().extend({tool:l.literal("polygon")}),Wt.partial().extend({tool:l.literal("circle")}),Dt.partial().extend({tool:l.literal("marker")}),Kt.partial().extend({tool:l.literal("highlighter")}),_t.partial().extend({tool:l.literal("text")}),Qt.partial().extend({tool:l.literal("note")})]);var Jt=t("setTool",Pe.nullable()),Xt=t("getTool",$t.undefined()),Yt=c("onToolChange"),eo=t("setToolSettings",Fe),to=t("getToolSettings",ke),oo=c("onToolSettingsChange"),we={methods:[Jt,Xt,eo,to],listeners:[Yt,oo]};import{z as p}from"zod";var ve=p.object({showLegend:p.boolean().optional(),cooperativeGestures:p.boolean().optional(),fullScreenButton:p.boolean().optional(),geolocation:p.boolean().optional(),zoomControls:p.boolean().optional(),scaleBar:p.boolean().optional()}),Ve=p.object({featureSelectPanel:p.boolean().optional(),featureHoverPanel:p.boolean().optional(),elementSelectPanel:p.boolean().optional(),linkClickOpen:p.boolean().optional(),imageLightboxOpen:p.boolean().optional()});var ro=t("updateUiControls",ve),no=t("setOnMapInteractionsUi",Ve),Ue={methods:[ro,no],listeners:null};import{z as je}from"zod";import{z as U}from"zod";var V=U.object({center:k,zoom:pe}),Re=U.object({center:V.shape.center.optional(),zoom:V.shape.zoom.optional()}),Oe=U.object({minZoom:V.shape.zoom.nullish(),maxZoom:V.shape.zoom.nullish(),bounds:G.nullish()}).nullable(),Ne=U.object({bounds:G});var ao=t("getViewport",je.undefined()),io=t("setViewport",Re),so=t("getViewportConstraints",je.undefined()),lo=t("setViewportConstraints",Oe),po=t("fitViewportToBounds",Ne),mo=c("onViewportMove"),co=c("onViewportMoveEnd"),yo=c("onMapIdle"),qe={methods:[io,ao,so,lo,po],listeners:[mo,co,yo]};var ne=[Ue,qe,Ee,he,Ge,fe,we];function jr(r,C,ae){let R=new Map;async function ie(y){if(!xo.safeParse(y.data).success){ae?.onUnknownMessage?.(y.data);return}let se=Be.safeParse(y.data);if(!se.success){ae?.onInvalidMessage?.(y.data);return}let{data:s}=se;if(s.type==="felt.ready")y.ports[0]?.postMessage(!0);else if(s.type==="felt.addListener"){if(s.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let E="options"in s.event?{options:"options"in s.event?s.event.options:void 0,handler:N=>{y.ports[0]?.postMessage(N)}}:{handler:N=>{y.ports[0]?.postMessage(N)}},O=C.listeners[s.event.eventName](E);R.set(s.event.id,O)}else if(s.type==="felt.removeListener")R.get(s.id)?.(),R.delete(s.id);else try{let E=C.methods[s.type],O=await E(s.params);y.ports[0]?.postMessage(O)}catch(E){y.ports[0]?.postMessage({__error__:go(E)})}}return r.addEventListener("message",ie),()=>{r.removeEventListener("message",ie)}}function go(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 Ze={methods:ne.map(r=>r.methods??[]).flat(),listeners:ne.map(r=>r.listeners??[]).flat()},uo=m.discriminatedUnion("eventName",[m.strictObject({eventName:m.literal("")}),...Ze.listeners]),ho=m.strictObject({type:m.literal("felt.addListener"),event:uo}),fo=m.strictObject({type:m.literal("felt.removeListener"),id:m.string()}),So=m.strictObject({type:m.literal("felt.ready")}),Be=m.discriminatedUnion("type",[So,ho,fo,...Ze.methods]),xo=m.object({type:m.enum(Be.options.map(r=>r.shape.type.value))});export{jr as createMessageHandler};
|
|
1
|
+
import{z as c}from"zod";import{z as y}from"zod";import{z as S}from"zod";function t(n,C){return S.strictObject({type:S.literal(n),params:C})}function x(n,C){return S.strictObject({eventName:S.literal(n),id:S.string(),options:C})}function i(n){return S.strictObject({eventName:S.literal(n),id:S.string()})}import{z as r}from"zod";var z=r.number(),P=r.number(),k=r.object({latitude:P,longitude:z}),T=r.tuple([z,P]),le=r.object({type:r.literal("Point"),coordinates:T}),Ae=r.object({type:r.literal("LineString"),coordinates:r.array(T)}),M=r.object({type:r.literal("MultiLineString"),coordinates:r.array(Ae.shape.coordinates)}),pe=r.number().min(1).max(23),G=r.tuple([z,P,z,P]),L=r.object({show:r.array(r.string()).optional(),hide:r.array(r.string()).optional()});import{z as e}from"zod";var d=e.object({id:e.string(),groupId:e.string().nullable(),color:e.string(),name:e.union([e.string(),e.null()]),description:e.union([e.string(),e.null()]),attributes:e.record(e.string(),e.unknown())}),F=e.object({imageUrl:e.string().nullable()}),j=e.object({strokeOpacity:e.number(),strokeWidth:e.number(),strokeStyle:e.enum(["solid","dashed","dotted"])}),De=e.enum(["meter","kilometer","foot","mile"]),q=d.extend(F.shape).extend({type:e.literal("Place"),coordinates:le.shape.coordinates,symbol:e.string(),frame:e.enum(["frame-circle","frame-square"]).nullable(),hideLabel:e.boolean()}),Z=d.extend(F.shape).extend(j.shape).extend({type:e.literal("Path"),coordinates:M.shape.coordinates,distanceMarker:e.boolean(),endCaps:e.boolean(),routingMode:e.enum(["driving","cycling","walking","flying"]).nullable()}),B=d.extend(F.shape).extend(j.shape).extend({type:e.literal("Polygon"),coordinates:M.shape.coordinates,fillOpacity:e.number().min(0).max(1),areaMarker:e.boolean()}),H=d.extend(F.shape).extend(j.shape).extend({type:e.literal("Circle"),coordinates:T,radius:e.number(),radiusDisplayAngle:e.number(),radiusDisplayUnit:De.nullable(),fillOpacity:e.number().min(0).max(1),radiusMarker:e.boolean()}),A=d.extend({type:e.literal("Marker"),coordinates:M.shape.coordinates,opacity:e.number().min(0).max(1),size:e.number().min(0).max(100),zoom:e.number().min(0).max(23)}),D=d.extend({type:e.literal("Highlighter"),coordinates:M.shape.coordinates,opacity:e.number().min(0).max(1)}),me=e.object({position:T,rotation:e.number(),scale:e.number(),zoom:e.number().min(0).max(23),coordinates:M.shape.coordinates}),ce=e.object({text:e.string(),align:e.enum(["left","center","right"]),style:e.enum(["italic","light","regular","caps"]),name:e.string()}),W=d.extend(me.shape).extend(ce.shape).extend({type:e.literal("Text")}),K=d.extend(me.shape).extend(ce.shape).extend({type:e.literal("Note"),widthScale:e.number().min(0)}),_=d.extend({type:e.literal("Image"),coordinates:M.shape.coordinates,imageUrl:e.string(),opacity:e.number().min(0).max(1)}).omit({color:!0}),We=d.extend({type:e.literal("Link"),coordinates:M.shape.coordinates,url:e.string()}),u={type:!0,coordinates:!0},h={id:!0},Q=q.partial().required(u).omit(h),w=Z.partial().required(u).omit(h),$=B.partial().required(u).omit(h),J=H.partial().required(u).required({radius:!0}).omit(h),X=A.partial().required(u).omit(h),Y=D.partial().required(u).omit(h),ee=W.partial().required(u).required({text:!0}).omit(h).omit({coordinates:!0,name:!0}),te=K.partial().required(u).required({text:!0}).omit(h).omit({coordinates:!0,name:!0}),Ke=_.partial().required(u).required({imageUrl:!0}).omit(h),de=e.discriminatedUnion("type",[Q,w,$,J,X,Y,Ke,ee,te]),wo=q.omit({coordinates:!0}),Vo=Z.omit({coordinates:!0}),vo=B.omit({coordinates:!0}),Oo=H.omit({coordinates:!0}),Uo=A.omit({coordinates:!0}),Ro=D.omit({coordinates:!0}),No=W.omit({coordinates:!0}),jo=K.omit({coordinates:!0}),qo=_.omit({coordinates:!0}),Zo=We.omit({coordinates:!0}),f={type:!0,id:!0},_e=q.partial().required(f),Qe=Z.partial().required(f),$e=B.partial().required(f),Je=H.partial().required(f),Xe=A.partial().required(f),Ye=D.partial().required(f),et=W.partial().required(f).omit({coordinates:!0,name:!0}),tt=K.partial().required(f).omit({coordinates:!0,name:!0}),ot=_.partial().required(f),ye=e.discriminatedUnion("type",[_e,Qe,$e,Je,Xe,Ye,et,tt,ot]),ge=e.object({ids:e.array(e.string()).optional()}),ue=e.object({ids:e.array(e.string()).optional()});var nt=t("getElement",y.string()),rt=t("getElementGeometry",y.string()),at=t("getElements",ge.optional()),it=t("getElementGroup",y.string()),st=t("getElementGroups",ue.optional()),lt=t("setElementGroupVisibility",L),pt=x("onElementChange",y.object({id:y.string()})),mt=i("onElementCreate"),ct=x("onElementDelete",y.object({id:y.string()})),dt=x("onElementGroupChange",y.object({id:y.string()})),yt=t("createElement",de),gt=t("updateElement",ye),ut=t("deleteElement",y.string()),he={methods:[nt,rt,at,it,st,lt,yt,gt,ut],listeners:[pt,mt,ct,dt]};var ht=i("onPointerClick"),ft=i("onPointerMove"),fe={methods:null,listeners:[ht,ft]};import{z as s}from"zod";import{z as o}from"zod";var St=o.enum(["in","ni"]),xt=o.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),Jo=o.enum(["and","or"]),Se=o.union([o.number(),o.string(),o.boolean(),o.null()]),xe=o.string().or(o.null()),Mt=o.tuple([xe,St,o.array(Se).or(o.null())]),bt=o.tuple([xe,xt,Se]),oe=o.union([Mt,bt]),ne=o.tuple([o.lazy(()=>o.union([ne,oe,o.null(),o.boolean()])),o.enum(["and","or"]),o.lazy(()=>o.union([ne,oe,o.null(),o.boolean()]))]),Me=o.union([ne,oe,o.null(),o.boolean()]);import{z as a}from"zod";var tn=a.enum(["processing","completed","failed","incomplete"]),be=a.object({ids:a.array(a.string()).optional()}),Le=a.object({ids:a.array(a.string()).optional()}),I=a.object({id:a.string(),layerId:a.string()}),Ce=a.object({ids:I.array().optional(),layerIds:a.string().array().optional()}),Ie=a.object({layerIds:a.array(a.string()).optional(),areaQuery:a.union([a.object({coordinates:k}),a.object({boundary:G})]).optional()});var Lt=t("getLayer",s.string()),Ct=t("getLayers",be.optional()),It=t("setLayerVisibility",L),Et=x("onLayerChange",s.object({id:s.string()})),Tt=t("setLayerStyle",s.object({id:s.string(),style:s.object({}).passthrough()})),Gt=t("setLayerLegendVisibility",L),zt=t("getLayerGroup",s.string()),Pt=t("getLayerGroups",Le.optional()),kt=t("setLayerGroupVisibility",L),Ft=t("setLayerGroupLegendVisibility",L),wt=x("onLayerGroupChange",s.object({id:s.string()})),Vt=t("getLegendItem",I),vt=t("getLegendItems",Ce.optional()),Ot=x("onLegendItemChange",I),Ut=t("setLegendItemVisibility",s.object({show:I.array().optional(),hide:I.array().optional()})),Rt=t("getLayerFilters",s.string()),Nt=t("setLayerFilters",s.object({layerId:s.string(),filters:Me,note:s.string().optional()})),jt=t("getRenderedFeatures",Ie.optional()),Ee={methods:[Lt,Ct,It,Tt,Gt,zt,Pt,kt,Ft,Vt,vt,Ut,Rt,Nt,jt],listeners:[Et,wt,Ot]};import{z as qt}from"zod";var Zt=t("getMapDetails",qt.undefined()),Te={methods:[Zt],listeners:[]};import{z as V}from"zod";import{z as b}from"zod";var Ge=b.object({id:b.string().or(b.number()),layerId:b.string(),showPopup:b.boolean().optional(),fitViewport:b.boolean().or(b.object({maxZoom:b.number()})).optional()});var Bt=t("getSelection",V.undefined()),Ht=i("onSelectionChange"),At=t("selectFeature",Ge),Dt=t("clearSelection",V.object({features:V.boolean().optional(),elements:V.boolean().optional()}).optional()),ze={methods:[Bt,At,Dt],listeners:[Ht]};import{z as to}from"zod";import{z as p}from"zod";var Pe=["pin","line","route","polygon","circle","marker","highlighter","text","note"],ke=p.enum([...Pe,"link"]),Fe=p.enum(Pe),Wt=Q.pick({color:!0,symbol:!0,frame:!0}).required(),Kt=w.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),_t=w.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),Qt=$.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),$t=J.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),Jt=X.pick({color:!0,opacity:!0,size:!0}).required(),Xt=Y.pick({color:!0,opacity:!0}).extend({size:p.number().min(0).max(200)}).required(),Yt=ee.pick({color:!0,align:!0,style:!0}).required(),eo=te.pick({color:!0,align:!0,style:!0}).required(),we=p.discriminatedUnion("tool",[Wt.partial().extend({tool:p.literal("pin")}),Kt.partial().extend({tool:p.literal("line")}),_t.partial().extend({tool:p.literal("route")}),Qt.partial().extend({tool:p.literal("polygon")}),$t.partial().extend({tool:p.literal("circle")}),Jt.partial().extend({tool:p.literal("marker")}),Xt.partial().extend({tool:p.literal("highlighter")}),Yt.partial().extend({tool:p.literal("text")}),eo.partial().extend({tool:p.literal("note")})]);var oo=t("setTool",ke.nullable()),no=t("getTool",to.undefined()),ro=i("onToolChange"),ao=t("setToolSettings",we),io=t("getToolSettings",Fe),so=i("onToolSettingsChange"),Ve={methods:[oo,no,ao,io],listeners:[ro,so]};import{z as m}from"zod";var ve=m.object({showLegend:m.boolean().optional(),cooperativeGestures:m.boolean().optional(),fullScreenButton:m.boolean().optional(),geolocation:m.boolean().optional(),zoomControls:m.boolean().optional(),scaleBar:m.boolean().optional()}),Oe=m.object({featureSelectPanel:m.boolean().optional(),featureHoverPanel:m.boolean().optional(),elementSelectPanel:m.boolean().optional(),linkClickOpen:m.boolean().optional(),imageLightboxOpen:m.boolean().optional()});var lo=t("updateUiControls",ve),po=t("setOnMapInteractionsUi",Oe),Ue={methods:[lo,po],listeners:null};import{z as qe}from"zod";import{z as O}from"zod";var v=O.object({center:k,zoom:pe}),Re=O.object({center:v.shape.center.optional(),zoom:v.shape.zoom.optional()}),Ne=O.object({minZoom:v.shape.zoom.nullish(),maxZoom:v.shape.zoom.nullish(),bounds:G.nullish()}).nullable(),je=O.object({bounds:G});var mo=t("getViewport",qe.undefined()),co=t("setViewport",Re),yo=t("getViewportConstraints",qe.undefined()),go=t("setViewportConstraints",Ne),uo=t("fitViewportToBounds",je),ho=i("onViewportMove"),fo=i("onViewportMoveEnd"),So=i("onMapIdle"),Ze={methods:[co,mo,yo,go,uo],listeners:[ho,fo,So]};var re=[Ue,Ze,Ee,he,ze,fe,Ve,Te];function Qn(n,C,ae){let U=new Map;async function ie(g){if(!Io.safeParse(g.data).success){ae?.onUnknownMessage?.(g.data);return}let se=He.safeParse(g.data);if(!se.success){ae?.onInvalidMessage?.(g.data);return}let{data:l}=se;if(l.type==="felt.ready")g.ports[0]?.postMessage(!0);else if(l.type==="felt.addListener"){if(l.event.eventName==="")throw new Error("felt.addListener eventName cannot be empty");let E="options"in l.event?{options:"options"in l.event?l.event.options:void 0,handler:N=>{g.ports[0]?.postMessage(N)}}:{handler:N=>{g.ports[0]?.postMessage(N)}},R=C.listeners[l.event.eventName](E);U.set(l.event.id,R)}else if(l.type==="felt.removeListener")U.get(l.id)?.(),U.delete(l.id);else try{let E=C.methods[l.type],R=await E(l.params);g.ports[0]?.postMessage(R)}catch(E){g.ports[0]?.postMessage({__error__:xo(E)})}}return n.addEventListener("message",ie),()=>{n.removeEventListener("message",ie)}}function xo(n){return n instanceof Error?n.message:typeof n=="object"&&n!==null&&"message"in n?String(n.message):typeof n=="string"?n:"Unknown error"}var Be={methods:re.map(n=>n.methods??[]).flat(),listeners:re.map(n=>n.listeners??[]).flat()},Mo=c.discriminatedUnion("eventName",[c.strictObject({eventName:c.literal("")}),...Be.listeners]),bo=c.strictObject({type:c.literal("felt.addListener"),event:Mo}),Lo=c.strictObject({type:c.literal("felt.removeListener"),id:c.string()}),Co=c.strictObject({type:c.literal("felt.ready")}),He=c.discriminatedUnion("type",[Co,bo,Lo,...Be.methods]),Io=c.object({type:c.enum(He.options.map(n=>n.shape.type.value))});export{Qn as createMessageHandler};
|
|
@@ -207,6 +207,7 @@ declare const MarkerCreateSchema: z.ZodObject<Omit<{
|
|
|
207
207
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
208
208
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
209
209
|
size: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
210
211
|
}, "id">, "strip", z.ZodTypeAny, {
|
|
211
212
|
type: "Marker";
|
|
212
213
|
coordinates: [number, number][][];
|
|
@@ -217,6 +218,7 @@ declare const MarkerCreateSchema: z.ZodObject<Omit<{
|
|
|
217
218
|
attributes?: Record<string, unknown> | undefined;
|
|
218
219
|
opacity?: number | undefined;
|
|
219
220
|
size?: number | undefined;
|
|
221
|
+
zoom?: number | undefined;
|
|
220
222
|
}, {
|
|
221
223
|
type: "Marker";
|
|
222
224
|
coordinates: [number, number][][];
|
|
@@ -227,6 +229,7 @@ declare const MarkerCreateSchema: z.ZodObject<Omit<{
|
|
|
227
229
|
attributes?: Record<string, unknown> | undefined;
|
|
228
230
|
opacity?: number | undefined;
|
|
229
231
|
size?: number | undefined;
|
|
232
|
+
zoom?: number | undefined;
|
|
230
233
|
}>;
|
|
231
234
|
declare const HighlighterCreateSchema: z.ZodObject<Omit<{
|
|
232
235
|
type: z.ZodLiteral<"Highlighter">;
|
|
@@ -266,6 +269,7 @@ declare const TextCreateSchema: z.ZodObject<Omit<Omit<{
|
|
|
266
269
|
name: z.ZodOptional<z.ZodString>;
|
|
267
270
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
268
271
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
272
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
269
273
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
270
274
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
271
275
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
@@ -279,6 +283,7 @@ declare const TextCreateSchema: z.ZodObject<Omit<Omit<{
|
|
|
279
283
|
color?: string | undefined;
|
|
280
284
|
description?: string | null | undefined;
|
|
281
285
|
attributes?: Record<string, unknown> | undefined;
|
|
286
|
+
zoom?: number | undefined;
|
|
282
287
|
position?: [number, number] | undefined;
|
|
283
288
|
rotation?: number | undefined;
|
|
284
289
|
scale?: number | undefined;
|
|
@@ -291,6 +296,7 @@ declare const TextCreateSchema: z.ZodObject<Omit<Omit<{
|
|
|
291
296
|
color?: string | undefined;
|
|
292
297
|
description?: string | null | undefined;
|
|
293
298
|
attributes?: Record<string, unknown> | undefined;
|
|
299
|
+
zoom?: number | undefined;
|
|
294
300
|
position?: [number, number] | undefined;
|
|
295
301
|
rotation?: number | undefined;
|
|
296
302
|
scale?: number | undefined;
|
|
@@ -306,13 +312,14 @@ declare const NoteCreateSchema: z.ZodObject<Omit<Omit<{
|
|
|
306
312
|
name: z.ZodOptional<z.ZodString>;
|
|
307
313
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
308
314
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
315
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
309
316
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
310
317
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
311
318
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
312
319
|
text: z.ZodString;
|
|
313
320
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
314
321
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
315
|
-
|
|
322
|
+
widthScale: z.ZodOptional<z.ZodNumber>;
|
|
316
323
|
}, "id">, "coordinates" | "name">, "strip", z.ZodTypeAny, {
|
|
317
324
|
type: "Note";
|
|
318
325
|
text: string;
|
|
@@ -320,12 +327,13 @@ declare const NoteCreateSchema: z.ZodObject<Omit<Omit<{
|
|
|
320
327
|
color?: string | undefined;
|
|
321
328
|
description?: string | null | undefined;
|
|
322
329
|
attributes?: Record<string, unknown> | undefined;
|
|
330
|
+
zoom?: number | undefined;
|
|
323
331
|
position?: [number, number] | undefined;
|
|
324
332
|
rotation?: number | undefined;
|
|
325
333
|
scale?: number | undefined;
|
|
326
334
|
align?: "left" | "center" | "right" | undefined;
|
|
327
335
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
328
|
-
|
|
336
|
+
widthScale?: number | undefined;
|
|
329
337
|
}, {
|
|
330
338
|
type: "Note";
|
|
331
339
|
text: string;
|
|
@@ -333,19 +341,19 @@ declare const NoteCreateSchema: z.ZodObject<Omit<Omit<{
|
|
|
333
341
|
color?: string | undefined;
|
|
334
342
|
description?: string | null | undefined;
|
|
335
343
|
attributes?: Record<string, unknown> | undefined;
|
|
344
|
+
zoom?: number | undefined;
|
|
336
345
|
position?: [number, number] | undefined;
|
|
337
346
|
rotation?: number | undefined;
|
|
338
347
|
scale?: number | undefined;
|
|
339
348
|
align?: "left" | "center" | "right" | undefined;
|
|
340
349
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
341
|
-
|
|
350
|
+
widthScale?: number | undefined;
|
|
342
351
|
}>;
|
|
343
352
|
declare const ImageCreateSchema: z.ZodObject<Omit<{
|
|
344
353
|
type: z.ZodLiteral<"Image">;
|
|
345
354
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
346
355
|
id: z.ZodOptional<z.ZodString>;
|
|
347
356
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
348
|
-
color: z.ZodOptional<z.ZodString>;
|
|
349
357
|
name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
350
358
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
351
359
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -356,7 +364,6 @@ declare const ImageCreateSchema: z.ZodObject<Omit<{
|
|
|
356
364
|
coordinates: [number, number][][];
|
|
357
365
|
imageUrl: string;
|
|
358
366
|
groupId?: string | null | undefined;
|
|
359
|
-
color?: string | undefined;
|
|
360
367
|
name?: string | null | undefined;
|
|
361
368
|
description?: string | null | undefined;
|
|
362
369
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -366,7 +373,6 @@ declare const ImageCreateSchema: z.ZodObject<Omit<{
|
|
|
366
373
|
coordinates: [number, number][][];
|
|
367
374
|
imageUrl: string;
|
|
368
375
|
groupId?: string | null | undefined;
|
|
369
|
-
color?: string | undefined;
|
|
370
376
|
name?: string | null | undefined;
|
|
371
377
|
description?: string | null | undefined;
|
|
372
378
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -577,6 +583,7 @@ declare const MarkerReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
|
577
583
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
578
584
|
opacity: z.ZodNumber;
|
|
579
585
|
size: z.ZodNumber;
|
|
586
|
+
zoom: z.ZodNumber;
|
|
580
587
|
}>, "coordinates">, "strip", z.ZodTypeAny, {
|
|
581
588
|
type: "Marker";
|
|
582
589
|
id: string;
|
|
@@ -587,6 +594,7 @@ declare const MarkerReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
|
587
594
|
attributes: Record<string, unknown>;
|
|
588
595
|
opacity: number;
|
|
589
596
|
size: number;
|
|
597
|
+
zoom: number;
|
|
590
598
|
}, {
|
|
591
599
|
type: "Marker";
|
|
592
600
|
id: string;
|
|
@@ -597,6 +605,7 @@ declare const MarkerReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
|
597
605
|
attributes: Record<string, unknown>;
|
|
598
606
|
opacity: number;
|
|
599
607
|
size: number;
|
|
608
|
+
zoom: number;
|
|
600
609
|
}>;
|
|
601
610
|
declare const HighlighterReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
602
611
|
id: z.ZodString;
|
|
@@ -639,6 +648,7 @@ declare const TextReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
639
648
|
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
640
649
|
rotation: z.ZodNumber;
|
|
641
650
|
scale: z.ZodNumber;
|
|
651
|
+
zoom: z.ZodNumber;
|
|
642
652
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
643
653
|
}>, {
|
|
644
654
|
text: z.ZodString;
|
|
@@ -655,6 +665,7 @@ declare const TextReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
655
665
|
name: string;
|
|
656
666
|
description: string | null;
|
|
657
667
|
attributes: Record<string, unknown>;
|
|
668
|
+
zoom: number;
|
|
658
669
|
position: [number, number];
|
|
659
670
|
rotation: number;
|
|
660
671
|
scale: number;
|
|
@@ -669,6 +680,7 @@ declare const TextReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
669
680
|
name: string;
|
|
670
681
|
description: string | null;
|
|
671
682
|
attributes: Record<string, unknown>;
|
|
683
|
+
zoom: number;
|
|
672
684
|
position: [number, number];
|
|
673
685
|
rotation: number;
|
|
674
686
|
scale: number;
|
|
@@ -687,6 +699,7 @@ declare const NoteReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
687
699
|
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
688
700
|
rotation: z.ZodNumber;
|
|
689
701
|
scale: z.ZodNumber;
|
|
702
|
+
zoom: z.ZodNumber;
|
|
690
703
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
691
704
|
}>, {
|
|
692
705
|
text: z.ZodString;
|
|
@@ -695,7 +708,7 @@ declare const NoteReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
695
708
|
name: z.ZodString;
|
|
696
709
|
}>, {
|
|
697
710
|
type: z.ZodLiteral<"Note">;
|
|
698
|
-
|
|
711
|
+
widthScale: z.ZodNumber;
|
|
699
712
|
}>, "coordinates">, "strip", z.ZodTypeAny, {
|
|
700
713
|
type: "Note";
|
|
701
714
|
id: string;
|
|
@@ -704,13 +717,14 @@ declare const NoteReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
704
717
|
name: string;
|
|
705
718
|
description: string | null;
|
|
706
719
|
attributes: Record<string, unknown>;
|
|
720
|
+
zoom: number;
|
|
707
721
|
position: [number, number];
|
|
708
722
|
rotation: number;
|
|
709
723
|
scale: number;
|
|
710
724
|
text: string;
|
|
711
725
|
align: "left" | "center" | "right";
|
|
712
726
|
style: "italic" | "light" | "regular" | "caps";
|
|
713
|
-
|
|
727
|
+
widthScale: number;
|
|
714
728
|
}, {
|
|
715
729
|
type: "Note";
|
|
716
730
|
id: string;
|
|
@@ -719,15 +733,16 @@ declare const NoteReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.object
|
|
|
719
733
|
name: string;
|
|
720
734
|
description: string | null;
|
|
721
735
|
attributes: Record<string, unknown>;
|
|
736
|
+
zoom: number;
|
|
722
737
|
position: [number, number];
|
|
723
738
|
rotation: number;
|
|
724
739
|
scale: number;
|
|
725
740
|
text: string;
|
|
726
741
|
align: "left" | "center" | "right";
|
|
727
742
|
style: "italic" | "light" | "regular" | "caps";
|
|
728
|
-
|
|
743
|
+
widthScale: number;
|
|
729
744
|
}>;
|
|
730
|
-
declare const ImageReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
745
|
+
declare const ImageReadSchema: z.ZodObject<Omit<Omit<z.objectUtil.extendShape<{
|
|
731
746
|
id: z.ZodString;
|
|
732
747
|
groupId: z.ZodNullable<z.ZodString>;
|
|
733
748
|
color: z.ZodString;
|
|
@@ -739,11 +754,10 @@ declare const ImageReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
|
739
754
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
740
755
|
imageUrl: z.ZodString;
|
|
741
756
|
opacity: z.ZodNumber;
|
|
742
|
-
}>, "coordinates">, "strip", z.ZodTypeAny, {
|
|
757
|
+
}>, "color">, "coordinates">, "strip", z.ZodTypeAny, {
|
|
743
758
|
type: "Image";
|
|
744
759
|
id: string;
|
|
745
760
|
groupId: string | null;
|
|
746
|
-
color: string;
|
|
747
761
|
name: string | null;
|
|
748
762
|
description: string | null;
|
|
749
763
|
attributes: Record<string, unknown>;
|
|
@@ -753,7 +767,6 @@ declare const ImageReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
|
753
767
|
type: "Image";
|
|
754
768
|
id: string;
|
|
755
769
|
groupId: string | null;
|
|
756
|
-
color: string;
|
|
757
770
|
name: string | null;
|
|
758
771
|
description: string | null;
|
|
759
772
|
attributes: Record<string, unknown>;
|
|
@@ -991,6 +1004,7 @@ declare const MarkerUpdateSchema: z.ZodObject<{
|
|
|
991
1004
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
992
1005
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
993
1006
|
size: z.ZodOptional<z.ZodNumber>;
|
|
1007
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
994
1008
|
}, "strip", z.ZodTypeAny, {
|
|
995
1009
|
type: "Marker";
|
|
996
1010
|
id: string;
|
|
@@ -1002,6 +1016,7 @@ declare const MarkerUpdateSchema: z.ZodObject<{
|
|
|
1002
1016
|
attributes?: Record<string, unknown> | undefined;
|
|
1003
1017
|
opacity?: number | undefined;
|
|
1004
1018
|
size?: number | undefined;
|
|
1019
|
+
zoom?: number | undefined;
|
|
1005
1020
|
}, {
|
|
1006
1021
|
type: "Marker";
|
|
1007
1022
|
id: string;
|
|
@@ -1013,6 +1028,7 @@ declare const MarkerUpdateSchema: z.ZodObject<{
|
|
|
1013
1028
|
attributes?: Record<string, unknown> | undefined;
|
|
1014
1029
|
opacity?: number | undefined;
|
|
1015
1030
|
size?: number | undefined;
|
|
1031
|
+
zoom?: number | undefined;
|
|
1016
1032
|
}>;
|
|
1017
1033
|
declare const HighlighterUpdateSchema: z.ZodObject<{
|
|
1018
1034
|
type: z.ZodLiteral<"Highlighter">;
|
|
@@ -1045,7 +1061,7 @@ declare const HighlighterUpdateSchema: z.ZodObject<{
|
|
|
1045
1061
|
attributes?: Record<string, unknown> | undefined;
|
|
1046
1062
|
opacity?: number | undefined;
|
|
1047
1063
|
}>;
|
|
1048
|
-
declare const TextUpdateSchema: z.ZodObject<{
|
|
1064
|
+
declare const TextUpdateSchema: z.ZodObject<Omit<{
|
|
1049
1065
|
type: z.ZodLiteral<"Text">;
|
|
1050
1066
|
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1051
1067
|
id: z.ZodString;
|
|
@@ -1054,21 +1070,21 @@ declare const TextUpdateSchema: z.ZodObject<{
|
|
|
1054
1070
|
name: z.ZodOptional<z.ZodString>;
|
|
1055
1071
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1056
1072
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1073
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1057
1074
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1058
1075
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
1059
1076
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
1060
1077
|
text: z.ZodOptional<z.ZodString>;
|
|
1061
1078
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
1062
1079
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
1063
|
-
}, "strip", z.ZodTypeAny, {
|
|
1080
|
+
}, "coordinates" | "name">, "strip", z.ZodTypeAny, {
|
|
1064
1081
|
type: "Text";
|
|
1065
1082
|
id: string;
|
|
1066
|
-
coordinates?: [number, number][][] | undefined;
|
|
1067
1083
|
groupId?: string | null | undefined;
|
|
1068
1084
|
color?: string | undefined;
|
|
1069
|
-
name?: string | undefined;
|
|
1070
1085
|
description?: string | null | undefined;
|
|
1071
1086
|
attributes?: Record<string, unknown> | undefined;
|
|
1087
|
+
zoom?: number | undefined;
|
|
1072
1088
|
position?: [number, number] | undefined;
|
|
1073
1089
|
rotation?: number | undefined;
|
|
1074
1090
|
scale?: number | undefined;
|
|
@@ -1078,12 +1094,11 @@ declare const TextUpdateSchema: z.ZodObject<{
|
|
|
1078
1094
|
}, {
|
|
1079
1095
|
type: "Text";
|
|
1080
1096
|
id: string;
|
|
1081
|
-
coordinates?: [number, number][][] | undefined;
|
|
1082
1097
|
groupId?: string | null | undefined;
|
|
1083
1098
|
color?: string | undefined;
|
|
1084
|
-
name?: string | undefined;
|
|
1085
1099
|
description?: string | null | undefined;
|
|
1086
1100
|
attributes?: Record<string, unknown> | undefined;
|
|
1101
|
+
zoom?: number | undefined;
|
|
1087
1102
|
position?: [number, number] | undefined;
|
|
1088
1103
|
rotation?: number | undefined;
|
|
1089
1104
|
scale?: number | undefined;
|
|
@@ -1091,7 +1106,7 @@ declare const TextUpdateSchema: z.ZodObject<{
|
|
|
1091
1106
|
align?: "left" | "center" | "right" | undefined;
|
|
1092
1107
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1093
1108
|
}>;
|
|
1094
|
-
declare const NoteUpdateSchema: z.ZodObject<{
|
|
1109
|
+
declare const NoteUpdateSchema: z.ZodObject<Omit<{
|
|
1095
1110
|
type: z.ZodLiteral<"Note">;
|
|
1096
1111
|
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1097
1112
|
id: z.ZodString;
|
|
@@ -1100,52 +1115,50 @@ declare const NoteUpdateSchema: z.ZodObject<{
|
|
|
1100
1115
|
name: z.ZodOptional<z.ZodString>;
|
|
1101
1116
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1102
1117
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1118
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1103
1119
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1104
1120
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
1105
1121
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
1106
1122
|
text: z.ZodOptional<z.ZodString>;
|
|
1107
1123
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
1108
1124
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
1109
|
-
|
|
1110
|
-
}, "strip", z.ZodTypeAny, {
|
|
1125
|
+
widthScale: z.ZodOptional<z.ZodNumber>;
|
|
1126
|
+
}, "coordinates" | "name">, "strip", z.ZodTypeAny, {
|
|
1111
1127
|
type: "Note";
|
|
1112
1128
|
id: string;
|
|
1113
|
-
coordinates?: [number, number][][] | undefined;
|
|
1114
1129
|
groupId?: string | null | undefined;
|
|
1115
1130
|
color?: string | undefined;
|
|
1116
|
-
name?: string | undefined;
|
|
1117
1131
|
description?: string | null | undefined;
|
|
1118
1132
|
attributes?: Record<string, unknown> | undefined;
|
|
1133
|
+
zoom?: number | undefined;
|
|
1119
1134
|
position?: [number, number] | undefined;
|
|
1120
1135
|
rotation?: number | undefined;
|
|
1121
1136
|
scale?: number | undefined;
|
|
1122
1137
|
text?: string | undefined;
|
|
1123
1138
|
align?: "left" | "center" | "right" | undefined;
|
|
1124
1139
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1125
|
-
|
|
1140
|
+
widthScale?: number | undefined;
|
|
1126
1141
|
}, {
|
|
1127
1142
|
type: "Note";
|
|
1128
1143
|
id: string;
|
|
1129
|
-
coordinates?: [number, number][][] | undefined;
|
|
1130
1144
|
groupId?: string | null | undefined;
|
|
1131
1145
|
color?: string | undefined;
|
|
1132
|
-
name?: string | undefined;
|
|
1133
1146
|
description?: string | null | undefined;
|
|
1134
1147
|
attributes?: Record<string, unknown> | undefined;
|
|
1148
|
+
zoom?: number | undefined;
|
|
1135
1149
|
position?: [number, number] | undefined;
|
|
1136
1150
|
rotation?: number | undefined;
|
|
1137
1151
|
scale?: number | undefined;
|
|
1138
1152
|
text?: string | undefined;
|
|
1139
1153
|
align?: "left" | "center" | "right" | undefined;
|
|
1140
1154
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1141
|
-
|
|
1155
|
+
widthScale?: number | undefined;
|
|
1142
1156
|
}>;
|
|
1143
1157
|
declare const ImageUpdateSchema: z.ZodObject<{
|
|
1144
1158
|
type: z.ZodLiteral<"Image">;
|
|
1145
1159
|
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1146
1160
|
id: z.ZodString;
|
|
1147
1161
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1148
|
-
color: z.ZodOptional<z.ZodString>;
|
|
1149
1162
|
name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1150
1163
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1151
1164
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -1156,7 +1169,6 @@ declare const ImageUpdateSchema: z.ZodObject<{
|
|
|
1156
1169
|
id: string;
|
|
1157
1170
|
coordinates?: [number, number][][] | undefined;
|
|
1158
1171
|
groupId?: string | null | undefined;
|
|
1159
|
-
color?: string | undefined;
|
|
1160
1172
|
name?: string | null | undefined;
|
|
1161
1173
|
description?: string | null | undefined;
|
|
1162
1174
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -1167,7 +1179,6 @@ declare const ImageUpdateSchema: z.ZodObject<{
|
|
|
1167
1179
|
id: string;
|
|
1168
1180
|
coordinates?: [number, number][][] | undefined;
|
|
1169
1181
|
groupId?: string | null | undefined;
|
|
1170
|
-
color?: string | undefined;
|
|
1171
1182
|
name?: string | null | undefined;
|
|
1172
1183
|
description?: string | null | undefined;
|
|
1173
1184
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -1952,6 +1963,26 @@ interface MapInteractionEvent {
|
|
|
1952
1963
|
rasterValues: Array<RasterValue>;
|
|
1953
1964
|
}
|
|
1954
1965
|
|
|
1966
|
+
/**
|
|
1967
|
+
* The details of a map.
|
|
1968
|
+
*
|
|
1969
|
+
* @group Types
|
|
1970
|
+
*/
|
|
1971
|
+
type MapDetails = {
|
|
1972
|
+
/**
|
|
1973
|
+
* The id of the map.
|
|
1974
|
+
*/
|
|
1975
|
+
id: string;
|
|
1976
|
+
/**
|
|
1977
|
+
* The title of the map.
|
|
1978
|
+
*/
|
|
1979
|
+
title: string;
|
|
1980
|
+
/**
|
|
1981
|
+
* The description of the map.
|
|
1982
|
+
*/
|
|
1983
|
+
description: string | null;
|
|
1984
|
+
};
|
|
1985
|
+
|
|
1955
1986
|
/**
|
|
1956
1987
|
* A reference to any kind of entity in the map.
|
|
1957
1988
|
*
|
|
@@ -2296,17 +2327,17 @@ declare const ViewportCenterZoomSchema: z.ZodObject<{
|
|
|
2296
2327
|
}>;
|
|
2297
2328
|
zoom: z.ZodNumber;
|
|
2298
2329
|
}, "strip", z.ZodTypeAny, {
|
|
2330
|
+
zoom: number;
|
|
2299
2331
|
center: {
|
|
2300
2332
|
latitude: number;
|
|
2301
2333
|
longitude: number;
|
|
2302
2334
|
};
|
|
2303
|
-
zoom: number;
|
|
2304
2335
|
}, {
|
|
2336
|
+
zoom: number;
|
|
2305
2337
|
center: {
|
|
2306
2338
|
latitude: number;
|
|
2307
2339
|
longitude: number;
|
|
2308
2340
|
};
|
|
2309
|
-
zoom: number;
|
|
2310
2341
|
}>;
|
|
2311
2342
|
/**
|
|
2312
2343
|
* The current state of the viewport, including the derived bounds.
|
|
@@ -2356,17 +2387,17 @@ declare const SetViewportCenterZoomParamsSchema: z.ZodObject<{
|
|
|
2356
2387
|
}>>;
|
|
2357
2388
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
2358
2389
|
}, "strip", z.ZodTypeAny, {
|
|
2390
|
+
zoom?: number | undefined;
|
|
2359
2391
|
center?: {
|
|
2360
2392
|
latitude: number;
|
|
2361
2393
|
longitude: number;
|
|
2362
2394
|
} | undefined;
|
|
2363
|
-
zoom?: number | undefined;
|
|
2364
2395
|
}, {
|
|
2396
|
+
zoom?: number | undefined;
|
|
2365
2397
|
center?: {
|
|
2366
2398
|
latitude: number;
|
|
2367
2399
|
longitude: number;
|
|
2368
2400
|
} | undefined;
|
|
2369
|
-
zoom?: number | undefined;
|
|
2370
2401
|
}>;
|
|
2371
2402
|
/**
|
|
2372
2403
|
* The constraints for the viewport. Used to ensure that the viewport stays
|
|
@@ -2415,4 +2446,4 @@ declare const ViewportFitBoundsParamsSchema: z.ZodObject<{
|
|
|
2415
2446
|
bounds: [number, number, number, number];
|
|
2416
2447
|
}>;
|
|
2417
2448
|
|
|
2418
|
-
export type {
|
|
2449
|
+
export type { NoteElementRead as $, ViewportConstraints as A, ViewportFitBoundsParams as B, ConfigurableToolType as C, ViewportCenterZoom as D, Element as E, Filters as F, Geometry as G, CircleElementCreate as H, InputToolSettings as I, CircleElementRead as J, CircleElementUpdate as K, Layer as L, MapInteractionEvent as M, HighlighterElementCreate as N, HighlighterElementRead as O, HighlighterElementUpdate as P, ImageElementCreate as Q, ImageElementRead as R, SetVisibilityRequest as S, ToolType as T, ImageElementUpdate as U, ViewportState as V, LinkElementRead as W, MarkerElementCreate as X, MarkerElementRead as Y, MarkerElementUpdate as Z, NoteElementCreate as _, GetElementsConstraint as a, NoteElementUpdate as a0, PathElementCreate as a1, PathElementRead as a2, PathElementUpdate as a3, PlaceElementCreate as a4, PlaceElementRead as a5, PlaceElementUpdate as a6, PolygonElementCreate as a7, PolygonElementRead as a8, PolygonElementUpdate as a9, NoteToolSettings as aA, PinToolSettings as aB, PlaceFrame as aC, PlaceSymbol as aD, PolygonToolSettings as aE, RouteToolSettings as aF, TextToolSettings as aG, UnionToIntersection as aH, PromiseOrNot as aI, TextElementCreate as aa, TextElementRead as ab, TextElementUpdate as ac, LayerProcessingStatus as ad, RasterValue as ae, FilterExpression as af, FilterLogicGate as ag, FilterTernary as ah, ElementGroupNode as ai, ElementNode as aj, FeatureNode as ak, LayerGroupNode as al, LayerNode as am, FeltBoundary as an, FeltZoom as ao, LatLng as ap, LineStringGeometry as aq, LngLatTuple as ar, MultiLineStringGeometry as as, MultiPolygonGeometry as at, PointGeometry as au, PolygonGeometry as av, CircleToolSettings as aw, HighlighterToolSettings as ax, LineToolSettings as ay, MarkerToolSettings as az, ElementGroup as b, GetElementGroupsConstraint as c, ElementChangeCallbackParams as d, ElementGroupChangeCallbackParams as e, ElementCreate as f, ElementUpdate as g, GetLayersConstraint as h, LayerChangeCallbackParams as i, LayerGroup as j, GetLayerGroupsConstraint as k, LayerGroupChangeCallbackParams as l, LegendItemIdentifier as m, LegendItem as n, LegendItemsConstraint as o, LegendItemChangeCallbackParams as p, LayerFilters as q, GetRenderedFeaturesConstraint as r, Feature as s, MapDetails as t, EntityNode as u, FeatureSelection as v, ToolSettingsMap as w, ToolSettingsChangeEvent as x, SetViewportCenterZoomParams as y, zInfer as z };
|