@nika-js/onlymap 0.6.26 → 0.7.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 (33) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +2 -2
  3. package/dist/{LercDecode.es-B4KknLMs.js → LercDecode.es-gFG_4xNk.js} +1 -1
  4. package/dist/{basemap-C4bmWq6M.js → basemap-oVln_CKU.js} +1 -1
  5. package/dist/elements/om-map.d.ts +9 -1
  6. package/dist/{geoparquet-BPMda753.js → geoparquet-CufpN8G1.js} +1 -1
  7. package/dist/{index-DtU_XhTX.js → index--zvhxlLl.js} +2 -2
  8. package/dist/{index-B5hsHnPl.js → index-CLe7spTj.js} +1 -1
  9. package/dist/{index-COuIQk2Z.js → index-CnwhAoQ5.js} +11283 -11046
  10. package/dist/{index-DMT_7aV3.js → index-DEIMxmvY.js} +1 -1
  11. package/dist/{index-DK5w4OxN.js → index-EXrBWGX7.js} +1 -1
  12. package/dist/index.d.ts +1 -1
  13. package/dist/layer-registry.d.ts +10 -0
  14. package/dist/{lerc-BNW5A6zN.js → lerc-nHFgnN0N.js} +2 -2
  15. package/dist/onlymap.standalone.js +29352 -28617
  16. package/dist/onlymapjs.js +91 -89
  17. package/dist/{raster-eMqzBMQf.js → raster-CE4jsgUi.js} +1086 -799
  18. package/dist/raster-identify.d.ts +19 -0
  19. package/dist/{raster-pipeline-Dg-GSDP3.js → raster-pipeline-ghFqryqb.js} +665 -453
  20. package/dist/raster-pipeline.d.ts +109 -14
  21. package/dist/raster.d.ts +135 -1
  22. package/dist/react.js +253 -234
  23. package/dist/runtime-core.d.ts +23 -0
  24. package/dist/version.d.ts +1 -1
  25. package/dist/widget-layout.d.ts +18 -0
  26. package/dist/{zarr-Dv7OiUcg.js → zarr-DjEYckHG.js} +10 -3
  27. package/docs/design/cog-v2.md +223 -0
  28. package/llms.txt +2 -2
  29. package/onlymapjs.attributes.json +9 -0
  30. package/onlymapjs.html-data.json +24 -0
  31. package/package.json +1 -1
  32. package/skills/onlymapjs/SKILL.md +1 -1
  33. package/skills/onlymapjs/references/syntax.md +12 -7
