@dxos/react-ui-geo 0.8.4-main.67995b8 → 0.8.4-main.a4bbb77

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.
Files changed (53) hide show
  1. package/dist/lib/browser/index.mjs +173 -145
  2. package/dist/lib/browser/index.mjs.map +3 -3
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +173 -145
  5. package/dist/lib/node-esm/index.mjs.map +3 -3
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/types/src/components/Globe/Globe.d.ts +1 -1
  8. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  9. package/dist/types/src/components/Globe/Globe.stories.d.ts +25 -9
  10. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  11. package/dist/types/src/components/Map/Map.d.ts +25 -12
  12. package/dist/types/src/components/Map/Map.d.ts.map +1 -1
  13. package/dist/types/src/components/Map/Map.stories.d.ts +14 -8
  14. package/dist/types/src/components/Map/Map.stories.d.ts.map +1 -1
  15. package/dist/types/src/components/Toolbar/Controls.d.ts.map +1 -1
  16. package/dist/types/src/components/index.d.ts +0 -1
  17. package/dist/types/src/components/index.d.ts.map +1 -1
  18. package/dist/types/src/hooks/context.d.ts +7 -7
  19. package/dist/types/src/hooks/context.d.ts.map +1 -1
  20. package/dist/types/src/hooks/useGlobeZoomHandler.d.ts +1 -1
  21. package/dist/types/src/hooks/useGlobeZoomHandler.d.ts.map +1 -1
  22. package/dist/types/src/hooks/useMapZoomHandler.d.ts +1 -1
  23. package/dist/types/src/hooks/useMapZoomHandler.d.ts.map +1 -1
  24. package/dist/types/src/hooks/useSpinner.d.ts +1 -1
  25. package/dist/types/src/hooks/useSpinner.d.ts.map +1 -1
  26. package/dist/types/src/hooks/useTour.d.ts +4 -3
  27. package/dist/types/src/hooks/useTour.d.ts.map +1 -1
  28. package/dist/types/src/types.d.ts +2 -1
  29. package/dist/types/src/types.d.ts.map +1 -1
  30. package/dist/types/src/util/path.d.ts +5 -8
  31. package/dist/types/src/util/path.d.ts.map +1 -1
  32. package/dist/types/src/util/render.d.ts +4 -4
  33. package/dist/types/src/util/render.d.ts.map +1 -1
  34. package/dist/types/tsconfig.tsbuildinfo +1 -1
  35. package/package.json +24 -23
  36. package/src/components/Globe/Globe.stories.tsx +81 -33
  37. package/src/components/Globe/Globe.tsx +50 -30
  38. package/src/components/Map/Map.stories.tsx +25 -14
  39. package/src/components/Map/Map.tsx +206 -91
  40. package/src/components/Toolbar/Controls.tsx +2 -6
  41. package/src/components/index.ts +0 -2
  42. package/src/hooks/context.tsx +10 -10
  43. package/src/hooks/useGlobeZoomHandler.ts +3 -3
  44. package/src/hooks/useMapZoomHandler.ts +1 -1
  45. package/src/hooks/useSpinner.ts +2 -1
  46. package/src/hooks/useTour.ts +9 -8
  47. package/src/types.ts +3 -1
  48. package/src/util/inertia.ts +1 -1
  49. package/src/util/path.ts +5 -6
  50. package/src/util/render.ts +5 -3
  51. package/dist/types/src/components/types.d.ts +0 -15
  52. package/dist/types/src/components/types.d.ts.map +0 -1
  53. package/src/components/types.ts +0 -19
@@ -1,34 +1,47 @@
1
1
  import 'leaflet/dist/leaflet.css';
2
- import L, { type ControlPosition, type LatLngExpression } from 'leaflet';
2
+ import { type ControlPosition, type LatLngLiteral } from 'leaflet';
3
3
  import React from 'react';
4
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: LatLngExpression, zoom?: number) => void;
9
+ setCenter: (center: LatLngLiteral, zoom?: number) => void;
11
10
  setZoom: (cb: (zoom: number) => number) => void;
12
11
  };
