@dxos/solid-ui-geo 0.0.0 → 0.8.4-main.03d5cd7b56

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 (88) hide show
  1. package/dist/lib/browser/chunk-RMZP4JBX.mjs +9 -0
  2. package/dist/lib/browser/chunk-RMZP4JBX.mjs.map +7 -0
  3. package/dist/lib/browser/countries-110m-MXSNZ6PF.mjs +37859 -0
  4. package/dist/lib/browser/countries-110m-MXSNZ6PF.mjs.map +7 -0
  5. package/dist/lib/browser/data.mjs +7 -0
  6. package/dist/lib/browser/data.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +1217 -0
  8. package/dist/lib/browser/index.mjs.map +7 -0
  9. package/dist/lib/browser/meta.json +1 -0
  10. package/dist/lib/browser/translations.mjs +19 -0
  11. package/dist/lib/browser/translations.mjs.map +7 -0
  12. package/dist/lib/node-esm/chunk-ICM52DKE.mjs +11 -0
  13. package/dist/lib/node-esm/chunk-ICM52DKE.mjs.map +7 -0
  14. package/dist/lib/node-esm/countries-110m-HEHEK3AV.mjs +37861 -0
  15. package/dist/lib/node-esm/countries-110m-HEHEK3AV.mjs.map +7 -0
  16. package/dist/lib/node-esm/data.mjs +8 -0
  17. package/dist/lib/node-esm/data.mjs.map +7 -0
  18. package/dist/lib/node-esm/index.mjs +1218 -0
  19. package/dist/lib/node-esm/index.mjs.map +7 -0
  20. package/dist/lib/node-esm/meta.json +1 -0
  21. package/dist/lib/node-esm/translations.mjs +21 -0
  22. package/dist/lib/node-esm/translations.mjs.map +7 -0
  23. package/dist/types/data/airports.d.ts +18 -0
  24. package/dist/types/data/airports.d.ts.map +1 -0
  25. package/dist/types/data/countries-110m.d.ts +36 -0
  26. package/dist/types/data/countries-110m.d.ts.map +1 -0
  27. package/dist/types/data/countries-dots-3.d.ts +9 -0
  28. package/dist/types/data/countries-dots-3.d.ts.map +1 -0
  29. package/dist/types/src/components/Globe/Globe.d.ts +54 -0
  30. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -0
  31. package/dist/types/src/components/Globe/Globe.solid-stories.d.ts +29 -0
  32. package/dist/types/src/components/Globe/Globe.solid-stories.d.ts.map +1 -0
  33. package/dist/types/src/components/Globe/index.d.ts +2 -0
  34. package/dist/types/src/components/Globe/index.d.ts.map +1 -0
  35. package/dist/types/src/components/Map/Map.d.ts +38 -0
  36. package/dist/types/src/components/Map/Map.d.ts.map +1 -0
  37. package/dist/types/src/components/Map/Map.solid-stories.d.ts +17 -0
  38. package/dist/types/src/components/Map/Map.solid-stories.d.ts.map +1 -0
  39. package/dist/types/src/components/Map/index.d.ts +2 -0
  40. package/dist/types/src/components/Map/index.d.ts.map +1 -0
  41. package/dist/types/src/components/Toolbar/Controls.d.ts +11 -0
  42. package/dist/types/src/components/Toolbar/Controls.d.ts.map +1 -0
  43. package/dist/types/src/components/Toolbar/index.d.ts +2 -0
  44. package/dist/types/src/components/Toolbar/index.d.ts.map +1 -0
  45. package/dist/types/src/components/index.d.ts +4 -0
  46. package/dist/types/src/components/index.d.ts.map +1 -0
  47. package/dist/types/src/data.d.ts +3 -0
  48. package/dist/types/src/data.d.ts.map +1 -0
  49. package/dist/types/src/hooks/context.d.ts +33 -0
  50. package/dist/types/src/hooks/context.d.ts.map +1 -0
  51. package/dist/types/src/hooks/index.d.ts +7 -0
  52. package/dist/types/src/hooks/index.d.ts.map +1 -0
  53. package/dist/types/src/hooks/useDrag.d.ts +16 -0
  54. package/dist/types/src/hooks/useDrag.d.ts.map +1 -0
  55. package/dist/types/src/hooks/useGlobeZoomHandler.d.ts +3 -0
  56. package/dist/types/src/hooks/useGlobeZoomHandler.d.ts.map +1 -0
  57. package/dist/types/src/hooks/useMapZoomHandler.d.ts +3 -0
  58. package/dist/types/src/hooks/useMapZoomHandler.d.ts.map +1 -0
  59. package/dist/types/src/hooks/useSpinner.d.ts +14 -0
  60. package/dist/types/src/hooks/useSpinner.d.ts.map +1 -0
  61. package/dist/types/src/hooks/useTour.d.ts +22 -0
  62. package/dist/types/src/hooks/useTour.d.ts.map +1 -0
  63. package/dist/types/src/index.d.ts +6 -0
  64. package/dist/types/src/index.d.ts.map +1 -0
  65. package/dist/types/src/translations.d.ts +12 -0
  66. package/dist/types/src/translations.d.ts.map +1 -0
  67. package/dist/types/src/types.d.ts +8 -0
  68. package/dist/types/src/types.d.ts.map +1 -0
  69. package/dist/types/src/util/debug.d.ts +2 -0
  70. package/dist/types/src/util/debug.d.ts.map +1 -0
  71. package/dist/types/src/util/index.d.ts +5 -0
  72. package/dist/types/src/util/index.d.ts.map +1 -0
  73. package/dist/types/src/util/inertia.d.ts +15 -0
  74. package/dist/types/src/util/inertia.d.ts.map +1 -0
  75. package/dist/types/src/util/path.d.ts +12 -0
  76. package/dist/types/src/util/path.d.ts.map +1 -0
  77. package/dist/types/src/util/render.d.ts +26 -0
  78. package/dist/types/src/util/render.d.ts.map +1 -0
  79. package/dist/types/tsconfig.tsbuildinfo +1 -0
  80. package/package.json +28 -22
  81. package/src/components/Globe/Globe.solid-stories.tsx +2 -3
  82. package/src/components/Globe/Globe.tsx +12 -10
  83. package/src/components/Map/Map.solid-stories.tsx +0 -1
  84. package/src/components/Map/Map.tsx +18 -7
  85. package/src/components/Toolbar/Controls.tsx +4 -4
  86. package/src/hooks/useSpinner.ts +0 -1
  87. package/src/index.ts +0 -1
  88. package/src/util/render.ts +0 -1
