✨ 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
62 lines
2.8 KiB
TypeScript
62 lines
2.8 KiB
TypeScript
/// <reference types="react" />
|
|
import type { Options as RenderToReadableStreamOptions, ResumeOptions } from 'react-dom/server.edge';
|
|
import type { Options as PrerenderOptions } from 'react-dom/static.edge';
|
|
type RenderResult = {
|
|
stream: ReadableStream<Uint8Array>;
|
|
postponed?: object | null;
|
|
resumed?: boolean;
|
|
};
|
|
export interface Renderer {
|
|
render(children: JSX.Element): Promise<RenderResult>;
|
|
}
|
|
export declare class ServerRenderer implements Renderer {
|
|
private readonly options;
|
|
private readonly renderToReadableStream;
|
|
constructor(options: RenderToReadableStreamOptions);
|
|
render(children: JSX.Element): Promise<RenderResult>;
|
|
}
|
|
export declare class VoidRenderer implements Renderer {
|
|
render(_children: JSX.Element): Promise<RenderResult>;
|
|
}
|
|
/**
|
|
* This represents all the possible configuration options for each of the
|
|
* available renderers. We pick the specific options we need for each renderer
|
|
* to help the `createStaticRenderer` function. If more options are added to
|
|
* this type they should be added to the `createStaticRenderer` function as
|
|
* well.
|
|
*/
|
|
type StreamOptions = Pick<ResumeOptions & RenderToReadableStreamOptions & PrerenderOptions, 'onError' | 'onPostpone' | 'onHeaders' | 'maxHeadersLength' | 'nonce' | 'bootstrapScripts' | 'formState' | 'signal'>;
|
|
export declare const DYNAMIC_DATA: 1;
|
|
export declare const DYNAMIC_HTML: 2;
|
|
type DynamicDataPostponedState = typeof DYNAMIC_DATA;
|
|
type DynamicHTMLPostponedState = [typeof DYNAMIC_HTML, object];
|
|
export type PostponedState = DynamicDataPostponedState | DynamicHTMLPostponedState;
|
|
export declare function getDynamicHTMLPostponedState(data: object): DynamicHTMLPostponedState;
|
|
export declare function getDynamicDataPostponedState(): DynamicDataPostponedState;
|
|
type Options = {
|
|
/**
|
|
* Whether or not PPR is enabled. This is used to determine which renderer to
|
|
* use.
|
|
*/
|
|
ppr: boolean;
|
|
/**
|
|
* Whether or not this is a static generation render. This is used to
|
|
* determine which renderer to use.
|
|
*/
|
|
isStaticGeneration: boolean;
|
|
/**
|
|
* The postponed state for the render. This is only used when resuming a
|
|
* prerender that has postponed.
|
|
*/
|
|
postponed: null | PostponedState;
|
|
/**
|
|
* The options for any of the renderers. This is a union of all the possible
|
|
* options for each renderer. If additional configuration options are required
|
|
* for a renderer, they should be added to the `StreamOptions` type and then
|
|
* added via the `createStaticRenderer` function.
|
|
*/
|
|
streamOptions: StreamOptions;
|
|
};
|
|
export declare function createStaticRenderer({ ppr, isStaticGeneration, postponed, streamOptions: { signal, onError, onPostpone, onHeaders, maxHeadersLength, nonce, bootstrapScripts, formState, }, }: Options): Renderer;
|
|
export {};
|