@dxos/react-ui-geo 0.8.3 → 0.8.4-main.28f8d3d

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 (83) hide show
  1. package/data/airports.ts +1 -1
  2. package/data/cities.ts +1 -1
  3. package/data/countries-110m.ts +1 -1
  4. package/data/countries-dots-3.ts +1 -1
  5. package/data/countries-dots-4.ts +1 -1
  6. package/dist/lib/browser/chunk-GMWLKTLN.mjs +9 -0
  7. package/dist/lib/browser/{countries-110m-WI4PCLDF.mjs → countries-110m-ZM3ZIEFS.mjs} +2 -2
  8. package/dist/lib/browser/countries-110m-ZM3ZIEFS.mjs.map +7 -0
  9. package/dist/lib/browser/data.mjs +1 -1
  10. package/dist/lib/browser/index.mjs +187 -159
  11. package/dist/lib/browser/index.mjs.map +3 -3
  12. package/dist/lib/browser/meta.json +1 -1
  13. package/dist/lib/node-esm/{chunk-PIIEDZEU.mjs → chunk-JODBF4CC.mjs} +3 -3
  14. package/dist/lib/node-esm/{countries-110m-DQ4XRC4B.mjs → countries-110m-3SFASWVD.mjs} +2 -2
  15. package/dist/lib/node-esm/countries-110m-3SFASWVD.mjs.map +7 -0
  16. package/dist/lib/node-esm/data.mjs +1 -1
  17. package/dist/lib/node-esm/index.mjs +187 -159
  18. package/dist/lib/node-esm/index.mjs.map +3 -3
  19. package/dist/lib/node-esm/meta.json +1 -1
  20. package/dist/types/src/components/Globe/Globe.d.ts +1 -1
  21. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  22. package/dist/types/src/components/Globe/Globe.stories.d.ts +1 -1
  23. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  24. package/dist/types/src/components/Map/Map.d.ts +25 -12
  25. package/dist/types/src/components/Map/Map.d.ts.map +1 -1
  26. package/dist/types/src/components/Map/Map.stories.d.ts +3 -3
  27. package/dist/types/src/components/Map/Map.stories.d.ts.map +1 -1
  28. package/dist/types/src/components/Toolbar/Controls.d.ts.map +1 -1
  29. package/dist/types/src/components/index.d.ts +0 -1
  30. package/dist/types/src/components/index.d.ts.map +1 -1
  31. package/dist/types/src/hooks/context.d.ts +7 -7
  32. package/dist/types/src/hooks/context.d.ts.map +1 -1
  33. package/dist/types/src/hooks/useGlobeZoomHandler.d.ts +1 -1
  34. package/dist/types/src/hooks/useGlobeZoomHandler.d.ts.map +1 -1
  35. package/dist/types/src/hooks/useMapZoomHandler.d.ts +1 -1
  36. package/dist/types/src/hooks/useMapZoomHandler.d.ts.map +1 -1
  37. package/dist/types/src/hooks/useSpinner.d.ts +1 -1
  38. package/dist/types/src/hooks/useSpinner.d.ts.map +1 -1
  39. package/dist/types/src/hooks/useTour.d.ts +4 -3
  40. package/dist/types/src/hooks/useTour.d.ts.map +1 -1
  41. package/dist/types/src/index.d.ts +1 -1
  42. package/dist/types/src/index.d.ts.map +1 -1
  43. package/dist/types/src/types.d.ts +2 -1
  44. package/dist/types/src/types.d.ts.map +1 -1
  45. package/dist/types/src/util/path.d.ts +5 -8
  46. package/dist/types/src/util/path.d.ts.map +1 -1
  47. package/dist/types/src/util/render.d.ts +4 -4
  48. package/dist/types/src/util/render.d.ts.map +1 -1
  49. package/dist/types/tsconfig.tsbuildinfo +1 -1
  50. package/package.json +14 -11
  51. package/src/components/Globe/Globe.stories.tsx +29 -24
  52. package/src/components/Globe/Globe.tsx +74 -58
  53. package/src/components/Map/Map.stories.tsx +16 -7
  54. package/src/components/Map/Map.tsx +206 -91
  55. package/src/components/Toolbar/Controls.tsx +2 -6
  56. package/src/components/index.ts +0 -2
  57. package/src/hooks/context.tsx +10 -10
  58. package/src/hooks/useGlobeZoomHandler.ts +3 -3
  59. package/src/hooks/useMapZoomHandler.ts +1 -1
  60. package/src/hooks/useSpinner.ts +2 -1
  61. package/src/hooks/useTour.ts +9 -8
  62. package/src/index.ts +1 -1
  63. package/src/types.ts +3 -1
  64. package/src/util/inertia.ts +1 -1
  65. package/src/util/path.ts +5 -6
  66. package/src/util/render.ts +5 -3
  67. package/dist/lib/browser/chunk-ENCWOTYX.mjs +0 -9
  68. package/dist/lib/browser/countries-110m-WI4PCLDF.mjs.map +0 -7
  69. package/dist/lib/node/chunk-LAICG6L2.cjs +0 -40
  70. package/dist/lib/node/chunk-LAICG6L2.cjs.map +0 -7
  71. package/dist/lib/node/countries-110m-KQ5WAB2O.cjs +0 -37877
  72. package/dist/lib/node/countries-110m-KQ5WAB2O.cjs.map +0 -7
  73. package/dist/lib/node/data.cjs +0 -28
  74. package/dist/lib/node/data.cjs.map +0 -7
  75. package/dist/lib/node/index.cjs +0 -1187
  76. package/dist/lib/node/index.cjs.map +0 -7
  77. package/dist/lib/node/meta.json +0 -1
  78. package/dist/lib/node-esm/countries-110m-DQ4XRC4B.mjs.map +0 -7
  79. package/dist/types/src/components/types.d.ts +0 -15
  80. package/dist/types/src/components/types.d.ts.map +0 -1
  81. package/src/components/types.ts +0 -19
  82. /package/dist/lib/browser/{chunk-ENCWOTYX.mjs.map → chunk-GMWLKTLN.mjs.map} +0 -0
  83. /package/dist/lib/node-esm/{chunk-PIIEDZEU.mjs.map → chunk-JODBF4CC.mjs.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import '@dxos-theme';
2
- import { type StoryObj, type Meta } from '@storybook/react';
2
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
3
3
  import React from 'react';
4
- import { type MapMarker } from '../../types';
4
+ import { type GeoMarker } from '../../types';
5
5
  declare const DefaultStory: ({ markers }: {
6
- markers?: MapMarker[];
6
+ markers?: GeoMarker[];
7
7
  }) => React.JSX.Element;
8
8
  declare const meta: Meta<typeof DefaultStory>;
9
9
  export default meta;
@@ -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,kBAAkB,CAAC;AAC5D,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,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,QAAA,MAAM,YAAY,GAAI,aAAkB;IAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAA;CAAE,sBAYhE,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,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 * 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,cAAc,SAAS,CAAC;AAExB,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: () => G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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,QAAQ,EAAgC,MAAM,OAAO,CAAC;AAGzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAiB,KAAK,MAAM,EAAsB,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAMxF,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,MAAM,EAAE,EACjB,UAAS,WAAgB,KACxB,CAAC,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAwF7C,CAAC"}
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,CAwF7C,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export * from './components';
2
2
  export * from './data';
3
3
  export * from './hooks';
4
- export * from './types';
4
+ export type * from './types';
5
5
  export * from './util';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -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;AACxB,cAAc,QAAQ,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,mBAAmB,SAAS,CAAC;AAC7B,cAAc,QAAQ,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,E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E,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,MAA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