@@ -0,0 +1,33 @@
1
+ import { type Accessor, type JSX, type Setter } from 'solid-js';
2
+ import { type LatLngLiteral } from '../types';
3
+ export type Size = {
4
+ width: number;
5
+ height: number;
6
+ };
7
+ export type Point = {
8
+ x: number;
9
+ y: number;
10
+ };
11
+ export type Vector = [number, number, number];
12
+ export type GlobeContextType = {
13
+ size: Accessor<Size>;
14
+ center: Accessor<LatLngLiteral | undefined>;
15
+ zoom: Accessor<number>;
16
+ translation: Accessor<Point | undefined>;
17
+ rotation: Accessor<Vector | undefined>;
18
+ setCenter: Setter<LatLngLiteral | undefined>;
19
+ setZoom: Setter<number>;
20
+ setTranslation: Setter<Point | undefined>;
21
+ setRotation: Setter<Vector | undefined>;
22
+ };
23
+ export type GlobeContextProviderProps = {
24
+ children: JSX.Element;
25
+ size?: Size;
26
+ center?: LatLngLiteral;
27
+ zoom?: number;
28
+ translation?: Point;
29
+ rotation?: Vector;
30
+ };
31
+ export declare const GlobeContextProvider: (props: GlobeContextProviderProps) => JSX.Element;
32
+ export declare const useGlobeContext: () => GlobeContextType;
33
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/hooks/context.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,GAAG,EAAE,KAAK,MAAM,EAAyD,MAAM,UAAU,CAAC;AAIvH,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,QAAQ,CAAC,IAAI,CAAC,CAAC;IACrB,MAAM,EAAE,QAAQ,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;IAC5C,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACvB,WAAW,EAAE,QAAQ,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IACzC,QAAQ,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACvC,SAAS,EAAE,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;IAC7C,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACzC,CAAC;AASF,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAAW,yBAAyB,gBA+BpE,CAAC;AAEF,eAAO,MAAM,eAAe,wBAE3B,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from './context';
2
+ export * from './useDrag';
3
+ export * from './useGlobeZoomHandler';
4
+ export * from './useMapZoomHandler';
5
+ export * from './useSpinner';
6
+ export * from './useTour';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type GlobeController } from '../components';
2
+ export type GlobeDragEvent = {
3
+ type: 'start' | 'move' | 'end';
4
+ controller: GlobeController;
5
+ };
6
+ export type DragOptions = {
7
+ disabled?: boolean;
8
+ duration?: number;
9
+ xAxis?: boolean;
10
+ onUpdate?: (event: GlobeDragEvent) => void;
11
+ };
12
+ /**
13
+ * Allows user to drag globe.
14
+ */
15
+ export declare const useDrag: (controller?: GlobeController | null, options?: DragOptions) => void;
16
+ //# sourceMappingURL=useDrag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDrag.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDrag.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;IAC/B,UAAU,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,gBAAiB,eAAe,GAAG,IAAI,YAAW,WAAW,SA0BhF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type ControlProps, type GlobeController } from '../components';
2
+ export declare const useGlobeZoomHandler: (controller: GlobeController | null | undefined) => ControlProps['onAction'];
3
+ //# sourceMappingURL=useGlobeZoomHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGlobeZoomHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGlobeZoomHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAIxE,eAAO,MAAM,mBAAmB,eAAgB,eAAe,GAAG,IAAI,GAAG,SAAS,KAAG,YAAY,CAAC,UAAU,CAqB3G,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type ControlProps, type MapController } from '../components';
2
+ export declare const useMapZoomHandler: (controller: MapController | null | undefined) => ControlProps['onAction'];
3
+ //# sourceMappingURL=useMapZoomHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMapZoomHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useMapZoomHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtE,eAAO,MAAM,iBAAiB,eAAgB,aAAa,GAAG,IAAI,GAAG,SAAS,KAAG,YAAY,CAAC,UAAU,CAiBvG,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { type GlobeController } from '../components';
2
+ import { type Vector } from './context';
3
+ export type SpinnerOptions = {
4
+ disabled?: boolean;
5
+ delta?: Vector;
6
+ };
7
+ /**
8
+ * Rotates globe.
9
+ */
10
+ export declare const useSpinner: (controller?: GlobeController | null, options?: SpinnerOptions) => {
11
+ start: () => void;
12
+ stop: () => false;
13
+ };
14
+ //# sourceMappingURL=useSpinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSpinner.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSpinner.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,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,gBAAiB,eAAe,GAAG,IAAI,YAAW,cAAc;IA2CnF,KAAK;IAKL,IAAI;CAEP,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { type Accessor, type Setter } from 'solid-js';
2
+ import type { GlobeController } from '../components';
3
+ import { type LatLngLiteral } from '../types';
4
+ import { type StyleSet } from '../util';
5
+ export type TourOptions = {
6
+ running?: boolean;
7
+ disabled?: boolean;
8
+ duration?: number;
9
+ loop?: boolean;
10
+ tilt?: number;
11
+ autoRotate?: boolean;
12
+ styles?: StyleSet;
13
+ };
14
+ /**
15
+ * Iterates between points.
16
+ * Inspired by: https://observablehq.com/@mbostock/top-100-cities
17
+ */
18
+ export declare const useTour: (controller?: GlobeController | null, points?: LatLngLiteral[], options?: TourOptions) => {
19
+ running: Accessor<boolean>;
20
+ setRunning: Setter<boolean>;
21
+ };
22
+ //# sourceMappingURL=useTour.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTour.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTour.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAyC,MAAM,UAAU,CAAC;AAG7F,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,gBACL,eAAe,GAAG,IAAI,WAC1B,aAAa,EAAE,YACf,WAAW,KACnB;IAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;CAyF3D,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './components';
2
+ export * from './data';
3
+ export * from './hooks';
4
+ export type * from './types';
5
+ export * from './util';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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,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: readonly [{
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":"AAIA,eAAO,MAAM,cAAc,uBAAuB,CAAC;AAEnD,eAAO,MAAM,YAAY;;;qBAIjB,qBAAqB,EAAE,SAAS;qBAChC,sBAAsB,EAAE,UAAU;qBAClC,mBAAmB,EAAE,OAAO;qBAC5B,oBAAoB,EAAE,QAAQ;;;EAI5B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type LatLngLiteral } from 'leaflet';
2
+ export { type LatLngLiteral };
3
+ export type GeoMarker = {
4
+ id: string;
5
+ title?: string;
6
+ location: LatLngLiteral;
7
+ };
8
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +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,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"}
@@ -0,0 +1,2 @@
1
+ export declare const timer: <T = void>(cb: () => T) => T;
2
+ //# sourceMappingURL=debug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../../src/util/debug.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,KAAK,GAAI,CAAC,GAAG,IAAI,MAAM,MAAM,CAAC,KAAG,CAU7C,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './debug';
2
+ export * from './inertia';
3
+ export * from './path';
4
+ export * from './render';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const restrictAxis: (axis: boolean[]) => (original: number[], current: number[]) => number[];
2
+ /**
3
+ * Applies a drag handler to the specified target element.
4
+ */
5
+ export declare const geoInertiaDrag: (target: any, render: any, projection: any, options: any) => {
6
+ position: number[];
7
+ velocity: number[];
8
+ timer: import("d3").Timer;
9
+ time: number;
10
+ t: number;
11
+ start: (ev: any) => void;
12
+ move: (ev: any) => void;
13
+ end: (ev: any) => any;
14
+ };
15
+ //# sourceMappingURL=inertia.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inertia.d.ts","sourceRoot":"","sources":["../../../../src/util/inertia.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY,SAChB,OAAO,EAAE,gBACL,MAAM,EAAE,WAAW,MAAM,EAAE,KAAG,MAAM,EACK,CAAC;AAEvD;;GAEG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;CA+B1B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { type GeoGeometryObjects } from 'd3';
2
+ import { type Point, type Polygon, type Position } from 'geojson';
3
+ import { type LatLngLiteral } from 'leaflet';
4
+ import type { Vector } from '../hooks';
5
+ export declare const positionToRotation: ([lng, lat]: [number, number], tilt?: number) => Vector;
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;
10
+ export declare const closestPoint: (points: Position[], target: Position) => Position | null;
11
+ export declare const getDistance: (point1: Position, point2: Position) => number;
12
+ //# sourceMappingURL=path.d.ts.map
@@ -0,0 +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;AAClE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,kBAAkB,eAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,oBAAa,MAA+B,CAAC;AAE5G,eAAO,MAAM,aAAa,iBAAkB,aAAa,KAAG,CAAC,MAAM,EAAE,MAAM,CAAe,CAAC;AAE3F,eAAO,MAAM,QAAQ,UAAW,aAAa,KAAG,KAA+D,CAAC;AAGhH,eAAO,MAAM,SAAS,iBAAkB,aAAa,UAAU,MAAM,KAAG,OACrB,CAAC;AAEpD,eAAO,MAAM,OAAO,OAAQ,aAAa,MAAM,aAAa,KAAG,kBAM7D,CAAC;AAEH,eAAO,MAAM,YAAY,WAAY,QAAQ,EAAE,UAAU,QAAQ,KAAG,QAAQ,GAAG,IAiB9E,CAAC;AAEF,eAAO,MAAM,WAAW,WAAY,QAAQ,UAAU,QAAQ,KAAG,MAIhE,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type GeoPath, type GeoPermissibleObjects } from 'd3';
2
+ import { type Topology } from 'topojson-specification';
3
+ import { type LatLngLiteral } from '../types';
4
+ export type Styles = Record<string, any>;
5
+ export type Style = 'background' | 'water' | 'graticule' | 'land' | 'border' | 'dots' | 'point' | 'line' | 'cursor' | 'arc';
6
+ export type StyleSet = Partial<Record<Style, Styles>>;
7
+ export type Features = {
8
+ points?: LatLngLiteral[];
9
+ lines?: {
10
+ source: LatLngLiteral;
11
+ target: LatLngLiteral;
12
+ }[];
13
+ };
14
+ export type Layer = {
15
+ styles: Styles;
16
+ path: GeoPermissibleObjects;
17
+ };
18
+ /**
19
+ * Create rendering layers.
20
+ */
21
+ export declare const createLayers: (topology: Topology, features: Features, styles: StyleSet) => Layer[];
22
+ /**
23
+ * Render layers created above.
24
+ */
25
+ export declare const renderLayers: (generator: GeoPath, layers: Layer[], scale: number, styles: StyleSet) => CanvasRenderingContext2D;
26
+ //# sourceMappingURL=render.d.ts.map
@@ -0,0 +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,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,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,aAAc,QAAQ,YAAY,QAAQ,UAAU,QAAQ,KAAG,KAAK,EA2E5F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,cAAe,OAAO,UAAU,KAAK,EAAE,SAAc,MAAM,UAAU,QAAQ,6BA0CrG,CAAC"}