@nika-js/onlymap 0.11.3 → 0.11.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 (41) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +2 -2
  3. package/dist/{basemap-C6Ehu6fw.js → basemap-CnjAGLZo.js} +14 -2
  4. package/dist/basemap.d.ts +9 -0
  5. package/dist/cartograph.js +231 -229
  6. package/dist/cartograph.standalone.js +361 -359
  7. package/dist/elements/om-map.d.ts +31 -1
  8. package/dist/elements/om-overlay.d.ts +0 -14
  9. package/dist/{geoparquet-3V4KrvQN.js → geoparquet-CHtunmD2.js} +1 -1
  10. package/dist/{globe-view-D4Tlyff-.js → globe-view-CgQa-07O.js} +1 -1
  11. package/dist/{hillshade-BC8QiJRP.js → hillshade-BgXgVdjg.js} +1 -1
  12. package/dist/{index-pu3BNjzA.js → index-BTTCf4nb.js} +5488 -5305
  13. package/dist/{index-BUE-VzWx.js → index-BTsRqhXB.js} +1 -1
  14. package/dist/{index-p5XXAoNa.js → index-ClLMdW3k.js} +2 -2
  15. package/dist/{index-BPCIxI1b.js → index-D4x57ql0.js} +1 -1
  16. package/dist/{index-iwTA46AA.js → index-DjtM8ecq.js} +1 -1
  17. package/dist/{index-C1f14saD.js → index-DoNtp5Nh.js} +3 -3
  18. package/dist/{index-DpUl6z5-.js → index-NCXX8bDe.js} +1 -1
  19. package/dist/{index-BqFwoWp9.js → index-aOe9cOFs.js} +1 -1
  20. package/dist/{index-DgutJ5y2.js → index-k7l7kqTk.js} +3 -3
  21. package/dist/index.d.ts +1 -1
  22. package/dist/{lerc-DWtJKNQk.js → lerc-BtdiMDO7.js} +1 -1
  23. package/dist/onlymap.standalone.js +13650 -13455
  24. package/dist/onlymapjs.js +1 -1
  25. package/dist/{post-process-effect-mQdMaWQE.js → post-process-effect-BWrq5IR8.js} +1 -1
  26. package/dist/programmatic.d.ts +10 -1
  27. package/dist/{raster-DtUDOXfy.js → raster-iGwPuAgo.js} +3 -3
  28. package/dist/{raster-pipeline-hQh5cG3e.js → raster-pipeline-Dxs9TpD6.js} +1 -1
  29. package/dist/react.js +128 -125
  30. package/dist/runtime-core.d.ts +50 -1
  31. package/dist/selection.d.ts +31 -0
  32. package/dist/{text-on-path-CcfoZqXD.js → text-on-path-C8h_3Snf.js} +1 -1
  33. package/dist/version.d.ts +1 -1
  34. package/dist/viewport-cull.d.ts +15 -0
  35. package/dist/{zarr-Qo4A_t7d.js → zarr-C1zXD9VD.js} +2 -2
  36. package/docs/cartograph.md +8 -3
  37. package/llms.txt +3 -2
  38. package/onlymapjs.html-data.json +4 -0
  39. package/package.json +1 -1
  40. package/skills/onlymapjs/SKILL.md +3 -2
  41. package/skills/onlymapjs/references/syntax.md +5 -3
@@ -8,7 +8,7 @@ import { type WidgetSlot } from "../widget-layout";
8
8
  import { type SnapshotOptions } from "../snapshot";
9
9
  import { type ValidationEntry } from "../validation";
10
10
  import type { LayerIR } from "../ir";
11
- import type { Selection } from "../selection";
11
+ import type { PickAtOptions, PickMode, PickRect, PickRectOptions, Selection } from "../selection";
12
12
  import type { MapViewport } from "../basemap";
