@kepler.gl/constants 3.0.0-alpha.0 → 3.0.0-alpha.2
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/dist/color-palette.js +7 -22
- package/dist/color-ranges.d.ts +1 -1
- package/dist/color-ranges.js +1 -21
- package/dist/custom-color-ranges.js +6 -22
- package/dist/default-settings.d.ts +156 -29
- package/dist/default-settings.js +635 -154
- package/dist/dnd-layer-items.d.ts +8 -0
- package/dist/dnd-layer-items.js +26 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -21
- package/dist/keyevent.js +7 -22
- package/dist/layers.js +28 -24
- package/dist/tooltip.d.ts +36 -0
- package/dist/tooltip.js +41 -22
- package/dist/user-feedbacks.js +5 -22
- package/dist/user-guides.js +5 -22
- package/package.json +7 -8
- package/umd/keplergl.min.js +3 -25
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { scaleLinear, scaleQuantize, scaleQuantile, scaleOrdinal, scaleSqrt, scaleLog, scalePoint } from 'd3-scale';
|
|
2
|
-
import { RGBAColor } from '@kepler.gl/types';
|
|
2
|
+
import { RGBAColor, EffectDescription, BaseMapStyle } from '@kepler.gl/types';
|
|
3
3
|
export declare const ACTION_PREFIX = "@@kepler.gl/";
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
4
|
+
export declare const KEPLER_UNFOLDED_BUCKET = "https://studio-public-data.foursquare.com/statics/keplergl";
|
|
5
|
+
export declare const BASEMAP_ICON_PREFIX: string;
|
|
6
6
|
export declare const DEFAULT_MAPBOX_API_URL = "https://api.mapbox.com";
|
|
7
7
|
export declare const TRANSITION_DURATION = 0;
|
|
8
8
|
/**
|
|
@@ -121,30 +121,43 @@ export declare const SIDEBAR_PANELS: {
|
|
|
121
121
|
label: string;
|
|
122
122
|
onClick: null;
|
|
123
123
|
}[];
|
|
124
|
+
export declare const PANEL_VIEW_TOGGLES: {
|
|
125
|
+
list: "list";
|
|
126
|
+
byDataset: "byDataset";
|
|
127
|
+
};
|
|
124
128
|
export declare const PANELS: {
|
|
125
129
|
id: string;
|
|
126
130
|
label: string;
|
|
127
131
|
onClick: null;
|
|
128
132
|
}[];
|
|
129
|
-
declare
|
|
133
|
+
export declare const DEFAULT_BLDG_COLOR = "#D1CEC7";
|
|
134
|
+
export declare const DEFAULT_BACKGROUND_COLOR = "#000000";
|
|
135
|
+
export declare const BASE_MAP_BACKGROUND_LAYER_IDS: string[];
|
|
136
|
+
export declare const BACKGROUND_LAYER_GROUP_SLUG = "Background";
|
|
137
|
+
export declare const THREE_D_BUILDING_LAYER_GROUP_SLUG = "3d building";
|
|
138
|
+
export declare type DEFAULT_LAYER_GROUP = {
|
|
130
139
|
slug: string;
|
|
131
140
|
filter: (value: any) => boolean;
|
|
132
141
|
defaultVisibility: boolean;
|
|
142
|
+
isVisibilityToggleAvailable?: boolean;
|
|
143
|
+
isMoveToTopAvailable?: boolean;
|
|
144
|
+
isColorPickerAvailable?: boolean;
|
|
133
145
|
};
|
|
146
|
+
export declare const BACKGROUND_LAYER_GROUP: DEFAULT_LAYER_GROUP;
|
|
134
147
|
export declare const DEFAULT_LAYER_GROUPS: DEFAULT_LAYER_GROUP[];
|
|
135
|
-
export declare const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
export declare const BASE_MAP_COLOR_MODES: {
|
|
149
|
+
NONE: "NONE";
|
|
150
|
+
DARK: "DARK";
|
|
151
|
+
LIGHT: "LIGHT";
|
|
152
|
+
};
|
|
153
|
+
export declare const NO_MAP_ID = "no_map";
|
|
154
|
+
export declare const EMPTY_MAPBOX_STYLE: {
|
|
155
|
+
version: number;
|
|
156
|
+
sources: {};
|
|
157
|
+
layers: never[];
|
|
158
|
+
};
|
|
159
|
+
export declare const NO_BASEMAP_ICON: string;
|
|
160
|
+
export declare const DEFAULT_MAP_STYLES: BaseMapStyle[];
|
|
148
161
|
export declare const GEOJSON_FIELDS: {
|
|
149
162
|
geojson: string[];
|
|
150
163
|
};
|
|
@@ -167,6 +180,12 @@ export declare const FILTER_TYPES: {
|
|
|
167
180
|
multiSelect: "multiSelect";
|
|
168
181
|
polygon: "polygon";
|
|
169
182
|
};
|
|
183
|
+
export declare const FILTER_VIEW_TYPES: {
|
|
184
|
+
side: "side";
|
|
185
|
+
enlarged: "enlarged";
|
|
186
|
+
minified: "minified";
|
|
187
|
+
};
|
|
188
|
+
export declare const DEFAULT_FILTER_VIEW_TYPE: "side";
|
|
170
189
|
export declare const SCALE_TYPES: {
|
|
171
190
|
ordinal: "ordinal";
|
|
172
191
|
quantile: "quantile";
|
|
@@ -194,6 +213,9 @@ export declare const ALL_FIELD_TYPES: {
|
|
|
194
213
|
string: "string";
|
|
195
214
|
timestamp: "timestamp";
|
|
196
215
|
point: "point";
|
|
216
|
+
array: "array";
|
|
217
|
+
object: "object";
|
|
218
|
+
geoarrow: "geoarrow";
|
|
197
219
|
};
|
|
198
220
|
export declare const SORT_ORDER: {
|
|
199
221
|
ASCENDING: "ASCENDING";
|
|
@@ -207,6 +229,7 @@ export declare const TABLE_OPTION: {
|
|
|
207
229
|
PIN: "PIN";
|
|
208
230
|
UNPIN: "UNPIN";
|
|
209
231
|
COPY: "COPY";
|
|
232
|
+
FORMAT_COLUMN: "FORMAT_COLUMN";
|
|
210
233
|
};
|
|
211
234
|
export declare const TABLE_OPTION_LIST: ({
|
|
212
235
|
value: "SORT_ASC";
|
|
@@ -238,6 +261,11 @@ export declare const TABLE_OPTION_LIST: ({
|
|
|
238
261
|
display: string;
|
|
239
262
|
icon: string;
|
|
240
263
|
condition?: undefined;
|
|
264
|
+
} | {
|
|
265
|
+
value: "FORMAT_COLUMN";
|
|
266
|
+
display: string;
|
|
267
|
+
icon: string;
|
|
268
|
+
condition?: undefined;
|
|
241
269
|
})[];
|
|
242
270
|
export declare const FIELD_TYPE_DISPLAY: {
|
|
243
271
|
boolean: {
|
|
@@ -252,6 +280,10 @@ export declare const FIELD_TYPE_DISPLAY: {
|
|
|
252
280
|
label: string;
|
|
253
281
|
color: string;
|
|
254
282
|
};
|
|
283
|
+
geoarrow: {
|
|
284
|
+
label: string;
|
|
285
|
+
color: string;
|
|
286
|
+
};
|
|
255
287
|
integer: {
|
|
256
288
|
label: string;
|
|
257
289
|
color: string;
|
|
@@ -272,6 +304,14 @@ export declare const FIELD_TYPE_DISPLAY: {
|
|
|
272
304
|
label: string;
|
|
273
305
|
color: string;
|
|
274
306
|
};
|
|
307
|
+
array: {
|
|
308
|
+
label: string;
|
|
309
|
+
color: string;
|
|
310
|
+
};
|
|
311
|
+
object: {
|
|
312
|
+
label: string;
|
|
313
|
+
color: string;
|
|
314
|
+
};
|
|
275
315
|
};
|
|
276
316
|
export declare const FIELD_COLORS: {
|
|
277
317
|
default: string;
|
|
@@ -294,8 +334,12 @@ export declare const AGGREGATION_TYPES: {
|
|
|
294
334
|
sum: 'sum';
|
|
295
335
|
variance: 'variance';
|
|
296
336
|
mode: 'mode';
|
|
297
|
-
countUnique: '
|
|
337
|
+
countUnique: 'countUnique';
|
|
298
338
|
};
|
|
339
|
+
export declare const AGGREGATION_TYPE_OPTIONS: {
|
|
340
|
+
id: string;
|
|
341
|
+
label: string;
|
|
342
|
+
}[];
|
|
299
343
|
export declare const linearFieldScaleFunctions: {
|
|
300
344
|
color: ("quantile" | "quantize")[];
|
|
301
345
|
radius: "sqrt"[];
|
|
@@ -329,7 +373,7 @@ export declare const ordinalFieldScaleFunctions: {
|
|
|
329
373
|
export declare const ordinalFieldAggrScaleFunctions: {
|
|
330
374
|
colorAggr: {
|
|
331
375
|
mode: "ordinal"[];
|
|
332
|
-
|
|
376
|
+
countUnique: ("quantile" | "quantize")[];
|
|
333
377
|
};
|
|
334
378
|
sizeAggr: {};
|
|
335
379
|
};
|
|
@@ -362,7 +406,7 @@ export declare const FIELD_OPTS: {
|
|
|
362
406
|
scale: {
|
|
363
407
|
colorAggr: {
|
|
364
408
|
mode: "ordinal"[];
|
|
365
|
-
|
|
409
|
+
countUnique: ("quantile" | "quantize")[];
|
|
366
410
|
};
|
|
367
411
|
sizeAggr: {};
|
|
368
412
|
color: "ordinal"[];
|
|
@@ -453,7 +497,7 @@ export declare const FIELD_OPTS: {
|
|
|
453
497
|
scale: {
|
|
454
498
|
colorAggr: {
|
|
455
499
|
mode: "ordinal"[];
|
|
456
|
-
|
|
500
|
+
countUnique: ("quantile" | "quantize")[];
|
|
457
501
|
};
|
|
458
502
|
sizeAggr: {};
|
|
459
503
|
color: "ordinal"[];
|
|
@@ -466,10 +510,11 @@ export declare const FIELD_OPTS: {
|
|
|
466
510
|
};
|
|
467
511
|
};
|
|
468
512
|
date: {
|
|
513
|
+
type: string;
|
|
469
514
|
scale: {
|
|
470
515
|
colorAggr: {
|
|
471
516
|
mode: "ordinal"[];
|
|
472
|
-
|
|
517
|
+
countUnique: ("quantile" | "quantize")[];
|
|
473
518
|
};
|
|
474
519
|
sizeAggr: {};
|
|
475
520
|
color: "ordinal"[];
|
|
@@ -495,6 +540,36 @@ export declare const FIELD_OPTS: {
|
|
|
495
540
|
tooltip: never[];
|
|
496
541
|
};
|
|
497
542
|
};
|
|
543
|
+
geoarrow: {
|
|
544
|
+
type: string;
|
|
545
|
+
scale: {
|
|
546
|
+
colorAggr: {};
|
|
547
|
+
sizeAggr: {};
|
|
548
|
+
color: never[];
|
|
549
|
+
radius: never[];
|
|
550
|
+
size: never[];
|
|
551
|
+
};
|
|
552
|
+
format: {
|
|
553
|
+
legend: (d: any) => string;
|
|
554
|
+
tooltip: never[];
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
object: {
|
|
558
|
+
type: string;
|
|
559
|
+
scale: {};
|
|
560
|
+
format: {
|
|
561
|
+
legend: (d: any) => string;
|
|
562
|
+
tooltip: never[];
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
array: {
|
|
566
|
+
type: string;
|
|
567
|
+
scale: {};
|
|
568
|
+
format: {
|
|
569
|
+
legend: (d: any) => string;
|
|
570
|
+
tooltip: never[];
|
|
571
|
+
};
|
|
572
|
+
};
|
|
498
573
|
};
|
|
499
574
|
export declare const CHANNEL_SCALE_SUPPORTED_FIELDS: {
|
|
500
575
|
[id: string]: string[];
|
|
@@ -507,6 +582,21 @@ export declare const DEFAULT_LAYER_COLOR: {
|
|
|
507
582
|
};
|
|
508
583
|
export declare const DEFAULT_TOOLTIP_FIELDS: any[];
|
|
509
584
|
export declare const NO_VALUE_COLOR: RGBAColor;
|
|
585
|
+
export declare const DEFAULT_PICKING_RADIUS = 3;
|
|
586
|
+
export declare const OVERLAY_BLENDINGS: {
|
|
587
|
+
normal: {
|
|
588
|
+
label: string;
|
|
589
|
+
value: string;
|
|
590
|
+
};
|
|
591
|
+
screen: {
|
|
592
|
+
label: string;
|
|
593
|
+
value: string;
|
|
594
|
+
};
|
|
595
|
+
darken: {
|
|
596
|
+
label: string;
|
|
597
|
+
value: string;
|
|
598
|
+
};
|
|
599
|
+
};
|
|
510
600
|
export declare const LAYER_BLENDINGS: {
|
|
511
601
|
additive: {
|
|
512
602
|
label: string;
|
|
@@ -551,6 +641,7 @@ export declare type ExportImage = {
|
|
|
551
641
|
exporting: boolean;
|
|
552
642
|
processing: boolean;
|
|
553
643
|
error: Error | false;
|
|
644
|
+
escapeXhtmlForWebpack?: boolean;
|
|
554
645
|
center: boolean;
|
|
555
646
|
};
|
|
556
647
|
export declare type ImageRatioOption = {
|
|
@@ -601,7 +692,7 @@ export declare const EXPORT_MAP_FORMAT_OPTIONS: {
|
|
|
601
692
|
label: any;
|
|
602
693
|
available: boolean;
|
|
603
694
|
}[];
|
|
604
|
-
export declare function getHTMLMapModeTileUrl(mode:
|
|
695
|
+
export declare function getHTMLMapModeTileUrl(mode: string): string;
|
|
605
696
|
export declare const EXPORT_HTML_MAP_MODE_OPTIONS: {
|
|
606
697
|
id: string;
|
|
607
698
|
label: string;
|
|
@@ -620,7 +711,7 @@ export declare const DEFAULT_NOTIFICATION_TOPICS: {
|
|
|
620
711
|
global: "global";
|
|
621
712
|
file: "file";
|
|
622
713
|
};
|
|
623
|
-
export declare const THROTTLE_NOTIFICATION_TIME =
|
|
714
|
+
export declare const THROTTLE_NOTIFICATION_TIME = 330;
|
|
624
715
|
export declare const BASE_SPEED = 600;
|
|
625
716
|
export declare const FPS = 60;
|
|
626
717
|
/**
|
|
@@ -659,16 +750,18 @@ export declare const GEOCODER_LAYER_ID = "geocoder_layer";
|
|
|
659
750
|
export declare const GEOCODER_GEO_OFFSET = 0.05;
|
|
660
751
|
export declare const GEOCODER_ICON_COLOR: [number, number, number];
|
|
661
752
|
export declare const GEOCODER_ICON_SIZE = 80;
|
|
753
|
+
export declare const EDITOR_LAYER_ID = "kepler_editor_layer";
|
|
754
|
+
export declare const EDITOR_LAYER_PICKING_RADIUS = 6;
|
|
662
755
|
export declare const EDITOR_MODES: {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
EDIT: any;
|
|
756
|
+
DRAW_POLYGON: string;
|
|
757
|
+
DRAW_RECTANGLE: string;
|
|
758
|
+
EDIT: string;
|
|
667
759
|
};
|
|
668
760
|
export declare const PLOT_TYPES: {
|
|
669
761
|
histogram: "histogram";
|
|
670
762
|
lineChart: "lineChart";
|
|
671
763
|
};
|
|
764
|
+
export declare const INIT_FILTER_ITEMS_IN_DROPDOWN = 100;
|
|
672
765
|
/**
|
|
673
766
|
* Max number of filter value buffers that deck.gl provides
|
|
674
767
|
*/
|
|
@@ -691,6 +784,7 @@ export declare const DATASET_FORMATS: {
|
|
|
691
784
|
geojson: "geojson";
|
|
692
785
|
csv: "csv";
|
|
693
786
|
keplergl: "keplergl";
|
|
787
|
+
arrow: "arrow";
|
|
694
788
|
};
|
|
695
789
|
export declare const MAP_CONTROLS: {
|
|
696
790
|
visibleLayers: "visibleLayers";
|
|
@@ -699,6 +793,7 @@ export declare const MAP_CONTROLS: {
|
|
|
699
793
|
splitMap: "splitMap";
|
|
700
794
|
mapDraw: "mapDraw";
|
|
701
795
|
mapLocale: "mapLocale";
|
|
796
|
+
effect: "effect";
|
|
702
797
|
};
|
|
703
798
|
/**
|
|
704
799
|
* A multiplier for screen-space width/scale for Arc, Line, Icon and Text layers.
|
|
@@ -706,4 +801,36 @@ export declare const MAP_CONTROLS: {
|
|
|
706
801
|
* https://github.com/visgl/deck.gl/blob/master/docs/upgrade-guide.md
|
|
707
802
|
*/
|
|
708
803
|
export declare const PROJECTED_PIXEL_SIZE_MULTIPLIER: number;
|
|
709
|
-
|
|
804
|
+
/**
|
|
805
|
+
* Maximum value for text outline width
|
|
806
|
+
*/
|
|
807
|
+
export declare const TEXT_OUTLINE_MULTIPLIER = 5;
|
|
808
|
+
export declare const dataTestIds: Record<string, string>;
|
|
809
|
+
export declare const DEFAULT_TIMEZONE = "UTC";
|
|
810
|
+
export declare const DEFAULT_POST_PROCESSING_EFFECT_TYPE: string;
|
|
811
|
+
export declare const DEFAULT_LIGHT_COLOR: [number, number, number];
|
|
812
|
+
export declare const DEFAULT_LIGHT_INTENSITY = 1;
|
|
813
|
+
export declare const DEFAULT_SHADOW_INTENSITY = 0.5;
|
|
814
|
+
export declare const DEFAULT_SHADOW_COLOR: [number, number, number];
|
|
815
|
+
export declare const LIGHT_AND_SHADOW_EFFECT_TIME_MODES: {
|
|
816
|
+
pick: "pick";
|
|
817
|
+
current: "current";
|
|
818
|
+
animation: "animation";
|
|
819
|
+
};
|
|
820
|
+
export declare type LightAndShadowEffectTimeMode = 'pick' | 'current' | 'animation';
|
|
821
|
+
export declare const DEFAULT_LIGHT_AND_SHADOW_PROPS: {
|
|
822
|
+
timestamp: number;
|
|
823
|
+
timeMode: LightAndShadowEffectTimeMode;
|
|
824
|
+
shadowIntensity: number;
|
|
825
|
+
shadowColor: [number, number, number];
|
|
826
|
+
sunLightColor: [number, number, number];
|
|
827
|
+
sunLightIntensity: number;
|
|
828
|
+
ambientLightColor: [number, number, number];
|
|
829
|
+
ambientLightIntensity: number;
|
|
830
|
+
};
|
|
831
|
+
export declare const LIGHT_AND_SHADOW_EFFECT: EffectDescription;
|
|
832
|
+
export declare const POSTPROCESSING_EFFECTS: {
|
|
833
|
+
[key: string]: EffectDescription;
|
|
834
|
+
};
|
|
835
|
+
export declare const EFFECT_DESCRIPTIONS: EffectDescription[];
|
|
836
|
+
export declare type EffectType = 'ink' | 'brightnessContrast' | 'hueSaturation' | 'vibrance' | 'sepia' | 'dotScreen' | 'colorHalftone' | 'noise' | 'triangleBlur' | 'zoomBlur' | 'tiltShift' | 'edgeWork' | 'vignette' | 'magnify' | 'hexagonalPixelate' | 'lightAndShadow';
|