🎯 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,12 @@
import { AbstractRunner } from '../runners';
import { Schematic } from './nest.collection';
import { SchematicOption } from './schematic.option';
export declare abstract class AbstractCollection {
protected collection: string;
protected runner: AbstractRunner;
constructor(collection: string, runner: AbstractRunner);
execute(name: string, options: SchematicOption[], extraFlags?: string): Promise<void>;
abstract getSchematics(): Schematic[];
private buildCommandLine;
private buildOptions;
}

View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AbstractCollection = void 0;
class AbstractCollection {
constructor(collection, runner) {
this.collection = collection;
this.runner = runner;
}
async execute(name, options, extraFlags) {
let command = this.buildCommandLine(name, options);
command = extraFlags ? command.concat(` ${extraFlags}`) : command;
await this.runner.run(command);
}
buildCommandLine(name, options) {
return `${this.collection}:${name}${this.buildOptions(options)}`;
}
buildOptions(options) {
return options.reduce((line, option) => {
return line.concat(` ${option.toCommandString()}`);
}, '');
}
}
exports.AbstractCollection = AbstractCollection;

View File

@@ -0,0 +1,3 @@
export declare enum Collection {
NESTJS = "@nestjs/schematics"
}

View File

@@ -0,0 +1,5 @@
import { AbstractCollection } from './abstract.collection';
import { Collection } from './collection';
export declare class CollectionFactory {
static create(collection: Collection | string): AbstractCollection;
}

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CollectionFactory = void 0;
const runners_1 = require("../runners");
const collection_1 = require("./collection");
const custom_collection_1 = require("./custom.collection");
const nest_collection_1 = require("./nest.collection");
class CollectionFactory {
static create(collection) {
const schematicRunner = runners_1.RunnerFactory.create(runners_1.Runner.SCHEMATIC);
if (collection === collection_1.Collection.NESTJS) {
return new nest_collection_1.NestCollection(schematicRunner);
}
else {
return new custom_collection_1.CustomCollection(collection, schematicRunner);
}
}
}
exports.CollectionFactory = CollectionFactory;

View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Collection = void 0;
var Collection;
(function (Collection) {
Collection["NESTJS"] = "@nestjs/schematics";
})(Collection || (exports.Collection = Collection = {}));

View File

@@ -0,0 +1,10 @@
import { AbstractCollection } from './abstract.collection';
import { Schematic } from './nest.collection';
export interface CollectionSchematic {
schema: string;
description: string;
aliases: string[];
}
export declare class CustomCollection extends AbstractCollection {
getSchematics(): Schematic[];
}

View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomCollection = void 0;
const fs_1 = require("fs");
const path_1 = require("path");
const abstract_collection_1 = require("./abstract.collection");
class CustomCollection extends abstract_collection_1.AbstractCollection {
getSchematics() {
const collectionPackagePath = (0, path_1.dirname)(require.resolve(this.collection));
const collectionPath = (0, path_1.join)(collectionPackagePath, 'collection.json');
const collection = JSON.parse((0, fs_1.readFileSync)(collectionPath, 'utf8'));
const schematics = Object.entries(collection.schematics).map(([name, value]) => {
const schematic = value;
const description = schematic.description;
const alias = schematic?.aliases?.length ? schematic.aliases[0] : '';
return { name, description, alias };
});
return schematics;
}
}
exports.CustomCollection = CustomCollection;

View File

@@ -0,0 +1,4 @@
export * from './collection';
export * from './collection.factory';
export * from './schematic.option';
export * from './abstract.collection';

View File

@@ -0,0 +1,20 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (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("./collection"), exports);
__exportStar(require("./collection.factory"), exports);
__exportStar(require("./schematic.option"), exports);
__exportStar(require("./abstract.collection"), exports);

View File

@@ -0,0 +1,15 @@
import { AbstractRunner } from '../runners';
import { AbstractCollection } from './abstract.collection';
import { SchematicOption } from './schematic.option';
export interface Schematic {
name: string;
alias: string;
description: string;
}
export declare class NestCollection extends AbstractCollection {
private static schematics;
constructor(runner: AbstractRunner);
execute(name: string, options: SchematicOption[]): Promise<void>;
getSchematics(): Schematic[];
private validate;
}

