@nika-js/onlymap 0.11.8 → 0.11.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +2 -2
  3. package/dist/{basemap-CFBn4Xl9.js → basemap-Cc8v5hPA.js} +2 -2
  4. package/dist/data-layer.d.ts +3 -0
  5. package/dist/elements/om-map.d.ts +3 -0
  6. package/dist/{geoparquet-4Do2vscp.js → geoparquet-B9p5-Yxf.js} +1 -1
  7. package/dist/{globe-view-CkJR_AnY.js → globe-view-BF6-01N_.js} +1 -1
  8. package/dist/{hillshade-BYgQgSDu.js → hillshade-Dd7MQHfp.js} +1 -1
  9. package/dist/{index-BXjiBP1F.js → index-BaR4MzNc.js} +3 -3
  10. package/dist/{index-COjrgKX8.js → index-Bwdaim-c.js} +5815 -5771
  11. package/dist/{index-DT2RpSxM.js → index-C9gVsJaG.js} +2 -2
  12. package/dist/{index-BvNIWDg6.js → index-CCY7Rk1s.js} +1 -1
  13. package/dist/{index-D7Xj3dSg.js → index-C_0KCx9L.js} +1 -1
  14. package/dist/{index-DyXu8wbK.js → index-CawlYDgE.js} +1 -1
  15. package/dist/{index-DVQmGY-A.js → index-CwoqJ6IK.js} +3 -3
  16. package/dist/{index-D57ncSYm.js → index-Dk12Fazj.js} +1 -1
  17. package/dist/{index-Du-3KfDZ.js → index-T5LATpR7.js} +1 -1
  18. package/dist/{lerc-CWZuxmH2.js → lerc-CElHRqrE.js} +1 -1
  19. package/dist/onlymap.standalone.js +11499 -11455
  20. package/dist/onlymapjs.js +1 -1
  21. package/dist/parse-manifest.d.ts +12 -0
  22. package/dist/{post-process-effect-BrfN_OHZ.js → post-process-effect-VAE0lQ4c.js} +1 -1
  23. package/dist/{raster-BvmCiRyN.js → raster-Cn8jugd2.js} +3 -3
  24. package/dist/{raster-pipeline-BpQIs6kC.js → raster-pipeline-D26Sl0X2.js} +1 -1
  25. package/dist/{text-on-path-CZgp3O8w.js → text-on-path-C6SLSkus.js} +1 -1
  26. package/dist/version.d.ts +1 -1
  27. package/dist/{zarr-0D_FIxaR.js → zarr-Do5FzYXm.js} +2 -2
  28. package/docs/basemaps.md +2 -1
  29. package/docs/cartograph.md +2 -2
  30. package/llms.txt +2 -2
  31. package/onlymapjs.html-data.json +4 -1
  32. package/package.json +1 -1
  33. package/skills/onlymapjs/SKILL.md +2 -2
  34. package/skills/onlymapjs/references/syntax.md +6 -4
package/CHANGELOG.md CHANGED
@@ -8,6 +8,17 @@ Note: npm collapsed a few closely-spaced releases — the GPX/FlatGeobuf (0.5.4)
8
8
  and GeoParquet (0.5.5) work shipped to npm together as **0.5.6**, so npm's
9
9
  version list jumps 0.5.3 → 0.5.6. Each logical version is listed here regardless.
10
10
 
11
+ ## 0.11.10 — 2026-10-07
12
+
13
+ ### Added
14
+ - **A satellite basemap that needs no key.** `basemap="satellite"` shows cloud-free satellite imagery of the whole world, from EOX's Sentinel-2 cloudless mosaic (2016). It needs no account, and commercial use is allowed with the credit it shows automatically. The imagery is detailed to about zoom 13–14 (a city district) and soft beyond that; for street-level detail or recent imagery, `maptiler-satellite` (keyed) remains the option. It also appears in the basemap switcher.
15
+
16
+ ## 0.11.9 — 2026-10-05
17
+
18
+ ### Fixed
19
+ - **A layer whose data can't be loaded now says so.** If a layer's `data` address fails (a typo, a missing file, a blocked request), the map reports it in its validation panel and diagnostics, with what to check, instead of quietly drawing nothing. The report clears once the data loads.
20
+ - **Writing rows directly into `data=` is now flagged.** `data` is always an address; rows written there draw nothing. The validator now says so and points to the inline `<script type="application/json">` form.
21
+
11
22
  ## 0.11.8 — 2026-10-05
