@fxi/zartigl 0.9.1 → 0.9.3

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
@@ -705,6 +705,12 @@ export declare interface PaletteMeta {
705
705
  colors: string[];
706
706
  }
707
707
 
708
+ /**
709
+ * Validate a time range from a JSON config: `{ start?, end? }` as ISO dates
710
+ * with start before end, or `{ trailing }` as a positive ISO 8601 duration.
711
+ */
712
+ export declare function parseTimeRange(value: unknown, path: string): TimeRange;
713
+
708
714
  /** Particle trail color grade: a preset, or the vibrant one tuned. */
709
715
  declare type ParticleGrade = "off" | "vibrant" | GradeTuning;
710
716
 
@@ -765,6 +771,30 @@ export declare type ScalarColorDomain = [number, number];
765
771
  */
766
772
  declare type StyleRenderMode = "particles" | "raster" | "raster+particles";
767
773
 
774
+ /** `anchor` minus an ISO 8601 duration, calendar months and years in UTC. */
775
+ export declare function subtractIsoDuration(anchor: number, duration: string): number;
776
+
777
+ /**
778
+ * Time windows shared by zartigl and the renderers built on its engine: a
779
+ * fixed `start`/`end`, either side open, or the `trailing` ISO 8601 duration
780
+ * before the latest available time.
781
+ */
782
+ export declare type TimeRange = {
783
+ start?: Date | string | number;
784
+ end?: Date | string | number;
785
+ trailing?: never;
786
+ } | {
787
+ trailing: string;
788
+ start?: never;
789
+ end?: never;
790
+ };
791
+
792
+ /**
793
+ * Bounds of `range` inside the available `[min, max]`, epoch ms: open sides
794
+ * take the available ones, `trailing` counts back from `max`.
795
+ */
796
+ export declare function timeRangeBounds(range: TimeRange, [sourceMin, sourceMax]: readonly [number, number]): [number, number];
797
+
768
798
  /**
769
799
  * Camera-aware per-frame fade opacity: eases toward a short retention while
770
800
  * the camera moves, then back to the configured one. Smoothstep avoids
package/dist/engine.js CHANGED
@@ -1,5 +1,5 @@
1
- import { F as i, H as u, I as m, G as v, T as g, J as x, b as f, K as _, c as p, L as V, M as G, l as C, y as S, D as b, N as O, O as R, n as L, t as A, z as h, A as y, C as F, m as I, B as T, P as k, Q as D, R as E, p as B, S as w, E as M, v as N } from "./geovideo-index-CzQo6UIG.js";
2
- import { B as z, C as H, e as K, b as U, d as J, c as Q, g as j, i as q, a as W, r as X } from "./backdrop-DctkJ45Q.js";
1
+ import { I as i, J as u, K as m, G as v, T as g, L as x, b as f, M as _, c as p, N as V, O as G, l as C, z as S, E as b, P as R, Q as O, n as L, t as A, A as h, B as I, D as T, m as y, C as D, R as F, S as k, U as B, V as E, p as w, W as M, F as N, X as P, H as z, v as U } from "./geovideo-index-BYdh3auq.js";
2
+ import { B as K, C as J, e as Q, b as W, d as X, c as j, g as q, i as Y, a as Z, r as $ } from "./backdrop-DctkJ45Q.js";
3
3
  var e = `vec3 applyVibrance(vec3 c, float v) {
4
4
  float mx = max(c.r, max(c.g, c.b));
5
5
  float mn = min(c.r, min(c.g, c.b));
@@ -44,10 +44,10 @@ float random(uvec3 v) {
44
44
  }`;
45
45
  const n = r, c = e, t = o, s = a;
46
46
  export {
47
- z as BACKDROP_OFF,
47
+ K as BACKDROP_OFF,
48
48
  c as COLOR_GRADE_GLSL,
49
- H as COLOR_GRADE_OFF,
50
- K as COLOR_GRADE_VIBRANT,
49
+ J as COLOR_GRADE_OFF,
50
+ Q as COLOR_GRADE_VIBRANT,
51
51
  s as GEOVIDEO_SCALAR_GLSL,
52
52
  i as GeoVideoArchiveSource,
53
53
  u as GeoVideoFrameSource,
@@ -57,9 +57,9 @@ export {
57
57
  g as TrailFade,
58
58
  n as VIBRANCE_GLSL,
59
59
  x as assertGeoVideoIndexIdentity,
60
- U as backdropVec4,
61
- J as colorGradeToGrade,
62
- Q as colorGradeVec4,
60
+ W as backdropVec4,
61
+ X as colorGradeToGrade,
62
+ j as colorGradeVec4,
63
63
  f as createColorRampTexture,
64
64
  _ as createGeoVideoFrameSource,
65
65
  p as createProgram,
@@ -68,24 +68,27 @@ export {
68
68
  C as fadeToOpacity,
69
69
  S as formatUnit,
70
70
  b as geoVideoChunkSources,
71
- O as geoVideoGrid,
72
- R as geoVideoIndexChunks,
71
+ R as geoVideoGrid,
72
+ O as geoVideoIndexChunks,
73
73
  L as geoVideoScalarUniforms,
74
74
  A as geoVideoTimelineValues,
75
75
  h as getPalettes,
76
- j as gradeToColorGrade,
77
- y as isGeoVideoArchiveSource,
78
- q as isHexColor,
79
- F as loadGeoVideoIndex,
80
- I as loadGeoVideoManifest,
81
- T as nextChunk,
82
- k as nextChunkSpan,
83
- D as pairChunk,
84
- E as pairChunkSpan,
85
- W as resolveBackdrop,
86
- X as resolveColorGrade,
87
- B as resolveColorRamp,
88
- w as validateGeoVideoIndex,
89
- M as validateGeoVideoManifest,
90
- N as validateScalarColorDomain
76
+ q as gradeToColorGrade,
77
+ I as isGeoVideoArchiveSource,
78
+ Y as isHexColor,
79
+ T as loadGeoVideoIndex,
80
+ y as loadGeoVideoManifest,
81
+ D as nextChunk,
82
+ F as nextChunkSpan,
83
+ k as pairChunk,
84
+ B as pairChunkSpan,
85
+ E as parseTimeRange,
86
+ Z as resolveBackdrop,
87
+ $ as resolveColorGrade,
88
+ w as resolveColorRamp,
89
+ M as subtractIsoDuration,
90
+ N as timeRangeBounds,
91
+ P as validateGeoVideoIndex,
92
+ z as validateGeoVideoManifest,
93
+ U as validateScalarColorDomain
91
94
  };