@dxos/react-ui-geo 0.8.3 → 0.8.4-main.1068cf700f
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/data/airports.ts +1 -1
- package/data/cities.ts +1 -1
- package/data/countries-110m.ts +1 -1
- package/data/countries-dots-3.ts +1 -1
- package/data/countries-dots-4.ts +1 -1
- package/dist/lib/browser/chunk-GMWLKTLN.mjs +9 -0
- package/dist/lib/browser/{countries-110m-WI4PCLDF.mjs → countries-110m-ZM3ZIEFS.mjs} +2 -2
- package/dist/lib/browser/countries-110m-ZM3ZIEFS.mjs.map +7 -0
- package/dist/lib/browser/data.mjs +1 -1
- package/dist/lib/browser/index.mjs +404 -458
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/{chunk-PIIEDZEU.mjs → chunk-JODBF4CC.mjs} +3 -3
- package/dist/lib/node-esm/{countries-110m-DQ4XRC4B.mjs → countries-110m-3SFASWVD.mjs} +2 -2
- package/dist/lib/node-esm/countries-110m-3SFASWVD.mjs.map +7 -0
- package/dist/lib/node-esm/data.mjs +1 -1
- package/dist/lib/node-esm/index.mjs +404 -458
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Globe/Globe.d.ts +1 -1
- package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
- package/dist/types/src/components/Globe/Globe.stories.d.ts +25 -9
- package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
- package/dist/types/src/components/Map/Map.d.ts +28 -18
- package/dist/types/src/components/Map/Map.d.ts.map +1 -1
- package/dist/types/src/components/Map/Map.stories.d.ts +14 -8
- package/dist/types/src/components/Map/Map.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Controls.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/context.d.ts +7 -7
- package/dist/types/src/hooks/context.d.ts.map +1 -1
- package/dist/types/src/hooks/useGlobeZoomHandler.d.ts +1 -1
- package/dist/types/src/hooks/useGlobeZoomHandler.d.ts.map +1 -1
- package/dist/types/src/hooks/useMapZoomHandler.d.ts +1 -1
- package/dist/types/src/hooks/useMapZoomHandler.d.ts.map +1 -1
- package/dist/types/src/hooks/useSpinner.d.ts +1 -1
- package/dist/types/src/hooks/useSpinner.d.ts.map +1 -1
- package/dist/types/src/hooks/useTour.d.ts +4 -3
- package/dist/types/src/hooks/useTour.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +12 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +2 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/util/path.d.ts +5 -8
- package/dist/types/src/util/path.d.ts.map +1 -1
- package/dist/types/src/util/render.d.ts +4 -4
- package/dist/types/src/util/render.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -23
- package/src/components/Globe/Globe.stories.tsx +85 -37
- package/src/components/Globe/Globe.tsx +80 -63
- package/src/components/Map/Map.stories.tsx +25 -14
- package/src/components/Map/Map.tsx +183 -96
- package/src/components/Toolbar/Controls.tsx +14 -20
- package/src/components/index.ts +0 -2
- package/src/hooks/context.tsx +22 -16
- package/src/hooks/useGlobeZoomHandler.ts +9 -3
- package/src/hooks/useMapZoomHandler.ts +1 -1
- package/src/hooks/useSpinner.ts +2 -1
- package/src/hooks/useTour.ts +10 -8
- package/src/index.ts +2 -1
- package/src/translations.ts +20 -0
- package/src/types.ts +3 -1
- package/src/util/inertia.ts +1 -1
- package/src/util/path.ts +5 -6
- package/src/util/render.ts +5 -3
- package/dist/lib/browser/chunk-ENCWOTYX.mjs +0 -9
- package/dist/lib/browser/countries-110m-WI4PCLDF.mjs.map +0 -7
- package/dist/lib/node/chunk-LAICG6L2.cjs +0 -40
- package/dist/lib/node/chunk-LAICG6L2.cjs.map +0 -7
- package/dist/lib/node/countries-110m-KQ5WAB2O.cjs +0 -37877
- package/dist/lib/node/countries-110m-KQ5WAB2O.cjs.map +0 -7
- package/dist/lib/node/data.cjs +0 -28
- package/dist/lib/node/data.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -1187
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node-esm/countries-110m-DQ4XRC4B.mjs.map +0 -7
- package/dist/types/src/components/types.d.ts +0 -15
- package/dist/types/src/components/types.d.ts.map +0 -1
- package/src/components/types.ts +0 -19
- /package/dist/lib/browser/{chunk-ENCWOTYX.mjs.map → chunk-GMWLKTLN.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-PIIEDZEU.mjs.map → chunk-JODBF4CC.mjs.map} +0 -0
|
@@ -1,34 +1,44 @@
|
|
|
1
1
|
import 'leaflet/dist/leaflet.css';
|
|
2
|
-
import
|
|
2
|
+
import { type ControlPosition, type LatLngLiteral } from 'leaflet';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import type
|
|
4
|
+
import { type MapContainerProps } from 'react-leaflet';
|
|
5
5
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
6
|
+
import { type GeoMarker } from '../../types';
|
|
6
7
|
import { type ControlProps } from '../Toolbar';
|
|
7
|
-
import { type MapCanvasProps } from '../types';
|
|
8
|
-
type MapRootProps = ThemedClassName<MapContainerProps>;
|
|
9
8
|
type MapController = {
|
|
10
|
-
setCenter: (center:
|
|
9
|
+
setCenter: (center: LatLngLiteral, zoom?: number) => void;
|
|
11
10
|
setZoom: (cb: (zoom: number) => number) => void;
|
|
12
11
|
};
|
|
12
|
+
type MapContextValue = {
|
|
13
|
+
attention?: boolean;
|
|
14
|
+
onChange?: (ev: {
|
|
15
|
+
center: LatLngLiteral;
|
|
16
|
+
zoom: number;
|
|
17
|
+
}) => void;
|
|
18
|
+
};
|
|
19
|
+
type MapRootProps = ThemedClassName<MapContainerProps & Pick<MapContextValue, 'onChange'>>;
|
|
20
|
+
type MapTilesProps = {};
|
|
21
|
+
type MapMarkersProps = {
|
|
22
|
+
markers?: GeoMarker[];
|
|
23
|
+
selected?: string[];
|
|
24
|
+
};
|
|
13
25
|
type MapControlProps = {
|
|
14
26
|
position?: ControlPosition;
|
|
15
27
|
} & Pick<ControlProps, 'onAction'>;
|
|
16
28
|
export declare const Map: {
|
|
17
|
-
Root:
|
|
18
|
-
|
|
19
|
-
markers?: import("../..").MapMarker[];
|
|
20
|
-
selected?: string[];
|
|
21
|
-
zoom?: number;
|
|
22
|
-
center?: L.LatLngLiteral;
|
|
23
|
-
onChange?: (ev: {
|
|
24
|
-
center: L.LatLngLiteral;
|
|
25
|
-
zoom: number;
|
|
26
|
-
}) => void;
|
|
27
|
-
}, "className"> & {
|
|
28
|
-
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
29
|
+
Root: React.ForwardRefExoticComponent<Omit<MapContainerProps & Pick<MapContextValue, "onChange">, "className"> & {
|
|
30
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
29
31
|
} & React.RefAttributes<MapController>>;
|
|
32
|
+
Tiles: {
|
|
33
|
+
(_props: MapTilesProps): React.JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
Markers: {
|
|
37
|
+
({ selected, markers }: MapMarkersProps): React.JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
30
40
|
Zoom: ({ onAction, position, ...props }: MapControlProps) => React.JSX.Element;
|
|
31
41
|
Action: ({ onAction, position, ...props }: MapControlProps) => React.JSX.Element;
|
|
32
42
|
};
|
|
33
|
-
export { type
|
|
43
|
+
export { type MapController, type MapRootProps, type MapTilesProps, type MapMarkersProps, type MapControlProps };
|
|
34
44
|
//# sourceMappingURL=Map.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Map.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.tsx"],"names":[],"mappings":"AAIA,OAAO,0BAA0B,CAAC;AAGlC,OAAU,EAAW,KAAK,eAAe,EAAqB,KAAK,aAAa,EAAgB,MAAM,SAAS,CAAC;AAChH,OAAO,KAA+F,MAAM,OAAO,CAAC;AAEpH,OAAO,EAAgB,KAAK,iBAAiB,EAAkD,MAAM,eAAe,CAAC;AAErH,OAAO,EAAiB,KAAK,eAAe,EAAW,MAAM,gBAAgB,CAAC;AAG9E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAkB,KAAK,YAAY,EAAkC,MAAM,YAAY,CAAC;AAe/F,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,KAAK,IAAI,CAAC;CACjD,CAAC;AAMF,KAAK,eAAe,GAAG;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAClE,CAAC;AAQF,KAAK,YAAY,GAAG,eAAe,CAAC,iBAAiB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC;AAuE3F,KAAK,aAAa,GAAG,EAAE,CAAC;AAgExB,KAAK,eAAe,GAAG;IACrB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAqFF,KAAK,eAAe,GAAG;IAAE,QAAQ,CAAC,EAAE,eAAe,CAAA;CAAE,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AAkBvF,eAAO,MAAM,GAAG;;;;;iBAxKU,aAAa;;;;gCAmEI,eAAe;;;6CAqFQ,eAAe;+CAMZ,eAAe;CAgBnF,CAAC;AAEF,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,CAAC"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import '@
|
|
2
|
-
import { type StoryObj, type Meta } from '@storybook/react';
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import { type
|
|
5
|
-
declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { type GeoMarker } from '../../types';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: any;
|
|
7
|
+
render: ({ markers }: {
|
|
8
|
+
markers?: GeoMarker[];
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
decorators: import("@storybook/react").Decorator[];
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
9
15
|
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
11
17
|
export declare const Default: Story;
|
|
12
18
|
export declare const WithMarkers: Story;
|
|
13
19
|
//# sourceMappingURL=Map.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Map.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAkB7C,QAAA,MAAM,IAAI;;eAEe,GAAG;0BAhBY;QAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAA;KAAE;;;;;CAsB5B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KA2BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Controls.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAc,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Controls.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAc,KAAK,eAAe,EAA2B,MAAM,gBAAgB,CAAC;AAI3F,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC5C,CAAC,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAK5D,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,0BAA0B,YAAY,sBAmBlE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,0BAA0B,YAAY,sBAmBpE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type Dispatch, type PropsWithChildren, type SetStateAction } from 'react';
|
|
2
|
-
import { type
|
|
2
|
+
import { type LatLngLiteral } from '../types';
|
|
3
3
|
export type Size = {
|
|
4
4
|
width: number;
|
|
5
5
|
height: number;
|
|
@@ -11,16 +11,16 @@ export type Point = {
|
|
|
11
11
|
export type Vector = [number, number, number];
|
|
12
12
|
export type GlobeContextType = {
|
|
13
13
|
size: Size;
|
|
14
|
-
center
|
|
15
|
-
|
|
14
|
+
center?: LatLngLiteral;
|
|
15
|
+
zoom: number;
|
|
16
16
|
translation: Point;
|
|
17
17
|
rotation: Vector;
|
|
18
|
-
setCenter: Dispatch<SetStateAction<
|
|
19
|
-
|
|
18
|
+
setCenter: Dispatch<SetStateAction<LatLngLiteral>>;
|
|
19
|
+
setZoom: Dispatch<SetStateAction<number>>;
|
|
20
20
|
setTranslation: Dispatch<SetStateAction<Point>>;
|
|
21
21
|
setRotation: Dispatch<SetStateAction<Vector>>;
|
|
22
22
|
};
|
|
23
|
-
export type GlobeContextProviderProps = PropsWithChildren<Partial<Pick<GlobeContextType, 'size' | 'center' | '
|
|
24
|
-
export declare const GlobeContextProvider: ({ children, size, center:
|
|
23
|
+
export type GlobeContextProviderProps = PropsWithChildren<Partial<Pick<GlobeContextType, 'size' | 'center' | 'zoom' | 'translation' | 'rotation'>>>;
|
|
24
|
+
export declare const GlobeContextProvider: ({ children, size, center: centerProp, zoom: zoomProp, translation: translationProp, rotation: rotationProp, }: GlobeContextProviderProps) => React.JSX.Element;
|
|
25
25
|
export declare const useGlobeContext: () => GlobeContextType;
|
|
26
26
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/hooks/context.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/hooks/context.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,QAAQ,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAA6B,MAAM,OAAO,CAAC;AAKrH,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,MAAM,MAAM,IAAI,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AACrD,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC7C,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,KAAK,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC;IACnD,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1C,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;CAC/C,CAAC;AAUF,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CACvD,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,aAAa,GAAG,UAAU,CAAC,CAAC,CACzF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,+GAOlC,yBAAyB,sBAa3B,CAAC;AAEF,eAAO,MAAM,eAAe,wBAE3B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ControlProps, type GlobeController } from '../components';
|
|
2
2
|
export declare const useGlobeZoomHandler: (controller: GlobeController | null | undefined) => ControlProps["onAction"];
|
|
3
3
|
//# sourceMappingURL=useGlobeZoomHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGlobeZoomHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGlobeZoomHandler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"useGlobeZoomHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGlobeZoomHandler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAIxE,eAAO,MAAM,mBAAmB,GAAI,YAAY,eAAe,GAAG,IAAI,GAAG,SAAS,KAAG,YAAY,CAAC,UAAU,CAwB3G,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ControlProps, type MapController } from '../components';
|
|
2
2
|
export declare const useMapZoomHandler: (controller: MapController | null | undefined) => ControlProps["onAction"];
|
|
3
3
|
//# sourceMappingURL=useMapZoomHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMapZoomHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMapZoomHandler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"useMapZoomHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMapZoomHandler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtE,eAAO,MAAM,iBAAiB,GAAI,YAAY,aAAa,GAAG,IAAI,GAAG,SAAS,KAAG,YAAY,CAAC,UAAU,CAoBvG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSpinner.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSpinner.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"useSpinner.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSpinner.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,aAAa,eAAe,GAAG,IAAI,EAAE,UAAS,cAAmB,mBAiD3F,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
2
|
import type { GlobeController } from '../components';
|
|
3
|
-
import { type
|
|
3
|
+
import { type LatLngLiteral } from '../types';
|
|
4
|
+
import { type StyleSet } from '../util';
|
|
4
5
|
export type TourOptions = {
|
|
5
6
|
running?: boolean;
|
|
6
7
|
disabled?: boolean;
|
|
@@ -14,5 +15,5 @@ export type TourOptions = {
|
|
|
14
15
|
* Iterates between points.
|
|
15
16
|
* Inspired by: https://observablehq.com/@mbostock/top-100-cities
|
|
16
17
|
*/
|
|
17
|
-
export declare const useTour: (controller?: GlobeController | null, points?:
|
|
18
|
+
export declare const useTour: (controller?: GlobeController | null, points?: LatLngLiteral[], options?: TourOptions) => [boolean, Dispatch<SetStateAction<boolean>>];
|
|
18
19
|
//# sourceMappingURL=useTour.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTour.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTour.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"useTour.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTour.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAgC,MAAM,OAAO,CAAC;AAGzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,KAAK,QAAQ,EAAqC,MAAM,SAAS,CAAC;AAM3E,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,GAClB,aAAa,eAAe,GAAG,IAAI,EACnC,SAAS,aAAa,EAAE,EACxB,UAAS,WAAgB,KACxB,CAAC,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAyF7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,mBAAmB,SAAS,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const translationKey = "@dxos/react-ui-geo";
|
|
2
|
+
export declare const translations: [{
|
|
3
|
+
readonly 'en-US': {
|
|
4
|
+
readonly "@dxos/react-ui-geo": {
|
|
5
|
+
readonly 'zoom in icon button': "Zoom in";
|
|
6
|
+
readonly 'zoom out icon button': "Zoom out";
|
|
7
|
+
readonly 'start icon button': "Start";
|
|
8
|
+
readonly 'toggle icon button': "Toggle";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}];
|
|
12
|
+
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,uBAAuB,CAAC;AAEnD,eAAO,MAAM,YAAY;;;;;;;;;EAWM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,KAAK,aAAa,EAAE,CAAC;AAE9B,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { type GeoGeometryObjects } from 'd3';
|
|
2
2
|
import { type Point, type Polygon, type Position } from 'geojson';
|
|
3
|
+
import { type LatLngLiteral } from 'leaflet';
|
|
3
4
|
import type { Vector } from '../hooks';
|
|
4
|
-
export type LatLng = {
|
|
5
|
-
lat: number;
|
|
6
|
-
lng: number;
|
|
7
|
-
};
|
|
8
5
|
export declare const positionToRotation: ([lng, lat]: [number, number], tilt?: number) => Vector;
|
|
9
|
-
export declare const geoToPosition: ({ lat, lng }:
|
|
10
|
-
export declare const geoPoint: (point:
|
|
11
|
-
export declare const geoCircle: ({ lat, lng }:
|
|
12
|
-
export declare const geoLine: (p1:
|
|
6
|
+
export declare const geoToPosition: ({ lat, lng }: LatLngLiteral) => [number, number];
|
|
7
|
+
export declare const geoPoint: (point: LatLngLiteral) => Point;
|
|
8
|
+
export declare const geoCircle: ({ lat, lng }: LatLngLiteral, radius: number) => Polygon;
|
|
9
|
+
export declare const geoLine: (p1: LatLngLiteral, p2: LatLngLiteral) => GeoGeometryObjects;
|
|
13
10
|
export declare const closestPoint: (points: Position[], target: Position) => Position | null;
|
|
14
11
|
export declare const getDistance: (point1: Position, point2: Position) => number;
|
|
15
12
|
//# sourceMappingURL=path.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../../src/util/path.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,IAAI,CAAC;AACvE,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../../src/util/path.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,IAAI,CAAC;AACvE,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,kBAAkB,GAAI,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,aAAQ,KAAG,MAA+B,CAAC;AAE5G,eAAO,MAAM,aAAa,GAAI,cAAc,aAAa,KAAG,CAAC,MAAM,EAAE,MAAM,CAAe,CAAC;AAE3F,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,KAAG,KAA+D,CAAC;AAGhH,eAAO,MAAM,SAAS,GAAI,cAAc,aAAa,EAAE,QAAQ,MAAM,KAAG,OACrB,CAAC;AAEpD,eAAO,MAAM,OAAO,GAAI,IAAI,aAAa,EAAE,IAAI,aAAa,KAAG,kBAM7D,CAAC;AAEH,eAAO,MAAM,YAAY,GAAI,QAAQ,QAAQ,EAAE,EAAE,QAAQ,QAAQ,KAAG,QAAQ,GAAG,IAiB9E,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,QAAQ,QAAQ,EAAE,QAAQ,QAAQ,KAAG,MAIhE,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type GeoPath, type GeoPermissibleObjects } from 'd3';
|
|
2
2
|
import { type Topology } from 'topojson-specification';
|
|
3
|
-
import { type
|
|
3
|
+
import { type LatLngLiteral } from '../types';
|
|
4
4
|
export type Styles = Record<string, any>;
|
|
5
5
|
export type Style = 'background' | 'water' | 'graticule' | 'land' | 'border' | 'dots' | 'point' | 'line' | 'cursor' | 'arc';
|
|
6
6
|
export type StyleSet = Partial<Record<Style, Styles>>;
|
|
7
7
|
export type Features = {
|
|
8
|
-
points?:
|
|
8
|
+
points?: LatLngLiteral[];
|
|
9
9
|
lines?: {
|
|
10
|
-
source:
|
|
11
|
-
target:
|
|
10
|
+
source: LatLngLiteral;
|
|
11
|
+
target: LatLngLiteral;
|
|
12
12
|
}[];
|
|
13
13
|
};
|
|
14
14
|
export type Layer = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../src/util/render.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,qBAAqB,EAAgB,MAAM,IAAI,CAAC;AAE5E,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../src/util/render.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,qBAAqB,EAAgB,MAAM,IAAI,CAAC;AAE5E,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9C,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEzC,MAAM,MAAM,KAAK,GACb,YAAY,GACZ,OAAO,GACP,WAAW,GACX,MAAM,GACN,QAAQ,GACR,MAAM,GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;AAEV,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAEtD,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,EAAE,CAAC;CAC5D,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,UAAU,QAAQ,EAAE,UAAU,QAAQ,EAAE,QAAQ,QAAQ,KAAG,KAAK,EA2E5F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,WAAW,OAAO,EAAE,QAAQ,KAAK,EAAO,EAAE,OAAO,MAAM,EAAE,QAAQ,QAAQ,6BA0CrG,CAAC"}
|