✨ 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
58 lines
3.2 KiB
JavaScript
58 lines
3.2 KiB
JavaScript
import { RequestCookiesAdapter } from "../../server/web/spec-extension/adapters/request-cookies";
|
|
import { HeadersAdapter } from "../../server/web/spec-extension/adapters/headers";
|
|
import { RequestCookies } from "../../server/web/spec-extension/cookies";
|
|
import { actionAsyncStorage } from "./action-async-storage.external";
|
|
import { DraftMode } from "./draft-mode";
|
|
import { trackDynamicDataAccessed } from "../../server/app-render/dynamic-rendering";
|
|
import { staticGenerationAsyncStorage } from "./static-generation-async-storage.external";
|
|
import { getExpectedRequestStore } from "./request-async-storage.external";
|
|
/**
|
|
* This function allows you to read the HTTP incoming request headers in
|
|
* [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),
|
|
* [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations),
|
|
* [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers) and
|
|
* [Middleware](https://nextjs.org/docs/app/building-your-application/routing/middleware).
|
|
*
|
|
* Read more: [Next.js Docs: `headers`](https://nextjs.org/docs/app/api-reference/functions/headers)
|
|
*/ export function headers() {
|
|
const callingExpression = "headers";
|
|
const staticGenerationStore = staticGenerationAsyncStorage.getStore();
|
|
if (staticGenerationStore) {
|
|
if (staticGenerationStore.forceStatic) {
|
|
// When we are forcing static we don't mark this as a Dynamic read and we return an empty headers object
|
|
return HeadersAdapter.seal(new Headers({}));
|
|
} else {
|
|
// We will return a real headers object below so we mark this call as reading from a dynamic data source
|
|
trackDynamicDataAccessed(staticGenerationStore, callingExpression);
|
|
}
|
|
}
|
|
return getExpectedRequestStore(callingExpression).headers;
|
|
}
|
|
export function cookies() {
|
|
const callingExpression = "cookies";
|
|
const staticGenerationStore = staticGenerationAsyncStorage.getStore();
|
|
if (staticGenerationStore) {
|
|
if (staticGenerationStore.forceStatic) {
|
|
// When we are forcing static we don't mark this as a Dynamic read and we return an empty cookies object
|
|
return RequestCookiesAdapter.seal(new RequestCookies(new Headers({})));
|
|
} else {
|
|
// We will return a real headers object below so we mark this call as reading from a dynamic data source
|
|
trackDynamicDataAccessed(staticGenerationStore, callingExpression);
|
|
}
|
|
}
|
|
const requestStore = getExpectedRequestStore(callingExpression);
|
|
const asyncActionStore = actionAsyncStorage.getStore();
|
|
if ((asyncActionStore == null ? void 0 : asyncActionStore.isAction) || (asyncActionStore == null ? void 0 : asyncActionStore.isAppRoute)) {
|
|
// We can't conditionally return different types here based on the context.
|
|
// To avoid confusion, we always return the readonly type here.
|
|
return requestStore.mutableCookies;
|
|
}
|
|
return requestStore.cookies;
|
|
}
|
|
export function draftMode() {
|
|
const callingExpression = "draftMode";
|
|
const requestStore = getExpectedRequestStore(callingExpression);
|
|
return new DraftMode(requestStore.draftMode);
|
|
}
|
|
|
|
//# sourceMappingURL=headers.js.map
|