@fxi/zartigl 0.9.2 → 0.10.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/README.md +28 -1
- package/dist/catalog.d.ts +25 -5
- package/dist/catalog.js +203 -174
- package/dist/engine.d.ts +78 -8
- package/dist/engine.js +48 -38
- package/dist/{geovideo-index-CzQo6UIG.js → geovideo-index-BJjE_fgO.js} +378 -250
- package/dist/zartigl.d.ts +60 -7
- package/dist/zartigl.js +668 -663
- package/package.json +2 -2
package/dist/zartigl.d.ts
CHANGED
|
@@ -2,6 +2,19 @@ import { CustomLayerInterface } from 'maplibre-gl';
|
|
|
2
2
|
import { CustomRenderMethodInput } from 'maplibre-gl';
|
|
3
3
|
import { Map as Map_2 } from 'maplibre-gl';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Transparent ends of a ramp, as fractions of the ramp from each end: `low`
|
|
7
|
+
* fades the lowest values in from transparent, `high` fades the highest out.
|
|
8
|
+
*/
|
|
9
|
+
export declare interface AlphaFade {
|
|
10
|
+
low?: number;
|
|
11
|
+
high?: number;
|
|
12
|
+
curve?: AlphaFadeCurve;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Shape of an alpha fade inside its zone; the same curves as `logScale`. */
|
|
16
|
+
export declare type AlphaFadeCurve = "linear" | "log" | "exp";
|
|
17
|
+
|
|
5
18
|
/** Particle backdrop off: see BackdropStyle. */
|
|
6
19
|
export declare const BACKDROP_OFF: Readonly<BackdropStyle>;
|
|
7
20
|
|
|
@@ -532,7 +545,7 @@ declare interface GeoVideoScalarEncoding {
|
|
|
532
545
|
codeMax: number;
|
|
533
546
|
valueMin: number;
|
|
534
547
|
valueMax: number;
|
|
535
|
-
transfer: "linear";
|
|
548
|
+
transfer: "linear" | "log10-1p9";
|
|
536
549
|
colorSpace: "bt709";
|
|
537
550
|
colorRange: "limited" | "full";
|
|
538
551
|
}
|
|
@@ -566,7 +579,13 @@ declare interface GeoVideoVectorEncoding {
|
|
|
566
579
|
colorRange: "limited" | "full";
|
|
567
580
|
}
|
|
568
581
|
|
|
569
|
-
|
|
582
|
+
/**
|
|
583
|
+
* Palettes to offer, without deprecated ones (still resolvable for old
|
|
584
|
+
* configs) unless `includeDeprecated`.
|
|
585
|
+
*/
|
|
586
|
+
export declare function getPalettes(options?: {
|
|
587
|
+
includeDeprecated?: boolean;
|
|
588
|
+
}): PaletteMeta[];
|
|
570
589
|
|
|
571
590
|
export declare function getVectorDerivationVariables(derivation: VectorDerivation): [string, string];
|
|
572
591
|
|
|
@@ -611,6 +630,8 @@ declare type LayerEventMap_2 = {
|
|
|
611
630
|
declare interface LayerStyle {
|
|
612
631
|
/** Palette id; undefined lets the engine pick its own. */
|
|
613
632
|
palette?: string;
|
|
633
|
+
/** Run the palette from its last color to its first, for raster and particles. */
|
|
634
|
+
reversePalette: boolean;
|
|
614
635
|
renderMode: StyleRenderMode;
|
|
615
636
|
particles: ParticleStyle;
|
|
616
637
|
raster: RasterStyle;
|
|
@@ -619,6 +640,7 @@ declare interface LayerStyle {
|
|
|
619
640
|
/** A partial style: any key left out takes the value below it. */
|
|
620
641
|
declare interface LayerStyleInput {
|
|
621
642
|
palette?: string;
|
|
643
|
+
reversePalette?: boolean;
|
|
622
644
|
renderMode?: StyleRenderMode;
|
|
623
645
|
particles?: ParticleStyleInput;
|
|
624
646
|
raster?: Partial<RasterStyle>;
|
|
@@ -630,6 +652,10 @@ export declare const LEGACY_STYLE_SETTINGS: Readonly<Partial<Record<keyof Zartig
|
|
|
630
652
|
export declare type Legend = {
|
|
631
653
|
type: "gradient";
|
|
632
654
|
palette: string;
|
|
655
|
+
/** The palette runs from its last color to its first. */
|
|
656
|
+
reverse?: boolean;
|
|
657
|
+
/** Transparent ends of the ramp, already in the legend colors. */
|
|
658
|
+
alphaFade?: AlphaFade;
|
|
633
659
|
min?: number;
|
|
634
660
|
max?: number;
|
|
635
661
|
unit?: string;
|
|
@@ -872,6 +898,17 @@ declare interface RasterStyle {
|
|
|
872
898
|
vibrance: number;
|
|
873
899
|
/** Fixed physical-value domain; null follows the data. */
|
|
874
900
|
colorDomain: [number, number] | null;
|
|
901
|
+
/**
|
|
902
|
+
* Fraction of the color range, from its low end, over which colors fade in
|
|
903
|
+
* from transparent, [0, 1]: a field that is mostly zero (fires, heat
|
|
904
|
+
* stress) shows only where something happens. Values below the domain are
|
|
905
|
+
* transparent too.
|
|
906
|
+
*/
|
|
907
|
+
alphaFadeLow: number;
|
|
908
|
+
/** Fraction of the color range, from its high end, fading out, [0, 1]. */
|
|
909
|
+
alphaFadeHigh: number;
|
|
910
|
+
/** Shape of both fades: "log" rises fast, "exp" stays faint longer. */
|
|
911
|
+
alphaFadeCurve: AlphaFadeCurve;
|
|
875
912
|
}
|
|
876
913
|
|
|
877
914
|
export declare type RenderMode = "raster" | "particles" | "raster+particles";
|
|
@@ -890,6 +927,16 @@ export declare function resolveBackdrop(input?: Partial<BackdropStyle>): Backdro
|
|
|
890
927
|
*/
|
|
891
928
|
export declare function resolveColorGrade(input?: Partial<ColorGrade>): ColorGrade;
|
|
892
929
|
|
|
930
|
+
/**
|
|
931
|
+
* Stops of a ramp, reversed on request, then with `alphaFade` multiplied into
|
|
932
|
+
* the alpha of its ends. The fade follows positions, not colors: on a reversed
|
|
933
|
+
* ramp it still fades the low values.
|
|
934
|
+
*/
|
|
935
|
+
export declare function resolveColorRamp(input: ColorRampInput, options?: {
|
|
936
|
+
reverse?: boolean;
|
|
937
|
+
alphaFade?: AlphaFade;
|
|
938
|
+
}): Record<number, string>;
|
|
939
|
+
|
|
893
940
|
/** Resolve a native date/time control value against actual available times. */
|
|
894
941
|
export declare function resolveTimeInputSelection(values: readonly number[], value: string, granularity: TimeGranularity): number | undefined;
|
|
895
942
|
|
|
@@ -1080,11 +1127,6 @@ export declare function stitchVelocityChunks(uChunks: Array<{
|
|
|
1080
1127
|
north: number;
|
|
1081
1128
|
}, latDescending?: boolean, scalarMode?: boolean): VelocityData;
|
|
1082
1129
|
|
|
1083
|
-
/**
|
|
1084
|
-
* Layer style: how a layer looks, with the same keys in the catalog
|
|
1085
|
-
* `defaults`, the engines and story views. Playback (how time moves) is not
|
|
1086
|
-
* part of it, so `particles.speed` is always the particle speed.
|
|
1087
|
-
*/
|
|
1088
1130
|
declare type StyleRenderMode = "particles" | "raster" | "raster+particles";
|
|
1089
1131
|
|
|
1090
1132
|
export declare type TimeGranularity = "year" | "month" | "day" | "hour" | "minute" | "second";
|
|
@@ -1101,6 +1143,11 @@ export declare interface TimeMeta {
|
|
|
1101
1143
|
timelineKind?: GeoVideoManifest["timeline"]["kind"];
|
|
1102
1144
|
}
|
|
1103
1145
|
|
|
1146
|
+
/**
|
|
1147
|
+
* Time windows shared by zartigl and the renderers built on its engine: a
|
|
1148
|
+
* fixed `start`/`end`, either side open, or the `trailing` ISO 8601 duration
|
|
1149
|
+
* before the latest available time.
|
|
1150
|
+
*/
|
|
1104
1151
|
export declare type TimeRange = {
|
|
1105
1152
|
start?: Date | string | number;
|
|
1106
1153
|
end?: Date | string | number;
|
|
@@ -1839,6 +1886,8 @@ export declare interface ZartiglOptions {
|
|
|
1839
1886
|
|
|
1840
1887
|
export declare interface ZartiglSettings {
|
|
1841
1888
|
palette: ColorRampInput;
|
|
1889
|
+
/** Run the palette from its last color to its first. */
|
|
1890
|
+
reversePalette: boolean;
|
|
1842
1891
|
particleDensity: number;
|
|
1843
1892
|
speed: number;
|
|
1844
1893
|
fade: number;
|
|
@@ -1855,6 +1904,10 @@ export declare interface ZartiglSettings {
|
|
|
1855
1904
|
backdrop: Partial<BackdropStyle>;
|
|
1856
1905
|
/** Fixed physical-value domain for scalar colors. Null uses frame extrema. */
|
|
1857
1906
|
colorDomain: [number, number] | null;
|
|
1907
|
+
/** Transparent ends of the color range, as in RasterStyle. */
|
|
1908
|
+
alphaFadeLow: number;
|
|
1909
|
+
alphaFadeHigh: number;
|
|
1910
|
+
alphaFadeCurve: AlphaFadeCurve;
|
|
1858
1911
|
particleState: ParticleStateMode;
|
|
1859
1912
|
rgba8MaxParticleZoom: number;
|
|
1860
1913
|
}
|