{"_id":"@amoradi/atlas","_rev":"2-7a505f923af175aac15b324b9b37530e","name":"@amoradi/atlas","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@amoradi/atlas","version":"0.1.0","keywords":["webgpu","map","geography","visualization","canvas","choropleth","geospatial"],"author":{"name":"amoradi"},"license":"MIT","_id":"@amoradi/atlas@0.1.0","maintainers":[{"name":"amoradi","email":"moradi.aaron@gmail.com"}],"homepage":"https://github.com/amoradi/atlas","bugs":{"url":"https://github.com/amoradi/atlas/issues"},"dist":{"shasum":"d4d9a031f31d20d98aa6e2862c70404eca6a0c6b","tarball":"https://registry.npmjs.org/@amoradi/atlas/-/atlas-0.1.0.tgz","fileCount":16,"integrity":"sha512-bnx6Y0IA+2zQdOo6EHXNMlwLGDy52q2w6d//baM3nmbbrOG6pRIrkFeGYg0POI5JIJoDA9WptVRMI4DZj6yhQw==","signatures":[{"sig":"MEUCIQDMR8g8Z5QPmZtxlGxupZ4PinO7dWfihD579I9/MluX2AIgHggBve5XjXd92Lcgw3r/cYepgOB5xXCIUyVu+48H9P8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90595},"main":"./dist/atlas.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/atlas.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/atlas.js","require":"./dist/atlas.cjs"}},"gitHead":"24474479480bfdf19d69898d41806fe04a8dcc0c","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","prepublishOnly":"npm run build"},"_npmUser":{"name":"amoradi","email":"moradi.aaron@gmail.com"},"repository":{"url":"git+https://github.com/amoradi/atlas.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight WebGPU-powered world map renderer","directories":{},"_nodeVersion":"23.7.0","dependencies":{"earcut":"^2.2.4"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.12","typescript":"^5.3.3","@types/earcut":"^3.0.0","@webgpu/types":"^0.1.40","vite-plugin-dts":"^3.7.2"},"_npmOperationalInternal":{"tmp":"tmp/atlas_0.1.0_1771526977435_0.023476303703723334","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@amoradi/atlas","version":"0.1.1","description":"A lightweight WebGPU-powered world map renderer","type":"module","main":"./dist/atlas.cjs","module":"./dist/atlas.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/atlas.js","require":"./dist/atlas.cjs","types":"./dist/index.d.ts"}},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","prepublishOnly":"npm run build"},"keywords":["webgpu","map","geography","visualization","canvas","choropleth","geospatial"],"author":{"name":"amoradi"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/amoradi/atlas.git"},"homepage":"https://github.com/amoradi/atlas","bugs":{"url":"https://github.com/amoradi/atlas/issues"},"devDependencies":{"@types/earcut":"^3.0.0","@webgpu/types":"^0.1.40","typescript":"^5.3.3","vite":"^5.0.12","vite-plugin-dts":"^3.7.2"},"dependencies":{"earcut":"^2.2.4"},"_id":"@amoradi/atlas@0.1.1","gitHead":"9392f26b0dba28e90732b52161e6b21c87f881e4","_nodeVersion":"23.7.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-IRCRzEbvntlvMmcJvHuUJSjJ4nSiprWTbC7JeX03mXzBieVBSC9PRfpqZr39d39tR9NrvzlDNQz9Vrccig6QKQ==","shasum":"8f880d682721ad0a1b147bc248b24d9f0908ae5c","tarball":"https://registry.npmjs.org/@amoradi/atlas/-/atlas-0.1.1.tgz","fileCount":16,"unpackedSize":90568,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD83VprlJGXOsMN7SLzGXbXBej9kZMoYacAnIzPc6DHkgIhAPfN00gIiwYIRWruBM65bNLyzUsl3e+UGUJVftMKyKj3"}]},"_npmUser":{"name":"amoradi","email":"moradi.aaron@gmail.com"},"directories":{},"maintainers":[{"name":"amoradi","email":"moradi.aaron@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/atlas_0.1.1_1771528341100_0.15946622088093187"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-19T18:49:37.323Z","modified":"2026-02-19T19:12:21.361Z","0.1.0":"2026-02-19T18:49:37.614Z","0.1.1":"2026-02-19T19:12:21.247Z"},"bugs":{"url":"https://github.com/amoradi/atlas/issues"},"author":{"name":"amoradi"},"license":"MIT","homepage":"https://github.com/amoradi/atlas","keywords":["webgpu","map","geography","visualization","canvas","choropleth","geospatial"],"repository":{"type":"git","url":"git+https://github.com/amoradi/atlas.git"},"description":"A lightweight WebGPU-powered world map renderer","maintainers":[{"name":"amoradi","email":"moradi.aaron@gmail.com"}],"readme":"# Atlas\n\nA lightweight WebGPU-powered world map renderer.\n\n![Atlas Demo](atlas-demo.gif)\n\n## Features\n\n- **WebGPU rendering** — fast, GPU-accelerated map drawing\n- **Pan & zoom** — smooth trackpad and mouse controls\n- **Themes** — light and dark modes with customizable colors\n- **Choropleth** — color countries by data values (GDP, population, etc.)\n- **Points layer** — render markers at coordinates\n- **TypeScript** — full type definitions included\n\n## Installation\n\n```bash\nnpm install @amoradi/atlas\n```\n\n## Quick Start\n\n```ts\nimport { Atlas } from '@amoradi/atlas'\n\nconst map = new Atlas({\n  container: '#map',\n  countries: true  // loads Natural Earth 110m\n})\n\nmap.on('click', (e) => {\n  console.log('Clicked:', e.lngLat)\n})\n```\n\nOr with a custom GeoJSON URL:\n\n```ts\nconst map = new Atlas({\n  container: '#map',\n  countries: 'https://example.com/countries.geojson'\n})\n```\n\n## Custom GeoJSON\n\nUse any GeoJSON with polygon geometries — not just world maps:\n\n```ts\n// US States\nconst map = new Atlas({\n  container: '#map',\n  countries: 'https://example.com/us-states.geojson'\n})\n\n// Color states by data\nawait map.addChoroplethLayer('population', stateData, {\n  geoJsonUrl: 'https://example.com/us-states.geojson',\n  colors: ['#eee', '#c00']\n})\n\n// Or load any custom polygons\nawait map.addCountryLayer('https://example.com/districts.geojson')\n```\n\n## Choropleth Layer\n\nColor countries by value:\n\n```ts\nawait map.addChoroplethLayer('gdp', gdpData, {\n  geoJsonUrl: 'countries.geojson',\n  colors: ['#2a3a45', '#4a6868'],\n  defaultColor: '#2a3a45'\n})\n\n// Update data dynamically\nmap.updateChoropleth('gdp', newData)\n```\n\n## Points Layer\n\nAdd markers:\n\n```ts\nawait map.addPointsLayer('cities', [\n  { lng: -74.006, lat: 40.7128, radius: 8, color: '#ff6b6b' },\n  { lng: 139.6917, lat: 35.6895, radius: 6, color: '#4ecdc4' },\n])\n\n// Update points\nmap.updatePoints('cities', newPoints)\n```\n\n## API\n\n### `new Atlas(options)`\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `container` | `string \\| HTMLElement` | required | Container element or selector |\n| `theme` | `'light' \\| 'dark' \\| Theme` | `'dark'` | Color theme |\n| `center` | `[lng, lat]` | `[0, 0]` | Initial center |\n| `zoom` | `number` | `1` | Initial zoom level |\n\n### Methods\n\n- `setTheme(theme)` — change theme\n- `setCenter(lng, lat)` — pan to location\n- `setZoom(level)` — set zoom level\n- `getCenter()` — get current center\n- `getZoom()` — get current zoom\n- `on(event, callback)` — listen for events\n- `off(event, callback)` — remove listener\n- `refresh()` — force re-render\n- `destroy()` — clean up resources\n\n### Events\n\n- `click` — fired on map click, includes `lngLat` and `pixel` coordinates\n\n## Custom Themes\n\n```ts\nconst map = new Atlas({\n  container: '#map',\n  theme: {\n    background: '#1a1a2e',\n    land: '#16213e',\n    borders: '#0f3460',\n    water: '#0a0a0a',\n    labels: '#eaeaea',\n    points: '#e94560'\n  }\n})\n```\n\n## Browser Support\n\nRequires WebGPU support. Currently available in:\n- Chrome 113+\n- Edge 113+\n- Firefox (behind flag)\n- Safari 17+ (macOS Sonoma)\n\n## Development\n\n```bash\nnpm install\nnpm run dev     # Start dev server\nnpm run build   # Build for production\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}