@nika-js/onlymap 0.13.3 → 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.
Files changed (71) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +9 -5
  3. package/dist/actions.d.ts +12 -6
  4. package/dist/attribute-resolution.d.ts +32 -4
  5. package/dist/{basemap-5NHR6Gio.js → basemap-CErNEhX6.js} +3 -7
  6. package/dist/basemap.d.ts +1 -5
  7. package/dist/bbox-tokens.d.ts +70 -0
  8. package/dist/{build-DJjheWZ2.js → build-ByNIb4VX.js} +1 -1
  9. package/dist/{client-0mQmDog8.js → client-xe2E4jg4.js} +2 -2
  10. package/dist/clip-box-controller.d.ts +0 -17
  11. package/dist/ctx.d.ts +17 -0
  12. package/dist/data-layer.d.ts +15 -8
  13. package/dist/dom-tile-layer.d.ts +30 -0
  14. package/dist/draw-controller.d.ts +1 -1
  15. package/dist/elements/om-map.d.ts +12 -1
  16. package/dist/feature-service.d.ts +42 -0
  17. package/dist/geodesy.d.ts +6 -5
  18. package/dist/{geoparquet-B_nO2OyP.js → geoparquet-DOhMQl-X.js} +1 -1
  19. package/dist/{globe-view-BFUa9ksE.js → globe-view-84s_uNZX.js} +1 -1
  20. package/dist/grid-tiles.d.ts +117 -0
  21. package/dist/{hillshade-B_CxPhtA.js → hillshade-D8h8CRQq.js} +2 -2
  22. package/dist/{hillshade-shader-r7GxxjXj.js → hillshade-shader-Bm1O0P76.js} +1 -1
  23. package/dist/{index-YMu_yLXO.js → index-4Y4Q7RP4.js} +3 -3
  24. package/dist/{index-DWijIMti.js → index-BG_49YHy.js} +33543 -32098
  25. package/dist/index-BahtHUrg.js +8458 -0
  26. package/dist/{index-ChmxbIdj.js → index-DTN2CcOQ.js} +43 -43
  27. package/dist/{index-BvNxS6dM.js → index-DXxQu9Xi.js} +1 -1
  28. package/dist/{index-A1FYw2dy.js → index-D_EiGesl.js} +1 -1
  29. package/dist/{index-CObPGkze.js → index-DrSCLk9i.js} +22 -22
  30. package/dist/{index-CU7RnKnO.js → index-J_Sj6T0S.js} +32 -32
  31. package/dist/index-bpdGuZR6.js +478 -0
  32. package/dist/{index-CgIuV5Oh.js → index-phbljJTZ.js} +3 -3
  33. package/dist/index.d.ts +1 -1
  34. package/dist/ir-snapshot.d.ts +2 -0
  35. package/dist/ir.d.ts +18 -0
  36. package/dist/layer-registry.d.ts +1 -0
  37. package/dist/layers/warped-bitmap-layer.d.ts +14 -1
  38. package/dist/{lerc-Bl4vym9y.js → lerc-DLWS3sYw.js} +1 -1
  39. package/dist/onlymap.standalone.js +69300 -58870
  40. package/dist/onlymapjs.js +25 -25
  41. package/dist/parse-manifest.d.ts +4 -1
  42. package/dist/plane-gpu/plane-basemap.d.ts +237 -237
  43. package/dist/plane-vector/plane-mvt-layer.d.ts +237 -237
  44. package/dist/plane-warp.d.ts +14 -1
  45. package/dist/pmtiles.d.ts +76 -0
  46. package/dist/{post-process-effect-gFGVlC77.js → post-process-effect-CHsD0-oP.js} +1 -1
  47. package/dist/programmatic.d.ts +21 -1
  48. package/dist/{raster-1ShXyF12.js → raster-B7ILGg0X.js} +4 -4
  49. package/dist/{raster-pipeline-BMS54TX2.js → raster-pipeline-avMAbONM.js} +11 -11
  50. package/dist/react/om-layer.d.ts +4 -0
  51. package/dist/react.js +67 -65
  52. package/dist/runtime-core.d.ts +106 -4
  53. package/dist/serialize/emit.d.ts +2 -0
  54. package/dist/serialize/index.d.ts +2 -0
  55. package/dist/{terrain-inspect-Cndlmxig.js → terrain-inspect-FKTVm7nv.js} +1 -1
  56. package/dist/{text-on-path-QInco4aP.js → text-on-path-CpHM02Fs.js} +19 -18
  57. package/dist/tile-url.d.ts +84 -16
  58. package/dist/time-dimension.d.ts +25 -0
  59. package/dist/vector-style-CPvUSy2F.js +518 -0
  60. package/dist/vector-style.d.ts +59 -0
  61. package/dist/version.d.ts +1 -1
  62. package/dist/{zarr-CYD8fyBe.js → zarr-DpbT4eyF.js} +2 -2
  63. package/dist/zoom-gates.d.ts +60 -0
  64. package/docs/cartograph.md +2 -2
  65. package/llms.txt +4 -3
  66. package/onlymapjs.attributes.json +17 -0
  67. package/onlymapjs.html-data.json +56 -0
  68. package/package.json +5 -2
  69. package/skills/onlymapjs/SKILL.md +10 -3
  70. package/skills/onlymapjs/references/syntax.md +64 -7
  71. package/dist/index-DT5d7kFO.js +0 -459
