@fxi/zartigl 0.11.2 → 0.12.0

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/dist/engine.d.ts CHANGED
@@ -238,6 +238,8 @@ export declare interface GeoVideoArchiveChunk extends GeoVideoChunkSpan {
238
238
  manifestUrl: string;
239
239
  /** Encoded samples, when the index lists them. */
240
240
  samples?: number;
241
+ /** Time of each encoded sample, UTC milliseconds, when the index lists them. */
242
+ times?: number[];
241
243
  provisional?: boolean;
242
244
  }
243
245
 
@@ -636,6 +638,8 @@ export declare interface GeoVideoIndexChunk {
636
638
  start: string;
637
639
  end: string;
638
640
  samples: number;
641
+ /** Every encoded sample; absent from chunks indexed before it existed. */
642
+ times?: string[];
639
643
  key: string;
640
644
  /** Relative to the index URL. */
641
645
  manifestUrl: string;
package/dist/engine.js CHANGED
@@ -1,5 +1,5 @@
1
- import { K as o, L as s, G as r, M as i, j as d, N as G, O as c, P as t, Q as l, R as V, m as n, S, U as C, V as L, T as u, W as m, X as O, Y as _, Z as p, b as R, _ as A, c as T, $ as x, a0 as g, n as k, B as F, F as I, a1 as h, a2 as v, p as D, x as E, u as f, C as B, E as b, o as N, D as P, a3 as y, a4 as M, a5 as W, a6 as U, q as H, a7 as K, a8 as Y, a9 as j, H as q, aa as J, ab as Q, J as X, v as Z, ac as $ } from "./engine-BBxJ6x3s.js";
2
- import { B as z, a as aa, f as ea, b as oa, e as sa, c as ra, g as ia, i as da, r as Ga, d as ca } from "./backdrop-Dceb4d8E.js";
1
+ import { M as o, N as s, G as r, O as d, j as i, P as G, Q as c, R as t, S as l, U as V, m as n, V as S, W as L, X as C, T as u, Y as m, Z as O, _, $ as p, b as R, a0 as A, c as T, a1 as x, a2 as I, n as g, B as k, I as F, a3 as h, J as v, p as D, x as E, u as f, D as B, H as b, o as N, E as P, a4 as y, a5 as M, a6 as W, a7 as U, q as H, a8 as Y, a9 as j, aa as q, F as J, ab as K, ac as Q, L as X, v as Z, ad as $ } from "./engine-DM-lalJq.js";
2
+ import { B as z, a as aa, f as ea, b as oa, e as sa, c as ra, g as da, i as ia, r as Ga, d as ca } from "./backdrop-Dceb4d8E.js";
3
3
  export {
4
4
  z as BACKDROP_OFF,
5
5
  o as COLOR_GRADE_GLSL,
@@ -7,8 +7,8 @@ export {
7
7
  ea as COLOR_GRADE_VIBRANT,
8
8
  s as GEOVIDEO_SCALAR_GLSL,
9
9
  r as GLOW_GAIN,
10
- i as GLOW_GLSL,
11
- d as GLOW_SCALE,
10
+ d as GLOW_GLSL,
11
+ i as GLOW_SCALE,
12
12
  G as GeoVideoArchiveSource,
13
13
  c as GeoVideoClock,
14
14
  t as GeoVideoCodecScalarSource,
@@ -16,8 +16,8 @@ export {
16
16
  V as GeoVideoFrameSource,
17
17
  n as GeoVideoPlayback,
18
18
  S as GeoVideoScalarSource,
19
- C as GeoVideoVectorSource,
20
- L as RANDOM_GLSL,
19
+ L as GeoVideoVectorSource,
20
+ C as RANDOM_GLSL,
21
21
  u as TrailFade,
22
22
  m as VELOCITY_BLEND_GLSL,
23
23
  O as VIBRANCE_GLSL,
@@ -30,18 +30,18 @@ export {
30
30
  A as createGeoVideoFrameSource,
31
31
  T as createProgram,
32
32
  x as createShader,
33
- g as fadeToFrames,
34
- k as fadeToOpacity,
35
- F as formatUnit,
36
- I as geoVideoChunkSources,
33
+ I as fadeToFrames,
34
+ g as fadeToOpacity,
35
+ k as formatUnit,
36
+ F as geoVideoChunkSources,
37
37
  h as geoVideoGrid,
38
38
  v as geoVideoIndexChunks,
39
39
  D as geoVideoScalarUniforms,
40
40
  E as geoVideoTimelineValues,
41
41
  f as getPalettes,
42
- ia as gradeToColorGrade,
42
+ da as gradeToColorGrade,
43
43
  B as isGeoVideoArchiveSource,
44
- da as isHexColor,
44
+ ia as isHexColor,
45
45
  b as loadGeoVideoIndex,
46
46
  N as loadGeoVideoManifest,
47
47
  P as nextChunk,
@@ -52,11 +52,11 @@ export {
52
52
  Ga as resolveBackdrop,
53
53
  ca as resolveColorGrade,
54
54
  H as resolveColorRamp,
55
- K as stepTime,
56
- Y as subtractIsoDuration,
57
- j as timeBracket,
58
- q as timeRangeBounds,
59
- J as timeStep,
55
+ Y as stepTime,
56
+ j as subtractIsoDuration,
57
+ q as timeBracket,
58
+ J as timeRangeBounds,
59
+ K as timeStep,
60
60
  Q as validateGeoVideoIndex,
61
61
  X as validateGeoVideoManifest,
62
62
  Z as validateScalarColorDomain,
@@ -191,7 +191,7 @@ function _e(e, a, i = {}) {
191
191
  }
192
192
  return M(s);
193
193
  }
194
- const S = "0.11.2", N = { "maplibre-gl": "^5.17.0" }, le = {
194
+ const S = "0.12.0", N = { "maplibre-gl": "^5.17.0" }, le = {
195
195
  version: S,
196
196
  devDependencies: N
197
197
  }, F = "https://sos-ch-gva-2.exo.io/mapx-zartigl/catalog/v2/catalog.json";
@@ -270,7 +270,7 @@ const J = [
270
270
  ], X = ["geovideo", "zarr"];
271
271
  function Q(e, a = {}) {
272
272
  const i = e.temporal;
273
- if (i?.mode !== "fixed")
273
+ if (!i?.start && !i?.end)
274
274
  return !0;
275
275
  const r = i.start ? Date.parse(i.start) : -1 / 0, o = i.end ? Date.parse(i.end) : 1 / 0;
276
276
  return a.time != null && (a.time < r || a.time > o) ? !1 : (a.start ?? -1 / 0) <= o && (a.end ?? 1 / 0) >= r;
package/dist/zartigl.d.ts CHANGED
@@ -1578,6 +1578,8 @@ export declare class Zartigl {
1578
1578
  private wmtsMetadata;
1579
1579
  private fieldSources;
1580
1580
  private archiveChunks;
1581
+ /** Samples of each archive chunk the index lists them for, by manifest URL. */
1582
+ private chunkTimes;
1581
1583
  /** Manifest of the archive chunk expected next, requested ahead of it. */
1582
1584
  private nextChunkManifest;
1583
1585
  private activeFieldSource;
@@ -1609,11 +1611,10 @@ export declare class Zartigl {
1609
1611
  private loadSource;
1610
1612
  private changeSource;
1611
1613
  /**
1612
- * Source switch after init: leave the current GeoVideo when it cannot show
1613
- * the requested time, window, or depth and another source can. A time
1614
- * change alone never switches back, so scrubbing a Zarr timeline does not
1615
- * flip sources; in "auto", selecting the surface depth, alone or with a
1616
- * date GeoVideo covers, returns to GeoVideo.
1614
+ * Source switch after init. An archive moves between its own chunks with
1615
+ * the time or window; no time ever switches to another source. In "auto"
1616
+ * only, until GeoVideo renders depths, a deeper level shows Zarr and the
1617
+ * surface level GeoVideo again.
1617
1618
  */
1618
1619
  private needsSourceSwitch;
1619
1620
  private applyVisible;
@@ -1719,8 +1720,11 @@ export declare class Zartigl {
1719
1720
  */
1720
1721
  private sourceTimeRequest;
1721
1722
  /**
1722
- * Source for a preference and target. In "auto", a GeoVideo that cannot show
1723
- * the requested depth (it renders the surface level) yields to Zarr.
1723
+ * Source for a preference and target. An archive (pinned, or the
1724
+ * GeoVideo of "geovideo" and "auto") shows its chunk for the time; an
1725
+ * archive that cannot load fails a pinned or "geovideo" preference, and
1726
+ * "auto" moves on to Zarr. Regional artifacts show only when pinned. In
1727
+ * "auto", a level deeper than the surface GeoVideo renders shows Zarr.
1724
1728
  */
1725
1729
  private selectSource;
1726
1730
  private isFailedGeoVideo;
@@ -1748,8 +1752,21 @@ export declare class Zartigl {
1748
1752
  private continueArchivePlayback;
1749
1753
  /** The entry's initialised field Zarr, or null when it has none. */
1750
1754
  private entryFieldZarr;
1751
- /** Zarr time and vertical axes; unavailable metadata leaves the artifact's own timeline. */
1752
- private zarrAxes;
1755
+ /** Zarr vertical axis; unavailable metadata leaves GeoVideo without one. */
1756
+ private zarrVertical;
1757
+ /**
1758
+ * Every sample of an archive's chunks, sorted, from its index. Chunks
1759
+ * indexed before the index listed them read their manifest once, a few at
1760
+ * a time; one that cannot be read only leaves its samples out.
1761
+ */
1762
+ private archiveTimes;
1763
+ /**
1764
+ * The archive sample a request shows: the one nearest its time inside its
1765
+ * window (a trailing window counts back from the archive's last sample),
1766
+ * the latest without a time. Snapping once, here, keeps the chunk loaded
1767
+ * and the time shown in agreement.
1768
+ */
1769
+ private archiveSample;
1753
1770
  /**
1754
1771
  * Entry whose archive sources are replaced by one fixed-period source per
1755
1772
  * published chunk. An unreachable index drops the archive, so selection