@nika-js/onlymap 0.12.1 → 0.13.1

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +1 -1
  3. package/dist/{basemap-BK25o5OE.js → basemap-zG1-omic.js} +473 -443
  4. package/dist/basemap.d.ts +16 -3
  5. package/dist/build-Bbi4SleC.js +208 -0
  6. package/dist/cartograph.js +43 -41
  7. package/dist/cartograph.standalone.js +3 -1
  8. package/dist/client-CIH6ToMI.js +6878 -0
  9. package/dist/{geoparquet-CLydPm2f.js → geoparquet-CyWsYt9S.js} +1 -1
  10. package/dist/{globe-view-ChuX60M5.js → globe-view-Xelgj_KW.js} +6 -6
  11. package/dist/{hillshade-DD8WFrvf.js → hillshade-Zbg50lm6.js} +79 -67
  12. package/dist/hillshade.d.ts +7 -0
  13. package/dist/html-data.d.ts +1 -1
  14. package/dist/{index-CgVFHEdM.js → index-6eeSlSqN.js} +3 -3
  15. package/dist/{index-CMKrghNb.js → index-BL_YCKiW.js} +54 -54
  16. package/dist/{index-C2CKUsom.js → index-BbVnkgld.js} +38 -38
  17. package/dist/{index-CvrH6mbS.js → index-BtRsa5oc.js} +3 -3
  18. package/dist/{index-DIzzRLKr.js → index-BwtXeP_F.js} +1 -1
  19. package/dist/{index-Dvwr1Y3o.js → index-ClAPAqcm.js} +49 -49
  20. package/dist/{index-Bs69fn8a.js → index-CpFNIkOO.js} +33429 -30673
  21. package/dist/{index-CdAf0bLj.js → index-DnCmvLuC.js} +42 -42
  22. package/dist/index-JFuN4DCn.js +4449 -0
  23. package/dist/layer-registry.d.ts +1 -0
  24. package/dist/{lerc-mAijS40k.js → lerc-C3SKC6CU.js} +1 -1
  25. package/dist/onlymap.standalone.js +60762 -51701
  26. package/dist/onlymapjs.js +47 -47
  27. package/dist/plane-gpu/gpu-layer-types.d.ts +35 -0
  28. package/dist/plane-gpu/plane-basemap.d.ts +10461 -0
  29. package/dist/plane-gpu/plane-gpu-view.d.ts +90 -0
  30. package/dist/plane-gpu/projection-params.d.ts +47 -0
  31. package/dist/plane-layers.d.ts +2 -0
  32. package/dist/plane-seam.d.ts +48 -0
  33. package/dist/plane-tileset.d.ts +23 -2
  34. package/dist/plane-vector/build.d.ts +107 -0
  35. package/dist/plane-vector/client.d.ts +18 -0
  36. package/dist/plane-vector/cut-ends-extension.d.ts +30 -0
  37. package/dist/plane-vector/plane-mvt-layer.d.ts +10412 -0
  38. package/dist/plane-vector/tile-cut.d.ts +45 -0
  39. package/dist/plane-vector/worker.d.ts +15 -0
  40. package/dist/plane-warp.d.ts +12 -1
  41. package/dist/{post-process-effect-rwFDi8di.js → post-process-effect-C3P9VwC9.js} +11 -11
  42. package/dist/programmatic.d.ts +6 -0
  43. package/dist/projection.d.ts +51 -0
  44. package/dist/{raster-CXIqf83L.js → raster-BgCnz9-Z.js} +3 -3
  45. package/dist/{raster-pipeline-CfSg2Re7.js → raster-pipeline-CKdpKgFo.js} +1 -1
  46. package/dist/react/om-map.d.ts +4 -0
  47. package/dist/react.js +259 -252
  48. package/dist/runtime-core.d.ts +84 -2
  49. package/dist/{text-on-path-B08PekFz.js → text-on-path-BpVLX8Yt.js} +74 -66
  50. package/dist/version.d.ts +1 -1
  51. package/dist/{zarr-CUn2udOc.js → zarr-Cur_pzNa.js} +2 -2
  52. package/docs/cartograph.md +2 -2
  53. package/docs/cartography.md +59 -3
  54. package/docs/testing.md +2 -1
  55. package/llms.txt +2 -2
  56. package/onlymapjs.attributes.json +1 -0
  57. package/onlymapjs.html-data.json +15 -1
  58. package/package.json +3 -2
  59. package/skills/onlymapjs/SKILL.md +2 -2
  60. package/skills/onlymapjs/references/syntax.md +7 -6
  61. package/dist/index-BHRpKnGi.js +0 -4883
