@nika-js/onlymap 0.6.17 → 0.6.19

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 (32) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{LercDecode.es-DjPA9zLm.js → LercDecode.es-Butn4LVX.js} +1 -1
  3. package/dist/{basemap-DwN5jPCj.js → basemap-qZH_aNYE.js} +803 -784
  4. package/dist/basemap.d.ts +9 -1
  5. package/dist/declarative-filter.d.ts +1 -0
  6. package/dist/effects.d.ts +14 -2
  7. package/dist/elements/om-map.d.ts +15 -0
  8. package/dist/elements/om-story.d.ts +3 -1
  9. package/dist/{geoparquet-DG3VtNgs.js → geoparquet-DWQCUg6N.js} +1 -1
  10. package/dist/ifc-Dc-TdSJr.js +2 -3
  11. package/dist/{index-DceORL-v.js → index-4St6BumW.js} +2 -2
  12. package/dist/{index-Yl9rVUWh.js → index-BTM6Mblt.js} +1 -1
  13. package/dist/{index-DlXIfdhF.js → index-CNlULiHm.js} +1 -1
  14. package/dist/{index-CX4qxgVT.js → index-CagRqDDL.js} +11538 -11300
  15. package/dist/{index-BM-txQRw.js → index-CeeQ7CH4.js} +1 -1
  16. package/dist/{lerc-BD1Any2Z.js → lerc-cWjnr__g.js} +2 -2
  17. package/dist/onlymap.standalone.js +21886 -21630
  18. package/dist/onlymapjs.js +1 -1
  19. package/dist/paced-flyby.d.ts +18 -0
  20. package/dist/programmatic.d.ts +9 -0
  21. package/dist/{raster-Cv5w_kS7.js → raster-BxxtJxxs.js} +2 -2
  22. package/dist/{raster-pipeline-Nl0EF5em.js → raster-pipeline-DlppdBYw.js} +1 -1
  23. package/dist/runtime-core.d.ts +17 -0
  24. package/dist/surface-anchor.d.ts +17 -0
  25. package/dist/version.d.ts +1 -1
  26. package/dist/{zarr-aau6eARi.js → zarr-BtxMPczZ.js} +2 -2
  27. package/docs/design/trace-link-failure.md +20 -0
  28. package/llms.txt +2 -0
  29. package/onlymapjs.html-data.json +31 -0
  30. package/package.json +1 -1
  31. package/skills/onlymapjs/SKILL.md +1 -1
  32. package/skills/onlymapjs/references/syntax.md +4 -2
package/dist/basemap.d.ts CHANGED
@@ -48,7 +48,15 @@ export declare class MapLibreBasemapAdapter {
48
48
  zoom: number;
49
49
  pitch?: number;
50
50
  bearing?: number;
51
- }, deckProps: DeckProps, showAttribution?: boolean, attributionHost?: HTMLElement);
51
+ }, deckProps: DeckProps, showAttribution?: boolean, attributionHost?: HTMLElement, deterministic?: boolean);
52
+ /** whenSettled's basemap gate (issue #37 follow-up): style + all raster/vector tiles for the current view fully loaded. */
53
+ isIdle(): boolean;
54
+ /** The overlay deck's live layers — whenSettled's readiness gate (issue #37). */
55
+ getDeckLayers(): {
56
+ isLoaded: boolean;
57
+ }[] | undefined;
58
+ /** One forced draw of both canvases (no capture) — whenSettled's "at least one completed render" guarantee (issue #37). */
59
+ forceRepaint(): void;
52
60
  /** Snapshot capture queue for the overlay's deck canvas — see captureComposite. */
53
61
  private deckCaptures;
54
62
  /** 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 → first polygon's outer ring; LineString the line itself.
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 declare function buildTraceOutline(feature: unknown): {
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): void;
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 { r as p, n as d } from "./index-CX4qxgVT.js";
1
+ import { r as p, n as d } from "./index-CagRqDDL.js";
2
2
  function g(t) {
3
3
  if (t == null) return !0;
4
4
  const e = t, n = e.id?.code;
@@ -82,12 +82,11 @@ async function le() {
82
82
  const t = `${Tt}web-ifc-api.js`, e = await (await Lt(t)).text(), o = URL.createObjectURL(new Blob([e], { type: "text/javascript" }));
83
83
  let n;
84
84
  try {
85
- n = await import(
86
- /* @vite-ignore */
85
+ n = await import(/* webpackIgnore: true */ /* @vite-ignore */
87
86
  o
88
87
  );
89
88
  } catch {
90
- n = await import(`data:text/javascript;base64,${oe(new TextEncoder().encode(e))}`);
89
+ n = await import(/* webpackIgnore: true */ `data:text/javascript;base64,${oe(new TextEncoder().encode(e))}`);
91
90
  } finally {
92
91
  URL.revokeObjectURL(o);
93
92
  }
@@ -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-CX4qxgVT.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-CX4qxgVT.js";
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-CagRqDDL.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-CagRqDDL.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-CX4qxgVT.js";
1
+ import { ag as Be, ah as le, ai as ce, aj as De, ak as Oe, al as ke } from "./index-CagRqDDL.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";
@@ -1,4 +1,4 @@
1
- import { ak as Bt, ax as Xt, ay as Yt, az as Us } from "./index-CX4qxgVT.js";
1
+ import { ak as Bt, ax as Xt, ay as Yt, az as Us } from "./index-CagRqDDL.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";