🎯 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,8 @@
export declare const IS_READ_ONLY = true;
export declare function transformArguments(configKey: string): Array<string>;
type ConfigItem = [
configKey: string,
value: number
];
export declare function transformReply(): ConfigItem | Array<ConfigItem>;
export {};

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformArguments = exports.IS_READ_ONLY = void 0;
exports.IS_READ_ONLY = true;
function transformArguments(configKey) {
return ['GRAPH.CONFIG', 'GET', configKey];
}
exports.transformArguments = transformArguments;

View File

@@ -0,0 +1,2 @@
export declare function transformArguments(configKey: string, value: number): Array<string>;
export declare function transformReply(): 'OK';

View File

@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformArguments = void 0;
function transformArguments(configKey, value) {
return [
'GRAPH.CONFIG',
'SET',
configKey,
value.toString()
];
}
exports.transformArguments = transformArguments;

View File

@@ -0,0 +1,3 @@
export declare const FIRST_KEY_INDEX = 1;
export declare function transformArguments(key: string): Array<string>;
export declare function transformReply(): string;

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
exports.FIRST_KEY_INDEX = 1;
function transformArguments(key) {
return ['GRAPH.DELETE', key];
}
exports.transformArguments = transformArguments;

View File

@@ -0,0 +1,4 @@
export declare const FIRST_KEY_INDEX = 1;
export declare const IS_READ_ONLY = true;
export declare function transformArguments(key: string, query: string): Array<string>;
export declare function transformReply(): Array<string>;

View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0;
exports.FIRST_KEY_INDEX = 1;
exports.IS_READ_ONLY = true;
function transformArguments(key, query) {
return ['GRAPH.EXPLAIN', key, query];
}
exports.transformArguments = transformArguments;

View File

@@ -0,0 +1,3 @@
export declare const IS_READ_ONLY = true;
export declare function transformArguments(): Array<string>;
export declare function transformReply(): Array<string>;

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformArguments = exports.IS_READ_ONLY = void 0;
exports.IS_READ_ONLY = true;
function transformArguments() {
return ['GRAPH.LIST'];
}
exports.transformArguments = transformArguments;

View File

@@ -0,0 +1,4 @@
export declare const FIRST_KEY_INDEX = 1;
export declare const IS_READ_ONLY = true;
export declare function transformArguments(key: string, query: string): Array<string>;
export declare function transformReply(): Array<string>;

View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0;
exports.FIRST_KEY_INDEX = 1;
exports.IS_READ_ONLY = true;
function transformArguments(key, query) {
return ['GRAPH.PROFILE', key, query];
}
exports.transformArguments = transformArguments;

View File

@@ -0,0 +1,25 @@
import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands/index';
import { QueryOptionsBackwardCompatible } from '.';
export declare const FIRST_KEY_INDEX = 1;
export declare function transformArguments(graph: RedisCommandArgument, query: RedisCommandArgument, options?: QueryOptionsBackwardCompatible, compact?: boolean): RedisCommandArguments;
type Headers = Array<string>;
type Data = Array<string | number | null | Data>;
type Metadata = Array<string>;
type QueryRawReply = [
headers: Headers,
data: Data,
metadata: Metadata
] | [
metadata: Metadata
];
export type QueryReply = {
headers: undefined;
data: undefined;
metadata: Metadata;
} | {
headers: Headers;
data: Data;
metadata: Metadata;
};
export declare function transformReply(reply: QueryRawReply): QueryReply;
export {};

View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
const _1 = require(".");
exports.FIRST_KEY_INDEX = 1;
function transformArguments(graph, query, options, compact) {
return (0, _1.pushQueryArguments)(['GRAPH.QUERY'], graph, query, options, compact);
}
exports.transformArguments = transformArguments;
function transformReply(reply) {
return reply.length === 1 ? {
headers: undefined,
data: undefined,
metadata: reply[0]
} : {
headers: reply[0],
data: reply[1],
metadata: reply[2]
};
}
exports.transformReply = transformReply;

View File

@@ -0,0 +1,6 @@
import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands';
import { QueryOptionsBackwardCompatible } from '.';
export { FIRST_KEY_INDEX } from './QUERY';
export declare const IS_READ_ONLY = true;
export declare function transformArguments(graph: RedisCommandArgument, query: RedisCommandArgument, options?: QueryOptionsBackwardCompatible, compact?: boolean): RedisCommandArguments;
export { transformReply } from './QUERY';

View File

@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0;
const _1 = require(".");
var QUERY_1 = require("./QUERY");
Object.defineProperty(exports, "FIRST_KEY_INDEX", { enumerable: true, get: function () { return QUERY_1.FIRST_KEY_INDEX; } });
exports.IS_READ_ONLY = true;
function transformArguments(graph, query, options, compact) {
return (0, _1.pushQueryArguments)(['GRAPH.RO_QUERY'], graph, query, options, compact);
}
exports.transformArguments = transformArguments;
var QUERY_2 = require("./QUERY");
Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return QUERY_2.transformReply; } });

View File

