fix: 修改打包文件

This commit is contained in:
NICE CODE BY DEV 2024-03-27 11:39:19 +08:00
parent c4088792e8
commit b433d5f182
40 changed files with 0 additions and 5643 deletions

View File

@ -1,23 +0,0 @@
export declare const OBJECT_GRNER_THRESHOLD = 0.8;
export declare const OBJECT_AGE_TYPE_THRESHOLD = 0.5;
export declare const MODE_KEY = "test_mode";
export declare const SEARCH_IMG_COUNT = 10;
export declare const GLOBAL_IS_ITEM_NUMBER_SHOW = false;
export declare const publicPath = "hummingbird";
export declare const ENTER_CIRCLE = "MONITORTYPE_ENTER_CIRCLE";
export declare const OUT_CIRCLE = "MONITORTYPE_OUT_CIRCLE";
export declare const TEMP = "MONITORTYPE_TEMP";
export declare const GLOBAL_IS_BOX_VMS_SHOW = true;
export declare const BODY_SEARCH_THRESHOID = 0.45;
export declare const RECORD_VERSION = "3.0.0";
export declare const DeviceTab: {
EMPTY: number;
REAL_CAMERA: number;
PREPROCESS_CAMERA: number;
TAG_CAMERA: number;
HISTORY_VIDEO_GROUP: number;
VIRTUAL_CAMERA: number;
REAL_CAMERA_NOFACE: number;
REAL_CAMERA_ONLYFACE: number;
REAL_CAMERA_NOFACE_NOBOX_NODIRECONNECT: number;
};

View File

@ -1 +0,0 @@
export declare const TYPE = "";

View File

@ -1,3 +0,0 @@
export * from './camera';
export * from './base';
export * from './user';

View File

@ -1,2 +0,0 @@
declare const _default: {};
export default _default;

View File

@ -1,23 +0,0 @@
export declare const OBJECT_GRNER_THRESHOLD = 0.8;
export declare const OBJECT_AGE_TYPE_THRESHOLD = 0.5;
export declare const MODE_KEY = "test_mode";
export declare const SEARCH_IMG_COUNT = 10;
export declare const GLOBAL_IS_ITEM_NUMBER_SHOW = false;
export declare const publicPath = "hummingbird";
export declare const ENTER_CIRCLE = "MONITORTYPE_ENTER_CIRCLE";
export declare const OUT_CIRCLE = "MONITORTYPE_OUT_CIRCLE";
export declare const TEMP = "MONITORTYPE_TEMP";
export declare const GLOBAL_IS_BOX_VMS_SHOW = true;
export declare const BODY_SEARCH_THRESHOID = 0.45;
export declare const RECORD_VERSION = "3.0.0";
export declare const DeviceTab: {
EMPTY: number;
REAL_CAMERA: number;
PREPROCESS_CAMERA: number;
TAG_CAMERA: number;
HISTORY_VIDEO_GROUP: number;
VIRTUAL_CAMERA: number;
REAL_CAMERA_NOFACE: number;
REAL_CAMERA_ONLYFACE: number;
REAL_CAMERA_NOFACE_NOBOX_NODIRECONNECT: number;
};

View File

@ -1,80 +0,0 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/base/index.ts
var base_exports = {};
__export(base_exports, {
BODY_SEARCH_THRESHOID: () => BODY_SEARCH_THRESHOID,
DeviceTab: () => DeviceTab,
ENTER_CIRCLE: () => ENTER_CIRCLE,
GLOBAL_IS_BOX_VMS_SHOW: () => GLOBAL_IS_BOX_VMS_SHOW,
GLOBAL_IS_ITEM_NUMBER_SHOW: () => GLOBAL_IS_ITEM_NUMBER_SHOW,
MODE_KEY: () => MODE_KEY,
OBJECT_AGE_TYPE_THRESHOLD: () => OBJECT_AGE_TYPE_THRESHOLD,
OBJECT_GRNER_THRESHOLD: () => OBJECT_GRNER_THRESHOLD,
OUT_CIRCLE: () => OUT_CIRCLE,
RECORD_VERSION: () => RECORD_VERSION,
SEARCH_IMG_COUNT: () => SEARCH_IMG_COUNT,
TEMP: () => TEMP,
publicPath: () => publicPath
});
module.exports = __toCommonJS(base_exports);
var OBJECT_GRNER_THRESHOLD = 0.8;
var OBJECT_AGE_TYPE_THRESHOLD = 0.5;
var MODE_KEY = "test_mode";
var SEARCH_IMG_COUNT = 10;
var GLOBAL_IS_ITEM_NUMBER_SHOW = false;
var publicPath = "hummingbird";
var ENTER_CIRCLE = "MONITORTYPE_ENTER_CIRCLE";
var OUT_CIRCLE = "MONITORTYPE_OUT_CIRCLE";
var TEMP = "MONITORTYPE_TEMP";
var GLOBAL_IS_BOX_VMS_SHOW = true;
var BODY_SEARCH_THRESHOID = 0.45;
var RECORD_VERSION = "3.0.0";
var DeviceTab = {
EMPTY: 0,
REAL_CAMERA: 1,
PREPROCESS_CAMERA: 2,
//摄像头列表
TAG_CAMERA: 3,
//预案列表
HISTORY_VIDEO_GROUP: 4,
//录像回放
VIRTUAL_CAMERA: 5,
//离线视频
REAL_CAMERA_NOFACE: 6,
REAL_CAMERA_ONLYFACE: 7,
REAL_CAMERA_NOFACE_NOBOX_NODIRECONNECT: 8
// 只有普通摄像头,没有人脸、没有盒子、直连
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
BODY_SEARCH_THRESHOID,
DeviceTab,
ENTER_CIRCLE,
GLOBAL_IS_BOX_VMS_SHOW,
GLOBAL_IS_ITEM_NUMBER_SHOW,
MODE_KEY,
OBJECT_AGE_TYPE_THRESHOLD,
OBJECT_GRNER_THRESHOLD,
OUT_CIRCLE,
RECORD_VERSION,
SEARCH_IMG_COUNT,
TEMP,
publicPath
});