12
23
 
13
24
  ### Fixed
package/README.md CHANGED
@@ -82,7 +82,7 @@ A handful of elements, one rule: **attributes are kebab-case versions of deck.gl
82
82
 
83
83
  | Element | Role |
84
84
  |---|---|
85
- | `<om-map>` | The map. `center`, `zoom`, `pitch`, `bearing`; `basemap` takes a free preset (`positron`, `liberty`, `dark-matter`, `osm`, …), a style URL, or `"none"` (standalone canvas) — and switches **live**; `validate` for a live on-page error panel. Give it a height: a custom element is `display:inline` by default, so the library injects a `display:block` default (fills a sized parent, else a 400px floor) to keep a bare map visible, but set an explicit height (`om-map { height: 100vh }`) for real layout — any height you set wins outright, including one below the floor. A map that still collapses warns in the console; `hidden` and `display:none` maps stay hidden and stay quiet. |
85
+ | `<om-map>` | The map. `center`, `zoom`, `pitch`, `bearing`; `basemap` takes a free preset (`positron`, `liberty`, `dark-matter`, `osm`, `satellite`, …), a style URL, or `"none"` (standalone canvas) — and switches **live**; `validate` for a live on-page error panel. Give it a height: a custom element is `display:inline` by default, so the library injects a `display:block` default (fills a sized parent, else a 400px floor) to keep a bare map visible, but set an explicit height (`om-map { height: 100vh }`) for real layout — any height you set wins outright, including one below the floor. A map that still collapses warns in the console; `hidden` and `display:none` maps stay hidden and stay quiet. |
86
86
  | `<om-layer>` | Any of **41 layer types** by name — all of deck.gl's core, geo, aggregation, and mesh layers (Scatterplot, GeoJson, Arc, Path, Heatmap, Hexagon, Trips, Tile, Tile3D, Scenegraph, …) plus the built-in `PopupLayer` for WebGL badges/labels at scale, the native `COGLayer` for GeoTIFF rasters, `ZarrLayer` for chunked Zarr/GeoZarr rasters, `ImageOverlay` for georeferenced drone JPEGs, `BIMLayer` for BIM source files (`.ifc` today) loaded straight in the browser with no pre-conversion step, `HillshadeLayer` for shaded relief, `TextOnPathLayer` for a label that follows the line it names, and `Route`/`Tracking` for styled routes and live position tracking. `id` required; `label`/`color` feed the legend. `visible-zoom-range="[8, 14]"` gives any layer scale-dependent visibility (hidden outside min ≤ zoom < max, the standard minzoom/maxzoom convention) — the everyday GIS pattern for keeping a dense layer from swamping a zoomed-out view. |
