✨ MAJOR FEATURES: • Auto-zoom intelligence với smart bounds fitting • Enhanced 3D GPS markers với pulsing effects • Professional route display với 6-layer rendering • Status-based parking icons với availability indicators • Production-ready build optimizations 🗺️ AUTO-ZOOM FEATURES: • Smart bounds fitting cho GPS + selected parking • Adaptive padding (50px) cho visual balance • Max zoom control (level 16) để tránh quá gần • Dynamic centering khi không có selection 🎨 ENHANCED VISUALS: • 3D GPS marker với multi-layer pulse effects • Advanced parking icons với status colors • Selection highlighting với animation • Dimming system cho non-selected items 🛣️ ROUTE SYSTEM: • OpenRouteService API integration • Multi-layer route rendering (glow, shadow, main, animated) • Real-time distance & duration calculation • Visual route info trong popup 📱 PRODUCTION READY: • SSR safe với dynamic imports • Build errors resolved • Global deployment via Vercel • Optimized performance 🌍 DEPLOYMENT: • Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app • Bundle size: 22.8 kB optimized • Global CDN distribution • HTTPS enabled 💾 VERSION CONTROL: • MapView-v2.0.tsx backup created • MAPVIEW_VERSIONS.md documentation • Full version history tracking
104 lines
3.0 KiB
TypeScript
104 lines
3.0 KiB
TypeScript
export declare type AlignedPlacement = `${Side}-${Alignment}`;
|
|
|
|
export declare type Alignment = 'start' | 'end';
|
|
|
|
export declare const alignments: Alignment[];
|
|
|
|
export declare type Axis = 'x' | 'y';
|
|
|
|
export declare function clamp(start: number, value: number, end: number): number;
|
|
|
|
export declare type ClientRectObject = Prettify<Rect & SideObject>;
|
|
|
|
export declare type Coords = {
|
|
[key in Axis]: number;
|
|
};
|
|
|
|
export declare const createCoords: (v: number) => {
|
|
x: number;
|
|
y: number;
|
|
};
|
|
|
|
export declare type Dimensions = {
|
|
[key in Length]: number;
|
|
};
|
|
|
|
export declare interface ElementRects {
|
|
reference: Rect;
|
|
floating: Rect;
|
|
}
|
|
|
|
export declare function evaluate<T, P>(value: T | ((param: P) => T), param: P): T;
|
|
|
|
export declare function expandPaddingObject(padding: Partial<SideObject>): SideObject;
|
|
|
|
export declare const floor: (x: number) => number;
|
|
|
|
export declare function getAlignment(placement: Placement): Alignment | undefined;
|
|
|
|
export declare function getAlignmentAxis(placement: Placement): Axis;
|
|
|
|
export declare function getAlignmentSides(placement: Placement, rects: ElementRects, rtl?: boolean): [Side, Side];
|
|
|
|
export declare function getAxisLength(axis: Axis): Length;
|
|
|
|
export declare function getExpandedPlacements(placement: Placement): Array<Placement>;
|
|
|
|
export declare function getOppositeAlignmentPlacement<T extends string>(placement: T): T;
|
|
|
|
export declare function getOppositeAxis(axis: Axis): Axis;
|
|
|
|
export declare function getOppositeAxisPlacements(placement: Placement, flipAlignment: boolean, direction: 'none' | Alignment, rtl?: boolean): Placement[];
|
|
|
|
export declare function getOppositePlacement<T extends string>(placement: T): T;
|
|
|
|
export declare function getPaddingObject(padding: Padding): SideObject;
|
|
|
|
export declare function getSide(placement: Placement): Side;
|
|
|
|
export declare function getSideAxis(placement: Placement): Axis;
|
|
|
|
export declare type Length = 'width' | 'height';
|
|
|
|
export declare const max: (...values: number[]) => number;
|
|
|
|
export declare const min: (...values: number[]) => number;
|
|
|
|
export declare type Padding = number | Prettify<Partial<SideObject>>;
|
|
|
|
export declare type Placement = Prettify<Side | AlignedPlacement>;
|
|
|
|
export declare const placements: Placement[];
|
|
|
|
declare type Prettify<T> = {
|
|
[K in keyof T]: T[K];
|
|
} & {};
|
|
|
|
export declare type Rect = Prettify<Coords & Dimensions>;
|
|
|
|
export declare function rectToClientRect(rect: Rect): ClientRectObject;
|
|
|
|
export declare const round: (x: number) => number;
|
|
|
|
export declare type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
|
|
export declare type SideObject = {
|
|
[key in Side]: number;
|
|
};
|
|
|
|
export declare const sides: Side[];
|
|
|
|
export declare type Strategy = 'absolute' | 'fixed';
|
|
|
|
/**
|
|
* Custom positioning reference element.
|
|
* @see https://floating-ui.com/docs/virtual-elements
|
|
*/
|
|
export declare interface VirtualElement {
|
|
getBoundingClientRect(): ClientRectObject;
|
|
getClientRects?(): Array<ClientRectObject>;
|
|
contextElement?: any;
|
|
}
|
|
|
|
export { }
|