@nika-js/onlymap 0.13.4 → 0.13.5

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 (50) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +2 -2
  3. package/dist/actions.d.ts +12 -6
  4. package/dist/attribute-resolution.d.ts +32 -4
  5. package/dist/{basemap-BiC_RwbV.js → basemap-CErNEhX6.js} +2 -2
  6. package/dist/{build-DQCmcQE1.js → build-ByNIb4VX.js} +1 -1
  7. package/dist/{client-C0CgEs_P.js → client-xe2E4jg4.js} +2 -2
  8. package/dist/ctx.d.ts +2 -0
  9. package/dist/{geoparquet-DbVJrJYG.js → geoparquet-DOhMQl-X.js} +1 -1
  10. package/dist/{globe-view-CrGbvqqZ.js → globe-view-84s_uNZX.js} +1 -1
  11. package/dist/{hillshade-CGY_OBaG.js → hillshade-D8h8CRQq.js} +2 -2
  12. package/dist/{hillshade-shader-w8tmFgaV.js → hillshade-shader-Bm1O0P76.js} +1 -1
  13. package/dist/{index-QrGqSW_H.js → index-4Y4Q7RP4.js} +3 -3
  14. package/dist/{index-DrCMvhhr.js → index-BG_49YHy.js} +19732 -19592
  15. package/dist/{index-GfvWJDX0.js → index-DTN2CcOQ.js} +11 -11
  16. package/dist/{index-ChoEWeXU.js → index-DXxQu9Xi.js} +1 -1
  17. package/dist/{index-Cm2sfhw7.js → index-D_EiGesl.js} +1 -1
  18. package/dist/{index-Dtsf-TPD.js → index-DrSCLk9i.js} +12 -12
  19. package/dist/{index-2lD29y87.js → index-J_Sj6T0S.js} +25 -25
  20. package/dist/index-bpdGuZR6.js +478 -0
  21. package/dist/{index-xF9sKoMB.js → index-phbljJTZ.js} +3 -3
  22. package/dist/ir-snapshot.d.ts +2 -0
  23. package/dist/ir.d.ts +18 -0
  24. package/dist/{lerc-DxujwTm7.js → lerc-DLWS3sYw.js} +1 -1
  25. package/dist/onlymap.standalone.js +35477 -35321
  26. package/dist/onlymapjs.js +13 -13
  27. package/dist/plane-gpu/plane-basemap.d.ts +79 -79
  28. package/dist/plane-vector/plane-mvt-layer.d.ts +79 -79
  29. package/dist/{post-process-effect-BL9rBDEh.js → post-process-effect-CHsD0-oP.js} +1 -1
  30. package/dist/programmatic.d.ts +4 -0
  31. package/dist/{raster-Bq768NZr.js → raster-B7ILGg0X.js} +4 -4
  32. package/dist/{raster-pipeline-C898iYqw.js → raster-pipeline-avMAbONM.js} +2 -2
  33. package/dist/react/om-layer.d.ts +4 -0
  34. package/dist/react.js +67 -65
  35. package/dist/serialize/emit.d.ts +2 -0
  36. package/dist/serialize/index.d.ts +2 -0
  37. package/dist/{terrain-inspect-DNZO8z6S.js → terrain-inspect-FKTVm7nv.js} +1 -1
  38. package/dist/{text-on-path-owfh8Ac6.js → text-on-path-CpHM02Fs.js} +19 -18
  39. package/dist/{vector-style-BlnKzVND.js → vector-style-CPvUSy2F.js} +1 -1
  40. package/dist/version.d.ts +1 -1
  41. package/dist/{zarr-CMWiR63-.js → zarr-DpbT4eyF.js} +2 -2
  42. package/dist/zoom-gates.d.ts +60 -0
  43. package/docs/cartograph.md +2 -2
  44. package/llms.txt +1 -0
  45. package/onlymapjs.attributes.json +2 -0
  46. package/onlymapjs.html-data.json +16 -0
  47. package/package.json +1 -1
  48. package/skills/onlymapjs/SKILL.md +2 -1
  49. package/skills/onlymapjs/references/syntax.md +30 -3
  50. package/dist/index-Bdltig68.js +0 -459
