@fxi/zartigl 0.1.4 → 0.2.13

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.
@@ -0,0 +1,1444 @@
1
+ import { CustomLayerInterface } from 'maplibre-gl';
2
+ import { CustomRenderMethodInput } from 'maplibre-gl';
3
+ import { Map as Map_2 } from 'maplibre-gl';
4
+
5
+ export declare class ArcoLayer implements CustomLayerInterface {
6
+ readonly id: string;
7
+ readonly type: "custom";
8
+ readonly renderingMode: "3d";
9
+ readonly metadata?: Record<string, unknown>;
10
+ private readonly options;
11
+ private readonly backend;
12
+ private delegate;
13
+ private map;
14
+ private rasterSourceId;
15
+ private rasterLayerId;
16
+ private time;
17
+ private depth;
18
+ private opacity;
19
+ private suspended;
20
+ private listeners;
21
+ constructor(options: ArcoLayerOptions);
22
+ getBackend(): ArcoLayerBackend;
23
+ getDebugInfo(): ArcoLayerDebugInfo;
24
+ onAdd(map: Map_2, gl: WebGLRenderingContext): void | Promise<void>;
25
+ render(gl: WebGLRenderingContext, options: CustomRenderMethodInput): void;
26
+ onRemove(): void;
27
+ setTime(time: string | number): void;
28
+ setTimeAndDepth(time: string | number, depth: number): void;
29
+ setDepth(depth: number): void;
30
+ prefetchTime(ms: number): Promise<void>;
31
+ isFrameCached(ms: number): boolean;
32
+ cancelPrefetches(): void;
33
+ suspend(): void;
34
+ resume(): void;
35
+ setSpeed(v: number): void;
36
+ setFade(v: number): void;
37
+ setParticleDensity(density: number): void;
38
+ setRenderMode(mode: RenderMode): void;
39
+ setRgba8MaxParticleZoom(v: number): void;
40
+ setColorRamp(ramp: ColorRampInput): void;
41
+ setOpacity(v: number): void;
42
+ setLogScale(v: boolean): void;
43
+ setVibrance(v: number): void;
44
+ setColorDomain(domain: [number, number] | null): void;
45
+ play(): Promise<void>;
46
+ pause(): void;
47
+ setLoop(loop: boolean): void;
48
+ setPlaybackRate(rate: number): void;
49
+ setTimeRange(range: [number, number]): void;
50
+ samplePoint(options: {
51
+ longitude: number;
52
+ latitude: number;
53
+ time?: string | number;
54
+ depth?: number;
55
+ }): Promise<{
56
+ longitude: number;
57
+ latitude: number;
58
+ value: number;
59
+ unit: string;
60
+ time: number;
61
+ depth?: number;
62
+ } | undefined>;
63
+ on<K extends keyof LayerEventMap_3>(event: K, handler: LayerEventMap_3[K]): this;
64
+ off<K extends keyof LayerEventMap_3>(event: K, handler: LayerEventMap_3[K]): this;
65
+ private addOrUpdateWmts;
66
+ private removeWmts;
67
+ private emitLoaded;
68
+ private emit;
69
+ private getBeforeLayerId;
70
+ }
71
+
72
+ export declare type ArcoLayerBackend = "vector" | "scalar-zarr" | "scalar-geovideo" | "scalar-wmts";
73
+
74
+ export declare type ArcoLayerBackendPreference = "auto" | "wmts" | "geovideo" | "zarr";
75
+
76
+ export declare type ArcoLayerCatalogLayer = CatalogLayer;
77
+
78
+ export declare type ArcoLayerDebugInfo = {
79
+ id: string;
80
+ backend: ArcoLayerBackend;
81
+ catalogLayer: {
82
+ id: string;
83
+ label: string;
84
+ kind: CatalogLayer["kind"];
85
+ };
86
+ time: string | number;
87
+ depth: number;
88
+ opacity: number;
89
+ delegate: VectorLayerDebugInfo | ScalarLayerDebugInfo | GeoVideoLayerDebugInfo | null;
90
+ };
91
+
92
+ export declare interface ArcoLayerOptions extends Omit<VectorLayerOptions, "source" | "variableU" | "variableV"> {
93
+ layer: ArcoLayerCatalogLayer;
94
+ backend?: ArcoLayerBackendPreference;
95
+ /** Fixed physical-value domain for scalar colors. Null/omitted uses frame extrema. */
96
+ colorDomain?: [number, number] | null;
97
+ geoVideoManifest?: GeoVideoManifest;
98
+ geoVideoAutoplay?: boolean;
99
+ geoVideoLoop?: boolean;
100
+ geoVideoPlaybackRate?: number;
101
+ geoVideoTimeRange?: [number, number];
102
+ verticalLabel?: string;
103
+ metadata?: Record<string, unknown>;
104
+ before?: string;
105
+ }
106
+
107
+ export declare function buildMapxWidgetSnippet(options: MapxWidgetSnippetOptions): string;
108
+
109
+ export declare function buildStandaloneDemoSnippet(options: StandaloneDemoSnippetOptions): string;
110
+
111
+ export declare function buildWmtsLegendUrl(options: {
112
+ baseUrl: string;
113
+ layer: string;
114
+ format?: string;
115
+ style?: string;
116
+ }): string;
117
+
118
+ export declare function buildWmtsTileUrl(options: {
119
+ baseUrl: string;
120
+ layer: string;
121
+ tileMatrixSet: string;
122
+ format: string;
123
+ style?: string;
124
+ time?: string | number;
125
+ depth?: number;
126
+ verticalLabel?: string;
127
+ }): string;
128
+
129
+ export declare interface Catalog {
130
+ schemaVersion: 1;
131
+ layers: CatalogLayer[];
132
+ }
133
+
134
+ export declare interface CatalogGeoVideo {
135
+ id: string;
136
+ label?: string;
137
+ manifestUrl: string;
138
+ }
139
+
140
+ export declare type CatalogLayer = (CatalogLayerBase & {
141
+ kind: "scalar";
142
+ variables: Extract<CatalogVariables, {
143
+ kind: "scalar";
144
+ }>;
145
+ }) | (CatalogLayerBase & {
146
+ kind: "vector";
147
+ variables: Extract<CatalogVariables, {
148
+ kind: "vector";
149
+ }>;
150
+ });
151
+
152
+ declare interface CatalogLayerBase {
153
+ id: string;
154
+ label: string;
155
+ description?: string;
156
+ category?: string;
157
+ tags?: string[];
158
+ dataset: {
159
+ id: string;
160
+ provider?: "copernicus" | string;
161
+ productId?: string;
162
+ };
163
+ stores: {
164
+ field: {
165
+ url: string;
166
+ };
167
+ pointSeries?: {
168
+ url: string;
169
+ };
170
+ wmts?: CatalogWmts;
171
+ };
172
+ derived?: {
173
+ geoVideos?: CatalogGeoVideo[];
174
+ };
175
+ defaults?: {
176
+ backend?: "zarr" | "geovideo" | "wmts";
177
+ palette?: string;
178
+ renderMode?: "particles" | "raster" | "raster+particles";
179
+ particles?: {
180
+ density?: number;
181
+ speed?: number;
182
+ fade?: number;
183
+ };
184
+ raster?: {
185
+ opacity?: number;
186
+ logScale?: boolean;
187
+ vibrance?: number;
188
+ /** Fixed physical-value domain for scalar color normalization. */
189
+ colorDomain?: [number, number];
190
+ };
191
+ };
192
+ }
193
+
194
+ export declare type CatalogVariables = {
195
+ kind: "scalar";
196
+ value: string;
197
+ } | {
198
+ kind: "vector";
199
+ u?: string;
200
+ v?: string;
201
+ derivation?: CatalogVectorDerivation;
202
+ };
203
+
204
+ export declare interface CatalogVectorDerivation {
205
+ kind: "direction_magnitude";
206
+ direction_variable: string;
207
+ magnitude_variable: string;
208
+ direction_convention: "from" | "toward";
209
+ output_direction: "from" | "toward";
210
+ }
211
+
212
+ export declare interface CatalogWmts {
213
+ capabilities_url: string;
214
+ base_url: string;
215
+ layer: string;
216
+ tileMatrixSet: string;
217
+ format: string;
218
+ style?: string;
219
+ }
220
+
221
+ export declare type ColorRampInput = string | string[] | Record<number, string>;
222
+
223
+ declare interface CoordArrays {
224
+ time: Float64Array | Float32Array;
225
+ vertical: Float32Array;
226
+ latitude: Float32Array;
227
+ longitude: Float32Array;
228
+ }
229
+
230
+ export declare interface DepthMeta {
231
+ values: number[];
232
+ name?: string;
233
+ label: "depth" | "pressure" | string;
234
+ units?: string;
235
+ current?: number;
236
+ }
237
+
238
+ export declare function deriveDirectionMagnitudeComponents(directionDegrees: number, magnitude: number, derivation: VectorDerivation): {
239
+ u: number;
240
+ v: number;
241
+ };
242
+
243
+ export declare interface DirectionMagnitudeVectorDerivation {
244
+ kind: "direction_magnitude";
245
+ direction_variable: string;
246
+ magnitude_variable: string;
247
+ direction_convention: "from" | "toward";
248
+ output_direction: "from" | "toward";
249
+ }
250
+
251
+ export declare interface FieldMeta {
252
+ min: number;
253
+ max: number;
254
+ unit: string;
255
+ time: string;
256
+ depth?: number;
257
+ }
258
+
259
+ export declare type GeoVideoBounds = [west: number, south: number, east: number, north: number];
260
+
261
+ declare type GeoVideoEventMap = {
262
+ loading: () => void;
263
+ loaded: (meta: FieldMeta) => void;
264
+ error: (error: Error) => void;
265
+ status: (status: ZartiglStatus) => void;
266
+ timeChange: (time: number) => void;
267
+ playbackChange: (playing: boolean) => void;
268
+ };
269
+
270
+ export declare class GeoVideoLayer implements CustomLayerInterface {
271
+ readonly id: string;
272
+ readonly type: "custom";
273
+ readonly renderingMode: "3d";
274
+ private readonly source;
275
+ private readonly autoplay;
276
+ private loop;
277
+ private playbackRate;
278
+ private requestedTime;
279
+ private requestedTimeRange?;
280
+ private timeRange;
281
+ private opacity;
282
+ private colorRamp;
283
+ private colorDomain;
284
+ private logScale;
285
+ private vibrance;
286
+ private map;
287
+ private gl;
288
+ private manifest;
289
+ private video;
290
+ private colorTexture;
291
+ private maskTexture;
292
+ private colorRampTexture;
293
+ private maskCanvas;
294
+ private maskContext;
295
+ private mercatorProgram;
296
+ private globeProgram;
297
+ private vertexBuffer;
298
+ private indexBuffer;
299
+ private indexCount;
300
+ private frameCallback;
301
+ private repaintFrame;
302
+ private frameDirty;
303
+ private maskDirty;
304
+ private colorTextureInitialized;
305
+ private maskTextureInitialized;
306
+ private maskCaptured;
307
+ private mediaReady;
308
+ private readyEmitted;
309
+ private hasVideoFrameCallback;
310
+ private lastBufferedMediaTime;
311
+ private lastUploadedMediaTime;
312
+ private decodedFrames;
313
+ private frameCallbackCount;
314
+ private frameCallbackTimes;
315
+ private lastFrameCallbackAt;
316
+ private bufferedFrames;
317
+ private skippedFrames;
318
+ private uploadedFrames;
319
+ private lastUploadDurationMs;
320
+ private abortController;
321
+ private resumePlayback;
322
+ private listeners;
323
+ constructor(options: GeoVideoLayerOptions);
324
+ onAdd(map: Map_2, gl: WebGLRenderingContext): Promise<void>;
325
+ render(gl: WebGLRenderingContext, options: CustomRenderMethodInput): void;
326
+ onRemove(): void;
327
+ setTime(time: string | number): void;
328
+ setTimeAndDepth(time: string | number, _depth: number): void;
329
+ setDepth(_depth: number): void;
330
+ prefetchTime(_ms: number): Promise<void>;
331
+ isFrameCached(_ms: number): boolean;
332
+ cancelPrefetches(): void;
333
+ suspend(): void;
334
+ resume(): void;
335
+ setRgba8MaxParticleZoom(_value: number): void;
336
+ setColorRamp(ramp: ColorRampInput): void;
337
+ setLogScale(value: boolean): void;
338
+ setVibrance(value: number): void;
339
+ setColorDomain(domain: [number, number] | null): void;
340
+ setOpacity(value: number): void;
341
+ play(): Promise<void>;
342
+ pause(): void;
343
+ setLoop(loop: boolean): void;
344
+ setPlaybackRate(rate: number): void;
345
+ setTimeRange(range: [number, number]): void;
346
+ getManifest(): GeoVideoManifest | null;
347
+ getDebugInfo(): GeoVideoLayerDebugInfo;
348
+ on<K extends keyof GeoVideoEventMap>(event: K, handler: GeoVideoEventMap[K]): this;
349
+ off<K extends keyof GeoVideoEventMap>(event: K, handler: GeoVideoEventMap[K]): this;
350
+ private initGl;
351
+ private initVideo;
352
+ private bufferFrame;
353
+ private loadStaticMask;
354
+ private emitReady;
355
+ private createVideoTexture;
356
+ private uploadTextureSource;
357
+ private startRepaintLoop;
358
+ private stopRepaintLoop;
359
+ private presentedFps;
360
+ private bindGrid;
361
+ private unbindGrid;
362
+ private emit;
363
+ }
364
+
365
+ export declare interface GeoVideoLayerDebugInfo {
366
+ kind: "scalar-geovideo";
367
+ id: string;
368
+ initialized: boolean;
369
+ playing: boolean;
370
+ currentTime: number;
371
+ manifestId?: string;
372
+ mediaUrl?: string;
373
+ decodedFrames: number;
374
+ bufferedFrames: number;
375
+ skippedFrames: number;
376
+ uploadedFrames: number;
377
+ droppedFrames: number;
378
+ lastUploadDurationMs: number;
379
+ frameCallbackCount: number;
380
+ presentedFps: number;
381
+ lastFrameAgeMs: number | null;
382
+ readyState: number;
383
+ networkState: number;
384
+ }
385
+
386
+ export declare interface GeoVideoLayerOptions {
387
+ id: string;
388
+ manifest: string | GeoVideoManifest;
389
+ opacity?: number;
390
+ autoplay?: boolean;
391
+ loop?: boolean;
392
+ playbackRate?: number;
393
+ time?: string | number;
394
+ timeRange?: [number, number];
395
+ colorRamp?: ColorRampInput;
396
+ colorDomain?: [number, number] | null;
397
+ logScale?: boolean;
398
+ vibrance?: number;
399
+ }
400
+
401
+ export declare interface GeoVideoManifest {
402
+ schemaVersion: 2;
403
+ id: string;
404
+ type: "geovideo";
405
+ projection: "equirectangular";
406
+ bounds: GeoVideoBounds;
407
+ media: {
408
+ url: string;
409
+ mimeType: "video/mp4" | string;
410
+ width: number;
411
+ height: number;
412
+ fps: number;
413
+ durationSeconds: number;
414
+ codec: "h264" | string;
415
+ };
416
+ encoding: {
417
+ kind: "scalar-luma";
418
+ bits: 8;
419
+ codeMin: number;
420
+ codeMax: number;
421
+ valueMin: number;
422
+ valueMax: number;
423
+ transfer: "linear";
424
+ colorSpace: "bt709";
425
+ colorRange: "limited" | "full";
426
+ };
427
+ mask: {
428
+ kind: "static-validity";
429
+ url: string;
430
+ mimeType: "image/png" | string;
431
+ width: number;
432
+ height: number;
433
+ threshold: number;
434
+ };
435
+ timeline: GeoVideoRangeTimeline | GeoVideoSnapshotLoopTimeline;
436
+ provenance: {
437
+ layerId: string;
438
+ datasetId: string;
439
+ variable: string;
440
+ generatedAt: string;
441
+ };
442
+ style: {
443
+ palette: string;
444
+ colorDomain: [number, number];
445
+ unit?: string;
446
+ logScale?: boolean;
447
+ vibrance?: number;
448
+ };
449
+ }
450
+
451
+ export declare interface GeoVideoOptions {
452
+ autoplay?: boolean;
453
+ loop?: boolean;
454
+ playbackRate?: number;
455
+ }
456
+
457
+ export declare interface GeoVideoRangeTimeline {
458
+ kind: "range";
459
+ dateStart: string;
460
+ dateEnd: string;
461
+ interpolation: "linear" | "nearest";
462
+ }
463
+
464
+ export declare function geoVideoSecondsForTime(manifest: GeoVideoManifest, timeMs: number): number;
465
+
466
+ export declare interface GeoVideoSnapshotLoopTimeline {
467
+ kind: "snapshot-loop";
468
+ date: string;
469
+ }
470
+
471
+ export declare function geoVideoTimeForSeconds(manifest: GeoVideoManifest, seconds: number): number;
472
+
473
+ export declare function geoVideoTimelineValues(manifest: GeoVideoManifest): number[];
474
+
475
+ export declare function getPalettes(): PaletteMeta[];
476
+
477
+ export declare function getVectorDerivationVariables(derivation: VectorDerivation): [string, string];
478
+
479
+ declare type LayerEventMap = {
480
+ loading: () => void;
481
+ loaded: (meta: FieldMeta) => void;
482
+ error: (err: Error) => void;
483
+ status: (status: ZartiglStatus) => void;
484
+ frameBuffered: (ms: number) => void;
485
+ cacheInvalidated: () => void;
486
+ };
487
+
488
+ declare type LayerEventMap_2 = {
489
+ loading: () => void;
490
+ loaded: (meta: FieldMeta) => void;
491
+ error: (err: Error) => void;
492
+ status: (status: ZartiglStatus) => void;
493
+ /** Fired when a time step has been pre-fetched and is ready for instant swap. */
494
+ frameBuffered: (ms: number) => void;
495
+ /** Fired when the frame cache is wiped (viewport changed). */
496
+ cacheInvalidated: () => void;
497
+ };
498
+
499
+ declare type LayerEventMap_3 = {
500
+ loading: () => void;
501
+ loaded: (meta: FieldMeta) => void;
502
+ error: (err: Error) => void;
503
+ status: (status: ZartiglStatus) => void;
504
+ frameBuffered: (ms: number) => void;
505
+ cacheInvalidated: () => void;
506
+ timeChange: (time: number) => void;
507
+ playbackChange: (playing: boolean) => void;
508
+ };
509
+
510
+ export declare type Legend = {
511
+ type: "gradient";
512
+ palette: string;
513
+ min?: number;
514
+ max?: number;
515
+ unit?: string;
516
+ } | {
517
+ type: "image";
518
+ url: string;
519
+ format?: string;
520
+ } | {
521
+ type: "empty";
522
+ };
523
+
524
+ export declare function loadGeoVideoManifest(source: string | GeoVideoManifest, signal?: AbortSignal): Promise<GeoVideoManifest>;
525
+
526
+ export declare interface MapxWidgetSnippetOptions {
527
+ layerId: string;
528
+ backend?: "auto" | "zarr" | "geovideo" | "wmts";
529
+ time?: string | number | Date;
530
+ timeRange?: TimeRange;
531
+ geoVideo?: GeoVideoOptions;
532
+ depth?: number;
533
+ settings?: Partial<ZartiglSettings>;
534
+ }
535
+
536
+ export declare interface PaletteMeta {
537
+ id: string;
538
+ label: string;
539
+ tags: string[];
540
+ colors: string[];
541
+ }
542
+
543
+ export declare class ParticleSimulation {
544
+ private gl;
545
+ private params;
546
+ private updateProgram;
547
+ private drawProgram;
548
+ private fadeProgram;
549
+ private gridProgram;
550
+ private gridGlobeProgram;
551
+ private particleStateTextures;
552
+ private particleFramebuffers;
553
+ private particleIndexBuffer;
554
+ private particleIsCurrBuffer;
555
+ /** Active draw count — changes with canvas size / density, no realloc. */
556
+ private numParticles;
557
+ private prevBounds;
558
+ private redistributionBoost;
559
+ private cameraMoving;
560
+ private currentFadeOpacity;
561
+ private fadeTransitionStartOpacity;
562
+ private fadeTransitionTargetOpacity;
563
+ private fadeTransitionStartMs;
564
+ private fadeTransitionDurationMs;
565
+ private webglInfo;
566
+ private stateFormat;
567
+ private lastRgba8ParticlesSuppressed;
568
+ private screenTextures;
569
+ private screenFramebuffers;
570
+ private screenWidth;
571
+ private screenHeight;
572
+ private quadBuffer;
573
+ private rasterGridBuffer;
574
+ private rasterGridIndexBuffer;
575
+ private rasterGridIndexCount;
576
+ private colorRampTexture;
577
+ renderMode: RenderMode;
578
+ private updateLocs;
579
+ private drawLocs;
580
+ private fadeLocs;
581
+ private gridLocs;
582
+ private gridGlobeLocs;
583
+ constructor(params?: Partial<SimulationParams>);
584
+ init(gl: WebGLRenderingContext): void;
585
+ private getUniforms;
586
+ /** Random initial particle positions, matching the active state format. */
587
+ private makeStateData;
588
+ private createStateTexture;
589
+ private initParticleState;
590
+ private initRasterGrid;
591
+ /**
592
+ * Ensure screen textures match the current canvas size and recompute
593
+ * the active particle count from density × canvas area.
594
+ */
595
+ resize(width: number, height: number): void;
596
+ /**
597
+ * Run one simulation step: update positions, fade trails, draw particles.
598
+ * Must be called within the MapLibre render callback.
599
+ */
600
+ render(velocityTexUnit: number, velocityMin: [number, number], velocityMax: [number, number], matrix: Iterable<number>, bounds: {
601
+ minX: number;
602
+ minY: number;
603
+ maxX: number;
604
+ maxY: number;
605
+ }, worldSize: number, worldCopyOffsets: number[], geoBounds?: {
606
+ west: number;
607
+ south: number;
608
+ east: number;
609
+ north: number;
610
+ }, isGlobe?: boolean, globeCenter?: [number, number, number], clippingPlane?: [number, number, number, number]): void;
611
+ renderGrid(velocityTexUnit: number, velocityMin: [number, number], velocityMax: [number, number], matrix: Iterable<number>, worldSize: number, worldCopyOffsets: number[], geoBounds: {
612
+ west: number;
613
+ south: number;
614
+ east: number;
615
+ north: number;
616
+ }, opacityScale?: number): void;
617
+ renderGridGlobe(velocityTexUnit: number, velocityMin: [number, number], velocityMax: [number, number], matrix: Iterable<number>, geoBounds: {
618
+ west: number;
619
+ south: number;
620
+ east: number;
621
+ north: number;
622
+ }, clippingPlane: [number, number, number, number], opacityScale?: number): void;
623
+ private setGridFieldUniforms;
624
+ private bindRasterGrid;
625
+ private unbindRasterGrid;
626
+ private drawQuad;
627
+ setSpeed(v: number): void;
628
+ setFadeOpacity(v: number): void;
629
+ /** Smoothly switch between normal and camera-motion trail retention. */
630
+ setCameraMoving(moving: boolean): void;
631
+ private updateTrailFadeOpacity;
632
+ private shouldSuppressRgba8Particles;
633
+ setDropRate(v: number): void;
634
+ setDropRateBump(v: number): void;
635
+ setParticleDensity(density: number): void;
636
+ setColorRamp(ramp: Record<number, string>): void;
637
+ setRenderMode(mode: RenderMode): void;
638
+ setOpacity(v: number): void;
639
+ setLogScale(v: boolean): void;
640
+ setVibrance(v: number): void;
641
+ setScalarMode(v: boolean): void;
642
+ setRgba8MaxParticleZoom(v: number): void;
643
+ /**
644
+ * Reset all particles to random positions. Call after time/depth change
645
+ * or map move. Randomises the full state texture and clears trail FBOs.
646
+ */
647
+ resetParticles(): void;
648
+ /**
649
+ * Clear screen framebuffers to transparent black.
650
+ * Eliminates ghost trails when the viewport shifts.
651
+ */
652
+ clearState(): void;
653
+ getDebugInfo(): ParticleSimulationDebugInfo;
654
+ destroy(): void;
655
+ }
656
+
657
+ export declare interface ParticleSimulationDebugInfo {
658
+ particleState: ParticleStateKind;
659
+ particleStateMode: ParticleStateMode;
660
+ particleStateResolution: number;
661
+ maxParticles: number;
662
+ activeParticles: number;
663
+ rgba8MaxParticleZoom: number;
664
+ rgba8ParticlesSuppressed: boolean;
665
+ screenSize: {
666
+ width: number;
667
+ height: number;
668
+ };
669
+ renderMode: RenderMode;
670
+ speed: number;
671
+ fadeOpacity: number;
672
+ particleDensity: number;
673
+ opacity: number;
674
+ logScale: boolean;
675
+ vibrance: number;
676
+ scalarMode: boolean;
677
+ devicePixelRatio?: number;
678
+ webgl: WebGLRendererInfo | null;
679
+ }
680
+
681
+ export declare type ParticleStateKind = StateTextureFormat["kind"];
682
+
683
+ export declare type ParticleStateMode = "auto" | "rgba8";
684
+
685
+ export declare interface QueryDepthProfileOptions {
686
+ longitude: number;
687
+ latitude: number;
688
+ time?: string | number;
689
+ maxDepths?: number;
690
+ }
691
+
692
+ export declare interface QueryPointOptions {
693
+ longitude: number;
694
+ latitude: number;
695
+ depth?: number;
696
+ maxPoints?: number;
697
+ }
698
+
699
+ export declare type RenderMode = 'raster' | 'particles' | 'raster+particles';
700
+
701
+ /** Resolve a native date/time control value against actual available times. */
702
+ export declare function resolveTimeInputSelection(values: readonly number[], value: string, granularity: TimeGranularity): number | undefined;
703
+
704
+ declare type ScalarColorDomain = [number, number];
705
+
706
+ export declare class ScalarLayer implements CustomLayerInterface {
707
+ readonly id: string;
708
+ readonly type: "custom";
709
+ readonly renderingMode: "3d";
710
+ private map;
711
+ private gl;
712
+ private zarrSource;
713
+ private simulation;
714
+ private activeField;
715
+ private activeData;
716
+ private initialized;
717
+ private suspended;
718
+ private loading;
719
+ private reloadQueued;
720
+ private generation;
721
+ private requestId;
722
+ private pendingReadyTime;
723
+ private frameCache;
724
+ private inflight;
725
+ private listeners;
726
+ private variable;
727
+ private time;
728
+ private depth;
729
+ private unit;
730
+ private colorDomain;
731
+ private textureUnit;
732
+ constructor(options: ScalarLayerOptions);
733
+ onAdd(map: Map_2, gl: WebGLRenderingContext): Promise<void>;
734
+ private moveEndHandler;
735
+ private initAsync;
736
+ render(gl: WebGLRenderingContext, options: CustomRenderMethodInput): void;
737
+ onRemove(): void;
738
+ setTime(time: string | number): void;
739
+ setTimeAndDepth(time: string | number, depth: number): void;
740
+ setDepth(depth: number): void;
741
+ prefetchTime(ms: number): Promise<void>;
742
+ isFrameCached(ms: number): boolean;
743
+ cancelPrefetches(): void;
744
+ suspend(): void;
745
+ resume(): void;
746
+ setColorRamp(ramp: ColorRampInput): void;
747
+ setOpacity(v: number): void;
748
+ setLogScale(v: boolean): void;
749
+ setVibrance(v: number): void;
750
+ setColorDomain(domain: [number, number] | null): void;
751
+ setRgba8MaxParticleZoom(v: number): void;
752
+ getDebugInfo(): ScalarLayerDebugInfo;
753
+ samplePoint(options: {
754
+ longitude: number;
755
+ latitude: number;
756
+ time?: string | number;
757
+ depth?: number;
758
+ }): Promise<{
759
+ longitude: number;
760
+ latitude: number;
761
+ value: number;
762
+ unit: string;
763
+ time: number;
764
+ depth?: number;
765
+ }>;
766
+ on<K extends keyof LayerEventMap>(event: K, handler: LayerEventMap[K]): this;
767
+ off<K extends keyof LayerEventMap>(event: K, handler: LayerEventMap[K]): this;
768
+ private loadCurrent;
769
+ private fetchScalarData;
770
+ private setActive;
771
+ private sampleActiveData;
772
+ private computeFieldMeta;
773
+ private timeToMs;
774
+ private emit;
775
+ }
776
+
777
+ export declare interface ScalarLayerDebugInfo {
778
+ kind: "scalar-zarr";
779
+ id: string;
780
+ initialized: boolean;
781
+ loading: boolean;
782
+ variable: string;
783
+ time: string | number;
784
+ depth: number;
785
+ unit: string;
786
+ colorDomain: [number, number] | null;
787
+ simulation: ParticleSimulationDebugInfo;
788
+ }
789
+
790
+ export declare interface ScalarLayerOptions {
791
+ id: string;
792
+ source: string;
793
+ /** Optional initialized/shared source. When omitted, the layer creates one from `source`. */
794
+ zarrSource?: ZarrSource;
795
+ variable: string;
796
+ colorRamp?: Record<number, string>;
797
+ time?: string | number;
798
+ depth?: number;
799
+ opacity?: number;
800
+ logScale?: boolean;
801
+ vibrance?: number;
802
+ /** Fixed physical-value domain for scalar colors. Null/omitted uses frame extrema. */
803
+ colorDomain?: [number, number] | null;
804
+ unit?: string;
805
+ particleState?: ParticleStateMode;
806
+ rgba8MaxParticleZoom?: number;
807
+ }
808
+
809
+ export declare function selectArcoLayerBackend(options: ArcoLayerOptions): ArcoLayerBackend;
810
+
811
+ declare interface SimulationParams {
812
+ /** Particles per screen pixel. Active count = clamp(w * h * density, 1, MAX). */
813
+ particleDensity: number;
814
+ /** Max pixels/frame for the fastest current. Constant visual speed at any zoom. */
815
+ speed: number;
816
+ fadeOpacity: number;
817
+ dropRate: number;
818
+ dropRateBump: number;
819
+ colorRamp?: Record<number, string>;
820
+ opacity: number;
821
+ logScale: boolean;
822
+ vibrance: number;
823
+ scalarMode: boolean;
824
+ particleState: ParticleStateMode;
825
+ rgba8MaxParticleZoom: number;
826
+ }
827
+
828
+ export declare interface StandaloneDemoSnippetOptions extends MapxWidgetSnippetOptions {
829
+ moduleBaseUrl?: string;
830
+ center?: [number, number];
831
+ zoom?: number;
832
+ bearing?: number;
833
+ pitch?: number;
834
+ projection?: "mercator" | "globe";
835
+ style?: string;
836
+ }
837
+
838
+ /**
839
+ * Capability + GL constants for the particle-state texture format.
840
+ * Float state stores particle positions directly and avoids the RGBA8 packed
841
+ * coordinate lattice. RGBA8 remains the compatibility fallback.
842
+ */
843
+ declare interface StateTextureFormat {
844
+ kind: "float32" | "float16" | "rgba8-packed";
845
+ internalFormat: number;
846
+ type: number;
847
+ }
848
+
849
+ /**
850
+ * Stitch multiple decoded chunks into a single global velocity grid.
851
+ * The result covers [0,360) longitude x [-90,90] latitude.
852
+ * Grid resolution matches the source data.
853
+ */
854
+ export declare function stitchVelocityChunks(uChunks: Array<{
855
+ data: Float32Array;
856
+ latStart: number;
857
+ lonStart: number;
858
+ latSize: number;
859
+ lonSize: number;
860
+ lonChunkSize: number;
861
+ }>, vChunks: Array<{
862
+ data: Float32Array;
863
+ latStart: number;
864
+ lonStart: number;
865
+ latSize: number;
866
+ lonSize: number;
867
+ lonChunkSize: number;
868
+ }>, totalLat: number, totalLon: number, geoBounds?: {
869
+ west: number;
870
+ south: number;
871
+ east: number;
872
+ north: number;
873
+ }, latDescending?: boolean, scalarMode?: boolean): VelocityData;
874
+
875
+ export declare type TimeGranularity = "year" | "month" | "day" | "hour" | "minute" | "second";
876
+
877
+ export declare interface TimeMeta {
878
+ min: number;
879
+ max: number;
880
+ step?: number;
881
+ size: number;
882
+ values: number[];
883
+ units?: string;
884
+ current?: number;
885
+ granularity: TimeGranularity;
886
+ timelineKind?: GeoVideoManifest["timeline"]["kind"];
887
+ }
888
+
889
+ export declare type TimeRange = {
890
+ start?: Date | string | number;
891
+ end?: Date | string | number;
892
+ trailing?: never;
893
+ } | {
894
+ trailing: string;
895
+ start?: never;
896
+ end?: never;
897
+ };
898
+
899
+ export declare function validateGeoVideoManifest(value: unknown): GeoVideoManifest;
900
+
901
+ export declare interface VariableMeta {
902
+ standardName?: string;
903
+ units?: string;
904
+ }
905
+
906
+ export declare type VectorDerivation = DirectionMagnitudeVectorDerivation;
907
+
908
+ export declare class VectorLayer implements CustomLayerInterface {
909
+ readonly id: string;
910
+ readonly type: "custom";
911
+ readonly renderingMode: "3d";
912
+ private map;
913
+ private gl;
914
+ private simulation;
915
+ private velocityField;
916
+ private zarrSource;
917
+ private variableU;
918
+ private variableV;
919
+ private vectorDerivation;
920
+ private unit;
921
+ private time;
922
+ private depth;
923
+ private initialized;
924
+ private suspended;
925
+ private loading;
926
+ private reloadQueued;
927
+ private reloadQueuedResetParticles;
928
+ private generation;
929
+ private requestId;
930
+ private pendingReadyTime;
931
+ private velocityTexUnit;
932
+ private moveStartHandler;
933
+ private moveHandler;
934
+ private moveEndHandler;
935
+ /** Pre-fetched frames keyed by time-ms. Cleared when the viewport changes. */
936
+ private frameCache;
937
+ /** Time-ms values currently being fetched in the background. */
938
+ private inflight;
939
+ private listeners;
940
+ constructor(options: VectorLayerOptions);
941
+ onAdd(map: Map_2, gl: WebGLRenderingContext): Promise<void>;
942
+ private initAsync;
943
+ private timeToMs;
944
+ private computeFieldMeta;
945
+ private isViewportCovered;
946
+ private reloadIfViewportUncovered;
947
+ /**
948
+ * Fetch and stitch velocity data for the given time without touching GL state.
949
+ * The map's current viewport is used to determine the lat bounds of the request.
950
+ */
951
+ private fetchVelocityData;
952
+ private loadViewportVelocity;
953
+ render(gl: WebGLRenderingContext, options: CustomRenderMethodInput): void;
954
+ onRemove(): void;
955
+ setTime(time: string | number): void;
956
+ setTimeAndDepth(time: string | number, depth: number): void;
957
+ /**
958
+ * Pre-fetch velocity data for a future time step without swapping the active
959
+ * field. Fires `frameBuffered(ms)` when ready so playback can advance
960
+ * immediately without a loading gap.
961
+ */
962
+ prefetchTime(ms: number): Promise<void>;
963
+ /** True when the frame for the given time (ms) is already in the cache. */
964
+ isFrameCached(ms: number): boolean;
965
+ /** Abort all pending Zarr prefetch fetches and clear the inflight set. */
966
+ cancelPrefetches(): void;
967
+ suspend(): void;
968
+ resume(): void;
969
+ setDepth(depth: number): void;
970
+ setSpeed(v: number): void;
971
+ setFade(v: number): void;
972
+ setParticleDensity(density: number): void;
973
+ setColorRamp(ramp: ColorRampInput): void;
974
+ setRenderMode(mode: RenderMode): void;
975
+ setRgba8MaxParticleZoom(v: number): void;
976
+ setOpacity(v: number): void;
977
+ setLogScale(v: boolean): void;
978
+ setVibrance(v: number): void;
979
+ getDebugInfo(): VectorLayerDebugInfo;
980
+ on<K extends keyof LayerEventMap_2>(event: K, handler: LayerEventMap_2[K]): this;
981
+ off<K extends keyof LayerEventMap_2>(event: K, handler: LayerEventMap_2[K]): this;
982
+ private emit;
983
+ }
984
+
985
+ export declare interface VectorLayerDebugInfo {
986
+ kind: "vector";
987
+ id: string;
988
+ initialized: boolean;
989
+ loading: boolean;
990
+ variableU: string;
991
+ variableV: string;
992
+ time: string | number;
993
+ depth: number;
994
+ unit: string;
995
+ simulation: ParticleSimulationDebugInfo;
996
+ }
997
+
998
+ export declare interface VectorLayerOptions {
999
+ id: string;
1000
+ source: string;
1001
+ /** Optional initialized/shared source. When omitted, the layer creates one from `source`. */
1002
+ zarrSource?: ZarrSource;
1003
+ variableU?: string;
1004
+ variableV?: string;
1005
+ vectorDerivation?: VectorDerivation;
1006
+ /** Particles per screen pixel. Count = clamp(w × h × density, 1, 262144). Default 0.05. */
1007
+ particleDensity?: number;
1008
+ /** Max pixels/frame for the fastest current. Constant visual speed at any zoom. Default 1.0. */
1009
+ speed?: number;
1010
+ /** Trail length [0, 1] (higher = longer trails). Default 0.7. */
1011
+ fade?: number;
1012
+ /** Vector display mode. Default particles. */
1013
+ renderMode?: RenderMode;
1014
+ /** Particle state format selection. Default auto. */
1015
+ particleState?: ParticleStateMode;
1016
+ /** In RGBA8 mode, particles are suppressed above this zoom and raster remains visible. Default 4. */
1017
+ rgba8MaxParticleZoom?: number;
1018
+ colorRamp?: Record<number, string>;
1019
+ time?: string | number;
1020
+ depth?: number;
1021
+ /** Global layer opacity [0, 1]. Default 1.0. */
1022
+ opacity?: number;
1023
+ /** Logarithmic speed normalization. Default false. */
1024
+ logScale?: boolean;
1025
+ /** Vibrance adjustment [-1, 1]. Default 0.0. */
1026
+ vibrance?: number;
1027
+ unit?: string;
1028
+ }
1029
+
1030
+ export declare interface VelocityData {
1031
+ u: Float32Array;
1032
+ v: Float32Array;
1033
+ width: number;
1034
+ height: number;
1035
+ uMin: number;
1036
+ uMax: number;
1037
+ vMin: number;
1038
+ vMax: number;
1039
+ bounds: {
1040
+ west: number;
1041
+ south: number;
1042
+ east: number;
1043
+ north: number;
1044
+ };
1045
+ /** True when latitude rows are stored north-to-south (needs GL Y-flip). */
1046
+ latDescending?: boolean;
1047
+ /** When true: R=scalar_norm, G=128(neutral), V loop skipped. */
1048
+ scalarMode?: boolean;
1049
+ }
1050
+
1051
+ /**
1052
+ * Manages a WebGL texture that holds stitched U/V velocity data
1053
+ * in geographic space [0,1]x[0,1], with R=u, G=v normalized to [0,1].
1054
+ */
1055
+ export declare class VelocityField {
1056
+ private gl;
1057
+ private texture;
1058
+ private width;
1059
+ private height;
1060
+ uMin: number;
1061
+ uMax: number;
1062
+ vMin: number;
1063
+ vMax: number;
1064
+ geoBounds: {
1065
+ west: number;
1066
+ south: number;
1067
+ east: number;
1068
+ north: number;
1069
+ };
1070
+ scalarMode: boolean;
1071
+ private linearFilter;
1072
+ init(gl: WebGLRenderingContext): void;
1073
+ /**
1074
+ * Upload velocity data as a 2-channel (RG) texture.
1075
+ * Input: u/v Float32Arrays with real physical values.
1076
+ * Stored normalized to [0,1] using uMin/uMax/vMin/vMax, except scalar
1077
+ * fields may use a fixed color domain so fragments never decode physical values.
1078
+ */
1079
+ update(data: VelocityData, colorDomain?: ScalarColorDomain | null): void;
1080
+ /** Switch between bilinear (particles) and nearest-neighbour (raster) sampling. */
1081
+ setFilter(linear: boolean): void;
1082
+ bind(unit: number): void;
1083
+ hasData(): boolean;
1084
+ destroy(): void;
1085
+ }
1086
+
1087
+ declare interface WebGLRendererInfo {
1088
+ vendor: string;
1089
+ renderer: string;
1090
+ unmaskedVendor?: string;
1091
+ unmaskedRenderer?: string;
1092
+ version?: string;
1093
+ }
1094
+
1095
+ export declare interface ZarrArrayMeta {
1096
+ zarr_format: number;
1097
+ shape: number[];
1098
+ chunks: number[];
1099
+ dtype: string;
1100
+ compressor: {
1101
+ id: string;
1102
+ level?: number;
1103
+ clevel?: number;
1104
+ cname?: string;
1105
+ shuffle?: number;
1106
+ blocksize?: number;
1107
+ } | null;
1108
+ fill_value: number | string | null;
1109
+ order: string;
1110
+ filters: unknown[] | null;
1111
+ dimension_separator?: string;
1112
+ }
1113
+
1114
+ declare interface ZarrAttrs {
1115
+ _ARRAY_DIMENSIONS?: string[];
1116
+ units?: string;
1117
+ standard_name?: string;
1118
+ long_name?: string;
1119
+ calendar?: string;
1120
+ positive?: "up" | "down" | string;
1121
+ [key: string]: unknown;
1122
+ }
1123
+
1124
+ export declare interface ZarrChunkFetchResult {
1125
+ data: Float32Array;
1126
+ missing: boolean;
1127
+ status?: number;
1128
+ url: string;
1129
+ }
1130
+
1131
+ export declare interface ZarrConsolidatedMeta {
1132
+ zarr_consolidated_format: number;
1133
+ metadata: Record<string, ZarrArrayMeta | ZarrAttrs | {
1134
+ zarr_format: number;
1135
+ }>;
1136
+ }
1137
+
1138
+ export declare interface ZarrPointSample {
1139
+ axisValue: number;
1140
+ time?: number;
1141
+ depth?: number;
1142
+ values: Record<string, number>;
1143
+ }
1144
+
1145
+ export declare interface ZarrPointSeriesResult {
1146
+ longitude: number;
1147
+ latitude: number;
1148
+ depth?: number;
1149
+ time?: number;
1150
+ points: ZarrPointSample[];
1151
+ }
1152
+
1153
+ export declare class ZarrSource {
1154
+ private root;
1155
+ private meta;
1156
+ private coords;
1157
+ private initPromise;
1158
+ private verticalName;
1159
+ private timeUnits;
1160
+ private timeCalendar;
1161
+ private cache;
1162
+ private maxCacheSize;
1163
+ private abortControllers;
1164
+ private bloscCodecCache;
1165
+ constructor(root: string, maxCacheSize?: number);
1166
+ init(): Promise<void>;
1167
+ private getArrayMeta;
1168
+ private getAttrs;
1169
+ getDimensionSeparator(variable: string): string;
1170
+ getShape(variable: string): number[];
1171
+ getChunkShape(variable: string): number[];
1172
+ getCoords(): CoordArrays;
1173
+ getTimeDimension(): ZarrTimeDimension;
1174
+ getVerticalDimension(): ZarrVerticalDimension | undefined;
1175
+ hasVariable(variable: string): boolean;
1176
+ getVariableAttrs(variable: string): ZarrAttrs;
1177
+ getDimensions(variable: string): string[];
1178
+ findNearestIndex(array: Float32Array | Float64Array, value: number): number;
1179
+ findTimeIndex(time: string | number): number;
1180
+ /**
1181
+ * Convert a Unix-ms timestamp to the native time units used by this zarr
1182
+ * (read from the time variable's .zattrs "units" field).
1183
+ * Unsupported units are rejected during initialization rather than guessed.
1184
+ */
1185
+ private msToZarrTime;
1186
+ private zarrTimeToMs;
1187
+ private parseTimeEncoding;
1188
+ private findNearestLongitudeIndex;
1189
+ private sampleVariableAt;
1190
+ private getFlatOffset;
1191
+ findDepthIndex(depth: number): number;
1192
+ sampleTimeSeries(options: {
1193
+ variables: string[];
1194
+ longitude: number;
1195
+ latitude: number;
1196
+ depth?: number;
1197
+ timeStartIndex?: number;
1198
+ timeEndIndex?: number;
1199
+ stride?: number;
1200
+ stopAfterMissingSamples?: number;
1201
+ }): Promise<ZarrPointSeriesResult>;
1202
+ sampleVerticalProfile(options: {
1203
+ variables: string[];
1204
+ longitude: number;
1205
+ latitude: number;
1206
+ time: string | number;
1207
+ maxDepths?: number;
1208
+ stride?: number;
1209
+ stopAfterMissingSamples?: number;
1210
+ }): Promise<ZarrPointSeriesResult>;
1211
+ /** Return the actual name of the vertical dimension ("depth" or "elevation"). */
1212
+ getVerticalDimName(): string;
1213
+ /**
1214
+ * Get chunk indices that intersect a geographic bounding box.
1215
+ */
1216
+ getChunksForBounds(variable: string, timeIdx: number, depthIdx: number, bounds: {
1217
+ west: number;
1218
+ south: number;
1219
+ east: number;
1220
+ north: number;
1221
+ }): Array<{
1222
+ timeIdx: number;
1223
+ depthIdx: number;
1224
+ latIdx: number;
1225
+ lonIdx: number;
1226
+ latRange: [number, number];
1227
+ lonRange: [number, number];
1228
+ latSize: number;
1229
+ lonSize: number;
1230
+ }>;
1231
+ fetchChunk(variable: string, indices: number[]): Promise<Float32Array>;
1232
+ fetchChunkResult(variable: string, indices: number[]): Promise<ZarrChunkFetchResult>;
1233
+ cancelAll(): void;
1234
+ private cacheChunk;
1235
+ private getBloscCodec;
1236
+ private decompress;
1237
+ private loadCoordinates;
1238
+ }
1239
+
1240
+ export declare interface ZarrTimeDimension {
1241
+ min: number;
1242
+ max: number;
1243
+ step?: number;
1244
+ size: number;
1245
+ units: string;
1246
+ values: number[];
1247
+ }
1248
+
1249
+ export declare interface ZarrVerticalDimension {
1250
+ name: string;
1251
+ label: "depth" | "pressure" | string;
1252
+ units?: string;
1253
+ values: number[];
1254
+ }
1255
+
1256
+ export declare class Zartigl {
1257
+ private readonly id;
1258
+ private readonly map;
1259
+ private readonly catalog;
1260
+ private readonly backendPreference;
1261
+ private timeRange?;
1262
+ private fullTimeMeta;
1263
+ private readonly autoplay;
1264
+ private loop;
1265
+ private playbackRate;
1266
+ private readonly metadata?;
1267
+ private readonly before?;
1268
+ private visible;
1269
+ private catalogLayer;
1270
+ private layer;
1271
+ private time;
1272
+ private pendingTime;
1273
+ private depth;
1274
+ private settings;
1275
+ private colorDomainOverridden;
1276
+ private lastMeta;
1277
+ private timeMeta;
1278
+ private resolvedTimeRange;
1279
+ private verticalMeta;
1280
+ private variableUnit;
1281
+ private variableStandardName;
1282
+ private geoVideoManifest;
1283
+ private fieldSources;
1284
+ private activeFieldSource;
1285
+ private switchGeneration;
1286
+ private destroyed;
1287
+ private suspended;
1288
+ private attachQueued;
1289
+ private querySources;
1290
+ private listeners;
1291
+ private readonly onMapLoad;
1292
+ private readonly onStyleData;
1293
+ private readonly onMapIdle;
1294
+ constructor(options: ZartiglOptions);
1295
+ setLayer(id: string): Promise<void>;
1296
+ show(): void;
1297
+ hide(): void;
1298
+ /** Pause rendering and abort field requests without discarding layer state. */
1299
+ suspend(): void;
1300
+ /** Resume rendering and load only the latest requested time/depth state. */
1301
+ resume(): void;
1302
+ destroy(): void;
1303
+ setTime(time: Date | string | number): void;
1304
+ play(): Promise<void>;
1305
+ pause(): void;
1306
+ setLoop(loop: boolean): void;
1307
+ setPlaybackRate(rate: number): void;
1308
+ /** Apply or clear a time window without rebuilding source metadata or the map layer. */
1309
+ setTimeRange(range?: TimeRange | null): TimeMeta;
1310
+ setDepth(depth: number): void;
1311
+ setTimeAndDepth(time: Date | string | number, depth: number): void;
1312
+ on<K extends keyof ZartiglEventMap>(event: K, handler: ZartiglEventMap[K]): this;
1313
+ off<K extends keyof ZartiglEventMap>(event: K, handler: ZartiglEventMap[K]): this;
1314
+ getTimeMeta(options?: {
1315
+ full?: boolean;
1316
+ }): TimeMeta;
1317
+ getDepthMeta(): DepthMeta;
1318
+ getVariableMeta(): VariableMeta;
1319
+ getLegend(): Legend;
1320
+ getPalettes(): PaletteMeta[];
1321
+ getBackend(): "zarr" | "geovideo" | "wmts" | undefined;
1322
+ /** Whether palette/domain styling is applied to values in the active renderer. */
1323
+ supportsDynamicStyle(): boolean;
1324
+ getDebugInfo(): ZartiglDebugInfo;
1325
+ updateSettings(settings: Partial<ZartiglSettings>): void;
1326
+ queryTimeSeries(options: QueryPointOptions): Promise<ZarrPointSeriesResult>;
1327
+ queryDepthProfile(options: QueryDepthProfileOptions): Promise<ZarrPointSeriesResult>;
1328
+ private activeBackendPreference;
1329
+ private backendForLayer;
1330
+ private attachWhenReady;
1331
+ private detach;
1332
+ private applyMutableSettings;
1333
+ private getQuerySource;
1334
+ private getFieldSource;
1335
+ private isMapReady;
1336
+ private getBeforeLayerId;
1337
+ private requireLayer;
1338
+ private assertAlive;
1339
+ private emit;
1340
+ }
1341
+
1342
+ export declare interface ZartiglDebugInfo {
1343
+ timestamp: string;
1344
+ userAgent?: string;
1345
+ id: string;
1346
+ destroyed: boolean;
1347
+ visible: boolean;
1348
+ suspended: boolean;
1349
+ backendPreference: "auto" | "zarr" | "geovideo" | "wmts";
1350
+ activeBackend?: "zarr" | "geovideo" | "wmts";
1351
+ projection?: string;
1352
+ canvasSize?: {
1353
+ width: number;
1354
+ height: number;
1355
+ };
1356
+ canvasCssSize?: {
1357
+ width: number;
1358
+ height: number;
1359
+ };
1360
+ devicePixelRatio?: number;
1361
+ catalogLayer: {
1362
+ id: string;
1363
+ label: string;
1364
+ kind: CatalogLayer["kind"];
1365
+ } | null;
1366
+ time: number;
1367
+ depth: number;
1368
+ settings: Partial<ZartiglSettings>;
1369
+ timeRange?: TimeRange;
1370
+ geoVideo: Required<GeoVideoOptions>;
1371
+ layer: ArcoLayerDebugInfo | null;
1372
+ }
1373
+
1374
+ declare type ZartiglEventMap = {
1375
+ loading: () => void;
1376
+ loaded: (meta: FieldMeta) => void;
1377
+ error: (err: Error) => void;
1378
+ status: (status: ZartiglStatus) => void;
1379
+ frameBuffered: (ms: number) => void;
1380
+ cacheInvalidated: () => void;
1381
+ timeChange: (time: number) => void;
1382
+ playbackChange: (playing: boolean) => void;
1383
+ };
1384
+
1385
+ export declare class ZartiglFrameUnavailableError extends Error {
1386
+ readonly time: number;
1387
+ readonly statuses: number[];
1388
+ readonly urls: string[];
1389
+ constructor(time: number, statuses: number[], urls: string[]);
1390
+ }
1391
+
1392
+ export declare interface ZartiglOptions {
1393
+ id?: string;
1394
+ map: Map_2;
1395
+ catalog: Catalog;
1396
+ backend?: "auto" | "zarr" | "geovideo" | "wmts";
1397
+ timeRange?: TimeRange;
1398
+ geoVideo?: GeoVideoOptions;
1399
+ visible?: boolean;
1400
+ settings?: Partial<ZartiglSettings>;
1401
+ metadata?: Record<string, unknown>;
1402
+ before?: string;
1403
+ }
1404
+
1405
+ export declare interface ZartiglSettings {
1406
+ palette: ColorRampInput;
1407
+ particleDensity: number;
1408
+ speed: number;
1409
+ fade: number;
1410
+ renderMode: RenderMode;
1411
+ opacity: number;
1412
+ logScale: boolean;
1413
+ vibrance: number;
1414
+ /** Fixed physical-value domain for scalar colors. Null uses frame extrema. */
1415
+ colorDomain: [number, number] | null;
1416
+ particleState: ParticleStateMode;
1417
+ rgba8MaxParticleZoom: number;
1418
+ }
1419
+
1420
+ export declare type ZartiglStatus = {
1421
+ phase: "metadata";
1422
+ } | {
1423
+ phase: "fetching";
1424
+ time: number;
1425
+ completed: number;
1426
+ total: number;
1427
+ } | {
1428
+ phase: "rendering";
1429
+ time: number;
1430
+ } | {
1431
+ phase: "ready";
1432
+ time: number;
1433
+ } | {
1434
+ phase: "blocked";
1435
+ time: number;
1436
+ statuses: number[];
1437
+ message: string;
1438
+ } | {
1439
+ phase: "error";
1440
+ time?: number;
1441
+ error: Error;
1442
+ };
1443
+
1444
+ export { }