12
+ type MapRootProps = ThemedClassName<MapContainerProps & {
13
+ onChange?: (ev: {
14
+ center: LatLngLiteral;
15
+ zoom: number;
16
+ }) => void;
17
+ }>;
18
+ type MapTilesProps = {};
19
+ type MapMarkersProps = {
20
+ markers?: GeoMarker[];
21
+ selected?: string[];
22
+ };
13
23
  type MapControlProps = {
14
24
  position?: ControlPosition;
15
25
  } & Pick<ControlProps, 'onAction'>;
16
26
  export declare const Map: {
17
- Root: ({ classNames, center, zoom, ...props }: MapRootProps) => React.JSX.Element;
18
- Canvas: React.ForwardRefExoticComponent<Omit<{
19
- markers?: import("../..").MapMarker[];
20
- selected?: string[];
21
- zoom?: number;
22
- center?: L.LatLngLiteral;
27
+ Root: React.ForwardRefExoticComponent<Omit<MapContainerProps & {
23
28
  onChange?: (ev: {
24
- center: L.LatLngLiteral;
29
+ center: LatLngLiteral;
25
30
  zoom: number;
26
31
  }) => void;
27
32
  }, "className"> & {
28
33
  classNames?: import("@dxos/react-ui-types").ClassNameValue;
29
34
  } & React.RefAttributes<MapController>>;
35
+ Tiles: {
36
+ (_props: MapTilesProps): React.JSX.Element;
37
+ displayName: string;
38
+ };
39
+ Markers: {
40
+ ({ selected, markers }: MapMarkersProps): React.JSX.Element;
41
+ displayName: string;
42
+ };
30
43
  Zoom: ({ onAction, position, ...props }: MapControlProps) => React.JSX.Element;
31
44
  Action: ({ onAction, position, ...props }: MapControlProps) => React.JSX.Element;
32
45
  };
33
- export { type MapCanvasProps, type MapController };
46
+ export { type MapController, type MapRootProps, type MapTilesProps, type MapMarkersProps, type MapControlProps };
34
47
  //# sourceMappingURL=Map.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Map.d.ts","sourceRoot":"","sources":["../../../../../src/components/Map/Map.tsx"],"names":[],"mappings":"AAKA,OAAO,0BAA0B,CAAC;AAElC,OAAO,CAAC,EAAE,EAA4C,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACnH,OAAO,KAA6E,MAAM,OAAO,CAAC;AAElG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAA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AM,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;AAgBF,KAAK,YAAY,GAAG,eAAe,CACjC,iBAAiB,GAAG;IAClB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAClE,CACF,CAAC;AAwGF,KAAK,aAAa,GAAG,EAAE,CAAC;AAsDxB,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;;mBA1QD,CAAC,EAAE,EAAE;YAAE,MAAM,EAAE,aAAa,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,KAAK,IAAI;;;;;iBA4G1C,aAAa;;;;gCAyDI,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 '@dxos-theme';
2
- import { type StoryObj, type Meta } from '@storybook/react-vite';
1
+ import { type StoryObj } from '@storybook/react-vite';
3
2
  import React from 'react';
4
- import { type MapMarker } from '../../types';
5
- declare const DefaultStory: ({ markers }: {
6
- markers?: MapMarker[];
7
- }) => React.JSX.Element;
8
- declare const meta: Meta<typeof DefaultStory>;
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 DefaultStory>;
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,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAMxC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,QAAA,MAAM,YAAY,GAAI,aAAkB;IAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAA;CAAE,sBAWhE,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAInC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KAoBzB,CAAC"}
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,EAAW,MAAM,gBAAgB,CAAC;AAE3E,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,sBAuBlE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,0BAA0B,YAAY,sBAuBpE,CAAC"}
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,EAAW,MAAM,gBAAgB,CAAC;AAE3E,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,sBAqBlE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,0BAA0B,YAAY,sBAqBpE,CAAC"}
@@ -1,4 +1,3 @@
1
- export type * from './types';
2
1
  export * from './Globe';
3
2
  export * from './Map';
4
3
  export * from './Toolbar';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,mBAAmB,SAAS,CAAC;AAE7B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,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 LatLng } from '../util';
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: LatLng;
15
- scale: number;
14
+ center?: LatLngLiteral;
15
+ zoom: number;
16
16
  translation: Point;
17
17
  rotation: Vector;
