@dclimate/zarr-map 0.1.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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +374 -0
  3. package/dist/core/index.cjs +1603 -0
  4. package/dist/core/index.cjs.map +1 -0
  5. package/dist/core/index.d.cts +50 -0
  6. package/dist/core/index.d.ts +50 -0
  7. package/dist/core/index.js +1575 -0
  8. package/dist/core/index.js.map +1 -0
  9. package/dist/dclimate/index.cjs +1859 -0
  10. package/dist/dclimate/index.cjs.map +1 -0
  11. package/dist/dclimate/index.d.cts +80 -0
  12. package/dist/dclimate/index.d.ts +80 -0
  13. package/dist/dclimate/index.js +1856 -0
  14. package/dist/dclimate/index.js.map +1 -0
  15. package/dist/index.cjs +3071 -0
  16. package/dist/index.cjs.map +1 -0
  17. package/dist/index.d.cts +5 -0
  18. package/dist/index.d.ts +5 -0
  19. package/dist/index.js +3038 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/jaxray-CZWT_ZgD.d.ts +57 -0
  22. package/dist/jaxray-D_mmLPHk.d.cts +57 -0
  23. package/dist/react/index.cjs +3953 -0
  24. package/dist/react/index.cjs.map +1 -0
  25. package/dist/react/index.d.cts +71 -0
  26. package/dist/react/index.d.ts +71 -0
  27. package/dist/react/index.js +3945 -0
  28. package/dist/react/index.js.map +1 -0
  29. package/dist/renderers/index.cjs +903 -0
  30. package/dist/renderers/index.cjs.map +1 -0
  31. package/dist/renderers/index.d.cts +115 -0
  32. package/dist/renderers/index.d.ts +115 -0
  33. package/dist/renderers/index.js +899 -0
  34. package/dist/renderers/index.js.map +1 -0
  35. package/dist/types-DEZwfJNY.d.cts +210 -0
  36. package/dist/types-DEZwfJNY.d.ts +210 -0
  37. package/docs/README.md +12 -0
  38. package/docs/api-design.md +185 -0
  39. package/docs/architecture.md +246 -0
  40. package/docs/decision-record-renderer.md +144 -0
  41. package/docs/package-boundaries.md +50 -0
  42. package/docs/release-checklist.md +31 -0
  43. package/package.json +121 -0
