isard-map 2.1.2__tar.gz → 2.2.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: isard-map
3
- Version: 2.1.2
3
+ Version: 2.2.0
4
4
  Summary: isard maps in Jupyter: the IGN's WebGL2 map engine (globe, relief, 3D Tiles, vector tiles) as a notebook widget
5
5
  Project-URL: Homepage, https://github.com/IGNF/isard
6
6
  Project-URL: Documentation, https://github.com/IGNF/isard/tree/main/packages/python
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "isard-map"
3
- version = "2.1.2"
3
+ version = "2.2.0"
4
4
  description = "isard maps in Jupyter: the IGN's WebGL2 map engine (globe, relief, 3D Tiles, vector tiles) as a notebook widget"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -5,5 +5,5 @@ from ._geoplateforme import geoplateforme_wfs
5
5
  from ._js import JsObject, js, ref
6
6
  from ._map import Map
7
7
 
8
- __version__ = "2.1.2"
8
+ __version__ = "2.2.0"
9
9
  __all__ = ["JsObject", "Map", "geoplateforme_wfs", "js", "prop", "ref", "to_geojson", "__version__"]
@@ -1,5 +1,5 @@
1
- // Made by `bun scripts/build-widget.ts` from js/widget.ts: not to edit (isard 2.1.2)
2
- var A="2.1.2";var re=`https://cdn.jsdelivr.net/npm/isard@${A}/dist/index.js`,j=`(() => {
1
+ // Made by `bun scripts/build-widget.ts` from js/widget.ts: not to edit (isard 2.2.0)
2
+ var A="2.2.0";var re=`https://cdn.jsdelivr.net/npm/isard@${A}/dist/index.js`,j=`(() => {
3
3
  const Native = window.Worker;
