@stachelock/ui 0.6.14 → 0.6.16

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 (64) hide show
  1. package/dist/BaseInformationInput-DmtT4C7P.js +4 -0
  2. package/dist/BaseInformationInput.vue_vue_type_script_setup_true_lang-B-qW4F69.js +154 -0
  3. package/dist/{DynamicForm.vue_vue_type_script_setup_true_lang-DMtVUXUN.js → DynamicForm.vue_vue_type_script_setup_true_lang-D8QXRuSo.js} +1 -1
  4. package/dist/{DynamicFormField.vue_vue_type_script_setup_true_lang-DSq31jjH.js → DynamicFormField.vue_vue_type_script_setup_true_lang-DVoVGq7g.js} +86 -38
  5. package/dist/NamesInput-DHs3Gie7.js +4 -0
  6. package/dist/NamesInput.vue_vue_type_script_setup_true_lang-BO54mB4C.js +195 -0
  7. package/dist/NavigationItem.vue_vue_type_script_setup_true_lang-a6F3LQ_P.js +56 -0
  8. package/dist/ScreenSizeSelector.vue_vue_type_script_setup_true_lang-FINxrVod.js +183 -0
  9. package/dist/UiMapAll.vue_vue_type_script_setup_true_lang-DKcK0HmT.js +501 -0
  10. package/dist/charts/BaseChart.js +76 -56
  11. package/dist/charts/chartTheme.js +199 -60
  12. package/dist/charts/index.js +30 -27
  13. package/dist/components/Button.js +109 -89
  14. package/dist/composables/index.js +41 -32
  15. package/dist/composables/useMap.js +1 -1
  16. package/dist/forms/DynamicForm.js +1 -1
  17. package/dist/forms/DynamicFormField.js +1 -1
  18. package/dist/index.js +2268 -1856
  19. package/dist/layouts/DashboardLayout.js +218 -2
  20. package/dist/layouts/NavigationItem.js +1 -1
  21. package/dist/maps/UiMap.js +167 -150
  22. package/dist/maps/UiMapAll.js +1 -1
  23. package/dist/maps/UiMapMarker.js +227 -118
  24. package/dist/maps/index.js +1 -1
  25. package/dist/src/components/UiProgressBar.d.ts +1 -1
  26. package/dist/src/components/UiRadialProgressBar.d.ts +1 -1
  27. package/dist/src/components/charts/chartTheme.d.ts +53 -0
  28. package/dist/src/components/formatters/DateFormatter.d.ts +1 -1
  29. package/dist/src/components/index.d.ts +1 -0
  30. package/dist/src/components/inputs/DatepickerInput.d.ts +4 -4
  31. package/dist/src/components/layouts/DashboardLayout.d.ts +80 -18
  32. package/dist/src/components/layouts/ShowcaseCard.d.ts +1 -0
  33. package/dist/src/components/layouts/UiDetailPanel.d.ts +65 -0
  34. package/dist/src/components/layouts/UiSplitPanelLayout.d.ts +96 -0
  35. package/dist/src/components/layouts/index.d.ts +2 -0
  36. package/dist/src/components/maps/UiMap.d.ts +13 -2
  37. package/dist/src/components/maps/UiMapAll.d.ts +13 -0
  38. package/dist/src/components/maps/UiMapMarker.d.ts +47 -10
  39. package/dist/src/components/modals/UiSlideOver.d.ts +104 -0
  40. package/dist/src/components/modals/index.d.ts +1 -0
  41. package/dist/src/components/palettes/UiCommandPalette.d.ts +166 -0
  42. package/dist/src/components/palettes/index.d.ts +1 -0
  43. package/dist/src/components/wrappers/BreakpointWrapper.d.ts +36 -0
  44. package/dist/src/components/wrappers/ResponsivePreviewWrapper.d.ts +85 -0
  45. package/dist/src/components/wrappers/ScreenSizeSelector.d.ts +74 -0
  46. package/dist/src/components/wrappers/index.d.ts +3 -0
  47. package/dist/src/composables/index.d.ts +1 -0
  48. package/dist/src/composables/useScreenSize.d.ts +131 -0
  49. package/dist/src/types/form.d.ts +24 -1
  50. package/dist/src/types/index.d.ts +1 -0
  51. package/dist/src/types/layouts.d.ts +42 -0
  52. package/dist/src/types/palettes.d.ts +134 -0
  53. package/dist/src/views/components/index.d.ts +2 -0
  54. package/dist/src/views/index.d.ts +5 -1
  55. package/dist/src/views/layouts/index.d.ts +3 -1
  56. package/dist/style.css +1 -1
  57. package/dist/useMap-CM59TKX6.js +318 -0
  58. package/dist/useScreenSize-Kr6cn5Zr.js +104 -0
  59. package/dist/wrappers/index.js +10 -6
  60. package/package.json +1 -1
  61. package/dist/DashboardLayout.vue_vue_type_script_setup_true_lang-BAx4gKqh.js +0 -239
  62. package/dist/NavigationItem.vue_vue_type_script_setup_true_lang-C8aX-84Q.js +0 -56
  63. package/dist/UiMapAll.vue_vue_type_script_setup_true_lang-11yT7mTH.js +0 -471
  64. package/dist/useMap-BGg0H582.js +0 -297
