@carto/ps-react-maps 0.0.1-alpha.8 → 0.0.1-beta.0
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/index.cjs +10 -2125
- package/dist/index.js +492 -55632
- package/dist/types/index.d.ts +1 -6
- package/dist/types/map-provider/index.d.ts +6 -0
- package/dist/types/{map.context.d.ts → map-provider/map-provider.context.d.ts} +3 -3
- package/dist/types/map-provider/map-provider.hook.d.ts +2 -0
- package/dist/types/{map.provider.d.ts → map-provider/map-provider.provider.d.ts} +1 -1
- package/dist/types/{map.reducer.d.ts → map-provider/map-provider.reducer.d.ts} +1 -1
- package/dist/types/{map.types.d.ts → map-provider/map-provider.types.d.ts} +20 -9
- package/package.json +2 -2
- package/dist/types/map.hook.d.ts +0 -2
- package/dist/types/tmp.utils.d.ts +0 -1
- /package/dist/types/{map.const.d.ts → map-provider/map-provider.const.d.ts} +0 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export * from './map
|
|
2
|
-
export * from './map.types';
|
|
3
|
-
export { INITIAL_STATE, MapContext, MapActionsContext } from './map.context';
|
|
4
|
-
export { reducer } from './map.reducer';
|
|
5
|
-
export { useMap, useMapActions } from './map.hook';
|
|
6
|
-
export { MapProvider } from './map.provider';
|
|
1
|
+
export * from './map-provider';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './map-provider.const';
|
|
2
|
+
export * from './map-provider.types';
|
|
3
|
+
export { INITIAL_STATE, MapContext, MapActionsContext, } from './map-provider.context';
|
|
4
|
+
export { reducer } from './map-provider.reducer';
|
|
5
|
+
export { useMap, useMapActions } from './map-provider.hook';
|
|
6
|
+
export { MapProvider } from './map-provider.provider';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { MapContextInterface } from './map.types';
|
|
2
|
+
import type { MapContextInterface } from './map-provider.types';
|
|
3
3
|
export declare const INITIAL_STATE: MapContextInterface;
|
|
4
|
-
export declare const MapContext: import("react").Context<import("./map.types").MapState>;
|
|
5
|
-
export declare const MapActionsContext: import("react").Context<import("./map.types").MapActionsState>;
|
|
4
|
+
export declare const MapContext: import("react").Context<import("./map-provider.types").MapState>;
|
|
5
|
+
export declare const MapActionsContext: import("react").Context<import("./map-provider.types").MapActionsState>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { MapProviderProps } from './map.types';
|
|
1
|
+
import type { MapProviderProps } from './map-provider.types';
|
|
2
2
|
export declare function MapProvider({ children, maps }: MapProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import type { PickingInfo, MapViewState } from '@deck.gl/core/typed';
|
|
3
|
+
import type { GoogleMapsOverlay, GoogleMapsOverlayProps } from '@deck.gl/google-maps/typed';
|
|
4
|
+
import type { DeckGLProps, DeckGLRef } from '@deck.gl/react/typed';
|
|
5
5
|
import type { StyleSpecification } from 'maplibre-gl';
|
|
6
6
|
import type { Properties } from 'csstype';
|
|
7
|
-
import type { MutableRefObject, ReactNode
|
|
8
|
-
import {
|
|
9
|
-
import { CartoBasemapsNames, GMapsBasemap } from './map.const';
|
|
7
|
+
import type { MutableRefObject, ReactNode } from 'react';
|
|
8
|
+
import type { MapRef } from 'react-map-gl';
|
|
9
|
+
import { CartoBasemapsNames, GMapsBasemap } from './map-provider.const';
|
|
10
10
|
export type MapProviderProps = {
|
|
11
11
|
children: ReactNode;
|
|
12
|
-
maps:
|
|
12
|
+
maps: {
|
|
13
|
+
id: MapsProps['id'];
|
|
14
|
+
basemap: MapsProps['basemap'];
|
|
15
|
+
viewState: MapsProps['viewState'];
|
|
16
|
+
}[];
|
|
13
17
|
};
|
|
14
18
|
export type MapState = {
|
|
15
19
|
maps: Record<MapsProps['id'], MapsProps>;
|
|
@@ -31,8 +35,8 @@ export type MapContextInterface = {
|
|
|
31
35
|
export type Basemap = (typeof GMapsBasemap)[keyof typeof GMapsBasemap] | (typeof CartoBasemapsNames)[keyof typeof CartoBasemapsNames] | string | StyleSpecification;
|
|
32
36
|
export type CommonProps = {
|
|
33
37
|
id: string;
|
|
34
|
-
basemap
|
|
35
|
-
instanceRef?:
|
|
38
|
+
basemap: Basemap;
|
|
39
|
+
instanceRef?: MutableRefObject<InstanceMapRef>;
|
|
36
40
|
overlayRef?: MutableRefObject<OverlayMapRef>;
|
|
37
41
|
} & DeckGLProps;
|
|
38
42
|
export type MapsProps = DeckGLMapsProps & GoogleMapsProps;
|
|
@@ -43,8 +47,15 @@ export type GoogleMapsProps = {
|
|
|
43
47
|
apiKey?: string;
|
|
44
48
|
height?: string | undefined;
|
|
45
49
|
language?: string;
|
|
50
|
+
mapId?: string;
|
|
46
51
|
mapOptions?: Record<string, number | string>;
|
|
47
52
|
style?: Properties;
|
|
48
53
|
version?: string;
|
|
49
54
|
width?: string | undefined;
|
|
50
55
|
} & CommonProps & GoogleMapsOverlayProps;
|
|
56
|
+
export type Tooltip = {
|
|
57
|
+
text?: string | undefined;
|
|
58
|
+
html?: string | undefined;
|
|
59
|
+
className?: string | undefined;
|
|
60
|
+
style?: Partial<CSSStyleDeclaration> | undefined;
|
|
61
|
+
} & PickingInfo;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carto/ps-react-maps",
|
|
3
|
-
"version": "0.0.1-
|
|
3
|
+
"version": "0.0.1-beta.0",
|
|
4
4
|
"description": "CARTO's Professional Service React Maps library",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"test:coverage": "vitest run --coverage"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
+
"@carto/react-redux": "2.2.13",
|
|
29
30
|
"react-redux": "8.1.3"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@carto/react-redux": "2.2.13",
|
|
33
33
|
"@deck.gl/core": "8.9.31",
|
|
34
34
|
"@deck.gl/google-maps": "8.9.31",
|
|
35
35
|
"@deck.gl/react": "8.9.31",
|
package/dist/types/map.hook.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const debounce: <F extends (...args: Parameters<F>) => void>(func: F, waitFor: number) => (...args: Parameters<F>) => ReturnType<F>;
|
|
File without changes
|