View File

@ -1 +0,0 @@
export declare const TYPE = "";

View File

@ -1,29 +0,0 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/camera/index.ts
var camera_exports = {};
__export(camera_exports, {
TYPE: () => TYPE
});
module.exports = __toCommonJS(camera_exports);
var TYPE = "";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
TYPE
});

View File

@ -1,3 +0,0 @@
export * from './camera';
export * from './base';
export * from './user';

View File

@ -1,27 +0,0 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
module.exports = __toCommonJS(src_exports);
__reExport(src_exports, require("./camera"), module.exports);
__reExport(src_exports, require("./base"), module.exports);
__reExport(src_exports, require("./user"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./camera"),
...require("./base"),
...require("./user")
});

View File

@ -1,2 +0,0 @@
declare const _default: {};
export default _default;

View File

@ -1,25 +0,0 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/user/index.ts
var user_exports = {};
__export(user_exports, {
default: () => user_default
});
module.exports = __toCommonJS(user_exports);
var user_default = {};

View File

@ -1 +0,0 @@
export { default as IconFont } from './Iconfont';

View File

@ -1,70 +0,0 @@
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/Iconfont.tsx
var Iconfont_exports = {};
__export(Iconfont_exports, {
default: () => Iconfont_default
});
module.exports = __toCommonJS(Iconfont_exports);
var import_icons = require("@ant-design/icons");
var import_react = __toESM(require("react"));
var Icon = (0, import_icons.createFromIconfontCN)({
scriptUrl: require("./font/iconfont.js")
});
var IconFont = (props) => {
const {
title = "",
styles = {},
icon,
size = 14,
onIconClick,
children,
active = false,
color = ""
} = props || {};
return /* @__PURE__ */ import_react.default.createElement(
Icon,
{
title,
onClick: (e) => {
onIconClick && onIconClick(e);
},
style: {
...styles,
cursor: "pointer",
fontSize: size,
color,
...active ? { color: "#09f" } : {}
},
type: icon
},
children
);
};
var Iconfont_default = IconFont;

View File

@ -1,40 +0,0 @@
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/demo/basic.tsx
var basic_exports = {};
__export(basic_exports, {
default: () => basic_default
});
module.exports = __toCommonJS(basic_exports);
var import_react = __toESM(require("react"));
var import_icon = require("@zhst/icon");
var demo = () => {
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_icon.IconFont, { icon: "icon-daoru1" }));
};
var basic_default = demo;

View File

@ -1,59 +0,0 @@
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/demo/demo.tsx
var demo_exports = {};
__export(demo_exports, {
default: () => demo_default
});
module.exports = __toCommonJS(demo_exports);
var import_react = __toESM(require("react"));
var import_icon = require("@zhst/icon");
var import_index = require("./index.less");
var import_meta = require("@zhst/meta");
var iconJson = require("../font/iconfont.json");
var demo = () => {
const iconArr = iconJson["glyphs"];
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("ul", { className: "demo-ul" }, iconArr.map((item) => {
const { font_class, name } = item;
const fontName = `icon-${font_class}`;
return /* @__PURE__ */ import_react.default.createElement("li", { className: "demo-li" }, /* @__PURE__ */ import_react.default.createElement(
import_icon.IconFont,
{
styles: { marginBottom: 20 },
icon: fontName,
size: 32,
onIconClick: () => {
navigator.clipboard.writeText(fontName);
import_meta.message.success(`复制${fontName}成功`);
}
}
), /* @__PURE__ */ import_react.default.createElement("div", { className: "demo-li-name" }, name), /* @__PURE__ */ import_react.default.createElement("div", { className: "demo-li-name" }, fontName));
})));
};
var demo_default = demo;

