@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.
Files changed (90) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +290 -23
  4. package/dist/index.js +679 -659
  5. package/dist/shared/components/BaseMap.js +149 -103
  6. package/dist/shared/components/CollectionBrowserView.js +813 -826
  7. package/dist/shared/components/ErrorNotice.js +169 -0
  8. package/dist/shared/components/ErrorSurface.js +23 -17
  9. package/dist/shared/components/ListLoadError.js +8 -29
  10. package/dist/shared/components/LoadErrorNote.js +38 -21
  11. package/dist/shared/components/QueryErrorState.js +8 -11
  12. package/dist/shared/components/ReportView.js +1320 -1291
  13. package/dist/shared/components/chat/ChannelArchive.js +60 -60
  14. package/dist/shared/components/chat/ChannelExtras.js +74 -74
  15. package/dist/shared/components/chat/ChatPanel.js +368 -367
  16. package/dist/shared/components/command-center/CommandCenterView.js +313 -69
  17. package/dist/shared/components/command-center/Customize.js +353 -0
  18. package/dist/shared/components/command-center/Header.js +279 -53
  19. package/dist/shared/components/command-center/KioskLinks.js +198 -0
  20. package/dist/shared/components/command-center/PeekPanel.js +144 -3
  21. package/dist/shared/components/command-center/announce.js +13 -0
  22. package/dist/shared/components/command-center/board-prefs.js +99 -0
  23. package/dist/shared/components/command-center/freshness.js +29 -0
  24. package/dist/shared/components/command-center/layout.js +56 -0
  25. package/dist/shared/components/command-center/panels/AttentionPanel.js +132 -3
  26. package/dist/shared/components/command-center/panels/Banner.js +75 -0
  27. package/dist/shared/components/command-center/panels/BoardSettings.js +224 -0
  28. package/dist/shared/components/command-center/panels/FeedPanel.js +145 -29
  29. package/dist/shared/components/command-center/panels/FlowPanel.js +154 -56
  30. package/dist/shared/components/command-center/panels/ForecastPanel.js +244 -3
  31. package/dist/shared/components/command-center/panels/MapLegend.js +266 -0
  32. package/dist/shared/components/command-center/panels/MapPanel.js +216 -66
  33. package/dist/shared/components/command-center/panels/PartnersPanel.js +49 -3
  34. package/dist/shared/components/command-center/panels/PeoplePanel.js +258 -40
  35. package/dist/shared/components/command-center/panels/RegionPicker.js +88 -3
  36. package/dist/shared/components/command-center/panels/SystemPanel.js +158 -38
  37. package/dist/shared/components/command-center/panels/ThroughputPanel.js +307 -3
  38. package/dist/shared/components/command-center/panels/TimeBar.js +227 -6
  39. package/dist/shared/components/command-center/panels/TrafficPanel.js +12 -8
  40. package/dist/shared/components/command-center/panels/WorkloadPanel.js +82 -3
  41. package/dist/shared/components/command-center/panels/attention-actions.js +267 -0
  42. package/dist/shared/components/command-center/panels/map-shared.js +95 -0
  43. package/dist/shared/components/command-center/panels/registry.js +87 -19
  44. package/dist/shared/components/command-center/shell-hooks.js +118 -0
  45. package/dist/shared/components/command-center/shortcuts.js +37 -0
  46. package/dist/shared/components/command-center/theme.js +39 -21
  47. package/dist/shared/components/command-center/time.js +52 -0
  48. package/dist/shared/components/command-center/url-state.js +54 -0
  49. package/dist/shared/components/command-center/work-links.js +32 -0
  50. package/dist/shared/components/help-videos/editor/ClipsPanel.js +49 -48
  51. package/dist/shared/components/help-videos/editor/PublishButton.js +37 -36
  52. package/dist/shared/components/help-videos/editor/StatsTab.js +45 -44
  53. package/dist/shared/components/help-videos/editor/VersionsTab.js +29 -28
  54. package/dist/shared/components/help-videos/library/AuthorRolesButton.js +19 -18
  55. package/dist/shared/components/help-videos/library/HelpVideoLibrary.js +132 -129
  56. package/dist/shared/components/help-videos/library/LearningPathsPanel.js +42 -41
  57. package/dist/shared/components/help-videos/settings/HouseStyleButton.js +21 -20
  58. package/dist/shared/components/help-videos/settings/RenderSettingsButton.js +22 -21
  59. package/dist/shared/components/import/DocumentAutofillButton.js +24 -20
  60. package/dist/shared/components/import/ImportFromFileButton.js +61 -60
  61. package/dist/shared/components/imports/ImportStalenessControl.js +20 -21
  62. package/dist/shared/components/imports/NewImportDialog.js +29 -28
  63. package/dist/shared/components/imports/RunDetailSheet.js +63 -63
  64. package/dist/shared/components/item-edit/FieldRow.js +329 -329
  65. package/dist/shared/components/item-edit/InlineTableField.js +898 -898
  66. package/dist/shared/components/item-edit/PersonalDefaultControl.js +57 -56
  67. package/dist/shared/components/item-edit/PlanGrid.js +220 -221
  68. package/dist/shared/components/item-edit/RecordGrantTools.js +49 -48
  69. package/dist/shared/components/item-edit/placement-behaviour.js +68 -67
  70. package/dist/shared/components/layout-editor/inspector/ColumnFit.js +24 -23
  71. package/dist/shared/components/layout-editor/inspector/PickerPreview.js +17 -16
  72. package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +41 -41
  73. package/dist/shared/components/layout-editor/outputs/output-api.js +33 -31
  74. package/dist/shared/components/layout-editor/overview/overview-api.js +84 -83
  75. package/dist/shared/components/layout-editor/useLayoutDraft.js +47 -42
  76. package/dist/shared/components/monitoring/InactiveUserLinksView.js +10 -9
  77. package/dist/shared/components/monitoring/TrafficMiniMap.js +111 -70
  78. package/dist/shared/components/panels/SlaClock.js +35 -36
  79. package/dist/shared/components/pipeline/PipelineEditorView.js +311 -312
  80. package/dist/shared/components/pipeline/TeamSuggestions.js +31 -30
  81. package/dist/shared/components/profile/AgentsPanel.js +73 -72
  82. package/dist/shared/components/profile/MailSuppressedPill.js +22 -21
  83. package/dist/shared/components/support/SupportRequestDialog.js +85 -81
  84. package/dist/shared/components/support/SupportView.js +94 -87
  85. package/dist/shared/lib/autofill-poll.js +21 -18
  86. package/dist/shared/lib/error-actions.js +85 -0
  87. package/dist/shared/lib/error-message.js +223 -82
  88. package/dist/shared/lib/error-toast.js +71 -13
  89. package/dist/shared/lib/safe-error.js +136 -38
  90. package/package.json +1 -1
