@nika-js/onlymap 0.6.18 → 0.6.19
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 +6 -0
- package/dist/{LercDecode.es-CFkuAghv.js → LercDecode.es-Butn4LVX.js} +1 -1
- package/dist/{basemap-BYsWqrqp.js → basemap-qZH_aNYE.js} +795 -784
- package/dist/basemap.d.ts +3 -1
- package/dist/{geoparquet-C5ezOpDN.js → geoparquet-DWQCUg6N.js} +1 -1
- package/dist/ifc-Dc-TdSJr.js +2 -3
- package/dist/{index-C7pRTBjN.js → index-4St6BumW.js} +2 -2
- package/dist/{index-PHDt5jos.js → index-BTM6Mblt.js} +1 -1
- package/dist/{index-B0qtzfOX.js → index-CNlULiHm.js} +1 -1
- package/dist/{index-h5A4LBtR.js → index-CagRqDDL.js} +18 -13
- package/dist/{index-T1jT84TY.js → index-CeeQ7CH4.js} +1 -1
- package/dist/{lerc-B8gvl7FV.js → lerc-cWjnr__g.js} +2 -2
- package/dist/onlymap.standalone.js +27 -12
- package/dist/onlymapjs.js +1 -1
- package/dist/{raster-B8bDaA3c.js → raster-BxxtJxxs.js} +2 -2
- package/dist/{raster-pipeline-BLKrUZxU.js → raster-pipeline-DlppdBYw.js} +1 -1
- package/dist/runtime-core.d.ts +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-Y8OewWSs.js → zarr-BtxMPczZ.js} +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
|
@@ -48,7 +48,9 @@ export declare class MapLibreBasemapAdapter {
|
|
|
48
48
|
zoom: number;
|
|
49
49
|
pitch?: number;
|
|
50
50
|
bearing?: number;
|
|
51
|
-
}, deckProps: DeckProps, showAttribution?: boolean, attributionHost?: HTMLElement);
|
|
51
|
+
}, deckProps: DeckProps, showAttribution?: boolean, attributionHost?: HTMLElement, deterministic?: boolean);
|
|
52
|
+
/** whenSettled's basemap gate (issue #37 follow-up): style + all raster/vector tiles for the current view fully loaded. */
|
|
53
|
+
isIdle(): boolean;
|
|
52
54
|
/** The overlay deck's live layers — whenSettled's readiness gate (issue #37). */
|
|
53
55
|
getDeckLayers(): {
|
|
54
56
|
isLoaded: boolean;
|
package/dist/ifc-Dc-TdSJr.js
CHANGED
|
@@ -82,12 +82,11 @@ async function le() {
|
|
|
82
82
|
const t = `${Tt}web-ifc-api.js`, e = await (await Lt(t)).text(), o = URL.createObjectURL(new Blob([e], { type: "text/javascript" }));
|
|
83
83
|
let n;
|
|
84
84
|
try {
|
|
85
|
-
n = await import(
|
|
86
|
-
/* @vite-ignore */
|
|
85
|
+
n = await import(/* webpackIgnore: true */ /* @vite-ignore */
|
|
87
86
|
o
|
|
88
87
|
);
|
|
89
88
|
} catch {
|
|
90
|
-
n = await import(`data:text/javascript;base64,${oe(new TextEncoder().encode(e))}`);
|
|
89
|
+
n = await import(/* webpackIgnore: true */ `data:text/javascript;base64,${oe(new TextEncoder().encode(e))}`);
|
|
91
90
|
} finally {
|
|
92
91
|
URL.revokeObjectURL(o);
|
|
93
92
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as E, j as S, k as R, o as N, p as h, q as w, s as O, t as W, v as x, w as I, x as B, y as _, A as P, B as k, E as $, F as z, H as v, I as F, J as C, K as U, N as p, O as M } from "./index-
|
|
2
|
-
import { P as $e, R as ze, _ as ve, Q as Ce, S as Ue, T as Me, U as je, X as De, Y as Je, Z as qe, $ as He, a0 as Ve, a1 as Ge, a2 as Ke, a3 as Qe, a4 as Xe, a5 as Ye, a6 as Ze, a7 as et, a8 as tt, a9 as nt, aa as rt, ab as at, ac as st, ad as ot } from "./index-
|
|
1
|
+
import { i as E, j as S, k as R, o as N, p as h, q as w, s as O, t as W, v as x, w as I, x as B, y as _, A as P, B as k, E as $, F as z, H as v, I as F, J as C, K as U, N as p, O as M } from "./index-CagRqDDL.js";
|
|
2
|
+
import { P as $e, R as ze, _ as ve, Q as Ce, S as Ue, T as Me, U as je, X as De, Y as Je, Z as qe, $ as He, a0 as Ve, a1 as Ge, a2 as Ke, a3 as Qe, a4 as Xe, a5 as Ye, a6 as Ze, a7 as et, a8 as tt, a9 as nt, aa as rt, ab as at, ac as st, ad as ot } from "./index-CagRqDDL.js";
|
|
3
3
|
import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
async function J(t, e, n = {}, r = {}) {
|
|
5
5
|
const a = E(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ag as Be, ah as le, ai as ce, aj as De, ak as Oe, al as ke } from "./index-
|
|
1
|
+
import { ag as Be, ah as le, ai as ce, aj as De, ak as Oe, al as ke } from "./index-CagRqDDL.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 { ak as Bt, ax as Xt, ay as Yt, az as Us } from "./index-
|
|
1
|
+
import { ak as Bt, ax as Xt, ay as Yt, az as Us } from "./index-CagRqDDL.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";
|
|
@@ -30679,7 +30679,7 @@ const WQ = {
|
|
|
30679
30679
|
}, $Q = {
|
|
30680
30680
|
match: (t, e) => ["csv", "tsv"].includes(Ao(t) ?? "") || /text\/(csv|tab-separated-values)/i.test(e ?? ""),
|
|
30681
30681
|
parse: async (t) => {
|
|
30682
|
-
const [e, i, n] = await Promise.all([t.text(), import("./index-
|
|
30682
|
+
const [e, i, n] = await Promise.all([t.text(), import("./index-BTM6Mblt.js"), import("./index-4St6BumW.js")]), r = await n.parse(e, i.CSVLoader, { csv: { shape: "object-row-table" } });
|
|
30683
30683
|
return XQ(r.data) ?? r.data;
|
|
30684
30684
|
}
|
|
30685
30685
|
};
|
|
@@ -30701,7 +30701,7 @@ const ZQ = {
|
|
|
30701
30701
|
parse: async (t, e) => {
|
|
30702
30702
|
t.body?.cancel().catch(() => {
|
|
30703
30703
|
});
|
|
30704
|
-
const [i, n] = await Promise.all([import("./index-
|
|
30704
|
+
const [i, n] = await Promise.all([import("./index-4St6BumW.js"), import("./index-CNlULiHm.js")]), r = t.url || e, s = /* @__PURE__ */ new Map(), o = (y) => {
|
|
30705
30705
|
const v = String(y);
|
|
30706
30706
|
let x = s.get(v);
|
|
30707
30707
|
return x || (x = yN(v), s.set(v, x)), x.then((C) => C.clone());
|
|
@@ -30714,13 +30714,13 @@ const ZQ = {
|
|
|
30714
30714
|
}, YQ = {
|
|
30715
30715
|
match: (t, e) => Ao(t) === "kml" || /application\/vnd\.google-earth\.kml/i.test(e ?? ""),
|
|
30716
30716
|
parse: async (t) => {
|
|
30717
|
-
const [e, i, n] = await Promise.all([t.text(), import("./index-
|
|
30717
|
+
const [e, i, n] = await Promise.all([t.text(), import("./index-4St6BumW.js"), import("./index-CeeQ7CH4.js")]);
|
|
30718
30718
|
return Ul(await i.parse(e, n.KMLLoader));
|
|
30719
30719
|
}
|
|
30720
30720
|
}, JQ = /* @__PURE__ */ new Set(["waypoint", "track", "route"]), KQ = {
|
|
30721
30721
|
match: (t, e) => Ao(t) === "gpx" || /application\/gpx\+xml/i.test(e ?? ""),
|
|
30722
30722
|
parse: async (t, e) => {
|
|
30723
|
-
const [i, n, r] = await Promise.all([t.text(), import("./index-
|
|
30723
|
+
const [i, n, r] = await Promise.all([t.text(), import("./index-4St6BumW.js"), import("./index-CeeQ7CH4.js")]), o = ((await n.parse(i, r.GPXLoader)).features ?? []).map((l) => {
|
|
30724
30724
|
const f = l.properties?._gpxType, d = f === "trk" ? "track" : f === "rte" ? "route" : "waypoint";
|
|
30725
30725
|
return { ...l, properties: { ...l.properties, _gpxKind: d } };
|
|
30726
30726
|
}), a = e.split("#")[1]?.toLowerCase().replace(/s$/, "");
|
|
@@ -30753,7 +30753,7 @@ const ZQ = {
|
|
|
30753
30753
|
t.arrayBuffer(),
|
|
30754
30754
|
import("./index-BYbMtNVH.js"),
|
|
30755
30755
|
import("./index-CgPV7QlM.js"),
|
|
30756
|
-
import("./geoparquet-
|
|
30756
|
+
import("./geoparquet-DWQCUg6N.js")
|
|
30757
30757
|
]), o = new Uint8Array(i);
|
|
30758
30758
|
if (o.length < 8 || o[0] !== 80 || o[1] !== 65 || o[2] !== 82 || o[3] !== 49)
|
|
30759
30759
|
throw new Error(`data="${e}": not a Parquet file (missing PAR1 magic bytes).`);
|
|
@@ -68641,7 +68641,7 @@ Un({
|
|
|
68641
68641
|
});
|
|
68642
68642
|
Un({
|
|
68643
68643
|
type: "COGLayer",
|
|
68644
|
-
loadClass: () => import("./raster-
|
|
68644
|
+
loadClass: () => import("./raster-BxxtJxxs.js").then((t) => t.r).then((t) => t.OmCOGLayer),
|
|
68645
68645
|
props: [
|
|
68646
68646
|
{ attr: "src", kind: "scalar", deckProp: "geotiff", type: "string", required: !0 },
|
|
68647
68647
|
{ attr: "min", kind: "scalar", deckProp: "rescaleMin", type: "number" },
|
|
@@ -68654,7 +68654,7 @@ Un({
|
|
|
68654
68654
|
});
|
|
68655
68655
|
Un({
|
|
68656
68656
|
type: "ZarrLayer",
|
|
68657
|
-
loadClass: () => import("./zarr-
|
|
68657
|
+
loadClass: () => import("./zarr-BtxMPczZ.js").then((t) => t.OmZarrLayer),
|
|
68658
68658
|
props: [
|
|
68659
68659
|
{ attr: "src", kind: "scalar", deckProp: "src", type: "string", required: !0 },
|
|
68660
68660
|
{ attr: "variable", kind: "scalar", deckProp: "variable", type: "string" },
|
|
@@ -80971,7 +80971,7 @@ class oU {
|
|
|
80971
80971
|
`[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).`
|
|
80972
80972
|
);
|
|
80973
80973
|
else {
|
|
80974
|
-
this.mode = "basemap", this.basemapAttr = e, import("./basemap-
|
|
80974
|
+
this.mode = "basemap", this.basemapAttr = e, import("./basemap-qZH_aNYE.js").then(({ MapLibreBasemapAdapter: s }) => {
|
|
80975
80975
|
this.destroyed || i !== this.rendererGeneration || (this.basemap = new s(
|
|
80976
80976
|
this.parent,
|
|
80977
80977
|
// this.basemapAttr, not the captured param: a style switch that
|
|
@@ -80987,7 +80987,8 @@ class oU {
|
|
|
80987
80987
|
onError: r
|
|
80988
80988
|
},
|
|
80989
80989
|
this.basemapOptions?.attribution !== !1,
|
|
80990
|
-
this.chromeHosts.attribution
|
|
80990
|
+
this.chromeHosts.attribution,
|
|
80991
|
+
this.deterministic
|
|
80991
80992
|
), this.pendingLayers = void 0, this.basemap.onLoad(() => n.onLoad?.()), this.basemap.onMove((o) => n.onViewportChange?.(o)));
|
|
80992
80993
|
});
|
|
80993
80994
|
return;
|
|
@@ -81259,6 +81260,10 @@ class oU {
|
|
|
81259
81260
|
* consumers rendering exports must add provider credits themselves.
|
|
81260
81261
|
* Headless rejects (no renderer); pre-ready rejects (await map.ready).
|
|
81261
81262
|
*/
|
|
81263
|
+
/** The basemap's own settle state (style + tiles for the current view) — true when standalone/headless or the chunk hasn't landed. */
|
|
81264
|
+
basemapIdle() {
|
|
81265
|
+
return this.basemap?.isIdle?.() ?? !0;
|
|
81266
|
+
}
|
|
81262
81267
|
/** deck's own per-layer readiness (async layer/pipeline init) — whenSettled gates on this too; a capture before it is stably missing content (issue #37's flaky first frame). Headless/basemap-pending count as ready. */
|
|
81263
81268
|
layersReady() {
|
|
81264
81269
|
const e = this.deck?.getLayers?.() ?? this.basemap?.getDeckLayers?.();
|
|
@@ -82346,7 +82351,7 @@ function gU({ layerIRs: t, core: e, mapEl: i, selection: n, history: r, featureT
|
|
|
82346
82351
|
}
|
|
82347
82352
|
};
|
|
82348
82353
|
}
|
|
82349
|
-
const mU = "0.6.
|
|
82354
|
+
const mU = "0.6.19", mEe = "https://om-api.nika.eco/v1/t", to = { endpoint: mEe };
|
|
82350
82355
|
function yEe(t) {
|
|
82351
82356
|
for (const e of Object.keys(t))
|
|
82352
82357
|
to[e] = t[e];
|
|
@@ -84630,7 +84635,7 @@ class m3e extends bo {
|
|
|
84630
84635
|
}
|
|
84631
84636
|
const { settled: i } = await Z_({
|
|
84632
84637
|
loaded: () => {
|
|
84633
|
-
if (!(this.core?.layersReady() ?? !0)) return !1;
|
|
84638
|
+
if (!(this.core?.basemapIdle() ?? !0) || !(this.core?.layersReady() ?? !0)) return !1;
|
|
84634
84639
|
for (const n of this.getLiveTilesetsInternal().values())
|
|
84635
84640
|
if (n.isLoaded?.() === !1) return !1;
|
|
84636
84641
|
return !0;
|
|
@@ -86003,7 +86008,7 @@ class IMe {
|
|
|
86003
86008
|
}
|
|
86004
86009
|
const { settled: i } = await Z_({
|
|
86005
86010
|
loaded: () => {
|
|
86006
|
-
if (!(this.core.layersReady() ?? !0)) return !1;
|
|
86011
|
+
if (!(this.core.basemapIdle() ?? !0) || !(this.core.layersReady() ?? !0)) return !1;
|
|
86007
86012
|
for (const n of this.core.getLiveTilesets().values())
|
|
86008
86013
|
if (n.isLoaded?.() === !1) return !1;
|
|
86009
86014
|
return !0;
|
|
@@ -86384,7 +86389,7 @@ async function OMe(t) {
|
|
|
86384
86389
|
e(t);
|
|
86385
86390
|
}
|
|
86386
86391
|
async function tMe() {
|
|
86387
|
-
return import("./raster-
|
|
86392
|
+
return import("./raster-BxxtJxxs.js").then((t) => t.r);
|
|
86388
86393
|
}
|
|
86389
86394
|
const FMe = {
|
|
86390
86395
|
registerLayer: Un,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, D as s } from "./raster-
|
|
1
|
+
import { C as a, D as s } from "./raster-BxxtJxxs.js";
|
|
2
2
|
const D = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
3
|
__proto__: null
|
|
4
4
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -8,7 +8,7 @@ var t;
|
|
|
8
8
|
})(t || (t = {}));
|
|
9
9
|
let l = !1;
|
|
10
10
|
async function d() {
|
|
11
|
-
const e = await import("./LercDecode.es-
|
|
11
|
+
const e = await import("./LercDecode.es-Butn4LVX.js");
|
|
12
12
|
return l || (await e.load(), l = !0), e;
|
|
13
13
|
}
|
|
14
14
|
async function i(e, r) {
|
|
@@ -93367,7 +93367,8 @@ class OdA {
|
|
|
93367
93367
|
onError: r
|
|
93368
93368
|
},
|
|
93369
93369
|
this.basemapOptions?.attribution !== !1,
|
|
93370
|
-
this.chromeHosts.attribution
|
|
93370
|
+
this.chromeHosts.attribution,
|
|
93371
|
+
this.deterministic
|
|
93371
93372
|
), this.pendingLayers = void 0, this.basemap.onLoad(() => i.onLoad?.()), this.basemap.onMove((n) => i.onViewportChange?.(n)));
|
|
93372
93373
|
});
|
|
93373
93374
|
return;
|
|
@@ -93639,6 +93640,10 @@ class OdA {
|
|
|
93639
93640
|
* consumers rendering exports must add provider credits themselves.
|
|
93640
93641
|
* Headless rejects (no renderer); pre-ready rejects (await map.ready).
|
|
93641
93642
|
*/
|
|
93643
|
+
/** The basemap's own settle state (style + tiles for the current view) — true when standalone/headless or the chunk hasn't landed. */
|
|
93644
|
+
basemapIdle() {
|
|
93645
|
+
return this.basemap?.isIdle?.() ?? !0;
|
|
93646
|
+
}
|
|
93642
93647
|
/** deck's own per-layer readiness (async layer/pipeline init) — whenSettled gates on this too; a capture before it is stably missing content (issue #37's flaky first frame). Headless/basemap-pending count as ready. */
|
|
93643
93648
|
layersReady() {
|
|
93644
93649
|
const A = this.deck?.getLayers?.() ?? this.basemap?.getDeckLayers?.();
|
|
@@ -94726,7 +94731,7 @@ function tfA({ layerIRs: e, core: A, mapEl: t, selection: i, history: r, feature
|
|
|
94726
94731
|
}
|
|
94727
94732
|
};
|
|
94728
94733
|
}
|
|
94729
|
-
const ifA = "0.6.
|
|
94734
|
+
const ifA = "0.6.19", bEe = "https://om-api.nika.eco/v1/t", PE = { endpoint: bEe };
|
|
94730
94735
|
function REe(e) {
|
|
94731
94736
|
for (const A of Object.keys(e))
|
|
94732
94737
|
PE[A] = e[A];
|
|
@@ -97010,7 +97015,7 @@ class bue extends Su {
|
|
|
97010
97015
|
}
|
|
97011
97016
|
const { settled: t } = await Hq({
|
|
97012
97017
|
loaded: () => {
|
|
97013
|
-
if (!(this.core?.layersReady() ?? !0)) return !1;
|
|
97018
|
+
if (!(this.core?.basemapIdle() ?? !0) || !(this.core?.layersReady() ?? !0)) return !1;
|
|
97014
97019
|
for (const i of this.getLiveTilesetsInternal().values())
|
|
97015
97020
|
if (i.isLoaded?.() === !1) return !1;
|
|
97016
97021
|
return !0;
|
|
@@ -98383,7 +98388,7 @@ class J8e {
|
|
|
98383
98388
|
}
|
|
98384
98389
|
const { settled: t } = await Hq({
|
|
98385
98390
|
loaded: () => {
|
|
98386
|
-
if (!(this.core.layersReady() ?? !0)) return !1;
|
|
98391
|
+
if (!(this.core.basemapIdle() ?? !0) || !(this.core.layersReady() ?? !0)) return !1;
|
|
98387
98392
|
for (const i of this.core.getLiveTilesets().values())
|
|
98388
98393
|
if (i.isLoaded?.() === !1) return !1;
|
|
98389
98394
|
return !0;
|
|
@@ -121430,12 +121435,11 @@ async function J2e() {
|
|
|
121430
121435
|
const e = `${SJ}web-ifc-api.js`, A = await (await trA(e)).text(), t = URL.createObjectURL(new Blob([A], { type: "text/javascript" }));
|
|
121431
121436
|
let i;
|
|
121432
121437
|
try {
|
|
121433
|
-
i = await import(
|
|
121434
|
-
/* @vite-ignore */
|
|
121438
|
+
i = await import(/* webpackIgnore: true */ /* @vite-ignore */
|
|
121435
121439
|
t
|
|
121436
121440
|
);
|
|
121437
121441
|
} catch {
|
|
121438
|
-
i = await import(`data:text/javascript;base64,${L2e(new TextEncoder().encode(A))}`);
|
|
121442
|
+
i = await import(/* webpackIgnore: true */ `data:text/javascript;base64,${L2e(new TextEncoder().encode(A))}`);
|
|
121439
121443
|
} finally {
|
|
121440
121444
|
URL.revokeObjectURL(t);
|
|
121441
121445
|
}
|
|
@@ -161925,10 +161929,17 @@ class oPe {
|
|
|
161925
161929
|
*/
|
|
161926
161930
|
initialized = !1;
|
|
161927
161931
|
loadCallbacks = [];
|
|
161928
|
-
constructor(A, t, i, r, s = !0, n) {
|
|
161932
|
+
constructor(A, t, i, r, s = !0, n, o = !1) {
|
|
161929
161933
|
this.showAttribution = s, this.attributionHost = n, this.map = new KsA.Map({
|
|
161930
161934
|
container: A,
|
|
161931
161935
|
style: t.style,
|
|
161936
|
+
// Determinism switch (issue #37 follow-up): label/symbol fades are
|
|
161937
|
+
// MapLibre's own wall-clock animation — a warm page reaches a frame
|
|
161938
|
+
// with whatever label opacity its playback HISTORY left, so the same
|
|
161939
|
+
// frame differed across orderings (measured: the entire diff was the
|
|
161940
|
+
// label layer). fadeDuration 0 makes label appearance a pure function
|
|
161941
|
+
// of the camera.
|
|
161942
|
+
fadeDuration: o ? 0 : void 0,
|
|
161932
161943
|
center: [i.longitude, i.latitude],
|
|
161933
161944
|
zoom: i.zoom,
|
|
161934
161945
|
pitch: i.pitch ?? 0,
|
|
@@ -161936,16 +161947,20 @@ class oPe {
|
|
|
161936
161947
|
// MapLibre's default control is replaced by our own below so preset-
|
|
161937
161948
|
// level attribution overrides survive style swaps deterministically.
|
|
161938
161949
|
attributionControl: !1
|
|
161939
|
-
}), this.mountAttribution(t.attribution), this.map.once("load", () => this.markInitialized()), this.map.on("error", (
|
|
161940
|
-
this.initialized || (console.error("[onlymapjs] basemap error before load — settling readiness:",
|
|
161950
|
+
}), this.mountAttribution(t.attribution), this.map.once("load", () => this.markInitialized()), this.map.on("error", (a) => {
|
|
161951
|
+
this.initialized || (console.error("[onlymapjs] basemap error before load — settling readiness:", a?.error ?? a), this.markInitialized());
|
|
161941
161952
|
}), this.overlay = new nPe({
|
|
161942
161953
|
interleaved: !1,
|
|
161943
161954
|
...r,
|
|
161944
|
-
onAfterRender: (
|
|
161945
|
-
this.drainDeckCaptures(), r.onAfterRender?.(
|
|
161955
|
+
onAfterRender: (a) => {
|
|
161956
|
+
this.drainDeckCaptures(), r.onAfterRender?.(a);
|
|
161946
161957
|
}
|
|
161947
161958
|
}), this.map.addControl(this.overlay);
|
|
161948
161959
|
}
|
|
161960
|
+
/** whenSettled's basemap gate (issue #37 follow-up): style + all raster/vector tiles for the current view fully loaded. */
|
|
161961
|
+
isIdle() {
|
|
161962
|
+
return this.map.loaded() && this.map.areTilesLoaded();
|
|
161963
|
+
}
|
|
161949
161964
|
/** The overlay deck's live layers — whenSettled's readiness gate (issue #37). */
|
|
161950
161965
|
getDeckLayers() {
|
|
161951
161966
|
return this.overlay._deck?.getLayers?.();
|
package/dist/onlymapjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aA as e, aB as r, aC as t, aD as o, aE as b, aF as i, ap as l, aG as n, aH as S, aI as g, aJ as c, aK as E, aL as L, aM as T, aN as A, aO as d, aP as p, aQ as m, aR as _, aS as I, aT as u, aU as M, aV as y, aW as D, ao as O, aX as R, aw as f, aY as N, aZ as P, a_ as h, W as F, a$ as B, b0 as C, b1 as v, b2 as G, b3 as U, b4 as W, b5 as w, b6 as x, b7 as Y, b8 as H, b9 as X, ba as k, bb as J, bc as K, bd as V, be as z, bf as Q, bg as Z, bh as $, bi as j, bj as q, bk as aa, bl as sa, bm as ea, bn as ra, bo as ta, bp as oa, bq as ba, br as ia, bs as la, bt as na, bu as Sa, bv as ga, bw as ca, bx as Ea, by as La, bz as Ta, bA as Aa, bB as da, bC as pa, bD as ma, bE as _a, bF as Ia, bG as ua, bH as Ma, bI as ya, bJ as Da, bK as Oa, bL as Ra, bM as fa, bN as Na, bO as Pa, bP as ha, bQ as Fa, bR as Ba, bS as Ca, bT as va, bU as Ga, bV as Ua, bW as Wa, bX as wa, bY as xa, bZ as Ya, b_ as Ha, b$ as Xa, c0 as ka, c1 as Ja, c2 as Ka, c3 as Va, c4 as za, c5 as Qa, c6 as Za } from "./index-
|
|
1
|
+
import { aA as e, aB as r, aC as t, aD as o, aE as b, aF as i, ap as l, aG as n, aH as S, aI as g, aJ as c, aK as E, aL as L, aM as T, aN as A, aO as d, aP as p, aQ as m, aR as _, aS as I, aT as u, aU as M, aV as y, aW as D, ao as O, aX as R, aw as f, aY as N, aZ as P, a_ as h, W as F, a$ as B, b0 as C, b1 as v, b2 as G, b3 as U, b4 as W, b5 as w, b6 as x, b7 as Y, b8 as H, b9 as X, ba as k, bb as J, bc as K, bd as V, be as z, bf as Q, bg as Z, bh as $, bi as j, bj as q, bk as aa, bl as sa, bm as ea, bn as ra, bo as ta, bp as oa, bq as ba, br as ia, bs as la, bt as na, bu as Sa, bv as ga, bw as ca, bx as Ea, by as La, bz as Ta, bA as Aa, bB as da, bC as pa, bD as ma, bE as _a, bF as Ia, bG as ua, bH as Ma, bI as ya, bJ as Da, bK as Oa, bL as Ra, bM as fa, bN as Na, bO as Pa, bP as ha, bQ as Fa, bR as Ba, bS as Ca, bT as va, bU as Ga, bV as Ua, bW as Wa, bX as wa, bY as xa, bZ as Ya, b_ as Ha, b$ as Xa, c0 as ka, c1 as Ja, c2 as Ka, c3 as Va, c4 as za, c5 as Qa, c6 as Za } from "./index-CagRqDDL.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ALL_POSITION_VALUES,
|
|
4
4
|
r as AUDIT_EXEMPTIONS,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as re, t as Ae, i as nt, a as Re, s as rt, C as ot, b as it, F as at, A as st, d as lt, R as he, e as ct, p as ut, m as dt, f as ht, g as pt, h as gt } from "./raster-pipeline-
|
|
1
|
+
import { c as re, t as Ae, i as nt, a as Re, s as rt, C as ot, b as it, F as at, A as st, d as lt, R as he, e as ct, p as ut, m as dt, f as ht, g as pt, h as gt } from "./raster-pipeline-DlppdBYw.js";
|
|
2
2
|
import pe from "./index-CW1n5LdO.js";
|
|
3
3
|
function mt(e, t) {
|
|
4
4
|
const n = e.length / 3, r = new Uint8ClampedArray(n * 4), o = 0, i = n, a = n * 2;
|
|
@@ -1069,7 +1069,7 @@ A.set(m.Zstd, () => import("./zstd-jXobGRcq.js").then((e) => e.decode));
|
|
|
1069
1069
|
A.set(m.Jpeg, () => Promise.resolve(oe));
|
|
1070
1070
|
A.set(m.Jpeg6, () => Promise.resolve(oe));
|
|
1071
1071
|
A.set(m.Webp, () => Promise.resolve(oe));
|
|
1072
|
-
A.set(m.Lerc, () => import("./lerc-
|
|
1072
|
+
A.set(m.Lerc, () => import("./lerc-cWjnr__g.js").then((e) => e.l).then((e) => e.decode));
|
|
1073
1073
|
async function ie(e, t, n) {
|
|
1074
1074
|
const r = A.get(t);
|
|
1075
1075
|
if (!r)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as ae } from "./mgrs-BY9bIvp4.js";
|
|
2
|
-
import { am as ce, an as le, ao as ee, ap as te, aq as ue, b as he, ar as de, l as Z, as as fe, d as pe, at as me, au as ge, av as ve, aw as ne } from "./index-
|
|
2
|
+
import { am as ce, an as le, ao as ee, ap as te, aq as ue, b as he, ar as de, l as Z, as as fe, d as pe, at as me, au as ge, av as ve, aw as ne } from "./index-CagRqDDL.js";
|
|
3
3
|
function Pe(o, e, t) {
|
|
4
4
|
const { projectedCorners: n } = e, { topLeft: s, topRight: r, bottomRight: a, bottomLeft: i } = n, c = t(s[0], s[1]), u = t(r[0], r[1]), l = t(a[0], a[1]), d = t(i[0], i[1]), f = [
|
|
5
5
|
c,
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -518,6 +518,8 @@ export declare class RuntimeCore {
|
|
|
518
518
|
* consumers rendering exports must add provider credits themselves.
|
|
519
519
|
* Headless rejects (no renderer); pre-ready rejects (await map.ready).
|
|
520
520
|
*/
|
|
521
|
+
/** The basemap's own settle state (style + tiles for the current view) — true when standalone/headless or the chunk hasn't landed. */
|
|
522
|
+
basemapIdle(): boolean;
|
|
521
523
|
/** deck's own per-layer readiness (async layer/pipeline init) — whenSettled gates on this too; a capture before it is stably missing content (issue #37's flaky first frame). Headless/basemap-pending count as ready. */
|
|
522
524
|
layersReady(): boolean;
|
|
523
525
|
/** Force one renderer draw without capturing (issue #37 — whenSettled's completed-render guarantee; a fresh page's first capture otherwise misses content that has never drawn). */
|
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, g as pr, h as mr } from "./raster-pipeline-
|
|
2
|
-
import { ap 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, g as pr, h as mr } from "./raster-pipeline-DlppdBYw.js";
|
|
2
|
+
import { ap as gr } from "./index-CagRqDDL.js";
|
|
3
3
|
import $t from "./index-CW1n5LdO.js";
|
|
4
4
|
var Et;
|
|
5
5
|
function h(e, t, n) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nika-js/onlymap",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.19",
|
|
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.6.
|
|
26
|
+
For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.6.19` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.19/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.6.
|
|
20
|
-
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.6.
|
|
19
|
+
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.19/dist/onlymapjs.css">
|
|
20
|
+
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.6.19"></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).
|