@nika-js/onlymap 0.11.10 → 0.12.0
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.
- package/CHANGELOG.md +5 -0
- package/README.md +10 -4
- package/dist/attribute-resolution.d.ts +2 -0
- package/dist/{basemap-Cc8v5hPA.js → basemap-CtDse0mW.js} +1328 -1263
- package/dist/basemap-request.d.ts +24 -0
- package/dist/basemap.d.ts +41 -1
- package/dist/cartograph.js +362 -321
- package/dist/cartograph.standalone.js +1995 -1914
- package/dist/{cityjson-k-z1r6c0.js → cityjson-DMc_dwu1.js} +1 -1
- package/dist/{crs-BzE_KP4M.js → crs-D5FyQfEu.js} +74 -7
- package/dist/{crs-ChglCB3O.js → crs-ZdDBJ2EY.js} +39 -36
- package/dist/data-layer.d.ts +36 -3
- package/dist/elements/om-map.d.ts +2 -1
- package/dist/geoparquet-BTHYX1ET.js +30 -0
- package/dist/geoparquet.d.ts +6 -7
- package/dist/{globe-view-BF6-01N_.js → globe-view-KrKNOmVs.js} +11 -11
- package/dist/hillshade-CijRdYyU.js +209 -0
- package/dist/html-data.d.ts +1 -1
- package/dist/{ifc-DXwePQRv.js → ifc-sisRo7I7.js} +1 -1
- package/dist/{index-CwoqJ6IK.js → index-21KGElDr.js} +9 -9
- package/dist/{index-C9gVsJaG.js → index-A45DtXly.js} +18 -18
- package/dist/{index-Dk12Fazj.js → index-BPa2CC8T.js} +20 -20
- package/dist/{index-CCY7Rk1s.js → index-B_Vhebf7.js} +1 -1
- package/dist/{index-C_0KCx9L.js → index-Bfocr1_A.js} +106 -106
- package/dist/{index-Bwdaim-c.js → index-DMc81n9B.js} +14362 -13782
- package/dist/{index-CawlYDgE.js → index-DS6VUGi6.js} +11 -11
- package/dist/{index-BaR4MzNc.js → index-DoGY-Vgi.js} +3 -3
- package/dist/{index-T5LATpR7.js → index-eHYe06mM.js} +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/ir.d.ts +6 -0
- package/dist/layer-registry.d.ts +21 -0
- package/dist/layers/warped-bitmap-layer.d.ts +27 -0
- package/dist/{lerc-CElHRqrE.js → lerc-DjrPALEj.js} +1 -1
- package/dist/onlymap.standalone.js +53028 -52451
- package/dist/onlymapjs.js +86 -84
- package/dist/parse-manifest.d.ts +12 -9
- package/dist/{post-process-effect-VAE0lQ4c.js → post-process-effect-Be1qa2DD.js} +5 -5
- package/dist/programmatic.d.ts +12 -0
- package/dist/projection.d.ts +44 -1
- package/dist/{raster-pipeline-D26Sl0X2.js → raster-pipeline-DspBYxwc.js} +1 -1
- package/dist/{raster-Cn8jugd2.js → raster-zC3qXBrs.js} +3 -3
- package/dist/react/om-layer.d.ts +4 -0
- package/dist/react/om-map.d.ts +2 -0
- package/dist/react.js +225 -218
- package/dist/runtime-core.d.ts +24 -0
- package/dist/source-crs.d.ts +99 -0
- package/dist/{text-on-path-C6SLSkus.js → text-on-path-D0_URrD2.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-Do5FzYXm.js → zarr-DopOhzfY.js} +2 -2
- package/docs/basemaps.md +1 -1
- package/docs/cartograph.md +2 -2
- package/docs/cartography.md +106 -1
- package/llms.txt +2 -1
- package/onlymapjs.attributes.json +2 -0
- package/onlymapjs.html-data.json +26 -4
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +5 -3
- package/skills/onlymapjs/references/syntax.md +18 -3
- package/dist/geoparquet-B9p5-Yxf.js +0 -35
- package/dist/hillshade-Dd7MQHfp.js +0 -298
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { P as h } from "./post-process-effect-
|
|
1
|
+
import { an as j, ao as S, ap as A, aq as M, ar as L } from "./index-DMc81n9B.js";
|
|
2
|
+
import { as as H, at as V, au as X, av as K } from "./index-DMc81n9B.js";
|
|
3
|
+
import { P as h } from "./post-process-effect-Be1qa2DD.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); }
|
|
@@ -146,12 +146,12 @@ function T(o, e) {
|
|
|
146
146
|
const i = `${e}.pxPerMm`, f = (a) => (u) => n.get(`${a}:${u}`) ?? "0.0", m = [], d = [];
|
|
147
147
|
z(o).forEach((a, u) => {
|
|
148
148
|
if (a.kind === "pointwise") {
|
|
149
|
-
const p = `${e}_p${u}`,
|
|
149
|
+
const p = `${e}_p${u}`, k = a.ops.map(($) => o[$].def.glsl(f($), i)).join(`
|
|
150
150
|
`);
|
|
151
151
|
m.push(
|
|
152
152
|
`vec4 ${p}(vec4 inColor, vec2 texSize, vec2 coord) {
|
|
153
153
|
${y}
|
|
154
|
-
${
|
|
154
|
+
${k}
|
|
155
155
|
${_}
|
|
156
156
|
}`
|
|
157
157
|
), d.push({ filter: p });
|
|
@@ -186,7 +186,7 @@ ${_}
|
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
const C = /^\s*(-?[\d.]+)\s*(mm)?\s*$/i, N = /^\s*(-?[\d.]+)\s*(deg)?\s*$/i;
|
|
189
|
-
function
|
|
189
|
+
function E(o, e) {
|
|
190
190
|
if (o.kind === "color") {
|
|
191
191
|
const s = L(e);
|
|
192
192
|
if (!s) return;
|
|
@@ -203,14 +203,14 @@ function k(o, e) {
|
|
|
203
203
|
return Number.isFinite(t) ? t : void 0;
|
|
204
204
|
}
|
|
205
205
|
function U(o) {
|
|
206
|
-
return
|
|
206
|
+
return E(o, String(o.default)) ?? 0;
|
|
207
207
|
}
|
|
208
208
|
function P(o, e) {
|
|
209
209
|
const t = b(o);
|
|
210
210
|
if (!t) return null;
|
|
211
211
|
const s = {};
|
|
212
212
|
for (const n of t.params) {
|
|
213
|
-
const l = e(n.name), c = l === null ? void 0 :
|
|
213
|
+
const l = e(n.name), c = l === null ? void 0 : E(n, l);
|
|
214
214
|
s[n.name] = c ?? U(n);
|
|
215
215
|
}
|
|
216
216
|
return { op: o, values: s };
|
|
@@ -313,7 +313,7 @@ export {
|
|
|
313
313
|
V as OP_META,
|
|
314
314
|
X as OP_NAMES,
|
|
315
315
|
D as buildPostProcessEffects,
|
|
316
|
-
|
|
316
|
+
E as coerceParam,
|
|
317
317
|
K as expandPreset,
|
|
318
318
|
A as isEffectPreset,
|
|
319
319
|
b as opDef,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { aO as R, aP as S, aQ as E, aR as W, aS as h, aT as w, aU as N, aV as O, aW as x, aX as I, aY as B, aZ as _, a_ as P, a$ as k, b0 as $, b1 as z, b2 as v, b3 as F, b4 as C, b5 as U, b6 as p, b7 as M } from "./index-DMc81n9B.js";
|
|
2
|
+
import { b8 as $e, b9 as ze, ba as ve, bb as Ce, bc as Ue, bd as Me, be as je, bf as De, bg as qe, bh as Je, bi as Ve, bj as Ge, bk as He, bl as Qe, bm as Xe, bn as Ye, bo as Ze, bp as Ke, bq as et, br as tt, bs as nt, bt as rt, bu as at, bv as st, bw as ot } from "./index-DMc81n9B.js";
|
|
3
3
|
import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
async function q(t, e, n = {}, r = {}) {
|
|
5
5
|
const a = R(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
|
|
@@ -8,7 +8,7 @@ async function q(t, e, n = {}, r = {}) {
|
|
|
8
8
|
u,
|
|
9
9
|
// eslint-disable-next-line
|
|
10
10
|
J.bind(null, r)
|
|
11
|
-
), y =
|
|
11
|
+
), y = W(n);
|
|
12
12
|
return d.postMessage("process", { input: e, options: y }), (await d.result).result;
|
|
13
13
|
}
|
|
14
14
|
async function J(t, e, n, r) {
|
|
@@ -158,7 +158,7 @@ async function X(t) {
|
|
|
158
158
|
}
|
|
159
159
|
function Se(t, e, n, r) {
|
|
160
160
|
!Array.isArray(e) && !w(e) && (r = void 0, n = e, e = void 0), n = n || {};
|
|
161
|
-
const s =
|
|
161
|
+
const s = N(e, r), o = O(t, s, n);
|
|
162
162
|
if (!o)
|
|
163
163
|
return null;
|
|
164
164
|
const c = x(n, o, s), i = I(t), u = () => {
|
|
@@ -237,7 +237,7 @@ async function re(t, e = []) {
|
|
|
237
237
|
function xe(t, e, n, r) {
|
|
238
238
|
let a;
|
|
239
239
|
!Array.isArray(e) && !w(e) ? (n = e, a = void 0) : a = e;
|
|
240
|
-
const s =
|
|
240
|
+
const s = v(n || {});
|
|
241
241
|
return Array.isArray(t) ? t.map((c) => g(c, a, n || {}, s)) : g(t, a, n || {}, s);
|
|
242
242
|
}
|
|
243
243
|
async function g(t, e, n, r) {
|
|
@@ -258,7 +258,7 @@ async function ae(t, e, n) {
|
|
|
258
258
|
const r = se(t, e, n), a = [];
|
|
259
259
|
for await (const s of r)
|
|
260
260
|
a.push(s);
|
|
261
|
-
return
|
|
261
|
+
return C(...a);
|
|
262
262
|
}
|
|
263
263
|
throw new Error("Writer could not encode data");
|
|
264
264
|
}
|
|
@@ -282,7 +282,7 @@ function oe(t) {
|
|
|
282
282
|
return [{ ...t, start: 0, end: t.length }];
|
|
283
283
|
}
|
|
284
284
|
async function Be(t, e, n) {
|
|
285
|
-
const a = { ...
|
|
285
|
+
const a = { ...U(), ...n };
|
|
286
286
|
return e.encodeURLtoURL ? ue(e, t, a) : V(e, a) ? await q(e, t, a) : await e.encode(t, a);
|
|
287
287
|
}
|
|
288
288
|
function ce(t, e, n) {
|
|
@@ -330,7 +330,7 @@ async function ue(t, e, n) {
|
|
|
330
330
|
const r = T("input");
|
|
331
331
|
await new Q(r, "w").write(e);
|
|
332
332
|
const s = T("output"), o = await ie(r, s, t, n);
|
|
333
|
-
return (await
|
|
333
|
+
return (await M(o)).arrayBuffer();
|
|
334
334
|
}
|
|
335
335
|
function fe(t) {
|
|
336
336
|
return [{ ...t, start: 0, end: t.length }];
|
|
@@ -402,7 +402,7 @@ const L = "4.4.3", Ee = {
|
|
|
402
402
|
options: {
|
|
403
403
|
null: {}
|
|
404
404
|
}
|
|
405
|
-
},
|
|
405
|
+
}, We = {
|
|
406
406
|
dataType: null,
|
|
407
407
|
batchType: null,
|
|
408
408
|
name: "Null loader",
|
|
@@ -425,7 +425,7 @@ const L = "4.4.3", Ee = {
|
|
|
425
425
|
function m(t, e, n) {
|
|
426
426
|
return null;
|
|
427
427
|
}
|
|
428
|
-
async function
|
|
428
|
+
async function Ne(t, e, n = () => {
|
|
429
429
|
}, r = () => {
|
|
430
430
|
}) {
|
|
431
431
|
if (t = await t, !t.ok)
|
|
@@ -536,17 +536,17 @@ class Oe {
|
|
|
536
536
|
export {
|
|
537
537
|
$e as FetchError,
|
|
538
538
|
ge as JSONLoader,
|
|
539
|
-
|
|
539
|
+
We as NullLoader,
|
|
540
540
|
Ee as NullWorkerLoader,
|
|
541
541
|
ze as RequestScheduler,
|
|
542
542
|
Oe as _BrowserFileSystem,
|
|
543
|
-
|
|
543
|
+
Ne as _fetchProgress,
|
|
544
544
|
Ae as _selectSource,
|
|
545
|
-
|
|
546
|
-
|
|
545
|
+
ve as _unregisterLoaders,
|
|
546
|
+
Ce as assert,
|
|
547
547
|
z as concatenateArrayBuffersAsync,
|
|
548
|
-
|
|
549
|
-
|
|
548
|
+
Ue as createDataSource,
|
|
549
|
+
Me as document,
|
|
550
550
|
Be as encode,
|
|
551
551
|
Le as encodeInBatches,
|
|
552
552
|
ce as encodeSync,
|
|
@@ -556,9 +556,9 @@ export {
|
|
|
556
556
|
ke as encodeText,
|
|
557
557
|
Fe as encodeTextSync,
|
|
558
558
|
ie as encodeURLtoURL,
|
|
559
|
-
|
|
559
|
+
M as fetchFile,
|
|
560
560
|
je as forEach,
|
|
561
|
-
|
|
561
|
+
U as getLoaderOptions,
|
|
562
562
|
De as getPathPrefix,
|
|
563
563
|
qe as global,
|
|
564
564
|
Je as isAsyncIterable,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { y as ve, a as he, z as G, R as J, A as ue, C as Fe, F as
|
|
1
|
+
import { bz as Be, bA as le, bB as ce, bC as De, bD as Oe, bE as ke } from "./index-DMc81n9B.js";
|
|
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";
|
|
5
5
|
function de(t) {
|
|
@@ -412,7 +412,7 @@ function ot(t) {
|
|
|
412
412
|
for (const r in t) {
|
|
413
413
|
const s = t[r];
|
|
414
414
|
if (s.type === Float32Array) {
|
|
415
|
-
const n = /* @__PURE__ */ new Map(), a = new
|
|
415
|
+
const n = /* @__PURE__ */ new Map(), a = new je(s.name, new xe(), s.nullable, n);
|
|
416
416
|
e.push(a);
|
|
417
417
|
}
|
|
418
418
|
}
|
|
@@ -620,7 +620,7 @@ let ye = class {
|
|
|
620
620
|
}
|
|
621
621
|
// eslint-disable-next-line complexity, max-statements
|
|
622
622
|
parseChunk(e, r) {
|
|
623
|
-
if (this.isFirstChunk &&
|
|
623
|
+
if (this.isFirstChunk && j(this._config.beforeFirstChunk)) {
|
|
624
624
|
const h = this._config.beforeFirstChunk(e);
|
|
625
625
|
h !== void 0 && (e = h);
|
|
626
626
|
}
|
|
@@ -633,15 +633,15 @@ let ye = class {
|
|
|
633
633
|
const a = n.meta.cursor;
|
|
634
634
|
this._finished || (this._partialLine = s.substring(a - this._baseIndex), this._baseIndex = a), n && n.data && (this._rowCount += n.data.length);
|
|
635
635
|
const c = this._finished || this._config.preview && this._rowCount >= this._config.preview;
|
|
636
|
-
if (
|
|
636
|
+
if (j(this._config.chunk) && !r) {
|
|
637
637
|
if (this._config.chunk(n, this._handle), this._handle.paused() || this._handle.aborted())
|
|
638
638
|
return;
|
|
639
639
|
n = void 0, this._completeResults = void 0;
|
|
640
640
|
}
|
|
641
|
-
return !this._config.step && !this._config.chunk && (this._completeResults.data = this._completeResults.data.concat(n.data), this._completeResults.errors = this._completeResults.errors.concat(n.errors), this._completeResults.meta = n.meta), !this._completed && c &&
|
|
641
|
+
return !this._config.step && !this._config.chunk && (this._completeResults.data = this._completeResults.data.concat(n.data), this._completeResults.errors = this._completeResults.errors.concat(n.errors), this._completeResults.meta = n.meta), !this._completed && c && j(this._config.complete) && (!n || !n.meta.aborted) && (this._config.complete(this._completeResults, this._input), this._completed = !0), n;
|
|
642
642
|
}
|
|
643
643
|
_sendError(e) {
|
|
644
|
-
|
|
644
|
+
j(this._config.error) && this._config.error(e);
|
|
645
645
|
}
|
|
646
646
|
};
|
|
647
647
|
class dt extends ye {
|
|
@@ -685,7 +685,7 @@ class be {
|
|
|
685
685
|
meta: {}
|
|
686
686
|
};
|
|
687
687
|
constructor(e) {
|
|
688
|
-
if (
|
|
688
|
+
if (j(e.step)) {
|
|
689
689
|
const r = e.step;
|
|
690
690
|
e.step = (s) => {
|
|
691
691
|
if (this._results = s, this.needsHeaderRow())
|
|
@@ -707,7 +707,7 @@ class be {
|
|
|
707
707
|
parse(e, r, s) {
|
|
708
708
|
const n = this._config.quoteChar || '"';
|
|
709
709
|
if (this._config.newline || (this._config.newline = gt(e, n)), this._delimiterError = !1, this._config.delimiter)
|
|
710
|
-
|
|
710
|
+
j(this._config.delimiter) && (this._config.delimiter = this._config.delimiter(e), this._results.meta.delimiter = this._config.delimiter);
|
|
711
711
|
else {
|
|
712
712
|
const c = this.guessDelimiter(e, this._config.newline, this._config.skipEmptyLines, this._config.comments, this._config.delimitersToGuess);
|
|
713
713
|
c.successful ? this._config.delimiter = c.bestDelimiter : (this._delimiterError = !0, this._config.delimiter = F.DefaultDelimiter), this._results.meta.delimiter = this._config.delimiter;
|
|
@@ -728,7 +728,7 @@ class be {
|
|
|
728
728
|
return this._aborted;
|
|
729
729
|
}
|
|
730
730
|
abort() {
|
|
731
|
-
this._aborted = !0, this._parser.abort(), this._results.meta.aborted = !0,
|
|
731
|
+
this._aborted = !0, this._parser.abort(), this._results.meta.aborted = !0, j(this._config.complete) && this._config.complete(this._results), this._input = "";
|
|
732
732
|
}
|
|
733
733
|
testEmptyLine(e) {
|
|
734
734
|
return this._config.skipEmptyLines === "greedy" ? e.join("").trim() === "" : e.length === 1 && e[0].length === 0;
|
|
@@ -746,7 +746,7 @@ class be {
|
|
|
746
746
|
if (!this._results)
|
|
747
747
|
return;
|
|
748
748
|
const e = (r) => {
|
|
749
|
-
|
|
749
|
+
j(this._config.transformHeader) && (r = this._config.transformHeader(r)), this._fields.push(r);
|
|
750
750
|
};
|
|
751
751
|
if (Array.isArray(this._results.data[0])) {
|
|
752
752
|
for (let r = 0; this.needsHeaderRow() && r < this._results.data.length; r++)
|
|
@@ -852,7 +852,7 @@ function W(t = {}) {
|
|
|
852
852
|
this.parse = function(i, d, g) {
|
|
853
853
|
if (typeof i != "string")
|
|
854
854
|
throw new Error("Input must be a string");
|
|
855
|
-
const w = i.length, l = e.length, m = r.length, C = s.length, T =
|
|
855
|
+
const w = i.length, l = e.length, m = r.length, C = s.length, T = j(n);
|
|
856
856
|
o = 0;
|
|
857
857
|
let y = [], v = [], p = [], k = 0;
|
|
858
858
|
if (!i)
|
|
@@ -867,10 +867,10 @@ function W(t = {}) {
|
|
|
867
867
|
return S();
|
|
868
868
|
if (!(s && O.substr(0, C) === s)) {
|
|
869
869
|
if (T) {
|
|
870
|
-
if (y = [],
|
|
870
|
+
if (y = [], x(O.split(e)), I(), u)
|
|
871
871
|
return S();
|
|
872
872
|
} else
|
|
873
|
-
|
|
873
|
+
x(O.split(e));
|
|
874
874
|
if (a && D >= a)
|
|
875
875
|
return y = y.slice(0, a), S(!0);
|
|
876
876
|
}
|
|
@@ -953,7 +953,7 @@ function W(t = {}) {
|
|
|
953
953
|
break;
|
|
954
954
|
}
|
|
955
955
|
return z();
|
|
956
|
-
function
|
|
956
|
+
function x(R) {
|
|
957
957
|
y.push(R), k = o;
|
|
958
958
|
}
|
|
959
959
|
function K(R) {
|
|
@@ -965,10 +965,10 @@ function W(t = {}) {
|
|
|
965
965
|
return D;
|
|
966
966
|
}
|
|
967
967
|
function z(R) {
|
|
968
|
-
return g || (typeof R > "u" && (R = i.substr(o)), p.push(R), o = w,
|
|
968
|
+
return g || (typeof R > "u" && (R = i.substr(o)), p.push(R), o = w, x(p), T && I()), S();
|
|
969
969
|
}
|
|
970
970
|
function Y(R) {
|
|
971
|
-
o = R,
|
|
971
|
+
o = R, x(p), p = [], _ = i.indexOf(r, o);
|
|
972
972
|
}
|
|
973
973
|
function S(R, D) {
|
|
974
974
|
return {
|
|
@@ -1000,7 +1000,7 @@ function _e(t) {
|
|
|
1000
1000
|
e[r] = _e(t[r]);
|
|
1001
1001
|
return e;
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1003
|
+
function j(t) {
|
|
1004
1004
|
return typeof t == "function";
|
|
1005
1005
|
}
|
|
1006
1006
|
function wt(t, e = {}) {
|
|
@@ -1044,8 +1044,8 @@ function wt(t, e = {}) {
|
|
|
1044
1044
|
if (C && !y && (A = C === "greedy" ? m[p].join("").trim() === "" : m[p].length === 1 && m[p][0].length === 0), C === "greedy" && y) {
|
|
1045
1045
|
const B = [];
|
|
1046
1046
|
for (let b = 0; b < k; b++) {
|
|
1047
|
-
const
|
|
1048
|
-
B.push(m[p][
|
|
1047
|
+
const x = v ? l[b] : b;
|
|
1048
|
+
B.push(m[p][x]);
|
|
1049
1049
|
}
|
|
1050
1050
|
A = B.join("").trim() === "";
|
|
1051
1051
|
}
|