@@ -0,0 +1,17 @@
export declare const IS_READ_ONLY = true;
export declare const FIRST_KEY_INDEX = 1;
export declare function transformArguments(key: string): string[];
type SlowLogRawReply = Array<[
timestamp: string,
command: string,
query: string,
took: string
]>;
type SlowLogReply = Array<{
timestamp: Date;
command: string;
query: string;
took: number;
}>;
export declare function transformReply(logs: SlowLogRawReply): SlowLogReply;
export {};

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = exports.IS_READ_ONLY = void 0;
exports.IS_READ_ONLY = true;
exports.FIRST_KEY_INDEX = 1;
function transformArguments(key) {
return ['GRAPH.SLOWLOG', key];
}
exports.transformArguments = transformArguments;
function transformReply(logs) {
return logs.map(([timestamp, command, query, took]) => ({
timestamp: new Date(Number(timestamp) * 1000),
command,
query,
took: Number(took)
}));
}
exports.transformReply = transformReply;

View File

@@ -0,0 +1,41 @@
import * as CONFIG_GET from './CONFIG_GET';
import * as CONFIG_SET from './CONFIG_SET';
import * as DELETE from './DELETE';
import * as EXPLAIN from './EXPLAIN';
import * as LIST from './LIST';
import * as PROFILE from './PROFILE';
import * as QUERY from './QUERY';
import * as RO_QUERY from './RO_QUERY';
import * as SLOWLOG from './SLOWLOG';
import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands';
declare const _default: {
CONFIG_GET: typeof CONFIG_GET;
configGet: typeof CONFIG_GET;
CONFIG_SET: typeof CONFIG_SET;
configSet: typeof CONFIG_SET;
DELETE: typeof DELETE;
delete: typeof DELETE;
EXPLAIN: typeof EXPLAIN;
explain: typeof EXPLAIN;
LIST: typeof LIST;
list: typeof LIST;
PROFILE: typeof PROFILE;
profile: typeof PROFILE;
QUERY: typeof QUERY;
query: typeof QUERY;
RO_QUERY: typeof RO_QUERY;
roQuery: typeof RO_QUERY;
SLOWLOG: typeof SLOWLOG;
slowLog: typeof SLOWLOG;
};
export default _default;
type QueryParam = null | string | number | boolean | QueryParams | Array<QueryParam>;
type QueryParams = {
[key: string]: QueryParam;
};
export interface QueryOptions {
params?: QueryParams;
TIMEOUT?: number;
}
export type QueryOptionsBackwardCompatible = QueryOptions | number;
export declare function pushQueryArguments(args: RedisCommandArguments, graph: RedisCommandArgument, query: RedisCommandArgument, options?: QueryOptionsBackwardCompatible, compact?: boolean): RedisCommandArguments;

View File

@@ -0,0 +1,88 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.pushQueryArguments = void 0;
const CONFIG_GET = require("./CONFIG_GET");
const CONFIG_SET = require("./CONFIG_SET");
;
const DELETE = require("./DELETE");
const EXPLAIN = require("./EXPLAIN");
const LIST = require("./LIST");
const PROFILE = require("./PROFILE");
const QUERY = require("./QUERY");
const RO_QUERY = require("./RO_QUERY");
const SLOWLOG = require("./SLOWLOG");
exports.default = {
CONFIG_GET,
configGet: CONFIG_GET,
CONFIG_SET,
configSet: CONFIG_SET,
DELETE,
delete: DELETE,
EXPLAIN,
explain: EXPLAIN,
LIST,
list: LIST,
PROFILE,
profile: PROFILE,
QUERY,
query: QUERY,
RO_QUERY,
roQuery: RO_QUERY,
SLOWLOG,
slowLog: SLOWLOG
};
function pushQueryArguments(args, graph, query, options, compact) {
args.push(graph);
if (typeof options === 'number') {
args.push(query);
pushTimeout(args, options);
}
else {
args.push(options?.params ?
`CYPHER ${queryParamsToString(options.params)} ${query}` :
query);
if (options?.TIMEOUT !== undefined) {
pushTimeout(args, options.TIMEOUT);
}
}
if (compact) {
args.push('--compact');
}
return args;
}
exports.pushQueryArguments = pushQueryArguments;
function pushTimeout(args, timeout) {
args.push('TIMEOUT', timeout.toString());
}
function queryParamsToString(params) {
const parts = [];
for (const [key, value] of Object.entries(params)) {
parts.push(`${key}=${queryParamToString(value)}`);
}
return parts.join(' ');
}
function queryParamToString(param) {
if (param === null) {
return 'null';
}
switch (typeof param) {
case 'string':
return `"${param.replace(/["\\]/g, '\\$&')}"`;
case 'number':
case 'boolean':
return param.toString();
}
if (Array.isArray(param)) {
return `[${param.map(queryParamToString).join(',')}]`;
}
else if (typeof param === 'object') {
const body = [];
for (const [key, value] of Object.entries(param)) {
body.push(`${key}:${queryParamToString(value)}`);
}
return `{${body.join(',')}}`;
}
else {
throw new TypeError(`Unexpected param type ${typeof param} ${param}`);
}
}