@nivaro/react 0.3.45 → 0.3.47
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +290 -23
- package/dist/index.js +679 -659
- package/dist/shared/components/BaseMap.js +149 -103
- package/dist/shared/components/CollectionBrowserView.js +813 -826
- package/dist/shared/components/ErrorNotice.js +169 -0
- package/dist/shared/components/ErrorSurface.js +23 -17
- package/dist/shared/components/ListLoadError.js +8 -29
- package/dist/shared/components/LoadErrorNote.js +38 -21
- package/dist/shared/components/QueryErrorState.js +8 -11
- package/dist/shared/components/ReportView.js +1320 -1291
- package/dist/shared/components/chat/ChannelArchive.js +60 -60
- package/dist/shared/components/chat/ChannelExtras.js +74 -74
- package/dist/shared/components/chat/ChatPanel.js +368 -367
- package/dist/shared/components/command-center/CommandCenterView.js +313 -69
- package/dist/shared/components/command-center/Customize.js +353 -0
- package/dist/shared/components/command-center/Header.js +279 -53
- package/dist/shared/components/command-center/KioskLinks.js +198 -0
- package/dist/shared/components/command-center/PeekPanel.js +144 -3
- package/dist/shared/components/command-center/announce.js +13 -0
- package/dist/shared/components/command-center/board-prefs.js +99 -0
- package/dist/shared/components/command-center/freshness.js +29 -0
- package/dist/shared/components/command-center/layout.js +56 -0
- package/dist/shared/components/command-center/panels/AttentionPanel.js +132 -3
- package/dist/shared/components/command-center/panels/Banner.js +75 -0
- package/dist/shared/components/command-center/panels/BoardSettings.js +224 -0
- package/dist/shared/components/command-center/panels/FeedPanel.js +145 -29
- package/dist/shared/components/command-center/panels/FlowPanel.js +154 -56
- package/dist/shared/components/command-center/panels/ForecastPanel.js +244 -3
- package/dist/shared/components/command-center/panels/MapLegend.js +266 -0
- package/dist/shared/components/command-center/panels/MapPanel.js +216 -66
- package/dist/shared/components/command-center/panels/PartnersPanel.js +49 -3
- package/dist/shared/components/command-center/panels/PeoplePanel.js +258 -40
- package/dist/shared/components/command-center/panels/RegionPicker.js +88 -3
- package/dist/shared/components/command-center/panels/SystemPanel.js +158 -38
- package/dist/shared/components/command-center/panels/ThroughputPanel.js +307 -3
- package/dist/shared/components/command-center/panels/TimeBar.js +227 -6
- package/dist/shared/components/command-center/panels/TrafficPanel.js +12 -8
- package/dist/shared/components/command-center/panels/WorkloadPanel.js +82 -3
- package/dist/shared/components/command-center/panels/attention-actions.js +267 -0
- package/dist/shared/components/command-center/panels/map-shared.js +95 -0
- package/dist/shared/components/command-center/panels/registry.js +87 -19
- package/dist/shared/components/command-center/shell-hooks.js +118 -0
- package/dist/shared/components/command-center/shortcuts.js +37 -0
- package/dist/shared/components/command-center/theme.js +39 -21
- package/dist/shared/components/command-center/time.js +52 -0
- package/dist/shared/components/command-center/url-state.js +54 -0
- package/dist/shared/components/command-center/work-links.js +32 -0
- package/dist/shared/components/help-videos/editor/ClipsPanel.js +49 -48
- package/dist/shared/components/help-videos/editor/PublishButton.js +37 -36
- package/dist/shared/components/help-videos/editor/StatsTab.js +45 -44
- package/dist/shared/components/help-videos/editor/VersionsTab.js +29 -28
- package/dist/shared/components/help-videos/library/AuthorRolesButton.js +19 -18
- package/dist/shared/components/help-videos/library/HelpVideoLibrary.js +132 -129
- package/dist/shared/components/help-videos/library/LearningPathsPanel.js +42 -41
- package/dist/shared/components/help-videos/settings/HouseStyleButton.js +21 -20
- package/dist/shared/components/help-videos/settings/RenderSettingsButton.js +22 -21
- package/dist/shared/components/import/DocumentAutofillButton.js +24 -20
- package/dist/shared/components/import/ImportFromFileButton.js +61 -60
- package/dist/shared/components/imports/ImportStalenessControl.js +20 -21
- package/dist/shared/components/imports/NewImportDialog.js +29 -28
- package/dist/shared/components/imports/RunDetailSheet.js +63 -63
- package/dist/shared/components/item-edit/FieldRow.js +329 -329
- package/dist/shared/components/item-edit/InlineTableField.js +898 -898
- package/dist/shared/components/item-edit/PersonalDefaultControl.js +57 -56
- package/dist/shared/components/item-edit/PlanGrid.js +220 -221
- package/dist/shared/components/item-edit/RecordGrantTools.js +49 -48
- package/dist/shared/components/item-edit/placement-behaviour.js +68 -67
- package/dist/shared/components/layout-editor/inspector/ColumnFit.js +24 -23
- package/dist/shared/components/layout-editor/inspector/PickerPreview.js +17 -16
- package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +41 -41
- package/dist/shared/components/layout-editor/outputs/output-api.js +33 -31
- package/dist/shared/components/layout-editor/overview/overview-api.js +84 -83
- package/dist/shared/components/layout-editor/useLayoutDraft.js +47 -42
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +10 -9
- package/dist/shared/components/monitoring/TrafficMiniMap.js +111 -70
- package/dist/shared/components/panels/SlaClock.js +35 -36
- package/dist/shared/components/pipeline/PipelineEditorView.js +311 -312
- package/dist/shared/components/pipeline/TeamSuggestions.js +31 -30
- package/dist/shared/components/profile/AgentsPanel.js +73 -72
- package/dist/shared/components/profile/MailSuppressedPill.js +22 -21
- package/dist/shared/components/support/SupportRequestDialog.js +85 -81
- package/dist/shared/components/support/SupportView.js +94 -87
- package/dist/shared/lib/autofill-poll.js +21 -18
- package/dist/shared/lib/error-actions.js +85 -0
- package/dist/shared/lib/error-message.js +223 -82
- package/dist/shared/lib/error-toast.js +71 -13
- package/dist/shared/lib/safe-error.js +136 -38
- package/package.json +1 -1
|
@@ -1,168 +1,185 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
return (
|
|
1
|
+
import { jsxs as b, jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { Plus as G, Minus as J } from "lucide-react";
|
|
3
|
+
import { useRef as E, useState as C, useEffect as R, useMemo as K } from "react";
|
|
4
|
+
const s = 256, Q = (c, d, p) => `https://tile.openstreetmap.org/${c}/${d}/${p}.png`;
|
|
5
|
+
function w(c, d) {
|
|
6
|
+
return (c + 180) / 360 * 2 ** d;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
const p =
|
|
10
|
-
return (1 - Math.log(Math.tan(p) + 1 / Math.cos(p)) / Math.PI) / 2 * 2 **
|
|
8
|
+
function y(c, d) {
|
|
9
|
+
const p = c * Math.PI / 180;
|
|
10
|
+
return (1 - Math.log(Math.tan(p) + 1 / Math.cos(p)) / Math.PI) / 2 * 2 ** d;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return
|
|
12
|
+
function T(c, d) {
|
|
13
|
+
return c / 2 ** d * 360 - 180;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const p = Math.PI - 2 * Math.PI *
|
|
15
|
+
function D(c, d) {
|
|
16
|
+
const p = Math.PI - 2 * Math.PI * c / 2 ** d;
|
|
17
17
|
return 180 / Math.PI * Math.atan(0.5 * (Math.exp(p) - Math.exp(-p)));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
pins:
|
|
21
|
-
bubbles:
|
|
19
|
+
function nt({
|
|
20
|
+
pins: c,
|
|
21
|
+
bubbles: d = [],
|
|
22
22
|
statusLine: p,
|
|
23
|
-
onPinClick:
|
|
24
|
-
onBubbleClick:
|
|
25
|
-
minHeight:
|
|
26
|
-
focus:
|
|
23
|
+
onPinClick: P,
|
|
24
|
+
onBubbleClick: N,
|
|
25
|
+
minHeight: U = 420,
|
|
26
|
+
focus: m = null,
|
|
27
|
+
clusterColor: Y,
|
|
28
|
+
dots: Z = [],
|
|
29
|
+
onDotClick: k
|
|
27
30
|
}) {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const t =
|
|
31
|
+
const L = E(null), [a, q] = C({ w: 800, h: 520 }), [B, z] = C(null), S = E(null);
|
|
32
|
+
R(() => {
|
|
33
|
+
const t = L.current;
|
|
31
34
|
if (!t) return;
|
|
32
|
-
const e = new ResizeObserver(() =>
|
|
35
|
+
const e = new ResizeObserver(() => q({ w: t.clientWidth, h: t.clientHeight }));
|
|
33
36
|
return e.observe(t), () => e.disconnect();
|
|
34
37
|
}, []);
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
const t = [...
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
const e = t.map((M) => M.lat), o = t.map((M) => M.lng), n = Math.min(...e),
|
|
38
|
+
const W = E(!1);
|
|
39
|
+
R(() => {
|
|
40
|
+
const t = [...c, ...d];
|
|
41
|
+
if (W.current || t.length === 0) return;
|
|
42
|
+
W.current = !0;
|
|
43
|
+
const e = t.map((M) => M.lat), o = t.map((M) => M.lng), n = Math.min(...e), r = Math.max(...e), i = Math.min(...o), u = Math.max(...o), $ = { lat: (n + r) / 2, lng: (i + u) / 2 };
|
|
41
44
|
let x = 15;
|
|
42
45
|
for (; x > 3; ) {
|
|
43
|
-
const M = Math.abs(
|
|
44
|
-
if (M < a.w * 0.85 &&
|
|
46
|
+
const M = Math.abs(w(u, x) - w(i, x)) * s, F = Math.abs(y(n, x) - y(r, x)) * s;
|
|
47
|
+
if (M < a.w * 0.85 && F < a.h * 0.85) break;
|
|
45
48
|
x--;
|
|
46
49
|
}
|
|
47
|
-
z({
|
|
48
|
-
}, [
|
|
49
|
-
|
|
50
|
-
}, [
|
|
51
|
-
const
|
|
52
|
-
for (let t =
|
|
53
|
-
for (let e =
|
|
50
|
+
z({ ...$, zoom: x });
|
|
51
|
+
}, [c, d, a]), R(() => {
|
|
52
|
+
m && z({ lat: m.lat, lng: m.lng, zoom: m.zoom ?? 8 });
|
|
53
|
+
}, [m == null ? void 0 : m.nonce]);
|
|
54
|
+
const l = B ?? { lat: 39.5, lng: -98.35, zoom: 4 }, g = w(l.lng, l.zoom), f = y(l.lat, l.zoom), X = [], v = 2 ** l.zoom, H = Math.floor(g - a.w / 2 / s), O = Math.ceil(g + a.w / 2 / s), V = Math.max(0, Math.floor(f - a.h / 2 / s)), _ = Math.min(v - 1, Math.ceil(f + a.h / 2 / s));
|
|
55
|
+
for (let t = H; t <= O; t++)
|
|
56
|
+
for (let e = V; e <= _; e++) {
|
|
54
57
|
const o = (t % v + v) % v;
|
|
55
|
-
|
|
56
|
-
z:
|
|
58
|
+
X.push({
|
|
59
|
+
z: l.zoom,
|
|
57
60
|
x: o,
|
|
58
61
|
y: e,
|
|
59
|
-
left: a.w / 2 + (t -
|
|
60
|
-
top: a.h / 2 + (e -
|
|
62
|
+
left: a.w / 2 + (t - g) * s,
|
|
63
|
+
top: a.h / 2 + (e - f) * s
|
|
61
64
|
});
|
|
62
65
|
}
|
|
63
|
-
const
|
|
64
|
-
x: a.w / 2 + (
|
|
65
|
-
y: a.h / 2 + (
|
|
66
|
-
}),
|
|
66
|
+
const I = (t, e) => ({
|
|
67
|
+
x: a.w / 2 + (w(e, l.zoom) - g) * s,
|
|
68
|
+
y: a.h / 2 + (y(t, l.zoom) - f) * s
|
|
69
|
+
}), A = K(() => {
|
|
67
70
|
const e = /* @__PURE__ */ new Map();
|
|
68
|
-
for (const o of
|
|
69
|
-
const { x: n, y:
|
|
70
|
-
if (n < -60 || n > a.w + 60 ||
|
|
71
|
-
const
|
|
72
|
-
|
|
71
|
+
for (const o of c) {
|
|
72
|
+
const { x: n, y: r } = I(o.lat, o.lng);
|
|
73
|
+
if (n < -60 || n > a.w + 60 || r < -60 || r > a.h + 60) continue;
|
|
74
|
+
const i = `${Math.round(n / 44)}:${Math.round(r / 44)}`, u = e.get(i) ?? { pins: [], sx: 0, sy: 0 };
|
|
75
|
+
u.pins.push(o), u.sx += n, u.sy += r, e.set(i, u);
|
|
73
76
|
}
|
|
74
77
|
return [...e.values()].map((o) => ({
|
|
75
78
|
pins: o.pins,
|
|
76
79
|
x: o.sx / o.pins.length,
|
|
77
80
|
y: o.sy / o.pins.length
|
|
78
81
|
}));
|
|
79
|
-
}, [
|
|
82
|
+
}, [c, l, g, f, a]), j = (t, e) => {
|
|
80
83
|
z((o) => {
|
|
81
|
-
const n = o ??
|
|
82
|
-
if (
|
|
84
|
+
const n = o ?? l, r = Math.max(2, Math.min(18, n.zoom + t));
|
|
85
|
+
if (r === n.zoom) return n;
|
|
83
86
|
if (e) {
|
|
84
|
-
const
|
|
87
|
+
const i = w(n.lng, n.zoom) + (e.x - a.w / 2) / s, u = y(n.lat, n.zoom) + (e.y - a.h / 2) / s, $ = 2 ** (r - n.zoom);
|
|
85
88
|
return {
|
|
86
|
-
lng:
|
|
87
|
-
lat:
|
|
88
|
-
zoom:
|
|
89
|
+
lng: T(i * $ - (e.x - a.w / 2) / s, r),
|
|
90
|
+
lat: D(u * $ - (e.y - a.h / 2) / s, r),
|
|
91
|
+
zoom: r
|
|
89
92
|
};
|
|
90
93
|
}
|
|
91
|
-
return { ...n, zoom:
|
|
94
|
+
return { ...n, zoom: r };
|
|
92
95
|
});
|
|
93
96
|
};
|
|
94
|
-
return /* @__PURE__ */
|
|
97
|
+
return /* @__PURE__ */ b(
|
|
95
98
|
"div",
|
|
96
99
|
{
|
|
97
|
-
ref:
|
|
100
|
+
ref: L,
|
|
98
101
|
className: "relative h-full w-full cursor-grab overflow-hidden rounded-lg border border-slate-200 bg-slate-100 active:cursor-grabbing dark:border-border dark:bg-muted",
|
|
99
|
-
style: { minHeight:
|
|
102
|
+
style: { minHeight: U },
|
|
100
103
|
"data-base-map": !0,
|
|
101
104
|
onPointerDown: (t) => {
|
|
102
|
-
|
|
105
|
+
S.current = { x: t.clientX, y: t.clientY, lat: l.lat, lng: l.lng }, t.currentTarget.setPointerCapture(t.pointerId);
|
|
103
106
|
},
|
|
104
107
|
onPointerMove: (t) => {
|
|
105
|
-
const e =
|
|
108
|
+
const e = S.current;
|
|
106
109
|
if (!e) return;
|
|
107
|
-
const o = (t.clientX - e.x) /
|
|
110
|
+
const o = (t.clientX - e.x) / s, n = (t.clientY - e.y) / s;
|
|
108
111
|
z({
|
|
109
|
-
zoom:
|
|
110
|
-
lng:
|
|
111
|
-
lat:
|
|
112
|
+
zoom: l.zoom,
|
|
113
|
+
lng: T(w(e.lng, l.zoom) - o, l.zoom),
|
|
114
|
+
lat: D(y(e.lat, l.zoom) - n, l.zoom)
|
|
112
115
|
});
|
|
113
116
|
},
|
|
114
117
|
onPointerUp: () => {
|
|
115
|
-
|
|
118
|
+
S.current = null;
|
|
116
119
|
},
|
|
117
120
|
onWheel: (t) => {
|
|
118
121
|
var o;
|
|
119
122
|
t.preventDefault();
|
|
120
|
-
const e = (o =
|
|
121
|
-
|
|
123
|
+
const e = (o = L.current) == null ? void 0 : o.getBoundingClientRect();
|
|
124
|
+
j(
|
|
125
|
+
t.deltaY < 0 ? 1 : -1,
|
|
126
|
+
e ? { x: t.clientX - e.left, y: t.clientY - e.top } : void 0
|
|
127
|
+
);
|
|
122
128
|
},
|
|
123
129
|
children: [
|
|
124
|
-
|
|
130
|
+
X.map((t) => /* @__PURE__ */ h(
|
|
125
131
|
"img",
|
|
126
132
|
{
|
|
127
|
-
src:
|
|
133
|
+
src: Q(t.z, t.x, t.y),
|
|
128
134
|
alt: "",
|
|
129
135
|
draggable: !1,
|
|
130
136
|
className: "pointer-events-none absolute select-none",
|
|
131
|
-
style: { left: t.left, top: t.top, width:
|
|
137
|
+
style: { left: t.left, top: t.top, width: s, height: s }
|
|
132
138
|
},
|
|
133
139
|
`${t.z}/${t.x}/${t.y}`
|
|
134
140
|
)),
|
|
135
|
-
|
|
136
|
-
const { x: e, y: o } =
|
|
141
|
+
d.map((t) => {
|
|
142
|
+
const { x: e, y: o } = I(t.lat, t.lng);
|
|
137
143
|
if (e < -120 || e > a.w + 120 || o < -120 || o > a.h + 120) return null;
|
|
138
|
-
const n = Math.min(56, 18 + Math.sqrt(t.count) * 7),
|
|
139
|
-
return /* @__PURE__ */
|
|
144
|
+
const n = Math.min(56, 18 + Math.sqrt(t.count) * 7), r = t.color ?? "#00a5cc";
|
|
145
|
+
return /* @__PURE__ */ b(
|
|
140
146
|
"button",
|
|
141
147
|
{
|
|
142
148
|
type: "button",
|
|
143
|
-
onClick: (
|
|
144
|
-
|
|
149
|
+
onClick: (i) => {
|
|
150
|
+
i.stopPropagation(), N == null || N(t.id);
|
|
145
151
|
},
|
|
146
|
-
onPointerDown: (
|
|
152
|
+
onPointerDown: (i) => i.stopPropagation(),
|
|
147
153
|
className: "absolute z-[1] -translate-x-1/2 -translate-y-1/2",
|
|
148
154
|
style: { left: e, top: o },
|
|
149
155
|
"data-tip": `${t.label} — ${t.count} online`,
|
|
156
|
+
"aria-label": `${t.label}: ${t.count} online`,
|
|
150
157
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ b(
|
|
152
159
|
"span",
|
|
153
160
|
{
|
|
154
161
|
className: "flex items-center justify-center gap-0.5 rounded-full font-bold text-white",
|
|
155
162
|
style: {
|
|
156
163
|
width: n * 2,
|
|
157
164
|
height: n * 2,
|
|
158
|
-
background: `${
|
|
159
|
-
border: `2.5px dashed ${
|
|
160
|
-
boxShadow: `0 0 0 3px ${
|
|
165
|
+
background: `${r}45`,
|
|
166
|
+
border: `2.5px dashed ${r}`,
|
|
167
|
+
boxShadow: `0 0 0 3px ${r}22`,
|
|
161
168
|
fontSize: Math.max(12, Math.min(18, n / 2)),
|
|
162
169
|
textShadow: "0 1px 2px rgba(0,0,0,0.55)"
|
|
163
170
|
},
|
|
164
171
|
children: [
|
|
165
|
-
/* @__PURE__ */ h(
|
|
172
|
+
/* @__PURE__ */ h(
|
|
173
|
+
"svg",
|
|
174
|
+
{
|
|
175
|
+
width: "12",
|
|
176
|
+
height: "12",
|
|
177
|
+
viewBox: "0 0 24 24",
|
|
178
|
+
fill: "currentColor",
|
|
179
|
+
"aria-hidden": "true",
|
|
180
|
+
children: /* @__PURE__ */ h("path", { d: "M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z" })
|
|
181
|
+
}
|
|
182
|
+
),
|
|
166
183
|
t.count
|
|
167
184
|
]
|
|
168
185
|
}
|
|
@@ -171,7 +188,7 @@ function tt({
|
|
|
171
188
|
"span",
|
|
172
189
|
{
|
|
173
190
|
className: "mt-0.5 block whitespace-nowrap text-center text-[10.5px] font-semibold",
|
|
174
|
-
style: { color:
|
|
191
|
+
style: { color: r, textShadow: "0 0 3px #fff, 0 0 3px #fff" },
|
|
175
192
|
children: t.label
|
|
176
193
|
}
|
|
177
194
|
)
|
|
@@ -180,27 +197,55 @@ function tt({
|
|
|
180
197
|
`bubble-${t.id}`
|
|
181
198
|
);
|
|
182
199
|
}),
|
|
183
|
-
|
|
184
|
-
|
|
200
|
+
Z.map((t) => {
|
|
201
|
+
const { x: e, y: o } = I(t.lat, t.lng);
|
|
202
|
+
if (e < -40 || e > a.w + 40 || o < -40 || o > a.h + 40) return null;
|
|
203
|
+
const n = Math.max(0.15, Math.min(1, t.weight ?? 0.6)), r = 6 + n * 10;
|
|
204
|
+
return /* @__PURE__ */ h(
|
|
205
|
+
"button",
|
|
206
|
+
{
|
|
207
|
+
type: "button",
|
|
208
|
+
onClick: (i) => {
|
|
209
|
+
i.stopPropagation(), k == null || k(t.id);
|
|
210
|
+
},
|
|
211
|
+
onPointerDown: (i) => i.stopPropagation(),
|
|
212
|
+
className: "absolute z-[1] -translate-x-1/2 -translate-y-1/2 rounded-full",
|
|
213
|
+
style: {
|
|
214
|
+
left: e,
|
|
215
|
+
top: o,
|
|
216
|
+
width: r * 2,
|
|
217
|
+
height: r * 2,
|
|
218
|
+
background: `${t.color}${Math.round(40 + n * 100).toString(16).padStart(2, "0")}`,
|
|
219
|
+
border: `1.5px solid ${t.color}`
|
|
220
|
+
},
|
|
221
|
+
"data-tip": t.label,
|
|
222
|
+
"aria-label": t.label
|
|
223
|
+
},
|
|
224
|
+
`dot-${t.id}`
|
|
225
|
+
);
|
|
226
|
+
}),
|
|
227
|
+
A.map(
|
|
228
|
+
(t) => t.pins.length === 1 ? /* @__PURE__ */ b(
|
|
185
229
|
"button",
|
|
186
230
|
{
|
|
187
231
|
type: "button",
|
|
188
232
|
onClick: (e) => {
|
|
189
|
-
e.stopPropagation(),
|
|
233
|
+
e.stopPropagation(), P == null || P(t.pins[0].id);
|
|
190
234
|
},
|
|
191
235
|
onPointerDown: (e) => e.stopPropagation(),
|
|
192
236
|
className: "group absolute z-[2] -translate-x-1/2 -translate-y-full",
|
|
193
237
|
style: { left: t.x, top: t.y },
|
|
194
238
|
"data-tip": t.pins[0].label,
|
|
239
|
+
"aria-label": t.pins[0].label,
|
|
195
240
|
children: [
|
|
196
241
|
t.pins[0].pulse && /* @__PURE__ */ h(
|
|
197
242
|
"span",
|
|
198
243
|
{
|
|
199
|
-
className: "absolute left-1/2 top-[10px] h-6 w-6 -translate-x-1/2 -translate-y-1/2 animate-ping rounded-full",
|
|
244
|
+
className: "absolute left-1/2 top-[10px] h-6 w-6 -translate-x-1/2 -translate-y-1/2 motion-safe:animate-ping rounded-full",
|
|
200
245
|
style: { background: `${t.pins[0].color ?? "#ef4444"}66` }
|
|
201
246
|
}
|
|
202
247
|
),
|
|
203
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ b("svg", { width: "24", height: "30", viewBox: "0 0 24 30", "aria-hidden": "true", className: "relative", children: [
|
|
204
249
|
/* @__PURE__ */ h(
|
|
205
250
|
"path",
|
|
206
251
|
{
|
|
@@ -221,9 +266,9 @@ function tt({
|
|
|
221
266
|
type: "button",
|
|
222
267
|
onClick: (e) => {
|
|
223
268
|
e.stopPropagation(), z({
|
|
224
|
-
lat:
|
|
225
|
-
lng:
|
|
226
|
-
zoom: Math.min(18,
|
|
269
|
+
lat: D(f + (t.y - a.h / 2) / s, l.zoom),
|
|
270
|
+
lng: T(g + (t.x - a.w / 2) / s, l.zoom),
|
|
271
|
+
zoom: Math.min(18, l.zoom + 2)
|
|
227
272
|
});
|
|
228
273
|
},
|
|
229
274
|
onPointerDown: (e) => e.stopPropagation(),
|
|
@@ -231,35 +276,36 @@ function tt({
|
|
|
231
276
|
style: {
|
|
232
277
|
left: t.x,
|
|
233
278
|
top: t.y,
|
|
234
|
-
background: t.pins.some((e) => e.pulse) ? "#ef4444" : t.pins[0].color ?? "#00a5cc"
|
|
279
|
+
background: Y ? Y(t.pins) : t.pins.some((e) => e.pulse) ? "#ef4444" : t.pins[0].color ?? "#00a5cc"
|
|
235
280
|
},
|
|
236
281
|
"data-tip": `${t.pins.length} records — click to zoom`,
|
|
282
|
+
"aria-label": `${t.pins.length} records here — zoom in`,
|
|
237
283
|
children: t.pins.length
|
|
238
284
|
},
|
|
239
285
|
`c-${t.pins[0].id}`
|
|
240
286
|
)
|
|
241
287
|
),
|
|
242
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ b("div", { className: "absolute right-3 top-3 z-[3] flex flex-col overflow-hidden rounded-md border border-slate-200 bg-white shadow dark:border-border dark:bg-card", children: [
|
|
243
289
|
/* @__PURE__ */ h(
|
|
244
290
|
"button",
|
|
245
291
|
{
|
|
246
292
|
type: "button",
|
|
247
|
-
onClick: () =>
|
|
293
|
+
onClick: () => j(1),
|
|
248
294
|
onPointerDown: (t) => t.stopPropagation(),
|
|
249
295
|
className: "flex h-8 w-8 items-center justify-center text-slate-600 hover:bg-slate-50 dark:text-slate-300 dark:hover:bg-muted",
|
|
250
296
|
"aria-label": "Zoom in",
|
|
251
|
-
children: /* @__PURE__ */ h(
|
|
297
|
+
children: /* @__PURE__ */ h(G, { className: "h-4 w-4" })
|
|
252
298
|
}
|
|
253
299
|
),
|
|
254
300
|
/* @__PURE__ */ h(
|
|
255
301
|
"button",
|
|
256
302
|
{
|
|
257
303
|
type: "button",
|
|
258
|
-
onClick: () =>
|
|
304
|
+
onClick: () => j(-1),
|
|
259
305
|
onPointerDown: (t) => t.stopPropagation(),
|
|
260
306
|
className: "flex h-8 w-8 items-center justify-center border-t border-slate-100 text-slate-600 hover:bg-slate-50 dark:border-border dark:text-slate-300 dark:hover:bg-muted",
|
|
261
307
|
"aria-label": "Zoom out",
|
|
262
|
-
children: /* @__PURE__ */ h(
|
|
308
|
+
children: /* @__PURE__ */ h(J, { className: "h-4 w-4" })
|
|
263
309
|
}
|
|
264
310
|
)
|
|
265
311
|
] }),
|
|
@@ -269,5 +315,5 @@ function tt({
|
|
|
269
315
|
);
|
|
270
316
|
}
|
|
271
317
|
export {
|
|
272
|
-
|
|
318
|
+
nt as BaseMap
|
|
273
319
|
};
|