@@ -1,4 +1,4 @@
1
- import { bS as Be, bT as le, bU as ce, bV as De, bW as Oe, bX as ke } from "./index-DrCMvhhr.js";
1
+ import { bX as Be, bY as le, bZ as ce, b_ as De, b$ as Oe, c0 as ke } from "./index-BG_49YHy.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";
@@ -109,16 +109,16 @@ function L(t, e) {
109
109
  case "object-row-table":
110
110
  return Ge(t);
111
111
  case "array-row-table":
112
- return Ye(t);
113
- case "columnar-table":
114
112
  return Ke(t);
113
+ case "columnar-table":
114
+ return Ye(t);
115
115
  case "arrow-table":
116
116
  return Xe(t);
117
117
  default:
118
118
  throw new Error(e);
119
119
  }
120
120
  }
121
- function Ke(t) {
121
+ function Ye(t) {
122
122
  const e = t.schema || de(t), r = t.schema?.fields || [];
123
123
  if (t.shape === "columnar-table")
124
124
  return { ...t, schema: e };
@@ -135,7 +135,7 @@ function Ke(t) {
135
135
  data: n
136
136
  };
137
137
  }
138
- function Ye(t) {
138
+ function Ke(t) {
139
139
  if (t.shape === "array-row-table")
140
140
  return t;
141
141
  const e = V(t), r = new Array(e);
@@ -902,7 +902,7 @@ function W(t = {}) {
902
902
  }
903
903
  if (h !== f && b !== 0 && i[b - 1] === f)
904
904
  continue;
905
- const R = _ === -1 ? A : Math.min(A, _), D = K(R);
905
+ const R = _ === -1 ? A : Math.min(A, _), D = Y(R);
906
906
  if (i[b + 1 + D] === e) {
907
907
  if (p.push(i.substring(o, b).replace(B, h)), o = b + 1 + D + l, A = i.indexOf(e, o), _ = i.indexOf(r, o), T && (I(), u))
908
908
  return S();
@@ -910,9 +910,9 @@ function W(t = {}) {
910
910
  return S(!0);
911
911
  break;
912
912
  }
913
- const O = K(_);
913
+ const O = Y(_);
914
914
  if (i.substr(b + 1 + O, m) === r) {
915
- if (p.push(i.substring(o, b).replace(B, h)), Y(b + 1 + O + m), A = i.indexOf(e, o), T && (I(), u))
915
+ if (p.push(i.substring(o, b).replace(B, h)), K(b + 1 + O + m), A = i.indexOf(e, o), T && (I(), u))
916
916
  return S();
917
917
  if (a && y.length >= a)
918
918
  return S(!0);
@@ -944,7 +944,7 @@ function W(t = {}) {
944
944
  continue;
945
945
  }
946
946
  if (_ !== -1) {
947
- if (p.push(i.substring(o, _)), Y(_ + m), T && (I(), u))
947
+ if (p.push(i.substring(o, _)), K(_ + m), T && (I(), u))
948
948
  return S();
949
949
  if (a && y.length >= a)
950
950
  return S(!0);
@@ -956,7 +956,7 @@ function W(t = {}) {
956
956
  function x(R) {
957
957
  y.push(R), k = o;
958
958
  }
959
- function K(R) {
959
+ function Y(R) {
960
960
  let D = 0;
961
961
  if (R !== -1) {
962
962
  const O = i.substring(b + 1, R);
@@ -967,7 +967,7 @@ function W(t = {}) {
967
967
  function H(R) {
968
968
  return g || (typeof R > "u" && (R = i.substr(o)), p.push(R), o = w, x(p), T && I()), S();
969
969
  }
970
- function Y(R) {
970
+ function K(R) {
971
971
  o = R, x(p), p = [], _ = i.indexOf(r, o);
972
972
  }
973
973
  function S(R, D) {
@@ -1,4 +1,4 @@
1
- import { bW as Bt, c6 as Xt, c7 as Yt, c8 as Us } from "./index-DrCMvhhr.js";
1
+ import { b$ as Bt, cb as Xt, cc as Yt, cd as Us } from "./index-BG_49YHy.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 { bQ as Su, bR as qu } from "./index-DrCMvhhr.js";
1
+ import { bV as Su, bW as qu } from "./index-BG_49YHy.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 { aV as tt, aW as et, aX as q, ak as nt, aa as ot, aY as L, aZ as rt, a_ as D, af as st, ag as U, a$ as B, b0 as it } from "./index-DrCMvhhr.js";
1
+ import { a_ as tt, a$ as et, b0 as q, ak as nt, aa as ot, b1 as L, b2 as rt, b3 as D, af as st, ag as U, b4 as B, b5 as it } from "./index-BG_49YHy.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);
@@ -17,7 +17,7 @@ function O(t) {
17
17
  function X(t) {
18
18
  return Array.isArray(t) && O(t[0]);
19
19
  }
20
- function V(t) {
20
+ function K(t) {
21
21
  let r = 1 / 0, n = 1 / 0, o = -1 / 0, a = -1 / 0, s = !1;
22
22
  const e = (f) => {
23
23
  if (Array.isArray(f)) {
@@ -33,7 +33,7 @@ function V(t) {
33
33
  function z(t, r) {
34
34
  return !Array.isArray(t) || O(t) ? t : X(t) ? r(t) : t.map((n) => z(n, r));
35
35
  }
36
- function Z(t) {
36
+ function V(t) {
37
37
  if (t.length < 3) return !1;
38
38
  const r = t[0], n = t[t.length - 1];
39
39
  return r[0] === n[0] && r[1] === n[1];
@@ -67,16 +67,16 @@ function ct(t, r, n, o) {
67
67
  }
68
68
  const u = [];
69
69
  for (let l = 0; l < t.length; l++) f[l] && u.push(t[l]);
70
- return Z(t) && u.length < 4 ? t : u;
70
+ return V(t) && u.length < 4 ? t : u;
71
71
  }
72
72
  function ut(t, r) {
73
- const n = V(t);
73
+ const n = K(t);
74
74
  return n ? z(t, (o) => ct(o, r, n[0], n[1])) : t;
75
75
  }
76
76
  const Y = 0.25;
77
77
  function ft(t, r) {
78
78
  let n = t;
79
- const o = Z(t);
79
+ const o = V(t);
80
80
  for (let a = 0; a < r; a++) {
81
81
  const s = o ? n.slice(0, -1) : n;
82
82
  if (s.length < 3) return n;
@@ -238,7 +238,7 @@ function $(t, r, n) {
238
238
  const o = r - t;
239
239
  return o === 0 ? 0.5 : (n - t) / o;
240
240
  }
241
- function K(t, r, n, o) {
241
+ function Z(t, r, n, o) {
242
242
  const { width: a, height: s, cell: e, originX: f, originY: c } = r, i = [], u = (m, d) => t[d * a + m], l = (m, d) => o === void 0 || o[d * a + m] === 1 && o[d * a + m + 1] === 1 && o[(d + 1) * a + m] === 1 && o[(d + 1) * a + m + 1] === 1, y = (m) => f + m * e, h = (m) => c + m * e;
243
243
  for (let m = 0; m + 1 < s; m++)
244
244
  for (let d = 0; d + 1 < a; d++) {
@@ -359,7 +359,7 @@ function Ft(t) {
359
359
  function St(t, r) {
360
360
  const n = Ft(t);
361
361
  if (n.length === 0) return [];
362
- const o = V(t);
362
+ const o = K(t);
363
363
  if (!o) return [];
364
364
  const a = Q(o[0], o[1]), s = n.map((m) => m.map((d) => a.toMetres(d))), e = Math.abs(r.distanceMetres);
365
365
  if (!(e > 0)) return [];
@@ -368,7 +368,7 @@ function St(t, r) {
368
368
  if (u.width * u.height > r.maxCells) return [];
369
369
  const l = bt(s, u), y = r.distanceMetres < 0 ? -1 : 1, h = [];
370
370
  for (let m = 1; m <= f; m++) {
371
- const d = y * e * m, p = K(l, u, d);
371
+ const d = y * e * m, p = Z(l, u, d);
372
372
  p.length !== 0 && h.push({
373
373
  rings: p.map((M) => M.map(([F, w]) => a.toLngLat(F, w))),
374
374
  band: m
@@ -446,7 +446,7 @@ async function Rt(t) {
446
446
  if (!(c > 0) || !Number.isFinite(e) || f <= e) return [];
447
447
  const [i, u, l, y] = t.bounds, h = ([p, M]) => p >= i && p <= l && M >= u && M <= y, m = [], d = Math.ceil(e / c) * c;
448
448
  for (let p = d, M = 0; p <= f && M < 400; p += c, M++)
449
- for (const F of K(n, a, p, o)) {
449
+ for (const F of Z(n, a, p, o)) {
450
450
  const w = F.map(([N, k]) => s(N, k));
451
451
  w.some(h) && m.push({
452
452
  type: "Feature",
@@ -623,11 +623,11 @@ export {
623
623
  Nt as bufferRows,
624
624
  ft as chaikinRing,
625
625
  Rt as contourFromDem,
626
- V as coordinateCentre,
626
+ K as coordinateCentre,
627
627
  W as distanceTransform,
628
628
  xt as gridFor,
629
629
  z as mapRings,
630
- K as marchingSquares,
630
+ Z as marchingSquares,
631
631
  Q as metricFrame,
632
632
  Et as parseBounds,
633
633
  gt as rasterizeRings,
@@ -1,14 +1,14 @@
1
- import { b5 as E, b6 as x, b7 as N, b8 as R, b9 as h, ba as b, bb as O, bc as W, bd as I, be as S, bf as B, bg as P, bh as _, bi as k, bj as z, bk as $, bl as C, bm as F, bn as v, bo as M, bp as w, bq as D } from "./index-DrCMvhhr.js";
2
- import { br as ze, bs as $e, bt as Ce, bu as ve, bv as Me, bw as De, bx as Ue, by as je, bz as Je, bA as qe, bB as Ge, bC as He, bD as Ve, bE as Ke, bF as Qe, bG as Xe, bH as Ye, bI as Ze, bJ as et, bK as tt, bL as nt, bM as rt, bN as at, bO as st, bP as ot } from "./index-DrCMvhhr.js";
3
- import { g as U, i as j } from "./table-accessors-CYWTzpQI.js";
1
+ import { ba as E, bb as S, bc as R, bd as N, be as h, bf as b, bg as O, bh as W, bi as x, bj as I, bk as B, bl as P, bm as _, bn as k, bo as z, bp as $, bq as C, br as F, bs as v, bt as M, bu as w, bv as U } from "./index-BG_49YHy.js";
2
+ import { bw as ze, bx as $e, by as Ce, bz as ve, bA as Me, bB as Ue, bC as De, bD as je, bE as Je, bF as qe, bG as Ge, bH as He, bI as Ve, bJ as Ke, bK as Qe, bL as Xe, bM as Ye, bN as Ze, bO as et, bP as tt, bQ as nt, bR as rt, bS as at, bT as st, bU as ot } from "./index-BG_49YHy.js";
3
+ import { g as D, i as j } from "./table-accessors-CYWTzpQI.js";
4
4
  async function J(t, e, n = {}, r = {}) {
5
- const a = E(t), s = x.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
6
- o || (c.url = N(t, n));
5
+ const a = E(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
6
+ o || (c.url = R(t, n));
7
7
  const i = s.getWorkerPool(c), u = n.jobName || t.name, d = await i.startJob(
8
8
  u,
9
9
  // eslint-disable-next-line
10
10
  q.bind(null, r)
11
- ), y = R(n);
11
+ ), y = N(n);
12
12
  return d.postMessage("process", { input: e, options: y }), (await d.result).result;
13
13
  }
14
14
  async function q(t, e, n, r) {
@@ -38,7 +38,7 @@ async function q(t, e, n, r) {
38
38
  }
39
39
  }
40
40
  function G(t, e) {
41
- if (!x.isSupported())
41
+ if (!S.isSupported())
42
42
  return !1;
43
43
  const n = e?._nodeWorkers ?? e?.core?._nodeWorkers, r = e?.worker ?? e?.core?.worker;
44
44
  return !h && !n ? !1 : !!(t.worker && r);
@@ -156,12 +156,12 @@ async function Q(t) {
156
156
  r.onload = (a) => e(a?.target?.result), r.onerror = (a) => n(a), r.readAsArrayBuffer(t);
157
157
  });
158
158
  }
159
- function xe(t, e, n, r) {
159
+ function Se(t, e, n, r) {
160
160
  !Array.isArray(e) && !b(e) && (r = void 0, n = e, e = void 0), n = n || {};
161
161
  const s = O(e, r), o = W(t, s, n);
162
162
  if (!o)
163
163
  return null;
164
- const c = I(n, o, s), i = S(t), u = () => {
164
+ const c = x(n, o, s), i = I(t), u = () => {
165
165
  throw new Error("parseSync called parse (which is async");
166
166
  };
167
167
  return r = B({ url: i, _parseSync: u, _parse: u, loaders: e }, c, r || null), X(o, t, c, r);
@@ -174,15 +174,15 @@ function X(t, e, n, r) {
174
174
  throw new Error(`${t.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${r.url || ""}`);
175
175
  }
176
176
  function Y(t) {
177
- return { ...t, length: U(t), batchType: "data" };
177
+ return { ...t, length: D(t), batchType: "data" };
178
178
  }
179
179
  async function l(t, e, n, r) {
180
180
  const a = Array.isArray(e) ? e : void 0;
181
181
  !Array.isArray(e) && !b(e) && (r = void 0, n = e, e = void 0), t = await t, n = n || {};
182
- const s = S(t), o = await _(t, e, n);
182
+ const s = I(t), o = await _(t, e, n);
183
183
  if (!o)
184
184
  return [];
185
- const c = I(n, o, a, s);
185
+ const c = x(n, o, a, s);
186
186
  return r = B({ url: s, _parseInBatches: l, _parse: k, loaders: a }, c, r || null), await Z(o, t, c, r);
187
187
  }
188
188
  async function Z(t, e, n, r) {
@@ -234,7 +234,7 @@ async function re(t, e = []) {
234
234
  n = r(n);
235
235
  return n;
236
236
  }
237
- function Ie(t, e, n, r) {
237
+ function xe(t, e, n, r) {
238
238
  let a;
239
239
  !Array.isArray(e) && !b(e) ? (n = e, a = void 0) : a = e;
240
240
  const s = C(n || {});
@@ -262,7 +262,7 @@ async function ae(t, e, n) {
262
262
  }
263
263
  throw new Error("Writer could not encode data");
264
264
  }
265
- async function Se(t, e, n) {
265
+ async function Ie(t, e, n) {
266
266
  if (e.text && e.encodeText)
267
267
  return await e.encodeText(t, n);
268
268
  if (e.text) {
@@ -330,7 +330,7 @@ async function ue(t, e, n) {
330
330
  const r = T("input");
331
331
  await new K(r, "w").write(e);
332
332
  const s = T("output"), o = await ie(r, s, t, n);
333
- return (await D(o)).arrayBuffer();
333
+ return (await U(o)).arrayBuffer();
334
334
  }
335
335
  function fe(t) {
336
336
  return [{ ...t, start: 0, end: t.length }];
@@ -388,7 +388,7 @@ function Ee(t, e) {
388
388
  }
389
389
  );
390
390
  }
391
- const L = "4.4.3", Ne = {
391
+ const L = "4.4.3", Re = {
392
392
  dataType: null,
393
393
  batchType: null,
394
394
  name: "Null loader",
@@ -402,7 +402,7 @@ const L = "4.4.3", Ne = {
402
402
  options: {
403
403
  null: {}
404
404
  }
405
- }, Re = {
405
+ }, Ne = {
406
406
  dataType: null,
407
407
  batchType: null,
408
408
  name: "Null loader",
@@ -536,8 +536,8 @@ class We {
536
536
  export {
537
537
  ze as FetchError,
538
538
  ge as JSONLoader,
539
- Re as NullLoader,
540
- Ne as NullWorkerLoader,
539
+ Ne as NullLoader,
540
+ Re as NullWorkerLoader,
541
541
  $e as RequestScheduler,
542
542
  We as _BrowserFileSystem,
543
543
  Oe as _fetchProgress,
@@ -546,18 +546,18 @@ export {
546
546
  ve as assert,
547
547
  $ as concatenateArrayBuffersAsync,
548
548
  Me as createDataSource,
549
- De as document,
549
+ Ue as document,
550
550
  Be as encode,
551
551
  Le as encodeInBatches,
552
552
  ce as encodeSync,
553
553
  ae as encodeTable,
554
- Se as encodeTableAsText,
554
+ Ie as encodeTableAsText,
555
555
  se as encodeTableInBatches,
556
556
  ke as encodeText,
557
557
  Fe as encodeTextSync,
558
558
  ie as encodeURLtoURL,
559
- D as fetchFile,
560
- Ue as forEach,
559
+ U as fetchFile,
560
+ De as forEach,
561
561
  M as getLoaderOptions,
562
562
  je as getPathPrefix,
563
563
  Je as global,
@@ -572,7 +572,7 @@ export {
572
572
  Ye as isWorker,
573
573
  Ze as isWritableStream,
574
574
  et as load,
575
- Ie as loadInBatches,
575
+ xe as loadInBatches,
576
576
  tt as makeIterator,
577
577
  we as makeLineIterator,
578
578
  pe as makeNumberedLineIterator,
@@ -581,7 +581,7 @@ export {
581
581
  be as makeTextEncoderIterator,
582
582
  k as parse,
583
583
  l as parseInBatches,
584
- xe as parseSync,
584
+ Se as parseSync,
585
585
  Te as readArrayBuffer,
586
586
  nt as registerLoaders,
587
587
  w as resolvePath,