national-metadata 0.1.4 → 0.1.6

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 (129) hide show
  1. package/dist/mapping/index.d.ts +26 -0
  2. package/dist/mapping/index.d.ts.map +1 -0
  3. package/dist/mapping/index.js +16 -0
  4. package/dist/mapping/index.js.map +1 -0
  5. package/dist/mapping/src/components/Annotation.d.ts +13 -0
  6. package/dist/mapping/src/components/Annotation.d.ts.map +1 -0
  7. package/dist/mapping/src/components/Annotation.js +15 -0
  8. package/dist/mapping/src/components/Annotation.js.map +1 -0
  9. package/dist/mapping/src/components/ComposableMap.d.ts +13 -0
  10. package/dist/mapping/src/components/ComposableMap.d.ts.map +1 -0
  11. package/dist/mapping/src/components/ComposableMap.js +9 -0
  12. package/dist/mapping/src/components/ComposableMap.js.map +1 -0
  13. package/dist/mapping/src/components/Geographies.d.ts +20 -0
  14. package/dist/mapping/src/components/Geographies.d.ts.map +1 -0
  15. package/dist/mapping/src/components/Geographies.js +16 -0
  16. package/dist/mapping/src/components/Geographies.js.map +1 -0
  17. package/dist/mapping/src/components/Geography.d.ts +21 -0
  18. package/dist/mapping/src/components/Geography.d.ts.map +1 -0
  19. package/dist/mapping/src/components/Geography.js +44 -0
  20. package/dist/mapping/src/components/Geography.js.map +1 -0
  21. package/dist/mapping/src/components/Graticule.d.ts +10 -0
  22. package/dist/mapping/src/components/Graticule.d.ts.map +1 -0
  23. package/dist/mapping/src/components/Graticule.js +10 -0
  24. package/dist/mapping/src/components/Graticule.js.map +1 -0
  25. package/dist/mapping/src/components/Line.d.ts +13 -0
  26. package/dist/mapping/src/components/Line.d.ts.map +1 -0
  27. package/dist/mapping/src/components/Line.js +13 -0
  28. package/dist/mapping/src/components/Line.js.map +1 -0
  29. package/dist/mapping/src/components/MapProvider.d.ts +26 -0
  30. package/dist/mapping/src/components/MapProvider.d.ts.map +1 -0
  31. package/dist/mapping/src/components/MapProvider.js +62 -0
  32. package/dist/mapping/src/components/MapProvider.js.map +1 -0
  33. package/dist/mapping/src/components/Marker.d.ts +21 -0
  34. package/dist/mapping/src/components/Marker.d.ts.map +1 -0
  35. package/dist/mapping/src/components/Marker.js +48 -0
  36. package/dist/mapping/src/components/Marker.js.map +1 -0
  37. package/dist/mapping/src/components/Sphere.d.ts +11 -0
  38. package/dist/mapping/src/components/Sphere.d.ts.map +1 -0
  39. package/dist/mapping/src/components/Sphere.js +14 -0
  40. package/dist/mapping/src/components/Sphere.js.map +1 -0
  41. package/dist/mapping/src/components/ZoomPanProvider.d.ts +14 -0
  42. package/dist/mapping/src/components/ZoomPanProvider.d.ts.map +1 -0
  43. package/dist/mapping/src/components/ZoomPanProvider.js +16 -0
  44. package/dist/mapping/src/components/ZoomPanProvider.js.map +1 -0
  45. package/dist/mapping/src/components/ZoomableGroup.d.ts +30 -0
  46. package/dist/mapping/src/components/ZoomableGroup.d.ts.map +1 -0
  47. package/dist/mapping/src/components/ZoomableGroup.js +24 -0
  48. package/dist/mapping/src/components/ZoomableGroup.js.map +1 -0
  49. package/dist/mapping/src/components/useGeographies.d.ts +13 -0
  50. package/dist/mapping/src/components/useGeographies.d.ts.map +1 -0
  51. package/dist/mapping/src/components/useGeographies.js +41 -0
  52. package/dist/mapping/src/components/useGeographies.js.map +1 -0
  53. package/dist/mapping/src/components/useZoomPan.d.ts +36 -0
  54. package/dist/mapping/src/components/useZoomPan.d.ts.map +1 -0
  55. package/dist/mapping/src/components/useZoomPan.js +129 -0
  56. package/dist/mapping/src/components/useZoomPan.js.map +1 -0
  57. package/dist/mapping/src/index.d.ts +14 -0
  58. package/dist/mapping/src/index.d.ts.map +1 -0
  59. package/dist/mapping/src/index.js +14 -0
  60. package/dist/mapping/src/index.js.map +1 -0
  61. package/dist/mapping/src/utils.d.ts +38 -0
  62. package/dist/mapping/src/utils.d.ts.map +1 -0
  63. package/dist/mapping/src/utils.js +84 -0
  64. package/dist/mapping/src/utils.js.map +1 -0
  65. package/dist/react-simple-maps/index.d.ts +14 -0
  66. package/dist/react-simple-maps/index.d.ts.map +1 -0
  67. package/dist/react-simple-maps/index.js +16 -0
  68. package/dist/react-simple-maps/index.js.map +1 -0
  69. package/dist/react-simple-maps/src/components/Annotation.d.ts +3 -0
  70. package/dist/react-simple-maps/src/components/Annotation.d.ts.map +1 -0
  71. package/dist/react-simple-maps/src/components/Annotation.js +27 -0
  72. package/dist/react-simple-maps/src/components/Annotation.js.map +1 -0
  73. package/dist/react-simple-maps/src/components/ComposableMap.d.ts +3 -0
  74. package/dist/react-simple-maps/src/components/ComposableMap.d.ts.map +1 -0
  75. package/dist/react-simple-maps/src/components/ComposableMap.js +17 -0
  76. package/dist/react-simple-maps/src/components/ComposableMap.js.map +1 -0
  77. package/dist/react-simple-maps/src/components/Geographies.d.ts +3 -0
  78. package/dist/react-simple-maps/src/components/Geographies.d.ts.map +1 -0
  79. package/dist/react-simple-maps/src/components/Geographies.js +27 -0
  80. package/dist/react-simple-maps/src/components/Geographies.js.map +1 -0
  81. package/dist/react-simple-maps/src/components/Geography.d.ts +3 -0
  82. package/dist/react-simple-maps/src/components/Geography.d.ts.map +1 -0
  83. package/dist/react-simple-maps/src/components/Geography.js +59 -0
  84. package/dist/react-simple-maps/src/components/Geography.js.map +1 -0
  85. package/dist/react-simple-maps/src/components/Graticule.d.ts +3 -0
  86. package/dist/react-simple-maps/src/components/Graticule.d.ts.map +1 -0
  87. package/dist/react-simple-maps/src/components/Graticule.js +17 -0
  88. package/dist/react-simple-maps/src/components/Graticule.js.map +1 -0
  89. package/dist/react-simple-maps/src/components/Line.d.ts +3 -0
  90. package/dist/react-simple-maps/src/components/Line.d.ts.map +1 -0
  91. package/dist/react-simple-maps/src/components/Line.js +23 -0
  92. package/dist/react-simple-maps/src/components/Line.js.map +1 -0
  93. package/dist/react-simple-maps/src/components/MapProvider.d.ts +18 -0
  94. package/dist/react-simple-maps/src/components/MapProvider.d.ts.map +1 -0
  95. package/dist/react-simple-maps/src/components/MapProvider.js +63 -0
  96. package/dist/react-simple-maps/src/components/MapProvider.js.map +1 -0
  97. package/dist/react-simple-maps/src/components/Marker.d.ts +3 -0
  98. package/dist/react-simple-maps/src/components/Marker.d.ts.map +1 -0
  99. package/dist/react-simple-maps/src/components/Marker.js +66 -0
  100. package/dist/react-simple-maps/src/components/Marker.js.map +1 -0
  101. package/dist/react-simple-maps/src/components/Sphere.d.ts +3 -0
  102. package/dist/react-simple-maps/src/components/Sphere.d.ts.map +1 -0
  103. package/dist/react-simple-maps/src/components/Sphere.js +22 -0
  104. package/dist/react-simple-maps/src/components/Sphere.js.map +1 -0
  105. package/dist/react-simple-maps/src/components/ZoomPanProvider.d.ts +20 -0
  106. package/dist/react-simple-maps/src/components/ZoomPanProvider.d.ts.map +1 -0
  107. package/dist/react-simple-maps/src/components/ZoomPanProvider.js +23 -0
  108. package/dist/react-simple-maps/src/components/ZoomPanProvider.js.map +1 -0
  109. package/dist/react-simple-maps/src/components/ZoomableGroup.d.ts +3 -0
  110. package/dist/react-simple-maps/src/components/ZoomableGroup.d.ts.map +1 -0
  111. package/dist/react-simple-maps/src/components/ZoomableGroup.js +36 -0
  112. package/dist/react-simple-maps/src/components/ZoomableGroup.js.map +1 -0
  113. package/dist/react-simple-maps/src/components/useGeographies.d.ts +9 -0
  114. package/dist/react-simple-maps/src/components/useGeographies.d.ts.map +1 -0
  115. package/dist/react-simple-maps/src/components/useGeographies.js +40 -0
  116. package/dist/react-simple-maps/src/components/useGeographies.js.map +1 -0
  117. package/dist/react-simple-maps/src/components/useZoomPan.d.ts +15 -0
  118. package/dist/react-simple-maps/src/components/useZoomPan.d.ts.map +1 -0
  119. package/dist/react-simple-maps/src/components/useZoomPan.js +114 -0
  120. package/dist/react-simple-maps/src/components/useZoomPan.js.map +1 -0
  121. package/dist/react-simple-maps/src/index.d.ts +14 -0
  122. package/dist/react-simple-maps/src/index.d.ts.map +1 -0
  123. package/dist/react-simple-maps/src/index.js +14 -0
  124. package/dist/react-simple-maps/src/index.js.map +1 -0
  125. package/dist/react-simple-maps/src/utils.d.ts +18 -0
  126. package/dist/react-simple-maps/src/utils.d.ts.map +1 -0
  127. package/dist/react-simple-maps/src/utils.js +65 -0
  128. package/dist/react-simple-maps/src/utils.js.map +1 -0
  129. package/package.json +36 -2
