kepler.gl 3.1.6 → 3.1.7
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/src/actions/src/action-types.d.ts +2 -2
- package/dist/src/actions/src/action-wrapper.d.ts +2 -2
- package/dist/src/actions/src/actions.d.ts +3 -3
- package/dist/src/actions/src/map-state-actions.d.ts +4 -4
- package/dist/src/actions/src/vis-state-actions.d.ts +2 -2
- package/dist/src/ai-assistant/src/tools/kepler-tools/index.d.ts +1 -1
- package/dist/src/ai-assistant/src/tools/tools.d.ts +1 -1
- package/dist/src/components/src/kepler-gl.d.ts +1 -1
- package/dist/src/components/src/side-panel/layer-panel/layer-configurator.d.ts +4 -4
- package/dist/src/constants/src/default-settings.d.ts +8 -6
- package/dist/src/duckdb/src/table/duckdb-table.d.ts +1 -1
- package/dist/src/effects/src/effect.d.ts +1 -0
- package/dist/src/reducers/src/index.d.ts +1 -0
- package/dist/src/reducers/src/layer-utils.d.ts +2 -0
- package/dist/src/reducers/src/map-style-updaters.d.ts +1 -0
- package/dist/src/reducers/src/vis-state.d.ts +4 -4
- package/dist/src/styles/src/base.d.ts +4 -0
- package/dist/src/table/src/kepler-table.d.ts +2 -2
- package/dist/src/utils/src/application-config.d.ts +1 -0
- package/package.json +2 -2
- package/src/actions/dist/action-types.d.ts +2 -2
- package/src/actions/dist/action-types.js +3 -3
- package/src/actions/dist/action-wrapper.d.ts +2 -2
- package/src/actions/dist/action-wrapper.js +3 -3
- package/src/actions/dist/actions.d.ts +3 -3
- package/src/actions/dist/actions.js +4 -4
- package/src/actions/dist/map-state-actions.d.ts +4 -4
- package/src/actions/dist/map-state-actions.js +5 -5
- package/src/actions/dist/vis-state-actions.d.ts +2 -2
- package/src/actions/dist/vis-state-actions.js +3 -3
- package/src/actions/package.json +8 -8
- package/src/actions/src/action-types.ts +2 -2
- package/src/actions/src/action-wrapper.ts +2 -2
- package/src/actions/src/actions.ts +3 -3
- package/src/actions/src/map-state-actions.ts +4 -4
- package/src/actions/src/vis-state-actions.ts +2 -2
- package/src/ai-assistant/dist/tools/kepler-tools/index.d.ts +1 -1
- package/src/ai-assistant/dist/tools/tools.d.ts +1 -1
- package/src/ai-assistant/package.json +7 -7
- package/src/cloud-providers/package.json +2 -2
- package/src/common-utils/package.json +3 -3
- package/src/components/dist/effects/effect-type-list-item.js +4 -8
- package/src/components/dist/kepler-gl.d.ts +1 -1
- package/src/components/dist/loading-indicator.js +7 -3
- package/src/components/dist/map-container.js +18 -3
- package/src/components/dist/modals/add-map-style-modal.js +2 -2
- package/src/components/dist/modals/export-image-modal.js +1 -2
- package/src/components/dist/plot-container.js +15 -1
- package/src/components/dist/side-panel/layer-panel/layer-configurator.d.ts +4 -4
- package/src/components/dist/side-panel/layer-panel/layer-list.js +2 -4
- package/src/components/dist/side-panel/layer-panel/layer-type-list-item.js +8 -5
- package/src/components/dist/side-panel/layer-panel/raster-tile-colormap-list-item.js +2 -3
- package/src/components/dist/side-panel/layer-panel/vis-config-slider.js +10 -5
- package/src/components/dist/side-panel/map-style-panel/map-style-selector.js +3 -2
- package/src/components/package.json +15 -15
- package/src/components/src/effects/effect-type-list-item.tsx +2 -5
- package/src/components/src/loading-indicator.tsx +13 -3
- package/src/components/src/map-container.tsx +20 -6
- package/src/components/src/modals/add-map-style-modal.tsx +1 -1
- package/src/components/src/modals/export-image-modal.tsx +0 -1
- package/src/components/src/plot-container.tsx +19 -2
- package/src/components/src/side-panel/layer-panel/layer-list.tsx +0 -1
- package/src/components/src/side-panel/layer-panel/layer-type-list-item.tsx +11 -4
- package/src/components/src/side-panel/layer-panel/raster-tile-colormap-list-item.tsx +2 -3
- package/src/components/src/side-panel/layer-panel/vis-config-slider.tsx +12 -5
- package/src/components/src/side-panel/map-style-panel/map-style-selector.tsx +7 -1
- package/src/constants/dist/default-settings.d.ts +8 -6
- package/src/constants/dist/default-settings.js +9 -13
- package/src/constants/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/14/ab/1fbe8d595eaf6f179613022ba62b99ba41fe2f6b8061293406468a705d53002cfb0ba12e6833df2aa9c4c55b7061e239395129a1515da317d57e518b1dc7 +1 -0
- package/src/constants/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/37/b0/3745c4bb4b6114fa3433e4871042f7db966b48b29cde3301afe38370cecfe41f5aac801adc6fa93f6cd05411c521215e58542853414a81c0904ba4291e09 +1 -0
- package/src/constants/node_modules/.cache/terser-webpack-plugin/index-v5/68/bb/2c3d5cb60ef7b9e6d889b7d9b75b05761c58ee43b954df1a262102d3a106 +2 -0
- package/src/constants/node_modules/.cache/terser-webpack-plugin/index-v5/93/38/f167b214acd87fc28cf533f463b7423ce65340878809b494323fae359cb4 +2 -0
- package/src/constants/package.json +2 -2
- package/src/constants/src/default-settings.ts +5 -10
- package/src/constants/umd/keplergl.min.js +1 -1
- package/src/deckgl-arrow-layers/package.json +2 -2
- package/src/deckgl-layers/dist/raster/raster-mesh-layer/raster-mesh-layer-webgl2.vs.d.ts +1 -1
- package/src/deckgl-layers/dist/raster/raster-mesh-layer/raster-mesh-layer-webgl2.vs.js +2 -2
- package/src/deckgl-layers/dist/raster/raster-mesh-layer/raster-mesh-layer.js +3 -9
- package/src/deckgl-layers/package.json +4 -4
- package/src/deckgl-layers/src/raster/raster-mesh-layer/raster-mesh-layer-webgl2.vs.ts +12 -33
- package/src/deckgl-layers/src/raster/raster-mesh-layer/raster-mesh-layer.ts +2 -5
- package/src/duckdb/dist/table/duckdb-table.d.ts +1 -1
- package/src/duckdb/package.json +6 -6
- package/src/effects/dist/effect.d.ts +1 -0
- package/src/effects/dist/effect.js +7 -1
- package/src/effects/package.json +5 -5
- package/src/effects/src/effect.ts +5 -0
- package/src/layers/dist/base-layer.d.ts +1 -1
- package/src/layers/dist/geojson-layer/geojson-layer.d.ts +1 -1
- package/src/layers/dist/geojson-layer/geojson-utils.d.ts +3 -3
- package/src/layers/dist/icon-layer/icon-layer.d.ts +0 -1
- package/src/layers/dist/icon-layer/icon-layer.js +3 -4
- package/src/layers/dist/index.d.ts +2 -1
- package/src/layers/dist/index.js +16 -8
- package/src/layers/dist/raster-tile/image.d.ts +6 -0
- package/src/layers/dist/raster-tile/image.js +37 -20
- package/src/layers/dist/raster-tile/raster-tile-layer.d.ts +2 -8
- package/src/layers/dist/raster-tile/raster-tile-layer.js +18 -33
- package/src/layers/dist/raster-tile/types.d.ts +1 -0
- package/src/layers/dist/raster-tile/types.js +1 -1
- package/src/layers/dist/raster-tile/url.d.ts +3 -0
- package/src/layers/dist/raster-tile/url.js +7 -1
- package/src/layers/dist/trip-layer/trip-layer.d.ts +1 -1
- package/src/layers/package.json +9 -9
- package/src/layers/src/icon-layer/icon-layer.ts +3 -5
- package/src/layers/src/index.ts +2 -1
- package/src/layers/src/raster-tile/image.ts +16 -4
- package/src/layers/src/raster-tile/raster-tile-layer.ts +17 -28
- package/src/layers/src/raster-tile/types.ts +1 -0
- package/src/layers/src/raster-tile/url.ts +6 -0
- package/src/localization/package.json +1 -1
- package/src/processors/package.json +7 -7
- package/src/reducers/dist/index.d.ts +1 -0
- package/src/reducers/dist/index.js +8 -1
- package/src/reducers/dist/layer-utils.d.ts +2 -0
- package/src/reducers/dist/layer-utils.js +23 -4
- package/src/reducers/dist/map-style-updaters.d.ts +1 -0
- package/src/reducers/dist/map-style-updaters.js +10 -5
- package/src/reducers/dist/vis-state.d.ts +4 -4
- package/src/reducers/package.json +16 -16
- package/src/reducers/src/index.ts +1 -0
- package/src/reducers/src/layer-utils.ts +22 -4
- package/src/reducers/src/map-style-updaters.ts +16 -8
- package/src/schemas/package.json +7 -7
- package/src/styles/dist/base.d.ts +4 -0
- package/src/styles/dist/base.js +10 -5
- package/src/styles/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/4b/ee/673360e4b8362fe8483486f8fa132c6b9d9abf45a240d54f76bc3d60d2b01e530c4efd92baad3479d54e7fa48474cb9d52e633ceb9dfec546588b6981cfc +1 -0
- package/src/styles/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/a5/1f/7149cdcef3cb8e64025c197e3a6a47482bf1027c0991969349c7f1ec68e76f091966010bb72674850b48ed8361c1953b1b08da7dd66143642b32ce467635 +1 -0
- package/src/styles/node_modules/.cache/terser-webpack-plugin/index-v5/b7/6d/49546dbc3e903a5e6771b0ead707e4f4605454ac2bc718d0f0bf801b96a7 +2 -0
- package/src/styles/node_modules/.cache/terser-webpack-plugin/index-v5/c3/91/45735456a88c6ecc20a341b94971da9d02562b936da95a407f157b2f0ece +2 -0
- package/src/styles/package.json +2 -2
- package/src/styles/src/base.ts +6 -0
- package/src/styles/umd/keplergl.min.js +1 -1
- package/src/table/dist/{src/table/src/kepler-table.d.ts → kepler-table.d.ts} +2 -2
- package/src/table/dist/kepler-table.js +6 -4
- package/src/table/dist/tileset/vector-tile-utils.js +2 -2
- package/src/table/package.json +5 -5
- package/src/table/src/kepler-table.ts +4 -3
- package/src/table/src/tileset/vector-tile-utils.ts +1 -1
- package/src/table/tsconfig.production.json +2 -1
- package/src/tasks/package.json +2 -2
- package/src/types/effects.d.ts +1 -0
- package/src/types/package.json +1 -1
- package/src/utils/dist/application-config.d.ts +1 -0
- package/src/utils/dist/application-config.js +4 -4
- package/src/utils/package.json +4 -4
- package/src/utils/src/application-config.ts +6 -0
- package/umd/keplergl.min.js +1069 -1094
- package/src/table/dist/src/table/src/tileset/vector-tile-utils.spec.d.ts +0 -1
- package/src/table/dist/test/fixtures/tile-metadata.d.ts +0 -65
- /package/src/table/dist/{src/table/src/dataset-utils.d.ts → dataset-utils.d.ts} +0 -0
- /package/src/table/dist/{src/table/src/gpu-filter-utils.d.ts → gpu-filter-utils.d.ts} +0 -0
- /package/src/table/dist/{src/table/src/index.d.ts → index.d.ts} +0 -0
- /package/src/table/dist/{src/table/src/tileset → tileset}/raster-tile-utils.d.ts +0 -0
- /package/src/table/dist/{src/table/src/tileset → tileset}/tileset-utils.d.ts +0 -0
- /package/src/table/dist/{src/table/src/tileset → tileset}/vector-tile-utils.d.ts +0 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
// Copyright contributors to the kepler.gl project
|
|
3
3
|
|
|
4
|
+
import classNames from 'classnames';
|
|
4
5
|
import React, {ComponentType} from 'react';
|
|
5
6
|
import styled, {withTheme} from 'styled-components';
|
|
6
|
-
|
|
7
|
-
import classNames from 'classnames';
|
|
7
|
+
|
|
8
8
|
import {FormattedMessage} from '@kepler.gl/localization';
|
|
9
|
+
import {getApplicationConfig} from '@kepler.gl/utils';
|
|
10
|
+
|
|
9
11
|
import {BaseProps} from '../../common/icons';
|
|
10
12
|
|
|
11
13
|
export type LayerTypeListItemProps = {
|
|
@@ -21,7 +23,11 @@ type WithThemeProps = LayerTypeListItemProps & {theme: Record<string, string>};
|
|
|
21
23
|
|
|
22
24
|
export type LayerTypeListItemType = React.FC<LayerTypeListItemProps>;
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
type StyledListItemProps = {
|
|
27
|
+
cdnUrl: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const StyledListItem = styled.div<StyledListItemProps>`
|
|
25
31
|
&.list {
|
|
26
32
|
display: flex;
|
|
27
33
|
align-items: center;
|
|
@@ -46,7 +52,7 @@ const StyledListItem = styled.div`
|
|
|
46
52
|
.layer-type-selector__item__icon {
|
|
47
53
|
color: ${props => props.theme.labelColor};
|
|
48
54
|
display: flex;
|
|
49
|
-
background-image: url(${`${
|
|
55
|
+
background-image: url(${props => `${props.cdnUrl}/images/kepler.gl-layer-icon-bg.png`});
|
|
50
56
|
background-size: ${props => props.theme.layerTypeIconSizeL}px
|
|
51
57
|
${props => props.theme.layerTypeIconSizeL}px;
|
|
52
58
|
height: ${props => props.theme.layerTypeIconSizeL}px;
|
|
@@ -68,6 +74,7 @@ export function LayerTypeListItemFactory() {
|
|
|
68
74
|
className={classNames('layer-type-selector__item__inner', className, {
|
|
69
75
|
list: !isTile
|
|
70
76
|
})}
|
|
77
|
+
cdnUrl={getApplicationConfig().cdnUrl}
|
|
71
78
|
>
|
|
72
79
|
<div className="layer-type-selector__item__icon">
|
|
73
80
|
<value.icon height={`${isTile ? theme.layerTypeIconSizeL : theme.layerTypeIconSizeSM}px`} />
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
|
|
7
|
-
import {RasterLayerResources
|
|
8
|
-
import {getCategoricalColormapDataUrl} from '@kepler.gl/layers';
|
|
7
|
+
import {getCategoricalColormapDataUrl, RasterLayerResources} from '@kepler.gl/layers';
|
|
9
8
|
import type {CategoricalColormapOptions} from '@kepler.gl/layers';
|
|
10
9
|
|
|
11
10
|
const StyledColorMapListItem = styled.div`
|
|
@@ -40,7 +39,7 @@ const ColorMapImg: React.FC<{id: string; categoricalOptions: CategoricalColormap
|
|
|
40
39
|
}
|
|
41
40
|
url = dataUrl;
|
|
42
41
|
} else {
|
|
43
|
-
url =
|
|
42
|
+
url = RasterLayerResources.rasterColorMap(id);
|
|
44
43
|
}
|
|
45
44
|
return <img src={url} style={{width: '100%', height: '100%'}} />;
|
|
46
45
|
};
|
|
@@ -64,7 +64,7 @@ const CustomInputLabel = styled.label`
|
|
|
64
64
|
const RangeInput = styled.input`
|
|
65
65
|
${props => props.theme.input};
|
|
66
66
|
font-size: ${props => props.theme.sliderInputFontSize};
|
|
67
|
-
width:
|
|
67
|
+
width: ${props => props.theme.customRangeInputWidth}px;
|
|
68
68
|
overflow: auto;
|
|
69
69
|
height: 20px;
|
|
70
70
|
margin-top: 5px;
|
|
@@ -82,7 +82,7 @@ const LazyInput: React.FC<LazyInputProps> = ({value, onChange, name}) => {
|
|
|
82
82
|
switch (e.keyCode) {
|
|
83
83
|
case KeyEvent.DOM_VK_ENTER:
|
|
84
84
|
case KeyEvent.DOM_VK_RETURN:
|
|
85
|
-
onChange(stateValue);
|
|
85
|
+
onChange(name, stateValue);
|
|
86
86
|
if (inputRef !== null) {
|
|
87
87
|
// @ts-ignore
|
|
88
88
|
inputRef?.current.blur();
|
|
@@ -92,7 +92,7 @@ const LazyInput: React.FC<LazyInputProps> = ({value, onChange, name}) => {
|
|
|
92
92
|
break;
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
|
-
[onChange, stateValue]
|
|
95
|
+
[onChange, name, stateValue]
|
|
96
96
|
);
|
|
97
97
|
|
|
98
98
|
const _onChange = useCallback(e => setValue(e.target.value), [setValue]);
|
|
@@ -114,8 +114,15 @@ const LazyInput: React.FC<LazyInputProps> = ({value, onChange, name}) => {
|
|
|
114
114
|
const CustomInput: React.FC<CustomInputProps> = ({isRanged, value, onChangeCustomInput}) => {
|
|
115
115
|
const onChangeInput = useCallback(
|
|
116
116
|
(name, v) => {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
const prevValue = isRanged ? (name === 'value1' ? value[0] : value[1]) : value;
|
|
118
|
+
const valueAsNumber = Number(v);
|
|
119
|
+
const convertedValue =
|
|
120
|
+
typeof prevValue === 'number' ? (isNaN(valueAsNumber) ? prevValue : valueAsNumber) : v;
|
|
121
|
+
if (isRanged)
|
|
122
|
+
onChangeCustomInput(
|
|
123
|
+
name === 'value0' ? [convertedValue, value[1]] : [value[0], convertedValue]
|
|
124
|
+
);
|
|
125
|
+
else onChangeCustomInput(convertedValue);
|
|
119
126
|
},
|
|
120
127
|
[isRanged, value, onChangeCustomInput]
|
|
121
128
|
);
|
|
@@ -9,6 +9,7 @@ import {FormattedMessage} from '@kepler.gl/localization';
|
|
|
9
9
|
import {MapStyle} from '@kepler.gl/reducers';
|
|
10
10
|
import {NO_BASEMAP_ICON} from '@kepler.gl/constants';
|
|
11
11
|
import {MapStyles} from '@kepler.gl/types';
|
|
12
|
+
import {getApplicationConfig} from '@kepler.gl/utils';
|
|
12
13
|
|
|
13
14
|
import {ArrowDown} from '../../common/icons';
|
|
14
15
|
import PanelHeaderActionFactory from '../panel-header-action';
|
|
@@ -113,7 +114,12 @@ function MapStyleSelectorFactory(PanelHeaderAction: ReturnType<typeof PanelHeade
|
|
|
113
114
|
</PanelLabel>
|
|
114
115
|
|
|
115
116
|
{Object.values(mapStyles).map(
|
|
116
|
-
({
|
|
117
|
+
({
|
|
118
|
+
id,
|
|
119
|
+
custom,
|
|
120
|
+
icon = `${getApplicationConfig().cdnUrl}/${NO_BASEMAP_ICON}`,
|
|
121
|
+
label = 'Untitled'
|
|
122
|
+
}) => (
|
|
117
123
|
<StyledMapDropdown
|
|
118
124
|
className={classnames('map-dropdown-option', {
|
|
119
125
|
collapsed: !isSelecting && id !== styleType,
|
|
@@ -2,7 +2,7 @@ import { BaseMapStyle, EffectDescription, RGBAColor, SyncTimelineMode, BaseMapCo
|
|
|
2
2
|
import { scaleLinear, scaleLog, scaleOrdinal, scalePoint, scaleQuantile, scaleQuantize, scaleSqrt, scaleThreshold } from 'd3-scale';
|
|
3
3
|
export declare const ACTION_PREFIX = "@@kepler.gl/";
|
|
4
4
|
export declare const KEPLER_UNFOLDED_BUCKET = "https://studio-public-data.foursquare.com/statics/keplergl";
|
|
5
|
-
export declare const BASEMAP_ICON_PREFIX
|
|
5
|
+
export declare const BASEMAP_ICON_PREFIX = "geodude";
|
|
6
6
|
export declare const DEFAULT_MAPBOX_API_URL = "https://api.mapbox.com";
|
|
7
7
|
export declare const TRANSITION_DURATION = 0;
|
|
8
8
|
/**
|
|
@@ -856,15 +856,17 @@ export declare enum GEOARROW_EXTENSIONS {
|
|
|
856
856
|
MULTIPOLYGON = "geoarrow.multipolygon",
|
|
857
857
|
WKB = "geoarrow.wkb"
|
|
858
858
|
}
|
|
859
|
-
export declare const
|
|
860
|
-
rasterColorMap: (colormapId: string) => string;
|
|
861
|
-
};
|
|
859
|
+
export declare const LOADERS_CDN_VERSION = "4.3.2";
|
|
862
860
|
export declare const LOADERS_CDN_URL = "https://unpkg.com/@loaders.gl";
|
|
863
861
|
export declare const getLoaderOptions: () => {
|
|
864
862
|
mvt: {
|
|
865
863
|
workerUrl: string;
|
|
866
864
|
};
|
|
867
|
-
'quantized-mesh': {
|
|
868
|
-
|
|
865
|
+
'quantized-mesh': {
|
|
866
|
+
workerUrl: string;
|
|
867
|
+
};
|
|
868
|
+
npy: {
|
|
869
|
+
workerUrl: string;
|
|
870
|
+
};
|
|
869
871
|
};
|
|
870
872
|
export {};
|