mapixa 1.0.0

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 (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +276 -0
  3. package/dist/components/DrawTools/DrawCircleControl.d.ts +18 -0
  4. package/dist/components/DrawTools/DrawLineControl.d.ts +17 -0
  5. package/dist/components/DrawTools/DrawMarkerControl.d.ts +19 -0
  6. package/dist/components/DrawTools/DrawPolygonControl.d.ts +18 -0
  7. package/dist/components/DrawTools/DrawRectangleControl.d.ts +19 -0
  8. package/dist/components/DrawTools/FreeDrawControl.d.ts +8 -0
  9. package/dist/components/DrawTools/IntersectionControl.d.ts +8 -0
  10. package/dist/components/DrawTools/MapDrawTools.d.ts +9 -0
  11. package/dist/components/ExpandableBox.d.ts +11 -0
  12. package/dist/components/ExtraActionButtons.d.ts +7 -0
  13. package/dist/components/ExtraTools/CaptureAreaControl.d.ts +8 -0
  14. package/dist/components/ExtraTools/DrawRulerControl.d.ts +8 -0
  15. package/dist/components/ExtraTools/ExtraMapTools.d.ts +9 -0
  16. package/dist/components/ExtraTools/GoToControl.d.ts +7 -0
  17. package/dist/components/ExtraTools/ImageOverlayControl.d.ts +18 -0
  18. package/dist/components/LayerVisibilityControl/LayerVisibilityControl.d.ts +6 -0
  19. package/dist/components/MapControlBox.d.ts +14 -0
  20. package/dist/components/MapLibreTools.d.ts +85 -0
  21. package/dist/components/NavigationTools/CoordinateDisplay.d.ts +7 -0
  22. package/dist/components/NavigationTools/MapFlatViewEnforcer.d.ts +5 -0
  23. package/dist/components/NavigationTools/MapNavigator.d.ts +7 -0
  24. package/dist/components/NavigationTools/MapResizeHandler.d.ts +5 -0
  25. package/dist/components/NavigationTools/MapViewControl.d.ts +3 -0
  26. package/dist/components/ui/Icons.d.ts +36 -0
  27. package/dist/components/ui/Modal.d.ts +11 -0
  28. package/dist/components/ui/Popover.d.ts +10 -0
  29. package/dist/context/AccordionGroupContext.d.ts +8 -0
  30. package/dist/context/LayerVisibilityContext.d.ts +20 -0
  31. package/dist/context/MapToolContext.d.ts +32 -0
  32. package/dist/index.cjs +9311 -0
  33. package/dist/index.cjs.map +1 -0
  34. package/dist/index.d.ts +62 -0
  35. package/dist/index.js +52894 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/mapixa.css +1 -0
  38. package/dist/types/events.d.ts +32 -0
  39. package/dist/types/tools.d.ts +59 -0
  40. package/dist/utils/exportUtils.d.ts +17 -0
  41. package/dist/utils/generateMarkerSvg.d.ts +12 -0
  42. package/dist/utils/geoCalculations.d.ts +25 -0
  43. package/dist/utils/mapToolButtonStyles.d.ts +4 -0
  44. package/package.json +99 -0
@@ -0,0 +1,36 @@
1
+ import { LucideProps } from 'lucide-react';
2
+ export type IconProps = LucideProps;
3
+ export declare const PinIcon: import('lucide-react').LucideIcon;
4
+ export declare const LineIcon: import('lucide-react').LucideIcon;
5
+ export declare const PolygonIcon: import('lucide-react').LucideIcon;
6
+ export declare const CircleIcon: import('lucide-react').LucideIcon;
7
+ export declare const RectangleIcon: import('lucide-react').LucideIcon;
8
+ export declare const FreehandIcon: import('lucide-react').LucideIcon;
9
+ export declare const IntersectionIcon: import('lucide-react').LucideIcon;
10
+ export declare const RulerIcon: import('lucide-react').LucideIcon;
11
+ export declare const CropIcon: import('lucide-react').LucideIcon;
12
+ export declare const GpsIcon: import('lucide-react').LucideIcon;
13
+ export declare const ImageIcon: import('lucide-react').LucideIcon;
14
+ export declare const HomeIcon: import('lucide-react').LucideIcon;
15
+ export declare const PlusIcon: import('lucide-react').LucideIcon;
16
+ export declare const MinusIcon: import('lucide-react').LucideIcon;
17
+ export declare const CompassIcon: import('lucide-react').LucideIcon;
18
+ export declare const BoxZoomIcon: import('lucide-react').LucideIcon;
19
+ export declare const FullscreenIcon: import('lucide-react').LucideIcon;
20
+ export declare const FullscreenExitIcon: import('lucide-react').LucideIcon;
21
+ export declare const CloseIcon: import('lucide-react').LucideIcon;
22
+ export declare const TrashIcon: import('lucide-react').LucideIcon;
23
+ export declare const CopyIcon: import('lucide-react').LucideIcon;
24
+ export declare const CheckIcon: import('lucide-react').LucideIcon;
25
+ export declare const TuneIcon: import('lucide-react').LucideIcon;
26
+ export declare const ArrowUpIcon: import('lucide-react').LucideIcon;
27
+ export declare const DrawIcon: import('lucide-react').LucideIcon;
28
+ export declare const ToolsIcon: import('lucide-react').LucideIcon;
29
+ export declare const DownloadIcon: import('lucide-react').LucideIcon;
30
+ export declare const FlightIcon: import('lucide-react').LucideIcon;
31
+ export declare const EyeIcon: import('lucide-react').LucideIcon;
32
+ export declare const EyeOffIcon: import('lucide-react').LucideIcon;
33
+ export declare const SplitIcon: import('lucide-react').LucideIcon;
34
+ export declare const CrosshairIcon: import('lucide-react').LucideIcon;
35
+ export declare const LayersIcon: import('lucide-react').LucideIcon;
36
+ export * from 'lucide-react';
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ModalProps {
3
+ open: boolean;
4
+ onClose: () => void;
5
+ title: string;
6
+ children: ReactNode;
7
+ footer?: ReactNode;
8
+ maxWidth?: number;
9
+ }
10
+ export declare const Modal: ({ open, onClose, title, children, footer, maxWidth, }: ModalProps) => import('react').ReactPortal;
11
+ export default Modal;
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ export interface PopoverProps {
3
+ open: boolean;
4
+ anchorEl: HTMLElement | null;
5
+ onClose: () => void;
6
+ children: ReactNode;
7
+ width?: number;
8
+ }
9
+ export declare const Popover: ({ open, anchorEl, onClose, children, width, }: PopoverProps) => import('react').ReactPortal;
10
+ export default Popover;
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function AccordionGroupProvider({ children }: {
3
+ children: ReactNode;
4
+ }): import("react").JSX.Element;
5
+ export declare function useAccordionGroupItem(id: string): {
6
+ expanded: boolean;
7
+ setExpanded: (expanded: boolean) => void;
8
+ };
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ import { ToolType, LayerVisibilityState } from '../types/tools';
3
+ export interface LayerVisibilityContextValue {
4
+ visibility: LayerVisibilityState;
5
+ isToolVisible: (tool: ToolType) => boolean;
6
+ setToolVisibility: (tool: ToolType, visible: boolean) => void;
7
+ toggleToolVisibility: (tool: ToolType) => void;
8
+ setAllVisibility: (visible: boolean) => void;
9
+ }
10
+ export declare function normalizeVisibility(input?: Partial<LayerVisibilityState>): Partial<LayerVisibilityState>;
11
+ export declare const TOOL_LAYER_MAP: Record<ToolType, string[]>;
12
+ export interface LayerVisibilityProviderProps {
13
+ children: ReactNode;
14
+ visibility?: Partial<LayerVisibilityState>;
15
+ initialVisibility?: Partial<LayerVisibilityState>;
16
+ onVisibilityChange?: (tool: ToolType, visible: boolean, allState: LayerVisibilityState) => void;
17
+ }
18
+ export declare function LayerVisibilityProvider({ children, visibility: controlledVisibility, initialVisibility, onVisibilityChange, }: LayerVisibilityProviderProps): import("react").JSX.Element;
19
+ export declare function useLayerVisibility(): LayerVisibilityContextValue;
20
+ export default LayerVisibilityProvider;
@@ -0,0 +1,32 @@
1
+ import { Dispatch, ReactNode, SetStateAction } from 'react';
2
+ import { ToolType, ToolsConfiguration, AfterDrawMode, ExtraActionItem } from '../types/tools';
3
+ import { DrawEndEvent, DrawChangeEvent, DrawDeleteEvent } from '../types/events';
4
+ export type ActiveTool = ToolType | string | null;
5
+ export interface MapToolContextValue {
6
+ activeTool: ActiveTool;
7
+ setActiveTool: Dispatch<SetStateAction<ActiveTool>>;
8
+ toolsConfig?: ToolsConfiguration;
9
+ afterDrawMode?: AfterDrawMode;
10
+ extraActions?: ExtraActionItem[];
11
+ onDrawEnd?: (event: DrawEndEvent) => void;
12
+ onDrawStart?: (tool: ToolType) => void;
13
+ onDrawChange?: (event: DrawChangeEvent) => void;
14
+ onDrawDelete?: (event: DrawDeleteEvent) => void;
15
+ }
16
+ export interface MapToolProviderProps {
17
+ children: ReactNode;
18
+ toolsConfig?: ToolsConfiguration;
19
+ afterDrawMode?: AfterDrawMode;
20
+ extraActions?: ExtraActionItem[];
21
+ onDrawEnd?: (event: DrawEndEvent) => void;
22
+ onDrawStart?: (tool: ToolType) => void;
23
+ onDrawChange?: (event: DrawChangeEvent) => void;
24
+ onDrawDelete?: (event: DrawDeleteEvent) => void;
25
+ }
26
+ export declare function MapToolProvider({ children, toolsConfig, afterDrawMode, extraActions, onDrawEnd, onDrawStart, onDrawChange, onDrawDelete, }: MapToolProviderProps): import("react").JSX.Element;
27
+ export declare function useMapTool(): MapToolContextValue;
28
+ /**
29
+ * Hook to manage exclusive tool activation.
30
+ * When this tool activates, any other active tool automatically deactivates.
31
+ */
32
+ export declare function useExclusiveTool(id: ToolType | string): [boolean, Dispatch<SetStateAction<boolean>>];