✨ 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
68 lines
1.7 KiB
JavaScript
68 lines
1.7 KiB
JavaScript
'use strict'
|
|
|
|
let Document = require('./document')
|
|
let LazyResult = require('./lazy-result')
|
|
let NoWorkResult = require('./no-work-result')
|
|
let Root = require('./root')
|
|
|
|
class Processor {
|
|
constructor(plugins = []) {
|
|
this.version = '8.5.6'
|
|
this.plugins = this.normalize(plugins)
|
|
}
|
|
|
|
normalize(plugins) {
|
|
let normalized = []
|
|
for (let i of plugins) {
|
|
if (i.postcss === true) {
|
|
i = i()
|
|
} else if (i.postcss) {
|
|
i = i.postcss
|
|
}
|
|
|
|
if (typeof i === 'object' && Array.isArray(i.plugins)) {
|
|
normalized = normalized.concat(i.plugins)
|
|
} else if (typeof i === 'object' && i.postcssPlugin) {
|
|
normalized.push(i)
|
|
} else if (typeof i === 'function') {
|
|
normalized.push(i)
|
|
} else if (typeof i === 'object' && (i.parse || i.stringify)) {
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
throw new Error(
|
|
'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +
|
|
'one of the syntax/parser/stringifier options as outlined ' +
|
|
'in your PostCSS runner documentation.'
|
|
)
|
|
}
|
|
} else {
|
|
throw new Error(i + ' is not a PostCSS plugin')
|
|
}
|
|
}
|
|
return normalized
|
|
}
|
|
|
|
process(css, opts = {}) {
|
|
if (
|
|
!this.plugins.length &&
|
|
!opts.parser &&
|
|
!opts.stringifier &&
|
|
!opts.syntax
|
|
) {
|
|
return new NoWorkResult(this, css, opts)
|
|
} else {
|
|
return new LazyResult(this, css, opts)
|
|
}
|
|
}
|
|
|
|
use(plugin) {
|
|
this.plugins = this.plugins.concat(this.normalize([plugin]))
|
|
return this
|
|
}
|
|
}
|
|
|
|
module.exports = Processor
|
|
Processor.default = Processor
|
|
|
|
Root.registerProcessor(Processor)
|
|
Document.registerProcessor(Processor)
|