@nika-js/onlymap 0.13.4 → 0.13.5
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 +12 -0
- package/README.md +2 -2
- package/dist/actions.d.ts +12 -6
- package/dist/attribute-resolution.d.ts +32 -4
- package/dist/{basemap-BiC_RwbV.js → basemap-CErNEhX6.js} +2 -2
- package/dist/{build-DQCmcQE1.js → build-ByNIb4VX.js} +1 -1
- package/dist/{client-C0CgEs_P.js → client-xe2E4jg4.js} +2 -2
- package/dist/ctx.d.ts +2 -0
- package/dist/{geoparquet-DbVJrJYG.js → geoparquet-DOhMQl-X.js} +1 -1
- package/dist/{globe-view-CrGbvqqZ.js → globe-view-84s_uNZX.js} +1 -1
- package/dist/{hillshade-CGY_OBaG.js → hillshade-D8h8CRQq.js} +2 -2
- package/dist/{hillshade-shader-w8tmFgaV.js → hillshade-shader-Bm1O0P76.js} +1 -1
- package/dist/{index-QrGqSW_H.js → index-4Y4Q7RP4.js} +3 -3
- package/dist/{index-DrCMvhhr.js → index-BG_49YHy.js} +19732 -19592
- package/dist/{index-GfvWJDX0.js → index-DTN2CcOQ.js} +11 -11
- package/dist/{index-ChoEWeXU.js → index-DXxQu9Xi.js} +1 -1
- package/dist/{index-Cm2sfhw7.js → index-D_EiGesl.js} +1 -1
- package/dist/{index-Dtsf-TPD.js → index-DrSCLk9i.js} +12 -12
- package/dist/{index-2lD29y87.js → index-J_Sj6T0S.js} +25 -25
- package/dist/index-bpdGuZR6.js +478 -0
- package/dist/{index-xF9sKoMB.js → index-phbljJTZ.js} +3 -3
- package/dist/ir-snapshot.d.ts +2 -0
- package/dist/ir.d.ts +18 -0
- package/dist/{lerc-DxujwTm7.js → lerc-DLWS3sYw.js} +1 -1
- package/dist/onlymap.standalone.js +35477 -35321
- package/dist/onlymapjs.js +13 -13
- package/dist/plane-gpu/plane-basemap.d.ts +79 -79
- package/dist/plane-vector/plane-mvt-layer.d.ts +79 -79
- package/dist/{post-process-effect-BL9rBDEh.js → post-process-effect-CHsD0-oP.js} +1 -1
- package/dist/programmatic.d.ts +4 -0
- package/dist/{raster-Bq768NZr.js → raster-B7ILGg0X.js} +4 -4
- package/dist/{raster-pipeline-C898iYqw.js → raster-pipeline-avMAbONM.js} +2 -2
- package/dist/react/om-layer.d.ts +4 -0
- package/dist/react.js +67 -65
- package/dist/serialize/emit.d.ts +2 -0
- package/dist/serialize/index.d.ts +2 -0
- package/dist/{terrain-inspect-DNZO8z6S.js → terrain-inspect-FKTVm7nv.js} +1 -1
- package/dist/{text-on-path-owfh8Ac6.js → text-on-path-CpHM02Fs.js} +19 -18
- package/dist/{vector-style-BlnKzVND.js → vector-style-CPvUSy2F.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-CMWiR63-.js → zarr-DpbT4eyF.js} +2 -2
- package/dist/zoom-gates.d.ts +60 -0
- package/docs/cartograph.md +2 -2
- package/llms.txt +1 -0
- package/onlymapjs.attributes.json +2 -0
- package/onlymapjs.html-data.json +16 -0
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +2 -1
- package/skills/onlymapjs/references/syntax.md +30 -3
- package/dist/index-Bdltig68.js +0 -459
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,18 @@ 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.13.5 — 2026-12-03
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **Show features only from a zoom level of their own.** `min-zoom-field="minzoom"` hides each row until the map is zoomed in to that row's value — big cities from the start, villages only up close. It runs on the GPU, so zooming never touches the document, undo history or `ctx.stats`. Rows with no value always show.
|
|
15
|
+
- **Keep helper layers out of the legend.** `listed="false"` leaves a layer out of the legend and layer-switcher widgets.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- Labels that follow a line (`TextOnPathLayer`) now honour `filter-*`.
|
|
19
|
+
- `populate` animates the right filter when an earlier `filter-fields` entry has no range.
|
|
20
|
+
- A `MapController` layer that brings its own `DataFilterExtension` now gets one sized to its filters, instead of drawing wrongly.
|
|
21
|
+
- SVG snapshots leave out layers outside their visible zoom range, as the map does.
|
|
22
|
+
|
|
11
23
|
## 0.13.4 — 2026-11-03
|
|
12
24
|
|
|
13
25
|
### Added
|
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ A handful of elements, one rule: **attributes are kebab-case versions of deck.gl
|
|
|
83
83
|
| Element | Role |
|
|
84
84
|
|---|---|
|
|
85
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
|
-
| `<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. |
|
|
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. `min-zoom-field="minzoom"` does the same per FEATURE — each draws from the zoom in its own property, smoothly during a zoom (label staging); `listed="false"` keeps a helper layer out of the legend and layer switcher. |
|
|
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. |
|
|
89
89
|
| `<om-behavior>` | Declarative interactions: `on="click|hover|drag|load|data-loaded"` → a named action. |
|
|
@@ -416,7 +416,7 @@ Two things it gets right that hand-rolled hillshades usually don't. **Tile edges
|
|
|
416
416
|
- **`OmMap.*`** — `validate`, `snapshotIR`, `snapshotDescriptorIR`, `resolveImageOverlay`, `registerLayer`, `registerWidget`, `registerAction`, `registerSource`, `registerFormat`, `registerBasemap`, `configureBasemap`, `configureData`, `configureTelemetry`, `configureLicense`, `getLayerSchema`
|
|
417
417
|
- **`@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)
|
|
418
418
|
- **On a `<om-map>` element** — `ready` (promise), `flyTo(coords, zoom?)`, `getCamera()` (the camera plus where its eye is: `altitude` against sea level, `targetElevation` — the ground under the view centre — and `clearance` above the ground beneath the eye, true metres, cheap enough for every animation frame; also on `MapController`, and in the `om-view-changed` detail, which reads only DEM tiles already held — null there until a `getCamera()` call has fetched them), `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; the `om-layer-error` event (`detail = {layerId, severity, cause, status?, host, message, fix}`) fires once per cause when a layer's tiles fail, validating or not, so a page can tell its readers a layer is missing; `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
|
|
419
|
-
- **`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` / `onLayerError` options (the `om-map-point` / `om-tileset-load` / `om-layer-error` 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
|
|
419
|
+
- **`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` / `onLayerError` options (the `om-map-point` / `om-tileset-load` / `om-layer-error` 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 Layer descriptors carry the universal attributes as camelCase fields — `visibleZoomRange`, `minZoomField`, `listed: false`, `filterField`, … — and `<OmLayer>` takes the same names as props.
|
|
420
420
|
- **`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)
|
|
421
421
|
- **Testing** — `mountForTest`, and imports are SSR-safe (importing in Node/jsdom never touches browser globals)
|
|
422
422
|
|
package/dist/actions.d.ts
CHANGED
|
@@ -94,17 +94,23 @@ export interface PopulateSweep {
|
|
|
94
94
|
lo: number;
|
|
95
95
|
hi: number;
|
|
96
96
|
accessorPatch?: Record<string, unknown>;
|
|
97
|
-
/**
|
|
98
|
-
|
|
97
|
+
/**
|
|
98
|
+
* A packed filter (more than one GPU slot): every slot's range as the layer
|
|
99
|
+
* built it, and which slot the sweep moves. The others hold still each
|
|
100
|
+
* frame — authored dimensions at their ranges, rangeless ones open, the
|
|
101
|
+
* min-zoom slot at whatever the camera gate sets.
|
|
102
|
+
*/
|
|
103
|
+
packed?: {
|
|
104
|
+
ranges: [number, number][];
|
|
105
|
+
slot: number;
|
|
106
|
+
};
|
|
99
107
|
}
|
|
100
108
|
export declare function preparePopulateSweep(payload: Record<string, unknown>, ir: LayerIR): PopulateSweep | null;
|
|
101
109
|
/**
|
|
102
110
|
* The populate sweep's per-frame patch: the accessor patch (same references
|
|
103
111
|
* every frame — the buffer computes once, keyed by its trigger) plus the
|
|
104
|
-
* swept upper bound.
|
|
105
|
-
*
|
|
106
|
-
* swept dimension's range first, matching `ir.filter[0]`'s position, then
|
|
107
|
-
* the rest fixed at their authored ranges.
|
|
112
|
+
* swept upper bound. On a packed filter `filterRange` must be the FULL packed
|
|
113
|
+
* array (deck.gl's own multi-dimension shape), with only the swept slot moving.
|
|
108
114
|
*/
|
|
109
115
|
export declare function populateSweepFrame(sweep: PopulateSweep, t01: number): Record<string, unknown>;
|
|
110
116
|
/** Timestamp range of a TripsLayer's data via its own compiled getTimestamps accessor — the trace sweep's domain (shared by both trace clocks). */
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { LayerMeta, LayerFilter, LayerCategoryFilter, LayerData } from "./ir";
|
|
1
|
+
import type { LayerMeta, LayerFilter, LayerCategoryFilter, LayerData, MinZoomGate } from "./ir";
|
|
2
|
+
export type { MinZoomGate } from "./ir";
|
|
3
|
+
export { gateMinZoomProps, minZoomValue, MIN_ZOOM_FLOOR, zoomInVisibleRange } from "./zoom-gates";
|
|
2
4
|
import type { LayerSchema, PropDescriptor } from "./layer-registry";
|
|
3
5
|
import type { Shape } from "./expr";
|
|
4
6
|
/** Sweeps the shared caches down to exactly the keys still referenced by the current manifest (Q4). */
|
|
@@ -51,11 +53,32 @@ export declare const CLASSIFY_ATTRS: Set<string>;
|
|
|
51
53
|
* The gate composes with (never overrides) authored `visible`.
|
|
52
54
|
*/
|
|
53
55
|
export declare const ZOOM_VISIBILITY_ATTR = "visible-zoom-range";
|
|
56
|
+
/**
|
|
57
|
+
* Per-FEATURE minimum zoom (public issue #25) — a universal layer attribute:
|
|
58
|
+
* `min-zoom-field="minzoom"` draws a row only while the camera zoom is at or
|
|
59
|
+
* above that row's value (inclusive, like the min end of
|
|
60
|
+
* `visible-zoom-range`, and against the exact fractional zoom). Rows whose
|
|
61
|
+
* value is missing, null or not a number are always drawn.
|
|
62
|
+
*
|
|
63
|
+
* It is a PRESENTATION gate, not a data filter: it rides one extra numeric
|
|
64
|
+
* slot of the always-mounted DataFilterExtension (appended after the
|
|
65
|
+
* authored `filter-*` dimensions, so it shares their 4-slot ceiling), but it
|
|
66
|
+
* never appears in `ir.filter` — `ctx.layers[].filter`, the filter widget and
|
|
67
|
+
* `ctx.stats` see only what the author filtered. The slot's range is set from
|
|
68
|
+
* the live camera in `buildLayers` (see `gateMinZoomProps`), never written to
|
|
69
|
+
* the document.
|
|
70
|
+
*/
|
|
71
|
+
export declare const MIN_ZOOM_FIELD_ATTR = "min-zoom-field";
|
|
72
|
+
/**
|
|
73
|
+
* The authored min-zoom field once the layer type and the cluster toggle have
|
|
74
|
+
* had their say — undefined (with one console warning) where it cannot apply.
|
|
75
|
+
* Both front-ends call it before `applyFilterWiring`, with the resolved props
|
|
76
|
+
* (the `cluster` toggle is still in them at that point).
|
|
77
|
+
*/
|
|
78
|
+
export declare function effectiveMinZoomField(raw: string | undefined, type: string, props: Record<string, unknown>, clusters: boolean | undefined, warnLabel: string): string | undefined;
|
|
54
79
|
/** Pure coercion (no console) — validation.ts shares it so validate() reports the same malformed shapes structurally. */
|
|
55
80
|
export declare function coerceVisibleZoomRange(raw: unknown): [number, number] | undefined;
|
|
56
81
|
export declare function parseVisibleZoomRange(raw: unknown, warnLabel: string): [number, number] | undefined;
|
|
57
|
-
/** The gate itself — min inclusive, max exclusive (minzoom/maxzoom convention). */
|
|
58
|
-
export declare function zoomInVisibleRange(range: [number, number], zoom: number): boolean;
|
|
59
82
|
/** Layer types whose deck class strokes a path, so PathStyleExtension's dash takes effect (GeoJsonLayer/PolygonLayer dash their line/stroke sublayers). */
|
|
60
83
|
export declare const DASH_CAPABLE_LAYERS: Set<string>;
|
|
61
84
|
/** A ValidationEntry-compatible shape, structural to avoid the validation.ts import cycle. */
|
|
@@ -125,6 +148,8 @@ export interface LayerFilterSpec {
|
|
|
125
148
|
filterCategoryField?: string;
|
|
126
149
|
filterCategories?: unknown[];
|
|
127
150
|
filterCategoryFields?: LayerCategoryFilterFieldSpec[];
|
|
151
|
+
/** `min-zoom-field` (public issue #25) — not a filter dimension of `ir.filter`, but it takes a slot of the same extension. */
|
|
152
|
+
minZoomField?: string;
|
|
128
153
|
}
|
|
129
154
|
/** One categorical filter dimension, already-coerced. `categories` absent = declared but not yet ranged, mirroring the numeric case — dropped from the active filter with a warning, since deck.gl's category mechanism has no "wide open" value to fall back to (unlike a numeric [-Infinity, Infinity] range). */
|
|
130
155
|
export interface LayerCategoryFilterFieldSpec {
|
|
@@ -211,6 +236,8 @@ export declare function parseFilterCategoryFieldsAttr(raw: string, warnLabel: st
|
|
|
211
236
|
export interface LayerFilterResult {
|
|
212
237
|
filter?: LayerFilter;
|
|
213
238
|
categoryFilter?: LayerCategoryFilter;
|
|
239
|
+
/** Present when `min-zoom-field` got its slot. */
|
|
240
|
+
minZoom?: MinZoomGate;
|
|
214
241
|
}
|
|
215
242
|
export declare function applyFilterWiring(props: Record<string, unknown>, updateTriggers: Record<string, string>, shape: Shape, spec: LayerFilterSpec, warnLabel: string): LayerFilterResult;
|
|
216
243
|
/**
|
|
@@ -272,6 +299,7 @@ export interface ResolvedAttributes {
|
|
|
272
299
|
filter?: LayerFilter;
|
|
273
300
|
/** The layer's active categorical filter, if `filter-category`/`filter-category-fields` are present. */
|
|
274
301
|
categoryFilter?: LayerCategoryFilter;
|
|
302
|
+
/** `min-zoom-field`'s slot, when authored and there was room for it. */
|
|
303
|
+
minZoom?: MinZoomGate;
|
|
275
304
|
}
|
|
276
305
|
export declare function resolveLayerAttributes(el: Element, schema: LayerSchema, shape: Shape): ResolvedAttributes;
|
|
277
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as iy } from "./globe-view-
|
|
1
|
+
import { b6 as Y_, N as Ou, H as Id, k as K_, b7 as J_, b8 as Q_, D as Yf, Z as ey, b9 as ty } from "./index-BG_49YHy.js";
|
|
2
|
+
import { a as iy } from "./globe-view-84s_uNZX.js";
|
|
3
3
|
const ry = /* @__PURE__ */ new Set(["tile.openstreetmap.org", "a.tile.openstreetmap.org", "b.tile.openstreetmap.org", "c.tile.openstreetmap.org"]);
|
|
4
4
|
function ny(Me) {
|
|
5
5
|
let Q;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aq as q, ar as T, as as B, at as E, au as j } from "./index-
|
|
1
|
+
import { aq as q, ar as T, as as B, at as E, au as j } from "./index-BG_49YHy.js";
|
|
2
2
|
const N = (l) => Number.isFinite(l[0]) && Number.isFinite(l[1]);
|
|
3
3
|
function O(l, t, s) {
|
|
4
4
|
const o = T(s.x, s.y, s.z), i = 8, n = [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aB as _ } from "./index-
|
|
1
|
+
import { aB as _ } from "./index-BG_49YHy.js";
|
|
2
2
|
const c = `function Ie(t) {
|
|
3
3
|
t("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), t("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), t("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");
|
|
4
4
|
for (var i = 1; i <= 60; ++i)
|
|
@@ -6869,7 +6869,7 @@ async function E(e, t, n, i) {
|
|
|
6869
6869
|
});
|
|
6870
6870
|
}
|
|
6871
6871
|
async function f(e, t, n, i) {
|
|
6872
|
-
const { buildPlaneTile: s } = await import("./build-
|
|
6872
|
+
const { buildPlaneTile: s } = await import("./build-ByNIb4VX.js");
|
|
6873
6873
|
return s(e, t, n, (a, r) => i.toPlane([a, r]), (a, r) => i.fromPlane([a, r]));
|
|
6874
6874
|
}
|
|
6875
6875
|
export {
|
package/dist/ctx.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ export interface LayerMetaSnapshot {
|
|
|
28
28
|
time?: string;
|
|
29
29
|
/** `cluster="true"` is on (docs/design/clustering.md) — the legend adds a bubble row so the count circles are explained. */
|
|
30
30
|
cluster?: boolean;
|
|
31
|
+
/** `listed="false"`: a helper layer the legend and layer-switcher skip. It is still a scene member — here, toggleable, filterable. Absent = listed. */
|
|
32
|
+
listed?: false;
|
|
31
33
|
}
|
|
32
34
|
export interface DataOpts {
|
|
33
35
|
/** Set `false` to bypass the layer's active declarative filter (spec: "Filter-aware stats & data (the coherence rule)"). Default `true`. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as L, j as x, av as A, aw as E, ax as d, ay as h, az as u, aA as z, p as V, W as Z, G as D } from "./index-
|
|
1
|
+
import { d as L, j as x, av as A, aw as E, ax as d, ay as h, az as u, aA as z, p as V, W as Z, G as D } from "./index-BG_49YHy.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,6 +1,6 @@
|
|
|
1
|
-
import { c as w, ab as F, ac as M, ad as B, ae as H, af as $, ag as b, ah as E, ai as _, aj as S, ak as D, aa as O } from "./index-
|
|
1
|
+
import { c as w, ab as F, ac as M, ad as B, ae as H, af as $, ag as b, ah as E, ai as _, aj as S, ak as D, aa as O } from "./index-BG_49YHy.js";
|
|
2
2
|
import { N as P, c as C } from "./hillshade-apron-Bem3DWyJ.js";
|
|
3
|
-
import { p as N, h as R, m as Z, a as U } from "./hillshade-shader-
|
|
3
|
+
import { p as N, h as R, m as Z, a as U } from "./hillshade-shader-Bm1O0P76.js";
|
|
4
4
|
const A = 64, f = /* @__PURE__ */ new Map();
|
|
5
5
|
function L(t) {
|
|
6
6
|
const e = f.get(t);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { al as d } from "./index-
|
|
1
|
+
import { al as d } from "./index-BG_49YHy.js";
|
|
2
2
|
const u = 110574, m = 111320, o = Math.PI / 180, f = { none: 0, mercator: 1, geographic: 2 };
|
|
3
3
|
function E(e, a, s = "HillshadeLayer") {
|
|
4
4
|
const h = (l) => l == null || l === "" ? [] : typeof l == "number" ? Number.isFinite(l) ? [l] : [] : String(l).split(/[\s,]+/).filter(Boolean).map(Number).filter((r) => Number.isFinite(r));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { aC as j, aD as S, aE as A, aF as M, aG as L } from "./index-
|
|
2
|
-
import { aH as B, aI as K, aJ as V, aK as X } from "./index-
|
|
3
|
-
import { P as h } from "./post-process-effect-
|
|
1
|
+
import { aC as j, aD as S, aE as A, aF as M, aG as L } from "./index-BG_49YHy.js";
|
|
2
|
+
import { aH as B, aI as K, aJ as V, aK as X } from "./index-BG_49YHy.js";
|
|
3
|
+
import { P as h } from "./post-process-effect-CHsD0-oP.js";
|
|
4
4
|
const O = `
|
|
5
5
|
float omfx_lum(vec3 c) { return dot(c, vec3(0.299, 0.587, 0.114)); }
|
|
6
6
|
float omfx_hash(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); }
|