Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 84 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui-warped-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@turf/transform-translate": "^7.1.0",
"lodash": "^4.17.21",
"maplibre-gl": "^4.7.1",
"react-map-gl": "^7.1.7"
"react-map-gl": "^8.0.1"
},
"peerDependencies": {
"react": ">=18.0",
Expand Down
2 changes: 1 addition & 1 deletion ui-warped-map/src/components/BaseMap.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { type PropsWithChildren, useEffect, useMemo, useState } from 'react';

import { type StyleSpecification } from '@maplibre/maplibre-gl-style-spec';
import { bbox } from '@turf/bbox';
import { featureCollection } from '@turf/helpers';
import type { Feature, LineString } from 'geojson';
import { type StyleSpecification } from 'maplibre-gl';
import ReactMapGL, { Layer, type LayerProps, type MapRef, Source } from 'react-map-gl/maplibre';

import { bboxAs2D } from '../core/helpers';
Expand Down
2 changes: 1 addition & 1 deletion ui-warped-map/src/components/DataLoader.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useEffect, useState } from 'react';

import { type StyleSpecification } from '@maplibre/maplibre-gl-style-spec';
import { featureCollection } from '@turf/helpers';
import type { Feature, FeatureCollection } from 'geojson';
import { type StyleSpecification } from 'maplibre-gl';
import { createPortal } from 'react-dom';
import ReactMapGL, { Layer, type LayerProps, type MapRef, Source } from 'react-map-gl/maplibre';

Expand Down
6 changes: 3 additions & 3 deletions ui-warped-map/src/components/TransformedDataMap.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { type PropsWithChildren, useEffect, useMemo, useState } from 'react';

import { type StyleSpecification } from '@maplibre/maplibre-gl-style-spec';
import { featureCollection } from '@turf/helpers';
import type { Feature, FeatureCollection, LineString } from 'geojson';
import { omit } from 'lodash';
import { type StyleSpecification } from 'maplibre-gl';
import ReactMapGL, {
Layer,
type LayerProps,
type LineLayer,
type LineLayerSpecification,
type MapRef,
Source,
} from 'react-map-gl/maplibre';
Expand All @@ -21,7 +21,7 @@ type TransformedDataMapProps = {
sources: SourceDefinition[];
transformedData: Record<string, FeatureCollection>;
path?: Feature<LineString>;
pathLayer?: Omit<LineLayer, 'source-layer'>;
pathLayer?: Omit<LineLayerSpecification, 'source-layer'>;
log?: boolean;
};

Expand Down
6 changes: 3 additions & 3 deletions ui-warped-map/src/components/WarpedMap.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { type ComponentType, type PropsWithChildren, useEffect, useState } from 'react';

import { type StyleSpecification } from '@maplibre/maplibre-gl-style-spec';
import { bbox } from '@turf/bbox';
import type { Feature, FeatureCollection, LineString } from 'geojson';
import { isNil, mapValues, omitBy } from 'lodash';
import { type LineLayer } from 'react-map-gl/maplibre';
import { type StyleSpecification } from 'maplibre-gl';
import { type LineLayerSpecification } from 'react-map-gl/maplibre';

import DataLoader from './DataLoader';
import Loader from './Loader';
Expand All @@ -30,7 +30,7 @@ const DEFAULT_COMPONENTS: Components = {

type WarpedMapProps = {
path: Feature<LineString>;
pathLayer?: Omit<LineLayer, 'source-layer'>;
pathLayer?: Omit<LineLayerSpecification, 'source-layer'>;
sources: SourceDefinition[];
components?: Partial<Components>;
mapStyle?: string | StyleSpecification;
Expand Down
4 changes: 2 additions & 2 deletions ui-warped-map/src/stories/Algorithms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useMemo } from 'react';

import { featureCollection } from '@turf/helpers';
import type { Feature, LineString } from 'geojson';
import { Layer, type LineLayer, Source } from 'react-map-gl/maplibre';
import { Layer, type LineLayerSpecification, Source } from 'react-map-gl/maplibre';

import { OSM_BASE_MAP_STYLE, OSM_SOURCE } from './helpers';
import BaseMap from '../components/BaseMap';
Expand All @@ -14,7 +14,7 @@ import { useAsyncMemo } from '../core/useAsyncMemo';

const SOURCES: SourceDefinition[] = [OSM_SOURCE];

const PATH_LAYER: Omit<LineLayer, 'source-layer'> = {
const PATH_LAYER: Omit<LineLayerSpecification, 'source-layer'> = {
id: 'path-layer',
source: 'path',
type: 'line',
Expand Down
4 changes: 2 additions & 2 deletions ui-warped-map/src/stories/SampleMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useMemo } from 'react';
import { featureCollection } from '@turf/helpers';
import type { Feature, LineString } from 'geojson';
import 'maplibre-gl/dist/maplibre-gl.css';
import { Layer, type LineLayer, Source } from 'react-map-gl/maplibre';
import { Layer, type LineLayerSpecification, Source } from 'react-map-gl/maplibre';

import { OSM_BASE_MAP_STYLE, OSM_SOURCE } from './helpers';
import BaseMap from '../components/BaseMap';
Expand All @@ -14,7 +14,7 @@ import { useAsyncMemo } from '../core/useAsyncMemo';

const SOURCES: SourceDefinition[] = [OSM_SOURCE];

const PATH_LAYER: Omit<LineLayer, 'source-layer'> = {
const PATH_LAYER: Omit<LineLayerSpecification, 'source-layer'> = {
id: 'path-layer',
source: 'path',
type: 'line',
Expand Down
2 changes: 1 addition & 1 deletion ui-warped-map/src/stories/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type StyleSpecification } from '@maplibre/maplibre-gl-style-spec';
import { type StyleSpecification } from 'maplibre-gl';
import { type LayerProps } from 'react-map-gl';

import { type SourceDefinition } from '../core/types';
Expand Down