@@ -0,0 +1,183 @@
1
+ import { defineComponent as h, ref as k, watch as v, provide as b, renderSlot as w, computed as p, createElementBlock as n, openBlock as a, createElementVNode as c, normalizeStyle as S, createVNode as z, withCtx as B, createCommentVNode as m, normalizeClass as f, Fragment as V, renderList as C, toDisplayString as $ } from "vue";
2
+ import { S as A, b as H, u as W, s as j } from "./useScreenSize-Kr6cn5Zr.js";
3
+ import { _ as x } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const M = h({
5
+ name: "BreakpointWrapper",
6
+ props: {
7
+ /**
8
+ * The screen size to provide to child components
9
+ */
10
+ size: {
11
+ type: String,
12
+ required: !0,
13
+ validator: (r) => ["sm", "md", "lg", "xl"].includes(r)
14
+ }
15
+ },
16
+ setup(r) {
17
+ const s = k(r.size);
18
+ return v(
19
+ () => r.size,
20
+ (t) => {
21
+ s.value = t;
22
+ }
23
+ ), b(A, s), {};
24
+ }
25
+ });
26
+ function R(r, s, t, d, i, u) {
27
+ return w(r.$slots, "default");
28
+ }
29
+ const L = /* @__PURE__ */ x(M, [["render", R]]), F = { class: "sl-responsive-preview-wrapper" }, N = /* @__PURE__ */ h({
30
+ __name: "ResponsivePreviewWrapper",
31
+ props: {
32
+ size: {},
33
+ showBorder: { type: Boolean, default: !1 },
34
+ centered: { type: Boolean, default: !0 },
35
+ backgroundColor: { default: "transparent" },
36
+ animate: { type: Boolean, default: !0 },
37
+ minHeight: { default: "auto" }
38
+ },
39
+ setup(r) {
40
+ const s = r, t = k(s.size);
41
+ v(
42
+ () => s.size,
43
+ (i) => {
44
+ t.value = i;
45
+ }
46
+ ), H({
47
+ previewMode: !0,
48
+ initialSize: s.size
49
+ });
50
+ const d = p(() => ({
51
+ maxWidth: {
52
+ sm: "375px",
53
+ md: "768px",
54
+ lg: "1024px",
55
+ xl: "100%"
56
+ }[t.value],
57
+ width: "100%",
58
+ margin: s.centered ? "0 auto" : "0",
59
+ backgroundColor: s.backgroundColor,
60
+ minHeight: s.minHeight,
61
+ transition: s.animate ? "max-width 0.3s ease" : "none",
62
+ ...s.showBorder && {
63
+ border: "1px solid #e5e7eb",
64
+ borderRadius: "0.5rem",
65
+ padding: "1rem"
66
+ }
67
+ }));
68
+ return (i, u) => (a(), n("div", F, [
69
+ c("div", {
70
+ class: "sl-preview-container sl-mx-auto",
71
+ style: S(d.value)
72
+ }, [
73
+ z(L, { size: t.value }, {
74
+ default: B(() => [
75
+ w(i.$slots, "default", {}, void 0, !0)
76
+ ]),
77
+ _: 3
78
+ }, 8, ["size"])
79
+ ], 4)
80
+ ]));
81
+ }
82
+ }), Q = /* @__PURE__ */ x(N, [["__scopeId", "data-v-7eff9c43"]]), P = ["title", "onClick"], E = {
83
+ key: 0,
84
+ class: "sl-h-5 sl-w-5",
85
+ fill: "none",
86
+ viewBox: "0 0 24 24",
87
+ "stroke-width": "1.5",
88
+ stroke: "currentColor"
89
+ }, q = {
90
+ key: 1,
91
+ class: "sl-h-5 sl-w-5",
92
+ fill: "none",
93
+ viewBox: "0 0 24 24",
94
+ "stroke-width": "1.5",
95
+ stroke: "currentColor"
96
+ }, D = {
97
+ key: 2,
98
+ class: "sl-h-5 sl-w-5",
99
+ fill: "none",
100
+ viewBox: "0 0 24 24",
101
+ "stroke-width": "1.5",
102
+ stroke: "currentColor"
103
+ }, I = {
104
+ key: 3,
105
+ class: "sl-h-5 sl-w-5",
106
+ fill: "none",
107
+ viewBox: "0 0 24 24",
108
+ "stroke-width": "1.5",
109
+ stroke: "currentColor"
110
+ }, K = {
111
+ key: 4,
112
+ class: "sl-ml-2 sl-text-sm sl-font-medium"
113
+ }, U = /* @__PURE__ */ h({
114
+ __name: "ScreenSizeSelector",
115
+ props: {
116
+ modelValue: {},
117
+ sizes: { default: () => ["sm", "md", "lg", "xl"] },
118
+ theme: { default: "light" },
119
+ showLabels: { type: Boolean, default: !1 },
120
+ activeColor: { default: "primary-600" },
121
+ autoFilter: { type: Boolean, default: !0 }
122
+ },
123
+ emits: ["update:modelValue"],
124
+ setup(r, { emit: s }) {
125
+ const t = r, d = s, { availablePreviewSizes: i } = W(), u = p(() => {
126
+ let l = t.sizes;
127
+ return t.autoFilter && (l = l.filter((e) => i.value.includes(e))), j.filter((e) => l.includes(e.id));
128
+ });
129
+ v(u, (l) => {
130
+ if (l.length > 0 && !l.some((e) => e.id === t.modelValue)) {
131
+ const e = l[l.length - 1];
132
+ d("update:modelValue", e.id);
133
+ }
134
+ }, { immediate: !0 });
135
+ const g = p(() => t.theme === "dark" ? "sl-bg-slate-700" : "sl-bg-gray-100"), _ = (l) => t.modelValue === l ? t.theme === "dark" ? "sl-bg-slate-600 sl-shadow sl-text-white" : `sl-bg-white sl-shadow sl-text-${t.activeColor}` : t.theme === "dark" ? "sl-text-slate-300 hover:sl-text-white" : "sl-text-gray-500 hover:sl-text-gray-700", y = (l) => {
136
+ d("update:modelValue", l);
137
+ };
138
+ return (l, e) => u.value.length > 0 ? (a(), n("div", {
139
+ key: 0,
140
+ class: f(["sl-inline-flex sl-items-center sl-gap-1 sl-rounded-lg sl-p-1", g.value])
141
+ }, [
142
+ (a(!0), n(V, null, C(u.value, (o) => (a(), n("button", {
143
+ key: o.id,
144
+ type: "button",
145
+ class: f(["sl-p-2 sl-rounded-md sl-transition-colors sl-flex sl-items-center sl-justify-center", _(o.id)]),
146
+ title: o.label,
147
+ onClick: (T) => y(o.id)
148
+ }, [
149
+ o.id === "sm" ? (a(), n("svg", E, [...e[0] || (e[0] = [
150
+ c("path", {
151
+ "stroke-linecap": "round",
152
+ "stroke-linejoin": "round",
153
+ d: "M10.5 1.5H8.25A2.25 2.25 0 006 3.75v16.5a2.25 2.25 0 002.25 2.25h7.5A2.25 2.25 0 0018 20.25V3.75a2.25 2.25 0 00-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"
154
+ }, null, -1)
155
+ ])])) : o.id === "md" ? (a(), n("svg", q, [...e[1] || (e[1] = [
156
+ c("path", {
157
+ "stroke-linecap": "round",
158
+ "stroke-linejoin": "round",
159
+ d: "M10.5 19.5h3m-6.75 2.25h10.5a2.25 2.25 0 002.25-2.25v-15a2.25 2.25 0 00-2.25-2.25H6.75A2.25 2.25 0 004.5 4.5v15a2.25 2.25 0 002.25 2.25z"
160
+ }, null, -1)
161
+ ])])) : o.id === "lg" ? (a(), n("svg", D, [...e[2] || (e[2] = [
162
+ c("path", {
163
+ "stroke-linecap": "round",
164
+ "stroke-linejoin": "round",
165
+ d: "M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25A2.25 2.25 0 015.25 3h13.5A2.25 2.25 0 0121 5.25z"
166
+ }, null, -1)
167
+ ])])) : o.id === "xl" ? (a(), n("svg", I, [...e[3] || (e[3] = [
168
+ c("path", {
169
+ "stroke-linecap": "round",
170
+ "stroke-linejoin": "round",
171
+ d: "M6 20.25h12m-7.5-3v3m3-3v3m-10.125-3h17.25c.621 0 1.125-.504 1.125-1.125V4.875c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125z"
172
+ }, null, -1)
173
+ ])])) : m("", !0),
174
+ r.showLabels ? (a(), n("span", K, $(o.label), 1)) : m("", !0)
175
+ ], 10, P))), 128))
176
+ ], 2)) : m("", !0);
177
+ }
178
+ });
179
+ export {
180
+ L as B,
181
+ Q as R,
182
+ U as _
183
+ };
@@ -0,0 +1,501 @@
1
+ import { defineComponent as de, ref as m, computed as B, watch as E, onMounted as ce, createElementBlock as g, openBlock as f, Fragment as S, createVNode as C, mergeProps as fe, withCtx as M, createElementVNode as x, createCommentVNode as y, renderSlot as Z, normalizeClass as d, unref as b, toDisplayString as U, renderList as K, createBlock as q, nextTick as me } from "vue";
2
+ import { PlusIcon as ge, MinusIcon as ve, ArrowsPointingOutIcon as he } from "@heroicons/vue/24/outline";
3
+ import pe from "./maps/UiMap.js";
4
+ import G from "./maps/UiMapMarker.js";
5
+ import ye from "./maps/UiInfoWindow.js";
6
+ import { u as be } from "./useMap-CM59TKX6.js";
7
+ import { g as H } from "./mapThemes-DFE9fZm3.js";
8
+ const ke = { class: "sl-flex sl-flex-col sl-gap-2" }, Se = /* @__PURE__ */ de({
9
+ __name: "UiMapAll",
10
+ props: {
11
+ /** Google Maps API key */
12
+ apiKey: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ /** Google Cloud Map ID (required for Advanced Markers) */
17
+ googleMapId: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ /** Array of markers or data objects */
22
+ items: {
23
+ type: Array,
24
+ default: () => []
25
+ },
26
+ /** Custom coordinate extractor for data objects */
27
+ coordinateExtractor: {
28
+ type: Function,
29
+ default: void 0
30
+ },
31
+ /** ID field for data objects */
32
+ idField: {
33
+ type: String,
34
+ default: "id"
35
+ },
36
+ /** Title field for data objects */
37
+ titleField: {
38
+ type: String,
39
+ default: "name"
40
+ },
41
+ /** Initial map center */
42
+ center: {
43
+ type: Object,
44
+ default: () => ({ lat: 39.8283, lng: -98.5795 })
45
+ // US center
46
+ },
47
+ /** Initial zoom level */
48
+ zoom: {
49
+ type: Number,
50
+ default: 4
51
+ },
52
+ /** Map width */
53
+ width: {
54
+ type: String,
55
+ default: "100%"
56
+ },
57
+ /** Map height */
58
+ height: {
59
+ type: String,
60
+ default: "400px"
61
+ },
62
+ /** Map theme */
63
+ theme: {
64
+ type: String,
65
+ default: "ultraLight"
66
+ },
67
+ /** Auto-switch theme based on dark mode */
68
+ autoTheme: {
69
+ type: Boolean,
70
+ default: !0
71
+ },
72
+ /** Enable clustering */
73
+ enableClustering: {
74
+ type: Boolean,
75
+ default: !0
76
+ },
77
+ /** Clustering options */
78
+ clusteringOptions: {
79
+ type: Object,
80
+ default: () => ({
81
+ minimumClusterSize: 2,
82
+ maxZoom: 15,
83
+ gridSize: 60,
84
+ maxMarkersWithoutClustering: 50
85
+ // Lower threshold for better performance
86
+ })
87
+ },
88
+ /** Maximum markers to render */
89
+ maxMarkers: {
90
+ type: Number,
91
+ default: 500
92
+ },
93
+ /** Marker color */
94
+ markerColor: {
95
+ type: String,
96
+ default: "primary"
97
+ },
98
+ /** Marker size */
99
+ markerSize: {
100
+ type: String,
101
+ default: "md"
102
+ },
103
+ /** Use pin-style markers */
104
+ pinMarkers: {
105
+ type: Boolean,
106
+ default: !1
107
+ },
108
+ /** Custom marker icon */
109
+ markerIcon: {
110
+ type: Object,
111
+ default: void 0
112
+ },
113
+ /** Show info window on marker click */
114
+ showInfoWindow: {
115
+ type: Boolean,
116
+ default: !0
117
+ },
118
+ /** Show avatar in info window */
119
+ showInfoAvatar: {
120
+ type: Boolean,
121
+ default: !0
122
+ },
123
+ /** Info window actions */
124
+ infoActions: {
125
+ type: Array,
126
+ default: () => []
127
+ },
128
+ /** Info window field mapping */
129
+ infoFields: {
130
+ type: Array,
131
+ default: () => []
132
+ },
133
+ /** Data loading state */
134
+ isDataLoading: {
135
+ type: Boolean,
136
+ default: !1
137
+ },
138
+ /** Data loading text */
139
+ dataLoadingText: {
140
+ type: String,
141
+ default: "Loading data..."
142
+ },
143
+ /** Show marker count badge */
144
+ showMarkerCount: {
145
+ type: Boolean,
146
+ default: !1
147
+ },
148
+ /** Show controls */
149
+ showControls: {
150
+ type: Boolean,
151
+ default: !0
152
+ },
153
+ /** Show default zoom controls */
154
+ showDefaultZoomControls: {
155
+ type: Boolean,
156
+ default: !0
157
+ },
158
+ /** Show fit to markers button */
159
+ showFitButton: {
160
+ type: Boolean,
161
+ default: !0
162
+ },
163
+ /** Controls position */
164
+ controlsPosition: {
165
+ type: String,
166
+ default: "bottom-left"
167
+ },
168
+ /** Auto fit to markers on load */
169
+ autoFit: {
170
+ type: Boolean,
171
+ default: !1
172
+ },
173
+ /** Fit padding */
174
+ fitPadding: {
175
+ type: Number,
176
+ default: 50
177
+ }
178
+ },
179
+ emits: ["marker-click", "cluster-click", "info-action", "ready", "error", "update:visible-markers", "update:center", "update:zoom"],
180
+ setup(n, { expose: J, emit: Q }) {
181
+ function X(e, o) {
182
+ let t = null;
183
+ return (...c) => {
184
+ t && clearTimeout(t), t = setTimeout(() => e(...c), o);
185
+ };
186
+ }
187
+ const l = n, h = Q, {
188
+ markers: z,
189
+ clusters: k,
190
+ processMarkers: F,
191
+ markersFromData: Y
192
+ } = be({
193
+ clustering: l.enableClustering ? {
194
+ enabled: !0,
195
+ ...l.clusteringOptions
196
+ } : { enabled: !1 }
197
+ }), T = m(!1), w = m(null), A = m(l.center), i = m(l.zoom), u = m(null), v = m(null), p = m(null), O = m(!1), r = m({
198
+ visible: !1,
199
+ loading: !1,
200
+ error: null,
201
+ title: "",
202
+ subtitle: "",
203
+ imageUrl: "",
204
+ details: [],
205
+ actions: [],
206
+ data: void 0
207
+ }), D = B(() => ({
208
+ apiKey: l.apiKey,
209
+ googleMapId: l.googleMapId,
210
+ width: l.width,
211
+ height: l.height,
212
+ theme: l.theme,
213
+ autoTheme: l.autoTheme
214
+ })), a = B(() => {
215
+ if (!l.items.length) return [];
216
+ const e = l.items[0];
217
+ return "position" in e && "id" in e ? l.items : Y(
218
+ l.items,
219
+ l.coordinateExtractor,
220
+ l.idField
221
+ ).slice(0, l.maxMarkers);
222
+ }), W = B(() => {
223
+ if (!l.enableClustering) return !1;
224
+ const e = l.clusteringOptions?.maxZoom ?? 15;
225
+ return i.value < e && k.value.length > 0;
226
+ }), N = X((e, o) => {
227
+ T.value || (T.value = !0, me(() => {
228
+ z.value = a.value, F(e, o), T.value = !1;
229
+ }));
230
+ }, 150), j = B(() => {
231
+ if (W.value && l.enableClustering) {
232
+ const e = /* @__PURE__ */ new Set();
233
+ return k.value.forEach((o) => {
234
+ o.markers.forEach((t) => e.add(t.id));
235
+ }), a.value.filter((o) => !e.has(o.id)).slice(0, l.maxMarkers);
236
+ }
237
+ return a.value.slice(0, l.maxMarkers);
238
+ });
239
+ function _(e) {
240
+ if (p.value = e.map, O.value = !0, h("ready", e), l.enableClustering && a.value.length > 0) {
241
+ z.value = a.value;
242
+ const o = e.map.getBounds();
243
+ if (o) {
244
+ const t = o.getNorthEast(), c = o.getSouthWest(), s = {
245
+ north: t.lat(),
246
+ south: c.lat(),
247
+ east: t.lng(),
248
+ west: c.lng()
249
+ };
250
+ u.value = s;
251
+ const P = e.map.getZoom() || i.value;
252
+ i.value = P, F(P, void 0);
253
+ }
254
+ }
255
+ l.autoFit && a.value.length > 0 && setTimeout(() => I(), 100);
256
+ }
257
+ function ee() {
258
+ L();
259
+ }
260
+ function te(e) {
261
+ const o = e.bounds;
262
+ u.value && !(Math.abs(u.value.north - o.north) > 1e-3 || Math.abs(u.value.south - o.south) > 1e-3 || Math.abs(u.value.east - o.east) > 1e-3 || Math.abs(u.value.west - o.west) > 1e-3) || (u.value = o, l.enableClustering && a.value.length > 0 && N(i.value, o));
263
+ }
264
+ function le(e) {
265
+ i.value !== e.zoom && (i.value = e.zoom, h("update:zoom", e.zoom), l.enableClustering && u.value && a.value.length > 0 && N(e.zoom, u.value));
266
+ }
267
+ function oe() {
268
+ }
269
+ function ae(e) {
270
+ h("error", e);
271
+ }
272
+ function se(e) {
273
+ h("marker-click", e), l.showInfoWindow && (v.value = e.marker, R(e.marker));
274
+ }
275
+ function ne(e, o) {
276
+ h("cluster-click", { cluster: e, markers: e.markers });
277
+ const t = new google.maps.LatLngBounds();
278
+ e.markers.forEach((c) => t.extend(c.position)), o.fitBounds(t, l.fitPadding);
279
+ }
280
+ function R(e) {
281
+ const o = e.data;
282
+ r.value = {
283
+ visible: !0,
284
+ loading: !1,
285
+ error: null,
286
+ title: e.title || o?.[l.titleField] || "Details",
287
+ subtitle: o?.subtitle || "",
288
+ imageUrl: o?.imageUrl || o?.profile_image || o?.image || "",
289
+ details: l.infoFields.length > 0 ? l.infoFields.map((t) => ({
290
+ label: t.label,
291
+ value: o?.[t.field] || "",
292
+ type: t.type
293
+ })) : [],
294
+ actions: l.infoActions,
295
+ data: e.data
296
+ };
297
+ }
298
+ function L() {
299
+ r.value.visible = !1, v.value = null;
300
+ }
301
+ function re() {
302
+ v.value && R(v.value);
303
+ }
304
+ function ie(e) {
305
+ h("info-action", { ...e, marker: v.value || void 0 });
306
+ }
307
+ function ue(e) {
308
+ return {
309
+ path: 0,
310
+ // google.maps.SymbolPath.CIRCLE
311
+ scale: Math.min(20 + Math.log(e.size) * 5, 40),
312
+ fillColor: H(e.size),
313
+ fillOpacity: 0.8,
314
+ strokeColor: "#ffffff",
315
+ strokeWeight: 2
316
+ };
317
+ }
318
+ function $() {
319
+ if (w.value) {
320
+ const e = i.value;
321
+ w.value.setZoom?.(Math.min(e + 1, 21));
322
+ }
323
+ }
324
+ function V() {
325
+ if (w.value) {
326
+ const e = i.value;
327
+ w.value.setZoom?.(Math.max(e - 1, 1));
328
+ }
329
+ }
330
+ function I() {
331
+ if (!p.value || a.value.length === 0) return;
332
+ const e = new google.maps.LatLngBounds();
333
+ a.value.forEach((o) => e.extend(o.position)), p.value.fitBounds(e, l.fitPadding);
334
+ }
335
+ return E(() => l.items, () => {
336
+ z.value = a.value, l.enableClustering && u.value && a.value.length > 0 && F(i.value, u.value), l.autoFit && O.value && a.value.length > 0 && I();
337
+ }, { deep: !0 }), E(() => l.center, (e) => {
338
+ A.value = e;
339
+ }), E(() => l.zoom, (e) => {
340
+ i.value = e;
341
+ }), ce(() => {
342
+ z.value = a.value;
343
+ }), J({
344
+ getMap: () => p.value,
345
+ fitToMarkers: I,
346
+ zoomIn: $,
347
+ zoomOut: V,
348
+ panTo: (e) => p.value?.panTo(e),
349
+ setZoom: (e) => p.value?.setZoom(e),
350
+ closeInfoWindow: L,
351
+ getMarkers: () => a.value,
352
+ getVisibleMarkers: () => j.value,
353
+ getClusters: () => k.value,
354
+ getClusterIcon: ue
355
+ }), (e, o) => (f(), g(S, null, [
356
+ C(pe, fe({
357
+ ref_key: "mapRef",
358
+ ref: w
359
+ }, D.value, {
360
+ "show-custom-controls": n.showControls,
361
+ "show-default-zoom-controls": n.showDefaultZoomControls,
362
+ "controls-position": n.controlsPosition,
363
+ onReady: _,
364
+ onClick: ee,
365
+ onBoundsChanged: te,
366
+ onZoomChanged: le,
367
+ onIdle: oe,
368
+ onError: ae,
369
+ center: A.value,
370
+ "onUpdate:center": o[0] || (o[0] = (t) => A.value = t),
371
+ zoom: i.value,
372
+ "onUpdate:zoom": o[1] || (o[1] = (t) => i.value = t)
373
+ }), {
374
+ default: M(({ ready: t, map: c }) => [
375
+ t && c ? (f(), g(S, { key: 0 }, [
376
+ W.value ? (f(!0), g(S, { key: 0 }, K(b(k), (s) => (f(), q(G, {
377
+ key: s.id,
378
+ position: s.position,
379
+ id: s.id,
380
+ title: `${s.size} items in this area`,
381
+ ready: t,
382
+ cluster: !0,
383
+ "cluster-size": s.size,
384
+ "cluster-color": b(H)(s.size),
385
+ "z-index": 1e3,
386
+ onClick: (P) => ne(s, c)
387
+ }, null, 8, ["position", "id", "title", "ready", "cluster-size", "cluster-color", "onClick"]))), 128)) : y("", !0),
388
+ (f(!0), g(S, null, K(j.value, (s) => (f(), q(G, {
389
+ key: s.id,
390
+ position: s.position,
391
+ id: s.id,
392
+ title: s.title,
393
+ data: s.data,
394
+ ready: t,
395
+ color: n.markerColor,
396
+ size: n.markerSize,
397
+ pin: n.pinMarkers,
398
+ icon: n.markerIcon,
399
+ "z-index": 100,
400
+ onClick: se
401
+ }, null, 8, ["position", "id", "title", "data", "ready", "color", "size", "pin", "icon"]))), 128))
402
+ ], 64)) : y("", !0)
403
+ ]),
404
+ overlay: M(({ isDark: t }) => [
405
+ n.isDataLoading ? (f(), g("div", {
406
+ key: 0,
407
+ class: d(["sl-absolute sl-top-4 sl-left-4 sl-z-10 sl-flex sl-items-center sl-gap-2 sl-px-3 sl-py-2 sl-rounded-lg sl-shadow-md", t ? "sl-bg-gray-800" : "sl-bg-white"])
408
+ }, [
409
+ x("div", {
410
+ class: d(["sl-animate-spin sl-h-4 sl-w-4 sl-border-2 sl-border-t-transparent sl-rounded-full", t ? "sl-border-primary-400" : "sl-border-primary-600"])
411
+ }, null, 2),
412
+ x("span", {
413
+ class: d(["sl-text-sm", t ? "sl-text-gray-300" : "sl-text-gray-600"])
414
+ }, U(n.dataLoadingText), 3)
415
+ ], 2)) : y("", !0),
416
+ n.showMarkerCount && a.value.length > 0 ? (f(), g("div", {
417
+ key: 1,
418
+ class: d(["sl-absolute sl-top-4 sl-right-4 sl-z-10 sl-px-2 sl-py-1 sl-rounded-md sl-text-xs sl-font-medium", t ? "sl-bg-gray-800/90 sl-text-gray-300" : "sl-bg-white/90 sl-text-gray-700"])
419
+ }, U(a.value.length) + " " + U(a.value.length === 1 ? "marker" : "markers"), 3)) : y("", !0),
420
+ Z(e.$slots, "overlay", {
421
+ isDark: t,
422
+ markers: a.value,
423
+ clusters: b(k)
424
+ })
425
+ ]),
426
+ controls: M(({ isDark: t }) => [
427
+ x("div", ke, [
428
+ n.showDefaultZoomControls ? (f(), g("div", {
429
+ key: 0,
430
+ class: d(["sl-flex sl-flex-col sl-rounded-lg sl-shadow-md sl-overflow-hidden", t ? "sl-bg-gray-800" : "sl-bg-white"])
431
+ }, [
432
+ x("button", {
433
+ onClick: $,
434
+ class: d(["sl-w-8 sl-h-8 sl-flex sl-items-center sl-justify-center sl-border-b sl-transition-colors", t ? "sl-border-gray-700 hover:sl-bg-gray-700" : "sl-border-gray-200 hover:sl-bg-gray-50"]),
435
+ title: "Zoom in"
436
+ }, [
437
+ C(b(ge), {
438
+ class: d(["sl-w-4 sl-h-4", t ? "sl-text-gray-300" : "sl-text-gray-600"])
439
+ }, null, 8, ["class"])
440
+ ], 2),
441
+ x("button", {
442
+ onClick: V,
443
+ class: d(["sl-w-8 sl-h-8 sl-flex sl-items-center sl-justify-center sl-transition-colors", t ? "hover:sl-bg-gray-700" : "hover:sl-bg-gray-50"]),
444
+ title: "Zoom out"
445
+ }, [
446
+ C(b(ve), {
447
+ class: d(["sl-w-4 sl-h-4", t ? "sl-text-gray-300" : "sl-text-gray-600"])
448
+ }, null, 8, ["class"])
449
+ ], 2)
450
+ ], 2)) : y("", !0),
451
+ n.showFitButton && a.value.length > 0 ? (f(), g("button", {
452
+ key: 1,
453
+ onClick: I,
454
+ class: d(["sl-w-8 sl-h-8 sl-flex sl-items-center sl-justify-center sl-rounded-lg sl-shadow-md sl-transition-colors", t ? "sl-bg-gray-800 hover:sl-bg-gray-700" : "sl-bg-white hover:sl-bg-gray-50"]),
455
+ title: "Fit to all markers"
456
+ }, [
457
+ C(b(he), {
458
+ class: d(["sl-w-4 sl-h-4", t ? "sl-text-gray-300" : "sl-text-gray-600"])
459
+ }, null, 8, ["class"])
460
+ ], 2)) : y("", !0),
461
+ Z(e.$slots, "controls", { isDark: t })
462
+ ])
463
+ ]),
464
+ _: 3
465
+ }, 16, ["show-custom-controls", "show-default-zoom-controls", "controls-position", "center", "zoom"]),
466
+ C(ye, {
467
+ visible: r.value.visible,
468
+ "onUpdate:visible": o[2] || (o[2] = (t) => r.value.visible = t),
469
+ loading: r.value.loading,
470
+ error: r.value.error,
471
+ title: r.value.title,
472
+ subtitle: r.value.subtitle,
473
+ "image-url": r.value.imageUrl,
474
+ details: r.value.details,
475
+ actions: r.value.actions,
476
+ data: r.value.data,
477
+ "show-avatar": n.showInfoAvatar,
478
+ onClose: L,
479
+ onRetry: re,
480
+ onAction: ie
481
+ }, {
482
+ footer: M(() => [
483
+ Z(e.$slots, "info-footer", {
484
+ data: r.value.data,
485
+ marker: v.value
486
+ })
487
+ ]),
488
+ default: M(() => [
489
+ Z(e.$slots, "info-content", {
490
+ data: r.value.data,
491
+ marker: v.value
492
+ })
493
+ ]),
494
+ _: 3
495
+ }, 8, ["visible", "loading", "error", "title", "subtitle", "image-url", "details", "actions", "data", "show-avatar"])
496
+ ], 64));
497
+ }
498
+ });
499
+ export {
500
+ Se as _
501
+ };