13
13
  interface OverlayHost {
14
14
  updatePosition(viewport: MapViewport | undefined, selection: Selection | null, pickType?: "hover" | "click"): void;
@@ -387,6 +387,36 @@ export declare class OmMapElement extends HTMLElementBase {
387
387
  snapshot(opts?: SnapshotOptions): Promise<string | Blob>;
388
388
  /** terrain* attributes → IR, key-substituted like basemap presets; resolution problems log once per apply. */
389
389
  private resolveTerrainAttr;
390
+ private pickModeValue;
391
+ /**
392
+ * `"all"` makes every layer pickable while set — for a picker tool that has
393
+ * to answer for layers the author never made `pickable`. Every pick path
394
+ * sees it, hover and click and `pick-cursor` included, not only the query
395
+ * methods. A property, never an attribute: it is not serialised, never
396
+ * enters undo history, and a headless map ignores it. Restore `"authored"`
397
+ * when the tool disarms.
398
+ */
399
+ get pickMode(): PickMode;
400
+ set pickMode(mode: PickMode);
401
+ /**
402
+ * The object or feature under a screen pixel (CSS px from the map's
403
+ * top-left), or null. A QUERY: it does not change `ctx.selection`, fire
404
+ * `om-map-point`, run behaviors, or open a tooltip. Searches 4px around the
405
+ * point by default; layers that are not `pickable` answer only while
406
+ * `pickMode` is `"all"`. `coordinate` is lng/lat on every map.
407
+ */
408
+ pickAt(pixel: [number, number], options?: PickAtOptions): Selection | null;
409
+ /**
410
+ * Every object inside a screen rectangle, front to back, at most
411
+ * `maxObjects` (default 100). A query, like `pickAt`. Each result's
412
+ * `coordinate` is null — deck reports no per-object position for a
413
+ * rectangle — and raster layers are not sampled.
414
+ */
415
+ pickRect(rect: PickRect, options?: PickRectOptions): Selection[];
416
+ /** Screen pixel → `[lng, lat]` on the ground plane, or null before the map has a viewport. */
417
+ unproject(pixel: [number, number]): [number, number] | null;
418
+ /** `[lng, lat]` → screen pixel (CSS px from the map's top-left), or null before the map has a viewport. */
419
+ project(lngLat: [number, number]): [number, number] | null;
390
420
  /** Projects a lng/lat through the current viewport (harness pixel derivation) — undefined before the viewport resolves. */
391
421
  projectInternal(lngLat: [number, number]): [number, number] | undefined;
392
422
  /** Renderer finished async init — defer to the first reconcile if it hasn't run yet (see the field comment). */
@@ -1,17 +1,3 @@
1
- /**
2
- * <om-overlay> — sparse, rich geo-anchored HTML (spec: "Module Breakdown /
3
- * Overlay Renderer", "Overlay System — Three-Way Split"). Rendered in
4
- * shadow DOM for style isolation, same as <om-widget>. Inline-only by
5
- * design — no `type` resolution, no `registerOverlay` (see spec's own
6
- * rationale: a `<template>` shared across maps, or the future React
7
- * component, already serve reuse).
8
- *
9
- * Positioning is centrally rAF-batched by OmMapElement (one flush handles
10
- * every registered overlay's `viewport.project()` + DOM write per frame,
11
- * "coalescing multiple events per frame into one DOM pass") — this class
12
- * never schedules its own rAF, just exposes `updatePosition()` for the map
13
- * to call.
14
- */
15
1
  import { HTMLElementBase } from "../env";
16
2
  import type { MapViewport } from "../basemap";
17
3
  import type { Selection } from "../selection";
@@ -1,4 +1,4 @@
1
- import { a4 as p, a5 as d } from "./index-pu3BNjzA.js";
1
+ import { a4 as p, a5 as d } from "./index-BTTCf4nb.js";
2
2
  function g(t) {
3
3
  if (t == null) return !0;
4
4
  const e = t, n = e.id?.code;
@@ -1,4 +1,4 @@
1
- import { d as L, j as x, a6 as A, a7 as E, a8 as d, a9 as h, aa as u, ab as z, p as V, W as Z, G as D } from "./index-pu3BNjzA.js";
1
+ import { d as L, j as x, a6 as A, a7 as E, a8 as d, a9 as h, aa as u, ab as z, p as V, W as Z, G as D } from "./index-BTTCf4nb.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-pu3BNjzA.js";
1
+ import { al as P, am as T, an as N, ao as Z, c as B, ap as E, aq as C, ar as b, as as D, at as I, au as O } from "./index-BTTCf4nb.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) {