@nika-js/onlymap 0.6.2 → 0.6.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +2 -2
  3. package/dist/{LercDecode.es-BOJJr6Gx.js → LercDecode.es-D5in29tf.js} +1 -1
  4. package/dist/{basemap-BofXgXxy.js → basemap-C0pFT3AO.js} +1 -1
  5. package/dist/data-layer.d.ts +26 -4
  6. package/dist/elements/om-map.d.ts +1 -0
  7. package/dist/geodesy.d.ts +3 -0
  8. package/dist/{geoparquet-DapHATA0.js → geoparquet-By98JVB0.js} +1 -1
  9. package/dist/{index-BmX6IId3.js → index-Bx9GFkrn.js} +1 -1
  10. package/dist/{index-SPJVn_n_.js → index-CqC4sW_k.js} +1 -1
  11. package/dist/{index-7B-6Cbzu.js → index-Cxo9mCw_.js} +12920 -12806
  12. package/dist/{index-BF9iO8Tq.js → index-olfncHIq.js} +1 -1
  13. package/dist/{index-xmJjZxQJ.js → index-tnlYDALL.js} +2 -2
  14. package/dist/index.d.ts +3 -1
  15. package/dist/{lerc-C6k7EzSN.js → lerc-gKDDtc69.js} +2 -2
  16. package/dist/license.d.ts +16 -2
  17. package/dist/measure-controller.d.ts +28 -4
  18. package/dist/onlymap.standalone.js +22003 -21889
  19. package/dist/onlymapjs.js +33 -32
  20. package/dist/programmatic.d.ts +18 -3
  21. package/dist/{raster-Cuzhibe2.js → raster-Cl5m3KsC.js} +2 -2
  22. package/dist/{raster-pipeline-DLrnJK8y.js → raster-pipeline-hJGxIwYx.js} +1 -1
  23. package/dist/version.d.ts +1 -1
  24. package/dist/{zarr-CUzEX8fB.js → zarr-hRDavRGV.js} +2 -2
  25. package/docs/3d-assets.md +1 -1
  26. package/docs/live-data.md +17 -0
  27. package/docs/react.md +9 -1
  28. package/llms.txt +2 -2
  29. package/package.json +1 -1
  30. package/skills/onlymapjs/SKILL.md +3 -3
  31. package/skills/onlymapjs/references/react.md +1 -1
  32. package/skills/onlymapjs/references/syntax.md +3 -3
  33. package/skills/onlymapjs/references/testing.md +6 -0
