✨ 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
85 lines
3.5 KiB
JavaScript
85 lines
3.5 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
0 && (module.exports = {
|
|
DropClientPage: null,
|
|
ampFirstEntryNamesMap: null
|
|
});
|
|
function _export(target, all) {
|
|
for(var name in all)Object.defineProperty(target, name, {
|
|
enumerable: true,
|
|
get: all[name]
|
|
});
|
|
}
|
|
_export(exports, {
|
|
DropClientPage: function() {
|
|
return DropClientPage;
|
|
},
|
|
ampFirstEntryNamesMap: function() {
|
|
return ampFirstEntryNamesMap;
|
|
}
|
|
});
|
|
const _constants = require("../../../shared/lib/constants");
|
|
const ampFirstEntryNamesMap = new WeakMap();
|
|
const PLUGIN_NAME = "DropAmpFirstPagesPlugin";
|
|
class DropClientPage {
|
|
apply(compiler) {
|
|
compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation, { normalModuleFactory })=>{
|
|
// Recursively look up the issuer till it ends up at the root
|
|
function findEntryModule(mod) {
|
|
const queue = new Set([
|
|
mod
|
|
]);
|
|
for (const module1 of queue){
|
|
const incomingConnections = compilation.moduleGraph.getIncomingConnections(module1);
|
|
for (const incomingConnection of incomingConnections){
|
|
if (!incomingConnection.originModule) return module1;
|
|
queue.add(incomingConnection.originModule);
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
function handler(parser) {
|
|
function markAsAmpFirst() {
|
|
const entryModule = findEntryModule(parser.state.module);
|
|
if (!entryModule) {
|
|
return;
|
|
}
|
|
// @ts-ignore buildInfo exists on Module
|
|
entryModule.buildInfo.NEXT_ampFirst = true;
|
|
}
|
|
parser.hooks.preDeclarator.tap(PLUGIN_NAME, (declarator)=>{
|
|
var _declarator_id;
|
|
if ((declarator == null ? void 0 : (_declarator_id = declarator.id) == null ? void 0 : _declarator_id.name) === _constants.STRING_LITERAL_DROP_BUNDLE) {
|
|
markAsAmpFirst();
|
|
}
|
|
});
|
|
}
|
|
normalModuleFactory.hooks.parser.for("javascript/auto").tap(PLUGIN_NAME, handler);
|
|
normalModuleFactory.hooks.parser.for("javascript/esm").tap(PLUGIN_NAME, handler);
|
|
normalModuleFactory.hooks.parser.for("javascript/dynamic").tap(PLUGIN_NAME, handler);
|
|
if (!ampFirstEntryNamesMap.has(compilation)) {
|
|
ampFirstEntryNamesMap.set(compilation, []);
|
|
}
|
|
const ampFirstEntryNamesItem = ampFirstEntryNamesMap.get(compilation);
|
|
compilation.hooks.seal.tap(PLUGIN_NAME, ()=>{
|
|
for (const [name, entryData] of compilation.entries){
|
|
for (const dependency of entryData.dependencies){
|
|
var _module_buildInfo;
|
|
const module1 = compilation.moduleGraph.getModule(dependency);
|
|
if (module1 == null ? void 0 : (_module_buildInfo = module1.buildInfo) == null ? void 0 : _module_buildInfo.NEXT_ampFirst) {
|
|
ampFirstEntryNamesItem.push(name);
|
|
compilation.entries.delete(name);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
constructor(){
|
|
this.ampPages = new Set();
|
|
}
|
|
}
|
|
|
|
//# sourceMappingURL=next-drop-client-page-plugin.js.map
|