@nika-js/onlymap 0.3.3 → 0.3.4
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/.vscode/onlymap.code-snippets +10 -2
- package/dist/{LercDecode.es-C4ZU4w6n.js → LercDecode.es-D6eXA5jP.js} +1 -1
- package/dist/{basemap-B9d6Y51x.js → basemap-BRh_zvzt.js} +1 -1
- package/dist/{index-C5aBFqnA.js → index-9_RmnPoW.js} +1 -1
- package/dist/{index-CiiZvAvQ.js → index-B3NQy6CS.js} +2 -2
- package/dist/{index--2ZHGR5B.js → index-BR1HjJoE.js} +7 -7
- package/dist/{index-DJFLw8Tg.js → index-Y_CL37KN.js} +1 -1
- package/dist/{index-MHs8loZY.js → index-xaNTkA9k.js} +1 -1
- package/dist/{lerc-DaAT5vIY.js → lerc-vBCRLD5s.js} +2 -2
- package/dist/onlymap.standalone.js +1 -1
- package/dist/onlymapjs.js +1 -1
- package/dist/{raster-YOx5e8Fl.js → raster-BwULn87I.js} +2 -2
- package/dist/version.d.ts +1 -1
- package/docs/stories.md +1 -1
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +2 -2
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
" import \"@nika-js/onlymap\";",
|
|
14
14
|
" import \"@nika-js/onlymap/onlymapjs.css\";",
|
|
15
15
|
" </script>",
|
|
16
|
+
" <style>",
|
|
17
|
+
" html, body { margin: 0; height: 100%; }",
|
|
18
|
+
" om-map { display: block; height: 100vh; }",
|
|
19
|
+
" </style>",
|
|
16
20
|
"</head>",
|
|
17
21
|
"<body>",
|
|
18
22
|
"",
|
|
@@ -23,7 +27,7 @@
|
|
|
23
27
|
" <om-layer id=\"${3:points}\" type=\"ScatterplotLayer\"",
|
|
24
28
|
" data=\"${4:../data/bikes.json}\"",
|
|
25
29
|
" label=\"${5:Points}\" color=\"${6:#e63946}\"",
|
|
26
|
-
" get-position=\"[
|
|
30
|
+
" get-position=\"[\\$lon, \\$lat]\"",
|
|
27
31
|
" pickable></om-layer>",
|
|
28
32
|
"",
|
|
29
33
|
" <!-- Rich HTML popup — follows the last click via anchor-from=\"selection\" -->",
|
|
@@ -63,6 +67,10 @@
|
|
|
63
67
|
" import \"@nika-js/onlymap\";",
|
|
64
68
|
" import \"@nika-js/onlymap/onlymapjs.css\";",
|
|
65
69
|
" </script>",
|
|
70
|
+
" <style>",
|
|
71
|
+
" html, body { margin: 0; height: 100%; }",
|
|
72
|
+
" om-map { display: block; height: 100vh; }",
|
|
73
|
+
" </style>",
|
|
66
74
|
"</head>",
|
|
67
75
|
"<body>",
|
|
68
76
|
"",
|
|
@@ -101,7 +109,7 @@
|
|
|
101
109
|
"<om-layer id=\"${1:points}\" type=\"ScatterplotLayer\"",
|
|
102
110
|
" data=\"${2:../data/bikes.json}\"",
|
|
103
111
|
" label=\"${3:Points}\" color=\"${4:#e63946}\"",
|
|
104
|
-
" get-position=\"[
|
|
112
|
+
" get-position=\"[\\$lon, \\$lat]\"",
|
|
105
113
|
" pickable></om-layer>$0"
|
|
106
114
|
]
|
|
107
115
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ny, L as sy, M as oy, m as ay, c as ka, z as oc, a as Sd, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index
|
|
1
|
+
import { C as ny, L as sy, M as oy, m as ay, c as ka, z as oc, a as Sd, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-BR1HjJoE.js";
|
|
2
2
|
const Cd = Math.PI / 180, gy = 180 / Math.PI;
|
|
3
3
|
function em(Pe, Q = 0) {
|
|
4
4
|
const ge = Math.min(180, Pe) * Cd;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ae as Be, af as le, ag as ce, ah as De, ai as Oe, aj as ke } from "./index
|
|
1
|
+
import { ae as Be, af as le, ag as ce, ah as De, ai as Oe, aj as ke } from "./index-BR1HjJoE.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,5 +1,5 @@
|
|
|
1
|
-
import { i as E, j as S, k as R, n as N, o as h, p as w, q as O, s as W, r as x, t as I, v as B, w as _, x as P, y as k, A as $, B as z, E as v, F, H as C, I as U, J as p, K as M } from "./index
|
|
2
|
-
import { N as $e, R as ze, _ as ve, O as Ce, P as Ue, Q as Me, S as je, T as De, U as Je, X as qe, Y as He, Z as Ve, $ as Ge, a0 as Ke, a1 as Qe, a2 as Xe, a3 as Ye, a4 as Ze, a5 as et, a6 as tt, a7 as nt, a8 as rt, a9 as at, aa as st, ab as ot } from "./index
|
|
1
|
+
import { i as E, j as S, k as R, n as N, o as h, p as w, q as O, s as W, r as x, t as I, v as B, w as _, x as P, y as k, A as $, B as z, E as v, F, H as C, I as U, J as p, K as M } from "./index-BR1HjJoE.js";
|
|
2
|
+
import { N as $e, R as ze, _ as ve, O as Ce, P as Ue, Q as Me, S as je, T as De, U as Je, X as qe, Y as He, Z as Ve, $ as Ge, a0 as Ke, a1 as Qe, a2 as Xe, a3 as Ye, a4 as Ze, a5 as et, a6 as tt, a7 as nt, a8 as rt, a9 as at, aa as st, ab as ot } from "./index-BR1HjJoE.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 };
|
|
@@ -66287,7 +66287,7 @@ Ho({
|
|
|
66287
66287
|
});
|
|
66288
66288
|
Ho({
|
|
66289
66289
|
type: "COGLayer",
|
|
66290
|
-
loadClass: () => import("./raster-
|
|
66290
|
+
loadClass: () => import("./raster-BwULn87I.js").then((t) => t.r).then((t) => t.OmCOGLayer),
|
|
66291
66291
|
props: [
|
|
66292
66292
|
{ attr: "src", kind: "scalar", deckProp: "geotiff", type: "string", required: !0 },
|
|
66293
66293
|
{ attr: "min", kind: "scalar", deckProp: "rescaleMin", type: "number" },
|
|
@@ -66466,7 +66466,7 @@ class iN {
|
|
|
66466
66466
|
`[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).`
|
|
66467
66467
|
);
|
|
66468
66468
|
else {
|
|
66469
|
-
this.mode = "basemap", this.basemapAttr = e, import("./basemap-
|
|
66469
|
+
this.mode = "basemap", this.basemapAttr = e, import("./basemap-BRh_zvzt.js").then(({ MapLibreBasemapAdapter: s }) => {
|
|
66470
66470
|
this.destroyed || i !== this.rendererGeneration || (this.basemap = new s(
|
|
66471
66471
|
this.parent,
|
|
66472
66472
|
// this.basemapAttr, not the captured param: a style switch that
|
|
@@ -66954,7 +66954,7 @@ const X0e = {
|
|
|
66954
66954
|
}, Y0e = {
|
|
66955
66955
|
match: (t, e) => ["csv", "tsv"].includes(yu(t) ?? "") || /text\/(csv|tab-separated-values)/i.test(e ?? ""),
|
|
66956
66956
|
parse: async (t) => {
|
|
66957
|
-
const [e, i, r] = await Promise.all([t.text(), import("./index-
|
|
66957
|
+
const [e, i, r] = await Promise.all([t.text(), import("./index-9_RmnPoW.js"), import("./index-B3NQy6CS.js")]), n = await r.parse(e, i.CSVLoader, { csv: { shape: "object-row-table" } });
|
|
66958
66958
|
return Z0e(n.data) ?? n.data;
|
|
66959
66959
|
}
|
|
66960
66960
|
};
|
|
@@ -66976,7 +66976,7 @@ const K0e = {
|
|
|
66976
66976
|
parse: async (t, e) => {
|
|
66977
66977
|
t.body?.cancel().catch(() => {
|
|
66978
66978
|
});
|
|
66979
|
-
const [i, r] = await Promise.all([import("./index-
|
|
66979
|
+
const [i, r] = await Promise.all([import("./index-B3NQy6CS.js"), import("./index-Y_CL37KN.js")]), n = t.url || e, s = /* @__PURE__ */ new Map(), o = (b) => {
|
|
66980
66980
|
const v = String(b);
|
|
66981
66981
|
let C = s.get(v);
|
|
66982
66982
|
return C || (C = oN(v), s.set(v, C)), C.then((T) => T.clone());
|
|
@@ -66989,7 +66989,7 @@ const K0e = {
|
|
|
66989
66989
|
}, Q0e = {
|
|
66990
66990
|
match: (t, e) => yu(t) === "kml" || /application\/vnd\.google-earth\.kml/i.test(e ?? ""),
|
|
66991
66991
|
parse: async (t) => {
|
|
66992
|
-
const [e, i, r] = await Promise.all([t.text(), import("./index-
|
|
66992
|
+
const [e, i, r] = await Promise.all([t.text(), import("./index-B3NQy6CS.js"), import("./index-xaNTkA9k.js")]);
|
|
66993
66993
|
return D1(await i.parse(e, r.KMLLoader));
|
|
66994
66994
|
}
|
|
66995
66995
|
}, rN = [], q0e = [X0e, Y0e, K0e, Q0e];
|
|
@@ -74847,7 +74847,7 @@ function Sl(t, e) {
|
|
|
74847
74847
|
}
|
|
74848
74848
|
Rt("undo", (t, e) => Rh(e)?.undo());
|
|
74849
74849
|
Rt("redo", (t, e) => Rh(e)?.redo());
|
|
74850
|
-
const _4 = "0.3.
|
|
74850
|
+
const _4 = "0.3.4", _1e = "https://om-api.nika.eco/v1/t", tu = { endpoint: _1e };
|
|
74851
74851
|
function v1e(t) {
|
|
74852
74852
|
for (const e of Object.keys(t))
|
|
74853
74853
|
tu[e] = t[e];
|
|
@@ -77169,7 +77169,7 @@ function j_e() {
|
|
|
77169
77169
|
}), Ao = null, xy = void 0, Mh.clear());
|
|
77170
77170
|
}
|
|
77171
77171
|
async function W_e() {
|
|
77172
|
-
return import("./raster-
|
|
77172
|
+
return import("./raster-BwULn87I.js").then((t) => t.r);
|
|
77173
77173
|
}
|
|
77174
77174
|
const b2e = {
|
|
77175
77175
|
registerLayer: Ho,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ai as Bt, ak as Xt, al as Yt, am as Us } from "./index
|
|
1
|
+
import { ai as Bt, ak as Xt, al as Yt, am as Us } from "./index-BR1HjJoE.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 { C as a, D as s } from "./raster-
|
|
1
|
+
import { C as a, D as s } from "./raster-BwULn87I.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-D6eXA5jP.js");
|
|
12
12
|
return l || (await e.load(), l = !0), e;
|
|
13
13
|
}
|
|
14
14
|
async function i(e, r) {
|
|
@@ -87227,7 +87227,7 @@ function vb(t, e) {
|
|
|
87227
87227
|
}
|
|
87228
87228
|
yn("undo", (t, e) => KB(e)?.undo());
|
|
87229
87229
|
yn("redo", (t, e) => KB(e)?.redo());
|
|
87230
|
-
const Yne = "0.3.
|
|
87230
|
+
const Yne = "0.3.4", i$e = "https://om-api.nika.eco/v1/t", vC = { endpoint: i$e };
|
|
87231
87231
|
function r$e(t) {
|
|
87232
87232
|
for (const e of Object.keys(t))
|
|
87233
87233
|
vC[e] = t[e];
|
package/dist/onlymapjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ay as e, az as r, aA as o, aB as t, aq as i, aC as n, aD as b, aE as l, aF as c, aG as g, aH as m, aI as p, aJ as L, aK as y, ap as T, aL as S, ax as u, W as d, aM as E, aN as M, aO as A, aP as I, aQ as f, aR as x, aS as C, aT as h, aU as B, aV as D, aW as R, aX as w, aY as v, aZ as F, a_ as G, a$ as N, b0 as O, b1 as W, b2 as _, b3 as z, b4 as H, b5 as J, b6 as k, b7 as P, b8 as V, b9 as Y, ba as j, bb as q, bc as K, bd as Q, be as U, bf as X, bg as Z, bh as $, bi as aa, bj as sa, bk as ea } from "./index
|
|
1
|
+
import { ay as e, az as r, aA as o, aB as t, aq as i, aC as n, aD as b, aE as l, aF as c, aG as g, aH as m, aI as p, aJ as L, aK as y, ap as T, aL as S, ax as u, W as d, aM as E, aN as M, aO as A, aP as I, aQ as f, aR as x, aS as C, aT as h, aU as B, aV as D, aW as R, aX as w, aY as v, aZ as F, a_ as G, a$ as N, b0 as O, b1 as W, b2 as _, b3 as z, b4 as H, b5 as J, b6 as k, b7 as P, b8 as V, b9 as Y, ba as j, bb as q, bc as K, bd as Q, be as U, bf as X, bg as Z, bh as $, bi as aa, bj as sa, bk as ea } from "./index-BR1HjJoE.js";
|
|
2
2
|
export {
|
|
3
3
|
e as AccessorCache,
|
|
4
4
|
r as BitmapLayer,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as kt, t as Ni, f as Oi, m as Ri } from "./mgrs-BY9bIvp4.js";
|
|
2
|
-
import { an as Fi, ao as zi, ap as Ks, aq as Ws, ar as Di, b as Bi, as as Ui, l as es, at as ki, d as qi, au as Ki, av as Wi, aw as Xi, ax as Xs } from "./index
|
|
2
|
+
import { an as Fi, ao as zi, ap as Ks, aq as Ws, ar as Di, b as Bi, as as Ui, l as es, at as ki, d as qi, au as Ki, av as Wi, aw as Xi, ax as Xs } from "./index-BR1HjJoE.js";
|
|
3
3
|
function Hi(t, e, s) {
|
|
4
4
|
const { projectedCorners: i } = e, { topLeft: a, topRight: r, bottomRight: o, bottomLeft: n } = i, h = s(a[0], a[1]), l = s(r[0], r[1]), c = s(o[0], o[1]), u = s(n[0], n[1]), d = [
|
|
5
5
|
h,
|
|
@@ -2377,7 +2377,7 @@ it.set(G.Zstd, () => import("./zstd-jXobGRcq.js").then((t) => t.decode));
|
|
|
2377
2377
|
it.set(G.Jpeg, () => Promise.resolve(ke));
|
|
2378
2378
|
it.set(G.Jpeg6, () => Promise.resolve(ke));
|
|
2379
2379
|
it.set(G.Webp, () => Promise.resolve(ke));
|
|
2380
|
-
it.set(G.Lerc, () => import("./lerc-
|
|
2380
|
+
it.set(G.Lerc, () => import("./lerc-vBCRLD5s.js").then((t) => t.l).then((t) => t.decode));
|
|
2381
2381
|
async function qe(t, e, s) {
|
|
2382
2382
|
const i = it.get(e);
|
|
2383
2383
|
if (!i)
|
package/dist/version.d.ts
CHANGED
package/docs/stories.md
CHANGED
|
@@ -15,7 +15,7 @@ A story turns a map into a narrated sequence: fly here, reveal this, highlight t
|
|
|
15
15
|
<om-step duration="3s" action="fly-to" center="[-122.44, 37.78]" zoom="12" curve></om-step>
|
|
16
16
|
<om-step duration="4s" action="show-overlay" target="chapter" parallel delay="1500ms"></om-step>
|
|
17
17
|
<om-step duration="2s" action="hide-overlay" target="chapter" delay="1s"></om-step>
|
|
18
|
-
<om-step duration="2s" action="toggle-layer" layer="
|
|
18
|
+
<om-step duration="2s" action="toggle-layer" layer="regions" visible="true"></om-step>
|
|
19
19
|
</om-story>
|
|
20
20
|
|
|
21
21
|
<om-widget type="player" story="tour" position="bottom-left"></om-widget>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nika-js/onlymap",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Declarative deck.gl maps for HTML and React \u2014 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.3.
|
|
26
|
+
For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.3.4` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.3.4/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.3.
|
|
20
|
-
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.3.
|
|
19
|
+
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.3.4/dist/onlymapjs.css">
|
|
20
|
+
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.3.4"></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).
|