@nika-js/onlymap 0.13.0 → 0.13.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.
- package/CHANGELOG.md +5 -0
- package/dist/{basemap-BxqFTBzX.js → basemap-zG1-omic.js} +473 -443
- package/dist/basemap.d.ts +16 -3
- package/dist/{build-D4iI8O9b.js → build-Bbi4SleC.js} +1 -1
- package/dist/{client-BYFePLZV.js → client-CIH6ToMI.js} +2 -2
- package/dist/{geoparquet-BV32P0nI.js → geoparquet-CyWsYt9S.js} +1 -1
- package/dist/{globe-view-B_X6obse.js → globe-view-Xelgj_KW.js} +1 -1
- package/dist/{hillshade-9VS_t-Ks.js → hillshade-Zbg50lm6.js} +1 -1
- package/dist/{index-Di1LK4JT.js → index-6eeSlSqN.js} +3 -3
- package/dist/{index-D40H3fpl.js → index-BL_YCKiW.js} +2 -2
- package/dist/{index-D3P6Cfbr.js → index-BbVnkgld.js} +1 -1
- package/dist/{index-BR_5FIN1.js → index-BtRsa5oc.js} +3 -3
- package/dist/{index-Bct9VWxi.js → index-BwtXeP_F.js} +1 -1
- package/dist/{index-JewSBOjJ.js → index-ClAPAqcm.js} +1 -1
- package/dist/{index-IDWDfgTC.js → index-CpFNIkOO.js} +20 -20
- package/dist/{index-eSuCj2Bn.js → index-DnCmvLuC.js} +1 -1
- package/dist/{index-CbFw6P0B.js → index-JFuN4DCn.js} +1 -1
- package/dist/{lerc-C42a0ISa.js → lerc-C3SKC6CU.js} +1 -1
- package/dist/onlymap.standalone.js +36 -6
- package/dist/onlymapjs.js +1 -1
- package/dist/{post-process-effect-ktcgAjmv.js → post-process-effect-C3P9VwC9.js} +1 -1
- package/dist/{raster-CIxg_M_1.js → raster-BgCnz9-Z.js} +3 -3
- package/dist/{raster-pipeline-BODPC9vJ.js → raster-pipeline-CKdpKgFo.js} +1 -1
- package/dist/{text-on-path-LZL6NfwZ.js → text-on-path-BpVLX8Yt.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-D19fNIZt.js → zarr-Cur_pzNa.js} +2 -2
- package/docs/cartograph.md +2 -2
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +2 -2
package/dist/basemap.d.ts
CHANGED
|
@@ -156,15 +156,28 @@ export declare class MapLibreBasemapAdapter {
|
|
|
156
156
|
*/
|
|
157
157
|
setStyle(resolved: ResolvedBasemap): void;
|
|
158
158
|
/**
|
|
159
|
-
* This basemap's attribution as plain text: every source's
|
|
160
|
-
*
|
|
159
|
+
* This basemap's attribution as plain text: every source's attribution plus
|
|
160
|
+
* the preset's own line, de-duplicated.
|
|
161
161
|
*
|
|
162
162
|
* Every source the style DECLARES, not only the ones currently drawn — the
|
|
163
163
|
* superset MapLibre's control narrows to. On a printed sheet an extra credit
|
|
164
164
|
* costs nothing; a missing one is a licence breach.
|
|
165
|
+
*
|
|
166
|
+
* A source's credit is read from the LOADED source first. The keyless
|
|
167
|
+
* presets — CARTO's dark-matter, positron and voyager, OpenFreeMap's liberty
|
|
168
|
+
* and bright — declare each vector source as `{ type, url }`, and the credit
|
|
169
|
+
* lives in the TileJSON behind that url, which `getStyle()` never reports
|
|
170
|
+
* (MapLibre serialises the declared options). Reading the style alone
|
|
171
|
+
* returned nothing for every one of them, and a sheet printed no credit.
|
|
165
172
|
*/
|
|
166
173
|
attributions(): string[];
|
|
167
|
-
/**
|
|
174
|
+
/**
|
|
175
|
+
* Called when a (new) style has loaded, and again whenever a source's
|
|
176
|
+
* metadata arrives with a credit the list did not have — the TileJSON of a
|
|
177
|
+
* `{ type, url }` source loads AFTER `style.load`, which is the only event
|
|
178
|
+
* MapLibre's own control does not wait on either (it re-reads on
|
|
179
|
+
* `sourcedata` metadata).
|
|
180
|
+
*/
|
|
168
181
|
onAttributionsChange(callback: () => void): void;
|
|
169
182
|
/**
|
|
170
183
|
* (Re)mounts the compact attribution control. Source-declared attributions
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ah as j, ai as T, aj as B, ak as E, al as q } from "./index-
|
|
1
|
+
import { ah as j, ai as T, aj as B, ak as E, al as q } from "./index-CpFNIkOO.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 { as as _ } from "./index-
|
|
1
|
+
import { as as _ } from "./index-CpFNIkOO.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-
|
|
6872
|
+
const { buildPlaneTile: s } = await import("./build-Bbi4SleC.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 {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as L, j as x, am as A, an as E, ao as d, ap as h, aq as u, ar as z, p as V, W as Z, G as D } from "./index-
|
|
1
|
+
import { d as L, j as x, am as A, an as E, ao as d, ap as h, aq as u, ar as z, p as V, W as Z, G as D } from "./index-CpFNIkOO.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 { c as w, a3 as F, a4 as M, a5 as B, a6 as H, a7 as $, a8 as x, a9 as E, aa as _, ab as D, ac as O } from "./index-
|
|
1
|
+
import { c as w, a3 as F, a4 as M, a5 as B, a6 as H, a7 as $, a8 as x, a9 as E, aa as _, ab as D, ac as O } from "./index-CpFNIkOO.js";
|
|
2
2
|
import { N as P, c as C } from "./hillshade-apron-Bem3DWyJ.js";
|
|
3
3
|
import { p as N, h as R, m as Z, a as U } from "./hillshade-shader-DI2uLSNU.js";
|
|
4
4
|
const A = 64, g = /* @__PURE__ */ new Map();
|
|
@@ -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-
|
|
2
|
-
import { P as s } from "./post-process-effect-
|
|
3
|
-
import { G as pa, a as na } from "./globe-view-
|
|
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-CpFNIkOO.js";
|
|
2
|
+
import { P as s } from "./post-process-effect-C3P9VwC9.js";
|
|
3
|
+
import { G as pa, a as na } from "./globe-view-Xelgj_KW.js";
|
|
4
4
|
export {
|
|
5
5
|
t as AmbientLight,
|
|
6
6
|
o as Attribute,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aU as E, aV as x, aW as R, aX as W, aY as h, aZ as w, a_ as N, a$ as O, b0 as S, b1 as B, b2 as I, b3 as _, b4 as z, b5 as k, b6 as P, b7 as $, b8 as C, b9 as F, ba as v, bb as U, bc as b, bd as M } from "./index-
|
|
2
|
-
import { be as Pe, bf as $e, bg as Ce, bh as ve, bi as Ue, bj as Me, bk as je, bl as De, bm as qe, bn as Je, bo as Ve, bp as Ge, bq as He, br as Xe, bs as Ye, bt as Ze, bu as Ke, bv as Qe, bw as et, bx as tt, by as nt, bz as rt, bA as at, bB as st, bC as ot } from "./index-
|
|
1
|
+
import { aU as E, aV as x, aW as R, aX as W, aY as h, aZ as w, a_ as N, a$ as O, b0 as S, b1 as B, b2 as I, b3 as _, b4 as z, b5 as k, b6 as P, b7 as $, b8 as C, b9 as F, ba as v, bb as U, bc as b, bd as M } from "./index-CpFNIkOO.js";
|
|
2
|
+
import { be as Pe, bf as $e, bg as Ce, bh as ve, bi as Ue, bj as Me, bk as je, bl as De, bm as qe, bn as Je, bo as Ve, bp as Ge, bq as He, br as Xe, bs as Ye, bt as Ze, bu as Ke, bv as Qe, bw as et, bx as tt, by as nt, bz as rt, bA as at, bB as st, bC as ot } from "./index-CpFNIkOO.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 = E(t), s = x.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bJ as Bt, bV as Qt, bW as Yt, bX as Us } from "./index-
|
|
1
|
+
import { bJ as Bt, bV as Qt, bW as Yt, bX as Us } from "./index-CpFNIkOO.js";
|
|
2
2
|
import { w as gs, t as Hs, f as Ws, m as Xs } from "./mgrs-BY9bIvp4.js";
|
|
3
3
|
import { c as Qs } 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,6 +1,6 @@
|
|
|
1
|
-
import { at as j, au as S, av as A, aw as M, ax as L } from "./index-
|
|
2
|
-
import { ay as H, az as V, aA as X, aB as K } from "./index-
|
|
3
|
-
import { P as h } from "./post-process-effect-
|
|
1
|
+
import { at as j, au as S, av as A, aw as M, ax as L } from "./index-CpFNIkOO.js";
|
|
2
|
+
import { ay as H, az as V, aA as X, aB as K } from "./index-CpFNIkOO.js";
|
|
3
|
+
import { P as h } from "./post-process-effect-C3P9VwC9.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 { aI as tt, aJ as et, aK as j, ab as nt, ac as ot, aL as q, aM as rt, aN as O, a7 as st, a8 as U, aO as B, aP as it } from "./index-
|
|
1
|
+
import { aI as tt, aJ as et, aK as j, ab as nt, ac as ot, aL as q, aM as rt, aN as O, a7 as st, a8 as U, aO as B, aP as it } from "./index-CpFNIkOO.js";
|
|
2
2
|
const H = Math.PI / 180, T = tt * H;
|
|
3
3
|
function K(t, r) {
|
|
4
4
|
const n = Math.max(Math.cos(r * H), 1e-6);
|
|
@@ -32256,7 +32256,7 @@ const fse = {
|
|
|
32256
32256
|
}, hse = {
|
|
32257
32257
|
match: (t, e) => ["csv", "tsv"].includes(Po(t) ?? "") || /text\/(csv|tab-separated-values)/i.test(e ?? ""),
|
|
32258
32258
|
parse: async (t) => {
|
|
32259
|
-
const [e, n, i] = await Promise.all([t.text(), import("./index-
|
|
32259
|
+
const [e, n, i] = await Promise.all([t.text(), import("./index-DnCmvLuC.js"), import("./index-BL_YCKiW.js")]), r = await i.parse(e, n.CSVLoader, { csv: { shape: "object-row-table" } });
|
|
32260
32260
|
return dse(r.data) ?? r.data;
|
|
32261
32261
|
}
|
|
32262
32262
|
};
|
|
@@ -32278,7 +32278,7 @@ const Ase = {
|
|
|
32278
32278
|
parse: async (t, e) => {
|
|
32279
32279
|
t.body?.cancel().catch(() => {
|
|
32280
32280
|
});
|
|
32281
|
-
const [n, i] = await Promise.all([import("./index-
|
|
32281
|
+
const [n, i] = await Promise.all([import("./index-BL_YCKiW.js"), import("./index-BbVnkgld.js")]), r = t.url || e, s = /* @__PURE__ */ new Map(), o = (S) => {
|
|
32282
32282
|
const E = String(S);
|
|
32283
32283
|
let M = s.get(E);
|
|
32284
32284
|
return M || (M = l4(E), s.set(E, M)), M.then((B) => B.clone());
|
|
@@ -32293,13 +32293,13 @@ const Ase = {
|
|
|
32293
32293
|
}, pse = {
|
|
32294
32294
|
match: (t, e) => Po(t) === "kml" || /application\/vnd\.google-earth\.kml/i.test(e ?? ""),
|
|
32295
32295
|
parse: async (t) => {
|
|
32296
|
-
const [e, n, i] = await Promise.all([t.text(), import("./index-
|
|
32296
|
+
const [e, n, i] = await Promise.all([t.text(), import("./index-BL_YCKiW.js"), import("./index-JFuN4DCn.js")]);
|
|
32297
32297
|
return fc(await n.parse(e, i.KMLLoader));
|
|
32298
32298
|
}
|
|
32299
32299
|
}, gse = /* @__PURE__ */ new Set(["waypoint", "track", "route"]), mse = {
|
|
32300
32300
|
match: (t, e) => Po(t) === "gpx" || /application\/gpx\+xml/i.test(e ?? ""),
|
|
32301
32301
|
parse: async (t, e) => {
|
|
32302
|
-
const [n, i, r] = await Promise.all([t.text(), import("./index-
|
|
32302
|
+
const [n, i, r] = await Promise.all([t.text(), import("./index-BL_YCKiW.js"), import("./index-JFuN4DCn.js")]), o = ((await i.parse(n, r.GPXLoader)).features ?? []).map((l) => {
|
|
32303
32303
|
const u = l.properties?._gpxType, f = u === "trk" ? "track" : u === "rte" ? "route" : "waypoint";
|
|
32304
32304
|
return { ...l, properties: { ...l.properties, _gpxKind: f } };
|
|
32305
32305
|
}), a = e.split("#")[1]?.toLowerCase().replace(/s$/, "");
|
|
@@ -32338,7 +32338,7 @@ const Ase = {
|
|
|
32338
32338
|
t.arrayBuffer(),
|
|
32339
32339
|
import("./index-BYbMtNVH.js"),
|
|
32340
32340
|
import("./index-CgPV7QlM.js"),
|
|
32341
|
-
import("./geoparquet-
|
|
32341
|
+
import("./geoparquet-CyWsYt9S.js")
|
|
32342
32342
|
]), o = new Uint8Array(n);
|
|
32343
32343
|
if (o.length < 8 || o[0] !== 80 || o[1] !== 65 || o[2] !== 82 || o[3] !== 49)
|
|
32344
32344
|
throw new Error(`data="${e}": not a Parquet file (missing PAR1 magic bytes).`);
|
|
@@ -72192,7 +72192,7 @@ Ai({
|
|
|
72192
72192
|
type: "COGLayer",
|
|
72193
72193
|
carriesRasterWindow: !0,
|
|
72194
72194
|
carriesRasterIdentify: !0,
|
|
72195
|
-
loadClass: () => import("./raster-
|
|
72195
|
+
loadClass: () => import("./raster-BgCnz9-Z.js").then((t) => t.r).then((t) => t.OmCOGLayer),
|
|
72196
72196
|
props: [
|
|
72197
72197
|
{ attr: "src", kind: "scalar", deckProp: "geotiff", type: "string", required: !0 },
|
|
72198
72198
|
// COG v2 (issue #13): 1-based band selection — a single band (colormap-
|
|
@@ -72228,7 +72228,7 @@ Ai({
|
|
|
72228
72228
|
});
|
|
72229
72229
|
Ai({
|
|
72230
72230
|
type: "ZarrLayer",
|
|
72231
|
-
loadClass: () => import("./zarr-
|
|
72231
|
+
loadClass: () => import("./zarr-Cur_pzNa.js").then((t) => t.OmZarrLayer),
|
|
72232
72232
|
props: [
|
|
72233
72233
|
{ attr: "src", kind: "scalar", deckProp: "src", type: "string", required: !0 },
|
|
72234
72234
|
{ attr: "variable", kind: "scalar", deckProp: "variable", type: "string" },
|
|
@@ -72260,7 +72260,7 @@ Ai({
|
|
|
72260
72260
|
});
|
|
72261
72261
|
Ai({
|
|
72262
72262
|
type: "HillshadeLayer",
|
|
72263
|
-
loadClass: () => import("./hillshade-
|
|
72263
|
+
loadClass: () => import("./hillshade-Zbg50lm6.js").then((t) => t.OmHillshadeLayer),
|
|
72264
72264
|
warpsInPlane: !0,
|
|
72265
72265
|
props: [
|
|
72266
72266
|
{ attr: "src", kind: "scalar", deckProp: "src", type: "string", required: !0 },
|
|
@@ -72290,7 +72290,7 @@ Ai({
|
|
|
72290
72290
|
});
|
|
72291
72291
|
Ai({
|
|
72292
72292
|
type: "TextOnPathLayer",
|
|
72293
|
-
loadClass: () => import("./text-on-path-
|
|
72293
|
+
loadClass: () => import("./text-on-path-BpVLX8Yt.js").then((t) => t.OmTextOnPathLayer),
|
|
72294
72294
|
props: [
|
|
72295
72295
|
{ attr: "get-path", kind: "accessor", deckProp: "getPath", type: "string" },
|
|
72296
72296
|
{ attr: "get-text", kind: "accessor", deckProp: "getText", type: "string" },
|
|
@@ -84631,7 +84631,7 @@ class ba extends Vf {
|
|
|
84631
84631
|
if (!f.ok) throw new Error(`HTTP ${f.status} for ${s}`);
|
|
84632
84632
|
const A = await f.arrayBuffer();
|
|
84633
84633
|
if (!A.byteLength) return null;
|
|
84634
|
-
const { buildTile: v } = await import("./client-
|
|
84634
|
+
const { buildTile: v } = await import("./client-CIH6ToMI.js"), _ = await v(A, i, u, o);
|
|
84635
84635
|
return { buffer: A, index: i, geometry: _, builtFor: l };
|
|
84636
84636
|
})();
|
|
84637
84637
|
}
|
|
@@ -84648,7 +84648,7 @@ class ba extends Vf {
|
|
|
84648
84648
|
if (n.building !== r) {
|
|
84649
84649
|
n.building = r;
|
|
84650
84650
|
const s = e.tile;
|
|
84651
|
-
import("./client-
|
|
84651
|
+
import("./client-CIH6ToMI.js").then(({ buildTile: o }) => o(n.buffer, n.index, this.buildOptions(), i)).then((o) => {
|
|
84652
84652
|
n.building === r && (n.geometry = o, n.builtFor = r, n.building = void 0, this.internalState && (s.layers = null, this.setNeedsUpdate()));
|
|
84653
84653
|
}).catch(() => {
|
|
84654
84654
|
n.building === r && (n.building = void 0);
|
|
@@ -86365,7 +86365,7 @@ class Ez {
|
|
|
86365
86365
|
if (e && xv(e) && console.error(
|
|
86366
86366
|
`[onlymapjs] basemap="${e}" (Mapbox GL) is not implemented yet in this version — falling back to standalone (no basemap). Use a maplibre-* basemap instead (no token required).`
|
|
86367
86367
|
), i.kind === "maplibre") {
|
|
86368
|
-
this.mode = "basemap", import("./basemap-
|
|
86368
|
+
this.mode = "basemap", import("./basemap-zG1-omic.js").then(({ MapLibreBasemapAdapter: o }) => {
|
|
86369
86369
|
this.destroyed || n !== this.rendererGeneration || (this.basemap = new o(
|
|
86370
86370
|
this.parent,
|
|
86371
86371
|
// this.basemapAttr, not the captured param: a style switch that
|
|
@@ -86691,7 +86691,7 @@ class Ez {
|
|
|
86691
86691
|
this.postProcess = null, this.applyEffects();
|
|
86692
86692
|
return;
|
|
86693
86693
|
}
|
|
86694
|
-
import("./index-
|
|
86694
|
+
import("./index-BtRsa5oc.js").then(({ buildPostProcessEffects: n }) => {
|
|
86695
86695
|
this.destroyed || this.effectsIR !== e || (this.postProcess = n(e, this.pixelsPerMm()), this.applyEffects());
|
|
86696
86696
|
});
|
|
86697
86697
|
}
|
|
@@ -87133,7 +87133,7 @@ class Ez {
|
|
|
87133
87133
|
* than the export failing.
|
|
87134
87134
|
*/
|
|
87135
87135
|
async captureBand(e, n) {
|
|
87136
|
-
const { bandScaleFor: i } = await import("./index-
|
|
87136
|
+
const { bandScaleFor: i } = await import("./index-BwtXeP_F.js"), r = i(n);
|
|
87137
87137
|
return this.withCapturePixelRatio(r, async () => {
|
|
87138
87138
|
this.bandIsolation = e ? new Set(e) : null;
|
|
87139
87139
|
try {
|
|
@@ -87155,7 +87155,7 @@ class Ez {
|
|
|
87155
87155
|
async resolvedPostProcessPass() {
|
|
87156
87156
|
const e = this.buildEffects();
|
|
87157
87157
|
if (e.length === 0) return { present: !1 };
|
|
87158
|
-
const { PostProcessEffect: n } = await import("./index-
|
|
87158
|
+
const { PostProcessEffect: n } = await import("./index-6eeSlSqN.js");
|
|
87159
87159
|
for (const i of e)
|
|
87160
87160
|
if (i instanceof n) {
|
|
87161
87161
|
const r = i;
|
|
@@ -87756,7 +87756,7 @@ class Ez {
|
|
|
87756
87756
|
const { width: i, height: r } = n, s = (v) => {
|
|
87757
87757
|
const _ = n.project([v[0], v[1]]);
|
|
87758
87758
|
return [_[0], _[1]];
|
|
87759
|
-
}, o = n.unproject([i / 2, r / 2]), a = n.unproject([i / 2 + 1, r / 2]), l = Math.max(La([o[0], o[1]], [a[0], a[1]]), 1e-9), u = await this.resolvedPostProcessPass(), { serializeToSvg: f } = await import("./index-
|
|
87759
|
+
}, o = n.unproject([i / 2, r / 2]), a = n.unproject([i / 2 + 1, r / 2]), l = Math.max(La([o[0], o[1]], [a[0], a[1]]), 1e-9), u = await this.resolvedPostProcessPass(), { serializeToSvg: f } = await import("./index-BwtXeP_F.js"), A = await f(this.lastIRs, {
|
|
87760
87760
|
width: i,
|
|
87761
87761
|
height: r,
|
|
87762
87762
|
project: s,
|
|
@@ -88498,7 +88498,7 @@ function Fz(t, e, n, i, r, s) {
|
|
|
88498
88498
|
if (u) return u;
|
|
88499
88499
|
const f = `${r}|${l}#${o.length}`;
|
|
88500
88500
|
if (!Hb.has(f)) {
|
|
88501
|
-
const A = import("./index-
|
|
88501
|
+
const A = import("./index-ClAPAqcm.js").then(async ({ runTransforms: v }) => {
|
|
88502
88502
|
PL(a, l, await v(o, e, n, i, r));
|
|
88503
88503
|
}).catch((v) => {
|
|
88504
88504
|
console.error(`[onlymapjs] ${r} failed to load the geometry transforms:`, v), PL(a, l, t);
|
|
@@ -88746,7 +88746,7 @@ function Vz({ layerIRs: t, core: e, mapEl: n, selection: i, history: r, featureT
|
|
|
88746
88746
|
}
|
|
88747
88747
|
};
|
|
88748
88748
|
}
|
|
88749
|
-
const zz = "0.13.
|
|
88749
|
+
const zz = "0.13.1", _ke = "https://om-api.nika.eco/v1/t", po = { endpoint: _ke };
|
|
88750
88750
|
function xke(t) {
|
|
88751
88751
|
for (const e of Object.keys(t))
|
|
88752
88752
|
po[e] = t[e];
|
|
@@ -92271,7 +92271,7 @@ class zFe extends Fo {
|
|
|
92271
92271
|
this.core?.setEffects([]);
|
|
92272
92272
|
return;
|
|
92273
92273
|
}
|
|
92274
|
-
import("./index-
|
|
92274
|
+
import("./index-BtRsa5oc.js").then(({ parseEffectEls: n }) => {
|
|
92275
92275
|
!this.core || !this.isConnected || this.core.setEffects(n(this));
|
|
92276
92276
|
});
|
|
92277
92277
|
}
|
|
@@ -94192,7 +94192,7 @@ async function mOe(t) {
|
|
|
94192
94192
|
e(t);
|
|
94193
94193
|
}
|
|
94194
94194
|
async function PNe() {
|
|
94195
|
-
return import("./raster-
|
|
94195
|
+
return import("./raster-BgCnz9-Z.js").then((t) => t.r);
|
|
94196
94196
|
}
|
|
94197
94197
|
const yOe = {
|
|
94198
94198
|
registerLayer: Ai,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bF as Be, bG as le, bH as ce, bI as De, bJ as Oe, bK as ke } from "./index-
|
|
1
|
+
import { bF as Be, bG as le, bH as ce, bI as De, bJ as Oe, bK as ke } from "./index-CpFNIkOO.js";
|
|
2
2
|
import { y as Fe, a as he, z as G, R as J, A as ue, C as ve, 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";
|
|
@@ -100558,7 +100558,7 @@ function nDA({ layerIRs: e, core: A, mapEl: t, selection: i, history: n, feature
|
|
|
100558
100558
|
}
|
|
100559
100559
|
};
|
|
100560
100560
|
}
|
|
100561
|
-
const sDA = "0.13.
|
|
100561
|
+
const sDA = "0.13.1", LDe = "https://om-api.nika.eco/v1/t", oE = { endpoint: LDe };
|
|
100562
100562
|
function UDe(e) {
|
|
100563
100563
|
for (const A of Object.keys(e))
|
|
100564
100564
|
oE[A] = e[A];
|
|
@@ -177602,12 +177602,19 @@ class k9e {
|
|
|
177602
177602
|
this.markBusy(), this.map.setStyle(A.style), A.attribution !== this.attributionText && this.mountAttribution(A.attribution);
|
|
177603
177603
|
}
|
|
177604
177604
|
/**
|
|
177605
|
-
* This basemap's attribution as plain text: every source's
|
|
177606
|
-
*
|
|
177605
|
+
* This basemap's attribution as plain text: every source's attribution plus
|
|
177606
|
+
* the preset's own line, de-duplicated.
|
|
177607
177607
|
*
|
|
177608
177608
|
* Every source the style DECLARES, not only the ones currently drawn — the
|
|
177609
177609
|
* superset MapLibre's control narrows to. On a printed sheet an extra credit
|
|
177610
177610
|
* costs nothing; a missing one is a licence breach.
|
|
177611
|
+
*
|
|
177612
|
+
* A source's credit is read from the LOADED source first. The keyless
|
|
177613
|
+
* presets — CARTO's dark-matter, positron and voyager, OpenFreeMap's liberty
|
|
177614
|
+
* and bright — declare each vector source as `{ type, url }`, and the credit
|
|
177615
|
+
* lives in the TileJSON behind that url, which `getStyle()` never reports
|
|
177616
|
+
* (MapLibre serialises the declared options). Reading the style alone
|
|
177617
|
+
* returned nothing for every one of them, and a sheet printed no credit.
|
|
177611
177618
|
*/
|
|
177612
177619
|
attributions() {
|
|
177613
177620
|
let A = {};
|
|
@@ -177615,11 +177622,34 @@ class k9e {
|
|
|
177615
177622
|
A = this.map.getStyle?.()?.sources ?? {};
|
|
177616
177623
|
} catch {
|
|
177617
177624
|
}
|
|
177618
|
-
|
|
177625
|
+
const t = Object.keys(A).map((i) => {
|
|
177626
|
+
try {
|
|
177627
|
+
return this.map.getSource?.(i)?.attribution;
|
|
177628
|
+
} catch {
|
|
177629
|
+
return;
|
|
177630
|
+
}
|
|
177631
|
+
});
|
|
177632
|
+
return fSe([this.attributionText, ...t, ...Object.values(A).map((i) => i?.attribution)]);
|
|
177619
177633
|
}
|
|
177620
|
-
/**
|
|
177634
|
+
/**
|
|
177635
|
+
* Called when a (new) style has loaded, and again whenever a source's
|
|
177636
|
+
* metadata arrives with a credit the list did not have — the TileJSON of a
|
|
177637
|
+
* `{ type, url }` source loads AFTER `style.load`, which is the only event
|
|
177638
|
+
* MapLibre's own control does not wait on either (it re-reads on
|
|
177639
|
+
* `sourcedata` metadata).
|
|
177640
|
+
*/
|
|
177621
177641
|
onAttributionsChange(A) {
|
|
177622
|
-
|
|
177642
|
+
let t = "";
|
|
177643
|
+
const i = () => {
|
|
177644
|
+
const n = this.attributions().join(`
|
|
177645
|
+
`), s = n !== t;
|
|
177646
|
+
return t = n, s;
|
|
177647
|
+
};
|
|
177648
|
+
this.map.on("style.load", () => {
|
|
177649
|
+
i(), A();
|
|
177650
|
+
}), this.map.on("sourcedata", (n) => {
|
|
177651
|
+
n.sourceDataType === "metadata" && i() && A();
|
|
177652
|
+
});
|
|
177623
177653
|
}
|
|
177624
177654
|
/**
|
|
177625
177655
|
* (Re)mounts the compact attribution control. Source-declared attributions
|
package/dist/onlymapjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bY as e, bZ as r, b_ as t, aa as c, C as o, b$ as i, c as d, c0 as n, c1 as l, c2 as S, c3 as g, ay as E, c4 as L, c5 as T, c6 as _, c7 as A, c8 as p, c9 as m, ca as I, cb as u, L as M, g as D, cc as y, cd as f, ce as O, cf as P, cg as R, bM as C, ch as N, a4 as b, ci as F, aI as v, cj as h, W as B, ck as x, aH as G, cl as w, cm as U, cn as W, co as Y, cp as k, cq as H, cr as X, cs as z, ct as J, cu as K, cv as j, cw as V, cx as q, cy as Z, cz as $, cA as Q, cB as aa, aB as sa, cC as ea, cD as ra, cE as ta, cF as ca, cG as oa, cH as ia, cI as da, cJ as na, cK as la, cL as Sa, cM as ga, cN as Ea, a7 as La, cO as Ta, cP as _a, av as Aa, cQ as pa, cR as ma, cS as Ia, cT as ua, cU as Ma, cV as Da, cW as ya, cX as fa, cY as Oa, cZ as Pa, c_ as Ra, c$ as Ca, d0 as Na, d1 as ba, d2 as Fa, d3 as va, d4 as ha, d5 as Ba, d6 as xa, d7 as Ga, d8 as wa, d9 as Ua, da as Wa, db as Ya, dc as ka, dd as Ha, de as Xa, df as za, dg as Ja, dh as Ka, aJ as ja, di as Va, dj as qa, dk as Za, dl as $a, dm as Qa, dn as as, dp as ss, dq as es, dr as rs, ds as ts, dt as cs, du as os, dv as is, dw as ds, dx as ns, dy as ls, dz as Ss } from "./index-
|
|
1
|
+
import { bY as e, bZ as r, b_ as t, aa as c, C as o, b$ as i, c as d, c0 as n, c1 as l, c2 as S, c3 as g, ay as E, c4 as L, c5 as T, c6 as _, c7 as A, c8 as p, c9 as m, ca as I, cb as u, L as M, g as D, cc as y, cd as f, ce as O, cf as P, cg as R, bM as C, ch as N, a4 as b, ci as F, aI as v, cj as h, W as B, ck as x, aH as G, cl as w, cm as U, cn as W, co as Y, cp as k, cq as H, cr as X, cs as z, ct as J, cu as K, cv as j, cw as V, cx as q, cy as Z, cz as $, cA as Q, cB as aa, aB as sa, cC as ea, cD as ra, cE as ta, cF as ca, cG as oa, cH as ia, cI as da, cJ as na, cK as la, cL as Sa, cM as ga, cN as Ea, a7 as La, cO as Ta, cP as _a, av as Aa, cQ as pa, cR as ma, cS as Ia, cT as ua, cU as Ma, cV as Da, cW as ya, cX as fa, cY as Oa, cZ as Pa, c_ as Ra, c$ as Ca, d0 as Na, d1 as ba, d2 as Fa, d3 as va, d4 as ha, d5 as Ba, d6 as xa, d7 as Ga, d8 as wa, d9 as Ua, da as Wa, db as Ya, dc as ka, dd as Ha, de as Xa, df as za, dg as Ja, dh as Ka, aJ as ja, di as Va, dj as qa, dk as Za, dl as $a, dm as Qa, dn as as, dp as ss, dq as es, dr as rs, ds as ts, dt as cs, du as os, dv as is, dw as ds, dx as ns, dy as ls, dz as Ss } from "./index-CpFNIkOO.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ALL_POSITION_VALUES,
|
|
4
4
|
r as AUDIT_EXEMPTIONS,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as se, t as $e, i as Ct, a as ke, s as Lt, C as It, b as Gt, F as vt, A as Et, d as Ft, R as ye, e as At, p as jt, m as Rt, f as Mt, g as We, h as Ut, r as le, j as Ot, k as xt, l as Kt, n as Dt } from "./raster-pipeline-
|
|
1
|
+
import { c as se, t as $e, i as Ct, a as ke, s as Lt, C as It, b as Gt, F as vt, A as Et, d as Ft, R as ye, e as At, p as jt, m as Rt, f as Mt, g as We, h as Ut, r as le, j as Ot, k as xt, l as Kt, n as Dt } from "./raster-pipeline-CKdpKgFo.js";
|
|
2
2
|
import { N as Nt, c as zt } from "./hillshade-apron-Bem3DWyJ.js";
|
|
3
3
|
import { r as Bt } from "./hillshade-shader-DI2uLSNU.js";
|
|
4
|
-
import { bT as _t, bU as $t } from "./index-
|
|
4
|
+
import { bT as _t, bU as $t } from "./index-CpFNIkOO.js";
|
|
5
5
|
import we from "./index-CW1n5LdO.js";
|
|
6
6
|
function kt(e, t) {
|
|
7
7
|
const n = e.length / 3, r = new Uint8ClampedArray(n * 4), o = 0, i = n, a = n * 2;
|
|
@@ -1072,7 +1072,7 @@ j.set(f.Zstd, () => import("./zstd-jXobGRcq.js").then((e) => e.decode));
|
|
|
1072
1072
|
j.set(f.Jpeg, () => Promise.resolve(ce));
|
|
1073
1073
|
j.set(f.Jpeg6, () => Promise.resolve(ce));
|
|
1074
1074
|
j.set(f.Webp, () => Promise.resolve(ce));
|
|
1075
|
-
j.set(f.Lerc, () => import("./lerc-
|
|
1075
|
+
j.set(f.Lerc, () => import("./lerc-C3SKC6CU.js").then((e) => e.decode));
|
|
1076
1076
|
async function ue(e, t, n) {
|
|
1077
1077
|
const r = j.get(t);
|
|
1078
1078
|
if (!r)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as he } from "./mgrs-BY9bIvp4.js";
|
|
2
|
-
import { ad as de, bL as fe, bM as re, c as oe, bN as me, G as pe, bO as ge, aR as Z, bP as ve, N as be, bQ as xe, bR as Pe, bS as Te, a4 as ie } from "./index-
|
|
2
|
+
import { ad as de, bL as fe, bM as re, c as oe, bN as me, G as pe, bO as ge, aR as Z, bP as ve, N as be, bQ as xe, bR as Pe, bS as Te, a4 as ie } from "./index-CpFNIkOO.js";
|
|
3
3
|
import { p as ye, a as Le, h as we } from "./hillshade-shader-DI2uLSNU.js";
|
|
4
4
|
function Oe(n, e, t) {
|
|
5
5
|
const { projectedCorners: s } = e, { topLeft: r, topRight: o, bottomRight: i, bottomLeft: a } = s, c = t(r[0], r[1]), u = t(o[0], o[1]), l = t(i[0], i[1]), d = t(a[0], a[1]), f = [
|
package/dist/version.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ur, d as lr, R as zt, e as fr, m as dr, p as St, f as hr, k as pr, l as mr } from "./raster-pipeline-
|
|
2
|
-
import { c as gr } from "./index-
|
|
1
|
+
import { A as ur, d as lr, R as zt, e as fr, m as dr, p as St, f as hr, k as pr, l as mr } from "./raster-pipeline-CKdpKgFo.js";
|
|
2
|
+
import { c as gr } from "./index-CpFNIkOO.js";
|
|
3
3
|
import $t from "./index-CW1n5LdO.js";
|
|
4
4
|
var Et;
|
|
5
5
|
function h(e, t, n) {
|
package/docs/cartograph.md
CHANGED
|
@@ -22,8 +22,8 @@ to PDF at true page size via CSS `@page` and exports PNG/JPEG at print DPI throu
|
|
|
22
22
|
<html>
|
|
23
23
|
<head>
|
|
24
24
|
<meta charset="utf-8">
|
|
25
|
-
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.13.
|
|
26
|
-
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.13.
|
|
25
|
+
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.13.1/dist/cartograph.standalone.js"></script>
|
|
26
|
+
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.13.1/dist/cartograph.css">
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
|
29
29
|
<om-cartograph cartograph-id="cg-lot-12" format="cartograph/2" size="A4" theme="minimal"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nika-js/onlymap",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Declarative deck.gl maps for HTML and React — interactive WebGL mapping with GeoJSON/CSV/Arrow data, MapLibre basemaps, widgets, popups, and live streams from a custom-element manifest or typed React components. TypeScript, no build step.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"publishConfig": {
|
|
@@ -23,7 +23,7 @@ Use OnlyMapJS as a declarative HTML map library. Write custom elements such as `
|
|
|
23
23
|
</script>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.13.
|
|
26
|
+
For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.13.1` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.13.1/dist/onlymapjs.css">`. Never a rebundling CDN (esm.sh, skypack): re-bundling duplicates the deck.gl/luma.gl runtime and every layer fails shader compilation.
|
|
27
27
|
|
|
28
28
|
## React Projects
|
|
29
29
|
|
|
@@ -16,8 +16,8 @@ Vite/npm project:
|
|
|
16
16
|
Static CDN page (raw-file CDNs only — unpkg/jsDelivr; never esm.sh or another rebundling CDN, which duplicates the WebGL runtime and breaks layer shaders):
|
|
17
17
|
|
|
18
18
|
```html
|
|
19
|
-
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.13.
|
|
20
|
-
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.13.
|
|
19
|
+
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.13.1/dist/onlymapjs.css">
|
|
20
|
+
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.13.1"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Always include `onlymapjs.css` — it carries the MapLibre basemap styles and the no-JS fallback rules (`<om-fallback>` / default banner). For the fallback to work in script-disabled previews it must load without JavaScript: a real `<link rel="stylesheet">` or inlined `<style>` on no-build pages (a bundler-emitted stylesheet is fine in npm projects).
|