Skip to content

Commit e07953e

Browse files
committed
merge master
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
2 parents f6009e7 + f52250e commit e07953e

155 files changed

Lines changed: 14529 additions & 2411 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,32 @@ Each version should:
1515
Ref: http://keepachangelog.com/en/0.3.0/
1616
-->
1717

18+
## [3.1.7] - May 14 2025
19+
20+
- 014059b97 [fix] fixes for raster tile layer (#3102)
21+
- 518c515d1 [feat] loading indicator improvements for tiled layers (#3097)
22+
- e290f281e [fix] fix for getFieldsFromTile regression (#3099)
23+
- 7087ffe15 [fix] fix tooltip crashing for trip layer (#3103)
24+
- a231ebfc1 [fix] fix for image export with effects (#3105)
25+
- da38e26b9 [chore] Update Comments in actions (#3098)
26+
- 21aac1c85 [fix] fixes for custom input (#3095)
27+
- 271b8cc98 [fix] fix types publishing for table module (#3096)
28+
- 3d3bb9b54 [chore] add cdnUrl option to application config (#3093)
29+
- 9cdf73ea4 [Bug] remove layer item z-index (#3091)
30+
31+
## [3.1.6] - May 8 2025
32+
33+
- 33203a6de [fix] fix loading indicotor not hidden regression (#3088)
34+
- 913176bb6 [bug] fix lodash imports regression (#3089)
35+
36+
## [3.1.5] - May 8 2025
37+
38+
- 223d14b60 [chore] ts fixes
39+
- 3570ac429 [feat] Raster Tile Layer - development in progress (#3048)
40+
- 07e5beae2 [chore] import add tileset dialog styling (#3085)
41+
- 6568c0c94 [Feat] Add Spatial Data Analysis tools to AI Assistants (#3057)
42+
- fd08fa1a9 [Chore] export more kepler-gl prop selector (#3081)
43+
1844
## [3.1.4] - May 5 2025
1945

2046
- 03b8ea0a9 [Chore] Use clonedeep in interaction config load (#3080)

docs/user-guides/c-types-of-layers/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,17 @@ Supported URL templates:
102102
- pmtiles (https://your-cdn/filename.pmtiles)
103103

104104
[Back to table of contents](../README.md)
105+
106+
## Raster Tile Layer
107+
108+
Raster layers are used to show satellite and aerial imagery. They allow you to work interactively directly with massive, image collections stored in .pmtiles (in raster format) or Cloud Optimized GeoTIFF format.
109+
110+
Supported URL templates:
111+
112+
- Users can reference remote **.pmtiles files in raster format** for raster layers by supplying a direct link to the file.
113+
114+
- **Cloud-Optimized GeoTIFFs (COG)** can also be used in raster layers by providing standardized Spatio-Temporal Asset Catalog (STAC) metadata.
115+
- The metadata file must be a valid *STAC Item* or *STAC Collection*, version 1.0.0 or higher.
116+
- Raster data referenced in STAC assets should be Cloud-Optimized GeoTIFFs and need to be publicly accessible via HTTPS.
117+
- STAC item and collections *must have Electro-Optical and Raster extensions*, and at least one asset must have both eo:bands and raster:bands information. common_name must be provided in eo:bands and data_type must be provided in raster:bands.
118+
- Users must use their own instances of raster tile servers, such as Titiler. [TODO: add instructions]

examples/demo-app/esbuild.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ function addAliases(externals, args) {
135135
resolveAlias['@openassistant/geoda'] = join(LIB_DIR, '../openassistant/packages/geoda/src');
136136
resolveAlias['@openassistant/duckdb'] = join(LIB_DIR, '../openassistant/packages/duckdb/src');
137137
resolveAlias['@openassistant/common'] = join(LIB_DIR, '../openassistant/packages/common/src');
138+
resolveAlias['@openassistant/osm'] = join(LIB_DIR, '../openassistant/packages/osm/src');
139+
resolveAlias['@openassistant/utils'] = join(LIB_DIR, '../openassistant/packages/utils/src');
138140
resolveAlias['@kepler.gl/ai-assistant'] = join(SRC_DIR, 'ai-assistant/src');
139141
}
140142

examples/demo-app/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@carto/toolkit": "0.0.1-rc.18",
1717
"@emotion/is-prop-valid": "^1.2.1",
1818
"@kepler.gl/actions": "^3.1.0",
19+
"@kepler.gl/ai-assistant": "^3.1.0",
1920
"@kepler.gl/cloud-providers": "^3.1.0",
2021
"@kepler.gl/components": "^3.1.0",
2122
"@kepler.gl/constants": "^3.1.0",
@@ -30,8 +31,8 @@
3031
"@loaders.gl/csv": "^4.3.2",
3132
"@loaders.gl/json": "^4.3.2",
3233
"@loaders.gl/parquet": "^4.3.2",
33-
"@openassistant/core": "^0.0.7",
34-
"@openassistant/ui": "^0.0.7",
34+
"@openassistant/core": "^0.4.0",
35+
"@openassistant/ui": "^0.4.0",
3536
"@types/classnames": "^2.3.1",
3637
"@types/keymirror": "^0.1.1",
3738
"apache-arrow": ">=15.0.0",

examples/demo-app/src/app.tsx

Lines changed: 71 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
// SPDX-License-Identifier: MIT
22
// Copyright contributors to the kepler.gl project
33

4-
import React, {useCallback, useEffect, useRef, useMemo, useState} from 'react';
4+
import React, {useCallback, useEffect, useRef, useState} from 'react';
55
import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
66
import styled, {ThemeProvider, StyleSheetManager} from 'styled-components';
77
import Window from 'global/window';
88
import {connect, useDispatch} from 'react-redux';
99
import cloneDeep from 'lodash/cloneDeep';
1010
import isEqual from 'lodash/isEqual';
11+
import {useSelector} from 'react-redux';
1112
import isPropValid from '@emotion/is-prop-valid';
12-
13+
import {WebMercatorViewport} from '@deck.gl/core';
1314
import {ScreenshotWrapper} from '@openassistant/ui';
1415
import {
15-
messages as aiAssistantMessages,
1616
setStartScreenCapture,
17-
setScreenCaptured
17+
setScreenCaptured,
18+
AiAssistantPanel,
19+
setMapBoundary
1820
} from '@kepler.gl/ai-assistant';
1921
import {panelBorderColor, theme} from '@kepler.gl/styles';
20-
import {useSelector} from 'react-redux';
2122
import {ParsedConfig} from '@kepler.gl/types';
2223
import {getApplicationConfig} from '@kepler.gl/utils';
2324
import {SqlPanel} from '@kepler.gl/duckdb';
@@ -139,6 +140,17 @@ const StyledResizeHandle = styled(PanelResizeHandle)`
139140
cursor: row-resize;
140141
`;
141142

143+
const StyledVerticalResizeHandle = styled(PanelResizeHandle)`
144+
background-color: ${panelBorderColor};
145+
width: 4px;
146+
height: 100%;
147+
cursor: row-resize;
148+
149+
&:hover {
150+
background-color: #555;
151+
}
152+
`;
153+
142154
const App = props => {
143155
const [showBanner, toggleShowBanner] = useState(false);
144156
const {params: {id, provider} = {}, location: {query = {}} = {}} = props;
@@ -150,6 +162,11 @@ const App = props => {
150162
const isSqlPanelOpen = useSelector(
151163
state => duckDbPluginEnabled && state?.demo?.keplerGl?.map?.uiState.mapControls.sqlPanel?.active
152164
);
165+
166+
const isAiAssistantPanelOpen = useSelector(
167+
state => state?.demo?.keplerGl?.map?.uiState.mapControls.aiAssistant?.active
168+
);
169+
153170
const prevQueryRef = useRef<number>(null);
154171

155172
useEffect(() => {
@@ -202,6 +219,20 @@ const App = props => {
202219
// eslint-disable-next-line react-hooks/exhaustive-deps
203220
}, []);
204221

222+
/**
223+
* Update map boundary when view state changes, used by ai-assistant to
224+
* get data from vector tiles when map boundary changes
225+
*/
226+
const onViewStateChange = useCallback(
227+
viewState => {
228+
const viewport = new WebMercatorViewport(viewState);
229+
const nw = viewport.unproject([0, 0]);
230+
const se = viewport.unproject([viewport.width, viewport.height]);
231+
dispatch(setMapBoundary(nw, se));
232+
},
233+
[dispatch]
234+
);
235+
205236
const _setStartScreenCapture = useCallback(
206237
flag => {
207238
dispatch(setStartScreenCapture(flag));
@@ -567,19 +598,6 @@ const App = props => {
567598
);
568599
}, [dispatch]);
569600

570-
const combinedMessages = useMemo(() => {
571-
return Object.keys(messages).reduce(
572-
(acc, language) => ({
573-
...acc,
574-
[language]: {
575-
...(messages[language] || {}),
576-
...(aiAssistantMessages[language] || {})
577-
}
578-
}),
579-
{}
580-
);
581-
}, []);
582-
583601
const _loadSampleData = useCallback(() => {
584602
// _loadPointData();
585603
// _loadGeojsonData();
@@ -631,31 +649,44 @@ const App = props => {
631649
<Announcement onDisable={_disableBanner} />
632650
</Banner>
633651
<div style={CONTAINER_STYLE}>
634-
<PanelGroup direction="vertical">
635-
<Panel defaultSize={isSqlPanelOpen ? 60 : 100}>
636-
<AutoSizer>
637-
{({height, width}) => (
638-
<KeplerGl
639-
mapboxApiAccessToken={CLOUD_PROVIDERS_CONFIGURATION.MAPBOX_TOKEN}
640-
id="map"
641-
getState={keplerGlGetState}
642-
width={width}
643-
height={height}
644-
cloudProviders={CLOUD_PROVIDERS}
645-
localeMessages={combinedMessages}
646-
onExportToCloudSuccess={onExportFileSuccess}
647-
onLoadCloudMapSuccess={onLoadCloudMapSuccess}
648-
featureFlags={DEFAULT_FEATURE_FLAGS}
649-
/>
652+
<PanelGroup direction="horizontal">
653+
<Panel defaultSize={isAiAssistantPanelOpen ? 70 : 100}>
654+
<PanelGroup direction="vertical">
655+
<Panel defaultSize={isSqlPanelOpen ? 60 : 100}>
656+
<AutoSizer>
657+
{({height, width}) => (
658+
<KeplerGl
659+
mapboxApiAccessToken={CLOUD_PROVIDERS_CONFIGURATION.MAPBOX_TOKEN}
660+
id="map"
661+
getState={keplerGlGetState}
662+
width={width}
663+
height={height}
664+
cloudProviders={CLOUD_PROVIDERS}
665+
localeMessages={messages}
666+
onExportToCloudSuccess={onExportFileSuccess}
667+
onLoadCloudMapSuccess={onLoadCloudMapSuccess}
668+
featureFlags={DEFAULT_FEATURE_FLAGS}
669+
onViewStateChange={onViewStateChange}
670+
/>
671+
)}
672+
</AutoSizer>
673+
</Panel>
674+
675+
{isSqlPanelOpen && (
676+
<>
677+
<StyledResizeHandle />
678+
<Panel defaultSize={40} minSize={20}>
679+
<SqlPanel initialSql={query.sql || ''} />
680+
</Panel>
681+
</>
650682
)}
651-
</AutoSizer>
683+
</PanelGroup>
652684
</Panel>
653-
654-
{isSqlPanelOpen && (
685+
{isAiAssistantPanelOpen && (
655686
<>
656-
<StyledResizeHandle />
657-
<Panel defaultSize={40} minSize={20}>
658-
<SqlPanel initialSql={query.sql || ''} />
687+
<StyledVerticalResizeHandle />
688+
<Panel defaultSize={30} minSize={20}>
689+
<AiAssistantPanel />
659690
</Panel>
660691
</>
661692
)}

examples/demo-app/src/components/load-data-modal/load-remote-map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import React, {Component} from 'react';
66
import PropTypes from 'prop-types';
77
import styled from 'styled-components';
88

9+
import {validateUrl} from '@kepler.gl/common-utils';
910
import {Button} from '@kepler.gl/components';
1011
import {FormattedMessage} from '@kepler.gl/localization';
1112

1213
import {CORS_LINK} from '../../constants/default-settings';
13-
import {validateUrl} from '../../utils/url';
1414

1515
const propTypes = {
1616
onLoadRemoteMap: PropTypes.func.isRequired

examples/demo-app/src/factories/map-control.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
import React from 'react';
55
import styled from 'styled-components';
66

7-
import {AiAssistantControlFactory, AiAssistantManagerFactory} from '@kepler.gl/ai-assistant';
87
import {
98
withState,
109
MapControlFactory,
1110
EffectControlFactory,
1211
EffectManagerFactory
1312
} from '@kepler.gl/components';
13+
import {AiAssistantControlFactory} from '@kepler.gl/ai-assistant';
1414

1515
import {BannerMapPanel, SampleMapPanel} from '../components/map-control/map-control';
1616
import SqlPanelControlFactory from '../components/map-control/sql-panel-control';
@@ -58,44 +58,36 @@ const StyledMapControlOverlay = styled.div`
5858
CustomMapControlFactory.deps = [
5959
EffectControlFactory,
6060
EffectManagerFactory,
61-
AiAssistantControlFactory,
62-
AiAssistantManagerFactory,
6361
SqlPanelControlFactory,
62+
AiAssistantControlFactory,
6463
...MapControlFactory.deps
6564
];
6665
function CustomMapControlFactory(
6766
EffectControl,
6867
EffectManager,
69-
AiAssistantControl,
70-
AiAssistantManager,
7168
SqlPanelControl,
69+
AiAssistantControl,
7270
...deps
7371
) {
7472
const MapControl = MapControlFactory(...deps);
7573
const actionComponents = [
7674
...(MapControl.defaultActionComponents ?? []),
7775
EffectControl,
78-
AiAssistantControl,
79-
SqlPanelControl
76+
SqlPanelControl,
77+
AiAssistantControl
8078
];
8179

8280
const CustomMapControl = props => {
8381
const showEffects = Boolean(props.mapControls?.effect?.active);
84-
const showAiAssistant = Boolean(props.mapControls?.aiAssistant?.active);
8582
return (
86-
<StyledMapControlOverlay
87-
top={props.top}
88-
rightPanelVisible={showEffects || showAiAssistant}
89-
fullHeight={showAiAssistant}
90-
>
83+
<StyledMapControlOverlay top={props.top} rightPanelVisible={showEffects}>
9184
<StyledMapControlPanel>
9285
{<BannerMapPanel {...props} />}
9386
{!props.isExport && props.currentSample ? <SampleMapPanel {...props} /> : null}
9487
<MapControl {...props} top={0} actionComponents={actionComponents} />
9588
</StyledMapControlPanel>
9689
<StyledMapControlContextPanel>
9790
{showEffects ? <EffectManager /> : null}
98-
{showAiAssistant ? <AiAssistantManager /> : null}
9991
</StyledMapControlContextPanel>
10092
</StyledMapControlOverlay>
10193
);

examples/demo-app/src/utils/url.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)