🎯 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
This commit is contained in:
2025-07-20 19:52:16 +07:00
parent 3203463a6a
commit c65cc97a33
64624 changed files with 7199453 additions and 6462 deletions

View File

@@ -0,0 +1,3 @@
import type { Formatter } from './formatter';
declare function createBasicFormatter(): Formatter;
export { createBasicFormatter };

View File

@@ -0,0 +1,13 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createBasicFormatter = void 0;
const chalk_1 = __importDefault(require("chalk"));
function createBasicFormatter() {
return function basicFormatter(issue) {
return chalk_1.default.grey(issue.code + ': ') + issue.message;
};
}
exports.createBasicFormatter = createBasicFormatter;

View File

@@ -0,0 +1,4 @@
import type { Formatter } from './formatter';
import { BabelCodeFrameOptions } from './types/babel__code-frame';
declare function createCodeFrameFormatter(options?: BabelCodeFrameOptions): Formatter;
export { createCodeFrameFormatter, BabelCodeFrameOptions };

View File

@@ -0,0 +1,29 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createCodeFrameFormatter = void 0;
const os_1 = __importDefault(require("os"));
const code_frame_1 = require("@babel/code-frame");
const fs_extra_1 = __importDefault(require("fs-extra"));
const basic_formatter_1 = require("./basic-formatter");
function createCodeFrameFormatter(options) {
const basicFormatter = (0, basic_formatter_1.createBasicFormatter)();
return function codeFrameFormatter(issue) {
const source = issue.file && fs_extra_1.default.existsSync(issue.file) && fs_extra_1.default.readFileSync(issue.file, 'utf-8');
let frame = '';
if (source && issue.location) {
frame = (0, code_frame_1.codeFrameColumns)(source, issue.location, Object.assign({ highlightCode: true }, (options || {})))
.split('\n')
.map((line) => ' ' + line)
.join(os_1.default.EOL);
}
const lines = [basicFormatter(issue)];
if (frame) {
lines.push(frame);
}
return lines.join(os_1.default.EOL);
};
}
exports.createCodeFrameFormatter = createCodeFrameFormatter;

View File

@@ -0,0 +1,8 @@
import type { Formatter, FormatterPathType } from './formatter';
import type { FormatterOptions } from './formatter-options';
declare type FormatterConfig = {
format: Formatter;
pathType: FormatterPathType;
};
declare function createFormatterConfig(options: FormatterOptions | undefined): FormatterConfig;
export { FormatterConfig, createFormatterConfig };

View File

@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createFormatterConfig = void 0;
const basic_formatter_1 = require("./basic-formatter");
const code_frame_formatter_1 = require("./code-frame-formatter");
function createFormatterConfig(options) {
if (typeof options === 'function') {
return {
format: options,
pathType: 'relative',
};
}
const type = options
? typeof options === 'object'
? options.type || 'codeframe'
: options
: 'codeframe';
const pathType = options && typeof options === 'object' ? options.pathType || 'relative' : 'relative';
if (!type || type === 'basic') {
return {
format: (0, basic_formatter_1.createBasicFormatter)(),
pathType,
};
}
if (type === 'codeframe') {
const config = options && typeof options === 'object'
? options.options || {}
: {};
return {
format: (0, code_frame_formatter_1.createCodeFrameFormatter)(config),
pathType,
};
}
throw new Error(`Unknown "${type}" formatter. Available types are: "basic", "codeframe" or a custom function.`);
}
exports.createFormatterConfig = createFormatterConfig;

View File

@@ -0,0 +1,14 @@
import type { Formatter, FormatterPathType } from './formatter';
import type { BabelCodeFrameOptions } from './types/babel__code-frame';
declare type FormatterType = 'basic' | 'codeframe';
declare type BasicFormatterOptions = {
type: 'basic';
pathType?: FormatterPathType;
};
declare type CodeframeFormatterOptions = {
type: 'codeframe';
pathType?: FormatterPathType;
options?: BabelCodeFrameOptions;
};
declare type FormatterOptions = undefined | FormatterType | BasicFormatterOptions | CodeframeFormatterOptions | Formatter;
export { FormatterOptions, FormatterType, BasicFormatterOptions, CodeframeFormatterOptions };

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,4 @@
import type { Issue } from '../issue';
declare type Formatter = (issue: Issue) => string;
declare type FormatterPathType = 'relative' | 'absolute';
export { Formatter, FormatterPathType };

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,6 @@
export * from './formatter';
export * from './basic-formatter';
export * from './code-frame-formatter';
export * from './webpack-formatter';
export * from './formatter-options';
export * from './formatter-config';

