✨ 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
2.7 KiB
JavaScript
60 lines
2.7 KiB
JavaScript
"use strict";
|
|
var _definerule = require("../utils/define-rule");
|
|
var url = "https://nextjs.org/docs/messages/inline-script-id";
|
|
module.exports = (0, _definerule.defineRule)({
|
|
meta: {
|
|
docs: {
|
|
description: "Enforce `id` attribute on `next/script` components with inline content.",
|
|
recommended: true,
|
|
url: url
|
|
},
|
|
type: "problem",
|
|
schema: []
|
|
},
|
|
create: function create(context) {
|
|
var nextScriptImportName = null;
|
|
return {
|
|
ImportDeclaration: function ImportDeclaration(node) {
|
|
if (node.source.value === "next/script") {
|
|
nextScriptImportName = node.specifiers[0].local.name;
|
|
}
|
|
},
|
|
JSXElement: function JSXElement(node) {
|
|
if (nextScriptImportName == null) return;
|
|
if (node.openingElement && node.openingElement.name && node.openingElement.name.name !== nextScriptImportName) {
|
|
return;
|
|
}
|
|
var attributeNames = new Set();
|
|
var hasNonCheckableSpreadAttribute = false;
|
|
node.openingElement.attributes.forEach(function(attribute) {
|
|
// Early return if we already have a non-checkable spread attribute, for better performance
|
|
if (hasNonCheckableSpreadAttribute) return;
|
|
if (attribute.type === "JSXAttribute") {
|
|
attributeNames.add(attribute.name.name);
|
|
} else if (attribute.type === "JSXSpreadAttribute") {
|
|
if (attribute.argument && attribute.argument.properties) {
|
|
attribute.argument.properties.forEach(function(property) {
|
|
attributeNames.add(property.key.name);
|
|
});
|
|
} else {
|
|
// JSXSpreadAttribute without properties is not checkable
|
|
hasNonCheckableSpreadAttribute = true;
|
|
}
|
|
}
|
|
});
|
|
// https://github.com/vercel/next.js/issues/34030
|
|
// If there is a non-checkable spread attribute, we simply ignore them
|
|
if (hasNonCheckableSpreadAttribute) return;
|
|
if (node.children.length > 0 || attributeNames.has("dangerouslySetInnerHTML")) {
|
|
if (!attributeNames.has("id")) {
|
|
context.report({
|
|
node: node,
|
|
message: "`next/script` components with inline content must specify an `id` attribute. See: ".concat(url)
|
|
});
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
});
|