@kepler.gl/types 3.3.0-alpha.1 → 3.3.0-alpha.3
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/datasets.d.ts +0 -5
- package/package.json +1 -1
- package/reducers.d.ts +22 -0
- package/schemas.d.ts +2 -0
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} from '@kepler.gl/constants';
|
|
5
6
|
type MapViewState = {
|
|
6
7
|
latitude: number;
|
|
7
8
|
longitude: number;
|
|
@@ -38,6 +39,10 @@ export type MapState = {
|
|
|
38
39
|
isZoomLocked: boolean;
|
|
39
40
|
/** An array of either 0 or 2 Viewport objects (index 0 for left map; index 1 for right map) */
|
|
40
41
|
splitMapViewports: Viewport[];
|
|
42
|
+
/** The current split map mode (single, dual, swipe) */
|
|
43
|
+
mapSplitMode: MapSplitMode;
|
|
44
|
+
/** Swipe compare divider position as a percentage (0-100) */
|
|
45
|
+
swipeComparePercentage: number;
|
|
41
46
|
};
|
|
42
47
|
|
|
43
48
|
export type Bounds = [number, number, number, number];
|
|
@@ -250,6 +255,20 @@ export type SplitMap = {
|
|
|
250
255
|
layers: SplitMapLayers;
|
|
251
256
|
};
|
|
252
257
|
|
|
258
|
+
export type LayerOrderGroup = {
|
|
259
|
+
id: string;
|
|
260
|
+
label: string;
|
|
261
|
+
isVisible: boolean;
|
|
262
|
+
layerOrder: LayerOrder;
|
|
263
|
+
isIncludedInLegend: boolean;
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
export type LayerOrderEntry = string | LayerOrderGroup;
|
|
267
|
+
export type LayerOrder = LayerOrderEntry[];
|
|
268
|
+
export type FlatLayerOrder = string[];
|
|
269
|
+
export type LayerOrderHierarchyEntry = ['layer', any] | ['layerGroup', LayerOrderGroup];
|
|
270
|
+
export type LayerOrderHierarchy = LayerOrderHierarchyEntry[];
|
|
271
|
+
|
|
253
272
|
/** See "Locale aware formats" at https://momentjs.com/docs/#/parsing/string-format/ */
|
|
254
273
|
export type AnimationConfigTimeFormat = 'L' | 'L LT' | 'L LTS';
|
|
255
274
|
|
|
@@ -429,6 +448,9 @@ export type ExportVideo = {
|
|
|
429
448
|
fileName: string;
|
|
430
449
|
resolution: string;
|
|
431
450
|
durationMs: number;
|
|
451
|
+
swipeStartPct: number;
|
|
452
|
+
swipeEndPct: number;
|
|
453
|
+
swipeEasing: 'linear' | 'ease-in-out';
|
|
432
454
|
};
|
|
433
455
|
|
|
434
456
|
export type MapControlItem = {
|
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 = {
|