@feltmaps/js-sdk 1.5.0-next.3 → 1.5.0-next.4

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{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}),He=r.object({type:r.literal("LineString"),coordinates:r.array(T)}),M=r.object({type:r.literal("MultiLineString"),coordinates:r.array(He.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"])}),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: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:Ae.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}),De=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}),We=_.partial().required(u).required({imageUrl:!0}).omit(h),de=e.discriminatedUnion("type",[Q,w,$,J,X,Y,We,ee,te]),Po=q.omit({coordinates:!0}),ko=Z.omit({coordinates:!0}),Fo=B.omit({coordinates:!0}),wo=H.omit({coordinates:!0}),Vo=A.omit({coordinates:!0}),vo=D.omit({coordinates:!0}),Oo=W.omit({coordinates:!0}),Uo=K.omit({coordinates:!0}),Ro=_.omit({coordinates:!0}),No=De.omit({coordinates:!0}),f={type:!0,id:!0},Ke=q.partial().required(f),_e=Z.partial().required(f),Qe=B.partial().required(f),$e=H.partial().required(f),Je=A.partial().required(f),Xe=D.partial().required(f),Ye=W.partial().required(f).omit({coordinates:!0,name:!0}),et=K.partial().required(f).omit({coordinates:!0,name:!0}),tt=_.partial().required(f),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",y.string()),nt=t("getElementGeometry",y.string()),rt=t("getElements",ge.optional()),at=t("getElementGroup",y.string()),it=t("getElementGroups",ue.optional()),st=t("setElementGroupVisibility",L),lt=x("onElementChange",y.object({id:y.string()})),pt=i("onElementCreate"),mt=x("onElementDelete",y.object({id:y.string()})),ct=x("onElementGroupChange",y.object({id:y.string()})),dt=t("createElement",de),yt=t("updateElement",ye),gt=t("deleteElement",y.string()),he={methods:[ot,nt,rt,at,it,st,dt,yt,gt],listeners:[lt,pt,mt,ct]};var ut=i("onPointerClick"),ht=i("onPointerMove"),fe={methods:null,listeners:[ut,ht]};import{z as s}from"zod";import{z as o}from"zod";var ft=o.enum(["in","ni"]),St=o.enum(["lt","gt","le","ge","eq","ne","cn","nc","is","isnt"]),_o=o.enum(["and","or"]),Se=o.union([o.number(),o.string(),o.boolean(),o.null()]),xe=o.string().or(o.null()),xt=o.tuple([xe,ft,o.array(Se).or(o.null())]),Mt=o.tuple([xe,St,Se]),oe=o.union([xt,Mt]),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 Xo=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 bt=t("getLayer",s.string()),Lt=t("getLayers",be.optional()),Ct=t("setLayerVisibility",L),It=x("onLayerChange",s.object({id:s.string()})),Et=t("setLayerStyle",s.object({id:s.string(),style:s.object({}).passthrough()})),Tt=t("setLayerLegendVisibility",L),Gt=t("getLayerGroup",s.string()),zt=t("getLayerGroups",Le.optional()),Pt=t("setLayerGroupVisibility",L),kt=t("setLayerGroupLegendVisibility",L),Ft=x("onLayerGroupChange",s.object({id:s.string()})),wt=t("getLegendItem",I),Vt=t("getLegendItems",Ce.optional()),vt=x("onLegendItemChange",I),Ot=t("setLegendItemVisibility",s.object({show:I.array().optional(),hide:I.array().optional()})),Ut=t("getLayerFilters",s.string()),Rt=t("setLayerFilters",s.object({layerId:s.string(),filters:Me,note:s.string().optional()})),Nt=t("getRenderedFeatures",Ie.optional()),Ee={methods:[bt,Lt,Ct,Et,Tt,Gt,zt,Pt,kt,wt,Vt,Ot,Ut,Rt,Nt],listeners:[It,Ft,vt]};import{z as V}from"zod";import{z as b}from"zod";var Te=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 jt=t("getSelection",V.undefined()),qt=i("onSelectionChange"),Zt=t("selectFeature",Te),Bt=t("clearSelection",V.object({features:V.boolean().optional(),elements:V.boolean().optional()}).optional()),Ge={methods:[jt,Zt,Bt],listeners:[qt]};import{z as Xt}from"zod";import{z as p}from"zod";var ze=["pin","line","route","polygon","circle","marker","highlighter","text","note"],Pe=p.enum([...ze,"link"]),ke=p.enum(ze),Ht=Q.pick({color:!0,symbol:!0,frame:!0}).required(),At=w.pick({color:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0}).required(),Dt=w.pick({color:!0,routingMode:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,distanceMarker:!0,endCaps:!0}).required(),Wt=$.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,areaMarker:!0}).required(),Kt=J.pick({color:!0,fillOpacity:!0,strokeOpacity:!0,strokeWidth:!0,strokeStyle:!0,radiusMarker:!0}).required(),_t=X.pick({color:!0,opacity:!0,size:!0}).required(),Qt=Y.pick({color:!0,opacity:!0}).extend({size:p.number().min(0).max(200)}).required(),$t=ee.pick({color:!0,align:!0,style:!0}).required(),Jt=te.pick({color:!0,align:!0,style:!0}).required(),Fe=p.discriminatedUnion("tool",[Ht.partial().extend({tool:p.literal("pin")}),At.partial().extend({tool:p.literal("line")}),Dt.partial().extend({tool:p.literal("route")}),Wt.partial().extend({tool:p.literal("polygon")}),Kt.partial().extend({tool:p.literal("circle")}),_t.partial().extend({tool:p.literal("marker")}),Qt.partial().extend({tool:p.literal("highlighter")}),$t.partial().extend({tool:p.literal("text")}),Jt.partial().extend({tool:p.literal("note")})]);var Yt=t("setTool",Pe.nullable()),eo=t("getTool",Xt.undefined()),to=i("onToolChange"),oo=t("setToolSettings",Fe),no=t("getToolSettings",ke),ro=i("onToolSettingsChange"),we={methods:[Yt,eo,oo,no],listeners:[to,ro]};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()}),ve=m.object({featureSelectPanel:m.boolean().optional(),featureHoverPanel:m.boolean().optional(),elementSelectPanel:m.boolean().optional(),linkClickOpen:m.boolean().optional(),imageLightboxOpen:m.boolean().optional()});var ao=t("updateUiControls",Ve),io=t("setOnMapInteractionsUi",ve),Oe={methods:[ao,io],listeners:null};import{z as je}from"zod";import{z as O}from"zod";var v=O.object({center:k,zoom:pe}),Ue=O.object({center:v.shape.center.optional(),zoom:v.shape.zoom.optional()}),Re=O.object({minZoom:v.shape.zoom.nullish(),maxZoom:v.shape.zoom.nullish(),bounds:G.nullish()}).nullable(),Ne=O.object({bounds:G});var so=t("getViewport",je.undefined()),lo=t("setViewport",Ue),po=t("getViewportConstraints",je.undefined()),mo=t("setViewportConstraints",Re),co=t("fitViewportToBounds",Ne),yo=i("onViewportMove"),go=i("onViewportMoveEnd"),uo=i("onMapIdle"),qe={methods:[lo,so,po,mo,co],listeners:[yo,go,uo]};var re=[Oe,qe,Ee,he,Ge,fe,we];function Bn(n,C,ae){let U=new Map;async function ie(g){if(!bo.safeParse(g.data).success){ae?.onUnknownMessage?.(g.data);return}let se=Be.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__:ho(E)})}}return n.addEventListener("message",ie),()=>{n.removeEventListener("message",ie)}}function ho(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 Ze={methods:re.map(n=>n.methods??[]).flat(),listeners:re.map(n=>n.listeners??[]).flat()},fo=c.discriminatedUnion("eventName",[c.strictObject({eventName:c.literal("")}),...Ze.listeners]),So=c.strictObject({type:c.literal("felt.addListener"),event:fo}),xo=c.strictObject({type:c.literal("felt.removeListener"),id:c.string()}),Mo=c.strictObject({type:c.literal("felt.ready")}),Be=c.discriminatedUnion("type",[Mo,So,xo,...Ze.methods]),bo=c.object({type:c.enum(Be.options.map(n=>n.shape.type.value))});export{Bn 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
- widthMultiplier: z.ZodOptional<z.ZodNumber>;
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
- widthMultiplier?: number | undefined;
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
- widthMultiplier?: number | undefined;
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
- widthMultiplier: z.ZodNumber;
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
- widthMultiplier: number;
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
- widthMultiplier: number;
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
- widthMultiplier: z.ZodOptional<z.ZodNumber>;
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
- widthMultiplier?: number | undefined;
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
- widthMultiplier?: number | undefined;
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;
@@ -2296,17 +2307,17 @@ declare const ViewportCenterZoomSchema: z.ZodObject<{
2296
2307
  }>;
2297
2308
  zoom: z.ZodNumber;
2298
2309
  }, "strip", z.ZodTypeAny, {
2310
+ zoom: number;
2299
2311
  center: {
2300
2312
  latitude: number;
2301
2313
  longitude: number;
2302
2314
  };
2303
- zoom: number;
2304
2315
  }, {
2316
+ zoom: number;
2305
2317
  center: {
2306
2318
  latitude: number;
2307
2319
  longitude: number;
2308
2320
  };
2309
- zoom: number;
2310
2321
  }>;
2311
2322
  /**
2312
2323
  * The current state of the viewport, including the derived bounds.
@@ -2356,17 +2367,17 @@ declare const SetViewportCenterZoomParamsSchema: z.ZodObject<{
2356
2367
  }>>;
2357
2368
  zoom: z.ZodOptional<z.ZodNumber>;
2358
2369
  }, "strip", z.ZodTypeAny, {
2370
+ zoom?: number | undefined;
2359
2371
  center?: {
2360
2372
  latitude: number;
2361
2373
  longitude: number;
2362
2374
  } | undefined;
2363
- zoom?: number | undefined;
2364
2375
  }, {
2376
+ zoom?: number | undefined;
2365
2377
  center?: {
2366
2378
  latitude: number;
2367
2379
  longitude: number;
2368
2380
  } | undefined;
2369
- zoom?: number | undefined;
2370
2381
  }>;
2371
2382
  /**
2372
2383
  * The constraints for the viewport. Used to ensure that the viewport stays