@proximahq-dev/map 1.1.5 → 1.1.6

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/README.md CHANGED
@@ -21,6 +21,6 @@
21
21
  const map = new ProximaMap({
22
22
  projectSlug: 'slug (e.g. nikola)',
23
23
  });
24
- map.initMap("mapContainer");
24
+ map.init("mapContainer");
25
25
  </script>;
26
26
  ```
@@ -2401,4 +2401,4 @@ html body {
2401
2401
  mapBoxZoom
2402
2402
  }
2403
2403
  }
2404
- }`,{slug:i},"project"),Xy=class Xy{constructor(s){Jv(this,"root");Jv(this,"config");this.root=null,this.config={mapboxStyleUrl:Pu.MapBox.StyleURL,initialZoom:Pu.MapBox.Center.zoom,initialCenter:[Pu.MapBox.Center.lng,Pu.MapBox.Center.lat],...s}}async initMap(s){const c=document.getElementById(s);if(!c){console.error("Container not found:",s);return}try{const f=await hU(this.config.projectSlug),_=JSON.parse(f.mapBox),E=_.features.find(T=>T.properties.Number===0);if(!E||!E.geometry)throw new Error("Development pin not found in initial features");f.settings&&(this.config.initialZoom=f.settings.mapBoxZoom?parseFloat(f.settings.mapBoxZoom):this.config.initialZoom,this.config.mapboxStyleUrl=f.settings.mapBoxStyleUrl||this.config.mapboxStyleUrl,f.settings.latitude&&f.settings.longitude&&(this.config.initialCenter=[parseFloat(f.settings.longitude),parseFloat(f.settings.latitude)])),this.root||(this.root=Aw(c)),this.root.render(wr.jsx(cU,{projectSlug:this.config.projectSlug,mapboxToken:Xy.MAPBOX_TOKEN,mapboxStyleUrl:this.config.mapboxStyleUrl||Pu.MapBox.StyleURL,initialCenter:this.config.initialCenter||[Pu.MapBox.Center.lng,Pu.MapBox.Center.lat],initialZoom:this.config.initialZoom||Pu.MapBox.Center.zoom,initialFeatures:_.features}))}catch(f){console.error("Failed to initialize map:",f)}}unmount(){this.root&&this.root.unmount()}};Jv(Xy,"MAPBOX_TOKEN",Pu.MapBox.AccessToken);let mb=Xy;return mb});
2404
+ }`,{slug:i},"project"),Xy=class Xy{constructor(s){Jv(this,"root");Jv(this,"config");this.root=null,this.config={mapboxStyleUrl:Pu.MapBox.StyleURL,initialZoom:Pu.MapBox.Center.zoom,initialCenter:[Pu.MapBox.Center.lng,Pu.MapBox.Center.lat],...s}}async init(s){const c=document.getElementById(s);if(!c){console.error("Container not found:",s);return}try{const f=await hU(this.config.projectSlug),_=JSON.parse(f.mapBox),E=_.features.find(T=>T.properties.Number===0);if(!E||!E.geometry)throw new Error("Development pin not found in initial features");f.settings&&(this.config.initialZoom=f.settings.mapBoxZoom?parseFloat(f.settings.mapBoxZoom):this.config.initialZoom,this.config.mapboxStyleUrl=f.settings.mapBoxStyleUrl||this.config.mapboxStyleUrl,f.settings.latitude&&f.settings.longitude&&(this.config.initialCenter=[parseFloat(f.settings.longitude),parseFloat(f.settings.latitude)])),this.root||(this.root=Aw(c)),this.root.render(wr.jsx(cU,{projectSlug:this.config.projectSlug,mapboxToken:Xy.MAPBOX_TOKEN,mapboxStyleUrl:this.config.mapboxStyleUrl||Pu.MapBox.StyleURL,initialCenter:this.config.initialCenter||[Pu.MapBox.Center.lng,Pu.MapBox.Center.lat],initialZoom:this.config.initialZoom||Pu.MapBox.Center.zoom,initialFeatures:_.features}))}catch(f){console.error("Failed to initialize map:",f)}}unmount(){this.root&&this.root.unmount()}};Jv(Xy,"MAPBOX_TOKEN",Pu.MapBox.AccessToken);let mb=Xy;return mb});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximahq-dev/map",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "type": "module",
5
5
  "main": "dist/proxima-map.umd.js",
6
6
  "files": [