package/CHANGELOG.md CHANGED
@@ -8,6 +8,35 @@ Note: npm collapsed a few closely-spaced releases — the GPX/FlatGeobuf (0.5.4)
8
8
  and GeoParquet (0.5.5) work shipped to npm together as **0.5.6**, so npm's
9
9
  version list jumps 0.5.3 → 0.5.6. Each logical version is listed here regardless.
10
10
 
11
+ ## 0.13.1 — 2026-10-16
12
+
13
+ ### Fixed
14
+ - **A cartograph sheet now prints the basemap credit for every keyless preset.** A sheet whose live frame showed `dark-matter`, `positron`, `voyager`, `liberty` or `bright` printed no credit, and freezing the frame kept none, so exported and static sheets went out uncredited. Those presets carry their credit in each tile source's own metadata, which arrives after the style has loaded; the sheet now reads it from the loaded source and follows it when it arrives. Maps on their own were never affected.
15
+
16
+ ## 0.13.0 — 2026-10-15
17
+
18
+ ### Added
19
+ - **Projected maps are drawn by the GPU.** On a `crs` in the Transverse Mercator/UTM, Albers, Lambert Conformal Conic or Lambert Azimuthal Equal Area families — British National Grid, any UTM zone, NZTM, SVY21, CONUS and Australian Albers, Lambert-93, LAEA Europe, and grids on other ellipsoids or prime meridians — every point is placed by the graphics card, within a quarter of a pixel of proj4, on real GPUs and in software rendering alike. Layers keep their longitude/latitude, so the map draws as fast as in Web Mercator. Other projections draw as before, on the CPU. `OmMap.configureCrs({ gpuProjection: false })` turns the GPU path off.
20
+ - **`crs` is live.** Change it on a mounted map — the attribute, the `set-crs` action (`{ crs: "mercator" }` goes back), `MapController.setCrs`, or React's `crs` prop — and every layer re-projects in place with the camera where it was; a story step can switch the sheet's projection, and undo restores it. Between two GPU-drawn grids nothing is re-projected at all (polygon fills are triangulated again), and tiled layers keep the tiles they have. A `crs` that cannot resolve is reported and the map stays as it was.
21
+ - **Vector tiles on any projected map.** `MVTLayer` now works under every `crs`: each tile is cut to its edge, projected and triangulated off the main thread, so panning costs what it does in Web Mercator and a tile never freezes the page as it arrives. A `crs` switch rebuilds cached tiles without fetching them again.
22
+ - **A vector basemap on a projected map.** `basemap="positron"`, `"liberty"` or `"bright"` on any `crs` draws OpenFreeMap's vector tiles in the projection, in the preset's colours — land, water, parks, buildings, roads, rail, boundaries; no labels yet — credited automatically. Switching the preset recolours in place.
23
+ - **`color-domain` on `ScreenGridLayer`** fixes the value range its colour scale spans, as the other aggregation layers already allowed; it also makes a busy map pan more smoothly, since the layer no longer re-reads its range from the GPU on every camera move.
24
+ - **Two new examples:** *Switch the projection* (Singapore baselines measured in every plane against the WGS84 ellipsoid) and the *Projected map debugger* — every layer type on every projection family, with a readout of how each is drawn.
25
+
26
+ ### Changed
27
+ - **A geographic `crs` (`EPSG:4326`, NAD83, ETRS89, a `+proj=longlat` definition) is a warning, not an error.** It draws as plate carrée — one scale in degrees on both axes, as QGIS or ArcGIS draw an unprojected layout — which is exactly what a cartograph copying such a layout needs; the warning names the longitude stretch at your centre latitude. It used to be refused outright, and only for three codes.
28
+ - **Relief, image tiles and vector tiles on a projected map load only the tiles that meet the view.** Panning a projected map fetched and drew about two and a half times the tiles it showed.
29
+
30
+ ### Fixed
31
+ - **A country straddling a projection's seam no longer draws as a wedge across the map.** On CONUS Albers, Russia reached across Hudson Bay and the Arctic; polygons and lines are now cut at the seam, for GeoJSON and for CSV rows with `get-polygon`/`get-path` alike, each piece keeping its properties.
32
+ - **Polygons far from a projection's central meridian draw with solid fills** instead of fans of overlapping and missing triangles.
33
+ - **Data past a projection's range no longer breaks a whole layer, and never draws a line across the gap.** A Transverse Mercator map with world data in it works in Firefox, where it failed with "invalid array length" (ContourLayer) and "source array is too long" (TripsLayer).
34
+ - **Image tiles past a projection's range no longer throw** ("Illegal attribute generated for positions") when switching to some projections, and no longer draw the far side of the world folded over the near one.
35
+ - **Scrolling a projected map with a vector basemap no longer logs "Picked non-existent layer".**
36
+ - **A `crs` switch that fails leaves the map as it was** — including a map with a MapLibre basemap, which went blank — and keeps reporting its previous `crs`.
37
+ - **A heatmap on a GPU-drawn projected map panned at 4 frames a second**; it draws at full speed again.
38
+ - **The world-countries example data drew wedges over the Arctic** on every projection: islands were recorded as holes of one polygon. Repaired.
39
+
11
40
  ## 0.12.1 — 2026-10-12
