✨ 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
50 lines
1.9 KiB
TypeScript
50 lines
1.9 KiB
TypeScript
import type { StateCreator, StoreApi, StoreMutatorIdentifier } from '../vanilla';
|
|
type Config = Parameters<(Window extends {
|
|
__REDUX_DEVTOOLS_EXTENSION__?: infer T;
|
|
} ? T : {
|
|
connect: (param: any) => any;
|
|
})['connect']>[0];
|
|
declare module '../vanilla' {
|
|
interface StoreMutators<S, A> {
|
|
'zustand/devtools': WithDevtools<S>;
|
|
}
|
|
}
|
|
type Cast<T, U> = T extends U ? T : U;
|
|
type Write<T, U> = Omit<T, keyof U> & U;
|
|
type TakeTwo<T> = T extends {
|
|
length: 0;
|
|
} ? [undefined, undefined] : T extends {
|
|
length: 1;
|
|
} ? [...a0: Cast<T, unknown[]>, a1: undefined] : T extends {
|
|
length: 0 | 1;
|
|
} ? [...a0: Cast<T, unknown[]>, a1: undefined] : T extends {
|
|
length: 2;
|
|
} ? T : T extends {
|
|
length: 1 | 2;
|
|
} ? T : T extends {
|
|
length: 0 | 1 | 2;
|
|
} ? T : T extends [infer A0, infer A1, ...unknown[]] ? [A0, A1] : T extends [infer A0, (infer A1)?, ...unknown[]] ? [A0, A1?] : T extends [(infer A0)?, (infer A1)?, ...unknown[]] ? [A0?, A1?] : never;
|
|
type WithDevtools<S> = Write<S, StoreDevtools<S>>;
|
|
type StoreDevtools<S> = S extends {
|
|
setState: (...a: infer Sa) => infer Sr;
|
|
} ? {
|
|
setState<A extends string | {
|
|
type: string;
|
|
}>(...a: [...a: TakeTwo<Sa>, action?: A]): Sr;
|
|
} : never;
|
|
export interface DevtoolsOptions extends Config {
|
|
name?: string;
|
|
enabled?: boolean;
|
|
anonymousActionType?: string;
|
|
store?: string;
|
|
}
|
|
type Devtools = <T, Mps extends [StoreMutatorIdentifier, unknown][] = [], Mcs extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [...Mps, ['zustand/devtools', never]], Mcs>, devtoolsOptions?: DevtoolsOptions) => StateCreator<T, Mps, [['zustand/devtools', never], ...Mcs]>;
|
|
declare module '../vanilla' {
|
|
interface StoreMutators<S, A> {
|
|
'zustand/devtools': WithDevtools<S>;
|
|
}
|
|
}
|
|
export type NamedSet<T> = WithDevtools<StoreApi<T>>['setState'];
|
|
export declare const devtools: Devtools;
|
|
export {};
|