✨ 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
60 lines
1.9 KiB
JavaScript
60 lines
1.9 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const fsScandir = require("@nodelib/fs.scandir");
|
|
const common = require("./common");
|
|
const reader_1 = require("./reader");
|
|
class SyncReader extends reader_1.default {
|
|
constructor() {
|
|
super(...arguments);
|
|
this._scandir = fsScandir.scandirSync;
|
|
this._storage = [];
|
|
this._queue = new Set();
|
|
}
|
|
read() {
|
|
this._pushToQueue(this._root, this._settings.basePath);
|
|
this._handleQueue();
|
|
return this._storage;
|
|
}
|
|
_pushToQueue(directory, base) {
|
|
this._queue.add({ directory, base });
|
|
}
|
|
_handleQueue() {
|
|
for (const item of this._queue.values()) {
|
|
this._handleDirectory(item.directory, item.base);
|
|
}
|
|
}
|
|
_handleDirectory(directory, base) {
|
|
try {
|
|
const entries = this._scandir(directory, this._settings.fsScandirSettings);
|
|
for (const entry of entries) {
|
|
this._handleEntry(entry, base);
|
|
}
|
|
}
|
|
catch (error) {
|
|
this._handleError(error);
|
|
}
|
|
}
|
|
_handleError(error) {
|
|
if (!common.isFatalError(this._settings, error)) {
|
|
return;
|
|
}
|
|
throw error;
|
|
}
|
|
_handleEntry(entry, base) {
|
|
const fullpath = entry.path;
|
|
if (base !== undefined) {
|
|
entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
|
|
}
|
|
if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
|
|
this._pushToStorage(entry);
|
|
}
|
|
if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
|
|
this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);
|
|
}
|
|
}
|
|
_pushToStorage(entry) {
|
|
this._storage.push(entry);
|
|
}
|
|
}
|
|
exports.default = SyncReader;
|