@nika-js/onlymap 0.6.25 → 0.6.26
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 +9 -0
- package/README.md +3 -1
- package/dist/{LercDecode.es-DNwkPiJw.js → LercDecode.es-B4KknLMs.js} +1 -1
- package/dist/{basemap-Da9yotkI.js → basemap-C4bmWq6M.js} +9 -1
- package/dist/basemap.d.ts +4 -0
- package/dist/{geoparquet-D8-txekS.js → geoparquet-BPMda753.js} +1 -1
- package/dist/hover-pick.d.ts +53 -0
- package/dist/html-data.d.ts +1 -1
- package/dist/{index-Z6ZPKbXa.js → index-B5hsHnPl.js} +1 -1
- package/dist/{index-CPf0evzb.js → index-COuIQk2Z.js} +8489 -8387
- package/dist/{index-CUnb2y9k.js → index-DK5w4OxN.js} +1 -1
- package/dist/{index-D6SeYdqX.js → index-DMT_7aV3.js} +1 -1
- package/dist/{index-31e3kTgK.js → index-DtU_XhTX.js} +2 -2
- package/dist/{lerc-CkqppWZk.js → lerc-BNW5A6zN.js} +2 -2
- package/dist/onlymap.standalone.js +14411 -14301
- package/dist/onlymapjs.js +1 -1
- package/dist/programmatic.d.ts +5 -0
- package/dist/{raster-CXPV5d4b.js → raster-eMqzBMQf.js} +2 -2
- package/dist/{raster-pipeline-CKW1mTzH.js → raster-pipeline-Dg-GSDP3.js} +1 -1
- package/dist/runtime-core.d.ts +21 -0
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-9YGMeWT7.js → zarr-Dv7OiUcg.js} +2 -2
- package/llms.txt +2 -1
- package/onlymapjs.html-data.json +33 -0
- package/package.json +4 -2
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,15 @@ Note: npm collapsed a few closely-spaced releases — the GPX/FlatGeobuf (0.5.4)
|
|
|
8
8
|
and GeoParquet (0.5.5) work shipped to npm together as **0.5.6**, so npm's
|
|
9
9
|
version list jumps 0.5.3 → 0.5.6. Each logical version is listed here regardless.
|
|
10
10
|
|
|
11
|
+
## 0.6.26 — 2026-09-02
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **Hovering an interactive feature now shows a pointer cursor.** The cheapest "this map is clickable" signal there is — recipients of a shared map no longer have to click at random to discover popups. `pick-cursor` on `<om-map>` customizes the cursor; `pick-cursor="none"` turns it off. (#33)
|
|
15
|
+
- **A runtime popup switch per layer.** The new `set-pickable` action (`{layer, pickable: true|false|"3d"}`) turns a layer's picking — and with it popups, tooltips, and hover behaviors — on or off from a button, behavior, or story step. It's undoable and rewinds on story scrub like every scene action. (#31)
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Hover no longer stalls the map on modest hardware.** Hovering over layers used to run a GPU hit-test on every mouse move — measured at over a second of freeze per move on integrated graphics with real data. Hover now tests once when the pointer comes to rest instead of continuously while it sweeps, which makes hover popups usable on the machines shared maps are actually opened on. Hover-follow UIs that want the old per-move behavior can opt back in with `hover-pick="continuous"` (or a throttle interval like `hover-pick="120"`); clicking is unaffected. (#31)
|
|
19
|
+
|
|
11
20
|
## 0.6.25 — 2026-09-02
|
|
12
21
|
|
|
13
22
|
### Fixed
|
package/README.md
CHANGED
|
@@ -139,7 +139,9 @@ Private endpoints: `OmMap.configureData({ headers, credentials, fetch })` — ap
|
|
|
139
139
|
|
|
140
140
|
### Interaction
|
|
141
141
|
|
|
142
|
-
Built-in actions wire to picks, widget buttons (`data-emit`), or script (`ctx.emit`) with one shared payload contract: `show-overlay`, `hide-overlay`, `show-tooltip`, `hide-tooltip`, `toggle-layer`, `highlight-feature`, `zoom-to-feature`, `filter-layer`, `set-basemap`, `zoom-in`, `zoom-out`, `undo`, `redo` — plus `OmMap.registerAction` for your own.
|
|
142
|
+
Built-in actions wire to picks, widget buttons (`data-emit`), or script (`ctx.emit`) with one shared payload contract: `show-overlay`, `hide-overlay`, `show-tooltip`, `hide-tooltip`, `toggle-layer`, `set-pickable` (a runtime popups-on/off switch per layer), `highlight-feature`, `zoom-to-feature`, `filter-layer`, `set-basemap`, `zoom-in`, `zoom-out`, `undo`, `redo` — plus `OmMap.registerAction` for your own.
|
|
143
|
+
|
|
144
|
+
Hovering a pickable feature shows a pointer cursor automatically, so recipients can tell a map is interactive without clicking at random (`pick-cursor` on `<om-map>` customizes or disables it). Hover GPU picking is rest-debounced by default — one pick when the pointer stops instead of one per mouse move — which keeps hover popups smooth even on integrated graphics; `hover-pick="continuous|off|<ms>"` tunes it.
|
|
143
145
|
|
|
144
146
|
**Undo/redo:** user-facing manifest changes — layer toggles, filter changes, basemap switches, element edits, drawn sketches — are undoable out of the box; the manifest *is* the state, so history is recorded from the DOM itself. Add `<om-widget type="undo-redo">` for buttons, or just press Cmd/Ctrl-Z (Shift-Cmd/Ctrl-Z or Ctrl-Y to redo). Camera moves, hover effects, and story playback are deliberately not undo steps.
|
|
145
147
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ny, L as sy, M as oy, m as ay, c as ka, a as Sd, z as oc, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-
|
|
1
|
+
import { C as ny, L as sy, M as oy, m as ay, c as ka, a as Sd, z as oc, G as sm, V as ly, W as cy, b as uy, g as hy, d as Vu, f as Ed, e as dy, l as py, u as fy, D as Qf, h as my } from "./index-COuIQk2Z.js";
|
|
2
2
|
const Cd = Math.PI / 180, gy = 180 / Math.PI;
|
|
3
3
|
function em(Pe, J = 0) {
|
|
4
4
|
const me = Math.min(180, Pe) * Cd;
|
|
@@ -25169,6 +25169,14 @@ class Ry {
|
|
|
25169
25169
|
markBusy() {
|
|
25170
25170
|
this.idleLatch = !1;
|
|
25171
25171
|
}
|
|
25172
|
+
/** The overlay's internal Deck instance — the hover-pick gate wraps its pointermove handler (issue #31); same exact-pin `_deck` seam as getDeckLayers below. */
|
|
25173
|
+
getOverlayDeckInternal() {
|
|
25174
|
+
return this.overlay._deck;
|
|
25175
|
+
}
|
|
25176
|
+
/** The MapLibre canvas — the pick-cursor affordance writes its cursor style (issue #33). */
|
|
25177
|
+
getCanvasElement() {
|
|
25178
|
+
return this.map.getCanvas();
|
|
25179
|
+
}
|
|
25172
25180
|
/** The overlay deck's live layers — whenSettled's readiness gate (issue #37). */
|
|
25173
25181
|
getDeckLayers() {
|
|
25174
25182
|
return this.overlay._deck?.getLayers?.();
|
package/dist/basemap.d.ts
CHANGED
|
@@ -67,6 +67,10 @@ export declare class MapLibreBasemapAdapter {
|
|
|
67
67
|
isIdle(): boolean;
|
|
68
68
|
/** Camera writes from OUR side must clear the latch immediately — the map's own movestart fires a tick later, and a settle read in that gap would see stale idle. */
|
|
69
69
|
private markBusy;
|
|
70
|
+
/** The overlay's internal Deck instance — the hover-pick gate wraps its pointermove handler (issue #31); same exact-pin `_deck` seam as getDeckLayers below. */
|
|
71
|
+
getOverlayDeckInternal(): unknown;
|
|
72
|
+
/** The MapLibre canvas — the pick-cursor affordance writes its cursor style (issue #33). */
|
|
73
|
+
getCanvasElement(): HTMLElement;
|
|
70
74
|
/** The overlay deck's live layers — whenSettled's readiness gate (issue #37). */
|
|
71
75
|
getDeckLayers(): {
|
|
72
76
|
isLoaded: boolean;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hover-pick gating (public issue #31). deck.gl picks the scene on EVERY
|
|
3
|
+
* animation frame that saw a pointer move — a full render to the picking
|
|
4
|
+
* framebuffer plus a GPU→CPU ReadPixels round-trip. On integrated graphics
|
|
5
|
+
* with real layers that measured ~1,145ms of main-thread stall per mouse
|
|
6
|
+
* move (850× the pickable="false" baseline), making any map with popups
|
|
7
|
+
* unusable on exactly the hardware map RECIPIENTS have.
|
|
8
|
+
*
|
|
9
|
+
* deck exposes no cadence knob, but `deck._onPointerMove` is an assignable
|
|
10
|
+
* instance property and the deck dependency is an EXACT pin (the
|
|
11
|
+
* `overlay._deck` / `_cacheBytes` seam precedent) — so the gate wraps it:
|
|
12
|
+
*
|
|
13
|
+
* - `rest` (the default): pointer moves are held until the pointer RESTS
|
|
14
|
+
* (restMs without further movement), then the LAST move is forwarded —
|
|
15
|
+
* one pick per rest instead of one per frame. Fast sweeps across the map
|
|
16
|
+
* cost zero picks; stopping on a feature picks once. Hover popups appear
|
|
17
|
+
* on rest, which is when a human is asking "what is this?" anyway.
|
|
18
|
+
* - a NUMBER (ms): leading + trailing throttle — an immediate pick, then at
|
|
19
|
+
* most one per interval while moving, plus the rest pick. For authors who
|
|
20
|
+
* want livelier hover-follow at a bounded cost.
|
|
21
|
+
* - `continuous`: deck's native behavior, unwrapped cadence.
|
|
22
|
+
* - `off`: hover picking disabled entirely (click picking is a separate
|
|
23
|
+
* deck path and is unaffected).
|
|
24
|
+
*
|
|
25
|
+
* Always forwarded regardless of policy: `pointerleave` (clears hover
|
|
26
|
+
* state) and button-down moves (deck's own drag handling early-returns on
|
|
27
|
+
* those, and gizmo drags depend on the stream).
|
|
28
|
+
*
|
|
29
|
+
* Pure and dependency-injected (timers/clock) so the policy is unit-testable
|
|
30
|
+
* without deck or a DOM.
|
|
31
|
+
*/
|
|
32
|
+
export type HoverPickMode = "rest" | "continuous" | "off" | number;
|
|
33
|
+
export interface HoverGateTimers {
|
|
34
|
+
set(fn: () => void, ms: number): unknown;
|
|
35
|
+
clear(handle: unknown): void;
|
|
36
|
+
now(): number;
|
|
37
|
+
}
|
|
38
|
+
/** How long the pointer must sit still before the rest pick fires. One-ish frame of stillness reads as "stopped" without feeling laggy. */
|
|
39
|
+
export declare const HOVER_REST_MS = 32;
|
|
40
|
+
interface PointerMoveLike {
|
|
41
|
+
type?: string;
|
|
42
|
+
leftButton?: boolean;
|
|
43
|
+
rightButton?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Wraps a deck-shaped `_onPointerMove` with the gating policy. `policy` is a
|
|
47
|
+
* GETTER so an attribute edit applies to the very next move with no
|
|
48
|
+
* re-wrapping; `forward` is deck's original handler.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createHoverGate<E extends PointerMoveLike>(forward: (event: E) => void, policy: () => HoverPickMode, timers?: HoverGateTimers): (event: E) => void;
|
|
51
|
+
/** Parses the `hover-pick` attribute (null/absent → the rest default; unknown values warn and fall back). */
|
|
52
|
+
export declare function parseHoverPickMode(raw: string | null, warnLabel: string): HoverPickMode;
|
|
53
|
+
export {};
|
package/dist/html-data.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ interface TagData {
|
|
|
15
15
|
}[];
|
|
16
16
|
}
|
|
17
17
|
/** Hand-authored action list — validated against hasAction() in html-data.test.ts. */
|
|
18
|
-
export declare const BUILTIN_ACTIONS: readonly ["toggle-layer", "zoom-in", "zoom-out", "filter-layer", "highlight-feature", "fade", "pulse", "populate", "trace", "story-play", "story-pause", "story-seek", "fly-to", "zoom-to-feature", "show-overlay", "hide-overlay", "show-tooltip", "hide-tooltip", "draw-mode", "draw-commit", "draw-cancel", "draw-delete", "draw-clear", "draw-config", "draw-save", "export-region-3d", "measure-mode", "measure-clear", "measure-units", "set-basemap", "set-lighting", "set-terrain", "set-clip-box", "clip-box-edit", "set-widgets-visible", "undo", "redo", "warm-tiles"];
|
|
18
|
+
export declare const BUILTIN_ACTIONS: readonly ["toggle-layer", "set-pickable", "zoom-in", "zoom-out", "filter-layer", "highlight-feature", "fade", "pulse", "populate", "trace", "story-play", "story-pause", "story-seek", "fly-to", "zoom-to-feature", "show-overlay", "hide-overlay", "show-tooltip", "hide-tooltip", "draw-mode", "draw-commit", "draw-cancel", "draw-delete", "draw-clear", "draw-config", "draw-save", "export-region-3d", "measure-mode", "measure-clear", "measure-units", "set-basemap", "set-lighting", "set-terrain", "set-clip-box", "clip-box-edit", "set-widgets-visible", "undo", "redo", "warm-tiles"];
|
|
19
19
|
/** Hand-authored widget types — validated against the widget registry in html-data.test.ts. */
|
|
20
20
|
export declare const BUILTIN_WIDGETS: readonly ["legend", "layer-switcher", "zoom-controls", "scale-bar", "attribution", "filter", "vega-lite", "dynamic-chart", "player", "draw", "measure", "basemap-switcher", "lighting", "clip-box", "undo-redo", "widgets-toggle", "time-slider", "ifc-browser", "ifc-legend", "feature-inspector", "ifc-inspector", "ifc-loader", "ifc-clash"];
|
|
21
21
|
export declare function buildHtmlCustomData(): {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ag as Be, ah as le, ai as ce, aj as De, ak as Oe, al as ke } from "./index-
|
|
1
|
+
import { ag as Be, ah as le, ai as ce, aj as De, ak as Oe, al as ke } from "./index-COuIQk2Z.js";
|
|
2
2
|
import { y as ve, a as he, z as G, R as J, A as ue, C as Fe, F as je, n as xe, S as Ie, E as Ne } from "./recordbatch-Bpc0uxFn.js";
|
|
3
3
|
import { g as V, a as fe, b as Le, c as Ue, d as Me, e as qe, m as Ve } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
import { c as $e } from "./convert-arrow-schema-DrAihRf9.js";
|