@nika-js/onlymap 0.11.6 → 0.11.8
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 +13 -0
- package/README.md +2 -2
- package/dist/{basemap-jgiazq81.js → basemap-CFBn4Xl9.js} +2 -2
- package/dist/elements/om-map.d.ts +34 -2
- package/dist/elements/om-overlay.d.ts +21 -1
- package/dist/{geoparquet-BqlfpNfW.js → geoparquet-4Do2vscp.js} +1 -1
- package/dist/{globe-view-BwEj9ar9.js → globe-view-CkJR_AnY.js} +1 -1
- package/dist/{hillshade-50jNXHyP.js → hillshade-BYgQgSDu.js} +1 -1
- package/dist/{index-CCVeg1y8.js → index-BXjiBP1F.js} +3 -3
- package/dist/{index-jPifVRWa.js → index-BvNIWDg6.js} +1 -1
- package/dist/{index-mLeavkEr.js → index-COjrgKX8.js} +7365 -7309
- package/dist/{index-BBeBWH6b.js → index-D57ncSYm.js} +1 -1
- package/dist/{index-ALKRO96X.js → index-D7Xj3dSg.js} +1 -1
- package/dist/{index-BPRV9yxf.js → index-DT2RpSxM.js} +2 -2
- package/dist/{index-BVIktcJJ.js → index-DVQmGY-A.js} +3 -3
- package/dist/{index-CiSq4_Va.js → index-Du-3KfDZ.js} +1 -1
- package/dist/{index-CmfYI2km.js → index-DyXu8wbK.js} +1 -1
- package/dist/internal-ids.d.ts +7 -0
- package/dist/{lerc-B9Q9wT5l.js → lerc-CWZuxmH2.js} +1 -1
- package/dist/onlymap.standalone.js +17054 -16998
- package/dist/onlymapjs.js +1 -1
- package/dist/{post-process-effect-Dzn0f8iO.js → post-process-effect-BrfN_OHZ.js} +1 -1
- package/dist/{raster-C-WM-KNb.js → raster-BvmCiRyN.js} +3 -3
- package/dist/{raster-pipeline-qYYrkOdi.js → raster-pipeline-BpQIs6kC.js} +1 -1
- package/dist/{text-on-path-1qHOZW1K.js → text-on-path-CZgp3O8w.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-CqHkmYTv.js → zarr-0D_FIxaR.js} +2 -2
- package/docs/cartograph.md +2 -2
- package/llms.txt +2 -1
- package/onlymapjs.html-data.json +1 -1
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +2 -1
- package/skills/onlymapjs/references/syntax.md +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,19 @@ 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.8 — 2026-10-05
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **A popup opened by a click stays open when you move the pointer away.** It used to close as soon as the pointer left the feature, and passing over another feature dragged it there. It now stays until you click somewhere else: another feature moves it, empty map closes it. Popups that already set `selection-type` behave exactly as before.
|
|
15
|
+
- Fixed a click popup that could occasionally open invisible when the pointer moved in the same moment as the click; this affected popups with `selection-type="click"` too.
|
|
16
|
+
|
|
17
|
+
## 0.11.7 — 2026-10-05
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- **Tools can read what a map says is wrong with it, without changing the map.** Set `mapEl.diagnostics = true` and the map reports its problems — each with a suggested fix — as `om-validation-error` events, with no error panel and nothing written into the page; `mapEl.getDiagnostics()` returns the latest. An editor that saves its live page no longer has to add `validate` to get them.
|
|
21
|
+
- **Legend and layer-switcher rows say which layer they describe**, as `data-layer="<layer id>"`, so a click on a legend entry can be traced to its layer even when the row is not interactive.
|
|
22
|
+
- **A popup's template is readable as written**: `templateSource` on `<om-overlay>` returns it with its `{{fields}}` intact, so a tool can tell which fields a popup shows.
|
|
23
|
+
|
|
11
24
|
## 0.11.6 — 2026-10-02
|
|
12
25
|
|
|
13
26
|
### Fixed
|
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ A handful of elements, one rule: **attributes are kebab-case versions of deck.gl
|
|
|
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 **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
|
-
| `<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
|
|
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. |
|
|
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()`. |
|
|
91
91
|
| `<om-fallback>` | What shows where scripts never run — chat-app/email file previews (iOS QuickLook renders HTML attachments with JS off), file managers, sandboxed webviews. A direct child of `<om-map>`, hidden automatically the moment the map boots; pages without one get a text-only default banner from the stylesheet. Good practice on any page that may travel as a file. The gate is pure CSS (`om-map:not(:defined)`), so `onlymapjs.css` must load without JS — a real `<link>`, a bundler-emitted sheet, or an inlined `<style>`. |
|
|
@@ -404,7 +404,7 @@ Two things it gets right that hand-rolled hillshades usually don't. **Tile edges
|
|
|
404
404
|
|
|
405
405
|
- **`OmMap.*`** — `validate`, `snapshotIR`, `snapshotDescriptorIR`, `resolveImageOverlay`, `registerLayer`, `registerWidget`, `registerAction`, `registerSource`, `registerFormat`, `registerBasemap`, `configureBasemap`, `configureData`, `configureTelemetry`, `configureLicense`, `getLayerSchema`
|
|
406
406
|
- **`@nika-js/onlymap/deck`** — the bundled deck.gl classes (`CompositeLayer`, `TileLayer`, …) for building custom layer types: shims must extend the same class hierarchy the core renders with, not a second installed deck.gl copy. Recipe: [docs/custom-layers.md](docs/custom-layers.md)
|
|
407
|
-
- **On a `<om-map>` element** — `ready` (promise), `flyTo(coords, zoom?)`, `setLayerVisible(id, bool)`, `getLayers()`, `emit(action, payload)`, `snapshot(opts?)` (canvas-only PNG of basemap + layers at device pixels — DOM widgets/overlays and provider attribution are NOT captured, so exports must render credits themselves; `{as: "blob"}` for files, default dataURL); `attributions()` (the basemap's providers as plain text — what an export must credit; the bubbling `om-attributions-changed` event fires when a style loads); the `om-view-changed` event fires once the camera settles (debounced; `detail` = `{longitude, latitude, zoom, pitch, bearing, origin}`, where `origin` is `"user"` for gesture-driven bursts vs `"programmatic"` for API/story moves — the echo-suppression signal for state sync) — the camera-persistence hook; the `om-map-point` event (`detail = {coordinate: [lng,lat]|null, kind: "click"|"hover"}`) fires on every click/hover with the map coordinate, including empty-map clicks picks discard — the hook for custom capture tools the built-in draw widget doesn't cover; the `om-tileset-load` event (`detail = {layerId, tileset}`) surfaces a `Tile3DLayer`'s live deck `Tileset3D` for tools that need the real tileset (e.g. region export), not the IR; `pickAt([x, y])` / `pickRect({x, y, width, height})` ask what is under a pixel or inside a screen rectangle and `unproject([x, y])` / `project([lng, lat])` convert between pixels and coordinates — queries that leave the selection, `om-map-point` and behaviors alone, with a `pickMode` property (`"authored"` | `"all"`) that lets a picker tool reach layers the author did not make `pickable` without editing the document; `document.querySelector("om-map")` is fully typed
|
|
407
|
+
- **On a `<om-map>` element** — `ready` (promise), `flyTo(coords, zoom?)`, `setLayerVisible(id, bool)`, `getLayers()`, `emit(action, payload)`, `snapshot(opts?)` (canvas-only PNG of basemap + layers at device pixels — DOM widgets/overlays and provider attribution are NOT captured, so exports must render credits themselves; `{as: "blob"}` for files, default dataURL); `attributions()` (the basemap's providers as plain text — what an export must credit; the bubbling `om-attributions-changed` event fires when a style loads); the `om-view-changed` event fires once the camera settles (debounced; `detail` = `{longitude, latitude, zoom, pitch, bearing, origin}`, where `origin` is `"user"` for gesture-driven bursts vs `"programmatic"` for API/story moves — the echo-suppression signal for state sync) — the camera-persistence hook; the `om-map-point` event (`detail = {coordinate: [lng,lat]|null, kind: "click"|"hover"}`) fires on every click/hover with the map coordinate, including empty-map clicks picks discard — the hook for custom capture tools the built-in draw widget doesn't cover; the `om-tileset-load` event (`detail = {layerId, tileset}`) surfaces a `Tile3DLayer`'s live deck `Tileset3D` for tools that need the real tileset (e.g. region export), not the IR; `pickAt([x, y])` / `pickRect({x, y, width, height})` ask what is under a pixel or inside a screen rectangle and `unproject([x, y])` / `project([lng, lat])` convert between pixels and coordinates — queries that leave the selection, `om-map-point` and behaviors alone, with a `pickMode` property (`"authored"` | `"all"`) that lets a picker tool reach layers the author did not make `pickable` without editing the document; a `diagnostics` property that makes the map report its validation problems as `om-validation-error` events (and `getDiagnostics()` for the latest) without a `validate` attribute or panel, `data-layer` on legend and layer-switcher rows, and an overlay's `templateSource` (its template with `{{fields}}` intact) — what a host's picker reads without editing the document (0.11.7+); `document.querySelector("om-map")` is fully typed
|
|
408
408
|
- **`MapController`** — the framework-grade programmatic front-end (typed `LayerDescriptor`s → the same reconcile core, no DOM manifest): `setLayers`, `watch`, `emit`, camera methods, `injectPick`, `ready`, `snapshot`, `setEffects` (deck `Effect` instances, 1:1 — takes precedence over the document's `<om-effect>` chain while set; `null` hands the chain back), `suspend`/`resume`, an `onViewChange(view, origin)` option (the `om-view-changed` twin), plus `onMapPoint` / `onTilesetLoad` options (the `om-map-point` / `om-tileset-load` twins). Active descriptors own reference-counted fetch/poll/socket handles: layer removal, transport-option change, suspend, and destroy release them. Accessor props normally take functions; schema-declared accessors also accept restricted expression strings such as `getPosition: "[$lon, $lat]"`, which makes the descriptor JSON-safe for native/cross-process bridges. `snapshotDescriptorIR(descriptors)` resolves that lane without fetching URL data. The same `pickAt`/`pickRect`/`unproject`/`pickMode` the element has are on the controller. The React adapter rides the function form; vanilla/native hosts may use either
|
|
409
409
|
- **`getStore(token)`** — the external-store contract: per-token `{subscribe, getSnapshot}` stores (`viewport`/`selection`/`layers`/`data:<id>`) with cached immutable plain-data snapshots and `origin` tagging — directly consumable by `useSyncExternalStore` (the React adapter's own hooks ride it), MobX autoruns, Redux listeners, Zustand mirrors. ~20-line integration-tested recipes for Redux Toolkit, MobX/mobx-keystone, Zustand, and Jotai: [docs/external-stores.md](docs/external-stores.md)
|
|
410
410
|
- **Testing** — `mountForTest`, and imports are SSR-safe (importing in Node/jsdom never touches browser globals)
|
|
@@ -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-
|
|
2
|
-
import { a as ty } from "./globe-view-
|
|
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";
|
|
3
3
|
const iy = {
|
|
4
4
|
copy: "©",
|
|
5
5
|
reg: "®",
|
|
@@ -6,12 +6,17 @@ import { type ClipBoxIR } from "../clip-box";
|
|
|
6
6
|
import { type TerrainIR } from "../terrain";
|
|
7
7
|
import { type WidgetSlot } from "../widget-layout";
|
|
8
8
|
import { type SnapshotOptions } from "../snapshot";
|
|
9
|
-
import { type ValidationEntry } from "../validation";
|
|
9
|
+
import { type ValidationEntry, type ValidationResult } from "../validation";
|
|
10
10
|
import type { LayerIR } from "../ir";
|
|
11
11
|
import type { PickAtOptions, PickMode, PickRect, PickRectOptions, Selection } from "../selection";
|
|
12
12
|
import type { MapViewport } from "../basemap";
|
|
13
|
+
/** The latest pick of each pointer type — `null` for an empty pick; a type with no pick yet is absent. */
|
|
14
|
+
export type LastPickByType = {
|
|
15
|
+
click?: Selection | null;
|
|
16
|
+
hover?: Selection | null;
|
|
17
|
+
};
|
|
13
18
|
interface OverlayHost {
|
|
14
|
-
updatePosition(viewport: MapViewport | undefined, selection: Selection | null, pickType?: "hover" | "click"): void;
|
|
19
|
+
updatePosition(viewport: MapViewport | undefined, selection: Selection | null, pickType?: "hover" | "click", lastPickByType?: Readonly<LastPickByType>): void;
|
|
15
20
|
/**
|
|
16
21
|
* Screen rect for collision-dim (spec: "Overlap avoidance") — non-null
|
|
17
22
|
* only when the overlay is VISIBLE and participates in dimming. Returns
|
|
@@ -47,11 +52,23 @@ export declare class OmMapElement extends HTMLElementBase {
|
|
|
47
52
|
* space (dismisses a click popup) from a hover over empty space (inert).
|
|
48
53
|
*/
|
|
49
54
|
private lastPickType;
|
|
55
|
+
/**
|
|
56
|
+
* The latest pick of EACH pointer type (`null` = an empty pick; absent =
|
|
57
|
+
* none yet). A type-scoped overlay anchors to its own type's latest pick,
|
|
58
|
+
* not to whatever `selection` holds when the batched flush runs: a hover
|
|
59
|
+
* landing between a click and the next frame used to stand in for the
|
|
60
|
+
* click, and the popup that click opened never got an anchor.
|
|
61
|
+
*/
|
|
62
|
+
private lastPickByType;
|
|
50
63
|
private widgets;
|
|
51
64
|
private overlays;
|
|
52
65
|
private overlayFlushPending;
|
|
53
66
|
private errorPanel;
|
|
54
67
|
private runtimeErrors;
|
|
68
|
+
/** Host diagnostics channel (the `diagnostics` property) — see its setter. */
|
|
69
|
+
private diagnosticsOn;
|
|
70
|
+
/** The last merged static + runtime report, while anyone is listening. */
|
|
71
|
+
private lastDiagnostics;
|
|
55
72
|
/** Dedup guard for the approximate-BIM-georeferencing warning — same shape as applyLicenseGates' own `warned` set, keyed per layer id. */
|
|
56
73
|
private warnedApproximatePlacement;
|
|
57
74
|
/** Dedup guard for the no-terrain-for-elevation error — same shape as `warnedApproximatePlacement`. */
|
|
@@ -498,6 +515,21 @@ export declare class OmMapElement extends HTMLElementBase {
|
|
|
498
515
|
* above: real and callable, not part of the documented public API.
|
|
499
516
|
*/
|
|
500
517
|
reportRuntimeErrorInternal(entry: ValidationEntry): void;
|
|
518
|
+
/**
|
|
519
|
+
* A host's own diagnostics channel — a PROPERTY, never an attribute. While
|
|
520
|
+
* `true`, the map validates on every reconcile and fires
|
|
521
|
+
* `om-validation-error` exactly as `validate="silent"` would, with no
|
|
522
|
+
* on-page panel and without touching the document. For an editor that
|
|
523
|
+
* autosaves the DOM (writing `validate` there would save it into the user's
|
|
524
|
+
* file) or a preview that must not change what it shows. An authored
|
|
525
|
+
* `validate` attribute still decides whether the panel appears.
|
|
526
|
+
*/
|
|
527
|
+
get diagnostics(): boolean;
|
|
528
|
+
set diagnostics(on: boolean);
|
|
529
|
+
/** The latest merged static + runtime report — `null` until the map is
|
|
530
|
+
* validating (a `validate` attribute, or `diagnostics = true`). For a host
|
|
531
|
+
* that starts listening after the first reconcile. */
|
|
532
|
+
getDiagnostics(): ValidationResult | null;
|
|
501
533
|
private publishValidation;
|
|
502
534
|
}
|
|
503
535
|
declare global {
|
|
@@ -33,12 +33,29 @@ export declare class OmOverlayElement extends HTMLElementBase {
|
|
|
33
33
|
* in lng/lat, just projected as if the picked surface were at sea level.
|
|
34
34
|
*/
|
|
35
35
|
private lastAnchor;
|
|
36
|
+
/**
|
|
37
|
+
* "click" while a click behavior's `show-overlay` has this open: with no
|
|
38
|
+
* authored `selection-type`, it then scopes like `selection-type="click"`
|
|
39
|
+
* (0.11.8). Set by the action, so a popup opened by script or on load keeps
|
|
40
|
+
* reacting to every pick as before.
|
|
41
|
+
*/
|
|
42
|
+
openedByPickInternal: "click" | null;
|
|
43
|
+
/** The scoped pick last applied — see `updatePosition`. `undefined` = none yet. */
|
|
44
|
+
private appliedScopedPick;
|
|
36
45
|
/** Cached [w, h] for `clip-to-map` (offsetWidth forces layout; flushes run per pointer move) — invalidated by setContent. */
|
|
37
46
|
private clipSizeCache;
|
|
38
47
|
/** Memoized feature anchor — recomputed only when the layer's data reference or the target id changes (live layers swap data). */
|
|
39
48
|
private featureAnchorCache;
|
|
40
49
|
connectedCallback(): void;
|
|
41
50
|
disconnectedCallback(): void;
|
|
51
|
+
/**
|
|
52
|
+
* The template this overlay renders, `{{fields}}` and all — read-only. The
|
|
53
|
+
* authored content moves into the shadow root and is shown with its fields
|
|
54
|
+
* filled in, so neither the light DOM nor the rendered text still holds the
|
|
55
|
+
* template; a tool that needs to know which fields a popup shows (an
|
|
56
|
+
* element picker naming what it reads) reads it here.
|
|
57
|
+
*/
|
|
58
|
+
get templateSource(): string;
|
|
42
59
|
/**
|
|
43
60
|
* Replaces the overlay's content template (used by the internal, runtime-
|
|
44
61
|
* managed tooltip overlay the `show-tooltip` action drives — see
|
|
@@ -84,5 +101,8 @@ export declare class OmOverlayElement extends HTMLElementBase {
|
|
|
84
101
|
* must not flicker widgets). Only stable author popups drive dimming.
|
|
85
102
|
*/
|
|
86
103
|
getVisibleRect(): DOMRect | null;
|
|
87
|
-
updatePosition(viewport: MapViewport | undefined,
|
|
104
|
+
updatePosition(viewport: MapViewport | undefined, current: Selection | null, pickType?: "hover" | "click", lastPickByType?: Readonly<{
|
|
105
|
+
click?: Selection | null;
|
|
106
|
+
hover?: Selection | null;
|
|
107
|
+
}>): void;
|
|
88
108
|
}
|
|
@@ -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-
|
|
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";
|
|
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-
|
|
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";
|
|
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-
|
|
2
|
-
import { P as s } from "./post-process-effect-
|
|
3
|
-
import { G as pa, a as na } from "./globe-view-
|
|
1
|
+
import { A as t, a as o, b as i, C as l, c as p, d as n, D as _, e as c, f as g, F as h, L as m, g as L, h as y, i as f, j as w, M as S, k as V, O as b, l as C, m as E, P as I, T as P, n as T, o as M, U as d, V as A, p as O, q as u, W as N, r as k, s as x, t as D, u as G, G as R, v as j, w as W, x as q, y as v, z, B as F, E as U, H as Y, I as B, J as H, K as J, N as K, Q, R as X, S as Z, X as $, Y as aa, Z as sa, _ as ea, $ as ra, a0 as ta, a1 as oa, a2 as ia } from "./index-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";
|
|
4
4
|
export {
|
|
5
5
|
t as AmbientLight,
|
|
6
6
|
o as Attribute,
|