View File

@ -1,20 +0,0 @@
.demo {
&-ul {
list-style-type: none;
display: flex;
flex-wrap: wrap;
}
&-li {
display: flex;
flex-direction: column;
align-items: center;
height: 150px;
width: 150px;
&-name {
color: #666;
font-size: 12px;
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
export { default as IconFont } from './Iconfont';

View File

@ -1,39 +0,0 @@
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
IconFont: () => import_Iconfont.default
});
module.exports = __toCommonJS(src_exports);
var import_Iconfont = __toESM(require("./Iconfont"));
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
IconFont
});

View File

@ -1,3 +0,0 @@
.icon:hover {
color: #6accca !important;
}

View File

@ -1,31 +0,0 @@
export declare const mapboxAccessToken = "pk.eyJ1IjoiZGluZ2xpMTIzIiwiYSI6ImNra204ODhjczBobTgyeHJ6MmJpZHMxNWgifQ.NbKrXh_hb2gvjr5CEMDnyQ";
export declare const MAP_CENTER: {
longitude: number;
latitude: number;
};
export declare const defaultMapConfig: {
mapboxAccessToken: string;
maxZoom: number;
minZoom: number;
dragRotate: boolean;
mapStyle: {
version: number;
name: string;
glyphs: string;
sources: {
'osm-tiles': {
type: string;
tiles: string[];
tileSize: number;
};
};
layers: {
id: string;
type: string;
source: string;
minZoom: number;
maxZoom: number;
renderingMode: string;
}[];
};
};

View File

@ -1 +0,0 @@
export { default as MapBox } from './MapBox';

View File

@ -1,20 +0,0 @@
import { CSSProperties } from "react";
import { MapRef, MapStyle } from "react-map-gl";
export interface MapProps {
onLoad?: (e: mapboxgl.MapboxEvent<undefined>) => void;
mapRef?: React.MutableRefObject<MapRef | undefined>;
style?: CSSProperties;
children?: JSX.Element | JSX.Element[] | Array<JSX.Element | undefined>;
mapConfig?: MapConfigProps;
mapCenter: {
longitude: number;
latitude: number;
};
}
export interface MapConfigProps {
mapboxAccessToken?: string;
minZoom?: number;
maxZoom?: number;
dragRotate?: boolean;
mapStyle?: MapStyle;
}

View File

@ -1 +0,0 @@
export declare const merge: (object: any, ...sources: any) => any;

View File

@ -1,73 +0,0 @@
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/MapBox.tsx
var MapBox_exports = {};
__export(MapBox_exports, {
default: () => MapBox_default
});
module.exports = __toCommonJS(MapBox_exports);
var import_mapbox_gl = require("mapbox-gl/dist/mapbox-gl.css");
var import_react_map_gl = __toESM(require("react-map-gl"));
var import_index = require("./index.less");
var import_react = __toESM(require("react"));
var import_utils = require("./utils");
var import_constants = require("./constants");
var MapBox = (props) => {
const {
style = {},
children,
mapRef,
onLoad,
mapCenter = import_constants.MAP_CENTER,
mapConfig = {},
...others
} = props || {};
return (
//@ts-ignore
/* @__PURE__ */ import_react.default.createElement(
import_react_map_gl.default,
{
ref: (e) => {
if (mapRef) {
mapRef.current = e;
}
},
onLoad: (e) => {
onLoad && onLoad(e);
},
style: { width: "100%", height: 600, ...style },
...(0, import_utils.merge)(import_constants.defaultMapConfig, mapConfig),
initialViewState: { ...mapCenter, zoom: 10 },
...others
},
children
)
);
};
var MapBox_default = MapBox;

View File

@ -1,31 +0,0 @@
export declare const mapboxAccessToken = "pk.eyJ1IjoiZGluZ2xpMTIzIiwiYSI6ImNra204ODhjczBobTgyeHJ6MmJpZHMxNWgifQ.NbKrXh_hb2gvjr5CEMDnyQ";
export declare const MAP_CENTER: {
longitude: number;
latitude: number;
};
export declare const defaultMapConfig: {
mapboxAccessToken: string;
maxZoom: number;
minZoom: number;
dragRotate: boolean;
mapStyle: {
version: number;
name: string;
glyphs: string;
sources: {
'osm-tiles': {
type: string;
tiles: string[];
tileSize: number;
};
};
layers: {
id: string;
type: string;
source: string;
minZoom: number;
maxZoom: number;
renderingMode: string;
}[];
};
};