@@ -0,0 +1,26 @@
1
+ export { default as ComposableMap } from "./src/components/ComposableMap";
2
+ export { default as Geographies } from "./src/components/Geographies";
3
+ export { default as Geography } from "./src/components/Geography";
4
+ export { default as Graticule } from "./src/components/Graticule";
5
+ export { default as ZoomableGroup } from "./src/components/ZoomableGroup";
6
+ export { default as Sphere } from "./src/components/Sphere";
7
+ export { default as Marker } from "./src/components/Marker";
8
+ export { default as Line } from "./src/components/Line";
9
+ export { default as Annotation } from "./src/components/Annotation";
10
+ export { MapProvider, MapContext, useMapContext, } from "./src/components/MapProvider";
11
+ export { ZoomPanProvider, ZoomPanContext, useZoomPanContext, } from "./src/components/ZoomPanProvider";
12
+ export { default as useGeographies } from "./src/components/useGeographies";
13
+ export { default as useZoomPan } from "./src/components/useZoomPan";
14
+ export type { ComposableMapProps } from "./src/components/ComposableMap";
15
+ export type { GeographiesProps, GeographiesChildrenProps, } from "./src/components/Geographies";
16
+ export type { GeographyProps, GeographyStyles, } from "./src/components/Geography";
17
+ export type { GraticuleProps } from "./src/components/Graticule";
18
+ export type { ZoomableGroupProps } from "./src/components/ZoomableGroup";
19
+ export type { SphereProps } from "./src/components/Sphere";
20
+ export type { MarkerProps, MarkerStyles } from "./src/components/Marker";
21
+ export type { LineProps } from "./src/components/Line";
22
+ export type { AnnotationProps } from "./src/components/Annotation";
23
+ export type { MapProviderProps, ProjectionConfig, MapContextValue, } from "./src/components/MapProvider";
24
+ export type { ZoomPanProviderProps, ZoomPanContextValue, } from "./src/components/ZoomPanProvider";
25
+ export type { Transform, PreparedFeature, PreparedMesh, Geography as GeographyData, PathGenerator, Point, } from "./src/utils";
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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C3D,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACzE,YAAY,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACV,SAAS,EACT,eAAe,EACf,YAAY,EACZ,SAAS,IAAI,aAAa,EAC1B,aAAa,EACb,KAAK,GACN,MAAM,aAAa,CAAC"}
@@ -0,0 +1,16 @@
1
+ // Main export file for mapping integration
2
+ // This re-exports all components, hooks, and providers from the source
3
+ export { default as ComposableMap } from "./src/components/ComposableMap";
4
+ export { default as Geographies } from "./src/components/Geographies";
5
+ export { default as Geography } from "./src/components/Geography";
6
+ export { default as Graticule } from "./src/components/Graticule";
7
+ export { default as ZoomableGroup } from "./src/components/ZoomableGroup";
8
+ export { default as Sphere } from "./src/components/Sphere";
9
+ export { default as Marker } from "./src/components/Marker";
10
+ export { default as Line } from "./src/components/Line";
11
+ export { default as Annotation } from "./src/components/Annotation";
12
+ export { MapProvider, MapContext, useMapContext, } from "./src/components/MapProvider";
13
+ export { ZoomPanProvider, ZoomPanContext, useZoomPanContext, } from "./src/components/ZoomPanProvider";
14
+ export { default as useGeographies } from "./src/components/useGeographies";
15
+ export { default as useZoomPan } from "./src/components/useZoomPan";
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mapping/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,uEAAuE;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EACL,WAAW,EACX,UAAU,EACV,aAAa,GACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,GAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React, { ReactNode } from "react";
2
+ export interface AnnotationProps extends React.SVGProps<SVGGElement> {
3
+ subject: [number, number];
4
+ children?: ReactNode;
5
+ connectorProps?: React.SVGProps<SVGPathElement>;
6
+ dx?: number;
7
+ dy?: number;
8
+ curve?: number | [number, number];
9
+ className?: string;
10
+ }
11
+ declare const Annotation: React.ForwardRefExoticComponent<Omit<AnnotationProps, "ref"> & React.RefAttributes<SVGGElement>>;
12
+ export default Annotation;
13
+ //# sourceMappingURL=Annotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Annotation.d.ts","sourceRoot":"","sources":["../../../../src/mapping/src/components/Annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA0B,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjE,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC;IAClE,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,cAAc,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAChD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,kGAoCf,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,15 @@
1
+ import React, { useContext, forwardRef } from "react";
2
+ import { MapContext } from "./MapProvider";
3
+ import { createConnectorPath } from "../utils";
4
+ const Annotation = forwardRef(({ subject, children, connectorProps, dx = 30, dy = 30, curve = 0, className = "", ...restProps }, ref) => {
5
+ const { projection } = useContext(MapContext);
6
+ const projectedPoint = projection(subject);
7
+ const [x, y] = projectedPoint || [0, 0];
8
+ const connectorPath = createConnectorPath(dx, dy, curve);
9
+ return (React.createElement("g", { ref: ref, transform: `translate(${x + dx}, ${y + dy})`, className: `rsm-annotation ${className}`, ...restProps },
10
+ React.createElement("path", { d: connectorPath, fill: "transparent", stroke: "#000", ...connectorProps }),
11
+ children));
12
+ });
13
+ Annotation.displayName = "Annotation";
14
+ export default Annotation;
15
+ //# sourceMappingURL=Annotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Annotation.js","sourceRoot":"","sources":["../../../../src/mapping/src/components/Annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,UAAU,EAAa,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAY/C,MAAM,UAAU,GAAG,UAAU,CAC3B,CACE,EACE,OAAO,EACP,QAAQ,EACR,cAAc,EACd,EAAE,GAAG,EAAE,EACP,EAAE,GAAG,EAAE,EACP,KAAK,GAAG,CAAC,EACT,SAAS,GAAG,EAAE,EACd,GAAG,SAAS,EACb,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9C,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxC,MAAM,aAAa,GAAG,mBAAmB,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IAEzD,OAAO,CACL,2BACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAC5C,SAAS,EAAE,kBAAkB,SAAS,EAAE,KACpC,SAAS;QAEb,8BACE,CAAC,EAAE,aAAa,EAChB,IAAI,EAAC,aAAa,EAClB,MAAM,EAAC,MAAM,KACT,cAAc,GAClB;QACD,QAAQ,CACP,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,eAAe,UAAU,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import type { GeoProjection } from "d3-geo";
3
+ import { ProjectionConfig } from "./MapProvider";
4
+ export interface ComposableMapProps extends React.SVGProps<SVGSVGElement> {
5
+ width?: number;
6
+ height?: number;
7
+ projection?: string | GeoProjection;
8
+ projectionConfig?: ProjectionConfig;
9
+ className?: string;
10
+ }
11
+ declare const ComposableMap: React.ForwardRefExoticComponent<Omit<ComposableMapProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
12
+ export default ComposableMap;
13
+ //# sourceMappingURL=ComposableMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComposableMap.d.ts","sourceRoot":"","sources":["../../../../src/mapping/src/components/ComposableMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAe,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE9D,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;IACpC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,aAAa,uGA+BlB,CAAC;AAIF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React, { forwardRef } from "react";
2
+ import { MapProvider } from "./MapProvider";
3
+ const ComposableMap = forwardRef(({ width = 800, height = 600, projection = "geoEqualEarth", projectionConfig = {}, className = "", children, ...restProps }, ref) => {
4
+ return (React.createElement(MapProvider, { width: width, height: height, projection: projection, projectionConfig: projectionConfig },
5
+ React.createElement("svg", { ref: ref, viewBox: `0 0 ${width} ${height}`, className: `rsm-svg ${className}`, ...restProps }, children)));
6
+ });
7
+ ComposableMap.displayName = "ComposableMap";
8
+ export default ComposableMap;
9
+ //# sourceMappingURL=ComposableMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComposableMap.js","sourceRoot":"","sources":["../../../../src/mapping/src/components/ComposableMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAU9D,MAAM,aAAa,GAAG,UAAU,CAC9B,CACE,EACE,KAAK,GAAG,GAAG,EACX,MAAM,GAAG,GAAG,EACZ,UAAU,GAAG,eAAe,EAC5B,gBAAgB,GAAG,EAAE,EACrB,SAAS,GAAG,EAAE,EACd,QAAQ,EACR,GAAG,SAAS,EACb,EACD,GAAG,EACH,EAAE;IACF,OAAO,CACL,oBAAC,WAAW,IACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB;QAElC,6BACE,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,KAAK,IAAI,MAAM,EAAE,EACjC,SAAS,EAAE,WAAW,SAAS,EAAE,KAC7B,SAAS,IAEZ,QAAQ,CACL,CACM,CACf,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC;AAE5C,eAAe,aAAa,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React, { ReactNode } from "react";
2
+ import type { Feature } from "geojson";
3
+ import type { GeoPath, GeoProjection } from "d3-geo";
4
+ import type { Geography, PreparedFeature } from "../utils";
5
+ export interface GeographiesChildrenProps {
6
+ geographies: PreparedFeature[];
7
+ outline: PreparedFeature | undefined;
8
+ borders: PreparedFeature | undefined;
9
+ path: GeoPath;
10
+ projection: GeoProjection;
11
+ }
12
+ export interface GeographiesProps extends Omit<React.SVGProps<SVGGElement>, "children"> {
13
+ geography: string | Geography | Feature[];
14
+ children: (props: GeographiesChildrenProps) => ReactNode;
15
+ parseGeographies?: (features: Feature[]) => Feature[];
16
+ className?: string;
17
+ }
18
+ declare const Geographies: React.ForwardRefExoticComponent<Omit<GeographiesProps, "ref"> & React.RefAttributes<SVGGElement>>;
19
+ export default Geographies;
20
+ //# sourceMappingURL=Geographies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Geographies.d.ts","sourceRoot":"","sources":["../../../../src/mapping/src/components/Geographies.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA0B,SAAS,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGrD,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAgB,MAAM,UAAU,CAAC;AAEzE,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,OAAO,EAAE,eAAe,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,eAAe,GAAG,SAAS,CAAC;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,aAAa,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACrF,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,EAAE,CAAC;IAC1C,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,SAAS,CAAC;IACzD,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,WAAW,mGAgBhB,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,16 @@
1
+ import React, { useContext, forwardRef } from "react";
2
+ import { MapContext } from "./MapProvider";
3
+ import useGeographies from "./useGeographies";
4
+ const Geographies = forwardRef(({ geography, children, parseGeographies, className = "", ...restProps }, ref) => {
5
+ const { path, projection } = useContext(MapContext);
6
+ const { geographies, outline, borders } = useGeographies({
7
+ geography,
8
+ parseGeographies,
9
+ });
10
+ return (React.createElement("g", { ref: ref, className: `rsm-geographies ${className}`, ...restProps }, geographies &&
11
+ geographies.length > 0 &&
12
+ children({ geographies, outline, borders, path, projection })));
13
+ });
14
+ Geographies.displayName = "Geographies";
15
+ export default Geographies;
16
+ //# sourceMappingURL=Geographies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Geographies.js","sourceRoot":"","sources":["../../../../src/mapping/src/components/Geographies.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,UAAU,EAAa,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAkB9C,MAAM,WAAW,GAAG,UAAU,CAC5B,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE;IAC/E,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACpD,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;QACvD,SAAS;QACT,gBAAgB;KACjB,CAAC,CAAC;IAEH,OAAO,CACL,2BAAG,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,mBAAmB,SAAS,EAAE,KAAM,SAAS,IAClE,WAAW;QACV,WAAW,CAAC,MAAM,GAAG,CAAC;QACtB,QAAQ,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAC7D,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,eAAe,WAAW,CAAC"}
@@ -0,0 +1,21 @@
1
+ import React, { CSSProperties } from "react";
2
+ import type { PreparedFeature } from "../utils";
3
+ export interface GeographyStyles {
4
+ default?: CSSProperties;
5
+ hover?: CSSProperties;
6
+ pressed?: CSSProperties;
7
+ }
8
+ export interface GeographyProps extends Omit<React.SVGProps<SVGPathElement>, "style"> {
9
+ geography: PreparedFeature;
10
+ onMouseEnter?: (event: React.MouseEvent<SVGPathElement>) => void;
11
+ onMouseLeave?: (event: React.MouseEvent<SVGPathElement>) => void;
12
+ onMouseDown?: (event: React.MouseEvent<SVGPathElement>) => void;
13
+ onMouseUp?: (event: React.MouseEvent<SVGPathElement>) => void;
14
+ onFocus?: (event: React.FocusEvent<SVGPathElement>) => void;
15
+ onBlur?: (event: React.FocusEvent<SVGPathElement>) => void;
16
+ style?: GeographyStyles;
17
+ className?: string;
18
+ }
19
+ declare const _default: React.NamedExoticComponent<Omit<GeographyProps, "ref"> & React.RefAttributes<SVGPathElement>>;
20
+ export default _default;
21
+ //# sourceMappingURL=Geography.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Geography.d.ts","sourceRoot":"","sources":["../../../../src/mapping/src/components/Geography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA8B,aAAa,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IACnF,SAAS,EAAE,eAAe,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACjE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACjE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAChE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC9D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC5D,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC3D,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;;AA4ED,wBAA+B"}
@@ -0,0 +1,44 @@
1
+ import React, { useState, memo, forwardRef } from "react";
2
+ const Geography = forwardRef(({ geography, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onFocus, onBlur, style = {}, className = "", ...restProps }, ref) => {
3
+ const [isPressed, setPressed] = useState(false);
4
+ const [isFocused, setFocus] = useState(false);
5
+ function handleMouseEnter(evt) {
6
+ setFocus(true);
7
+ if (onMouseEnter)
8
+ onMouseEnter(evt);
9
+ }
10
+ function handleMouseLeave(evt) {
11
+ setFocus(false);
12
+ if (isPressed)
13
+ setPressed(false);
14
+ if (onMouseLeave)
15
+ onMouseLeave(evt);
16
+ }
17
+ function handleFocus(evt) {
18
+ setFocus(true);
19
+ if (onFocus)
20
+ onFocus(evt);
21
+ }
22
+ function handleBlur(evt) {
23
+ setFocus(false);
24
+ if (isPressed)
25
+ setPressed(false);
26
+ if (onBlur)
27
+ onBlur(evt);
28
+ }
29
+ function handleMouseDown(evt) {
30
+ setPressed(true);
31
+ if (onMouseDown)
32
+ onMouseDown(evt);
33
+ }
34
+ function handleMouseUp(evt) {
35
+ setPressed(false);
36
+ if (onMouseUp)
37
+ onMouseUp(evt);
38
+ }
39
+ const currentState = isPressed || isFocused ? (isPressed ? "pressed" : "hover") : "default";
40
+ return (React.createElement("path", { ref: ref, tabIndex: 0, className: `rsm-geography ${className}`, d: geography.svgPath, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, style: style[currentState], ...restProps }));
41
+ });
42
+ Geography.displayName = "Geography";
43
+ export default memo(Geography);
44
+ //# sourceMappingURL=Geography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Geography.js","sourceRoot":"","sources":["../../../../src/mapping/src/components/Geography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAiB,MAAM,OAAO,CAAC;AAqBzE,MAAM,SAAS,GAAG,UAAU,CAC1B,CACE,EACE,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,KAAK,GAAG,EAAE,EACV,SAAS,GAAG,EAAE,EACd,GAAG,SAAS,EACb,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,SAAS,gBAAgB,CAAC,GAAqC;QAC7D,QAAQ,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,YAAY;YAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IAED,SAAS,gBAAgB,CAAC,GAAqC;QAC7D,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,IAAI,SAAS;YAAE,UAAU,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,YAAY;YAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IAED,SAAS,WAAW,CAAC,GAAqC;QACxD,QAAQ,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED,SAAS,UAAU,CAAC,GAAqC;QACvD,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,IAAI,SAAS;YAAE,UAAU,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED,SAAS,eAAe,CAAC,GAAqC;QAC5D,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,IAAI,WAAW;YAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,aAAa,CAAC,GAAqC;QAC1D,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,IAAI,SAAS;YAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAED,MAAM,YAAY,GAAG,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE5F,OAAO,CACL,8BACE,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,iBAAiB,SAAS,EAAE,EACvC,CAAC,EAAE,SAAS,CAAC,OAAO,EACpB,YAAY,EAAE,gBAAgB,EAC9B,YAAY,EAAE,gBAAgB,EAC9B,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,eAAe,EAC5B,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,KACtB,SAAS,GACb,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,eAAe,IAAI,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export interface GraticuleProps extends React.SVGProps<SVGPathElement> {
3
+ fill?: string;
4
+ stroke?: string;
5
+ step?: [number, number];
6
+ className?: string;
7
+ }
8
+ declare const _default: React.NamedExoticComponent<Omit<GraticuleProps, "ref"> & React.RefAttributes<SVGPathElement>>;
9
+ export default _default;
10
+ //# sourceMappingURL=Graticule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Graticule.d.ts","sourceRoot":"","sources":["../../../../src/mapping/src/components/Graticule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAI5D,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;;AA6BD,wBAA+B"}
@@ -0,0 +1,10 @@
1
+ import React, { memo, useContext, forwardRef } from "react";
2
+ import { geoGraticule } from "d3-geo";
3
+ import { MapContext } from "./MapProvider";
4
+ const Graticule = forwardRef(({ fill = "transparent", stroke = "currentcolor", step = [10, 10], className = "", ...restProps }, ref) => {
5
+ const { path } = useContext(MapContext);
6
+ return (React.createElement("path", { ref: ref, d: path(geoGraticule().step(step)()) || undefined, fill: fill, stroke: stroke, className: `rsm-graticule ${className}`, ...restProps }));
7
+ });
8
+ Graticule.displayName = "Graticule";
9
+ export default memo(Graticule);
10
+ //# sourceMappingURL=Graticule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Graticule.js","sourceRoot":"","sources":["../../../../src/mapping/src/components/Graticule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,MAAM,SAAS,GAAG,UAAU,CAC1B,CACE,EACE,IAAI,GAAG,aAAa,EACpB,MAAM,GAAG,cAAc,EACvB,IAAI,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,EACf,SAAS,GAAG,EAAE,EACd,GAAG,SAAS,EACb,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACxC,OAAO,CACL,8BACE,GAAG,EAAE,GAAG,EACR,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,SAAS,EACjD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,iBAAiB,SAAS,EAAE,KACnC,SAAS,GACb,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,eAAe,IAAI,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export interface LineProps extends Omit<React.SVGProps<SVGPathElement>, "from" | "to"> {
3
+ from?: [number, number];
4
+ to?: [number, number];
5
+ coordinates?: [number, number][];
6
+ stroke?: string;
7
+ strokeWidth?: number;
8
+ fill?: string;
9
+ className?: string;
10
+ }
11
+ declare const Line: React.ForwardRefExoticComponent<Omit<LineProps, "ref"> & React.RefAttributes<SVGPathElement>>;
12
+ export default Line;
13
+ //# sourceMappingURL=Line.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../../../src/mapping/src/components/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAGtD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpF,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,IAAI,+FAiCT,CAAC;AAIF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React, { useContext, forwardRef } from "react";
2
+ import { MapContext } from "./MapProvider";
3
+ const Line = forwardRef(({ from = [0, 0], to = [0, 0], coordinates, stroke = "currentcolor", strokeWidth = 3, fill = "transparent", className = "", ...restProps }, ref) => {
4
+ const { path } = useContext(MapContext);
5
+ const lineData = {
6
+ type: "LineString",
7
+ coordinates: coordinates || [from, to],
8
+ };
9
+ return (React.createElement("path", { ref: ref, d: path(lineData) || undefined, className: `rsm-line ${className}`, stroke: stroke, strokeWidth: strokeWidth, fill: fill, ...restProps }));
10
+ });
11
+ Line.displayName = "Line";
12
+ export default Line;
13
+ //# sourceMappingURL=Line.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Line.js","sourceRoot":"","sources":["../../../../src/mapping/src/components/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAY3C,MAAM,IAAI,GAAG,UAAU,CACrB,CACE,EACE,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EACb,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EACX,WAAW,EACX,MAAM,GAAG,cAAc,EACvB,WAAW,GAAG,CAAC,EACf,IAAI,GAAG,aAAa,EACpB,SAAS,GAAG,EAAE,EACd,GAAG,SAAS,EACb,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IAExC,MAAM,QAAQ,GAAG;QACf,IAAI,EAAE,YAAqB;QAC3B,WAAW,EAAE,WAAW,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;KACvC,CAAC;IAEF,OAAO,CACL,8BACE,GAAG,EAAE,GAAG,EACR,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,SAAS,EAC9B,SAAS,EAAE,YAAY,SAAS,EAAE,EAClC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,KACN,SAAS,GACb,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAE1B,eAAe,IAAI,CAAC"}
@@ -0,0 +1,26 @@
1
+ import React, { ReactNode } from "react";
2
+ import type { GeoPath, GeoProjection } from "d3-geo";
3
+ export interface ProjectionConfig {
4
+ center?: [number, number];
5
+ rotate?: [number, number, number?];
6
+ scale?: number;
7
+ parallels?: [number, number];
8
+ }
9
+ export interface MapContextValue {
10
+ width: number;
11
+ height: number;
12
+ projection: GeoProjection;
13
+ path: GeoPath;
14
+ }
15
+ declare const MapContext: React.Context<MapContextValue>;
16
+ export interface MapProviderProps {
17
+ width: number;
18
+ height: number;
19
+ projection?: string | GeoProjection;
20
+ projectionConfig?: ProjectionConfig;
21
+ children?: ReactNode;
22
+ }
23
+ declare const MapProvider: React.FC<MapProviderProps>;
24
+ declare const useMapContext: () => MapContextValue;
25
+ export { MapProvider, MapContext, useMapContext };
26
+ //# sourceMappingURL=MapProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapProvider.d.ts","sourceRoot":"","sources":["../../../../src/mapping/src/components/MapProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAKZ,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAIrD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,aAAa,CAAC;IAC1B,IAAI,EAAE,OAAO,CAAC;CACf;AAED,QAAA,MAAM,UAAU,gCAAwD,CAAC;AA0CzE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;IACpC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAuC3C,CAAC;AAEF,QAAA,MAAM,aAAa,QAAO,eAEzB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,62 @@
1
+ import React, { createContext, useMemo, useCallback, useContext, } from "react";
2
+ import * as d3Geo from "d3-geo";
3
+ const { geoPath, ...projections } = d3Geo;
4
+ const MapContext = createContext({});
5
+ const makeProjection = ({ projectionConfig = {}, projection = "geoEqualEarth", width = 800, height = 600, }) => {
6
+ const isFunc = typeof projection === "function";
7
+ if (isFunc)
8
+ return projection;
9
+ const projectionName = projection;
10
+ const projectionFn = projections[projectionName];
11
+ let proj = projectionFn().translate([width / 2, height / 2]);
12
+ const supported = [
13
+ proj.center ? "center" : null,
14
+ proj.rotate ? "rotate" : null,
15
+ proj.scale ? "scale" : null,
16
+ proj.parallels ? "parallels" : null,
17
+ ];
18
+ supported.forEach((d) => {
19
+ if (!d)
20
+ return;
21
+ const method = d;
22
+ const projMethod = proj[d];
23
+ if (projMethod && typeof projMethod === "function") {
24
+ proj = projMethod.call(proj, projectionConfig[method] || projMethod.call(proj));
25
+ }
26
+ });
27
+ return proj;
28
+ };
29
+ const MapProvider = ({ width, height, projection, projectionConfig = {}, children, ...restProps }) => {
30
+ const [cx, cy] = projectionConfig.center || [];
31
+ const [rx, ry, rz] = projectionConfig.rotate || [];
32
+ const [p1, p2] = projectionConfig.parallels || [];
33
+ const s = projectionConfig.scale || null;
34
+ const projMemo = useMemo(() => {
35
+ return makeProjection({
36
+ projectionConfig: {
37
+ center: cx != null || cy != null ? [cx || 0, cy || 0] : undefined,
38
+ rotate: rx != null || ry != null ? [rx || 0, ry || 0, rz] : undefined,
39
+ parallels: p1 != null || p2 != null ? [p1 || 0, p2 || 0] : undefined,
40
+ scale: s || undefined,
41
+ },
42
+ projection,
43
+ width,
44
+ height,
45
+ });
46
+ }, [width, height, projection, cx, cy, rx, ry, rz, p1, p2, s]);
47
+ const proj = useCallback(() => projMemo, [projMemo])();
48
+ const value = useMemo(() => {
49
+ return {
50
+ width,
51
+ height,
52
+ projection: proj,
53
+ path: geoPath().projection(proj),
54
+ };
55
+ }, [width, height, proj]);
56
+ return React.createElement(MapContext.Provider, { value: value, ...restProps }, children);
57
+ };
58
+ const useMapContext = () => {
59
+ return useContext(MapContext);
60
+ };
61
+ export { MapProvider, MapContext, useMapContext };
62
+ //# sourceMappingURL=MapProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapProvider.js","sourceRoot":"","sources":["../../../../src/mapping/src/components/MapProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,aAAa,EACb,OAAO,EACP,WAAW,EACX,UAAU,GAEX,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,KAAK,MAAM,QAAQ,CAAC;AAGhC,MAAM,EAAE,O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;YACL,MAAM;SACP,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAE/D,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;IAEvD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE;QACzB,OAAO;YACL,KAAK;YACL,MAAM;YACN,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;SACjC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAE1B,OAAO,oBAAC,UAAU,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,KAAM,SAAS,IAAG,QAAQ,CAAuB,CAAC;AAC5F,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,GAAoB,EAAE;IAC1C,OAAO,UAAU,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import React, { ReactNode, CSSProperties } from "react";
2
+ export interface MarkerStyles {
3
+ default?: CSSProperties;
4
+ hover?: CSSProperties;
5
+ pressed?: CSSProperties;
6
+ }
7
+ export interface MarkerProps extends Omit<React.SVGProps<SVGGElement>, "style"> {
8
+ coordinates: [number, number];
9
+ children?: ReactNode;
10
+ onMouseEnter?: (event: React.MouseEvent<SVGGElement>) => void;
11
+ onMouseLeave?: (event: React.MouseEvent<SVGGElement>) => void;
12
+ onMouseDown?: (event: React.MouseEvent<SVGGElement>) => void;
13
+ onMouseUp?: (event: React.MouseEvent<SVGGElement>) => void;
14
+ onFocus?: (event: React.FocusEvent<SVGGElement>) => void;
15
+ onBlur?: (event: React.FocusEvent<SVGGElement>) => void;
16
+ style?: MarkerStyles;
17
+ className?: string;
18
+ }
19
+ declare const Marker: React.ForwardRefExoticComponent<Omit<MarkerProps, "ref"> & React.RefAttributes<SVGGElement>>;
20
+ export default Marker;
21
+ //# sourceMappingURL=Marker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Marker.d.ts","sourceRoot":"","sources":["../../../../src/mapping/src/components/Marker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoC,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG1F,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC7E,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC9D,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC9D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC7D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC3D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACxD,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,MAAM,8FA4EX,CAAC;AAIF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,48 @@
1
+ import React, { useContext, useState, forwardRef } from "react";
2
+ import { MapContext } from "./MapProvider";
3
+ const Marker = forwardRef(({ coordinates, children, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onFocus, onBlur, style = {}, className = "", ...restProps }, ref) => {
4
+ const { projection } = useContext(MapContext);
5
+ const [isPressed, setPressed] = useState(false);
6
+ const [isFocused, setFocus] = useState(false);
7
+ const projectedPoint = projection(coordinates);
8
+ const [x, y] = projectedPoint || [0, 0];
9
+ function handleMouseEnter(evt) {
10
+ setFocus(true);
11
+ if (onMouseEnter)
12
+ onMouseEnter(evt);
13
+ }
14
+ function handleMouseLeave(evt) {
15
+ setFocus(false);
16
+ if (isPressed)
17
+ setPressed(false);
18
+ if (onMouseLeave)
19
+ onMouseLeave(evt);
20
+ }
21
+ function handleFocus(evt) {
22
+ setFocus(true);
23
+ if (onFocus)
24
+ onFocus(evt);
25
+ }
26
+ function handleBlur(evt) {
27
+ setFocus(false);
28
+ if (isPressed)
29
+ setPressed(false);
30
+ if (onBlur)
31
+ onBlur(evt);
32
+ }
33
+ function handleMouseDown(evt) {
34
+ setPressed(true);
35
+ if (onMouseDown)
36
+ onMouseDown(evt);
37
+ }
38
+ function handleMouseUp(evt) {
39
+ setPressed(false);
40
+ if (onMouseUp)
41
+ onMouseUp(evt);
42
+ }
43
+ const currentState = isPressed || isFocused ? (isPressed ? "pressed" : "hover") : "default";
44
+ return (React.createElement("g", { ref: ref, transform: `translate(${x}, ${y})`, className: `rsm-marker ${className}`, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, style: style[currentState], ...restProps }, children));
45
+ });
46
+ Marker.displayName = "Marker";
47
+ export default Marker;
48
+ //# sourceMappingURL=Marker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Marker.js","sourceRoot":"","sources":["../../../../src/mapping/src/components/Marker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAA4B,MAAM,OAAO,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAqB3C,MAAM,MAAM,GAAG,UAAU,CACvB,CACE,EACE,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,KAAK,GAAG,EAAE,EACV,SAAS,GAAG,EAAE,EACd,GAAG,SAAS,EACb,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9C,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAC/C,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAExC,SAAS,gBAAgB,CAAC,GAAkC;QAC1D,QAAQ,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,YAAY;YAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IAED,SAAS,gBAAgB,CAAC,GAAkC;QAC1D,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,IAAI,SAAS;YAAE,UAAU,CAAC,KAAK,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AG,QAAQ,CAAC;AAE9B,eAAe,MAAM,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export interface SphereProps extends React.SVGProps<SVGPathElement> {
3
+ id?: string;
4
+ fill?: string;
5
+ stroke?: string;
6
+ strokeWidth?: number;
7
+ className?: string;
8
+ }
9
+ declare const _default: React.NamedExoticComponent<Omit<SphereProps, "ref"> & React.RefAttributes<SVGPathElement>>;
10
+ export default _default;
11
+ //# sourceMappingURL=Sphere.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sphere.d.ts","sourceRoot":"","sources":["../../../../src/mapping/src/components/Sphere.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAG/E,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC;IACjE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;;AAwCD,wBAA4B"}
@@ -0,0 +1,14 @@
1
+ import React, { Fragment, memo, useMemo, useContext, forwardRef } from "react";
2
+ import { MapContext } from "./MapProvider";
3
+ const Sphere = forwardRef(({ id = "rsm-sphere", fill = "transparent", stroke = "currentcolor", strokeWidth = 0.5, className = "", ...restProps }, ref) => {
4
+ const { path } = useContext(MapContext);
5
+ const spherePath = useMemo(() => path({ type: "Sphere" }), [path]);
6
+ return (React.createElement(Fragment, null,
7
+ React.createElement("defs", null,
8
+ React.createElement("clipPath", { id: id },
9
+ React.createElement("path", { d: spherePath || undefined }))),
10
+ React.createElement("path", { ref: ref, d: spherePath || undefined, fill: fill, stroke: stroke, strokeWidth: strokeWidth, style: { pointerEvents: "none" }, className: `rsm-sphere ${className}`, ...restProps })));
11
+ });
12
+ Sphere.displayName = "Sphere";
13
+ export default memo(Sphere);
14
+ //# sourceMappingURL=Sphere.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sphere.js","sourceRoot":"","sources":["../../../../src/mapping/src/components/Sphere.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,MAAM,MAAM,GAAG,UAAU,CACvB,CACE,EACE,EAAE,GAAG,YAAY,EACjB,IAAI,GAAG,aAAa,EACpB,MAAM,GAAG,cAAc,EACvB,WAAW,GAAG,GAAG,EACjB,SAAS,GAAG,EAAE,EACd,GAAG,SAAS,EACb,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACxC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACnE,OAAO,CACL,oBAAC,QAAQ;QACP;YACE,kCAAU,EAAE,EAAE,EAAE;gBACd,8BAAM,CAAC,EAAE,UAAU,IAAI,SAAS,GAAI,CAC3B,CACN;QACP,8BACE,GAAG,EAAE,GAAG,EACR,CAAC,EAAE,UAAU,IAAI,SAAS,EAC1B,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAChC,SAAS,EAAE,cAAc,SAAS,EAAE,KAChC,SAAS,GACb,CACO,CACZ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,eAAe,IAAI,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import React, { ReactNode } from "react";
2
+ import type { Transform } from "../utils";
3
+ export interface ZoomPanContextValue extends Transform {
4
+ transformString: string;
5
+ }
6
+ declare const ZoomPanContext: React.Context<ZoomPanContextValue>;
7
+ export interface ZoomPanProviderProps {
8
+ value?: ZoomPanContextValue;
9
+ children?: ReactNode;
10
+ }
11
+ declare const ZoomPanProvider: React.FC<ZoomPanProviderProps>;
12
+ declare const useZoomPanContext: () => ZoomPanContextValue;
13
+ export { ZoomPanContext, ZoomPanProvider, useZoomPanContext };
14
+ //# sourceMappingURL=ZoomPanProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZoomPanProvider.d.ts","sourceRoot":"","sources":["../../../../src/mapping/src/components/ZoomPanProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,QAAA,MAAM,cAAc,oCAEnB,CAAC;AASF,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAUnD,CAAC;AAEF,QAAA,MAAM,iBAAiB,QAAO,mBAE7B,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import React, { createContext, useContext } from "react";
2
+ const ZoomPanContext = createContext({});
3
+ const defaultValue = {
4
+ x: 0,
5
+ y: 0,
6
+ k: 1,
7
+ transformString: "translate(0 0) scale(1)",
8
+ };
9
+ const ZoomPanProvider = ({ value = defaultValue, children, ...restProps }) => {
10
+ return (React.createElement(ZoomPanContext.Provider, { value: value, ...restProps }, children));
11
+ };
12
+ const useZoomPanContext = () => {
13
+ return useContext(ZoomPanContext);
14
+ };
15
+ export { ZoomPanContext, ZoomPanProvider, useZoomPanContext };
16
+ //# sourceMappingURL=ZoomPanProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZoomPanProvider.js","sourceRoot":"","sources":["../../../../src/mapping/src/components/ZoomPanProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAa,MAAM,OAAO,CAAC;AAOpE,MAAM,cAAc,GAAG,aAAa,CAClC,EAAyB,CAC1B,CAAC;AAEF,MAAM,YAAY,GAAwB;IACxC,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,eAAe,EAAE,yBAAyB;CAC3C,CAAC;AAOF,MAAM,eAAe,GAAmC,CAAC,EACvD,KAAK,GAAG,YAAY,EACpB,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,EAAE;IACH,OAAO,CACL,oBAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,KAAM,SAAS,IACjD,QAAQ,CACe,CAC3B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAwB,EAAE;IAClD,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC"}