✨ 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
93 lines
2.1 KiB
JavaScript
93 lines
2.1 KiB
JavaScript
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _types = require('../parser/tokenizer/types');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Determine information about this named import or named export specifier.
|
|
*
|
|
* This syntax is the `a` from statements like these:
|
|
* import {A} from "./foo";
|
|
* export {A};
|
|
* export {A} from "./foo";
|
|
*
|
|
* As it turns out, we can exactly characterize the syntax meaning by simply
|
|
* counting the number of tokens, which can be from 1 to 4:
|
|
* {A}
|
|
* {type A}
|
|
* {A as B}
|
|
* {type A as B}
|
|
*
|
|
* In the type case, we never actually need the names in practice, so don't get
|
|
* them.
|
|
*
|
|
* TODO: There's some redundancy with the type detection here and the isType
|
|
* flag that's already present on tokens in TS mode. This function could
|
|
* potentially be simplified and/or pushed to the call sites to avoid the object
|
|
* allocation.
|
|
*/
|
|
function getImportExportSpecifierInfo(
|
|
tokens,
|
|
index = tokens.currentIndex(),
|
|
) {
|
|
let endIndex = index + 1;
|
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
// import {A}
|
|
const name = tokens.identifierNameAtIndex(index);
|
|
return {
|
|
isType: false,
|
|
leftName: name,
|
|
rightName: name,
|
|
endIndex,
|
|
};
|
|
}
|
|
endIndex++;
|
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
// import {type A}
|
|
return {
|
|
isType: true,
|
|
leftName: null,
|
|
rightName: null,
|
|
endIndex,
|
|
};
|
|
}
|
|
endIndex++;
|
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
// import {A as B}
|
|
return {
|
|
isType: false,
|
|
leftName: tokens.identifierNameAtIndex(index),
|
|
rightName: tokens.identifierNameAtIndex(index + 2),
|
|
endIndex,
|
|
};
|
|
}
|
|
endIndex++;
|
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
// import {type A as B}
|
|
return {
|
|
isType: true,
|
|
leftName: null,
|
|
rightName: null,
|
|
endIndex,
|
|
};
|
|
}
|
|
throw new Error(`Unexpected import/export specifier at ${index}`);
|
|
} exports.default = getImportExportSpecifierInfo;
|
|
|
|
function isSpecifierEnd(tokens, index) {
|
|
const token = tokens.tokens[index];
|
|
return token.type === _types.TokenType.braceR || token.type === _types.TokenType.comma;
|
|
}
|