@datatechsolutions/ui 2.10.1 → 2.10.3
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/astrlabe/index.js +121 -121
- package/dist/astrlabe/index.mjs +5 -5
- package/dist/astrlabe/workflow-canvas.js +5 -5
- package/dist/astrlabe/workflow-canvas.mjs +4 -4
- package/dist/{chunk-DZY7EBXX.mjs → chunk-456PIDWM.mjs} +4 -4
- package/dist/{chunk-DZY7EBXX.mjs.map → chunk-456PIDWM.mjs.map} +1 -1
- package/dist/{chunk-QENZSK52.js → chunk-5H553L6R.js} +53 -53
- package/dist/{chunk-QENZSK52.js.map → chunk-5H553L6R.js.map} +1 -1
- package/dist/{chunk-GAH36BVQ.mjs → chunk-JSWH22BB.mjs} +26 -10
- package/dist/chunk-JSWH22BB.mjs.map +1 -0
- package/dist/{chunk-2JNMFRBI.js → chunk-Q5ILCWVP.js} +26 -10
- package/dist/chunk-Q5ILCWVP.js.map +1 -0
- package/dist/index.js +727 -727
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-2JNMFRBI.js.map +0 -1
- package/dist/chunk-GAH36BVQ.mjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var chunkS7KHTUHA_js = require('./chunk-S7KHTUHA.js');
|
|
4
5
|
var chunkUZ3CMNUJ_js = require('./chunk-UZ3CMNUJ.js');
|
|
5
6
|
var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
|
|
6
|
-
var chunkS7KHTUHA_js = require('./chunk-S7KHTUHA.js');
|
|
7
7
|
var Headless6 = require('@headlessui/react');
|
|
8
8
|
var clsx = require('clsx');
|
|
9
9
|
var React12 = require('react');
|
|
@@ -12267,15 +12267,32 @@ function GeoMapCanvasInner({
|
|
|
12267
12267
|
const hasAnyActiveFilter = React12.useMemo(() => {
|
|
12268
12268
|
return regionGroups.some((regionData) => isRegionActive?.(regionData.code));
|
|
12269
12269
|
}, [regionGroups, isRegionActive]);
|
|
12270
|
-
const
|
|
12271
|
-
|
|
12270
|
+
const featureBounds = React12.useMemo(() => {
|
|
12271
|
+
if (!pathGenerator || !geoData) return null;
|
|
12272
|
+
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
12273
|
+
for (const feature of geoData.features) {
|
|
12274
|
+
const bounds = pathGenerator.bounds(feature);
|
|
12275
|
+
if (!bounds || !isFinite(bounds[0][0])) continue;
|
|
12276
|
+
minX = Math.min(minX, bounds[0][0]);
|
|
12277
|
+
minY = Math.min(minY, bounds[0][1]);
|
|
12278
|
+
maxX = Math.max(maxX, bounds[1][0]);
|
|
12279
|
+
maxY = Math.max(maxY, bounds[1][1]);
|
|
12280
|
+
}
|
|
12281
|
+
if (!isFinite(minX)) return null;
|
|
12282
|
+
const pad = 15;
|
|
12283
|
+
return { x: minX - pad, y: minY - pad, width: maxX - minX + pad * 2, height: maxY - minY + pad * 2 };
|
|
12284
|
+
}, [pathGenerator, geoData]);
|
|
12285
|
+
const effectiveWidth = featureBounds?.width ?? (projectionType === "albersUsa" ? ALBERS_WIDTH : VIEWBOX_WIDTH);
|
|
12286
|
+
const effectiveHeight = featureBounds?.height ?? (projectionType === "albersUsa" ? ALBERS_HEIGHT : VIEWBOX_HEIGHT);
|
|
12287
|
+
const baseX = featureBounds?.x ?? 0;
|
|
12288
|
+
const baseY = featureBounds?.y ?? 0;
|
|
12272
12289
|
const viewBoxParts = React12.useMemo(() => {
|
|
12273
12290
|
const width = effectiveWidth / zoom;
|
|
12274
12291
|
const height = effectiveHeight / zoom;
|
|
12275
|
-
const x2 = (effectiveWidth - width) / 2 - panOffset[0];
|
|
12276
|
-
const y2 = (effectiveHeight - height) / 2 - panOffset[1];
|
|
12292
|
+
const x2 = baseX + (effectiveWidth - width) / 2 - panOffset[0];
|
|
12293
|
+
const y2 = baseY + (effectiveHeight - height) / 2 - panOffset[1];
|
|
12277
12294
|
return { x: x2, y: y2, width, height };
|
|
12278
|
-
}, [zoom, panOffset, effectiveWidth, effectiveHeight]);
|
|
12295
|
+
}, [zoom, panOffset, effectiveWidth, effectiveHeight, baseX, baseY]);
|
|
12279
12296
|
const viewBox = `${viewBoxParts.x} ${viewBoxParts.y} ${viewBoxParts.width} ${viewBoxParts.height}`;
|
|
12280
12297
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12281
12298
|
"div",
|
|
@@ -12288,8 +12305,7 @@ function GeoMapCanvasInner({
|
|
|
12288
12305
|
{
|
|
12289
12306
|
ref: svgRef,
|
|
12290
12307
|
viewBox,
|
|
12291
|
-
|
|
12292
|
-
className: "w-full h-full min-h-[300px] cursor-grab active:cursor-grabbing",
|
|
12308
|
+
className: "w-full h-full cursor-grab active:cursor-grabbing",
|
|
12293
12309
|
"aria-label": ariaLabel,
|
|
12294
12310
|
style: { touchAction: "none", background: "transparent" },
|
|
12295
12311
|
onMouseDown: handleMouseDown,
|
|
@@ -23903,5 +23919,5 @@ exports.useGeoMapState = useGeoMapState;
|
|
|
23903
23919
|
exports.useNotifications = useNotifications;
|
|
23904
23920
|
exports.usePlatformShellStore = usePlatformShellStore;
|
|
23905
23921
|
exports.usePullToRefresh = usePullToRefresh;
|
|
23906
|
-
//# sourceMappingURL=chunk-
|
|
23907
|
-
//# sourceMappingURL=chunk-
|
|
23922
|
+
//# sourceMappingURL=chunk-Q5ILCWVP.js.map
|
|
23923
|
+
//# sourceMappingURL=chunk-Q5ILCWVP.js.map
|