View File

@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./formatter"), exports);
__exportStar(require("./basic-formatter"), exports);
__exportStar(require("./code-frame-formatter"), exports);
__exportStar(require("./webpack-formatter"), exports);
__exportStar(require("./formatter-options"), exports);
__exportStar(require("./formatter-config"), exports);

View File

@@ -0,0 +1,3 @@
import type { Stats } from 'webpack';
import type { Issue } from '../issue';
export declare function statsFormatter(issues: Issue[], stats: Stats): string;

View File

@@ -0,0 +1,28 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.statsFormatter = void 0;
const chalk_1 = __importDefault(require("chalk"));
// mimics webpack's stats summary formatter
function statsFormatter(issues, stats) {
const errorsNumber = issues.filter((issue) => issue.severity === 'error').length;
const warningsNumber = issues.filter((issue) => issue.severity === 'warning').length;
const errorsFormatted = errorsNumber
? chalk_1.default.red.bold(`${errorsNumber} ${errorsNumber === 1 ? 'error' : 'errors'}`)
: '';
const warningsFormatted = warningsNumber
? chalk_1.default.yellow.bold(`${warningsNumber} ${warningsNumber === 1 ? 'warning' : 'warnings'}`)
: '';
const timeFormatted = Math.round(Date.now() - stats.startTime);
return [
'Found ',
errorsFormatted,
errorsFormatted && warningsFormatted ? ' and ' : '',
warningsFormatted,
` in ${timeFormatted} ms`,
'.',
].join('');
}
exports.statsFormatter = statsFormatter;

View File

@@ -0,0 +1,21 @@
export interface BabelCodeFrameOptions {
/** Syntax highlight the code as JavaScript for terminals. default: false */
highlightCode?: boolean;
/** The number of lines to show above the error. default: 2 */
linesAbove?: number;
/** The number of lines to show below the error. default: 3 */
linesBelow?: number;
/**
* Forcibly syntax highlight the code as JavaScript (for non-terminals);
* overrides highlightCode.
* default: false
*/
forceColor?: boolean;
/**
* Pass in a string to be displayed inline (if possible) next to the
* highlighted location in the code. If it can't be positioned inline,
* it will be placed above the code frame.
* default: nothing
*/
message?: string;
}

View File

@@ -0,0 +1,7 @@
"use strict";
// Base on the type definitions for @babel/code-frame 7.0
// Project: https://github.com/babel/babel/tree/main/packages/babel-code-frame, https://babeljs.io
// Definitions by: Mohsen Azimi <https://github.com/mohsen1>
// Forbes Lindesay <https://github.com/ForbesLindesay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,3 @@
import type { Formatter, FormatterPathType } from './formatter';
declare function createWebpackFormatter(formatter: Formatter, pathType: FormatterPathType): Formatter;
export { createWebpackFormatter };

View File

@@ -0,0 +1,32 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createWebpackFormatter = void 0;
const os_1 = __importDefault(require("os"));
const path_1 = __importDefault(require("path"));
const chalk_1 = __importDefault(require("chalk"));
const issue_1 = require("../issue");
const forward_slash_1 = require("../utils/path/forward-slash");
const relative_to_context_1 = require("../utils/path/relative-to-context");
function createWebpackFormatter(formatter, pathType) {
// mimics webpack error formatter
return function webpackFormatter(issue) {
const color = issue.severity === 'warning' ? chalk_1.default.yellow.bold : chalk_1.default.red.bold;
const severity = issue.severity.toUpperCase();
if (issue.file) {
let location = chalk_1.default.bold(pathType === 'absolute'
? (0, forward_slash_1.forwardSlash)(path_1.default.resolve(issue.file))
: (0, relative_to_context_1.relativeToContext)(issue.file, process.cwd()));
if (issue.location) {
location += `:${chalk_1.default.green.bold((0, issue_1.formatIssueLocation)(issue.location))}`;
}
return [`${color(severity)} in ${location}`, formatter(issue), ''].join(os_1.default.EOL);
}
else {
return [`${color(severity)} in ` + formatter(issue), ''].join(os_1.default.EOL);
}
};
}
exports.createWebpackFormatter = createWebpackFormatter;