4
4
  window.Worker = class extends Native {
5
5
  constructor(url, options) {
@@ -14,4 +14,4 @@ var A="2.1.2";var re=`https://cdn.jsdelivr.net/npm/isard@${A}/dist/index.js`,j=`
14
14
  super(URL.createObjectURL(new Blob([source], { type: 'text/javascript' })), options);
15
15
  }
16
16
  };
17
- })();`;import{GeoMap as B}from"https://cdn.jsdelivr.net/npm/isard@2.1.2/dist/index.js";import*as O from"https://cdn.jsdelivr.net/npm/isard@2.1.2/dist/index.js";var v=(e,n)=>Function("isard","map",`return (${e});`)(O,n),R={isard:async()=>O,"isard/geoplateforme":()=>import("https://cdn.jsdelivr.net/npm/isard@2.1.2/dist/geoplateforme.js"),"isard/formats":()=>import("https://cdn.jsdelivr.net/npm/isard@2.1.2/dist/formats.js"),"isard/projections":()=>import("https://cdn.jsdelivr.net/npm/isard@2.1.2/dist/projections.js")},m=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),u=(e,n=0)=>{if(e===null||["string","number","boolean"].includes(typeof e))return e;if(n>8)return null;if(ArrayBuffer.isView(e)&&!(e instanceof DataView))return Array.from(e);if(Array.isArray(e))return e.map((t)=>u(t,n+1));if(!m(e))return null;let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)return null;return Object.fromEntries(Object.entries(e).map(([t,a])=>[t,u(a,n+1)]))},D=async(e)=>{let[n,r]=e.includes(":")?e.split(":",2):["isard",e],t=R[n??"isard"];if(!t)throw Error(`isard: no entry point ${n}`);return(r??"").split(".").reduce((a,i)=>m(a)||typeof a==="object"?Reflect.get(Object(a),i):void 0,await t())};class k{event;handles=new Map;queue=Promise.resolve();constructor(e,n){this.event=n;this.handles.set("map",e)}async resolve(e,n){if((n==="data"||n==="values")&&!(m(e)&&Object.keys(e).some((t)=>t.startsWith("$"))))return e;if(Array.isArray(e))return Promise.all(e.map((t)=>this.resolve(t)));if(!m(e))return e;if(typeof e.$handle==="string"){if(!this.handles.has(e.$handle))throw Error(`isard: nothing kept as ${e.$handle}`);return this.handles.get(e.$handle)}if(typeof e.$date==="string")return new Date(e.$date);if(typeof e.$bytes==="string")return Uint8Array.from(atob(e.$bytes),(t)=>t.charCodeAt(0));if(typeof e.$isard==="string")return D(e.$isard);if(typeof e.$js==="string")return v(e.$js,this.handles.get("map"));if(typeof e.$callback==="number"){let t=e.$callback;return(...a)=>this.event(t,a.map((i)=>u(i)))}if(typeof e.property==="string"&&Object.keys(e).every((t)=>t==="property"||t==="default")){let{property:t,default:a}=e;return(i)=>i?.[t]??a}let r=await Promise.all(Object.entries(e).map(async([t,a])=>[t,await this.resolve(a,t)]));return Object.fromEntries(r)}run(e){let n=this.queue.then(async()=>{let r=e.target.startsWith("module:")?await R[e.target.slice(7)]?.():this.handles.get(e.target);if(e.access==="value"&&this.handles.has(e.target))return u(r);if(r===void 0)throw Error(`isard: nothing kept as ${e.target}`);if(e.access){let s=e.access==="get"?Reflect.get(Object(r),e.method):Reflect.set(Object(r),e.method,await this.resolve(e.args[0]));if(e.handle)this.handles.set(e.handle,s);return u(s)}let t=Reflect.get(Object(r),e.method);if(typeof t!=="function")throw Error(`isard: ${e.target} has no ${e.method}`);let a=await Promise.all(e.args.map((s)=>this.resolve(s))),i=await(e.construct?Reflect.construct(t,a):Reflect.apply(t,r,a));if(e.handle)this.handles.set(e.handle,i);return u(i)});return this.queue=n.catch(()=>{return}),n}}var f=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),I=["setCamera","easeTo","flyTo","getCamera","pickSurface"],_=(e)=>f(e)&&typeof e.id==="string"&&typeof e.type==="string",E=(e)=>Array.isArray(e)&&e.every(_),F=(e)=>typeof e==="string"&&I.includes(e);var V=(e)=>{if(!f(e))return!1;switch(e.kind){case"init":return f(e.options)&&E(e.layers);case"layers":return E(e.layers);case"call":return typeof e.id==="number"&&F(e.method)&&Array.isArray(e.args);case"invoke":return typeof e.id==="number"&&typeof e.target==="string"&&typeof e.method==="string"&&Array.isArray(e.args)&&(e.handle===void 0||typeof e.handle==="string")&&(e.access===void 0||e.access==="get"||e.access==="set"||e.access==="value");default:return!1}};var w=(e)=>{let n=L(e);return V(n)?n:void 0},L=(e)=>{if(typeof e!=="string")return e;try{return JSON.parse(e)}catch{return}},y=({id:e,...n})=>n,W=(e)=>f(e)&&typeof e.property==="string"&&Object.keys(e).every((n)=>n==="property"||n==="default"),S=(e,n)=>({...Object.fromEntries(Object.entries(e).map(([r,t])=>{if(n&&f(t)&&typeof t.$js==="string")return[r,n(t.$js)];if(r==="data"||r==="values"||!W(t))return[r,t];let{property:a,default:i}=t;return[r,(s)=>s?.[a]??i]})),type:e.type}),T=(e,n)=>{let r=new Map(n.map((a)=>[a.id,a])),t={add:[],data:[],rebuild:[],remove:[]};return r.forEach((a,i)=>{let s=e.get(i);if(s===void 0){t.add.push(a);return}if(s===JSON.stringify(y(a)))return;let d=L(s),{data:p,values:l,...o}=f(d)?d:{},{data:c,values:g,...h}=y(a);(JSON.stringify(o)===JSON.stringify(h)?t.data:t.rebuild).push(a)}),e.forEach((a,i)=>{if(!r.has(i))t.remove.push(i)}),t};var G=()=>{let e=Reflect.get(window,"ReactNativeWebView"),n=typeof e==="object"&&e!==null?Reflect.get(e,"postMessage"):void 0;return typeof n==="function"?{postMessage:(r)=>Reflect.apply(n,e,[r])}:void 0},q=()=>{let e=G();return{send:(r)=>{let t=JSON.stringify(r);if(e)e.postMessage(t);else window.parent.postMessage(t,"*")},listen:(r)=>{let t=(a)=>{let i=a instanceof MessageEvent?w(a.data):void 0;if(i)r(i)};window.addEventListener("message",t),document.addEventListener("message",t)}}},U=(e)=>{let n=Reflect.get(e,"setData");return typeof n==="function"?(r)=>Reflect.apply(n,e,[r]):void 0},C=(e,n)=>{let r=Reflect.get(e,"setValues");if(typeof r!=="function"||!Array.isArray(n))return;Reflect.apply(r,e,[Float32Array.from(n,(t)=>typeof t==="number"?t:Number.NaN)])};class P{map;held=new Map;constructor(e){this.map=e}set(e){let n=T(new Map([...this.held].map(([t,{json:a}])=>[t,a])),e);n.remove.forEach((t)=>{this.held.get(t)?.layer.remove(),this.held.delete(t)}),n.data.forEach((t)=>{let a=this.held.get(t.id),i=a&&U(a.layer);if(a&&i&&K(t.data))i(t.data),C(a.layer,t.values),a.json=JSON.stringify(y(t));else n.rebuild.push(t)}),n.rebuild.forEach((t)=>{this.held.get(t.id)?.layer.remove(),this.held.delete(t.id)}),[...n.add,...n.rebuild].forEach((t)=>{let{values:a,...i}=y(t),s=this.map.add(S({...i,type:t.type},(d)=>v(d,this.map)));C(s,a),this.held.set(t.id,{layer:s,json:JSON.stringify(y(t))})});let r=e.flatMap(({id:t})=>this.held.get(t)?.layer??[]);r.slice(0,-1).forEach((t,a)=>{t.moveBefore(r[a+1])})}idOf(e){return[...this.held].find(([,n])=>n.layer===e)?.[0]}get all(){return[...this.held.values()].map(({layer:e})=>e)}}var z=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),K=(e)=>typeof e==="object"&&e!==null&&("type"in e),N=(e)=>{let{center:n,zoom:r,pitch:t,bearing:a}=e.getCamera();return{center:n,zoom:r,pitch:t,bearing:a}},H=(e)=>({setCamera:(n)=>e.setCamera(n),easeTo:(n,r)=>e.easeTo(n,r),flyTo:(n,r)=>e.flyTo(n,r===void 0?{}:{duration:r}),getCamera:()=>N(e),pickSurface:(n)=>e.pickSurface(n)}),Q=(e,n,r)=>Reflect.apply(e[n],void 0,r),x=(e=q(),n)=>{let r={waiting:[]},t=(s)=>e.send({kind:"error",message:String(s)}),a=(s)=>{let{map:d,layers:p,invoker:l}=r;if(s.kind==="init"){if(r.map)return;i(s.options,s.layers).catch(t);return}if(!d||!p||!l){r.waiting.push(s);return}if(s.kind==="layers"){try{p.set(s.layers)}catch(o){t(o)}return}if(s.kind==="invoke"){let{id:o}=s;l.run(s).then((c)=>e.send({kind:"result",id:o,value:s.answer?c??null:null}),(c)=>e.send({kind:"failed",id:o,message:String(c)}));return}try{e.send({kind:"result",id:s.id,value:Q(H(d),s.method,s.args)??null})}catch(o){e.send({kind:"failed",id:s.id,message:String(o)})}},i=async(s,d)=>{let p=n??document.getElementById("map");if(!p)throw Error("the page has no #map");let l=await new k({},()=>{return}).resolve(s),o=await B.create(p,z(l)?l:s);if(r.gone){o.destroy();return}let c=new P(o);r.map=o,r.layers=c,r.invoker=new k(o,(g,h)=>e.send({kind:"event",callback:g,args:h})),c.set(d),o.on("click",async({point:g,lonLat:h})=>{let b=await o.pickFeature(g,{layers:c.all}),M=b&&c.idOf(b.layer),J={point:g,lonLat:h,feature:M?{layer:M,properties:b.feature?.properties??{}}:void 0};e.send({kind:"click",click:J})}),o.on("moveend",()=>e.send({kind:"moveend",camera:N(o)})),e.send({kind:"ready"}),r.waiting.splice(0).forEach(a)};return e.listen(a),e.send({kind:"loaded"}),()=>{r.gone=!0,r.map?.destroy()}};var X=()=>{if(document.querySelector("script[data-isard-workers]"))return;let e=document.createElement("script");e.dataset.isardWorkers="",e.textContent=j,document.head.append(e)},Y=(e,n)=>({send:(r)=>{if(r.kind==="moveend"){e.set("camera",r.camera),e.save_changes();return}if(r.kind==="error"||r.kind==="failed")console.error(`isard: ${r.message}`);e.send(r)},listen:(r)=>{let t=()=>r({kind:"layers",layers:e.get("layers")}),a=(i)=>{let s=w(typeof i==="string"?i:JSON.stringify(i));if(s?.kind==="call"||s?.kind==="invoke")r(s)};e.on("change:layers",t),e.on("msg:custom",a),n.push(()=>e.off("change:layers",t),()=>e.off("msg:custom",a)),r({kind:"init",options:e.get("options"),layers:e.get("layers")})}}),fe={render({model:e,el:n}){X();let r=document.createElement("div");r.style.position="relative",r.style.width="100%",r.style.height=e.get("height"),n.append(r);let t=[],a=x(Y(e,t),r);return()=>{t.forEach((i)=>{i()}),a()}}};export{fe as default};
17
+ })();`;import{GeoMap as B}from"https://cdn.jsdelivr.net/npm/isard@2.2.0/dist/index.js";import*as O from"https://cdn.jsdelivr.net/npm/isard@2.2.0/dist/index.js";var v=(e,n)=>Function("isard","map",`return (${e});`)(O,n),R={isard:async()=>O,"isard/geoplateforme":()=>import("https://cdn.jsdelivr.net/npm/isard@2.2.0/dist/geoplateforme.js"),"isard/formats":()=>import("https://cdn.jsdelivr.net/npm/isard@2.2.0/dist/formats.js"),"isard/projections":()=>import("https://cdn.jsdelivr.net/npm/isard@2.2.0/dist/projections.js")},m=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),u=(e,n=0)=>{if(e===null||["string","number","boolean"].includes(typeof e))return e;if(n>8)return null;if(ArrayBuffer.isView(e)&&!(e instanceof DataView))return Array.from(e);if(Array.isArray(e))return e.map((t)=>u(t,n+1));if(!m(e))return null;let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)return null;return Object.fromEntries(Object.entries(e).map(([t,a])=>[t,u(a,n+1)]))},D=async(e)=>{let[n,r]=e.includes(":")?e.split(":",2):["isard",e],t=R[n??"isard"];if(!t)throw Error(`isard: no entry point ${n}`);return(r??"").split(".").reduce((a,i)=>m(a)||typeof a==="object"?Reflect.get(Object(a),i):void 0,await t())};class k{event;handles=new Map;queue=Promise.resolve();constructor(e,n){this.event=n;this.handles.set("map",e)}async resolve(e,n){if((n==="data"||n==="values")&&!(m(e)&&Object.keys(e).some((t)=>t.startsWith("$"))))return e;if(Array.isArray(e))return Promise.all(e.map((t)=>this.resolve(t)));if(!m(e))return e;if(typeof e.$handle==="string"){if(!this.handles.has(e.$handle))throw Error(`isard: nothing kept as ${e.$handle}`);return this.handles.get(e.$handle)}if(typeof e.$date==="string")return new Date(e.$date);if(typeof e.$bytes==="string")return Uint8Array.from(atob(e.$bytes),(t)=>t.charCodeAt(0));if(typeof e.$isard==="string")return D(e.$isard);if(typeof e.$js==="string")return v(e.$js,this.handles.get("map"));if(typeof e.$callback==="number"){let t=e.$callback;return(...a)=>this.event(t,a.map((i)=>u(i)))}if(typeof e.property==="string"&&Object.keys(e).every((t)=>t==="property"||t==="default")){let{property:t,default:a}=e;return(i)=>i?.[t]??a}let r=await Promise.all(Object.entries(e).map(async([t,a])=>[t,await this.resolve(a,t)]));return Object.fromEntries(r)}run(e){let n=this.queue.then(async()=>{let r=e.target.startsWith("module:")?await R[e.target.slice(7)]?.():this.handles.get(e.target);if(e.access==="value"&&this.handles.has(e.target))return u(r);if(r===void 0)throw Error(`isard: nothing kept as ${e.target}`);if(e.access){let s=e.access==="get"?Reflect.get(Object(r),e.method):Reflect.set(Object(r),e.method,await this.resolve(e.args[0]));if(e.handle)this.handles.set(e.handle,s);return u(s)}let t=Reflect.get(Object(r),e.method);if(typeof t!=="function")throw Error(`isard: ${e.target} has no ${e.method}`);let a=await Promise.all(e.args.map((s)=>this.resolve(s))),i=await(e.construct?Reflect.construct(t,a):Reflect.apply(t,r,a));if(e.handle)this.handles.set(e.handle,i);return u(i)});return this.queue=n.catch(()=>{return}),n}}var f=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),I=["setCamera","easeTo","flyTo","getCamera","pickSurface"],_=(e)=>f(e)&&typeof e.id==="string"&&typeof e.type==="string",E=(e)=>Array.isArray(e)&&e.every(_),F=(e)=>typeof e==="string"&&I.includes(e);var V=(e)=>{if(!f(e))return!1;switch(e.kind){case"init":return f(e.options)&&E(e.layers);case"layers":return E(e.layers);case"call":return typeof e.id==="number"&&F(e.method)&&Array.isArray(e.args);case"invoke":return typeof e.id==="number"&&typeof e.target==="string"&&typeof e.method==="string"&&Array.isArray(e.args)&&(e.handle===void 0||typeof e.handle==="string")&&(e.access===void 0||e.access==="get"||e.access==="set"||e.access==="value");default:return!1}};var w=(e)=>{let n=L(e);return V(n)?n:void 0},L=(e)=>{if(typeof e!=="string")return e;try{return JSON.parse(e)}catch{return}},y=({id:e,...n})=>n,W=(e)=>f(e)&&typeof e.property==="string"&&Object.keys(e).every((n)=>n==="property"||n==="default"),S=(e,n)=>({...Object.fromEntries(Object.entries(e).map(([r,t])=>{if(n&&f(t)&&typeof t.$js==="string")return[r,n(t.$js)];if(r==="data"||r==="values"||!W(t))return[r,t];let{property:a,default:i}=t;return[r,(s)=>s?.[a]??i]})),type:e.type}),T=(e,n)=>{let r=new Map(n.map((a)=>[a.id,a])),t={add:[],data:[],rebuild:[],remove:[]};return r.forEach((a,i)=>{let s=e.get(i);if(s===void 0){t.add.push(a);return}if(s===JSON.stringify(y(a)))return;let d=L(s),{data:p,values:l,...o}=f(d)?d:{},{data:c,values:g,...h}=y(a);(JSON.stringify(o)===JSON.stringify(h)?t.data:t.rebuild).push(a)}),e.forEach((a,i)=>{if(!r.has(i))t.remove.push(i)}),t};var G=()=>{let e=Reflect.get(window,"ReactNativeWebView"),n=typeof e==="object"&&e!==null?Reflect.get(e,"postMessage"):void 0;return typeof n==="function"?{postMessage:(r)=>Reflect.apply(n,e,[r])}:void 0},q=()=>{let e=G();return{send:(r)=>{let t=JSON.stringify(r);if(e)e.postMessage(t);else window.parent.postMessage(t,"*")},listen:(r)=>{let t=(a)=>{let i=a instanceof MessageEvent?w(a.data):void 0;if(i)r(i)};window.addEventListener("message",t),document.addEventListener("message",t)}}},U=(e)=>{let n=Reflect.get(e,"setData");return typeof n==="function"?(r)=>Reflect.apply(n,e,[r]):void 0},C=(e,n)=>{let r=Reflect.get(e,"setValues");if(typeof r!=="function"||!Array.isArray(n))return;Reflect.apply(r,e,[Float32Array.from(n,(t)=>typeof t==="number"?t:Number.NaN)])};class P{map;held=new Map;constructor(e){this.map=e}set(e){let n=T(new Map([...this.held].map(([t,{json:a}])=>[t,a])),e);n.remove.forEach((t)=>{this.held.get(t)?.layer.remove(),this.held.delete(t)}),n.data.forEach((t)=>{let a=this.held.get(t.id),i=a&&U(a.layer);if(a&&i&&K(t.data))i(t.data),C(a.layer,t.values),a.json=JSON.stringify(y(t));else n.rebuild.push(t)}),n.rebuild.forEach((t)=>{this.held.get(t.id)?.layer.remove(),this.held.delete(t.id)}),[...n.add,...n.rebuild].forEach((t)=>{let{values:a,...i}=y(t),s=this.map.add(S({...i,type:t.type},(d)=>v(d,this.map)));C(s,a),this.held.set(t.id,{layer:s,json:JSON.stringify(y(t))})});let r=e.flatMap(({id:t})=>this.held.get(t)?.layer??[]);r.slice(0,-1).forEach((t,a)=>{t.moveBefore(r[a+1])})}idOf(e){return[...this.held].find(([,n])=>n.layer===e)?.[0]}get all(){return[...this.held.values()].map(({layer:e})=>e)}}var z=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),K=(e)=>typeof e==="object"&&e!==null&&("type"in e),N=(e)=>{let{center:n,zoom:r,pitch:t,bearing:a}=e.getCamera();return{center:n,zoom:r,pitch:t,bearing:a}},H=(e)=>({setCamera:(n)=>e.setCamera(n),easeTo:(n,r)=>e.easeTo(n,r),flyTo:(n,r)=>e.flyTo(n,r===void 0?{}:{duration:r}),getCamera:()=>N(e),pickSurface:(n)=>e.pickSurface(n)}),Q=(e,n,r)=>Reflect.apply(e[n],void 0,r),x=(e=q(),n)=>{let r={waiting:[]},t=(s)=>e.send({kind:"error",message:String(s)}),a=(s)=>{let{map:d,layers:p,invoker:l}=r;if(s.kind==="init"){if(r.map)return;i(s.options,s.layers).catch(t);return}if(!d||!p||!l){r.waiting.push(s);return}if(s.kind==="layers"){try{p.set(s.layers)}catch(o){t(o)}return}if(s.kind==="invoke"){let{id:o}=s;l.run(s).then((c)=>e.send({kind:"result",id:o,value:s.answer?c??null:null}),(c)=>e.send({kind:"failed",id:o,message:String(c)}));return}try{e.send({kind:"result",id:s.id,value:Q(H(d),s.method,s.args)??null})}catch(o){e.send({kind:"failed",id:s.id,message:String(o)})}},i=async(s,d)=>{let p=n??document.getElementById("map");if(!p)throw Error("the page has no #map");let l=await new k({},()=>{return}).resolve(s),o=await B.create(p,z(l)?l:s);if(r.gone){o.destroy();return}let c=new P(o);r.map=o,r.layers=c,r.invoker=new k(o,(g,h)=>e.send({kind:"event",callback:g,args:h})),c.set(d),o.on("click",async({point:g,lonLat:h})=>{let b=await o.pickFeature(g,{layers:c.all}),M=b&&c.idOf(b.layer),J={point:g,lonLat:h,feature:M?{layer:M,properties:b.feature?.properties??{}}:void 0};e.send({kind:"click",click:J})}),o.on("moveend",()=>e.send({kind:"moveend",camera:N(o)})),e.send({kind:"ready"}),r.waiting.splice(0).forEach(a)};return e.listen(a),e.send({kind:"loaded"}),()=>{r.gone=!0,r.map?.destroy()}};var X=()=>{if(document.querySelector("script[data-isard-workers]"))return;let e=document.createElement("script");e.dataset.isardWorkers="",e.textContent=j,document.head.append(e)},Y=(e,n)=>({send:(r)=>{if(r.kind==="moveend"){e.set("camera",r.camera),e.save_changes();return}if(r.kind==="error"||r.kind==="failed")console.error(`isard: ${r.message}`);e.send(r)},listen:(r)=>{let t=()=>r({kind:"layers",layers:e.get("layers")}),a=(i)=>{let s=w(typeof i==="string"?i:JSON.stringify(i));if(s?.kind==="call"||s?.kind==="invoke")r(s)};e.on("change:layers",t),e.on("msg:custom",a),n.push(()=>e.off("change:layers",t),()=>e.off("msg:custom",a)),r({kind:"init",options:e.get("options"),layers:e.get("layers")})}}),fe={render({model:e,el:n}){X();let r=document.createElement("div");r.style.position="relative",r.style.width="100%",r.style.height=e.get("height"),n.append(r);let t=[],a=x(Y(e,t),r);return()=>{t.forEach((i)=>{i()}),a()}}};export{fe as default};
@@ -677,7 +677,7 @@ wheels = [
677
677
 
678
678
  [[package]]
679
679
  name = "isard-map"
680
- version = "2.1.2"
680
+ version = "2.2.0"
681
681
  source = { editable = "." }
682
682
  dependencies = [
683
683
  { name = "anywidget" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes