@fxi/zartigl 0.14.1 → 0.14.2
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/README.md +17 -1
- package/dist/catalog.d.ts +17 -0
- package/dist/catalog.js +20 -19
- package/dist/engine.d.ts +50 -1
- package/dist/{index-BDIf6Jc0.js → index-B1lj-XR_.js} +164 -143
- package/dist/zartigl.d.ts +50 -1
- package/dist/zartigl.js +346 -313
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ ARCO layers of [MapX](https://app.mapx.org).
|
|
|
24
24
|
| Runtime library | `src/lib/` | `@fxi/zartigl`: the `Zartigl` facade, Zarr/WMTS/GeoVideo layers, shaders, particle simulation, point queries |
|
|
25
25
|
| Catalog | `src/catalog/`, `scripts/catalog_builder/` | `@fxi/zartigl/catalog` presets and the tools that discover, describe, and validate entries |
|
|
26
26
|
| GeoVideo pipeline | `scripts/geovideo/`, `.github/workflows/geovideo.yml` | Single renders and incremental archives published to S3, rendered daily on a self-hosted runner |
|
|
27
|
-
| Demos | `src/explorer/`, `src/demo-story/` | Catalog explorer and
|
|
27
|
+
| Demos | `src/explorer/`, `src/demo-story/`, `src/cube/` | Catalog explorer, narrative story and the GODAS thermocline data-cube, deployed to GitHub Pages |
|
|
28
28
|
| MapX integration | `src/mapx/` | Widget and standalone snippet generation for reproducible MapX views |
|
|
29
29
|
|
|
30
30
|
## Features
|
|
@@ -214,6 +214,22 @@ npm run dev:story
|
|
|
214
214
|
npm run build:story
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
+
The Pacific Thermocline Data-Cube (`src/cube/`) explores the monthly GODAS
|
|
218
|
+
ocean temperature of the equatorial Pacific (120° E–80° W, 14.5° S–15° N,
|
|
219
|
+
0–300 m) since 1980 as an interactive cube, at
|
|
220
|
+
[`fxi.io/zartigl/cube`](https://fxi.io/zartigl/cube/). It provides:
|
|
221
|
+
- slice planes and 2D sections;
|
|
222
|
+
- the 20 °C isotherm;
|
|
223
|
+
- a Niño 3.4 timeline.
|
|
224
|
+
|
|
225
|
+
It reads five-year blocks of the catalog entry's point-series store, about
|
|
226
|
+
42 MB each. `#t=YYYY-MM` opens a month.
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
npm run dev:cube
|
|
230
|
+
npm run build:cube
|
|
231
|
+
```
|
|
232
|
+
|
|
217
233
|
The demos read the built-in catalog, which points to public browser-accessible Zarr, WMTS, and GeoVideo sources. No local data download is needed; data is fetched directly from the selected source.
|
|
218
234
|
|
|
219
235
|
## Public API
|
package/dist/catalog.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export declare interface CatalogEntry {
|
|
|
29
29
|
aliases?: string[];
|
|
30
30
|
title: LocalizedText;
|
|
31
31
|
description?: LocalizedText;
|
|
32
|
+
/** Methodology and sources: an immutable page published with the catalog. */
|
|
33
|
+
documentation?: string;
|
|
32
34
|
category: string;
|
|
33
35
|
tags?: string[];
|
|
34
36
|
kind: "scalar" | "vector";
|
|
@@ -62,6 +64,21 @@ export declare interface CatalogGeoVideoSource extends CatalogSourceBase {
|
|
|
62
64
|
indexUrl?: never;
|
|
63
65
|
}
|
|
64
66
|
|
|
67
|
+
/**
|
|
68
|
+
* A link of a catalog entry, found by UUID or alias: its methodology page
|
|
69
|
+
* (`documentation`), its Zarr stores (`field`, `pointSeries`) or its GeoVideo
|
|
70
|
+
* index or manifest (`geovideo`). Undefined when the entry or the link does
|
|
71
|
+
* not exist. `pointSeries` comes from the entry's query source first, the
|
|
72
|
+
* other links from its default source first; then any source of the kind.
|
|
73
|
+
*
|
|
74
|
+
* Pass the live catalog (`(await loadCatalog()).catalog`) rather than the
|
|
75
|
+
* bundled one, so links follow the catalog when objects move.
|
|
76
|
+
*/
|
|
77
|
+
export declare function catalogLink(layer: string, kind: CatalogLinkKind, data?: Catalog): string | undefined;
|
|
78
|
+
|
|
79
|
+
/** The links a catalog entry can resolve to; see `catalogLink`. */
|
|
80
|
+
export declare type CatalogLinkKind = "documentation" | "field" | "pointSeries" | "geovideo";
|
|
81
|
+
|
|
65
82
|
export declare interface CatalogSearchOptions {
|
|
66
83
|
locale?: string;
|
|
67
84
|
category?: string;
|
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,
|
|
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";
|
|
2
2
|
export {
|
|
3
3
|
s as CATALOG_URL,
|
|
4
4
|
r as LAYER_STYLE_DEFAULTS,
|
|
@@ -6,25 +6,26 @@ export {
|
|
|
6
6
|
o as PROVIDER_LABELS,
|
|
7
7
|
l as RASTER_STYLE_KEYS,
|
|
8
8
|
i as catalog,
|
|
9
|
-
y as
|
|
10
|
-
L as
|
|
11
|
-
S as
|
|
12
|
-
E as
|
|
13
|
-
c as
|
|
14
|
-
g as
|
|
9
|
+
y as catalogLink,
|
|
10
|
+
L as compareVersions,
|
|
11
|
+
S as diffStyle,
|
|
12
|
+
E as entryHeader,
|
|
13
|
+
c as findCatalogEntries,
|
|
14
|
+
g as formatTime,
|
|
15
|
+
n as formatVertical,
|
|
15
16
|
T as getCatalogEntry,
|
|
16
17
|
d as loadCatalog,
|
|
17
18
|
m as mergeStyles,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
C as migrateLegacyStyle,
|
|
20
|
+
R as parseLayerStyle,
|
|
21
|
+
_ as pickPreferredSource,
|
|
22
|
+
f as pickSourceByPriority,
|
|
23
|
+
p as providerLabel,
|
|
24
|
+
A as requireCatalogEntry,
|
|
25
|
+
v as resolveEntryStyle,
|
|
26
|
+
Y as resolveLayerStyle,
|
|
27
|
+
u as resolveLocalizedText,
|
|
28
|
+
P as searchCatalog,
|
|
29
|
+
k as sourceCoversTime,
|
|
30
|
+
x as styleForKind
|
|
30
31
|
};
|
package/dist/engine.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ declare interface CatalogEntry {
|
|
|
43
43
|
aliases?: string[];
|
|
44
44
|
title: LocalizedText;
|
|
45
45
|
description?: LocalizedText;
|
|
46
|
+
/** Methodology and sources: an immutable page published with the catalog. */
|
|
47
|
+
documentation?: string;
|
|
46
48
|
category: string;
|
|
47
49
|
tags?: string[];
|
|
48
50
|
kind: "scalar" | "vector";
|
|
@@ -130,6 +132,42 @@ declare interface CatalogZarrSource extends CatalogSourceBase {
|
|
|
130
132
|
variables: CatalogVariables;
|
|
131
133
|
}
|
|
132
134
|
|
|
135
|
+
/**
|
|
136
|
+
* A persistent store of Zarr chunks, as the compressed bytes the server sent,
|
|
137
|
+
* in the browser's Cache Storage. ZarrSource reads it before the network when
|
|
138
|
+
* given one (opt-in), so an app opens the chunks of a past session at once.
|
|
139
|
+
*
|
|
140
|
+
* Chunks of the to_zarr stores never change once written, except those of the
|
|
141
|
+
* last time chunk, which grows as months are appended. Those carry a revision
|
|
142
|
+
* (the length of the time axis): a stored chunk of another revision is stale
|
|
143
|
+
* and is read again, then replaced under the same key. A new store version has
|
|
144
|
+
* new URLs, so it never meets the chunks of the previous one.
|
|
145
|
+
*/
|
|
146
|
+
/** A stored chunk, without its bytes. */
|
|
147
|
+
declare interface ChunkEntry {
|
|
148
|
+
url: string;
|
|
149
|
+
/** Bytes on disk (compressed). */
|
|
150
|
+
size: number;
|
|
151
|
+
/** When the chunk was stored, ms since the epoch. */
|
|
152
|
+
storedAt: number;
|
|
153
|
+
revision: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
declare interface ChunkStore {
|
|
157
|
+
/** The bytes of `url`, or undefined when missing or of another revision. */
|
|
158
|
+
get(url: string, revision?: string): Promise<Uint8Array | undefined>;
|
|
159
|
+
put(url: string, bytes: Uint8Array, revision?: string): Promise<void>;
|
|
160
|
+
/** Every stored chunk whose URL starts with `prefix`. */
|
|
161
|
+
entries(prefix?: string): Promise<ChunkEntry[]>;
|
|
162
|
+
/** Removes these chunks. */
|
|
163
|
+
delete(urls: Iterable<string>): Promise<void>;
|
|
164
|
+
/** Origin storage use and quota, bytes, when the browser reports them. */
|
|
165
|
+
estimate(): Promise<{
|
|
166
|
+
usage: number;
|
|
167
|
+
quota: number;
|
|
168
|
+
} | undefined>;
|
|
169
|
+
}
|
|
170
|
+
|
|
133
171
|
/**
|
|
134
172
|
* `vec3 gradeColor(vec3 c, vec4 g)` of `colorGradeVec4`; GLSL ES 1.0 and
|
|
135
173
|
* 3.0. It contains VIBRANCE_GLSL: include one or the other, never both.
|
|
@@ -1269,7 +1307,18 @@ declare class ZarrSource {
|
|
|
1269
1307
|
private maxCacheSize;
|
|
1270
1308
|
private abortControllers;
|
|
1271
1309
|
private bloscCodecCache;
|
|
1272
|
-
|
|
1310
|
+
private chunkStore;
|
|
1311
|
+
/**
|
|
1312
|
+
* `options.chunkStore` keeps the compressed chunks across sessions (see
|
|
1313
|
+
* chunkStore.ts); without it, chunks are only kept in memory.
|
|
1314
|
+
*/
|
|
1315
|
+
constructor(root: string, maxCacheSize?: number, options?: {
|
|
1316
|
+
chunkStore?: ChunkStore;
|
|
1317
|
+
});
|
|
1318
|
+
/** The URL of a chunk, as fetched and as stored. */
|
|
1319
|
+
chunkUrl(variable: string, indices: number[]): string;
|
|
1320
|
+
/** The revision a stored chunk must carry to be current (see chunkRevision). */
|
|
1321
|
+
chunkRevision(variable: string, indices: number[]): string;
|
|
1273
1322
|
init(): Promise<void>;
|
|
1274
1323
|
private getArrayMeta;
|
|
1275
1324
|
private getAttrs;
|