18
- setCenter: Dispatch<SetStateAction<LatLng>>;
19
- setScale: Dispatch<SetStateAction<number>>;
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' | 'scale' | 'translation' | 'rotation'>>>;
24
- export declare const GlobeContextProvider: ({ children, size, center: _center, scale: _scale, translation: _translation, rotation: _rotation, }: GlobeContextProviderProps) => React.JSX.Element;
23
+ export type GlobeContextProviderProps = PropsWithChildren<Partial<Pick<GlobeContextType, 'size' | 'center' | 'zoom' | 'translation' | 'rotation'>>>;
24
+ export declare const GlobeContextProvider: ({ children, size, center: _center, zoom: _zoom, translation: _translation, rotation: _rotation, }: 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,EAAiB,KAAK,QAAQ,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAc,MAAM,OAAO,CAAC;AAKrH,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAGtC,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,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,KAAK,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,QAAQ,CAAC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,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;AAIF,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,mGAOlC,yBAAyB,sBAa3B,CAAC;AAEF,eAAO,MAAM,eAAe,wBAE3B,CAAC"}
@@ -1,3 +1,3 @@
1
- import { type GlobeController, type ControlProps } from '../components';
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,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAExE,eAAO,MAAM,mBAAmB,GAAI,YAAY,eAAe,GAAG,IAAI,GAAG,SAAS,KAAG,YAAY,CAAC,UAAU,CAoB3G,CAAC"}
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;AAExE,eAAO,MAAM,mBAAmB,GAAI,YAAY,eAAe,GAAG,IAAI,GAAG,SAAS,KAAG,YAAY,CAAC,UAAU,CAoB3G,CAAC"}
@@ -1,3 +1,3 @@
1
- import { type MapController, type ControlProps } from '../components';
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,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAEtE,eAAO,MAAM,iBAAiB,GAAI,YAAY,aAAa,GAAG,IAAI,GAAG,SAAS,KAAG,YAAY,CAAC,UAAU,CAoBvG,CAAC"}
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,5 +1,5 @@
1
- import { type Vector } from './context';
2
1
  import { type GlobeController } from '../components';
2
+ import { type Vector } from './context';
3
3
  export type SpinnerOptions = {
4
4
  disabled?: boolean;
5
5
  delta?: Vector;
@@ -1 +1 @@
1
- {"version":3,"file":"useSpinner.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSpinner.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,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
+ {"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 SetStateAction, type Dispatch } from 'react';
1
+ import { type Dispatch, type SetStateAction } from 'react';
2
2
  import type { GlobeController } from '../components';
3
- import { type LatLng, type StyleSet } from '../util';
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?: LatLng[], options?: TourOptions) => [boolean, Dispatch<SetStateAction<boolean>>];
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,cAAc,EAAE,KAAK,QA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,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,CAwF7C,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { type LatLngLiteral } from 'leaflet';
2
- export type MapMarker = {
2
+ export { type LatLngLiteral };
3
+ export type GeoMarker = {
3
4
  id: string;
4
5
  title?: string;
5
6
  location: LatLngLiteral;
@@ -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 }: LatLng) => [number, number];
10
- export declare const geoPoint: (point: LatLng) => Point;
11
- export declare const geoCircle: ({ lat, lng }: LatLng, radius: number) => Polygon;
12
- export declare const geoLine: (p1: LatLng, p2: LatLng) => GeoGeometryObjects;
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;AAElE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,MAAM,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD,eAAO,MAAM,kBAAkB,GAAI,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,aAAQ,KAAG,MAA+B,CAAC;AAE5G,eAAO,MAAM,aAAa,GAAI,cAAc,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,CAAe,CAAC;AAEpF,eAAO,MAAM,QAAQ,GAAI,OAAO,MAAM,KAAG,KAA+D,CAAC;AAGzG,eAAO,MAAM,SAAS,GAAI,cAAc,MAAM,EAAE,QAAQ,MAAM,KAAG,OACd,CAAC;AAEpD,eAAO,MAAM,OAAO,GAAI,IAAI,MAAM,EAAE,IAAI,MAAM,KAAG,kBAM/C,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
+ {"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 LatLng } from './path';
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?: LatLng[];
8
+ points?: LatLngLiteral[];
9
9
  lines?: {
10
- source: LatLng;
11
- target: LatLng;
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,MAAM,EAAqB,MAAM,QAAQ,CAAC;AAExD,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,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;A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