@@ -1,168 +1,185 @@
1
- import { jsxs as w, jsx as h } from "react/jsx-runtime";
2
- import { useRef as j, useState as Y, useEffect as D, useMemo as _ } from "react";
3
- import { Plus as A, Minus as F } from "lucide-react";
4
- const l = 256, G = (i, c, p) => `https://tile.openstreetmap.org/${i}/${c}/${p}.png`;
5
- function y(i, c) {
6
- return (i + 180) / 360 * 2 ** c;
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 b(i, c) {
9
- const p = i * Math.PI / 180;
10
- return (1 - Math.log(Math.tan(p) + 1 / Math.cos(p)) / Math.PI) / 2 * 2 ** c;
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 S(i, c) {
13
- return i / 2 ** c * 360 - 180;
12
+ function T(c, d) {
13
+ return c / 2 ** d * 360 - 180;
14
14
  }
15
- function C(i, c) {
16
- const p = Math.PI - 2 * Math.PI * i / 2 ** c;
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 tt({
20
- pins: i,
21
- bubbles: c = [],
19
+ function nt({
20
+ pins: c,
21
+ bubbles: d = [],
22
22
  statusLine: p,
23
- onPinClick: k,
24
- onBubbleClick: $,
25
- minHeight: W = 420,
26
- focus: u = null
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 N = j(null), [a, X] = Y({ w: 800, h: 520 }), [U, z] = Y(null), L = j(null);
29
- D(() => {
30
- const t = N.current;
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(() => X({ w: t.clientWidth, h: t.clientHeight }));
35
+ const e = new ResizeObserver(() => q({ w: t.clientWidth, h: t.clientHeight }));
33
36
  return e.observe(t), () => e.disconnect();
34
37
  }, []);
35
- const E = j(!1);
36
- D(() => {
37
- const t = [...i, ...c];
38
- if (E.current || t.length === 0) return;
39
- E.current = !0;
40
- const e = t.map((M) => M.lat), o = t.map((M) => M.lng), n = Math.min(...e), s = Math.max(...e), d = Math.min(...o), m = Math.max(...o), P = { lat: (n + s) / 2, lng: (d + m) / 2 };
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(y(m, x) - y(d, x)) * l, V = Math.abs(b(n, x) - b(s, x)) * l;
44
- if (M < a.w * 0.85 && V < a.h * 0.85) break;
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({ ...P, zoom: x });
48
- }, [i, c, a]), D(() => {
49
- u && z({ lat: u.lat, lng: u.lng, zoom: u.zoom ?? 8 });
50
- }, [u == null ? void 0 : u.nonce]);
51
- const r = U ?? { lat: 39.5, lng: -98.35, zoom: 4 }, f = y(r.lng, r.zoom), g = b(r.lat, r.zoom), R = [], v = 2 ** r.zoom, Z = Math.floor(f - a.w / 2 / l), q = Math.ceil(f + a.w / 2 / l), B = Math.max(0, Math.floor(g - a.h / 2 / l)), H = Math.min(v - 1, Math.ceil(g + a.h / 2 / l));
52
- for (let t = Z; t <= q; t++)
53
- for (let e = B; e <= H; 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
- R.push({
56
- z: r.zoom,
58
+ X.push({
59
+ z: l.zoom,
57
60
  x: o,
58
61
  y: e,
59
- left: a.w / 2 + (t - f) * l,
60
- top: a.h / 2 + (e - g) * l
62
+ left: a.w / 2 + (t - g) * s,
63
+ top: a.h / 2 + (e - f) * s
61
64
  });
62
65
  }
63
- const T = (t, e) => ({
64
- x: a.w / 2 + (y(e, r.zoom) - f) * l,
65
- y: a.h / 2 + (b(t, r.zoom) - g) * l
66
- }), O = _(() => {
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 i) {
69
- const { x: n, y: s } = T(o.lat, o.lng);
70
- if (n < -60 || n > a.w + 60 || s < -60 || s > a.h + 60) continue;
71
- const d = `${Math.round(n / 44)}:${Math.round(s / 44)}`, m = e.get(d) ?? { pins: [], sx: 0, sy: 0 };
72
- m.pins.push(o), m.sx += n, m.sy += s, e.set(d, m);
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
- }, [i, r, f, g, a]), I = (t, e) => {
82
+ }, [c, l, g, f, a]), j = (t, e) => {
80
83
  z((o) => {
81
- const n = o ?? r, s = Math.max(2, Math.min(18, n.zoom + t));
82
- if (s === n.zoom) return n;
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 d = y(n.lng, n.zoom) + (e.x - a.w / 2) / l, m = b(n.lat, n.zoom) + (e.y - a.h / 2) / l, P = 2 ** (s - n.zoom);
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: S(d * P - (e.x - a.w / 2) / l, s),
87
- lat: C(m * P - (e.y - a.h / 2) / l, s),
88
- zoom: s
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: s };
94
+ return { ...n, zoom: r };
92
95
  });
93
96
  };
94
- return /* @__PURE__ */ w(
97
+ return /* @__PURE__ */ b(
95
98
  "div",
96
99
  {
97
- ref: N,
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: W },
102
+ style: { minHeight: U },
100
103
  "data-base-map": !0,
101
104
  onPointerDown: (t) => {
102
- L.current = { x: t.clientX, y: t.clientY, lat: r.lat, lng: r.lng }, t.currentTarget.setPointerCapture(t.pointerId);
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 = L.current;
108
+ const e = S.current;
106
109
  if (!e) return;
107
- const o = (t.clientX - e.x) / l, n = (t.clientY - e.y) / l;
110
+ const o = (t.clientX - e.x) / s, n = (t.clientY - e.y) / s;
108
111
  z({
109
- zoom: r.zoom,
110
- lng: S(y(e.lng, r.zoom) - o, r.zoom),
111
- lat: C(b(e.lat, r.zoom) - n, r.zoom)
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
- L.current = null;
118
+ S.current = null;
116
119
  },
117
120
  onWheel: (t) => {
118
121
  var o;
119
122
  t.preventDefault();
120
- const e = (o = N.current) == null ? void 0 : o.getBoundingClientRect();
121
- I(t.deltaY < 0 ? 1 : -1, e ? { x: t.clientX - e.left, y: t.clientY - e.top } : void 0);
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
- R.map((t) => /* @__PURE__ */ h(
130
+ X.map((t) => /* @__PURE__ */ h(
125
131
  "img",
126
132
  {
127
- src: G(t.z, t.x, t.y),
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: l, height: l }
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
- c.map((t) => {
136
- const { x: e, y: o } = T(t.lat, t.lng);
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), s = t.color ?? "#00a5cc";
139
- return /* @__PURE__ */ w(
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: (d) => {
144
- d.stopPropagation(), $ == null || $(t.id);
149
+ onClick: (i) => {
150
+ i.stopPropagation(), N == null || N(t.id);
145
151
  },
146
- onPointerDown: (d) => d.stopPropagation(),
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__ */ w(
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: `${s}45`,
159
- border: `2.5px dashed ${s}`,
160
- boxShadow: `0 0 0 3px ${s}22`,
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("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", 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" }) }),
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: s, textShadow: "0 0 3px #fff, 0 0 3px #fff" },
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
- O.map(
184
- (t) => t.pins.length === 1 ? /* @__PURE__ */ w(
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(), k == null || k(t.pins[0].id);
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__ */ w("svg", { width: "24", height: "30", viewBox: "0 0 24 30", "aria-hidden": "true", className: "relative", children: [
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: C(g + (t.y - a.h / 2) / l, r.zoom),
225
- lng: S(f + (t.x - a.w / 2) / l, r.zoom),
226
- zoom: Math.min(18, r.zoom + 2)
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__ */ w("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: [
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: () => I(1),
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(A, { className: "h-4 w-4" })
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: () => I(-1),
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(F, { className: "h-4 w-4" })
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
- tt as BaseMap
318
+ nt as BaseMap
273
319
  };