@kepler.gl/constants 3.3.0-alpha.0 → 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.
Files changed (46) hide show
  1. package/dist/annotation.d.ts +23 -0
  2. package/dist/cjs/annotation.js +45 -0
  3. package/dist/cjs/color-palettes.js +461 -0
  4. package/dist/cjs/colors-by-theme.js +519 -0
  5. package/dist/cjs/dataset.js +176 -0
  6. package/dist/cjs/default-settings.js +1740 -0
  7. package/dist/cjs/gpu-parameters.js +125 -0
  8. package/dist/{index.js → cjs/index.js} +13 -1
  9. package/dist/cjs/keyevent.js +26 -0
  10. package/dist/cjs/layers.js +609 -0
  11. package/dist/{plot.js → cjs/plot.js} +1 -1
  12. package/dist/cjs/time.js +194 -0
  13. package/dist/cjs/tooltip.js +221 -0
  14. package/dist/cjs/user-feedbacks.js +15 -0
  15. package/dist/cjs/user-guides.js +19 -0
  16. package/dist/dataset.d.ts +70 -1
  17. package/dist/default-settings.d.ts +106 -2
  18. package/dist/esm/annotation.js +38 -0
  19. package/dist/esm/color-palettes.js +453 -0
  20. package/dist/esm/colors-by-theme.js +513 -0
  21. package/dist/esm/dataset.js +169 -0
  22. package/dist/esm/default-settings.js +1734 -0
  23. package/dist/esm/gpu-parameters.js +119 -0
  24. package/dist/esm/index.js +18 -0
  25. package/dist/esm/keyevent.js +19 -0
  26. package/dist/esm/layers.js +602 -0
  27. package/dist/esm/plot.js +9 -0
  28. package/dist/esm/time.js +190 -0
  29. package/dist/esm/tooltip.js +215 -0
  30. package/dist/esm/user-feedbacks.js +9 -0
  31. package/dist/esm/user-guides.js +13 -0
  32. package/dist/index.d.ts +1 -0
  33. package/dist/layers.d.ts +7 -0
  34. package/package.json +25 -16
  35. package/dist/color-palettes.js +0 -462
  36. package/dist/colors-by-theme.js +0 -519
  37. package/dist/dataset.js +0 -63
  38. package/dist/default-settings.js +0 -1495
  39. package/dist/gpu-parameters.js +0 -125
  40. package/dist/keyevent.js +0 -26
  41. package/dist/layers.js +0 -549
  42. package/dist/time.js +0 -194
  43. package/dist/tooltip.js +0 -221
  44. package/dist/user-feedbacks.js +0 -15
  45. package/dist/user-guides.js +0 -19
  46. package/umd/keplergl.min.js +0 -58
@@ -54,6 +54,13 @@ export declare const ADD_MAP_STYLE_ID = "addMapStyle";
54
54
  * @public
55
55
  */
56
56
  export declare const EXPORT_MAP_ID = "exportMap";
57
+ /**
58
+ * Modal id: export video modal
59
+ * @constant
60
+ * @type {string}
61
+ * @public
62
+ */
63
+ export declare const EXPORT_VIDEO_ID = "exportVideo";
57
64
  /**
58
65
  * Modal id: save map modal
59
66
  * @constant
@@ -160,6 +167,8 @@ export declare const MAP_LIB_OPTIONS: {
160
167
  MAPBOX: "mapbox";
161
168
  MAPLIBRE: "maplibre";
162
169
  };
170
+ /** Mapbox GL JS does not support pitch above 60 degrees */
171
+ export declare const MAPBOX_MAX_PITCH = 60;
163
172
  export type BaseMapLibraryType = 'mapbox' | 'maplibre';
164
173
  export declare const NO_BASEMAP_ICON = "geodude/NO_BASEMAP.png";
165
174
  export declare const DEFAULT_BASE_MAP_STYLE = "dark-matter";
@@ -336,6 +345,7 @@ export declare const CHANNEL_SCALES: {
336
345
  size: "size";
337
346
  colorAggr: "colorAggr";
338
347
  sizeAggr: "sizeAggr";
348
+ angle: "angle";
339
349
  };