87
87
  | `<om-widget>` | UI panels. Built-ins: `legend` (symbology-aware: color scales render as gradient ramps or class ranges, categorical ternaries as discrete palettes), `layer-switcher`, `basemap-switcher`, `lighting`, `clip-box`, `zoom-controls`, `undo-redo`, `scale-bar` (metric/imperial/nautical `units`), `attribution`, `filter`, `draw` (point/line/polygon sketch capture, GeoJSON save/autosave; lines/polygons complete via double-click, touch double-tap — detected by the library itself, since iOS WebViews never synthesize `dblclick` from taps — Enter, or the toolbar's Finish button; `export-3d` adds an "Export 3D" button that clips loaded `Tile3DLayer`/`BIMLayer` content to the drawn footprint and downloads it as a portable GLB — re-framed to a local coordinate frame at the footprint's own centroid, each triangle carrying its own source color as vertex colors, no textures — or, with `export-3d="b3dm"`, the same mesh wrapped for Cesium/3D-Tiles pipelines; only currently-visible 3D Tiles/BIM layers are included — a layer hidden via `visible="false"` or the `toggle-layer` action is skipped, with a distinct console warning for "nothing loaded" vs. "everything hidden"), `measure` (geodesic distance + area + cut/fill volume — live labels, `units` toggle, an `om-measure` readout event; `modes="distance area volume"` adds a footprint-then-extrude tool: outline a polygon, double-click (double-tap on touch) to close it — it turns solid teal, ready — then drag the double-headed arrow gizmo that appears at its centroid up to fill or down to cut, reading out Cut/Fill/Net (signed, fill−cut)/Total (unsigned, cut+fill) volume plus Area/Perimeter, each labelled with its own sign convention. The math is a REAL per-cell grid integration: closing a footprint bulk-loads its covering DEM tiles, lays a metric grid in a local tangent frame at the ring centroid (cell size = the DEM's ground-sample distance; scanline point-in-polygon; bilinear, tile-seam-correct sampling; worker-offloaded), and integrates terrain-vs-base per cell — mixed cut AND fill within one footprint on undulating ground, with a published ±error (per-cell cellArea × 1.5 × GSD, summed per side), the cell size used, and a no-data warning all carried on the `om-measure` readout (`cellSizeM`/`gsdM`/`cutErrorM3`/`fillErrorM3`/`nodataFraction`). A `base-surface` attribute picks the reference surface: `custom` (default — the gizmo's draggable target plane), or boundary-derived stockpile strategies with no gizmo (`triangulated` boundary TIN, `plane` least-squares fit, `lowest`/`highest`/`average`). On `custom`, the extruded prism's own boundary hugs each corner's real ground elevation by default (so it doesn't visibly float above or sink below sloped terrain) — a "Flat target plane" toggle button appears above the readout once a footprint closes, switching that rendering to a single level plane instead (a rendering choice only; the underlying cut/fill numbers were already computed against one flat target elevation either way). Requires `terrain` on `<om-map>` — validation warns if `volume` is in `modes` with none (without terrain a flat-plane fallback runs, with no error figures — nothing honest to quote). A `profile` attribute alongside `modes` — not a mode of its own — samples elevation around a volume footprint's own perimeter as it's drawn and closed, live, and dispatches it on `om-measure`'s `profileSeries` field for a `dynamic-chart` widget to plot. Each sample is `{x: distance-from-start-m, y: elevation-m}`, and samples that ARE one of the drawn footprint's own corners additionally carry `vertexIndex` (0-based, in draw order) — so a chart can mark the real corners instead of every interpolated sample, and the widget's built-in profile chart marks each corner, labelling the first `1 · Start`. The map badges the first two vertices in draw order (`1 · Start`, `2`), which states the ring's direction outright — a start marker alone leaves clockwise vs counter-clockwise ambiguous, and the two wind to mirror-image profiles. Two badges is the minimum that fixes a direction and a constant cost regardless of how many corners the footprint has. Also volume-only: `deadband` (m³) zeroes out a Cut/Fill figure below the threshold, filtering drag noise near zero height (Cut/Fill/Net/Total are always RAW geometric volumes — deliberately unaffected by `swell`/`shrink`, so they keep answering "does this reach target elevation" regardless of what material's configured); `density` (t/m³ metric, lb/yd³ imperial) and `swell`/`shrink` (multipliers, default 1×) instead populate a separate Material section, standard Bank/Loose/Compacted earthworks convention — Adjusted Cut = raw × swell (loose/haul volume, bigger — excavating adds air voids), Adjusted Fill = raw ÷ shrink (loose/borrow volume needed, also bigger — the raw fill is already the compacted target void), plus Cut/Fill tonnage computed from the raw (not adjusted) volume, since swell/shrink change volume, not mass; the section only appears once at least one of `density`/`swell`/`shrink` is actually configured, no separate toggle. A `stale` field on the `om-measure` readout flags the brief window between a footprint committing and its elevation sample resolving, so a consumer doesn't read numbers left over from a prior footprint as current), `vega-lite` (live charts bound to a layer's data), `dynamic-chart` (the same Vega-Lite rendering, but data-driven by a live DOM event instead of a layer — `on="<event-name>"` + `series-field="<name>"` reads `event.detail[seriesField]` as the chart's `values` on every matching event, redrawing at a fixed `width`; a feature "freezes" it for free by simply omitting that field the next time it fires, no separate pause API needed), and the BIM set `ifc-browser` / `feature-inspector` / `ifc-loader` / `ifc-clash`. Or write your own inline with HTML + a `<script type="om/widget">`. Adjacent compact button widgets (`zoom-controls`, `undo-redo`, `widgets-toggle`) **auto-cluster** into one control group (opt out per widget with `cluster="false"`), and `<om-map widgets-hidden>` / the `set-widgets-visible` action / `<om-widget type="widgets-toggle">` hide all authored chrome without destroying it — provider attribution and the license badge never hide. **Placement is managed**: `position` takes one of 8 logical, RTL-aware slots (`top-start`, `top-center`, `top-end`, `center-start`, `center-end`, `bottom-start`, `bottom-center`, `bottom-end`; legacy corner names alias) — same-slot widgets stack with flush edges and a shared gap, `order` sets in-slot ordering, and `position="manual"` opts out entirely (a plain block you style yourself, even outside the map). At narrow map widths, managed widgets automatically move into accessible top/end/bottom/start drawers — at ≤640px when a row has widgets on more than one of its slots, at ≤416px when every occupied row is one-sided; `fold="never"` keeps an essential control out, `widgets-fold="off"` disables folding, and `--om-widget-fold-breakpoint` changes the map-width threshold. Provider attribution is an in-flow member of `bottom-end` and the license badge of `bottom-start`, so neither covers a widget. A slot dims automatically while an open popup covers it (`widgets-dim="off"` to disable), except slots containing required chrome. Themeable from plain page CSS via custom properties: `om-map { --om-widget-bg: #111827; --om-widget-fg: #f9fafb; }` (also `-muted`, `-border`, `-hover-bg`, `-accent`), plus layout tokens (`--om-widget-inset-x/-y`, `--om-widget-gap-x/-y`, `--om-widget-opacity`, `--om-widget-radius`) or the no-CSS sugar `<om-map widget-style="gap:10 opacity:0.9">`. |
88
88
  | `<om-overlay>` | Rich HTML anchored to a map location — a static `anchor="[lng, lat]"`, the current selection, or a feature's own geometry via `anchor-layer`/`anchor-feature-id`. Selection-anchored overlays scope with `layer` (one layer's picks) and `selection-type="click"`/`"hover"` (one pick type; since 0.11.8 a popup a click behavior opens already behaves as `"click"` — it stays put while the pointer moves on, until another click moves or closes it). `{{field}}` interpolates the picked feature, HTML-escaped by default; `{{z}}` is a real depth-picked elevation when some layer under the cursor set `pickable="3d"` (terrain does this itself, so hovering the ground always has one) — empty otherwise, never a misleading 0. `clip-to-map` (opt-in) hides the overlay when its own box would spill past the map viewport, not just when its anchor leaves — for small transient tips that track the cursor, where an overhanging box would otherwise inflate the page's scroll overflow and cause visible view jitter. |