View File

@ -1,81 +0,0 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/constants.ts
var constants_exports = {};
__export(constants_exports, {
MAP_CENTER: () => MAP_CENTER,
defaultMapConfig: () => defaultMapConfig,
mapboxAccessToken: () => mapboxAccessToken
});
module.exports = __toCommonJS(constants_exports);
var mapboxAccessToken = "pk.eyJ1IjoiZGluZ2xpMTIzIiwiYSI6ImNra204ODhjczBobTgyeHJ6MmJpZHMxNWgifQ.NbKrXh_hb2gvjr5CEMDnyQ";
var MAP_CENTER = {
longitude: 120.2667694313269,
latitude: 30.180942826533766
};
var MapUrl = "http://10.0.0.120:30003/map";
var defaultMapConfig = {
mapboxAccessToken,
maxZoom: 18,
minZoom: 4,
dragRotate: false,
mapStyle: {
version: 8,
name: "Mapbox Streets",
// sprite: `${location.origin}/mapbox/sprite`, // 地图图标
glyphs: "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
// 字体
sources: {
//数据源
"osm-tiles": {
type: "raster",
//栅格切片。vector:矢量切片
// Z-瓦片层级一般支持0-18级越大代表越清晰
// X-瓦片列号从西向东0->360依次012……
// Y-瓦片行号从北向南有些也可能是从南向北依次012……
tiles: [`${MapUrl}/api/tilesets/mapfile/{z}/{x}/{y}.png`],
//在线地址先写死120
tileSize: 256
//切片的最小展示尺寸(可选,单位:像素,默认值为 512即 1024/2
}
},
layers: [
// 图层。图层指定了如何渲染数据源提供的数据
{
id: "zhstLayer",
//唯一id
type: "raster",
//类型 栅格。circlesymbolline...
source: "osm-tiles",
// 'source-layer': 'osmtiles',//数据源必须是type:vector
minZoom: 4,
//最小层级
maxZoom: 17,
//最大层级
renderingMode: "2d"
}
]
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MAP_CENTER,
defaultMapConfig,
mapboxAccessToken
});

View File

@ -1 +0,0 @@
export { default as MapBox } from './MapBox';

View File

@ -1,39 +0,0 @@
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
MapBox: () => import_MapBox.default
});
module.exports = __toCommonJS(src_exports);
var import_MapBox = __toESM(require("./MapBox"));
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MapBox
});

View File

@ -1,3 +0,0 @@
.mapboxgl-ctrl-attrib-button {
display: none;
}

View File

@ -1,20 +0,0 @@
import { CSSProperties } from "react";
import { MapRef, MapStyle } from "react-map-gl";
export interface MapProps {
onLoad?: (e: mapboxgl.MapboxEvent<undefined>) => void;
mapRef?: React.MutableRefObject<MapRef | undefined>;
style?: CSSProperties;
children?: JSX.Element | JSX.Element[] | Array<JSX.Element | undefined>;
mapConfig?: MapConfigProps;
mapCenter: {
longitude: number;
latitude: number;
};
}
export interface MapConfigProps {
mapboxAccessToken?: string;
minZoom?: number;
maxZoom?: number;
dragRotate?: boolean;
mapStyle?: MapStyle;
}

View File

@ -1,17 +0,0 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/interface.ts
var interface_exports = {};
module.exports = __toCommonJS(interface_exports);

View File

@ -1 +0,0 @@
export declare const merge: (object: any, ...sources: any) => any;

View File

@ -1,60 +0,0 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/utils.ts
var utils_exports = {};
__export(utils_exports, {
merge: () => merge
});
module.exports = __toCommonJS(utils_exports);
var getRawType = (val) => {
return Object.prototype.toString.call(val).slice(8, -1);
};
var isPlainObjectOrArray = (val) => {
return isPlainObject(val) || Array.isArray(val);
};
var isPlainObject = (val) => {
return getRawType(val) === "Object";
};
var merge = (object, ...sources) => {
for (const source of sources) {
for (const key in source) {
if (source[key] === void 0 && key in object) {
continue;
}
if (isPlainObjectOrArray(source[key])) {
if (getRawType(object[key] === getRawType(source[key]))) {
if (isPlainObject(object[key])) {
merge(object[key], source[key]);
} else {
object[key] = object[key].concat(source[key]);
}
} else {
object[key] = source[key];
}
} else {
object[key] = source[key];
}
}
}
return object;
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
merge
});