12
41
 
13
42
  ### Fixed
package/README.md CHANGED
@@ -392,7 +392,7 @@ Two things it gets right that hand-rolled hillshades usually don't. **Tile edges
392
392
  </om-map>
393
393
  ```
394
394
 
395
- **The authored camera stays geographic.** `center` is lng/lat and `zoom` means what it always meant, so stories, `seek()`, `getCamera()` and every state bridge keep working; clicks report lng/lat rather than plane metres, which matters because a projected metre in a geodesic formula returns a confident wrong distance. Web Mercator and plate carrée need nothing; the national grids and UTM zones load proj4 only when a map asks for one; anything else takes `crs-def="+proj=…"` or `registerCrs()`. What a projected map can't do — MapLibre basemaps, `terrain`, pitch, spatial-index layers, vector tiles — is a validation error with a fix, never a silent no-op.
395
+ **The authored camera stays geographic.** `center` is lng/lat and `zoom` means what it always meant, so stories, `seek()`, `getCamera()` and every state bridge keep working; clicks report lng/lat rather than plane metres, which matters because a projected metre in a geodesic formula returns a confident wrong distance. Web Mercator and plate carrée need nothing; the national grids and UTM zones load proj4 only when a map asks for one; anything else takes `crs-def="+proj=…"` or `registerCrs()`. `crs` is live: change it on a mounted map (or with the `set-crs` action) and every layer re-projects in place, no reload, camera untouched — and between two grids the GPU draws nothing is re-projected at all (polygon fills are triangulated again, for the new plane). The GPU draws Transverse Mercator (British National Grid, NZTM, SVY21, any UTM zone), Albers, Lambert Conformal Conic and Lambert Azimuthal Equal Area grids: layers keep their lng/lat and placement agrees with proj4js to a fraction of a pixel; `OmMap.configureCrs({ gpuProjection: false })` puts every projected map back on the CPU. `MVTLayer` vector tiles work on any projected map — each tile is cut to its edge, projected and triangulated once, off the main thread, so panning costs what it does in Web Mercator — and so does `basemap="positron"`, `"liberty"` or `"bright"`: OpenFreeMap's vector tiles drawn in the plane in the preset's colours (land, water, roads, boundaries — no labels yet), credited automatically. What a projected map can't do — other MapLibre basemaps, `terrain`, pitch, a clip box, spatial-index layers — is a validation error with a fix, never a silent no-op.
396
396
 
397
397
  **Relief works on a projected sheet**, both ways: a DEM of your own has no projection tie at all, and the keyless global `HillshadeLayer` re-indexes its Mercator tiles from the plane's own geography and draws them as subdivided warped meshes (measured sub-pixel — 0.40 output pixels for Albers at z=3, falling as 1/N²). `sun-datum` picks which north the sun means: sheet north by default, because geographic north swings 34° across a CONUS plate and light that rotates reads as a mistake.
398
398