@ztwoint/z-ui 0.1.122 → 0.1.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/assets/icons/index.d.ts +2 -0
- package/dist/components/assets/icons/left-square-bracket.d.ts +6 -0
- package/dist/components/assets/icons/left-square-bracket.js +23 -0
- package/dist/components/assets/icons/right-square-bracket.d.ts +6 -0
- package/dist/components/assets/icons/right-square-bracket.js +23 -0
- package/dist/components/table/components/cell/avatar-cell.js +13 -6
- package/dist/components/table/table-provider.js +7 -0
- package/dist/components/table-card/table-card.js +52 -45
- package/dist/components/z2map/components/index.d.ts +5 -0
- package/dist/components/z2map/components/map-controls.d.ts +12 -0
- package/dist/components/z2map/components/map-controls.js +29 -0
- package/dist/components/z2map/components/map-empty-state.d.ts +2 -0
- package/dist/components/z2map/components/map-empty-state.js +10 -0
- package/dist/components/z2map/components/map-loading-state.d.ts +8 -0
- package/dist/components/z2map/components/map-loading-state.js +45 -0
- package/dist/components/z2map/components/map-pin-content.d.ts +8 -0
- package/dist/components/z2map/components/map-pin-content.js +27 -0
- package/dist/components/z2map/components/map-pin.d.ts +19 -0
- package/dist/components/z2map/components/map-pin.js +116 -0
- package/dist/components/z2map/components/map-style-control.d.ts +8 -0
- package/dist/components/z2map/components/map-style-control.js +45 -0
- package/dist/components/z2map/components/map-zoom-control.d.ts +8 -0
- package/dist/components/z2map/components/map-zoom-control.js +49 -0
- package/dist/components/z2map/index.d.ts +9 -0
- package/dist/components/z2map/map.constants.d.ts +47 -0
- package/dist/components/z2map/map.constants.js +40 -0
- package/dist/components/z2map/map.d.ts +4 -0
- package/dist/components/z2map/map.hook.d.ts +33 -0
- package/dist/components/z2map/map.hook.js +99 -0
- package/dist/components/z2map/map.js +161 -0
- package/dist/components/z2map/map.type.d.ts +45 -0
- package/dist/components/z2map/map.utils.d.ts +10 -0
- package/dist/components/z2map/map.utils.js +37 -0
- package/dist/css/node_modules/mapbox-gl/dist/mapbox-gl.css +1 -0
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +221 -201
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/attribution-control.js +12 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/fullscreen-control.js +12 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/geolocate-control.js +30 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/map.js +54 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/marker.js +56 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/navigation-control.js +12 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/popup.js +35 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/scale-control.js +14 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/use-control.js +14 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/use-map.js +6 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/create-ref.js +77 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/mapbox.js +315 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/proxy-transform.js +35 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/apply-react-style.js +13 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/compare-class-names.js +16 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/deep-equal.js +33 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/set-globals.js +18 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/style-utils.js +25 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/transform.js +40 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/use-isomorphic-layout-effect.js +5 -0
- package/dist/routes/map.d.ts +2 -0
- package/dist/types/components/assets/icons/index.d.ts +2 -0
- package/dist/types/components/assets/icons/left-square-bracket.d.ts +6 -0
- package/dist/types/components/assets/icons/right-square-bracket.d.ts +6 -0
- package/dist/types/components/z2map/components/index.d.ts +5 -0
- package/dist/types/components/z2map/components/map-controls.d.ts +12 -0
- package/dist/types/components/z2map/components/map-empty-state.d.ts +2 -0
- package/dist/types/components/z2map/components/map-loading-state.d.ts +8 -0
- package/dist/types/components/z2map/components/map-pin-content.d.ts +8 -0
- package/dist/types/components/z2map/components/map-pin.d.ts +19 -0
- package/dist/types/components/z2map/components/map-style-control.d.ts +8 -0
- package/dist/types/components/z2map/components/map-zoom-control.d.ts +8 -0
- package/dist/types/components/z2map/index.d.ts +9 -0
- package/dist/types/components/z2map/map.constants.d.ts +47 -0
- package/dist/types/components/z2map/map.d.ts +5 -0
- package/dist/types/components/z2map/map.hook.d.ts +33 -0
- package/dist/types/components/z2map/map.type.d.ts +45 -0
- package/dist/types/components/z2map/map.utils.d.ts +10 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/routes/map.d.ts +2 -0
- package/package.json +5 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function c(t, o) {
|
|
2
|
+
if (t === o)
|
|
3
|
+
return null;
|
|
4
|
+
const f = r(t), i = r(o), n = [];
|
|
5
|
+
for (const s of i)
|
|
6
|
+
f.has(s) || n.push(s);
|
|
7
|
+
for (const s of f)
|
|
8
|
+
i.has(s) || n.push(s);
|
|
9
|
+
return n.length === 0 ? null : n;
|
|
10
|
+
}
|
|
11
|
+
function r(t) {
|
|
12
|
+
return new Set(t ? t.trim().split(/\s+/) : []);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
c as compareClassNames
|
|
16
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
function i(e, r) {
|
|
2
|
+
const t = Array.isArray(e) ? e[0] : e ? e.x : 0, s = Array.isArray(e) ? e[1] : e ? e.y : 0, n = Array.isArray(r) ? r[0] : r ? r.x : 0, f = Array.isArray(r) ? r[1] : r ? r.y : 0;
|
|
3
|
+
return t === n && s === f;
|
|
4
|
+
}
|
|
5
|
+
function y(e, r) {
|
|
6
|
+
if (e === r)
|
|
7
|
+
return !0;
|
|
8
|
+
if (!e || !r)
|
|
9
|
+
return !1;
|
|
10
|
+
if (Array.isArray(e)) {
|
|
11
|
+
if (!Array.isArray(r) || e.length !== r.length)
|
|
12
|
+
return !1;
|
|
13
|
+
for (let t = 0; t < e.length; t++)
|
|
14
|
+
if (!y(e[t], r[t]))
|
|
15
|
+
return !1;
|
|
16
|
+
return !0;
|
|
17
|
+
} else if (Array.isArray(r))
|
|
18
|
+
return !1;
|
|
19
|
+
if (typeof e == "object" && typeof r == "object") {
|
|
20
|
+
const t = Object.keys(e), s = Object.keys(r);
|
|
21
|
+
if (t.length !== s.length)
|
|
22
|
+
return !1;
|
|
23
|
+
for (const n of t)
|
|
24
|
+
if (!r.hasOwnProperty(n) || !y(e[n], r[n]))
|
|
25
|
+
return !1;
|
|
26
|
+
return !0;
|
|
27
|
+
}
|
|
28
|
+
return !1;
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
i as arePointsEqual,
|
|
32
|
+
y as deepEqual
|
|
33
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const s = [
|
|
2
|
+
"baseApiUrl",
|
|
3
|
+
"maxParallelImageRequests",
|
|
4
|
+
"workerClass",
|
|
5
|
+
"workerCount",
|
|
6
|
+
"workerUrl"
|
|
7
|
+
];
|
|
8
|
+
function a(e, l) {
|
|
9
|
+
for (const t of s)
|
|
10
|
+
t in l && (e[t] = l[t]);
|
|
11
|
+
const { RTLTextPlugin: o = "https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js" } = l;
|
|
12
|
+
o && e.getRTLTextPluginStatus && e.getRTLTextPluginStatus() === "unavailable" && e.setRTLTextPlugin(o, (t) => {
|
|
13
|
+
t && console.error(t);
|
|
14
|
+
}, !0);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
a as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const a = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
|
|
2
|
+
function c(r) {
|
|
3
|
+
if (!r)
|
|
4
|
+
return null;
|
|
5
|
+
if (typeof r == "string" || ("toJS" in r && (r = r.toJS()), !r.layers))
|
|
6
|
+
return r;
|
|
7
|
+
const t = {};
|
|
8
|
+
for (const e of r.layers)
|
|
9
|
+
t[e.id] = e;
|
|
10
|
+
const f = r.layers.map((e) => {
|
|
11
|
+
let n = null;
|
|
12
|
+
"interactive" in e && (n = Object.assign({}, e), delete n.interactive);
|
|
13
|
+
const o = t[e.ref];
|
|
14
|
+
if (o) {
|
|
15
|
+
n = n || Object.assign({}, e), delete n.ref;
|
|
16
|
+
for (const i of a)
|
|
17
|
+
i in o && (n[i] = o[i]);
|
|
18
|
+
}
|
|
19
|
+
return n || e;
|
|
20
|
+
});
|
|
21
|
+
return { ...r, layers: f };
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
c as normalizeStyle
|
|
25
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
function m(e) {
|
|
2
|
+
return {
|
|
3
|
+
longitude: e.center.lng,
|
|
4
|
+
latitude: e.center.lat,
|
|
5
|
+
zoom: e._seaLevelZoom ?? e.zoom,
|
|
6
|
+
pitch: e.pitch,
|
|
7
|
+
bearing: e.bearing,
|
|
8
|
+
padding: e.padding,
|
|
9
|
+
elevation: e._centerAltitude
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function s(e) {
|
|
13
|
+
return Number.isFinite(e.longitude) || Number.isFinite(e.latitude) || Number.isFinite(e.zoom) || Number.isFinite(e.pitch) || Number.isFinite(e.bearing);
|
|
14
|
+
}
|
|
15
|
+
function l(e, i) {
|
|
16
|
+
return !!(Number.isFinite(i.longitude) && e.center.lng !== i.longitude || Number.isFinite(i.latitude) && e.center.lat !== i.latitude || Number.isFinite(i.bearing) && e.bearing !== i.bearing || Number.isFinite(i.pitch) && e.pitch !== i.pitch || Number.isFinite(i.zoom) && (e._seaLevelZoom ?? e.zoom) !== i.zoom || i.padding && !e.isPaddingEqual(i.padding));
|
|
17
|
+
}
|
|
18
|
+
function o() {
|
|
19
|
+
}
|
|
20
|
+
function d(e, i) {
|
|
21
|
+
const t = e._constrain, a = e._calcMatrices;
|
|
22
|
+
if (e._constrain = o, e._calcMatrices = o, Number.isFinite(i.bearing) && (e.bearing = i.bearing), Number.isFinite(i.pitch) && (e.pitch = i.pitch), i.padding && !e.isPaddingEqual(i.padding) && (e.padding = i.padding), Number.isFinite(i.longitude) || Number.isFinite(i.latitude)) {
|
|
23
|
+
const n = e.center;
|
|
24
|
+
e._center = new n.constructor(i.longitude ?? n.lng, i.latitude ?? n.lat);
|
|
25
|
+
}
|
|
26
|
+
if (Number.isFinite(i.zoom))
|
|
27
|
+
if (e._centerAltitude = i.elevation ?? 0, e.elevation) {
|
|
28
|
+
e._seaLevelZoom = i.zoom;
|
|
29
|
+
const n = e.pixelsPerMeter / e.worldSize * e._centerAltitude, c = e._mercatorZfromZoom(i.zoom), u = e._mercatorZfromZoom(e._maxZoom), r = Math.max(c - n, u);
|
|
30
|
+
e._setZoom(e._zoomFromMercatorZ(r));
|
|
31
|
+
} else
|
|
32
|
+
e._seaLevelZoom = null, e.zoom = i.zoom;
|
|
33
|
+
e._constrain = t, e._calcMatrices = a, e._unmodified || (e._constrain(), e._calcMatrices());
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
d as applyViewStateToTransform,
|
|
37
|
+
l as compareViewStateWithTransform,
|
|
38
|
+
s as isViewStateControlled,
|
|
39
|
+
m as transformToViewState
|
|
40
|
+
};
|
|
@@ -42,3 +42,5 @@ export { default as FilterIcon } from './filter-icon';
|
|
|
42
42
|
export { default as DescendingSortingIcon } from './descending';
|
|
43
43
|
export { default as ChainIcon } from './chain';
|
|
44
44
|
export { default as EraserIcon } from './eraser';
|
|
45
|
+
export { default as LeftSquareBracketIcon } from './left-square-bracket';
|
|
46
|
+
export { default as RightSquareBracketIcon } from './right-square-bracket';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { MapVariant } from '../map.constants';
|
|
3
|
+
export interface MapControlsProps {
|
|
4
|
+
showZoomControls?: boolean;
|
|
5
|
+
onZoomIn?: () => void;
|
|
6
|
+
onZoomOut?: () => void;
|
|
7
|
+
showStyleSwitcher?: boolean;
|
|
8
|
+
activeStyle?: MapVariant;
|
|
9
|
+
onStyleChange?: (style: MapVariant) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const MapControls: FC<MapControlsProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { PinSize, PinVariant } from '../map.type';
|
|
4
|
+
declare const pinVariants: (props?: ({
|
|
5
|
+
variant?: "success" | "warning" | "danger" | "neutral" | "brand" | null | undefined;
|
|
6
|
+
active?: boolean | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
|
+
export interface MapPinProps extends VariantProps<typeof pinVariants> {
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
onMouseEnter?: () => void;
|
|
13
|
+
onMouseLeave?: () => void;
|
|
14
|
+
active?: boolean;
|
|
15
|
+
variant?: PinVariant;
|
|
16
|
+
size?: PinSize;
|
|
17
|
+
}
|
|
18
|
+
export declare const MapPinComponent: FC<MapPinProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { MapVariant } from '../map.constants';
|
|
3
|
+
export interface MapStyleControlProps {
|
|
4
|
+
activeStyle: MapVariant;
|
|
5
|
+
onStyleChange: (style: MapVariant) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const MapStyleControl: FC<MapStyleControlProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Z2Map } from './map';
|
|
2
|
+
export type { Location, MapProps, PinVariant, PinSize, Coordinate } from './map.type';
|
|
3
|
+
export { MAP_VARIANTS, DEFAULT_MAP_CONFIG, PIN_SIZES } from './map.constants';
|
|
4
|
+
export type { MapVariant } from './map.constants';
|
|
5
|
+
export { MapPinComponent } from './components/map-pin';
|
|
6
|
+
export { MapPinContent } from './components/map-pin-content';
|
|
7
|
+
export { MapControls } from './components/map-controls';
|
|
8
|
+
export { MapZoomControl } from './components/map-zoom-control';
|
|
9
|
+
export { MapStyleControl } from './components/map-style-control';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const MAP_VARIANTS: {
|
|
2
|
+
readonly STREETS: "streets";
|
|
3
|
+
readonly SATELLITE: "satellite";
|
|
4
|
+
readonly TERRAIN: "terrain";
|
|
5
|
+
readonly DARK: "dark";
|
|
6
|
+
readonly LIGHT: "light";
|
|
7
|
+
};
|
|
8
|
+
export type MapVariant = (typeof MAP_VARIANTS)[keyof typeof MAP_VARIANTS];
|
|
9
|
+
export declare const MAPBOX_STYLE_MAP: Record<MapVariant, string>;
|
|
10
|
+
export declare const DEFAULT_MAP_CONFIG: {
|
|
11
|
+
center: {
|
|
12
|
+
lat: number;
|
|
13
|
+
lng: number;
|
|
14
|
+
};
|
|
15
|
+
zoom: number;
|
|
16
|
+
minZoom: number;
|
|
17
|
+
maxZoom: number;
|
|
18
|
+
variant: MapVariant;
|
|
19
|
+
width: string;
|
|
20
|
+
height: number;
|
|
21
|
+
interactive: boolean;
|
|
22
|
+
draggable: boolean;
|
|
23
|
+
scrollZoom: boolean;
|
|
24
|
+
showZoomControls: boolean;
|
|
25
|
+
showStyleSwitcher: boolean;
|
|
26
|
+
fitBoundsToLocations: boolean;
|
|
27
|
+
popoverDisabled: boolean;
|
|
28
|
+
pinVariant: "brand";
|
|
29
|
+
pinSize: "md";
|
|
30
|
+
};
|
|
31
|
+
export declare const PIN_SIZES: {
|
|
32
|
+
readonly sm: {
|
|
33
|
+
readonly width: 22;
|
|
34
|
+
readonly height: 22;
|
|
35
|
+
readonly iconSize: 12;
|
|
36
|
+
};
|
|
37
|
+
readonly md: {
|
|
38
|
+
readonly width: 32;
|
|
39
|
+
readonly height: 32;
|
|
40
|
+
readonly iconSize: 16;
|
|
41
|
+
};
|
|
42
|
+
readonly lg: {
|
|
43
|
+
readonly width: 40;
|
|
44
|
+
readonly height: 40;
|
|
45
|
+
readonly iconSize: 20;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { MapRef } from 'react-map-gl/mapbox';
|
|
2
|
+
import { MapProps, Location } from './map.type';
|
|
3
|
+
import { MapVariant } from './map.constants';
|
|
4
|
+
export declare const useMap: (props: MapProps) => {
|
|
5
|
+
mapRef: import("react").RefObject<MapRef | null>;
|
|
6
|
+
initialViewState: {
|
|
7
|
+
latitude: number;
|
|
8
|
+
longitude: number;
|
|
9
|
+
zoom: number;
|
|
10
|
+
};
|
|
11
|
+
currentVariant: MapVariant;
|
|
12
|
+
activeLocation: Location | null;
|
|
13
|
+
openPopoverId: string | null;
|
|
14
|
+
setOpenPopoverId: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
15
|
+
mapStyle: string;
|
|
16
|
+
containerStyle: {
|
|
17
|
+
width: string;
|
|
18
|
+
height: string;
|
|
19
|
+
};
|
|
20
|
+
handleZoomIn: () => void;
|
|
21
|
+
handleZoomOut: () => void;
|
|
22
|
+
handleStyleChange: (newStyle: MapVariant) => void;
|
|
23
|
+
handlePinHover: (location: Location | null) => void;
|
|
24
|
+
handlePinClick: (location: Location) => void;
|
|
25
|
+
handlePinClickWrapper: (location: Location) => void;
|
|
26
|
+
handleMove: (evt: {
|
|
27
|
+
viewState: {
|
|
28
|
+
latitude: number;
|
|
29
|
+
longitude: number;
|
|
30
|
+
zoom: number;
|
|
31
|
+
};
|
|
32
|
+
}) => void;
|
|
33
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MapVariant } from './map.constants';
|
|
3
|
+
export interface Coordinate {
|
|
4
|
+
lat: number;
|
|
5
|
+
lng: number;
|
|
6
|
+
}
|
|
7
|
+
export interface Location {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
coordinate: Coordinate;
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
specs?: string[];
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
metadata?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export type PinVariant = 'brand' | 'neutral' | 'danger' | 'success' | 'warning';
|
|
18
|
+
export type PinSize = 'sm' | 'md' | 'lg';
|
|
19
|
+
export interface MapProps {
|
|
20
|
+
locations: Location[];
|
|
21
|
+
mapboxToken?: string;
|
|
22
|
+
onPinClick?: (location: Location) => void;
|
|
23
|
+
onPinHover?: (location: Location | null) => void;
|
|
24
|
+
onMapMove?: (center: Coordinate, zoom: number) => void;
|
|
25
|
+
center?: Coordinate;
|
|
26
|
+
zoom?: number;
|
|
27
|
+
minZoom?: number;
|
|
28
|
+
maxZoom?: number;
|
|
29
|
+
variant?: MapVariant;
|
|
30
|
+
width?: string | number;
|
|
31
|
+
height?: string | number;
|
|
32
|
+
className?: string;
|
|
33
|
+
pinVariant?: PinVariant;
|
|
34
|
+
pinSize?: PinSize;
|
|
35
|
+
renderPin?: (location: Location) => ReactNode;
|
|
36
|
+
interactive?: boolean;
|
|
37
|
+
draggable?: boolean;
|
|
38
|
+
scrollZoom?: boolean;
|
|
39
|
+
showZoomControls?: boolean;
|
|
40
|
+
showStyleSwitcher?: boolean;
|
|
41
|
+
renderPopover?: (location: Location) => ReactNode;
|
|
42
|
+
popoverDisabled?: boolean;
|
|
43
|
+
fitBoundsToLocations?: boolean;
|
|
44
|
+
loading?: boolean;
|
|
45
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Coordinate } from './map.type';
|
|
2
|
+
export declare const calculateCenter: (coordinates: Coordinate[]) => Coordinate;
|
|
3
|
+
export declare const calculateBounds: (coordinates: Coordinate[]) => {
|
|
4
|
+
north: number;
|
|
5
|
+
south: number;
|
|
6
|
+
east: number;
|
|
7
|
+
west: number;
|
|
8
|
+
center: Coordinate;
|
|
9
|
+
};
|
|
10
|
+
export declare const formatDimension: (value: string | number) => string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -31,5 +31,6 @@ export * from './components/dynamic-table';
|
|
|
31
31
|
export * from './components/chart';
|
|
32
32
|
export * from './components/chart-card';
|
|
33
33
|
export * from './components/radio-card/radio-card';
|
|
34
|
+
export * from './components/z2map';
|
|
34
35
|
export * from './lib/theme.hook';
|
|
35
36
|
export * from './lib/utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ztwoint/z-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.124",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.4",
|
|
87
87
|
"@fontsource-variable/inter": "^5.2.5",
|
|
88
88
|
"@heroicons/react": "^2.2.0",
|
|
89
|
+
"@math.gl/web-mercator": "^4.1.0",
|
|
89
90
|
"@radix-ui/react-checkbox": "^1.3.2",
|
|
90
91
|
"@radix-ui/react-dialog": "^1.1.14",
|
|
91
92
|
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
98
99
|
"@radix-ui/react-tooltip": "^1.2.7",
|
|
99
100
|
"@tanstack/react-table": "^8.21.3",
|
|
101
|
+
"@types/mapbox-gl": "^3.4.1",
|
|
100
102
|
"class-variance-authority": "^0.7.1",
|
|
101
103
|
"classnames": "^2.5.1",
|
|
102
104
|
"clsx": "^2.1.1",
|
|
@@ -104,8 +106,10 @@
|
|
|
104
106
|
"echarts": "^5.6.0",
|
|
105
107
|
"echarts-for-react": "^3.0.2",
|
|
106
108
|
"lucide-react": "^0.525.0",
|
|
109
|
+
"mapbox-gl": "^3.15.0",
|
|
107
110
|
"radix-ui": "^1.4.3",
|
|
108
111
|
"react-country-flag": "^3.1.0",
|
|
112
|
+
"react-map-gl": "^8.1.0",
|
|
109
113
|
"react-router-dom": "^7.7.1",
|
|
110
114
|
"react-virtuoso": "^4.14.0",
|
|
111
115
|
"tailwind-merge": "^3.3.0",
|