@nika-js/onlymap 0.13.2 → 0.13.3

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 (37) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -0
  3. package/dist/{basemap-CdSCIWCl.js → basemap-5NHR6Gio.js} +2 -2
  4. package/dist/{build-CUx4yR_O.js → build-DJjheWZ2.js} +1 -1
  5. package/dist/{client-DVkMuuPp.js → client-0mQmDog8.js} +2 -2
  6. package/dist/data-layer.d.ts +7 -15
  7. package/dist/{geoparquet-DuCEsCOu.js → geoparquet-B_nO2OyP.js} +1 -1
  8. package/dist/{globe-view-BWNfn-Sx.js → globe-view-BFUa9ksE.js} +1 -1
  9. package/dist/{hillshade-DyfYxqNm.js → hillshade-B_CxPhtA.js} +2 -2
  10. package/dist/{hillshade-shader-BWA0USDQ.js → hillshade-shader-r7GxxjXj.js} +1 -1
  11. package/dist/{index-DfzI_j0D.js → index-A1FYw2dy.js} +1 -1
  12. package/dist/{index-DabUE8w3.js → index-BvNxS6dM.js} +1 -1
  13. package/dist/{index-CCj9Z5yt.js → index-CObPGkze.js} +1 -1
  14. package/dist/{index-Cc3huYsW.js → index-CU7RnKnO.js} +2 -2
  15. package/dist/{index-DiDoH_BG.js → index-CgIuV5Oh.js} +3 -3
  16. package/dist/{index-DYrgHprN.js → index-ChmxbIdj.js} +1 -1
  17. package/dist/{index-DRGcZmBm.js → index-DT5d7kFO.js} +1 -1
  18. package/dist/{index-BfHaNHyY.js → index-DWijIMti.js} +16421 -16252
  19. package/dist/{index-dUoVyYIW.js → index-YMu_yLXO.js} +3 -3
  20. package/dist/{lerc-CUV0h9Ci.js → lerc-Bl4vym9y.js} +1 -1
  21. package/dist/onlymap.standalone.js +24074 -23905
  22. package/dist/onlymapjs.js +1 -1
  23. package/dist/{post-process-effect-DPrpqybM.js → post-process-effect-gFGVlC77.js} +1 -1
  24. package/dist/{raster-CrRQNJE7.js → raster-1ShXyF12.js} +4 -4
  25. package/dist/{raster-pipeline-D9g8RAo4.js → raster-pipeline-BMS54TX2.js} +2 -2
  26. package/dist/runtime-core.d.ts +15 -0
  27. package/dist/{terrain-inspect-GowNVtMZ.js → terrain-inspect-Cndlmxig.js} +1 -1
  28. package/dist/{text-on-path-BoFbm-tl.js → text-on-path-QInco4aP.js} +1 -1
  29. package/dist/tile-url.d.ts +94 -0
  30. package/dist/version.d.ts +1 -1
  31. package/dist/{zarr-C8CU8LXU.js → zarr-CYD8fyBe.js} +2 -2
  32. package/docs/cartograph.md +2 -2
  33. package/llms.txt +1 -1
  34. package/onlymapjs.html-data.json +1 -1
  35. package/package.json +1 -1
  36. package/skills/onlymapjs/SKILL.md +2 -1
  37. package/skills/onlymapjs/references/syntax.md +11 -2
