@naarni/design-system
Version:
Naarni React Native Design System for EV Fleet Apps
65 lines • 1.85 kB
TypeScript
import { ViewStyle } from 'react-native';
export type MapProvider = 'google';
export type MapStyle = 'default' | 'dark' | 'light' | 'blackAndWhite';
export interface Vehicle {
id?: string;
name?: string;
description?: string;
latitude: number;
longitude: number;
heading?: number;
color?: string;
speed?: number;
battery?: number;
status?: 'active' | 'inactive' | 'charging' | 'maintenance';
lastUpdate?: Date;
}
export interface Region {
latitude: number;
longitude: number;
latitudeDelta: number;
longitudeDelta: number;
}
export interface MapStyleConfig {
elementType?: string;
featureType?: string;
stylers: Array<{
color?: string;
visibility?: string;
[key: string]: any;
}>;
}
export interface MapProps {
vehicles?: Vehicle[];
initialRegion?: Region;
style?: ViewStyle;
mapStyle?: MapStyle;
customMapStyle?: MapStyleConfig[];
showVehicleInfo?: boolean;
autoFitToVehicles?: boolean;
onVehiclePress?: (vehicle: Vehicle) => void;
onMapPress?: (event: any) => void;
onRegionChange?: (region: Region) => void;
zoomEnabled?: boolean;
scrollEnabled?: boolean;
rotateEnabled?: boolean;
pitchEnabled?: boolean;
showsUserLocation?: boolean;
showsMyLocationButton?: boolean;
showsCompass?: boolean;
showsScale?: boolean;
loadingEnabled?: boolean;
loadingIndicatorColor?: string;
loadingBackgroundColor?: string;
testID?: string;
}
export interface MapRef {
fitToVehicles: () => void;
fitToVehicle: (vehicle: Vehicle) => void;
animateToRegion: (region: Region, duration?: number) => void;
fitToCoordinates: (coordinates: Array<{
latitude: number;
longitude: number;
}>, options?: any) => void;
}
//# sourceMappingURL=interfaces.d.ts.map