package/CHANGELOG.md CHANGED
@@ -8,6 +8,63 @@ 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.6.4 — 2026-08-12
12
+
13
+ React Native core prerequisites. 0.6.3 was already tagged for release when this
14
+ work landed, so it carries its own version rather than redefining that one.
15
+
16
+ ### Added
17
+ - **Descriptor-owned data transports**: fetches, polling loops, and WebSockets
18
+ are shared by transport identity and reference-counted across active map
19
+ owners. Layer removal or option changes release stale handles; map disposal
20
+ releases all handles; `MapController.suspend()` and `resume()` provide an
21
+ app-background lifecycle without discarding canonical descriptors. A release
22
+ the owner means to reverse — `suspend()`, removing or re-pointing a layer —
23
+ leaves its last rows as a cold snapshot, so resuming or re-adding repaints
24
+ immediately instead of flashing empty; a permanent teardown (`destroy()`, an
25
+ `<om-map>` leaving the document) keeps nothing.
26
+ - `releaseDataOwner(owner, {retain})` plus an optional `owner` argument on
27
+ `descriptorToIR` — descriptor-owned transport lifetime for hosts that drive
28
+ the IR directly instead of through `MapController`.
29
+ - **JSON-safe programmatic descriptors**: schema-declared accessor props may
30
+ use restricted OnlyMap expression strings, and
31
+ `snapshotDescriptorIR(descriptors)` produces deterministic, fetch-free IR
32
+ snapshots for native/cross-process parity tests. The React layer adapter now
33
+ exposes a pure descriptor conversion path and mirrors dashed-line options.
34
+ - **App-scoped packaged licenses**: signed license tokens may now declare exact
35
+ native application identifiers in an `apps` claim, independently or together
36
+ with web domains. Native hosts pass platform-derived identity to
37
+ `configureLicense(key, {appId})`; page or bridge input must never supply it.
38
+ Only the `domains` claim is pinned by the browser — `apps` is asserted by the
39
+ host, so scope a native key by both where you can.
40
+
41
+ ### Changed
42
+ - **Live transports no longer live for the page.** A `ws(s)://` socket, a
43
+ `refresh` poll loop, and an in-flight `data` fetch previously outlived the
44
+ layer that opened them; they are now stopped when their last descriptor owner
45
+ releases them — layer removal, a change to `data`/`source`/`key`/`flush`/
46
+ `refresh`, `MapController.destroy()`/`suspend()`, or an `<om-map>` leaving the
47
+ document. Pages that relied on a connection surviving layer removal must keep
48
+ the layer mounted (`visible="false"` does not release) or re-add it, which now
49
+ repaints from the retained cold snapshot. Re-parenting a live `<om-map>` in
50
+ the DOM does **not** drop its transports: the release is deferred a microtask,
51
+ so a synchronous disconnect→reconnect keeps the socket open.
52
+ - The data cache is keyed by **transport identity** (URL plus live-source
53
+ options) rather than URL alone. Two layers on the same URL still share one
54
+ transport when their stream/poll options match, and now correctly get separate
55
+ ones when they do not.
56
+
57
+ ## 0.6.3 — 2026-08-12
58
+
59
+ ### Fixed
60
+ - **Measure labels no longer render painted onto the terrain** (reported readability bug). The distance/area badges were `terrain="drape"`, and draping renders a layer INTO the terrain's own texture — so a badge came out flat on the ground, stretching and skewing with the slope and going edge-on to a pitched camera. They now use `terrain="offset"`, which keeps the badge a screen-facing billboard and only lifts its anchor to the surface, plus a 14px screen-space lift so a pill never reads as half-buried in a rise.
61
+ - **`PopupLayer`'s default terrain mode is now `offset` rather than `drape`**, for the same reason and following the rule the library already applied to 3D models: billboarded content anchors ON the surface instead of being painted onto it. This affects any `PopupLayer` under an active `terrain` that did not set the attribute explicitly; `terrain="drape"` still does the old thing for anyone who genuinely wants text painted onto the ground like a road marking.
62
+
63
+ ### Added
64
+ - **The elevation profile marks the footprint's own corners.** `profileSeries` samples that ARE a drawn vertex now carry `vertexIndex` (0-based, in draw order; the closing sample back at the start carries the last index), and interpolated samples omit the field entirely so a Vega-Lite spec separates them with `isValid(datum.vertexIndex)`. The measure widget's built-in profile chart uses this: a clean line, a distinct point on each real corner with a `Vertex / Distance / Elevation` tooltip, and vertex 0 labelled **"1 · Start"** (the exact badge text used on the map) — replacing the old `point: true`, which dotted all ~50 interpolated samples equally and so said nothing about which points were corners. New `ProfilePoint` type, exported.
65
+ - **Direction badges on the map: `1 · Start` and `2`.** Two problems, one marker. The profile runs around a closed loop, so its chart has a leftmost point but the map had no cue for WHICH corner that was; and marking only the start is still ambiguous, because from that corner the ring could run either way and clockwise vs counter-clockwise produce mirror-image profiles. The first two vertices are badged in draw order — the minimum that fixes a direction, and a constant cost: one badge per vertex would grow the clutter precisely as a footprint got complicated enough to need the cue. Draw order IS the order the profile walks, so badge N and the chart's Vertex N are the same point by construction. The chart still marks every corner. Displayed 1-based; `ProfilePoint.vertexIndex` stays 0-based, being an array index. Shown only with `profile` on, and cleared with the footprint.
66
+ - **`resamplePathWithVertices(points, count)`** in `geodesy.ts` — `resamplePath`'s evenly-spaced curve with the path's own vertices merged in by distance and tagged, coinciding samples replaced rather than duplicated. This is what makes a profile addressable back to the geometry that produced it.
67
+
11
68
  ## 0.6.2 — 2026-08-12