@@ -1,5 +1,5 @@
1
1
  import type { Effect } from "@deck.gl/core";
2
- import { type Camera, type CameraOptions, type MandatedChromeHosts } from "./runtime-core";
2
+ import { type Camera, type CameraOptions, type LayerErrorDetail, type MandatedChromeHosts } from "./runtime-core";
3
3
  import type { HoverPickMode } from "./hover-pick";
4
4
  import { type LightingIR, type LightingOptions } from "./scene-lighting";
5
5
  import type { TerrainIR } from "./terrain";
@@ -38,6 +38,10 @@ export interface LayerDescriptor {
38
38
  /** Legend metadata (ctx.layers), same as the label/color attributes. */
39
39
  label?: string;
40
40
  color?: string;
41
+ /** `false` keeps the layer out of the legend and layer-switcher widgets (it stays in `ctx.layers`) — mirrors `listed="false"`. */
42
+ listed?: boolean;
43
+ /** Per-feature minimum zoom (public issue #25) — mirrors `min-zoom-field`: a row draws only while the camera zoom is ≥ its value in this field; missing/non-numeric values always draw. */
44
+ minZoomField?: string;
41
45
  /** GPU filter (spec: "Filtering") — mirrors filter-field/filter-range/… (single dimension). */
42
46
  filterField?: string;
43
47
  filterRange?: [number, number];
@@ -63,6 +67,8 @@ export interface LayerDescriptor {
63
67
  flush?: string;
64
68
  /** Polling interval for REST snapshot URLs, e.g. "5s". */
65
69
  refresh?: string;
70
+ /** For a `data` URL filled with the view's extent (`{bbox-crs84}`, `{bbox-epsg-XXXX}`): the most features kept per view (default 10000). */
71
+ maxFeatures?: number;
66
72
  /**
67
73
  * deck.gl updateTriggers, passed through per accessor prop. deck ignores
68
74
  * accessor FUNCTION identity by design — supply a value here that changes
@@ -137,6 +143,8 @@ export interface MapControllerOptions {
137
143
  onMapPoint?: (coordinate: [number, number] | null, kind: "click" | "hover") => void;
138
144
  /** A Tile3DLayer finished loading its root tileset — the `om-tileset-load` DOM event's twin; `tileset` is the live deck `Tileset3D`. */
139
145
  onTilesetLoad?: (layerId: string, tileset: unknown) => void;
146
+ /** A layer's tiles failed, once per cause per layer and template — the `om-layer-error` DOM event's twin. The same failure also reaches `onRuntimeError`. */
147
+ onLayerError?: (layerId: string, failure: LayerErrorDetail) => void;
140
148
  /** A Route layer finished resolving — the `om-route-resolved` DOM event's twin; `route` carries the normalized geometry/distanceMeters/durationSec/legs/bounds. */
141
149
  onRouteResolved?: (layerId: string, route: {
142
150
  geometry?: {
@@ -230,7 +238,13 @@ export declare class MapController {
230
238
  * `origin`, so it must reset on settle even for store-only consumers.
231
239
  */
232
240
  private readonly viewSettle;
241
+ /** Hand the settled view to view-filled feature layers (feature-service.ts). */
242
+ private pushDataView;
233
243
  private onViewChange?;
244
+ private onLayerError?;
245
+ private onRuntimeError?;
246
+ /** View-data findings already reported, so each is reported once while it stands (the om-map twin). */
247
+ private viewDataReported;
234
248
  /** Per-layer data version counters (`data:<id>` snapshots) — bumped on every data change, monotonic for the controller's lifetime. */
235
249
  private readonly dataVersions;
236
250
  private readyFired;
@@ -248,6 +262,12 @@ export declare class MapController {
248
262
  */
249
263
  clusterLeaves(layerId: string, clusterId: number, limit?: number, offset?: number): unknown[];
250
264
  private scheduleCommit;
265
+ /**
266
+ * A view-filled feature layer's failure or cap (feature-service.ts), on
267
+ * the same channels om-map uses — `onLayerError` and `onRuntimeError` —
268
+ * once per finding while it stands.
269
+ */
270
+ private reportViewData;
251
271
  private commit;
252
272
  private checkReady;
253
273
  /** Readiness as a poll (the promise form is `ready`). */
@@ -1,7 +1,7 @@
1
- import { c as se, t as $e, i as Ct, a as ke, s as Lt, C as It, b as Gt, F as vt, A as Et, d as Ft, R as ye, e as At, p as jt, m as Rt, f as Mt, g as We, h as Ut, r as le, j as Ot, k as xt, l as Kt, n as Dt } from "./raster-pipeline-BMS54TX2.js";
1
+ import { c as se, t as $e, i as Ct, a as ke, s as Lt, C as It, b as Gt, F as vt, A as Et, d as Ft, R as ye, e as At, p as jt, m as Rt, f as Mt, g as We, h as Ut, r as le, j as Ot, k as xt, l as Kt, n as Dt } from "./raster-pipeline-avMAbONM.js";
2
2
  import { N as Nt, c as zt } from "./hillshade-apron-Bem3DWyJ.js";
3
- import { r as Bt } from "./hillshade-shader-r7GxxjXj.js";
4
- import { c0 as _t, c1 as $t } from "./index-DWijIMti.js";
3
+ import { r as Bt } from "./hillshade-shader-Bm1O0P76.js";
4
+ import { c9 as _t, ca as $t } from "./index-BG_49YHy.js";
5
5
  import we from "./index-CW1n5LdO.js";
6
6
  function kt(e, t) {
7
7
  const n = e.length / 3, r = new Uint8ClampedArray(n * 4), o = 0, i = n, a = n * 2;
@@ -1072,7 +1072,7 @@ j.set(f.Zstd, () => import("./zstd-jXobGRcq.js").then((e) => e.decode));
1072
1072
  j.set(f.Jpeg, () => Promise.resolve(ce));
1073
1073
  j.set(f.Jpeg6, () => Promise.resolve(ce));
1074
1074
  j.set(f.Webp, () => Promise.resolve(ce));
1075
- j.set(f.Lerc, () => import("./lerc-Bl4vym9y.js").then((e) => e.decode));
1075
+ j.set(f.Lerc, () => import("./lerc-DLWS3sYw.js").then((e) => e.decode));
1076
1076
  async function ue(e, t, n) {
1077
1077
  const r = j.get(t);
1078
1078
  if (!r)
@@ -1,6 +1,6 @@
1
1
  import { w as he } from "./mgrs-BY9bIvp4.js";
2
- import { am as de, bU as fe, bV as re, c as oe, bW as me, G as pe, bX as ge, a_ as Z, bY as ve, N as be, bZ as xe, b_ as Pe, b$ as Te, ac as ie } from "./index-DWijIMti.js";
3
- import { p as ye, a as Le, h as we } from "./hillshade-shader-r7GxxjXj.js";
2
+ import { am as de, c1 as fe, c2 as re, c as oe, c3 as me, G as pe, c4 as ge, b7 as Z, c5 as ve, N as be, c6 as xe, c7 as Pe, c8 as Te, ac as ie } from "./index-BG_49YHy.js";
3
+ import { p as ye, a as Le, h as we } from "./hillshade-shader-Bm1O0P76.js";
4
4
  function Oe(n, e, t) {
5
5
  const { projectedCorners: s } = e, { topLeft: r, topRight: o, bottomRight: i, bottomLeft: a } = s, c = t(r[0], r[1]), u = t(o[0], o[1]), l = t(i[0], i[1]), d = t(a[0], a[1]), f = [
6
6
  c,
@@ -742,7 +742,7 @@ const J = 512, qe = [
742
742
  // right edge
743
743
  [0.5, 1]
744
744
  // bottom edge
745
- ]), E = 6378137, S = 2 * Math.PI * E, K = S / 2, _ = 85.05112877980659;
745
+ ]), E = 6378137, S = 2 * Math.PI * E, K = S / 2, Q = 85.05112877980659;
746
746
  class z {
747
747
  /** Index across a row */
748
748
  x;
@@ -906,7 +906,7 @@ function Ge(n, e) {
906
906
  const [r, o] = n(t, s);
907
907
  if (Number.isFinite(r) && Number.isFinite(o))
908
908
  return [r, o];
909
- const [i, a] = e(t, s), u = Math.max(-_, Math.min(_, a)) * Math.PI / 180, l = i * Math.PI * E / 180, d = Math.log(Math.tan(Math.PI / 4 + u / 2)) * E;
909
+ const [i, a] = e(t, s), u = Math.max(-Q, Math.min(Q, a)) * Math.PI / 180, l = i * Math.PI * E / 180, d = Math.log(Math.tan(Math.PI / 4 + u / 2)) * E;
910
910
  return [l, d];
911
911
  };
912
912
  }
@@ -926,7 +926,7 @@ function Je([n, e]) {
926
926
  ];
927
927
  }
928
928
  const Ke = 100;
929
- function _e(n) {
929
+ function Qe(n) {
930
930
  const { descriptor: e, viewport: t, datasetWgs84Bounds: s } = n, r = e.levels[0], o = [];
931
931
  if (r.matrixWidth * r.matrixHeight <= Ke) {
932
932
  for (let m = 0; m < r.matrixHeight; m++)
@@ -948,7 +948,7 @@ function _e(n) {
948
948
  o.push(new z(p, m, 0, { descriptor: e }));
949
949
  return o;
950
950
  }
951
- function Qe(n, e) {
951
+ function _e(n, e) {
952
952
  const { viewport: t, maxZ: s, zRange: r, wgs84Bounds: o, pixelRatio: i = 1 } = e, a = e.boundingVolumeCache ?? new ce();
953
953
  a.sweep();
954
954
  const c = t instanceof pe && t.resolution ? t.projectPosition : null, u = Object.values(t.getFrustumPlanes()).map(({ normal: O, distance: B }) => new ge(O.clone().negate(), B)), l = new ve(u), d = t.distanceScales.unitsPerMeter[2], f = r && r[0] * d || 0, h = r && r[1] * d || 0, m = 0, [p, g, P, b] = o, x = Z([p, g]), v = Z([P, b]), T = [
@@ -956,7 +956,7 @@ function Qe(n, e) {
956
956
  x[1],
957
957
  v[0],
958
958
  v[1]
959
- ], w = _e({
959
+ ], w = Qe({
960
960
  descriptor: n,
961
961
  viewport: t,
962
962
  datasetWgs84Bounds: o
@@ -1062,7 +1062,7 @@ class ot extends Te {
1062
1062
  const { viewport: t, minZoom: s } = e;
1063
1063
  if (typeof s == "number" && t.zoom < s)
1064
1064
  return [];
1065
- const r = this.descriptor.levels.length - 1, o = typeof e.maxZoom == "number" ? Math.min(e.maxZoom, r) : r, i = Qe(this.descriptor, {
1065
+ const r = this.descriptor.levels.length - 1, o = typeof e.maxZoom == "number" ? Math.min(e.maxZoom, r) : r, i = _e(this.descriptor, {
1066
1066
  viewport: t,
1067
1067
  maxZ: o,
1068
1068
  zRange: e.zRange ?? null,
@@ -1142,7 +1142,7 @@ class ot extends Te {
1142
1142
  };
1143
1143
  }
1144
1144
  }
1145
- const N = 512, it = 40075016686e-3, Q = N / it, at = {
1145
+ const N = 512, it = 40075016686e-3, _ = N / it, at = {
1146
1146
  ...ie.defaultProps,
1147
1147
  maxError: 0.125,
1148
1148
  debug: !1,
@@ -1275,12 +1275,12 @@ class St extends oe {
1275
1275
  coordinateOrigin: [N / 2, N / 2, 0],
1276
1276
  // biome-ignore format: array
1277
1277
  modelMatrix: [
1278
- Q,
1278
+ _,
1279
1279
  0,
1280
1280
  0,
1281
1281
  0,
1282
1282
  0,
1283
- Q,
1283
+ _,
1284
1284
  0,
1285
1285
  0,
1286
1286
  0,
@@ -14,6 +14,10 @@ export interface OmLayerProps {
14
14
  /** Legend metadata (ctx.layers). */
15
15
  label?: string;
16
16
  color?: string;
17
+ /** `false` keeps the layer out of the legend and layer-switcher widgets — mirrors `listed="false"`. */
18
+ listed?: boolean;
19
+ /** Per-feature minimum zoom — mirrors `min-zoom-field`: a row draws only while zoom ≥ its value in this field. */
20
+ minZoomField?: string;
17
21
  /** GPU filter (DataFilterExtension) — mirrors filter-field/filter-range (single dimension). */
18
22
  filterField?: string;
19
23
  filterRange?: [number, number];
package/dist/react.js CHANGED
@@ -3,10 +3,10 @@ var Ie = (r, e, s) => e in r ? Be(r, e, { enumerable: !0, configurable: !0, writ
3
3
  var be = (r, e, s) => Ie(r, typeof e != "symbol" ? e + "" : e, s);
4
4
  import { jsxs as se, jsx as E } from "react/jsx-runtime";
5
5
  import { createContext as Ke, useContext as We, forwardRef as He, useRef as g, useState as x, useId as Oe, useCallback as ie, useMemo as D, useLayoutEffect as he, useEffect as w, useImperativeHandle as Ne, useSyncExternalStore as we } from "react";
6
- import { MANAGED_SLOTS as Ve, slotContainerStyle as qe, FOLD_SIDES as N, MapController as Ge, parseWidgetStyle as Je, foldToggleSlot as Ye, foldToggleStyle as Xe, foldPanelStyle as Ze, foldDrawerStyle as Ue, resolveFoldBreakpointPx as Qe, shouldFoldAtWidth as et, effectiveFoldBreakpointPx as tt, DEFAULT_FOLD_BREAKPOINT_PX as rt, bottomEndLiftPx as nt, FOLD_BOTTOM_CLEARANCE_PX as ot, resolveSlot as st, foldSideForSlot as it, isStoreToken as at } from "@nika-js/onlymap";
6
+ import { MANAGED_SLOTS as Ve, slotContainerStyle as qe, FOLD_SIDES as N, MapController as Ze, parseWidgetStyle as Ge, foldToggleSlot as Je, foldToggleStyle as Ye, foldPanelStyle as Xe, foldDrawerStyle as Ue, resolveFoldBreakpointPx as Qe, shouldFoldAtWidth as et, effectiveFoldBreakpointPx as tt, DEFAULT_FOLD_BREAKPOINT_PX as rt, bottomEndLiftPx as nt, FOLD_BOTTOM_CLEARANCE_PX as ot, resolveSlot as st, foldSideForSlot as it, isStoreToken as at } from "@nika-js/onlymap";
7
7
  import { createPortal as Re } from "react-dom";
8
8
  const Ee = Ke(null);
9
- function Z(r) {
9
+ function X(r) {
10
10
  const e = We(Ee);
11
11
  if (!e) throw new Error(`[onlymapjs] ${r} must be rendered inside <OmMap>.`);
12
12
  return e;
@@ -17,8 +17,8 @@ function ae(r, e) {
17
17
  return s.length !== o.length ? !1 : s.every((i) => r[i] === e[i]);
18
18
  }
19
19
  function ct(r, e) {
20
- const { props: s, updateTriggers: o, ...i } = r, { props: b, updateTriggers: p, ...d } = e;
21
- return ae(i, d) && ae(s, b) && ae(o, p);
20
+ const { props: s, updateTriggers: o, ...i } = r, { props: b, updateTriggers: m, ...d } = e;
21
+ return ae(i, d) && ae(s, b) && ae(o, m);
22
22
  }
23
23
  class lt {
24
24
  constructor(e) {
@@ -33,19 +33,19 @@ class lt {
33
33
  this.descriptors.delete(e) && this.controller.setLayers([...this.descriptors.values()]);
34
34
  }
35
35
  }
36
- const X = Ve, ut = Object.fromEntries(X.map((r) => [r, qe(r)])), ve = { display: "flex", pointerEvents: "none", order: 2147483647 }, dt = Object.fromEntries(N.map((r) => [r, null]));
36
+ const Y = Ve, ut = Object.fromEntries(Y.map((r) => [r, qe(r)])), ve = { display: "flex", pointerEvents: "none", order: 2147483647 }, dt = Object.fromEntries(N.map((r) => [r, null]));
37
37
  function ft(r) {
38
38
  const e = r.querySelector(
39
39
  'button:not([disabled]),a[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])'
40
40
  );
41
41
  e ? e.focus() : (r.tabIndex = -1, r.focus());
42
42
  }
43
- function pt(r, e) {
43
+ function mt(r, e) {
44
44
  return Object.entries(e).some(([s, o]) => o !== void 0 && r[s] !== o);
45
45
  }
46
46
  const Rt = He(function(e, s) {
47
- const { center: o, zoom: i, pitch: b, bearing: p, basemap: d, projection: f, crs: h, crsDef: m, basemapKey: $, attribution: P, headless: c, widgetStyle: S, widgetsHidden: v, widgetsFold: O = !0, className: T, style: A, children: z } = e, C = g(null), j = g(null), [l, F] = x(null), [M, K] = x(null), [B, ce] = x(
48
- () => Object.fromEntries(X.map((t) => [t, null]))
47
+ const { center: o, zoom: i, pitch: b, bearing: m, basemap: d, projection: f, crs: h, crsDef: p, basemapKey: $, attribution: P, headless: c, widgetStyle: S, widgetsHidden: v, widgetsFold: O = !0, className: T, style: A, children: z } = e, C = g(null), j = g(null), [l, F] = x(null), [M, K] = x(null), [B, ce] = x(
48
+ () => Object.fromEntries(Y.map((t) => [t, null]))
49
49
  ), [L, Ce] = x(!1), [V, Fe] = x({ lift: 0, shift: 0 }), [le, xe] = x(dt), [Te, je] = x(
50
50
  () => Object.fromEntries(N.map((t) => [t, 0]))
51
51
  ), [ke, U] = x(null), ue = `om-react-fold-${Oe().replaceAll(":", "")}`, De = g(new Map(N.map((t) => [t, /* @__PURE__ */ new Set()]))), $e = g(/* @__PURE__ */ new Map()), [de, Me] = x(() => /* @__PURE__ */ new Set()), fe = c ? JSON.stringify(c) : "", q = g({
@@ -55,7 +55,7 @@ const Rt = He(function(e, s) {
55
55
  K((n) => n === t ? n : t);
56
56
  }, []), _e = D(
57
57
  () => Object.fromEntries(
58
- X.map((t) => [
58
+ Y.map((t) => [
59
59
  t,
60
60
  (n) => {
61
61
  ce((a) => a[t] === n ? a : { ...a, [t]: n });
@@ -73,10 +73,10 @@ const Rt = He(function(e, s) {
73
73
  ])
74
74
  ),
75
75
  []
76
- ), pe = ie((t, n, a) => {
76
+ ), me = ie((t, n, a) => {
77
77
  const u = De.current.get(t), y = u.size;
78
78
  a ? u.add(n) : u.delete(n), u.size !== y && je((R) => ({ ...R, [t]: u.size }));
79
- }, []), me = ie((t, n, a) => {
79
+ }, []), pe = ie((t, n, a) => {
80
80
  const u = $e.current;
81
81
  a ? u.set(n, t) : u.delete(n);
82
82
  const y = new Set(u.values());
@@ -96,26 +96,26 @@ const Rt = He(function(e, s) {
96
96
  }, [O, fe, de]), w(() => {
97
97
  (!L || v) && U(null);
98
98
  }, [L, v]);
99
- const ye = g({ center: o, zoom: i, pitch: b, bearing: p });
100
- ye.current = { center: o, zoom: i, pitch: b, bearing: p };
101
- const G = g(e.onReady);
102
- G.current = e.onReady;
99
+ const ye = g({ center: o, zoom: i, pitch: b, bearing: m });
100
+ ye.current = { center: o, zoom: i, pitch: b, bearing: m };
101
+ const Z = g(e.onReady);
102
+ Z.current = e.onReady;
103
103
  const _ = g(e.onViewStateChange);
104
104
  _.current = e.onViewStateChange;
105
- const J = g(e.onRuntimeError);
106
- J.current = e.onRuntimeError;
105
+ const G = g(e.onRuntimeError);
106
+ G.current = e.onRuntimeError;
107
107
  const Q = g(d);
108
108
  Q.current = d;
109
109
  const ee = g(f);
110
110
  ee.current = f;
111
- const W = g({ crs: h, crsDef: m });
112
- W.current = { crs: h, crsDef: m };
111
+ const W = g({ crs: h, crsDef: p });
112
+ W.current = { crs: h, crsDef: p };
113
113
  const te = g(""), re = g(void 0), ne = g(void 0);
114
114
  he(() => {
115
115
  if (!j.current) return;
116
116
  const t = ye.current;
117
117
  ne.current = Q.current, re.current = ee.current, te.current = `${W.current.crs ?? ""}|${W.current.crsDef ?? ""}`;
118
- const n = new Ge(j.current, {
118
+ const n = new Ze(j.current, {
119
119
  center: t.center,
120
120
  zoom: t.zoom,
121
121
  pitch: t.pitch,
@@ -133,14 +133,14 @@ const Rt = He(function(e, s) {
133
133
  },
134
134
  onRuntimeError: (u) => {
135
135
  var y;
136
- return (y = J.current) == null ? void 0 : y.call(J, u);
136
+ return (y = G.current) == null ? void 0 : y.call(G, u);
137
137
  }
138
138
  });
139
139
  F(n);
140
140
  let a = !0;
141
141
  return n.ready.then(() => {
142
142
  var u;
143
- a && ((u = G.current) == null || u.call(G));
143
+ a && ((u = Z.current) == null || u.call(Z));
144
144
  }), () => {
145
145
  a = !1, F(null), n.destroy();
146
146
  };
@@ -149,13 +149,13 @@ const Rt = He(function(e, s) {
149
149
  }, [l, d]), w(() => {
150
150
  !l || re.current === f || (re.current = f, l.setProjection(f ?? null));
151
151
  }, [l, f]), w(() => {
152
- const t = `${h ?? ""}|${m ?? ""}`;
153
- !l || te.current === t || (te.current = t, l.setCrs(h ?? null, m ?? null));
154
- }, [l, h, m]), Ne(s, () => l, [l]), w(() => {
152
+ const t = `${h ?? ""}|${p ?? ""}`;
153
+ !l || te.current === t || (te.current = t, l.setCrs(h ?? null, p ?? null));
154
+ }, [l, h, p]), Ne(s, () => l, [l]), w(() => {
155
155
  if (!l) return;
156
- const t = { longitude: o == null ? void 0 : o[0], latitude: o == null ? void 0 : o[1], zoom: i, pitch: b, bearing: p };
157
- pt(l.getViewState(), t) && l.setView(t);
158
- }, [l, o == null ? void 0 : o[0], o == null ? void 0 : o[1], i, b, p]), w(() => {
156
+ const t = { longitude: o == null ? void 0 : o[0], latitude: o == null ? void 0 : o[1], zoom: i, pitch: b, bearing: m };
157
+ mt(l.getViewState(), t) && l.setView(t);
158
+ }, [l, o == null ? void 0 : o[0], o == null ? void 0 : o[1], i, b, m]), w(() => {
159
159
  var t;
160
160
  if (l)
161
161
  return (t = _.current) == null || t.call(_, l.getViewState()), l.getStore("viewport").subscribe(() => {
@@ -163,12 +163,12 @@ const Rt = He(function(e, s) {
163
163
  return (n = _.current) == null ? void 0 : n.call(_, l.getViewState());
164
164
  });
165
165
  }, [l]);
166
- const I = B["bottom-start"], Y = B["bottom-end"];
166
+ const I = B["bottom-start"], J = B["bottom-end"];
167
167
  w(() => {
168
168
  const t = C.current;
169
- if (!t || !Y || typeof ResizeObserver > "u") return;
169
+ if (!t || !J || typeof ResizeObserver > "u") return;
170
170
  const n = () => {
171
- const u = parseFloat(getComputedStyle(t).getPropertyValue("--om-widget-gap-y")) || 8, y = Y.getBoundingClientRect(), R = nt(
171
+ const u = parseFloat(getComputedStyle(t).getPropertyValue("--om-widget-gap-y")) || 8, y = J.getBoundingClientRect(), R = nt(
172
172
  (I == null ? void 0 : I.getBoundingClientRect()) ?? null,
173
173
  y,
174
174
  L ? ot : 0,
@@ -176,8 +176,8 @@ const Rt = He(function(e, s) {
176
176
  ), k = R + Math.ceil(y.height) + u;
177
177
  Fe((H) => H.lift === R && H.shift === k ? H : { lift: R, shift: k });
178
178
  }, a = new ResizeObserver(n);
179
- return a.observe(t), a.observe(Y), I && a.observe(I), n(), () => a.disconnect();
180
- }, [I, Y, L]);
179
+ return a.observe(t), a.observe(J), I && a.observe(I), n(), () => a.disconnect();
180
+ }, [I, J, L]);
181
181
  const ze = D(
182
182
  () => ({
183
183
  position: "absolute",
@@ -189,12 +189,12 @@ const Rt = He(function(e, s) {
189
189
  // drawer root reads it through foldDrawerStyle's max() (same wiring
190
190
  // as the HTML lane's widget layer).
191
191
  "--om-fold-bottom-shift": `${V.shift}px`,
192
- ...S ? Je(S).properties : void 0
192
+ ...S ? Ge(S).properties : void 0
193
193
  }),
194
194
  [S, V.shift]
195
195
  ), oe = D(() => l ? new lt(l) : null, [l]), ge = D(
196
- () => l && oe && M ? { controller: l, layers: oe, overlayPane: M, corners: B, widgetsHidden: !!v, widgetsFolded: L, foldPanels: le, registerFoldedWidget: pe, registerSlotWidget: me } : null,
197
- [l, oe, M, B, v, L, le, pe, me]
196
+ () => l && oe && M ? { controller: l, layers: oe, overlayPane: M, corners: B, widgetsHidden: !!v, widgetsFolded: L, foldPanels: le, registerFoldedWidget: me, registerSlotWidget: pe } : null,
197
+ [l, oe, M, B, v, L, le, me, pe]
198
198
  );
199
199
  return /* @__PURE__ */ se("div", { ref: C, className: T, style: { position: "relative", overflow: "hidden", ...A }, children: [
200
200
  /* @__PURE__ */ E("div", { ref: j, style: { position: "absolute", inset: 0 } }),
@@ -205,7 +205,7 @@ const Rt = He(function(e, s) {
205
205
  style: { position: "absolute", top: 0, left: 0, zIndex: 10, pointerEvents: "none" }
206
206
  }
207
207
  ),
208
- /* @__PURE__ */ E("div", { "data-om-widget-layer": "", style: ze, children: X.map((t) => /* @__PURE__ */ se(
208
+ /* @__PURE__ */ E("div", { "data-om-widget-layer": "", style: ze, children: Y.map((t) => /* @__PURE__ */ se(
209
209
  "div",
210
210
  {
211
211
  "data-om-widget-slot": t,
@@ -215,7 +215,7 @@ const Rt = He(function(e, s) {
215
215
  ...V.lift > 0 && t === "bottom-end" ? { bottom: `calc(var(--om-widget-inset-y, 12px) + ${V.lift}px)` } : void 0
216
216
  },
217
217
  children: [
218
- L && N.filter((n) => Ye(n) === t && Te[n] > 0).map((n) => {
218
+ L && N.filter((n) => Je(n) === t && Te[n] > 0).map((n) => {
219
219
  const a = ke === n;
220
220
  return /* @__PURE__ */ se(
221
221
  "div",
@@ -235,7 +235,7 @@ const Rt = He(function(e, s) {
235
235
  "aria-expanded": a,
236
236
  "aria-controls": `${ue}-${n}`,
237
237
  "aria-label": `${a ? "Close" : "Open"} ${n} map controls`,
238
- style: Xe(),
238
+ style: Ye(),
239
239
  onClick: () => {
240
240
  U(a ? null : n), a || requestAnimationFrame(() => {
241
241
  var y;
@@ -255,7 +255,7 @@ const Rt = He(function(e, s) {
255
255
  role: "region",
256
256
  "aria-label": `${n} map controls`,
257
257
  hidden: !a,
258
- style: { ...Ze(n), display: a ? "flex" : "none" }
258
+ style: { ...Xe(n), display: a ? "flex" : "none" }
259
259
  }
260
260
  )
261
261
  ]
@@ -295,6 +295,8 @@ const Rt = He(function(e, s) {
295
295
  data: "data",
296
296
  label: "label",
297
297
  color: "color",
298
+ listed: "listed",
299
+ minZoomField: "minZoomField",
298
300
  filterField: "filterField",
299
301
  filterRange: "filterRange",
300
302
  filterSoftRange: "filterSoftRange",
@@ -317,47 +319,47 @@ const Rt = He(function(e, s) {
317
319
  crs: "crs",
318
320
  crsDef: "crsDef",
319
321
  updateTriggers: "updateTriggers"
320
- }, mt = /* @__PURE__ */ new Set([...Object.keys(Pe), "onClick", "onHover"]);
322
+ }, pt = /* @__PURE__ */ new Set([...Object.keys(Pe), "onClick", "onHover"]);
321
323
  function yt(r) {
322
324
  const e = {};
323
325
  for (const [o, i] of Object.entries(r))
324
- !mt.has(o) && i !== void 0 && (e[o] = i);
326
+ !pt.has(o) && i !== void 0 && (e[o] = i);
325
327
  const s = {};
326
328
  for (const [o, i] of Object.entries(Pe))
327
329
  s[i] = r[o];
328
330
  return Object.keys(e).length > 0 && (s.props = e), s;
329
331
  }
330
332
  function Et(r) {
331
- const { controller: e, layers: s } = Z("OmLayer"), { id: o } = r, i = yt(r);
333
+ const { controller: e, layers: s } = X("OmLayer"), { id: o } = r, i = yt(r);
332
334
  w(() => {
333
335
  s.upsert(i);
334
336
  }), w(() => () => s.remove(o), [s, o]);
335
337
  const b = g(r.onClick);
336
338
  b.current = r.onClick;
337
- const p = g(r.onHover);
338
- return p.current = r.onHover, w(
339
+ const m = g(r.onHover);
340
+ return m.current = r.onHover, w(
339
341
  () => e.watchPicks((d) => {
340
- var f, h, m;
342
+ var f, h, p;
341
343
  if (d === null) {
342
- (f = p.current) == null || f.call(p, null);
344
+ (f = m.current) == null || f.call(m, null);
343
345
  return;
344
346
  }
345
- d.layerId === o && (d.type === "click" ? (h = b.current) == null || h.call(b, d) : (m = p.current) == null || m.call(p, d));
347
+ d.layerId === o && (d.type === "click" ? (h = b.current) == null || h.call(b, d) : (p = m.current) == null || p.call(m, d));
346
348
  }),
347
349
  [e, o]
348
350
  ), null;
349
351
  }
350
352
  function Pt({ position: r = "top-start", order: e, fold: s, className: o, style: i, children: b }) {
351
- const { corners: p, widgetsHidden: d, widgetsFolded: f, foldPanels: h, registerFoldedWidget: m, registerSlotWidget: $ } = Z("OmWidget"), P = Oe(), c = st(r) ?? "top-start", S = f && c !== "manual" && s !== "never", v = c === "manual" ? null : it(c);
353
+ const { corners: m, widgetsHidden: d, widgetsFolded: f, foldPanels: h, registerFoldedWidget: p, registerSlotWidget: $ } = X("OmWidget"), P = Oe(), c = st(r) ?? "top-start", S = f && c !== "manual" && s !== "never", v = c === "manual" ? null : it(c);
352
354
  if (w(() => {
353
355
  if (v)
354
- return m(v, P, S), () => m(v, P, !1);
355
- }, [v, P, S, m]), w(() => {
356
+ return p(v, P, S), () => p(v, P, !1);
357
+ }, [v, P, S, p]), w(() => {
356
358
  if (c !== "manual")
357
359
  return $(c, P, !0), () => $(c, P, !1);
358
360
  }, [c, P, $]), c === "manual")
359
361
  return /* @__PURE__ */ E("div", { className: o, style: { pointerEvents: "auto", ...i }, children: b });
360
- const O = S && v ? h[v] : p[c];
362
+ const O = S && v ? h[v] : m[c];
361
363
  return O ? Re(
362
364
  /* @__PURE__ */ E(
363
365
  "div",
@@ -395,9 +397,9 @@ const bt = {
395
397
  "bottom-right": "translate(-100%, -100%)"
396
398
  };
397
399
  function Ct(r) {
398
- const { controller: e, overlayPane: s } = Z("OmOverlay"), o = g(null), i = g(void 0), b = g(r);
400
+ const { controller: e, overlayPane: s } = X("OmOverlay"), o = g(null), i = g(void 0), b = g(r);
399
401
  b.current = r;
400
- const p = D(() => {
402
+ const m = D(() => {
401
403
  const c = e.getStore("selection");
402
404
  let S, v, O = null;
403
405
  return {
@@ -408,9 +410,9 @@ function Ct(r) {
408
410
  }
409
411
  };
410
412
  }, [e]), d = we(
411
- p.subscribe,
412
- p.getSnapshot,
413
- p.getSnapshot
413
+ m.subscribe,
414
+ m.getSnapshot,
415
+ m.getSnapshot
414
416
  );
415
417
  w(
416
418
  () => e.registerOverlay((c, S, v) => {
@@ -433,7 +435,7 @@ function Ct(r) {
433
435
  ), w(() => {
434
436
  e.refreshOverlays();
435
437
  });
436
- const { children: f, className: h, style: m, interactive: $ = !0 } = r, P = typeof f == "function" ? f(d) : f;
438
+ const { children: f, className: h, style: p, interactive: $ = !0 } = r, P = typeof f == "function" ? f(d) : f;
437
439
  return Re(
438
440
  /* @__PURE__ */ E(
439
441
  "div",
@@ -448,7 +450,7 @@ function Ct(r) {
448
450
  // hidden until the first flush positions it — never flashes at the origin
449
451
  willChange: "transform",
450
452
  pointerEvents: $ ? "auto" : "none",
451
- ...m
453
+ ...p
452
454
  },
453
455
  children: P
454
456
  }
@@ -457,19 +459,19 @@ function Ct(r) {
457
459
  );
458
460
  }
459
461
  function Ft(r = []) {
460
- const { controller: e } = Z("useOmMap"), s = r.join(" "), o = D(() => {
461
- const p = (s ? s.split(" ") : []).flatMap((f) => at(f) ? [e.getStore(f)] : (console.warn(`[onlymapjs] useOmMap: "${f}" is not a watch token on the React front-end — expected viewport, selection, layers, or data:<layerId>.`), []));
462
+ const { controller: e } = X("useOmMap"), s = r.join(" "), o = D(() => {
463
+ const m = (s ? s.split(" ") : []).flatMap((f) => at(f) ? [e.getStore(f)] : (console.warn(`[onlymapjs] useOmMap: "${f}" is not a watch token on the React front-end — expected viewport, selection, layers, or data:<layerId>.`), []));
462
464
  let d;
463
465
  return {
464
466
  subscribe: (f) => {
465
- const h = p.map((m) => m.subscribe(f));
467
+ const h = m.map((p) => p.subscribe(f));
466
468
  return () => {
467
- for (const m of h) m();
469
+ for (const p of h) p();
468
470
  };
469
471
  },
470
472
  getSnapshot: () => {
471
- const f = p.map((h) => h.getSnapshot());
472
- return (!d || f.some((h, m) => h !== d[m])) && (d = f), d;
473
+ const f = m.map((h) => h.getSnapshot());
474
+ return (!d || f.some((h, p) => h !== d[p])) && (d = f), d;
473
475
  }
474
476
  };
475
477
  }, [e, s]), i = we(o.subscribe, o.getSnapshot, o.getSnapshot);