@@ -157,7 +157,7 @@ Hovering a pickable feature shows a pointer cursor automatically, so recipients
157
157
 
158
158
  **Undo/redo:** user-facing manifest changes — layer toggles, filter changes, basemap switches, element edits, drawn sketches — are undoable out of the box; the manifest *is* the state, so history is recorded from the DOM itself. Add `<om-widget type="undo-redo">` for buttons, or just press Cmd/Ctrl-Z (Shift-Cmd/Ctrl-Z or Ctrl-Y to redo). Camera moves, hover effects, and story playback are deliberately not undo steps.
159
159
 
160
- **Basemaps:** free presets out of the box — OpenFreeMap `liberty`/`bright`/`positron` (no key, no limits), CARTO `dark-matter`/`voyager`, classic `osm` raster, and keyed `maptiler-*` presets (MapTiler's style editor is the visual way to customize basemap JSON; keys are publishable, via `basemap-key` or `OmMap.configureBasemap`). The `basemap` attribute switches **live** — camera and layers survive — from a hand edit, the `set-basemap` action, or `<om-widget type="basemap-switcher">`. Add your own with `OmMap.registerBasemap(name, { style })`; required attribution renders automatically. Guide: [docs/basemaps.md](docs/basemaps.md).
160
+ **Basemaps:** free presets out of the box — OpenFreeMap `liberty`/`bright`/`positron` (no key, no limits), CARTO `dark-matter`/`voyager`, classic `osm` raster, keyless `satellite` imagery (EOX's 2016 Sentinel-2 cloudless mosaic — worldwide, commercial-safe with its credit, sharp to about zoom 13–14), and keyed `maptiler-*` presets (MapTiler's style editor is the visual way to customize basemap JSON; keys are publishable, via `basemap-key` or `OmMap.configureBasemap`). The `basemap` attribute switches **live** — camera and layers survive — from a hand edit, the `set-basemap` action, or `<om-widget type="basemap-switcher">`. Add your own with `OmMap.registerBasemap(name, { style })`; required attribution renders automatically. Guide: [docs/basemaps.md](docs/basemaps.md).
161
161
 
162
162
  **Animation:** camera moves accept a duration — `map.flyTo(coords, zoom, { duration: 1200, curve: true })`, or the `fly-to` action (`center`/`zoom`/`pitch`/`bearing`/`duration`) from any behavior or button; `prefers-reduced-motion` is honored (moves become instant, final state identical). Per-prop GPU transitions via the `transition` attribute: `transition="get-fill-color 800ms"` fades color changes; on a streaming layer, `transition="get-position 300ms"` makes entities glide between updates.
163
163
 
@@ -1,5 +1,5 @@
1
- import { aJ as Y_, N as Bu, H as Pd, k as K_, aK as J_, aL as Q_, D as Xf, Z as ey } from "./index-COjrgKX8.js";
2
- import { a as ty } from "./globe-view-CkJR_AnY.js";
1
+ import { aJ as Y_, N as Bu, H as Pd, k as K_, aK as J_, aL as Q_, D as Xf, Z as ey } from "./index-Bwdaim-c.js";
2
+ import { a as ty } from "./globe-view-BF6-01N_.js";
3
3
  const iy = {
4
4
  copy: "©",
5
5
  reg: "®",
@@ -167,6 +167,9 @@ export declare function getDrawData(url: string): LayerData;
167
167
  * call for a given URL, and invokes `onLoaded` on every resolution/flush (the
168
168
  * caller re-reconciles from there).
169
169
  */
170
+ /** Why the first load of `url` (with these live options) failed, or null —
171
+ * read on every reconcile so a fixed URL stops reporting. */
172
+ export declare function dataLoadError(url: string, opts?: StreamOptions): string | null;
170
173
  export declare function getData(url: string, onLoaded: () => void, opts?: StreamOptions, owner?: DataTransportOwner): LayerData;
171
174
  /**
172
175
  * Is a fetch for this URL still in flight? Feeds the `om-map-ready` signal —
@@ -65,6 +65,9 @@ export declare class OmMapElement extends HTMLElementBase {
65
65
  private overlayFlushPending;
66
66
  private errorPanel;
67
67
  private runtimeErrors;
68
+ /** Layers whose `data` failed to load, as of the LAST reconcile — replaced
69
+ * each pass (not accumulated like runtimeErrors), so a fixed URL clears. */
70
+ private dataLoadFailures;
68
71
  /** Host diagnostics channel (the `diagnostics` property) — see its setter. */
69
72
  private diagnosticsOn;
70
73
  /** The last merged static + runtime report, while anyone is listening. */
@@ -1,4 +1,4 @@
1
- import { a4 as p, a5 as d } from "./index-COjrgKX8.js";
1
+ import { a4 as p, a5 as d } from "./index-Bwdaim-c.js";
2
2
  function g(t) {
3
3
  if (t == null) return !0;
4
4
  const e = t, n = e.id?.code;
@@ -1,4 +1,4 @@
1
- import { d as L, j as x, a6 as A, a7 as E, a8 as d, a9 as h, aa as u, ab as z, p as V, W as Z, G as D } from "./index-COjrgKX8.js";
1
+ import { d as L, j as x, a6 as A, a7 as E, a8 as d, a9 as h, aa as u, ab as z, p as V, W as Z, G as D } from "./index-Bwdaim-c.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 { al as P, am as T, an as N, ao as Z, c as B, ap as E, aq as C, ar as b, as as D, at as I, au as O } from "./index-COjrgKX8.js";
1
+ import { al as P, am as T, an as N, ao as Z, c as B, ap as E, aq as C, ar as b, as as D, at as I, au as O } from "./index-Bwdaim-c.js";
2
2
  import { N as _, c as H } from "./hillshade-apron-Bem3DWyJ.js";
3
3
  import { p as $, h as j, m as A, a as U } from "./hillshade-shader-DI2uLSNU.js";
4
4
  function R(t, e, o) {
@@ -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-COjrgKX8.js";
2
- import { P as s } from "./post-process-effect-BrfN_OHZ.js";
3
- import { G as pa, a as na } from "./globe-view-CkJR_AnY.js";
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-Bwdaim-c.js";
2
+ import { P as s } from "./post-process-effect-VAE0lQ4c.js";
3
+ import { G as pa, a as na } from "./globe-view-BF6-01N_.js";
4
4
  export {
5
5
  t as AmbientLight,
6
6
  o as Attribute,