@kepler.gl/types 3.0.0-alpha.1 → 3.0.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/actions.d.ts +5 -0
- package/components.d.ts +3 -0
- package/effects.d.ts +33 -13
- package/index.d.ts +3 -0
- package/layers.d.ts +3 -0
- package/package.json +3 -3
- package/reducers.d.ts +4 -0
- package/schemas.d.ts +11 -3
- package/types.d.ts +10 -1
package/actions.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Copyright contributors to the kepler.gl project
|
|
3
|
+
|
|
1
4
|
import {SavedMap, ParsedConfig, SavedConfigV1, MinSavedConfigV1} from './schemas';
|
|
2
5
|
|
|
3
6
|
/** EXPORT_FILE_TO_CLOUD */
|
|
@@ -42,9 +45,11 @@ export type ProtoDataset = {
|
|
|
42
45
|
type?: string;
|
|
43
46
|
format?: string;
|
|
44
47
|
displayName?: string;
|
|
48
|
+
analyzerType?: string;
|
|
45
49
|
id?: string;
|
|
46
50
|
}[];
|
|
47
51
|
rows: any[][];
|
|
52
|
+
cols?: any[];
|
|
48
53
|
};
|
|
49
54
|
|
|
50
55
|
// table-injected metadata
|
package/components.d.ts
CHANGED
package/effects.d.ts
CHANGED
|
@@ -1,29 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Copyright contributors to the kepler.gl project
|
|
3
|
+
|
|
4
|
+
type EffectParameterDescription = {
|
|
5
|
+
name: string;
|
|
6
|
+
type?: 'number' | 'array' | 'color';
|
|
7
|
+
label?: string | false | (string | false)[];
|
|
8
|
+
min: number;
|
|
9
|
+
max: number;
|
|
10
|
+
defaultValue?: number | number[];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type EffectDescription = {
|
|
2
14
|
type: string;
|
|
3
15
|
name: string;
|
|
16
|
+
parameters: EffectParameterDescription[];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type EffectUpdateProps = {
|
|
4
20
|
isEnabled: boolean;
|
|
5
21
|
isConfigActive: boolean;
|
|
6
|
-
|
|
7
|
-
|
|
22
|
+
isJsonEditorActive: boolean;
|
|
23
|
+
// effect specific parameters for a deck.gl effect (uniforms)
|
|
24
|
+
parameters: {[key: string]: any};
|
|
8
25
|
};
|
|
9
26
|
|
|
10
|
-
export type
|
|
27
|
+
export type EffectProps = EffectUpdateProps & {
|
|
11
28
|
id: string;
|
|
12
|
-
|
|
29
|
+
type: string;
|
|
13
30
|
};
|
|
14
31
|
|
|
15
|
-
export type
|
|
16
|
-
id?: string;
|
|
17
|
-
config?: Partial<EffectConfig>
|
|
18
|
-
};
|
|
32
|
+
export type EffectPropsPartial = Partial<EffectProps>;
|
|
19
33
|
|
|
20
34
|
export interface Effect {
|
|
21
35
|
id: string;
|
|
22
|
-
|
|
36
|
+
type: string;
|
|
37
|
+
isEnabled: boolean;
|
|
38
|
+
isConfigActive: boolean;
|
|
39
|
+
isJsonEditorActive: boolean;
|
|
40
|
+
// effect specific parameters for a deck.gl effect (uniforms)
|
|
41
|
+
parameters: {[key: string]: any};
|
|
23
42
|
deckEffect: any;
|
|
43
|
+
_uiConfig: EffectParameterDescription[];
|
|
24
44
|
|
|
25
|
-
|
|
26
|
-
|
|
45
|
+
getDefaultProps(props: Partial<EffectProps>): EffectProps;
|
|
46
|
+
setProps(props: Partial<EffectProps>): void;
|
|
27
47
|
isValidToSave(): boolean;
|
|
28
|
-
|
|
48
|
+
getParameterDescriptions(): EffectParameterDescription[];
|
|
29
49
|
}
|
package/index.d.ts
CHANGED
package/layers.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kepler.gl/types",
|
|
3
3
|
"author": "Shan He <shan@uber.com>",
|
|
4
|
-
"version": "3.0.0
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"description": "kepler.gl types used by kepler.gl components, actions and reducers",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"types": "index.d.ts",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"instrument": false
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
|
-
"node": ">=
|
|
29
|
+
"node": ">=18.18.2"
|
|
30
30
|
},
|
|
31
31
|
"maintainers": [
|
|
32
32
|
"Shan He <heshan0131@gmail.com>",
|
|
33
33
|
"Giuseppe Macri <gmacri@uber.com>"
|
|
34
34
|
],
|
|
35
35
|
"volta": {
|
|
36
|
-
"node": "
|
|
36
|
+
"node": "18.18.2",
|
|
37
37
|
"yarn": "1.22.17"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/reducers.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Copyright contributors to the kepler.gl project
|
|
3
|
+
|
|
1
4
|
import {Field, Millisecond} from './types';
|
|
2
5
|
|
|
3
6
|
export type MapState = {
|
|
@@ -195,6 +198,7 @@ export type Editor = {
|
|
|
195
198
|
|
|
196
199
|
export type SplitMapLayers = {[key: string]: boolean};
|
|
197
200
|
export type SplitMap = {
|
|
201
|
+
id?: string;
|
|
198
202
|
layers: SplitMapLayers;
|
|
199
203
|
};
|
|
200
204
|
|
package/schemas.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Copyright contributors to the kepler.gl project
|
|
3
|
+
|
|
1
4
|
import {RGBColor, Merge, RGBAColor, RequireFrom} from './types';
|
|
2
5
|
|
|
3
6
|
import {
|
|
@@ -11,8 +14,6 @@ import {
|
|
|
11
14
|
|
|
12
15
|
import {LayerTextLabel} from './layers';
|
|
13
16
|
|
|
14
|
-
import {EffectConfig} from './effects';
|
|
15
|
-
|
|
16
17
|
export type SavedFilter = {
|
|
17
18
|
dataId: Filter['dataId'];
|
|
18
19
|
id: Filter['id'];
|
|
@@ -82,9 +83,13 @@ export type ParsedLayer = SavedLayer | MinSavedLayer;
|
|
|
82
83
|
|
|
83
84
|
export type ParsedEffect = {
|
|
84
85
|
id: string;
|
|
85
|
-
|
|
86
|
+
type: string;
|
|
87
|
+
isEnabled: boolean;
|
|
88
|
+
parameters: Record<string, number | [number, number] | {value: number}>;
|
|
86
89
|
};
|
|
87
90
|
|
|
91
|
+
export type SavedEffect = ParsedEffect;
|
|
92
|
+
|
|
88
93
|
export type SavedAnimationConfig = {
|
|
89
94
|
currentTime: AnimationConfig['currentTime'];
|
|
90
95
|
speed: AnimationConfig['speed'];
|
|
@@ -98,6 +103,7 @@ export type SavedEditor = {
|
|
|
98
103
|
export type SavedVisState = {
|
|
99
104
|
filters: SavedFilter[];
|
|
100
105
|
layers: SavedLayer[];
|
|
106
|
+
effects: SavedEffect[];
|
|
101
107
|
interactionConfig: SavedInteractionConfig;
|
|
102
108
|
layerBlending: string;
|
|
103
109
|
overlayBlending?: string;
|
|
@@ -110,6 +116,7 @@ export type SavedVisState = {
|
|
|
110
116
|
export type MinSavedVisStateV1 = {
|
|
111
117
|
filters?: MinSavedFilter[];
|
|
112
118
|
layers?: MinSavedLayer[];
|
|
119
|
+
effects?: SavedEffect[];
|
|
113
120
|
interactionConfig?: Partial<SavedInteractionConfig>;
|
|
114
121
|
layerBlending?: string;
|
|
115
122
|
overlayBlending?: string;
|
|
@@ -122,6 +129,7 @@ export type ParsedVisState = {
|
|
|
122
129
|
layers?: ParsedLayer[];
|
|
123
130
|
effects?: ParsedEffect[];
|
|
124
131
|
filters?: ParsedFilter[];
|
|
132
|
+
effects?: ParsedEffect[];
|
|
125
133
|
interactionConfig?: Partial<SavedInteractionConfig>;
|
|
126
134
|
layerBlending?: string;
|
|
127
135
|
overlayBlending?: string;
|
package/types.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// Copyright contributors to the kepler.gl project
|
|
3
|
+
|
|
1
4
|
export type RGBColor = [number, number, number];
|
|
2
5
|
export type RGBAColor = [number, number, number, number];
|
|
3
6
|
export type HexColor = string; // this is the best typescript can do at the moment
|
|
@@ -23,4 +26,10 @@ export type RowData = {
|
|
|
23
26
|
[key: string]: string | null;
|
|
24
27
|
}[];
|
|
25
28
|
|
|
26
|
-
export type ProcessorResult = {
|
|
29
|
+
export type ProcessorResult = {
|
|
30
|
+
info?: any;
|
|
31
|
+
fields: Field[];
|
|
32
|
+
rows: any[][];
|
|
33
|
+
cols?: any[];
|
|
34
|
+
metadata?: any;
|
|
35
|
+
} | null;
|