12
69
 
13
70
  ### Added
package/README.md CHANGED
@@ -84,7 +84,7 @@ A handful of elements, one rule: **attributes are kebab-case versions of deck.gl
84
84
  |---|---|
85
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. |
86
86
  | `<om-layer>` | Any of **37 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, and `BIMLayer` for BIM source files (`.ifc` today) loaded straight in the browser, no pre-conversion step. `id` required; `label`/`color` feed the legend. |
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; `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 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. 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 map widths ≤640px, managed widgets automatically move into accessible top/end/bottom/start drawers; `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">`. |
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; `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 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 map widths ≤640px, managed widgets automatically move into accessible top/end/bottom/start drawers; `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 — give a click-opened popup `selection-type="click"` so hovering elsewhere doesn't drag it along). `{{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. |
89
89
  | `<om-behavior>` | Declarative interactions: `on="click|hover|drag|load|data-loaded"` → a named action. |
90
90
  | `<om-story>` | A storyboard: `<om-step>` children fire actions on a timeline. Controlled by the `player` widget, behaviors, or `storyEl.play()/pause()/seek()`. |
@@ -317,7 +317,7 @@ Packaged native hosts can verify an app-scoped key by passing platform-derived i
317
317
  await OmMap.configureLicense("om_live_…", { appId: "com.example.riders" });
