@kepler.gl/types 3.3.0-alpha.18 → 3.3.0-alpha.19
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/annotations.d.ts +16 -1
- package/camera.d.ts +28 -0
- package/index.d.ts +1 -0
- package/layers.d.ts +14 -0
- package/package.json +1 -1
- package/reducers.d.ts +4 -0
- package/schemas.d.ts +21 -1
package/annotations.d.ts
CHANGED
|
@@ -52,6 +52,21 @@ export type CircleAnnotation = AnnotationWithArm & {
|
|
|
52
52
|
radiusInMeters: number;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
export type
|
|
55
|
+
export type RulerAnnotation = BaseAnnotation & {
|
|
56
|
+
kind: AnnotationKind.RULER;
|
|
57
|
+
/** Second [lng, lat] or [lng, lat, altitudeMeters] endpoint. */
|
|
58
|
+
endPoint: [number, number] | [number, number, number];
|
|
59
|
+
/** Whether the user-authored rich text is rendered at the ruler midpoint. */
|
|
60
|
+
showCustomText: boolean;
|
|
61
|
+
/** Whether the computed geodesic length is rendered at the ruler midpoint. */
|
|
62
|
+
showDistance: boolean;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type Annotation =
|
|
66
|
+
| TextAnnotation
|
|
67
|
+
| PointAnnotation
|
|
68
|
+
| ArrowAnnotation
|
|
69
|
+
| CircleAnnotation
|
|
70
|
+
| RulerAnnotation;
|
|
56
71
|
|
|
57
72
|
export type AnnotationPropsPartial = Partial<Annotation>;
|
package/camera.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Copyright contributors to the kepler.gl project
|
|
3
|
+
|
|
4
|
+
/** A saved Mercator view, independent of viewport size and animation state. */
|
|
5
|
+
export type CameraSnapshot = {
|
|
6
|
+
longitude: number;
|
|
7
|
+
latitude: number;
|
|
8
|
+
zoom: number;
|
|
9
|
+
bearing: number;
|
|
10
|
+
pitch: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type CameraBookmark = {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
camera: CameraSnapshot;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** Stops own their camera snapshots; there is no live bookmark reference. */
|
|
20
|
+
export type CameraTourStop = CameraBookmark & {
|
|
21
|
+
holdDurationMs: number;
|
|
22
|
+
/** Travel to the next stop; ignored for the final stop. */
|
|
23
|
+
travelDurationMs: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type CameraTour = {
|
|
27
|
+
stops: CameraTourStop[];
|
|
28
|
+
};
|
package/index.d.ts
CHANGED
package/layers.d.ts
CHANGED
|
@@ -26,6 +26,10 @@ export type LayerBaseConfig = {
|
|
|
26
26
|
animation: {
|
|
27
27
|
enabled: boolean;
|
|
28
28
|
domain?: [number, number] | null;
|
|
29
|
+
/** Discrete instants the layer can render, for layers without continuous time. */
|
|
30
|
+
timeSteps?: number[] | null;
|
|
31
|
+
startTime?: number | null;
|
|
32
|
+
duration?: number | null;
|
|
29
33
|
};
|
|
30
34
|
|
|
31
35
|
// for aggregate layer, aggregatedBins is returned for custom color scale
|
|
@@ -318,6 +322,15 @@ export type VisConfigColorRange = VisConfig & {
|
|
|
318
322
|
defaultValue: ColorRange;
|
|
319
323
|
};
|
|
320
324
|
|
|
325
|
+
/**
|
|
326
|
+
* A plain JSON value whose keys are not known until runtime. The layer renders
|
|
327
|
+
* its own UI for it; the value is saved and restored with the rest of visConfig.
|
|
328
|
+
*/
|
|
329
|
+
export type VisConfigObject = VisConfig & {
|
|
330
|
+
type: 'object';
|
|
331
|
+
defaultValue: Record<string, any>;
|
|
332
|
+
};
|
|
333
|
+
|
|
321
334
|
export type LayerVisConfigTypes =
|
|
322
335
|
| VisConfigBoolean
|
|
323
336
|
| VisConfigNumber
|
|
@@ -326,6 +339,7 @@ export type LayerVisConfigTypes =
|
|
|
326
339
|
| VisConfigColorSelect
|
|
327
340
|
| VisConfigInput
|
|
328
341
|
| VisConfigSelect
|
|
342
|
+
| VisConfigObject
|
|
329
343
|
| VisConfigObjectSelection;
|
|
330
344
|
|
|
331
345
|
export type LayerVisConfigSettings = {
|
package/package.json
CHANGED
package/reducers.d.ts
CHANGED
|
@@ -585,6 +585,10 @@ export type ExportMap = {
|
|
|
585
585
|
appName?: string;
|
|
586
586
|
/** Optional application website override for exported HTML and JSON. */
|
|
587
587
|
appWebsite?: string;
|
|
588
|
+
/** Optional application icon URL override for exported HTML and JSON. */
|
|
589
|
+
appIcon?: string;
|
|
590
|
+
/** Optional application name color override for exported HTML and JSON. */
|
|
591
|
+
appNameColor?: string;
|
|
588
592
|
};
|
|
589
593
|
|
|
590
594
|
export type ExportVideo = {
|
package/schemas.d.ts
CHANGED
|
@@ -3,10 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
import {RGBColor, Merge, RequireFrom} from './types';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
Filter,
|
|
8
|
+
InteractionConfig,
|
|
9
|
+
AnimationConfig,
|
|
10
|
+
SplitMap,
|
|
11
|
+
Feature,
|
|
12
|
+
MapLegendControlSettings
|
|
13
|
+
} from './reducers';
|
|
7
14
|
|
|
8
15
|
import {LayerTextLabel} from './layers';
|
|
9
16
|
import {ChartConfig} from './charts';
|
|
17
|
+
import {CameraBookmark, CameraTour} from './camera';
|
|
10
18
|
|
|
11
19
|
export type SavedFilter = {
|
|
12
20
|
dataId: Filter['dataId'];
|
|
@@ -116,6 +124,8 @@ export type SavedEditor = {
|
|
|
116
124
|
};
|
|
117
125
|
|
|
118
126
|
export type SavedVisState = {
|
|
127
|
+
cameraTour?: CameraTour;
|
|
128
|
+
cameraBookmarks?: CameraBookmark[];
|
|
119
129
|
filters: SavedFilter[];
|
|
120
130
|
layers: SavedLayer[];
|
|
121
131
|
effects: SavedEffect[];
|
|
@@ -133,6 +143,8 @@ export type SavedVisState = {
|
|
|
133
143
|
|
|
134
144
|
// Min saved config can be passed to addDataToMap
|
|
135
145
|
export type MinSavedVisStateV1 = {
|
|
146
|
+
cameraTour?: CameraTour;
|
|
147
|
+
cameraBookmarks?: CameraBookmark[];
|
|
136
148
|
filters?: MinSavedFilter[];
|
|
137
149
|
layers?: MinSavedLayer[];
|
|
138
150
|
effects?: SavedEffect[];
|
|
@@ -146,6 +158,8 @@ export type MinSavedVisStateV1 = {
|
|
|
146
158
|
};
|
|
147
159
|
|
|
148
160
|
export type ParsedVisState = {
|
|
161
|
+
cameraTour?: CameraTour | null;
|
|
162
|
+
cameraBookmarks?: CameraBookmark[];
|
|
149
163
|
layers?: ParsedLayer[];
|
|
150
164
|
effects?: ParsedEffect[];
|
|
151
165
|
charts?: ChartConfig[];
|
|
@@ -181,6 +195,10 @@ export type ParsedUiState = {
|
|
|
181
195
|
active?: boolean;
|
|
182
196
|
show?: boolean;
|
|
183
197
|
};
|
|
198
|
+
cameraBookmarks?: {
|
|
199
|
+
show?: boolean;
|
|
200
|
+
settings?: Partial<MapLegendControlSettings>;
|
|
201
|
+
};
|
|
184
202
|
};
|
|
185
203
|
locale?: string;
|
|
186
204
|
theme?: string;
|
|
@@ -301,6 +319,8 @@ export type SavedMap = {
|
|
|
301
319
|
source?: string;
|
|
302
320
|
appName?: string;
|
|
303
321
|
appWebsite?: string;
|
|
322
|
+
appIcon?: string;
|
|
323
|
+
appNameColor?: string;
|
|
304
324
|
};
|
|
305
325
|
};
|
|
306
326
|
|