Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainValls committed Feb 12, 2025
1 parent cdc9f81 commit 7cba244
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
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';

Check warning on line 7 in ui-warped-map/src/components/BaseMap.tsx

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module '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';

Check warning on line 7 in ui-warped-map/src/components/DataLoader.tsx

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module 'react-map-gl/maplibre'

Check warning on line 7 in ui-warped-map/src/components/DataLoader.tsx

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module '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';

Check warning on line 13 in ui-warped-map/src/components/TransformedDataMap.tsx

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module 'react-map-gl/maplibre'

Check warning on line 13 in ui-warped-map/src/components/TransformedDataMap.tsx

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module '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';

Check warning on line 7 in ui-warped-map/src/components/WarpedMap.tsx

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module 'react-map-gl/maplibre'

Check warning on line 7 in ui-warped-map/src/components/WarpedMap.tsx

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module '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';

Check warning on line 5 in ui-warped-map/src/stories/Algorithms.tsx

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module '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';

Check warning on line 6 in ui-warped-map/src/stories/SampleMap.tsx

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module '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';

Check warning on line 2 in ui-warped-map/src/stories/helpers.ts

View workflow job for this annotation

GitHub Actions / build

Unable to resolve path to module 'react-map-gl'

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

0 comments on commit 7cba244

Please sign in to comment.