package/CHANGELOG.md CHANGED
@@ -8,6 +8,28 @@ 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.7.1 — 2026-09-03
12
+
13
+ ### Fixed
14
+ - **A misspelled or invented `<om-behavior action="...">` is now flagged instead of silently doing nothing.** An action the library does not recognise never ran — the manifest validated clean and the interaction was simply dead until someone clicked it. Validation now warns, names the action, and points at the right one (for a click popup that is `show-tooltip` or `show-overlay`). It stays a warning, not an error, because `OmMap.registerAction` may add the action later.
15
+ - **`identify="off"` now actually frees the memory it promised.** The docs said it drops the CPU-retained decode; it only skipped the pixel lookup while still holding every tile's full-band array. Off-mode now releases the array and reports its real GPU-side footprint, which is the difference that matters in a memory-tight WebView. The trade is honest: with the decode released, changing `bands` (or turning identify back on) refetches.
16
+
17
+ ### Changed
18
+ - **The agent guide documents the `draw-*` actions.** `draw-mode`, `draw-commit`, `draw-cancel`, `draw-delete`, `draw-clear`, `draw-config` and `draw-save` drive the same sketch store a `data="draw:<target>"` layer reads, so a custom toolbar can replace the built-in draw widget entirely — they were implemented but missing from `llms.txt`. A test now keeps every built-in widget type and action named there, so the guide cannot fall behind the runtime again.
19
+
20
+ ## 0.7.0 — 2026-09-02
21
+
22
+ ### Added
23
+ - **Choose which bands of a GeoTIFF to display — including false-color composites.** `bands="4"` shows a single band through a colormap; `bands="[8,4,3]"` builds an RGB composite (the classic false-color vegetation view from a multispectral scene). Switching bands never re-downloads anything: every band is decoded once and kept, so flipping between views is instant. (#13)
24
+ - **DEMs and satellite scenes no longer render blank or black without hand-tuned min/max.** Non-8-bit rasters with no styling now stretch themselves automatically from the file's own statistics, so "my COG shows nothing" is gone — a console notice reports the window it derived. `rescale="auto"` requests the same treatment explicitly, and with a band triple each band gets its own window. Authored `min`/`max` always win, and both now accept per-band `[r,g,b]` triples. (#13)
25
+ - **Click a raster to read the pixel under the cursor.** A click or hover on a COG with no vector feature in the way now carries the pixel's values through the ordinary selection — `{{value}}` in an overlay shows the elevation under a click with zero extra wiring, and `{{band_1}}`…`{{band_n}}` address composites. `identify="off"` opts a layer out. (#13)
26
+ - **More control over how a raster looks:** `reverse` flips any colormap, `stretch="log"`/`"sqrt"` and `gamma` shape the display curve — all GPU-side, no re-downloads. Paletted GeoTIFFs (land-cover classifications) now render through their embedded color table and produce a proper classes legend. (#13)
27
+ - **Raster problems now say what's wrong instead of rendering nothing.** A server that refuses cross-origin Range requests, a plain non-cloud-optimized GeoTIFF, or a `bands` pick beyond what the file has — each surfaces as a structured validation error with a concrete fix, while the rest of the map keeps working. (#13)
28
+
29
+ ### Fixed
30
+ - **Double-click zoom works again on maps without a basemap.** A click-reliability improvement for the drawing tools had silently disabled double-click zoom in standalone mode; it's back — zooms in about the point you clicked, shift-double-click zooms out.
31
+ - **The provider attribution no longer overlaps the license badge on narrow maps.** The bottom chrome now measures itself and stacks cleanly at any width, instead of colliding at phone sizes.
32
+
11
33
  ## 0.6.26 — 2026-09-02
12
34
 
13
35
  ### Added
package/README.md CHANGED
@@ -49,7 +49,7 @@ deck.gl is the best WebGL data-visualization engine there is — and OnlyMapJS i
49
49
  |---|---|---|
50
50
  | Setup | `new Deck({...})`, canvas + basemap sync wiring | one `<om-map>` element (or `<OmMap>` in React) |
51
51
  | State | your reducers/stores drive `setProps` | the manifest **is** the state — edit an attribute, the map reconciles; undo/redo built in |
52
- | Data loading | fetch + parse + reload yourself | `data="…"` — GeoJSON, CSV, Arrow/GeoArrow, Shapefile, KML, GPX, FlatGeobuf, GeoParquet, CityJSON, WebSocket streams, polled REST, tiled XYZ/vector (`TileLayer`/`MVTLayer`); GeoTIFF/COG rasters via `COGLayer`, chunked Zarr/GeoZarr via `ZarrLayer`; geotagged drone JPEGs via `ImageOverlay` |
52
+ | Data loading | fetch + parse + reload yourself | `data="…"` — GeoJSON, CSV, Arrow/GeoArrow, Shapefile, KML, GPX, FlatGeobuf, GeoParquet, CityJSON, WebSocket streams, polled REST, tiled XYZ/vector (`TileLayer`/`MVTLayer`); GeoTIFF/COG rasters via `COGLayer` (band selection, per-band windows, auto-stretch from file stats, stretch/gamma, pixel identify), chunked Zarr/GeoZarr via `ZarrLayer`; geotagged drone JPEGs via `ImageOverlay` |
53
53
  | Accessors | JS functions + `updateTriggers` bookkeeping | `get-*` expressions; update triggers derived automatically |
54
54
  | UI | build legends/popups/filters from scratch | built-in widgets, overlays, behaviors — declarative |
55
55
  | Testing | mock WebGL or ship untested | `OmMap.validate`, IR snapshots, headless behavioral harness |
@@ -72,7 +72,7 @@ Or with no build step at all, straight from a CDN:
72
72
 
73
73
  The bare package URL serves `dist/onlymap.standalone.js`, a single-file bundle built for exactly this (jsDelivr too). Use a CDN that serves the package's raw files — **not** a rebundling CDN like esm.sh, which re-splits the bundle into duplicate copies of the deck.gl/luma.gl runtime and breaks every layer's shader compilation.
74
74
 
75
- Then `npx @nika-js/onlymap init` wires up VS Code IntelliSense and `!`-prefixed manifest snippets for your project. The library ships with 1,208 unit/behavioral tests and 64 Playwright GPU tests.
75
+ Then `npx @nika-js/onlymap init` wires up VS Code IntelliSense and `!`-prefixed manifest snippets for your project. The library ships with 1,380 unit/behavioral tests and 70 Playwright GPU tests.
76
76
 
77
77
  The [examples](https://github.com/NikaGeospatial/onlymapjs/tree/main/examples) are the best tour: widgets, behaviors & overlays, basemaps, columnar/Arrow data, manual drawing, 3D models, scene lighting (with the native lighting widget), DEM terrain, a live WebSocket ship feed, and a polled driver fleet.
78
78
 
@@ -19,7 +19,7 @@ async function v(N = {}) {
19
19
  if (n) {
20
20
  const { createRequire: I } = await import(
21
21
  /*webpackIgnore:true*/
22
- "./lerc-BNW5A6zN.js"
22
+ "./lerc-nHFgnN0N.js"
23
23
  ).then((g) => g._);
24
24
  var O = I(import.meta.url);
25
25
  }
@@ -1,4 +1,4 @@
1
- import { C as ny, L as sy, M as oy, m as ay, c as ka, a as Sd, z as oc, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-COuIQk2Z.js";
1
+ import { C as ny, L as sy, M as oy, m as ay, c as ka, a as Sd, z as oc, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-CnwhAoQ5.js";
2
2
  const Cd = Math.PI / 180, gy = 180 / Math.PI;
3
3
  function em(Pe, J = 0) {
4
4
  const me = Math.min(180, Pe) * Cd;
@@ -117,7 +117,15 @@ export declare class OmMapElement extends HTMLElementBase {
117
117
  private foldBreakpointPx;
118
118
  private measureWidgetFold;
119
119
  private updateWidgetFoldForWidth;
120
- /** Lift the bottom-end row clear of the bottom drawer toggle while folded. Applied here AND in the fold pass so a lazily-created bottom-end container still gets it. */
120
+ /**
121
+ * Lift the bottom-end row clear of the bottom-start row and the folded
122
+ * drawer toggle (spec: "Widget Layout Manager / Overlap avoidance",
123
+ * structural half) — measured geometry, not a fixed offset: the license
124
+ * badge can wrap taller than the folded clearance, and an expanded
125
+ * provider attribution can grow wide enough to cross the whole bottom
126
+ * edge. Applied on fold flips, every resize tick, and container size
127
+ * changes; headless (zero rects) resolves to the plain floor.
128
+ */
121
129
  private syncFoldBottomOffset;
122
130
  private scheduleFoldPass;
123
131
  private shouldFoldWidget;
@@ -1,4 +1,4 @@
1
- import { r as p, n as d } from "./index-COuIQk2Z.js";
1
+ import { r as p, n as d } from "./index-CnwhAoQ5.js";
2
2
  function g(t) {
3
3
  if (t == null) return !0;
4
4
  const e = t, n = e.id?.code;
@@ -1,5 +1,5 @@
1
- import { i as E, j as S, k as R, o as N, p as h, q as w, s as O, t as W, v as x, w as I, x as B, y as _, A as P, B as k, E as $, F as z, H as v, I as F, J as C, K as U, N as p, O as M } from "./index-COuIQk2Z.js";
2
- import { P as $e, R as ze, _ as ve, Q as Ce, S as Ue, T as Me, U as je, X as De, Y as Je, Z as qe, $ as He, a0 as Ve, a1 as Ge, a2 as Ke, a3 as Qe, a4 as Xe, a5 as Ye, a6 as Ze, a7 as et, a8 as tt, a9 as nt, aa as rt, ab as at, ac as st, ad as ot } from "./index-COuIQk2Z.js";
1
+ import { i as E, j as S, k as R, o as N, p as h, q as w, s as O, t as W, v as x, w as I, x as B, y as _, A as P, B as k, E as $, F as z, H as v, I as F, J as C, K as U, N as p, O as M } from "./index-CnwhAoQ5.js";
2
+ import { P as $e, R as ze, _ as ve, Q as Ce, S as Ue, T as Me, U as je, X as De, Y as Je, Z as qe, $ as He, a0 as Ve, a1 as Ge, a2 as Ke, a3 as Qe, a4 as Xe, a5 as Ye, a6 as Ze, a7 as et, a8 as tt, a9 as nt, aa as rt, ab as at, ac as st, ad as ot } from "./index-CnwhAoQ5.js";
3
3
  import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
4
4
  async function J(t, e, n = {}, r = {}) {
5
5
  const a = E(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
@@ -1,4 +1,4 @@
1
- import { ag as Be, ah as le, ai as ce, aj as De, ak as Oe, al as ke } from "./index-COuIQk2Z.js";
1
+ import { ag as Be, ah as le, ai as ce, aj as De, ak as Oe, al as ke } from "./index-CnwhAoQ5.js";
2
2
  import { y as ve, a as he, z as G, R as J, A as ue, C as Fe, F as je, n as xe, S as Ie, E as Ne } from "./recordbatch-Bpc0uxFn.js";
3
3
  import { g as V, a as fe, b as Le, c as Ue, d as Me, e as qe, m as Ve } from "./table-accessors-CYWTzpQI.js";
4
4
  import { c as $e } from "./convert-arrow-schema-DrAihRf9.js";