340
350
  export declare const AGGREGATION_TYPES: {
341
351
  count: 'count';
@@ -357,6 +367,7 @@ export declare const linearFieldScaleFunctions: {
357
367
  color: ("custom" | "quantile" | "quantize")[];
358
368
  radius: "sqrt"[];
359
369
  size: ("linear" | "sqrt" | "log")[];
370
+ angle: "linear"[];
360
371
  };
361
372
  export declare const linearFieldAggrScaleFunctions: {
362
373
  colorAggr: {};
@@ -439,6 +450,7 @@ export declare const FIELD_OPTS: {
439
450
  color: ("custom" | "quantile" | "quantize")[];
440
451
  radius: "sqrt"[];
441
452
  size: ("linear" | "sqrt" | "log")[];
453
+ angle: "linear"[];
442
454
  };
443
455
  format: {
444
456
  legend: (d: any) => any;
@@ -453,6 +465,7 @@ export declare const FIELD_OPTS: {
453
465
  color: ("custom" | "quantile" | "quantize")[];
454
466
  radius: "sqrt"[];
455
467
  size: ("linear" | "sqrt" | "log")[];
468
+ angle: "linear"[];
456
469
  };
457
470
  format: {
458
471
  legend: (d: any) => any;
@@ -475,6 +488,7 @@ export declare const FIELD_OPTS: {
475
488
  color: ("custom" | "quantile" | "quantize" | "customOrdinal")[];
476
489
  radius: "sqrt"[];
477
490
  size: ("linear" | "sqrt" | "log")[];
491
+ angle: "linear"[];
478
492
  };
479
493
  format: {
480
494
  legend: (d: any) => any;
@@ -587,6 +601,8 @@ export declare const DEFAULT_LAYER_COLOR_PALETTE = "Global Warming";
587
601
  export declare const DEFAULT_LAYER_COLOR_PALETTE_STEPS = 6;
588
602
  export declare const DEFAULT_TOOLTIP_FIELDS: any[];
589
603
  export declare const NO_VALUE_COLOR: RGBAColor;
604
+ /** Visible gray used when a color field has no value and missing features should stay on the map. */
605
+ export declare const MISSING_VALUE_COLOR: RGBAColor;
590
606
  export declare const DEFAULT_PICKING_RADIUS = 3;
591
607
  export declare const OVERLAY_BLENDINGS: {
592
608
  normal: {
@@ -744,14 +760,18 @@ export declare const GEOCODER_DATASET_NAME = "geocoder_dataset";
744
760
  export declare const GEOCODER_LAYER_ID = "geocoder_layer";
745
761
  export declare const GEOCODER_GEO_OFFSET = 0.05;
746
762
  export declare const GEOCODER_ICON_COLOR: [number, number, number];
747
- export declare const GEOCODER_ICON_SIZE = 80;
763
+ export declare const GEOCODER_ICON_SIZE = 160;
748
764
  export declare const EDITOR_LAYER_ID = "kepler_editor_layer";
749
765
  export declare const EDITOR_LAYER_PICKING_RADIUS = 6;
750
766
  export declare const EDITOR_MODES: {
751
767
  DRAW_POLYGON: string;
752
768
  DRAW_RECTANGLE: string;
769
+ DRAW_CIRCLE: string;
770
+ DRAW_LINESTRING: string;
771
+ DRAW_POINT: string;
753
772
  EDIT: string;
754
773
  };
774
+ export declare const EDITOR_DRAW_MODES: string[];
755
775
  export declare const PLOT_TYPES: {
756
776
  histogram: "histogram";
757
777
  lineChart: "lineChart";
@@ -790,9 +810,84 @@ export declare const MAP_CONTROLS: {
790
810
  splitMap: "splitMap";
791
811
  mapDraw: "mapDraw";
792
812
  mapLocale: "mapLocale";
813
+ mapTheme: "mapTheme";
793
814
  effect: "effect";
794
- aiAssistant: "aiAssistant";
815
+ annotation: "annotation";
795
816
  };
817
+ export declare enum MapViewMode {
818
+ MODE_2D = "MODE_2D",
819
+ MODE_3D = "MODE_3D",
820
+ MODE_GLOBE = "MODE_GLOBE"
821
+ }
822
+ /**
823
+ * Minimum zoom level allowed in globe mode. Negative values let the user zoom
824
+ * out further than the web-mercator default of 0, so the whole globe can be
825
+ * pulled back to appear smaller on screen.
826
+ */
827
+ export declare const GLOBE_MIN_ZOOM = 2;
828
+ /**
829
+ * Maximum zoom in globe mode.
830
+ *
831
+ * The previous "empty rectangles" at high zoom were caused by the vector basemap
832
+ * layer declaring `maxZoom: 23` while the raw tile endpoints only have data to
833
+ * z16 (mapbox-streets-v8) / z14 (CARTO) — deck then requested non-existent tiles
834
+ * that 404. That is fixed in `getGlobeBaseLayers` by setting `maxZoom` to each
835
+ * source's true data max so deck overzooms instead.
836
+ *
837
+ * The remaining practical ceiling is float32 precision: deck's globe places
838
+ * geometry in common space on a sphere of radius 256 with no fp64/relative-to-
839
+ * center trick, so beyond ~visual-zoom 16 (roughly this mapState zoom minus
840
+ * `zoomAdjust(lat)` ≈ 1.65 at the equator) geometry starts to jitter/drift.
841
+ */
842
+ export declare const GLOBE_MAX_ZOOM = 16;
843
+ /**
844
+ * Maximum absolute center latitude allowed in globe mode. Constrains the camera
845
+ * target to a band around the equator so the view can't be centered on the
846
+ * poles (deck.gl's default clamps to ~85°, which lets the camera stare straight
847
+ * down at a pole). Applies symmetrically to the northern and southern hemisphere.
848
+ */
849
+ export declare const GLOBE_MAX_LATITUDE = 75;
850
+ export type GlobeConfig = {
851
+ atmosphere: boolean;
852
+ /**
853
+ * When true, draw a large sun-independent uniform glow in addition to the
854
+ * realistic scattering sky halo.
855
+ */
856
+ hugeHalo: boolean;
857
+ /**
858
+ * Multiplier for huge-halo shell thickness. `1` is the baseline (~14% beyond
859
+ * the globe); the configured default is 3.5.
860
+ */
861
+ hugeHaloRadius: number;
862
+ /** Opacity of the huge-halo glow (0–1). Default: 0.2. */
863
+ hugeHaloOpacity: number;
864
+ azimuth: boolean;
865
+ azimuthAngle: number;
866
+ terminator: boolean;
867
+ terminatorOpacity: number;
868
+ basemap: boolean;
869
+ labels: boolean;
870
+ labelsColor: [number, number, number];
871
+ adminLines: boolean;
872
+ adminLinesColor: [number, number, number];
873
+ water: boolean;
874
+ waterColor: [number, number, number];
875
+ surfaceColor: [number, number, number];
876
+ surface: boolean;
877
+ backgroundColor: [number, number, number];
878
+ stars: boolean;
879
+ };
880
+ export type Globe = {
881
+ enabled: boolean;
882
+ config: GlobeConfig;
883
+ };
884
+ export declare const DEFAULT_GLOBE_CONFIG: GlobeConfig;
885
+ export declare const GLOBE_SUPPORTED_LAYERS: Record<string, boolean>;
886
+ export declare enum MapSplitMode {
887
+ SINGLE_MAP = "SINGLE_MAP",
888
+ DUAL_MAP = "DUAL_MAP",
889
+ SWIPE_COMPARE = "SWIPE_COMPARE"
890
+ }
796
891
  /**
797
892
  * A multiplier for screen-space width/scale for Arc, Line, Icon and Text layers.
798
893
  * Required in order to maintain the same appearance after upgrading to deck.gl v8.5.
@@ -861,4 +956,13 @@ export declare const getLoaderOptions: () => {
861
956
  workerUrl: string;
862
957
  };
863
958
  };
959
+ export declare const CUSTOM_SCENEGRAPH_MODEL_ID = "custom";
960
+ export declare const TRIP_LAYER_SCENEGRAPH_MODELS: {
961
+ id: string;
962
+ label: string;
963
+ icon: any;
964
+ url: string | null;
965
+ angles: [number, number, number];
966
+ scale: number;
967
+ }[];
864
968
  export {};
@@ -0,0 +1,38 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright contributors to the kepler.gl project
3
+
4
+ export var AnnotationKind = /*#__PURE__*/function (AnnotationKind) {
5
+ AnnotationKind["TEXT"] = "TEXT";
6
+ AnnotationKind["ARROW"] = "ARROW";
7
+ AnnotationKind["POINT"] = "POINT";
8
+ AnnotationKind["CIRCLE"] = "CIRCLE";
9
+ return AnnotationKind;
10
+ }({});
11
+ export function isAnnotationKind(kind) {
12
+ return Object.values(AnnotationKind).includes(kind);
13
+ }
14
+ export function isAnnotationWithArm(anno) {
15
+ return isFinite(anno.armLength);
16
+ }
17
+ export var INITIAL_ANNOTATION_KIND = AnnotationKind.POINT;
18
+ export var INITIAL_ANNOTATION_ANGLE = -45;
19
+ export var INITIAL_ANNOTATION_ARM_LENGTH = 50;
20
+ export var INITIAL_ANNOTATION_TEXT_WIDTH = 0;
21
+ export var INITIAL_ANNOTATION_TEXT_HEIGHT = 0;
22
+ export var INITIAL_ANNOTATION_LINE_WIDTH = 2;
23
+ export var INITIAL_ANNOTATION_LINE_COLOR = '#FFFFFF';
24
+ export var ANNOTATION_KINDS = [{
25
+ id: AnnotationKind.TEXT,
26
+ label: 'Text'
27
+ }, {
28
+ id: AnnotationKind.POINT,
29
+ label: 'Point'
30
+ }, {
31
+ id: AnnotationKind.ARROW,
32
+ label: 'Arrow'
33
+ }, {
34
+ id: AnnotationKind.CIRCLE,
35
+ label: 'Circle'
36
+ }];
37
+ export var ANNOTATION_LINE_WIDTH_OPTIONS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
38
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJBbm5vdGF0aW9uS2luZCIsImlzQW5ub3RhdGlvbktpbmQiLCJraW5kIiwiT2JqZWN0IiwidmFsdWVzIiwiaW5jbHVkZXMiLCJpc0Fubm90YXRpb25XaXRoQXJtIiwiYW5ubyIsImlzRmluaXRlIiwiYXJtTGVuZ3RoIiwiSU5JVElBTF9BTk5PVEFUSU9OX0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