@@ -0,0 +1,71 @@
1
+ import { CreateDClimateSourceOptions, DClimateDatasetRequest, DClimateSelectionBounds, DClimateBoundsSelection, DClimateBoundsSelectionOptions, DClimateTimeRange } from '../dclimate/index.cjs';
2
+ import { MapLibreMapConfig, GridLayerOptions, GridLayerLoadingState, GridLayerController } from '../renderers/index.cjs';
3
+ import { d as GridDataSource, u as GridSelectors, a as GridColorScale, n as GridQuerySample, m as GridQueryResult, q as GridRequestPreflightConfig, p as GridRequestPreflight, T as TimeCoordinate } from '../types-DEZwfJNY.cjs';
4
+ import { CSSProperties, ReactNode } from 'react';
5
+ import '../jaxray-D_mmLPHk.cjs';
6
+
7
+ declare function useMountEffect(effect: () => void | (() => void)): void;
8
+
9
+ declare const BASE_PLAYBACK_INTERVAL_MS = 700;
10
+ declare const PLAYBACK_SPEED_OPTIONS: readonly [1, 1.5, 2, 3];
11
+ interface LegendProps {
12
+ colorScale: GridColorScale;
13
+ label?: string;
14
+ }
15
+ declare function Legend({ colorScale, label }: LegendProps): ReactNode;
16
+ interface TimeSliderProps {
17
+ source: GridDataSource;
18
+ dimension?: string;
19
+ value?: number;
20
+ defaultValue?: number;
21
+ debounceMs?: number;
22
+ autoPlay?: boolean;
23
+ playback?: boolean;
24
+ playbackIntervalMs?: number;
25
+ onChange?: (coordinate: TimeCoordinate) => void;
26
+ }
27
+ declare function TimeSlider({ source, dimension, value, defaultValue, debounceMs, autoPlay, playback, playbackIntervalMs, onChange }: TimeSliderProps): ReactNode;
28
+ interface ZarrMapProps {
29
+ source: GridDataSource;
30
+ variable: string;
31
+ selector?: GridSelectors;
32
+ initialSelector?: GridSelectors;
33
+ colorScale?: GridColorScale;
34
+ opacity?: number;
35
+ map: Omit<MapLibreMapConfig, "container">;
36
+ timeDimension?: string;
37
+ controls?: {
38
+ legend?: boolean;
39
+ timeSlider?: boolean;
40
+ timePlayback?: boolean;
41
+ timePlaybackAutoPlay?: boolean;
42
+ inspect?: ZarrMapInspectControl;
43
+ };
44
+ className?: string;
45
+ style?: CSSProperties;
46
+ renderer?: Pick<GridLayerOptions, "layerFactory" | "mapFactory">;
47
+ formatInspectValue?: (sample: GridQuerySample, result: GridQueryResult) => ReactNode;
48
+ onSelectorChange?: (selector: GridSelectors) => void;
49
+ onInspect?: (result: GridQueryResult) => void;
50
+ onLoadingStateChange?: (state: GridLayerLoadingState) => void;
51
+ onReady?: (controller: GridLayerController) => void;
52
+ children?: ReactNode;
53
+ }
54
+ type ZarrMapInspectMode = "click" | "hover";
55
+ type ZarrMapInspectControl = boolean | ZarrMapInspectMode | {
56
+ mode?: ZarrMapInspectMode;
57
+ debounceMs?: number;
58
+ };
59
+ declare function ZarrMap(props: ZarrMapProps): ReactNode;
60
+ interface DClimateZarrMapProps extends Omit<ZarrMapProps, "source">, Pick<CreateDClimateSourceOptions, "client" | "clientOptions" | "gatewayUrl" | "openIpfsStore"> {
61
+ dataset: DClimateDatasetRequest;
62
+ bounds?: DClimateSelectionBounds | DClimateBoundsSelection;
63
+ boundsOptions?: DClimateBoundsSelectionOptions;
64
+ timeRange?: DClimateTimeRange;
65
+ preflight?: GridRequestPreflightConfig;
66
+ onPreflight?: (preflight: GridRequestPreflight) => void;
67
+ sourceOptions?: Omit<CreateDClimateSourceOptions, "client" | "clientOptions" | "gatewayUrl" | "openIpfsStore" | "preflight">;
68
+ }
69
+ declare function DClimateZarrMap(props: DClimateZarrMapProps): ReactNode;
70
+
71
+ export { BASE_PLAYBACK_INTERVAL_MS, DClimateZarrMap, type DClimateZarrMapProps, Legend, type LegendProps, PLAYBACK_SPEED_OPTIONS, TimeSlider, type TimeSliderProps, ZarrMap, type ZarrMapInspectControl, type ZarrMapInspectMode, type ZarrMapProps, useMountEffect };
@@ -0,0 +1,71 @@
1
+ import { CreateDClimateSourceOptions, DClimateDatasetRequest, DClimateSelectionBounds, DClimateBoundsSelection, DClimateBoundsSelectionOptions, DClimateTimeRange } from '../dclimate/index.js';
2
+ import { MapLibreMapConfig, GridLayerOptions, GridLayerLoadingState, GridLayerController } from '../renderers/index.js';
3
+ import { d as GridDataSource, u as GridSelectors, a as GridColorScale, n as GridQuerySample, m as GridQueryResult, q as GridRequestPreflightConfig, p as GridRequestPreflight, T as TimeCoordinate } from '../types-DEZwfJNY.js';
4
+ import { CSSProperties, ReactNode } from 'react';
5
+ import '../jaxray-CZWT_ZgD.js';
6
+
7
+ declare function useMountEffect(effect: () => void | (() => void)): void;
8
+
9
+ declare const BASE_PLAYBACK_INTERVAL_MS = 700;
10
+ declare const PLAYBACK_SPEED_OPTIONS: readonly [1, 1.5, 2, 3];
11
+ interface LegendProps {
12
+ colorScale: GridColorScale;
13
+ label?: string;
14
+ }
15
+ declare function Legend({ colorScale, label }: LegendProps): ReactNode;
16
+ interface TimeSliderProps {
17
+ source: GridDataSource;
18
+ dimension?: string;
19
+ value?: number;
20
+ defaultValue?: number;
21
+ debounceMs?: number;
22
+ autoPlay?: boolean;
23
+ playback?: boolean;
24
+ playbackIntervalMs?: number;
25
+ onChange?: (coordinate: TimeCoordinate) => void;
26
+ }
27
+ declare function TimeSlider({ source, dimension, value, defaultValue, debounceMs, autoPlay, playback, playbackIntervalMs, onChange }: TimeSliderProps): ReactNode;
28
+ interface ZarrMapProps {
29
+ source: GridDataSource;
30
+ variable: string;
31
+ selector?: GridSelectors;
32
+ initialSelector?: GridSelectors;
33
+ colorScale?: GridColorScale;
34
+ opacity?: number;
35
+ map: Omit<MapLibreMapConfig, "container">;
36
+ timeDimension?: string;
37
+ controls?: {
38
+ legend?: boolean;
39
+ timeSlider?: boolean;
40
+ timePlayback?: boolean;
41
+ timePlaybackAutoPlay?: boolean;
42
+ inspect?: ZarrMapInspectControl;
43
+ };
44
+ className?: string;
45
+ style?: CSSProperties;
46
+ renderer?: Pick<GridLayerOptions, "layerFactory" | "mapFactory">;
47
+ formatInspectValue?: (sample: GridQuerySample, result: GridQueryResult) => ReactNode;
48
+ onSelectorChange?: (selector: GridSelectors) => void;
49
+ onInspect?: (result: GridQueryResult) => void;
50
+ onLoadingStateChange?: (state: GridLayerLoadingState) => void;
51
+ onReady?: (controller: GridLayerController) => void;
52
+ children?: ReactNode;
53
+ }
54
+ type ZarrMapInspectMode = "click" | "hover";
55
+ type ZarrMapInspectControl = boolean | ZarrMapInspectMode | {
56
+ mode?: ZarrMapInspectMode;
57
+ debounceMs?: number;
58
+ };
59
+ declare function ZarrMap(props: ZarrMapProps): ReactNode;
60
+ interface DClimateZarrMapProps extends Omit<ZarrMapProps, "source">, Pick<CreateDClimateSourceOptions, "client" | "clientOptions" | "gatewayUrl" | "openIpfsStore"> {
61
+ dataset: DClimateDatasetRequest;
62
+ bounds?: DClimateSelectionBounds | DClimateBoundsSelection;
63
+ boundsOptions?: DClimateBoundsSelectionOptions;
64
+ timeRange?: DClimateTimeRange;
65
+ preflight?: GridRequestPreflightConfig;
66
+ onPreflight?: (preflight: GridRequestPreflight) => void;
67
+ sourceOptions?: Omit<CreateDClimateSourceOptions, "client" | "clientOptions" | "gatewayUrl" | "openIpfsStore" | "preflight">;
68
+ }
69
+ declare function DClimateZarrMap(props: DClimateZarrMapProps): ReactNode;
70
+
71
+ export { BASE_PLAYBACK_INTERVAL_MS, DClimateZarrMap, type DClimateZarrMapProps, Legend, type LegendProps, PLAYBACK_SPEED_OPTIONS, TimeSlider, type TimeSliderProps, ZarrMap, type ZarrMapInspectControl, type ZarrMapInspectMode, type ZarrMapProps, useMountEffect };