@fxi/zartigl 0.14.2 → 0.15.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.
@@ -66,13 +66,13 @@ function p(e) {
66
66
  }
67
67
  export {
68
68
  c as B,
69
- u as C,
70
- l as a,
69
+ l as C,
70
+ s as a,
71
71
  p as b,
72
- h as c,
73
- f as d,
74
- y as e,
75
- s as f,
72
+ y as c,
73
+ h as d,
74
+ f as e,
75
+ u as f,
76
76
  m as g,
77
77
  O as i,
78
78
  R as r
package/dist/catalog.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as s, L as r, P as t, h as o, R as l, i, j as y, k as L, g as S, l as E, n as c, o as g, q as n, t as T, u as d, m, a as C, p as R, e as _, d as f, v as p, w as A, r as v, x as Y, c as u, y as P, b as k, s as x } from "./index-B1lj-XR_.js";
1
+ import { C as s, L as r, P as t, h as o, R as l, i, j as y, k as L, g as S, l as E, n as c, o as g, q as n, t as T, u as d, m, a as C, p as R, e as _, d as f, v as p, w as A, r as v, x as Y, c as u, y as P, b as k, s as x } from "./index-jwaF2X-1.js";
2
2
  export {
3
3
  s as CATALOG_URL,
4
4
  r as LAYER_STYLE_DEFAULTS,
package/dist/engine.d.ts CHANGED
@@ -38,6 +38,12 @@ declare interface BackdropStyle {
38
38
  */
39
39
  export declare function backdropVec4(backdrop: BackdropStyle): [number, number, number, number];
40
40
 
41
+ /**
42
+ * A ChunkStore in Cache Storage `name`; a store that keeps nothing where Cache
43
+ * Storage is unavailable (insecure context, some private modes), so callers need no check.
44
+ */
45
+ export declare function cacheChunkStore(name?: string): ChunkStore;
46
+
41
47
  declare interface CatalogEntry {
42
48
  id: string;
43
49
  aliases?: string[];
@@ -144,7 +150,7 @@ declare interface CatalogZarrSource extends CatalogSourceBase {
144
150
  * new URLs, so it never meets the chunks of the previous one.
145
151
  */
146
152
  /** A stored chunk, without its bytes. */
147
- declare interface ChunkEntry {
153
+ export declare interface ChunkEntry {
148
154
  url: string;
149
155
  /** Bytes on disk (compressed). */
150
156
  size: number;
@@ -153,7 +159,14 @@ declare interface ChunkEntry {
153
159
  revision: string;
154
160
  }
155
161
 
156
- declare interface ChunkStore {
162
+ /**
163
+ * The chunk revision a store expects for `indices` of a variable: the length of
164
+ * the time axis for chunks of the last time chunk, which grows; empty for every
165
+ * other chunk, which never changes.
166
+ */
167
+ export declare function chunkRevision(dimensions: readonly string[], shape: readonly number[], chunks: readonly number[], indices: readonly number[]): string;
168
+
169
+ export declare interface ChunkStore {
157
170
  /** The bytes of `url`, or undefined when missing or of another revision. */
158
171
  get(url: string, revision?: string): Promise<Uint8Array | undefined>;
159
172
  put(url: string, bytes: Uint8Array, revision?: string): Promise<void>;
@@ -228,6 +241,13 @@ export declare function createProgram(gl: WebGL2RenderingContext, vertSource: st
228
241
 
229
242
  export declare function createShader(gl: WebGL2RenderingContext, type: number, source: string): WebGLShader;
230
243
 
244
+ export declare interface DecodedChunk {
245
+ data: Float32Array;
246
+ shape: [number, number];
247
+ latRange: [number, number];
248
+ lonRange: [number, number];
249
+ }
250
+
231
251
  /** Trail length in frames for a 0–1 `fade`. */
232
252
  export declare function fadeToFrames(fade: number): number;
233
253
 
@@ -1263,7 +1283,26 @@ export declare interface VelocityTexturePair {
1263
1283
  /** `vec3 applyVibrance(vec3 c, float v)`; GLSL ES 1.0 and 3.0. */
1264
1284
  export declare const VIBRANCE_GLSL: string;
1265
1285
 
1266
- declare interface ZarrAttrs {
1286
+ export declare interface ZarrArrayMeta {
1287
+ zarr_format: number;
1288
+ shape: number[];
1289
+ chunks: number[];
1290
+ dtype: string;
1291
+ compressor: {
1292
+ id: string;
1293
+ level?: number;
1294
+ clevel?: number;
1295
+ cname?: string;
1296
+ shuffle?: number;
1297
+ blocksize?: number;
1298
+ } | null;
1299
+ fill_value: number | string | null;
1300
+ order: string;
1301
+ filters: unknown[] | null;
1302
+ dimension_separator?: string;
1303
+ }
1304
+
1305
+ export declare interface ZarrAttrs {
1267
1306
  _ARRAY_DIMENSIONS?: string[];
1268
1307
  units?: string;
1269
1308
  standard_name?: string;
@@ -1273,13 +1312,20 @@ declare interface ZarrAttrs {
1273
1312
  [key: string]: unknown;
1274
1313
  }
1275
1314
 
1276
- declare interface ZarrChunkFetchResult {
1315
+ export declare interface ZarrChunkFetchResult {
1277
1316
  data: Float32Array;
1278
1317
  missing: boolean;
1279
1318
  status?: number;
1280
1319
  url: string;
1281
1320
  }
1282
1321
 
1322
+ export declare interface ZarrConsolidatedMeta {
1323
+ zarr_consolidated_format: number;
1324
+ metadata: Record<string, ZarrArrayMeta | ZarrAttrs | {
1325
+ zarr_format: number;
1326
+ }>;
1327
+ }
1328
+
1283
1329
  declare interface ZarrPointSample {
1284
1330
  axisValue: number;
1285
1331
  time?: number;
@@ -1287,7 +1333,7 @@ declare interface ZarrPointSample {
1287
1333
  values: Record<string, number>;
1288
1334
  }
1289
1335
 
1290
- declare interface ZarrPointSeriesResult {
1336
+ export declare interface ZarrPointSeriesResult {
1291
1337
  longitude: number;
1292
1338
  latitude: number;
1293
1339
  depth?: number;
@@ -1295,7 +1341,7 @@ declare interface ZarrPointSeriesResult {
1295
1341
  points: ZarrPointSample[];
1296
1342
  }
1297
1343
 
1298
- declare class ZarrSource {
1344
+ export declare class ZarrSource {
1299
1345
  private root;
1300
1346
  private meta;
1301
1347
  private coords;
@@ -1404,7 +1450,7 @@ declare class ZarrSource {
1404
1450
  private loadCoordinates;
1405
1451
  }
1406
1452
 
1407
- declare interface ZarrTimeDimension {
1453
+ export declare interface ZarrTimeDimension {
1408
1454
  min: number;
1409
1455
  max: number;
1410
1456
  step?: number;
@@ -1413,7 +1459,7 @@ declare interface ZarrTimeDimension {
1413
1459
  values: number[];
1414
1460
  }
1415
1461
 
1416
- declare interface ZarrVerticalDimension {
1462
+ export declare interface ZarrVerticalDimension {
1417
1463
  name: string;
1418
1464
  label: "depth" | "pressure" | string;
1419
1465
  units?: string;
package/dist/engine.js CHANGED
@@ -1,64 +1,67 @@
1
- import { Q as o, R as s, G as r, S as d, j as i, U as t, V as G, W as c, X as l, Y as V, n, Z as S, _ as L, $ as C, T as u, a0 as m, a1 as O, a2 as _, a3 as p, b as R, a4 as A, c as T, a5 as g, a6 as I, o as h, D as k, M as x, a7 as f, N as v, q as D, z as F, w as E, H as B, L as b, p as N, I as P, a8 as y, a9 as M, aa as W, ab as U, t as H, ac as Y, ad as j, ae as q, J as w, af as z, ag as J, P as K, v as Q, ah as X } from "./engine-C8ZNzILO.js";
2
- import { B as $, a as aa, f as ea, b as oa, e as sa, c as ra, g as da, i as ia, r as ta, d as Ga } from "./backdrop-Dceb4d8E.js";
1
+ import { C as o, G as s, a as r, b as i, c as d, d as c, e as t, f as G, g as l, h as n, i as V, j as S, k as C, R as u, T as L, V as m, l as O, Z as R, m as _, n as p, o as A, p as h, q as k, r as T, s as g, t as x, u as I, v, w as F, x as D, y as E, z as f, A as B, B as N, D as b, E as y, F as P, H as M, I as W, J as U, K as H, L as K, M as Y, N as Z, O as j, P as q, Q as w, S as z, U as J, W as Q, X, Y as $, _ as aa } from "./geovideo-index-D-BHqpO6.js";
2
+ import { B as oa, C as sa, a as ra, b as ia, c as da, d as ca, g as ta, i as Ga, r as la, e as na } from "./backdrop-BMwRyFI5.js";
3
3
  export {
4
- $ as BACKDROP_OFF,
4
+ oa as BACKDROP_OFF,
5
5
  o as COLOR_GRADE_GLSL,
6
- aa as COLOR_GRADE_OFF,
7
- ea as COLOR_GRADE_VIBRANT,
6
+ sa as COLOR_GRADE_OFF,
7
+ ra as COLOR_GRADE_VIBRANT,
8
8
  s as GEOVIDEO_SCALAR_GLSL,
9
9
  r as GLOW_GAIN,
10
- d as GLOW_GLSL,
11
- i as GLOW_SCALE,
12
- t as GeoVideoArchiveSource,
13
- G as GeoVideoClock,
14
- c as GeoVideoCodecScalarSource,
10
+ i as GLOW_GLSL,
11
+ d as GLOW_SCALE,
12
+ c as GeoVideoArchiveSource,
13
+ t as GeoVideoClock,
14
+ G as GeoVideoCodecScalarSource,
15
15
  l as GeoVideoField,
16
- V as GeoVideoFrameSource,
17
- n as GeoVideoPlayback,
16
+ n as GeoVideoFrameSource,
17
+ V as GeoVideoPlayback,
18
18
  S as GeoVideoScalarSource,
19
- L as GeoVideoVectorSource,
20
- C as RANDOM_GLSL,
21
- u as TrailFade,
19
+ C as GeoVideoVectorSource,
20
+ u as RANDOM_GLSL,
21
+ L as TrailFade,
22
22
  m as VELOCITY_BLEND_GLSL,
23
23
  O as VIBRANCE_GLSL,
24
+ R as ZarrSource,
24
25
  _ as alphaFadeAt,
25
26
  p as assertGeoVideoIndexIdentity,
26
- oa as backdropVec4,
27
- sa as colorGradeToGrade,
28
- ra as colorGradeVec4,
29
- R as createColorRampTexture,
30
- A as createGeoVideoFrameSource,
31
- T as createProgram,
32
- g as createShader,
27
+ ia as backdropVec4,
28
+ A as cacheChunkStore,
29
+ h as chunkRevision,
30
+ da as colorGradeToGrade,
31
+ ca as colorGradeVec4,
32
+ k as createColorRampTexture,
33
+ T as createGeoVideoFrameSource,
34
+ g as createProgram,
35
+ x as createShader,
33
36
  I as fadeToFrames,
34
- h as fadeToOpacity,
35
- k as formatUnit,
36
- x as geoVideoChunkSources,
37
- f as geoVideoGrid,
38
- v as geoVideoIndexChunks,
39
- D as geoVideoScalarUniforms,
40
- F as geoVideoTimelineValues,
41
- E as getPalettes,
42
- da as gradeToColorGrade,
43
- B as isGeoVideoArchiveSource,
44
- ia as isHexColor,
45
- b as loadGeoVideoIndex,
46
- N as loadGeoVideoManifest,
47
- P as nextChunk,
48
- y as nextChunkSpan,
49
- M as pairChunk,
50
- W as pairChunkSpan,
51
- U as parseTimeRange,
52
- ta as resolveBackdrop,
53
- Ga as resolveColorGrade,
54
- H as resolveColorRamp,
55
- Y as stepTime,
56
- j as subtractIsoDuration,
57
- q as timeBracket,
58
- w as timeRangeBounds,
59
- z as timeStep,
60
- J as validateGeoVideoIndex,
61
- K as validateGeoVideoManifest,
62
- Q as validateScalarColorDomain,
63
- X as velocityTexels
37
+ v as fadeToOpacity,
38
+ F as formatUnit,
39
+ D as geoVideoChunkSources,
40
+ E as geoVideoGrid,
41
+ f as geoVideoIndexChunks,
42
+ B as geoVideoScalarUniforms,
43
+ N as geoVideoTimelineValues,
44
+ b as getPalettes,
45
+ ta as gradeToColorGrade,
46
+ y as isGeoVideoArchiveSource,
47
+ Ga as isHexColor,
48
+ P as loadGeoVideoIndex,
49
+ M as loadGeoVideoManifest,
50
+ W as nextChunk,
51
+ U as nextChunkSpan,
52
+ H as pairChunk,
53
+ K as pairChunkSpan,
54
+ Y as parseTimeRange,
55
+ la as resolveBackdrop,
56
+ na as resolveColorGrade,
57
+ Z as resolveColorRamp,
58
+ j as stepTime,
59
+ q as subtractIsoDuration,
60
+ w as timeBracket,
61
+ z as timeRangeBounds,
62
+ J as timeStep,
63
+ Q as validateGeoVideoIndex,
64
+ X as validateGeoVideoManifest,
65
+ $ as validateScalarColorDomain,
66
+ aa as velocityTexels
64
67
  };