@kepler.gl/types 3.3.0-alpha.1 → 3.3.0-alpha.10
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/actions.d.ts +7 -0
- package/components.d.ts +1 -0
- package/datasets.d.ts +0 -5
- package/package.json +1 -1
- package/reducers.d.ts +69 -0
- package/schemas.d.ts +3 -0
package/actions.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import {SavedMap, ParsedConfig, SavedConfigV1, MinSavedConfigV1} from './schemas';
|
|
5
5
|
import type {LayerVisConfig} from './layers';
|
|
6
|
+
import type {ViewportPadding} from './reducers';
|
|
6
7
|
|
|
7
8
|
/** EXPORT_FILE_TO_CLOUD */
|
|
8
9
|
export type MapData = {
|
|
@@ -66,6 +67,12 @@ export type ProtoDataset = {
|
|
|
66
67
|
|
|
67
68
|
export type AddDataToMapOptions = {
|
|
68
69
|
centerMap?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Padding in pixels applied when `centerMap` is true.
|
|
72
|
+
* Use this so a few points are not hidden under the side panel or other UI.
|
|
73
|
+
* A number applies the same padding on all sides.
|
|
74
|
+
*/
|
|
75
|
+
padding?: ViewportPadding;
|
|
69
76
|
readOnly?: boolean;
|
|
70
77
|
keepExistingConfig?: boolean;
|
|
71
78
|
autoCreateLayers?: boolean;
|
package/components.d.ts
CHANGED
package/datasets.d.ts
CHANGED
package/package.json
CHANGED
package/reducers.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright contributors to the kepler.gl project
|
|
3
3
|
|
|
4
4
|
import {Field, Millisecond} from './types';
|
|
5
|
+
import {MapSplitMode, MapViewMode} from '@kepler.gl/constants';
|
|
5
6
|
type MapViewState = {
|
|
6
7
|
latitude: number;
|
|
7
8
|
longitude: number;
|
|
@@ -28,6 +29,8 @@ export type MapState = {
|
|
|
28
29
|
maxBounds?: Bounds;
|
|
29
30
|
initialState?: any;
|
|
30
31
|
scale?: number;
|
|
32
|
+
/** Layer rendering parameters forwarded from visState for use during layer construction in globe mode. */
|
|
33
|
+
layerParameters?: Record<string, string | boolean>;
|
|
31
34
|
|
|
32
35
|
// the following 4 properties assist with split viewports that can optionally have (un)synced viewports and zooms
|
|
33
36
|
/** Is the application split into 2 maps? */
|
|
@@ -38,10 +41,52 @@ export type MapState = {
|
|
|
38
41
|
isZoomLocked: boolean;
|
|
39
42
|
/** An array of either 0 or 2 Viewport objects (index 0 for left map; index 1 for right map) */
|
|
40
43
|
splitMapViewports: Viewport[];
|
|
44
|
+
mapViewMode?: MapViewMode;
|
|
45
|
+
globe?: {
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
config: {
|
|
48
|
+
atmosphere: boolean;
|
|
49
|
+
hugeHalo: boolean;
|
|
50
|
+
hugeHaloRadius: number;
|
|
51
|
+
hugeHaloOpacity: number;
|
|
52
|
+
azimuth: boolean;
|
|
53
|
+
azimuthAngle: number;
|
|
54
|
+
terminator: boolean;
|
|
55
|
+
terminatorOpacity: number;
|
|
56
|
+
basemap: boolean;
|
|
57
|
+
labels: boolean;
|
|
58
|
+
labelsColor: [number, number, number];
|
|
59
|
+
adminLines: boolean;
|
|
60
|
+
adminLinesColor: [number, number, number];
|
|
61
|
+
water: boolean;
|
|
62
|
+
waterColor: [number, number, number];
|
|
63
|
+
surfaceColor: [number, number, number];
|
|
64
|
+
surface: boolean;
|
|
65
|
+
backgroundColor: [number, number, number];
|
|
66
|
+
stars: boolean;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/** The current split map mode (single, dual, swipe) */
|
|
70
|
+
mapSplitMode: MapSplitMode;
|
|
71
|
+
/** Swipe compare divider position as a percentage (0-100) */
|
|
72
|
+
swipeComparePercentage: number;
|
|
41
73
|
};
|
|
42
74
|
|
|
43
75
|
export type Bounds = [number, number, number, number];
|
|
44
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Padding in pixels used when fitting the map viewport to bounds.
|
|
79
|
+
* A number applies the same padding on all sides.
|
|
80
|
+
*/
|
|
81
|
+
export type ViewportPadding =
|
|
82
|
+
| number
|
|
83
|
+
| {
|
|
84
|
+
top?: number;
|
|
85
|
+
bottom?: number;
|
|
86
|
+
left?: number;
|
|
87
|
+
right?: number;
|
|
88
|
+
};
|
|
89
|
+
|
|
45
90
|
export type RangeFieldDomain = {
|
|
46
91
|
domain: number[];
|
|
47
92
|
step: number;
|
|
@@ -250,6 +295,20 @@ export type SplitMap = {
|
|
|
250
295
|
layers: SplitMapLayers;
|
|
251
296
|
};
|
|
252
297
|
|
|
298
|
+
export type LayerOrderGroup = {
|
|
299
|
+
id: string;
|
|
300
|
+
label: string;
|
|
301
|
+
isVisible: boolean;
|
|
302
|
+
layerOrder: LayerOrder;
|
|
303
|
+
isIncludedInLegend: boolean;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
export type LayerOrderEntry = string | LayerOrderGroup;
|
|
307
|
+
export type LayerOrder = LayerOrderEntry[];
|
|
308
|
+
export type FlatLayerOrder = string[];
|
|
309
|
+
export type LayerOrderHierarchyEntry = ['layer', any] | ['layerGroup', LayerOrderGroup];
|
|
310
|
+
export type LayerOrderHierarchy = LayerOrderHierarchyEntry[];
|
|
311
|
+
|
|
253
312
|
/** See "Locale aware formats" at https://momentjs.com/docs/#/parsing/string-format/ */
|
|
254
313
|
export type AnimationConfigTimeFormat = 'L' | 'L LT' | 'L LTS';
|
|
255
314
|
|
|
@@ -429,6 +488,9 @@ export type ExportVideo = {
|
|
|
429
488
|
fileName: string;
|
|
430
489
|
resolution: string;
|
|
431
490
|
durationMs: number;
|
|
491
|
+
swipeStartPct: number;
|
|
492
|
+
swipeEndPct: number;
|
|
493
|
+
swipeEasing: 'linear' | 'ease-in-out';
|
|
432
494
|
};
|
|
433
495
|
|
|
434
496
|
export type MapControlItem = {
|
|
@@ -459,9 +521,12 @@ export type MapControls = {
|
|
|
459
521
|
splitMap?: MapControlItem;
|
|
460
522
|
mapDraw?: MapControlItem;
|
|
461
523
|
mapLocale?: MapControlItem;
|
|
524
|
+
mapTheme?: MapControlItem;
|
|
462
525
|
effect?: MapControlItem;
|
|
463
526
|
annotation?: MapControlItem;
|
|
527
|
+
sqlPanel?: MapControlItem;
|
|
464
528
|
aiAssistant?: MapControlItem;
|
|
529
|
+
[key: string]: MapControlItem | MapControlMapLegend | undefined;
|
|
465
530
|
};
|
|
466
531
|
|
|
467
532
|
export type LoadFiles = {
|
|
@@ -479,6 +544,8 @@ export type Notifications = {
|
|
|
479
544
|
|
|
480
545
|
export type Locale = string;
|
|
481
546
|
|
|
547
|
+
export type UiTheme = string;
|
|
548
|
+
|
|
482
549
|
export type PanelListView = string;
|
|
483
550
|
|
|
484
551
|
export type UiState = {
|
|
@@ -503,6 +570,8 @@ export type UiState = {
|
|
|
503
570
|
loadFiles: LoadFiles;
|
|
504
571
|
// Locale of the UI
|
|
505
572
|
locale: Locale;
|
|
573
|
+
// Theme of the UI (`light` | `dark`), used when enableThemeToggle is on
|
|
574
|
+
theme: UiTheme;
|
|
506
575
|
// view layers by list or dataset
|
|
507
576
|
layerPanelListView: PanelListView;
|
|
508
577
|
// view filters by list or dataset
|
package/schemas.d.ts
CHANGED
|
@@ -107,6 +107,7 @@ export type SavedVisState = {
|
|
|
107
107
|
splitMaps: SplitMap[];
|
|
108
108
|
animationConfig: SavedAnimationConfig;
|
|
109
109
|
editor?: SavedEditor;
|
|
110
|
+
layerOrder?: any[];
|
|
110
111
|
};
|
|
111
112
|
|
|
112
113
|
// Min saved config can be passed to addDataToMap
|
|
@@ -132,6 +133,7 @@ export type ParsedVisState = {
|
|
|
132
133
|
overlayBlending?: string;
|
|
133
134
|
splitMaps?: SplitMap[];
|
|
134
135
|
animationConfig?: Partial<SavedAnimationConfig>;
|
|
136
|
+
layerOrder?: any[];
|
|
135
137
|
};
|
|
136
138
|
|
|
137
139
|
export type ParsedUiState = {
|
|
@@ -150,6 +152,7 @@ export type ParsedUiState = {
|
|
|
150
152
|
};
|
|
151
153
|
};
|
|
152
154
|
locale?: string;
|
|
155
|
+
theme?: string;
|
|
153
156
|
};
|
|
154
157
|
|
|
155
158
|
export type SavedMapState = {
|