@nika-js/onlymap 0.11.9 → 0.11.11

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 (32) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +2 -2
  3. package/dist/{basemap-t-PHB_Pu.js → basemap-QT4ua-dL.js} +333 -320
  4. package/dist/basemap-request.d.ts +24 -0
  5. package/dist/{geoparquet-DTJd2aSg.js → geoparquet-hOsdfZJa.js} +1 -1
  6. package/dist/{globe-view-C3wCRrI5.js → globe-view-BSGTUqWc.js} +1 -1
  7. package/dist/{hillshade-BsFo5EQa.js → hillshade-D2Ps3Nim.js} +1 -1
  8. package/dist/{index-CVudT7Jx.js → index-BO7MtTkn.js} +3 -3
  9. package/dist/{index-tdZDxE69.js → index-Bxue4Psc.js} +3 -3
  10. package/dist/{index-C-27TeLS.js → index-Bzypgr1v.js} +1 -1
  11. package/dist/{index-B0CFKhL1.js → index-CevWTqBO.js} +185 -169
  12. package/dist/{index-CkoZRLXw.js → index-D1ZjhP2H.js} +1 -1
  13. package/dist/{index-CmebKPpS.js → index-DBt_2x-w.js} +1 -1
  14. package/dist/{index-CvYrJQAF.js → index-DjYxw-8H.js} +2 -2
  15. package/dist/{index-Cz8al9P3.js → index-DudIuhJa.js} +1 -1
  16. package/dist/{index-DnCja0BT.js → index-Dwc4s3mc.js} +1 -1
  17. package/dist/{lerc-DNRQ6_Sp.js → lerc-DQuf93SN.js} +1 -1
  18. package/dist/onlymap.standalone.js +907 -878
  19. package/dist/onlymapjs.js +1 -1
  20. package/dist/{post-process-effect-DAz0ISd4.js → post-process-effect-B3j_nBzy.js} +1 -1
  21. package/dist/{raster-veW80Eoz.js → raster-CvAJ-h_g.js} +3 -3
  22. package/dist/{raster-pipeline-B2vifX-A.js → raster-pipeline-CusoihQ3.js} +1 -1
  23. package/dist/{text-on-path-BZxqgwi2.js → text-on-path-D9u5SYCo.js} +1 -1
  24. package/dist/version.d.ts +1 -1
  25. package/dist/{zarr-7uar2Wec.js → zarr-DWb_nikR.js} +2 -2
  26. package/docs/basemaps.md +3 -2
  27. package/docs/cartograph.md +2 -2
  28. package/llms.txt +1 -1
  29. package/onlymapjs.html-data.json +3 -0
  30. package/package.json +1 -1
  31. package/skills/onlymapjs/SKILL.md +2 -2
  32. package/skills/onlymapjs/references/syntax.md +3 -3
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Per-request shaping for basemap tiles — the one hook between the MapLibre
3
+ * map and the tile servers it fetches from.
4
+ *
5
+ * OpenStreetMap's own tile server (`osm`) refuses requests it cannot tie to a
6
+ * website or an application, and a page opened from disk sends it nothing it
7
+ * recognises: no Referer, and in Firefox an `Origin: null`. The refusal is a
8
+ * 256×256 "Access blocked" image delivered with HTTP 200 — an exported map in
9
+ * Firefox drew a grid of them, and Chrome drew the same grid for any request
10
+ * carrying `Cache-Control: no-cache` (a hard reload, DevTools' "Disable
11
+ * cache"). Measured 2026-10-08 against the live server from `file://` pages.
12
+ *
13
+ * OSM's Blocked page names the workaround for referer-less contexts: an
14
+ * `X-Requested-With` header. Their CORS policy allows it explicitly (the
15
+ * preflight answers `access-control-allow-headers: x-requested-with`), and
16
+ * with it every variant above gets the real tile. Scoped to OSM's host only:
17
+ * a custom header makes browsers preflight every tile request, which other
18
+ * tile servers need not allow.
19
+ */
20
+ /** Extra request parameters for a basemap resource, or undefined to send it as is. */
21
+ export declare function basemapRequestParameters(url: string): {
22
+ url: string;
23
+ headers: Record<string, string>;
24
+ } | undefined;
@@ -1,4 +1,4 @@
1
- import { a4 as p, a5 as d } from "./index-B0CFKhL1.js";
1
+ import { a4 as p, a5 as d } from "./index-CevWTqBO.js";
2
2
  function g(t) {
3
3
  if (t == null) return !0;
4
4
  const e = t, n = e.id?.code;
@@ -1,4 +1,4 @@
1
- import { d as L, j as x, a6 as A, a7 as E, a8 as d, a9 as h, aa as u, ab as z, p as V, W as Z, G as D } from "./index-B0CFKhL1.js";
1
+ import { d as L, j as x, a6 as A, a7 as E, a8 as d, a9 as h, aa as u, ab as z, p as V, W as Z, G as D } from "./index-CevWTqBO.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,4 +1,4 @@
1
- import { al as P, am as T, an as N, ao as Z, c as B, ap as E, aq as C, ar as b, as as D, at as I, au as O } from "./index-B0CFKhL1.js";
1
+ import { al as P, am as T, an as N, ao as Z, c as B, ap as E, aq as C, ar as b, as as D, at as I, au as O } from "./index-CevWTqBO.js";
2
2
  import { N as _, c as H } from "./hillshade-apron-Bem3DWyJ.js";
3
3
  import { p as $, h as j, m as A, a as U } from "./hillshade-shader-DI2uLSNU.js";
4
4
  function R(t, e, 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-B0CFKhL1.js";
2
- import { P as s } from "./post-process-effect-DAz0ISd4.js";
3
- import { G as pa, a as na } from "./globe-view-C3wCRrI5.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-CevWTqBO.js";
2
+ import { P as s } from "./post-process-effect-B3j_nBzy.js";
3
+ import { G as pa, a as na } from "./globe-view-BSGTUqWc.js";
4
4
  export {
5
5
  t as AmbientLight,
6
6
  o as Attribute,
@@ -1,6 +1,6 @@
1
- import { ac as j, ad as S, ae as A, af as M, ag as L } from "./index-B0CFKhL1.js";
2
- import { ah as H, ai as V, aj as X, ak as K } from "./index-B0CFKhL1.js";
3
- import { P as h } from "./post-process-effect-DAz0ISd4.js";
1
+ import { ac as j, ad as S, ae as A, af as M, ag as L } from "./index-CevWTqBO.js";
2
+ import { ah as H, ai as V, aj as X, ak as K } from "./index-CevWTqBO.js";
3
+ import { P as h } from "./post-process-effect-B3j_nBzy.js";
4
4
  const O = `
5
5
  float omfx_lum(vec3 c) { return dot(c, vec3(0.299, 0.587, 0.114)); }
6
6
  float omfx_hash(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); }
@@ -1,4 +1,4 @@
1
- import { aA as B } from "./index-B0CFKhL1.js";
1
+ import { aA as B } from "./index-CevWTqBO.js";
2
2
  const V = /* @__PURE__ */ new Set([
3
3
  "GeoJsonLayer",
4
4
  "PolygonLayer",