Files
Laca-City/frontend/node_modules/autoprefixer/lib/value.js
PhongPham c65cc97a33 🎯 MapView v2.0 - Global Deployment Ready
 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
2025-07-20 19:52:16 +07:00

126 lines
2.5 KiB
JavaScript

let OldValue = require('./old-value')
let Prefixer = require('./prefixer')
let utils = require('./utils')
let vendor = require('./vendor')
class Value extends Prefixer {
/**
* Clone decl for each prefixed values
*/
static save(prefixes, decl) {
let prop = decl.prop
let result = []
for (let prefix in decl._autoprefixerValues) {
let value = decl._autoprefixerValues[prefix]
if (value === decl.value) {
continue
}
let item
let propPrefix = vendor.prefix(prop)
if (propPrefix === '-pie-') {
continue
}
if (propPrefix === prefix) {
item = decl.value = value
result.push(item)
continue
}
let prefixed = prefixes.prefixed(prop, prefix)
let rule = decl.parent
if (!rule.every(i => i.prop !== prefixed)) {
result.push(item)
continue
}
let trimmed = value.replace(/\s+/, ' ')
let already = rule.some(
i => i.prop === decl.prop && i.value.replace(/\s+/, ' ') === trimmed
)
if (already) {
result.push(item)
continue
}
let cloned = this.clone(decl, { value })
item = decl.parent.insertBefore(decl, cloned)
result.push(item)
}
return result
}
/**
* Save values with next prefixed token
*/
add(decl, prefix) {
if (!decl._autoprefixerValues) {
decl._autoprefixerValues = {}
}
let value = decl._autoprefixerValues[prefix] || this.value(decl)
let before
do {
before = value
value = this.replace(value, prefix)
if (value === false) return
} while (value !== before)
decl._autoprefixerValues[prefix] = value
}
/**
* Is declaration need to be prefixed
*/
check(decl) {
let value = decl.value
if (!value.includes(this.name)) {
return false
}
return !!value.match(this.regexp())
}
/**
* Return function to fast find prefixed value
*/
old(prefix) {
return new OldValue(this.name, prefix + this.name)
}
/**
* Lazy regexp loading
*/
regexp() {
return this.regexpCache || (this.regexpCache = utils.regexp(this.name))
}
/**
* Add prefix to values in string
*/
replace(string, prefix) {
return string.replace(this.regexp(), `$1${prefix}$2`)
}
/**
* Get value with comments if it was not changed
*/
value(decl) {
if (decl.raws.value && decl.raws.value.value === decl.value) {
return decl.raws.value.raw
} else {
return decl.value
}
}
}
module.exports = Value