318
318
  ```
319
319
 
320
- The `appId` must come from trusted native build metadata, never page/bridge input. Keys are self-verifying signed tokens (no network round-trip, works offline and in CI) bound to declared domains and/or exact app identifiers. Licensing: https://www.nikaplanet.com/onlymap.
320
+ The `appId` must come from trusted native build metadata, never page/bridge input — the library cannot verify where it came from. Unlike `domains`, which the browser pins, the `apps` claim is asserted by the caller, so prefer keys minted with **both** claims (include the packaged host's own origins) and treat app scoping as a deterrent rather than enforcement. Keys are self-verifying signed tokens (no network round-trip, works offline and in CI) bound to declared domains and/or exact app identifiers. Licensing: https://www.nikaplanet.com/onlymap.
321
321
 
322
322
  ## Telemetry
323
323
 
@@ -19,7 +19,7 @@ async function v(N = {}) {
19
19
  if (n) {
20
20
  const { createRequire: I } = await import(
21
21
  /*webpackIgnore:true*/
22
- "./lerc-C6k7EzSN.js"
22
+ "./lerc-gKDDtc69.js"
23
23
  ).then((g) => g._);
24
24
  var O = I(import.meta.url);
25
25
  }
@@ -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-7B-6Cbzu.js";
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-Cxo9mCw_.js";
2
2
  const Cd = Math.PI / 180, gy = 180 / Math.PI;
3
3
  function em(Pe, Q = 0) {
4
4
  const me = Math.min(180, Pe) * Cd;
@@ -94,10 +94,24 @@ export declare function registerFormat(format: DataFormat): void;
94
94
  export type DataTransportOwner = object;
95
95
  /** Start one descriptor reconciliation transaction for an owner. */
96
96
  export declare function beginDataOwnerUpdate(owner: DataTransportOwner): void;
97
- /** Release transports no longer named by the owner's complete descriptor document. */
97
+ /**
98
+ * Release transports no longer named by the owner's complete descriptor
99
+ * document. Retains their rows: a layer removed or re-pointed is a routine
100
+ * edit, and re-adding it (or undoing the edit) should repaint, not blink.
101
+ */
98
102
  export declare function endDataOwnerUpdate(owner: DataTransportOwner): void;
99
- /** Release every fetch/poller/socket held by an owner (unmount, dispose, or suspend). */
100
- export declare function releaseDataOwner(owner: DataTransportOwner): void;
103
+ /**
104
+ * Release every fetch/poller/socket held by an owner.
105
+ *
106
+ * Defaults to a permanent teardown — dispose, unmount, an <om-map> leaving the
107
+ * document — which drops the rows too, because an owner that cannot come back
108
+ * has nothing to repaint. Pass `{ retain: true }` for a pause the owner intends
109
+ * to reverse (`MapController.suspend()`), and resuming repaints the last rows
110
+ * while the reopened transport catches up.
111
+ */
112
+ export declare function releaseDataOwner(owner: DataTransportOwner, opts?: {
113
+ retain?: boolean;
114
+ }): void;
101
115
  /**
102
116
  * A source plugin supplies domain decoding (and optionally a subscription
103
117
  * handshake); the transport (WebSocket, reconnect, flush) is generic.
@@ -171,7 +185,15 @@ export declare function getDrawData(url: string): LayerData;
171
185
  * caller re-reconciles from there).
172
186
  */
173
187
  export declare function getData(url: string, onLoaded: () => void, opts?: StreamOptions, owner?: DataTransportOwner): LayerData;
174
- /** Is a fetch for this URL still in flight? Feeds the `om-map-ready` signal — errored fetches count as settled (readiness must not hang on a bad URL). */
188
+ /**
189
+ * Is a fetch for this URL still in flight? Feeds the `om-map-ready` signal —
190
+ * errored fetches count as settled (readiness must not hang on a bad URL).
191
+ *
192
+ * With an owner this asks only about that owner's OWN transports: a map must
193
+ * never wait on — or be released by — a sibling map's fetch. An owner with no
194
+ * acquired identities has nothing pending by definition, so a missing state is
195
+ * an empty set, not "match anything".
196
+ */
175
197
  export declare function isPendingData(url: string, owner?: DataTransportOwner): boolean;
176
198
  /**
177
199
  * Minimal feature-shape detection (spec: "Feature Field Resolution & Data
@@ -51,6 +51,7 @@ export declare class OmMapElement extends HTMLElementBase {
51
51
  private mount;
52
52
  private reconcilePending;
53
53
  private readonly dataOwner;
54
+ private dataReleasePending;
54
55
  /** Decoded property tables per pick-features layer — see RuntimeCoreCallbacks.onFeatureTable. */
55
56
  private featureTables;
56
57
  private layerIRs;
package/dist/geodesy.d.ts CHANGED
@@ -27,6 +27,8 @@ export interface PathSample {
27
27
  position: LngLat;
28
28
  /** Cumulative distance (m) from the path's start. */
29
29
  distance: number;
30
+ /** Index into the ORIGINAL input points when this sample IS one of them (see `resamplePathWithVertices`); absent for interpolated samples. */
31
+ vertexIndex?: number;
30
32
  }
31
33
  /**
32
34
  * `count` evenly-spaced points along a multi-segment polyline, by cumulative
@@ -39,6 +41,7 @@ export interface PathSample {
39
41
  * coincident) returns `count` copies of the start point at distance 0.
40
42
  */
41
43
  export declare function resamplePath(points: LngLat[], count: number): PathSample[];
44
+ export declare function resamplePathWithVertices(points: LngLat[], count: number): PathSample[];
42
45
  /**
43
46
  * Spherical polygon area in m² via the Chamberlain–Duquette line integral (the
44
47
  * exact index form Turf's `ringArea` uses, so results match Turf's fixtures).
@@ -1,4 +1,4 @@
1
- import { r as p, n as d } from "./index-7B-6Cbzu.js";
1
+ import { r as p, n as d } from "./index-Cxo9mCw_.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 { ak as Bt, ax as Xt, ay as Yt, az as Us } from "./index-7B-6Cbzu.js";
1
+ import { ak as Bt, ax as Xt, ay as Yt, az as Us } from "./index-Cxo9mCw_.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 { ae as _t, af as Ct } from "./index-7B-6Cbzu.js";
1
+ import { ae as _t, af as Ct } from "./index-Cxo9mCw_.js";
2
2
  function Yt(e, r, t = 2, i, o = "xy") {
3
3
  const s = r && r.length, l = s ? r[0] * t : e.length;
4
4
  let c = Ut(e, 0, l, t, !0, i && i[0], o);