View File

@@ -0,0 +1,126 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NestCollection = void 0;
const abstract_collection_1 = require("./abstract.collection");
class NestCollection extends abstract_collection_1.AbstractCollection {
constructor(runner) {
super('@nestjs/schematics', runner);
}
async execute(name, options) {
const schematic = this.validate(name);
await super.execute(schematic, options);
}
getSchematics() {
return NestCollection.schematics.filter((item) => item.name !== 'angular-app');
}
validate(name) {
const schematic = NestCollection.schematics.find((s) => s.name === name || s.alias === name);
if (schematic === undefined || schematic === null) {
throw new Error(`Invalid schematic "${name}". Please, ensure that "${name}" exists in this collection.`);
}
return schematic.name;
}
}
exports.NestCollection = NestCollection;
NestCollection.schematics = [
{
name: 'application',
alias: 'application',
description: 'Generate a new application workspace',
},
{
name: 'angular-app',
alias: 'ng-app',
description: '',
},
{
name: 'class',
alias: 'cl',
description: 'Generate a new class',
},
{
name: 'configuration',
alias: 'config',
description: 'Generate a CLI configuration file',
},
{
name: 'controller',
alias: 'co',
description: 'Generate a controller declaration',
},
{
name: 'decorator',
alias: 'd',
description: 'Generate a custom decorator',
},
{
name: 'filter',
alias: 'f',
description: 'Generate a filter declaration',
},
{
name: 'gateway',
alias: 'ga',
description: 'Generate a gateway declaration',
},
{
name: 'guard',
alias: 'gu',
description: 'Generate a guard declaration',
},
{
name: 'interceptor',
alias: 'itc',
description: 'Generate an interceptor declaration',
},
{
name: 'interface',
alias: 'itf',
description: 'Generate an interface',
},
{
name: 'library',
alias: 'lib',
description: 'Generate a new library within a monorepo',
},
{
name: 'middleware',
alias: 'mi',
description: 'Generate a middleware declaration',
},
{
name: 'module',
alias: 'mo',
description: 'Generate a module declaration',
},
{
name: 'pipe',
alias: 'pi',
description: 'Generate a pipe declaration',
},
{
name: 'provider',
alias: 'pr',
description: 'Generate a provider declaration',
},
{
name: 'resolver',
alias: 'r',
description: 'Generate a GraphQL resolver declaration',
},
{
name: 'resource',
alias: 'res',
description: 'Generate a new CRUD resource',
},
{
name: 'service',
alias: 's',
description: 'Generate a service declaration',
},
{
name: 'sub-app',
alias: 'app',
description: 'Generate a new application within a monorepo',
},
];

View File

@@ -0,0 +1,8 @@
export declare class SchematicOption {
private name;
private value;
constructor(name: string, value: boolean | string);
get normalizedName(): string;
toCommandString(): string;
private format;
}

View File

@@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SchematicOption = void 0;
const formatting_1 = require("../utils/formatting");
class SchematicOption {
constructor(name, value) {
this.name = name;
this.value = value;
}
get normalizedName() {
return (0, formatting_1.normalizeToKebabOrSnakeCase)(this.name);
}
toCommandString() {
if (typeof this.value === 'string') {
if (this.name === 'name') {
return `--${this.normalizedName}=${this.format()}`;
}
else if (this.name === 'version' || this.name === 'path') {
return `--${this.normalizedName}=${this.value}`;
}
else {
return `--${this.normalizedName}="${this.value}"`;
}
}
else if (typeof this.value === 'boolean') {
const str = this.normalizedName;
return this.value ? `--${str}` : `--no-${str}`;
}
else {
return `--${this.normalizedName}=${this.value}`;
}
}
format() {
return (0, formatting_1.normalizeToKebabOrSnakeCase)(this.value)
.split('')
.reduce((content, char) => {
if (char === '(' || char === ')' || char === '[' || char === ']') {
return `${content}\\${char}`;
}
return `${content}${char}`;
}, '');
}
}
exports.SchematicOption = SchematicOption;