@nika-js/onlymap 0.6.17 → 0.6.18
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 +11 -0
- package/dist/{LercDecode.es-DjPA9zLm.js → LercDecode.es-CFkuAghv.js} +1 -1
- package/dist/{basemap-DwN5jPCj.js → basemap-BYsWqrqp.js} +9 -1
- package/dist/basemap.d.ts +6 -0
- package/dist/declarative-filter.d.ts +1 -0
- package/dist/effects.d.ts +14 -2
- package/dist/elements/om-map.d.ts +15 -0
- package/dist/elements/om-story.d.ts +3 -1
- package/dist/{geoparquet-DG3VtNgs.js → geoparquet-C5ezOpDN.js} +1 -1
- package/dist/{index-DlXIfdhF.js → index-B0qtzfOX.js} +1 -1
- package/dist/{index-DceORL-v.js → index-C7pRTBjN.js} +2 -2
- package/dist/{index-Yl9rVUWh.js → index-PHDt5jos.js} +1 -1
- package/dist/{index-BM-txQRw.js → index-T1jT84TY.js} +1 -1
- package/dist/{index-CX4qxgVT.js → index-h5A4LBtR.js} +11532 -11299
- package/dist/{lerc-BD1Any2Z.js → lerc-B8gvl7FV.js} +2 -2
- package/dist/onlymap.standalone.js +21863 -21622
- package/dist/onlymapjs.js +1 -1
- package/dist/paced-flyby.d.ts +18 -0
- package/dist/programmatic.d.ts +9 -0
- package/dist/{raster-Cv5w_kS7.js → raster-B8bDaA3c.js} +2 -2
- package/dist/{raster-pipeline-Nl0EF5em.js → raster-pipeline-BLKrUZxU.js} +1 -1
- package/dist/runtime-core.d.ts +15 -0
- package/dist/surface-anchor.d.ts +17 -0
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-aau6eARi.js → zarr-Y8OewWSs.js} +2 -2
- package/docs/design/trace-link-failure.md +20 -0
- package/llms.txt +2 -0
- package/onlymapjs.html-data.json +31 -0
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,17 @@ 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.18 — 2026-08-25
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **A warning when a categorical filter can't do what it looks like it does.** deck.gl's GPU category mask holds at most 128 distinct values per dimension — filtering on a higher-cardinality field (e.g. country names over a world dataset) silently made the overflow rows vanish from the map while widget statistics still counted them. The library now warns, once per layer, naming the field and the ceiling, with the fix to use.
|
|
15
|
+
- **Trace animations no longer vanish on some machines.** Layer settings could leak between layers of the same type (a shared internal default was mutated in place), which could push a trace outline's GPU program over its attribute budget — the outline then silently never rendered. Defaults are now copied per layer.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **Drive a story from an external video renderer (Remotion-class).** Three seams for frameworks that own the clock and ask for arbitrary frames: `mapEl.whenSettled()` (also on `MapController`) resolves once the map has genuinely finished drawing — the natural await for tests and screenshots too; `story.seek(t, { interpolateCamera: true })` lands mid-fly-to seeks on the real flight arc instead of snapping to the leg's end (this also fixes scrubbers); and the `data-om-recording` attribute is now a full determinism switch — camera moves land instantly, effect verbs jump to their end state, transitions and gesture interruption turn off, and `snapshot()` returns byte-stable captures. Acceptance-tested: the same frame renders byte-identically across separate page loads and out-of-order.
|
|
19
|
+
- **On-map annotations without popups**: `anchor="surface"` on a `TextLayer` (or any layer) anchors each row inside its own polygon — labels sit on the shapes themselves, no per-row coordinates authored; concave shapes get an always-inside placement.
|
|
20
|
+
- **Travel-map trace animations**: `<om-step action="trace" follow easing="ease-in-out">` — `follow` locks the camera to the line's drawing tip as it traces (the classic animated-travel-map move), and `easing` picks the clock curve (`linear`, `ease-in`, `ease-out`, `ease-in-out`).
|
|
21
|
+
|
|
11
22
|
## 0.6.17 — 2026-08-25
|
|
12
23
|
|
|
13
24
|
### Added
|
|
@@ -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-h5A4LBtR.js";
|
|
2
2
|
const Cd = Math.PI / 180, gy = 180 / Math.PI;
|
|
3
3
|
function em(Pe, Q = 0) {
|
|
4
4
|
const me = Math.min(180, Pe) * Cd;
|
|
@@ -25126,6 +25126,14 @@ class Ry {
|
|
|
25126
25126
|
}
|
|
25127
25127
|
}), this.map.addControl(this.overlay);
|
|
25128
25128
|
}
|
|
25129
|
+
/** The overlay deck's live layers — whenSettled's readiness gate (issue #37). */
|
|
25130
|
+
getDeckLayers() {
|
|
25131
|
+
return this.overlay._deck?.getLayers?.();
|
|
25132
|
+
}
|
|
25133
|
+
/** One forced draw of both canvases (no capture) — whenSettled's "at least one completed render" guarantee (issue #37). */
|
|
25134
|
+
forceRepaint() {
|
|
25135
|
+
this.overlay._deck?.redraw("onlymapjs-settle"), this.map.triggerRepaint();
|
|
25136
|
+
}
|
|
25129
25137
|
/** Snapshot capture queue for the overlay's deck canvas — see captureComposite. */
|
|
25130
25138
|
deckCaptures = [];
|
|
25131
25139
|
/** In-flight captureComposite rejects — destroy() settles them so a caller never hangs on a torn-down renderer. */
|
package/dist/basemap.d.ts
CHANGED
|
@@ -49,6 +49,12 @@ export declare class MapLibreBasemapAdapter {
|
|
|
49
49
|
pitch?: number;
|
|
50
50
|
bearing?: number;
|
|
51
51
|
}, deckProps: DeckProps, showAttribution?: boolean, attributionHost?: HTMLElement);
|
|
52
|
+
/** The overlay deck's live layers — whenSettled's readiness gate (issue #37). */
|
|
53
|
+
getDeckLayers(): {
|
|
54
|
+
isLoaded: boolean;
|
|
55
|
+
}[] | undefined;
|
|
56
|
+
/** One forced draw of both canvases (no capture) — whenSettled's "at least one completed render" guarantee (issue #37). */
|
|
57
|
+
forceRepaint(): void;
|
|
52
58
|
/** Snapshot capture queue for the overlay's deck canvas — see captureComposite. */
|
|
53
59
|
private deckCaptures;
|
|
54
60
|
/** In-flight captureComposite rejects — destroy() settles them so a caller never hangs on a torn-down renderer. */
|
|
@@ -19,3 +19,4 @@ export declare function declarativeFilterPredicate(shape: Shape, filter: LayerFi
|
|
|
19
19
|
export declare function applyDeclarativeCategoryFilter(rows: readonly unknown[], shape: Shape, categoryFilter: LayerCategoryFilter): unknown[];
|
|
20
20
|
/** Categorical twin of `declarativeFilterPredicate` — set membership instead of a range test. */
|
|
21
21
|
export declare function declarativeCategoryFilterPredicate(shape: Shape, categoryFilter: LayerCategoryFilter): (row: unknown) => boolean;
|
|
22
|
+
export declare function warnCategoryCardinality(categoryFilter: LayerCategoryFilter | undefined, rows: readonly unknown[], shape: Shape, warnLabel: string): void;
|
package/dist/effects.d.ts
CHANGED
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { RuntimeCore } from "./runtime-core";
|
|
12
12
|
/** Pure easing/oscillation math — unit-testable without a clock. */
|
|
13
|
+
/**
|
|
14
|
+
* Named easing curves for effect verbs (`<om-step action="trace" easing="ease-in-out">`).
|
|
15
|
+
* Applied to the effect clock BEFORE the frame callback — one place, every verb.
|
|
16
|
+
*/
|
|
17
|
+
export declare const EASINGS: Record<string, (t: number) => number>;
|
|
13
18
|
export declare function traceProgress(t01: number, t0: number, t1: number): number;
|
|
14
19
|
/** Oscillates 1 → low → 1 per cycle (cosine), ending exactly at 1 for whole cycles. */
|
|
15
20
|
export declare function pulseOpacity(t01: number, cycles: number, low?: number): number;
|
|
@@ -19,6 +24,8 @@ export interface LayerEffect {
|
|
|
19
24
|
frame(t01: number): Record<string, unknown>;
|
|
20
25
|
/** What to do at the end: hold the final frame's patch, or clear it. */
|
|
21
26
|
end: "hold" | "clear";
|
|
27
|
+
/** Optional clock easing (see EASINGS) — applied before `frame`. */
|
|
28
|
+
easing?: (t: number) => number;
|
|
22
29
|
/** Runs after the end state is applied — phase chaining (trace: draw → reveal → dissolve). */
|
|
23
30
|
onDone?(): void;
|
|
24
31
|
}
|
|
@@ -27,12 +34,17 @@ export interface LayerEffect {
|
|
|
27
34
|
* pure: a GeoJSON-ish feature (or bare geometry / flat row) → the outline
|
|
28
35
|
* path with CUMULATIVE-DISTANCE timestamps, so the draw speed is uniform
|
|
29
36
|
* around the perimeter regardless of vertex spacing. Polygon → outer ring;
|
|
30
|
-
* MultiPolygon →
|
|
37
|
+
* MultiPolygon → EVERY part's outer ring, drawn in sequence longest-first
|
|
38
|
+
* (one currentTime sweep, ring timestamps offset by the running total);
|
|
39
|
+
* LineString → the line itself.
|
|
31
40
|
* Returns null for untraceable geometry (points, missing geometry).
|
|
32
41
|
*/
|
|
33
|
-
export
|
|
42
|
+
export interface TraceSegment {
|
|
34
43
|
path: [number, number][];
|
|
35
44
|
timestamps: number[];
|
|
45
|
+
}
|
|
46
|
+
export declare function buildTraceOutline(feature: unknown): {
|
|
47
|
+
segments: TraceSegment[];
|
|
36
48
|
total: number;
|
|
37
49
|
} | null;
|
|
38
50
|
export declare function cancelLayerEffect(core: RuntimeCore, layerId: string): void;
|
|
@@ -54,6 +54,7 @@ export declare class OmMapElement extends HTMLElementBase {
|
|
|
54
54
|
/** Dedup guard for the no-terrain-for-elevation error — same shape as `warnedApproximatePlacement`. */
|
|
55
55
|
private erroredNoTerrainForElevation;
|
|
56
56
|
private readyFired;
|
|
57
|
+
private firstSettleDrawDone;
|
|
57
58
|
/** Custom-state holder for the `om-collapsed` height-floor marker — see applyHeightFloor. */
|
|
58
59
|
private internals;
|
|
59
60
|
private resolveReady;
|
|
@@ -258,6 +259,20 @@ export declare class OmMapElement extends HTMLElementBase {
|
|
|
258
259
|
/** Harness map-point injection (spec: "Consumer Testing Surface") — the
|
|
259
260
|
* same path a real deck click/hover coordinate takes, so the om-map-point
|
|
260
261
|
* event and custom capture tools are testable without a GPU. */
|
|
262
|
+
/**
|
|
263
|
+
* The map's "done drawing" promise (issue #37): resolves once every live
|
|
264
|
+
* 3D tileset has refined for the CURRENT view and one further animation
|
|
265
|
+
* frame has been painted — the await a pull-model frame renderer (or a
|
|
266
|
+
* consumer Playwright test) needs before screenshotting. Resolves
|
|
267
|
+
* `{settled:false}` with a console warning on timeout rather than
|
|
268
|
+
* rejecting (a late frame is ordinary pop-in, not an error). v1 gates 3D
|
|
269
|
+
* tilesets only — basemap raster tiles are not yet awaited.
|
|
270
|
+
*/
|
|
271
|
+
whenSettled(opts?: {
|
|
272
|
+
timeout?: number;
|
|
273
|
+
}): Promise<{
|
|
274
|
+
settled: boolean;
|
|
275
|
+
}>;
|
|
261
276
|
injectMapPointInternal(coordinate: [number, number] | null, kind?: "click" | "hover", pointerType?: string): void;
|
|
262
277
|
/** Harness setView (spec: "Consumer Testing Surface") — the one path that reaches pitch/bearing. */
|
|
263
278
|
setViewInternal(partial: {
|
|
@@ -28,7 +28,9 @@ export declare class OmStoryElement extends HTMLElementBase {
|
|
|
28
28
|
get duration(): number;
|
|
29
29
|
play(): void;
|
|
30
30
|
pause(): void;
|
|
31
|
-
seek(ms: number
|
|
31
|
+
seek(ms: number, opts?: {
|
|
32
|
+
interpolateCamera?: boolean;
|
|
33
|
+
}): void;
|
|
32
34
|
/**
|
|
33
35
|
* Per-frame capture hook for paced runs (the recorder seam, issue #16):
|
|
34
36
|
* called after each paced frame is fully refined and BEFORE the frame's
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ak as Bt, ax as Xt, ay as Yt, az as Us } from "./index-
|
|
1
|
+
import { ak as Bt, ax as Xt, ay as Yt, az as Us } from "./index-h5A4LBtR.js";
|
|
2
2
|
import { w as gs, t as Hs, f as Ws, m as Qs } from "./mgrs-BY9bIvp4.js";
|
|
3
3
|
import { c as Xs } from "./convert-arrow-schema-DrAihRf9.js";
|
|
4
4
|
import { y as Ys, A as bt, a as Ks, z as Vs, R as Zs } from "./recordbatch-Bpc0uxFn.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as E, j as S, k as R, o as N, p as h, q as w, s as O, t as W, v as x, w as I, x as B, y as _, A as P, B as k, E as $, F as z, H as v, I as F, J as C, K as U, N as p, O as M } from "./index-
|
|
2
|
-
import { P as $e, R as ze, _ as ve, Q as Ce, S as Ue, T as Me, U as je, X as De, Y as Je, Z as qe, $ as He, a0 as Ve, a1 as Ge, a2 as Ke, a3 as Qe, a4 as Xe, a5 as Ye, a6 as Ze, a7 as et, a8 as tt, a9 as nt, aa as rt, ab as at, ac as st, ad as ot } from "./index-
|
|
1
|
+
import { i as E, j as S, k as R, o as N, p as h, q as w, s as O, t as W, v as x, w as I, x as B, y as _, A as P, B as k, E as $, F as z, H as v, I as F, J as C, K as U, N as p, O as M } from "./index-h5A4LBtR.js";
|
|
2
|
+
import { P as $e, R as ze, _ as ve, Q as Ce, S as Ue, T as Me, U as je, X as De, Y as Je, Z as qe, $ as He, a0 as Ve, a1 as Ge, a2 as Ke, a3 as Qe, a4 as Xe, a5 as Ye, a6 as Ze, a7 as et, a8 as tt, a9 as nt, aa as rt, ab as at, ac as st, ad as ot } from "./index-h5A4LBtR.js";
|
|
3
3
|
import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
|
|
4
4
|
async function J(t, e, n = {}, r = {}) {
|
|
5
5
|
const a = E(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
|
|
@@ -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-h5A4LBtR.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";
|