package/CHANGELOG.md CHANGED
@@ -8,6 +8,14 @@ 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.3 — 2026-11-02
12
+
13
+ ### Added
14
+ - **WMS layers as tiles.** A raster `TileLayer` now fills `{bbox-epsg-3857}` (each tile's Web Mercator extent), `{width}` and `{height}` (its `tile-size`), so a WMS GetMap request works as a tiled layer: `data="…/wms?…&FORMAT=image/png&CRS=EPSG:3857&WIDTH={width}&HEIGHT={height}&BBOX={bbox-epsg-3857}"`. It works on projected maps too, and in cartograph frames.
15
+ - **Quadkey tile services.** `{quadkey}` addresses Bing-style tiles.
16
+ - **Tile failures reach the page.** A tile that fails is left empty while the rest of the map draws, and the cause is reported once per layer on `om-validation-error`: a server that refuses cross-origin requests, an HTTP error, or a WMS error message, quoted.
17
+ - **Tile templates are checked.** Validation names any token the map cannot fill, such as Leaflet's `{s}` or QGIS's `{q}`, which used to be requested literally.
18
+
11
19
  ## 0.13.2 — 2026-10-20
12
20
 
13
21
  ### Added
package/README.md CHANGED
@@ -133,6 +133,7 @@ Numeric timestamps are always epoch **milliseconds**, never guessed as seconds.
133
133
  | **WebSocket stream** | `data="wss://feed" key="id" flush="250ms" source="myFormat"` | upsert-by-key, burst coalescing, auto-reconnect; shared while active and closed after the final descriptor owner releases it |
134
134
  | **Polled REST snapshot** | `data="/api/fleet.json" refresh="5s"` | full-snapshot replace per poll; outages keep the last good data; removal/disposal stops polling |
135
135
  | **Tiled layer (XYZ / vector)** | `<om-layer type="TileLayer" data="…/{z}/{x}/{y}.png">` or `type="MVTLayer"` | a `{z}/{x}/{y}` `data` template is deck's tile URL — passed through, never fetched as rows; raster `TileLayer` gets a built-in `BitmapLayer` renderer, `MVTLayer` self-renders vector tiles (`get-*` accessors apply to tile features) |
136
+ | **WMS / quadkey tiles** | `<om-layer type="TileLayer" tile-size="512" data="…/wms?…&FORMAT=image/png&CRS=EPSG:3857&WIDTH={width}&HEIGHT={height}&BBOX={bbox-epsg-3857}">` | a raster `TileLayer` also fills `{bbox-epsg-3857}` (each tile's Web Mercator extent in metres, `minx,miny,maxx,maxy`), `{width}`/`{height}` (its `tile-size`) and `{quadkey}`, so a WMS GetMap or a Bing-style service works as tiles, on Mercator and projected maps alike; `FORMAT=image/…`, `format=png` (ArcGIS) or an image extension marks it as imagery. The service must send `Access-Control-Allow-Origin` (`*` for a page opened from `file://`), and an `http://` service is blocked inside an `https://` page. A failed tile is left empty and the rest draws; each cause (CORS, an HTTP status, a WMS ServiceException) is reported once per layer through the validation channel (`om-validation-error`) |
136
137
  | **Draw store** | `data="draw:sketch"` | live in-memory GeoJSON feature store written by `<om-widget type="draw" target="sketch">` |
137
138
 
138
139
  **Data in a local grid** — eastings/northings in British National Grid, SVY21, State Plane or any UTM zone — is converted to longitude/latitude when it loads. A file that names its CRS (a shapefile `.prj`, a FlatGeobuf or GeoParquet header, a legacy GeoJSON `crs` member) needs nothing; otherwise declare it on the layer, which also overrides the file: `<om-layer type="ScatterplotLayer" data="./sites.csv" crs="EPSG:3414" get-position="[$easting, $northing]">`. Coordinates that cannot be degrees with no CRS anywhere are a diagnostic naming the fix, never a silent layer in the ocean. The UTM zones and common national grids are bundled; any other EPSG code is fetched once from `https://epsg.io/<code>.proj4` by the reader's browser — the GeoTIFF/Zarr layers make the same lookup for their own CRS — and `OmMap.configureCrs({ online: false })` turns that off.
@@ -1,5 +1,5 @@
1
- import { aZ as Y_, N as Ou, H as Id, k as K_, a_ as J_, a$ as Q_, D as Yf, Z as ey, b0 as ty } from "./index-BfHaNHyY.js";
2
- import { a as iy } from "./globe-view-BWNfn-Sx.js";
1
+ import { aZ as Y_, N as Ou, H as Id, k as K_, a_ as J_, a$ as Q_, D as Yf, Z as ey, b0 as ty } from "./index-DWijIMti.js";
2
+ import { a as iy } from "./globe-view-BFUa9ksE.js";
3
3
  const ry = /* @__PURE__ */ new Set(["tile.openstreetmap.org", "a.tile.openstreetmap.org", "b.tile.openstreetmap.org", "c.tile.openstreetmap.org"]);
4
4
  function ny(Me) {
5
5
  let Q;
@@ -1,4 +1,4 @@
1
- import { aq as q, ar as T, as as B, at as E, au as j } from "./index-BfHaNHyY.js";
1
+ import { aq as q, ar as T, as as B, at as E, au as j } from "./index-DWijIMti.js";
2
2
  const N = (l) => Number.isFinite(l[0]) && Number.isFinite(l[1]);
3
3
  function O(l, t, s) {
4
4
  const o = T(s.x, s.y, s.z), i = 8, n = [];
@@ -1,4 +1,4 @@
1
- import { aB as _ } from "./index-BfHaNHyY.js";
1
+ import { aB as _ } from "./index-DWijIMti.js";
2
2
  const c = `function Ie(t) {
3
3
  t("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), t("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), t("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");
4
4
  for (var i = 1; i <= 60; ++i)
@@ -6869,7 +6869,7 @@ async function E(e, t, n, i) {
6869
6869
  });
6870
6870
  }
6871
6871
  async function f(e, t, n, i) {
6872
- const { buildPlaneTile: s } = await import("./build-CUx4yR_O.js");
6872
+ const { buildPlaneTile: s } = await import("./build-DJjheWZ2.js");
6873
6873
  return s(e, t, n, (a, r) => i.toPlane([a, r]), (a, r) => i.fromPlane([a, r]));
6874
6874
  }
6875
6875
  export {
@@ -166,22 +166,14 @@ export declare function assertFetchSizeWithinEntitlement(response: Response): vo
166
166
  export declare function isDrawUrl(url: string): boolean;
167
167
  /**
168
168
  * A tile URL template (spec: "Tiled layers"). deck's `TileLayer`/`MVTLayer`
169
- * (and any `TileLayer` subclass) take their `data` prop as a `{z}/{x}/{y}`
170
- * template STRING — a template deck expands per tile, NOT a document to fetch
171
- * and parse into rows. OnlyMapJS otherwise routes every `data` attribute
172
- * through getData() (fetch → parse), so a template would be fetched literally
173
- * (`…/{z}/{x}/{y}.png`) and 404; this classifier lets the parser pass it
174
- * through to deck untouched instead. Same `{z}/{x}/{y}` convention terrain and
175
- * basemap tile URLs already use.
169
+ * take their `data` prop as a template STRING it expands per tile, NOT a
170
+ * document to fetch and parse into rows. OnlyMapJS otherwise routes every
171
+ * `data` attribute through getData() (fetch → parse), so a template would be
172
+ * fetched literally and 404; this classifier lets the parser pass it through
173
+ * to deck untouched instead. Both predicates live in tile-url.ts with the
174
+ * token filler, so what is recognised and what is filled cannot disagree.
176
175
  */
177
- export declare function isTileTemplateUrl(url: string): boolean;
178
- /**
179
- * A tile template whose tiles are IMAGES (`…/{z}/{x}/{y}.png`) — what a bare
180
- * `TileLayer` draws as bitmaps, and the one tiled source a projected map can
181
- * warp into its plane (docs/design/crs.md, gap 2). One predicate, shared by the
182
- * renderer and the validator, so they cannot disagree about which layers work.
183
- */
184
- export declare function isImageTileTemplate(url: string | null | undefined): boolean;
176
+ export { isTileTemplateUrl, isImageTileTemplate } from "./tile-url";
185
177
  /**
186
178
  * Push a new sketch snapshot into a `draw:<name>` store (the draw widget's
187
179
  * DrawSession.onChange calls this). A FRESH array reference is stored so
@@ -1,4 +1,4 @@
1
- import { an as i, ao as m, ap as p } from "./index-BfHaNHyY.js";
1
+ import { an as i, ao as m, ap as p } from "./index-DWijIMti.js";
2
2
  function y(e) {
3
3
  if (e == null) return !0;
4
4
  const t = e, o = t.id?.code;
@@ -1,4 +1,4 @@
1
- import { d as L, j as x, av as A, aw as E, ax as d, ay as h, az as u, aA as z, p as V, W as Z, G as D } from "./index-BfHaNHyY.js";
1
+ import { d as L, j as x, av as A, aw as E, ax as d, ay as h, az as u, aA as z, p as V, W as Z, G as D } from "./index-DWijIMti.js";
2
2
  const c = Math.PI / 180, G = 180 / Math.PI;
3
3
  function w(l, t = 0) {
4
4
  const a = Math.min(180, l) * c;
@@ -1,6 +1,6 @@
1
- import { c as w, ab as F, ac as M, ad as B, ae as H, af as $, ag as b, ah as E, ai as _, aj as S, ak as D, aa as O } from "./index-BfHaNHyY.js";
1
+ import { c as w, ab as F, ac as M, ad as B, ae as H, af as $, ag as b, ah as E, ai as _, aj as S, ak as D, aa as O } from "./index-DWijIMti.js";
2
2
  import { N as P, c as C } from "./hillshade-apron-Bem3DWyJ.js";
3
- import { p as N, h as R, m as Z, a as U } from "./hillshade-shader-BWA0USDQ.js";
3
+ import { p as N, h as R, m as Z, a as U } from "./hillshade-shader-r7GxxjXj.js";
4
4
  const A = 64, f = /* @__PURE__ */ new Map();
5
5
  function L(t) {
6
6
  const e = f.get(t);
@@ -1,4 +1,4 @@
1
- import { al as d } from "./index-BfHaNHyY.js";
1
+ import { al as d } from "./index-DWijIMti.js";
2
2
  const u = 110574, m = 111320, o = Math.PI / 180, f = { none: 0, mercator: 1, geographic: 2 };
3
3
  function E(e, a, s = "HillshadeLayer") {
4
4
  const h = (l) => l == null || l === "" ? [] : typeof l == "number" ? Number.isFinite(l) ? [l] : [] : String(l).split(/[\s,]+/).filter(Boolean).map(Number).filter((r) => Number.isFinite(r));
@@ -1,4 +1,4 @@
1
- import { bM as Su, bN as qu } from "./index-BfHaNHyY.js";
1
+ import { bM as Su, bN as qu } from "./index-DWijIMti.js";
2
2
  function Ru(r) {
3
3
  let n = 0, a = 0, s = 0, o = 0, l = 0, p = 0, f = 0, m = 0, d = 0;
4
4
  const E = /* @__PURE__ */ new Set();
@@ -1,4 +1,4 @@
1
- import { bS as Bt, c2 as Xt, c3 as Yt, c4 as Us } from "./index-BfHaNHyY.js";
1
+ import { bS as Bt, c2 as Xt, c3 as Yt, c4 as Us } from "./index-DWijIMti.js";
2
2
  import { w as gs, t as Hs, f as Ws, m as Qs } from "./mgrs-BY9bIvp4.js";
3
3
  import { c as Xs } from "./convert-arrow-schema-DrAihRf9.js";
4
4
  import { y as Ys, A as bt, a as Ks, z as Vs, R as Zs } from "./recordbatch-Bpc0uxFn.js";
@@ -1,4 +1,4 @@
1
- import { aR as tt, aS as et, aT as q, ak as nt, aa as ot, aU as L, aV as rt, aW as D, af as st, ag as _, aX as B, aY as it } from "./index-BfHaNHyY.js";
1
+ import { aR as tt, aS as et, aT as q, ak as nt, aa as ot, aU as L, aV as rt, aW as D, af as st, ag as _, aX as B, aY as it } from "./index-DWijIMti.js";
2
2
  const J = Math.PI / 180, T = tt * J;
3
3
  function Q(t, r) {
4
4
  const n = Math.max(Math.cos(r * J), 1e-6);
@@ -1,5 +1,5 @@
1
- import { b1 as E, b2 as x, b3 as R, b4 as N, b5 as h, b6 as b, b7 as W, b8 as O, b9 as I, ba as S, bb as B, bc as _, bd as z, be as k, bf as P, bg as $, bh as C, bi as F, bj as v, bk as D, bl as w, bm as M } from "./index-BfHaNHyY.js";
2
- import { bn as Pe, bo as $e, bp as Ce, bq as ve, br as De, bs as Me, bt as Ue, bu as je, bv as Je, bw as qe, bx as Ge, by as He, bz as Ve, bA as Ke, bB as Qe, bC as Xe, bD as Ye, bE as Ze, bF as et, bG as tt, bH as nt, bI as rt, bJ as at, bK as st, bL as ot } from "./index-BfHaNHyY.js";
1
+ import { b1 as E, b2 as x, b3 as R, b4 as N, b5 as h, b6 as b, b7 as W, b8 as O, b9 as I, ba as S, bb as B, bc as _, bd as z, be as k, bf as P, bg as $, bh as C, bi as F, bj as v, bk as D, bl as w, bm as M } from "./index-DWijIMti.js";
2
+ import { bn as Pe, bo as $e, bp as Ce, bq as ve, br as De, bs as Me, bt as Ue, bu as je, bv as Je, bw as qe, bx as Ge, by as He, bz as Ve, bA as Ke, bB as Qe, bC as Xe, bD as Ye, bE as Ze, bF as et, bG as tt, bH as nt, bI as rt, bJ as at, bK as st, bL as ot } from "./index-DWijIMti.js";
3
3
  import { g as U, i as j } from "./table-accessors-CYWTzpQI.js";
4
4
  async function J(t, e, n = {}, r = {}) {
5
5
  const a = E(t), s = x.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
@@ -1,6 +1,6 @@
1
- import { A as t, a as o, b as i, C as l, c as p, d as n, D as _, e as c, f as g, F as h, L as m, g as L, h as y, i as f, j as w, M as S, k as V, O as b, l as C, m as E, P as I, T as P, n as T, o as M, U as d, V as A, p as O, q as u, W as N, r as k, s as x, t as D, u as G, G as R, v as j, w as W, x as q, y as v, z, B as F, E as U, H as Y, I as B, J as H, K as J, N as K, Q, R as X, S as Z, X as $, Y as aa, Z as sa, _ as ea, $ as ra, a0 as ta, a1 as oa, a2 as ia } from "./index-BfHaNHyY.js";
2
- import { P as s } from "./post-process-effect-DPrpqybM.js";
3
- import { G as pa, a as na } from "./globe-view-BWNfn-Sx.js";
1
+ import { A as t, a as o, b as i, C as l, c as p, d as n, D as _, e as c, f as g, F as h, L as m, g as L, h as y, i as f, j as w, M as S, k as V, O as b, l as C, m as E, P as I, T as P, n as T, o as M, U as d, V as A, p as O, q as u, W as N, r as k, s as x, t as D, u as G, G as R, v as j, w as W, x as q, y as v, z, B as F, E as U, H as Y, I as B, J as H, K as J, N as K, Q, R as X, S as Z, X as $, Y as aa, Z as sa, _ as ea, $ as ra, a0 as ta, a1 as oa, a2 as ia } from "./index-DWijIMti.js";
2
+ import { P as s } from "./post-process-effect-gFGVlC77.js";
3
+ import { G as pa, a as na } from "./globe-view-BFUa9ksE.js";
4
4
  export {
5
5
  t as AmbientLight,
6
6
  o as Attribute,
@@ -1,4 +1,4 @@
1
- import { bO as Be, bP as le, bQ as ce, bR as Oe, bS as De, bT as ke } from "./index-BfHaNHyY.js";
1
+ import { bO as Be, bP as le, bQ as ce, bR as Oe, bS as De, bT as ke } from "./index-DWijIMti.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";
@@ -1,4 +1,4 @@
1
- import { aQ as B } from "./index-BfHaNHyY.js";
1
+ import { aQ as B } from "./index-DWijIMti.js";
2
2
  const V = /* @__PURE__ */ new Set([
3
3
  "GeoJsonLayer",
4
4
  "PolygonLayer",