@ogc-maps/storybook-components 0.15.0 → 0.16.0

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 (165) hide show
  1. package/LICENSE +661 -0
  2. package/dist/{BasemapSwitcher-BW7lyZ2Y.js → BasemapSwitcher-DuqVusX0.js} +9 -9
  3. package/dist/CollapsibleControl-BTIkiTmU.js +60 -0
  4. package/dist/CoordinateDisplay-BblQ34mS.js +154 -0
  5. package/dist/{ExportButton-Ck1dESnc.js → ExportButton-C8hCCsav.js} +7 -7
  6. package/dist/{FeatureDetailPanel-CkFpdEKW.js → FeatureDetailPanel-DgCHiNi9.js} +16 -16
  7. package/dist/FeatureTooltip-DHjMZC0u.js +49 -0
  8. package/dist/{LayerPanel-C6H74vhO.js → LayerPanel-BkDbZ66Z.js} +28 -28
  9. package/dist/Legend-CvBd-v0n.js +285 -0
  10. package/dist/PropertyList-0EonV_BQ.js +33 -0
  11. package/dist/SearchPanel-DIb7aYVs.js +725 -0
  12. package/dist/components/BasemapSwitcher/index.js +1 -1
  13. package/dist/components/CollapsibleControl/CollapsibleControl.d.ts +4 -1
  14. package/dist/components/CollapsibleControl/CollapsibleControl.d.ts.map +1 -1
  15. package/dist/components/CollapsibleControl/index.js +1 -1
  16. package/dist/components/CompassControl/CompassControl.d.ts +19 -0
  17. package/dist/components/CompassControl/CompassControl.d.ts.map +1 -0
  18. package/dist/components/CompassControl/index.d.ts +3 -0
  19. package/dist/components/CompassControl/index.d.ts.map +1 -0
  20. package/dist/components/CoordinateDisplay/CoordinateDisplay.d.ts +35 -4
  21. package/dist/components/CoordinateDisplay/CoordinateDisplay.d.ts.map +1 -1
  22. package/dist/components/CoordinateDisplay/CoordinateDisplay.test.d.ts +2 -0
  23. package/dist/components/CoordinateDisplay/CoordinateDisplay.test.d.ts.map +1 -0
  24. package/dist/components/CoordinateDisplay/index.d.ts +1 -1
  25. package/dist/components/CoordinateDisplay/index.d.ts.map +1 -1
  26. package/dist/components/CoordinateDisplay/index.js +5 -3
  27. package/dist/components/Cql2FilterEditor/Cql2FilterEditor.d.ts.map +1 -1
  28. package/dist/components/Cql2FilterEditor/FilterRuleGroupEditor.d.ts.map +1 -1
  29. package/dist/components/Cql2FilterEditor/ParameterizableField.d.ts +30 -0
  30. package/dist/components/Cql2FilterEditor/ParameterizableField.d.ts.map +1 -0
  31. package/dist/components/Cql2FilterEditor/styles.d.ts +2 -2
  32. package/dist/components/Cql2FilterEditor/styles.d.ts.map +1 -1
  33. package/dist/components/ExportButton/index.js +1 -1
  34. package/dist/components/ExportModal/ExportModal.d.ts +20 -1
  35. package/dist/components/ExportModal/ExportModal.d.ts.map +1 -1
  36. package/dist/components/ExportModal/index.d.ts +1 -1
  37. package/dist/components/ExportModal/index.d.ts.map +1 -1
  38. package/dist/components/FeatureDetailPanel/index.js +1 -1
  39. package/dist/components/FeatureTooltip/index.js +1 -1
  40. package/dist/components/GlobalSearchBar/GlobalSearchBar.d.ts +25 -0
  41. package/dist/components/GlobalSearchBar/GlobalSearchBar.d.ts.map +1 -0
  42. package/dist/components/GlobalSearchBar/GlobalSearchBar.test.d.ts +2 -0
  43. package/dist/components/GlobalSearchBar/GlobalSearchBar.test.d.ts.map +1 -0
  44. package/dist/components/GlobalSearchBar/index.d.ts +3 -0
  45. package/dist/components/GlobalSearchBar/index.d.ts.map +1 -0
  46. package/dist/components/GlobalSearchConfigEditor/GlobalSearchConfigEditor.d.ts +22 -0
  47. package/dist/components/GlobalSearchConfigEditor/GlobalSearchConfigEditor.d.ts.map +1 -0
  48. package/dist/components/GlobalSearchConfigEditor/GlobalSearchConfigEditor.test.d.ts +2 -0
  49. package/dist/components/GlobalSearchConfigEditor/GlobalSearchConfigEditor.test.d.ts.map +1 -0
  50. package/dist/components/GlobalSearchConfigEditor/index.d.ts +3 -0
  51. package/dist/components/GlobalSearchConfigEditor/index.d.ts.map +1 -0
  52. package/dist/components/ImageryEditor/ImageryEditor.d.ts +0 -1
  53. package/dist/components/ImageryEditor/ImageryEditor.d.ts.map +1 -1
  54. package/dist/components/ImageryEditor/index.d.ts +2 -1
  55. package/dist/components/ImageryEditor/index.d.ts.map +1 -1
  56. package/dist/components/ImageryPanel/ImageryPanel.d.ts.map +1 -1
  57. package/dist/components/InfoControl/InfoControl.d.ts +12 -0
  58. package/dist/components/InfoControl/InfoControl.d.ts.map +1 -0
  59. package/dist/components/InfoControl/InfoModal.d.ts +16 -0
  60. package/dist/components/InfoControl/InfoModal.d.ts.map +1 -0
  61. package/dist/components/InfoControl/index.d.ts +5 -0
  62. package/dist/components/InfoControl/index.d.ts.map +1 -0
  63. package/dist/components/LayerEditor/LayerEditor.d.ts +6 -1
  64. package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
  65. package/dist/components/LayerEditor/LayerList.d.ts +8 -1
  66. package/dist/components/LayerEditor/LayerList.d.ts.map +1 -1
  67. package/dist/components/LayerEditor/index.d.ts +1 -1
  68. package/dist/components/LayerEditor/index.d.ts.map +1 -1
  69. package/dist/components/LayerPanel/index.js +1 -1
  70. package/dist/components/Legend/Legend.d.ts +7 -1
  71. package/dist/components/Legend/Legend.d.ts.map +1 -1
  72. package/dist/components/Legend/index.js +1 -1
  73. package/dist/components/PropertyFilterPanel/PropertyFilterPanel.d.ts +21 -0
  74. package/dist/components/PropertyFilterPanel/PropertyFilterPanel.d.ts.map +1 -0
  75. package/dist/components/PropertyFilterPanel/index.d.ts +3 -0
  76. package/dist/components/PropertyFilterPanel/index.d.ts.map +1 -0
  77. package/dist/components/QueryPanel/QueryPanel.d.ts.map +1 -1
  78. package/dist/components/ResultsDrawer/ResultsDrawer.d.ts +12 -1
  79. package/dist/components/ResultsDrawer/ResultsDrawer.d.ts.map +1 -1
  80. package/dist/components/ResultsDrawer/index.d.ts +1 -1
  81. package/dist/components/ResultsDrawer/index.d.ts.map +1 -1
  82. package/dist/components/ResultsDrawer/tableUtils.d.ts +11 -0
  83. package/dist/components/ResultsDrawer/tableUtils.d.ts.map +1 -0
  84. package/dist/components/ScaleBarControl/ScaleBarControl.d.ts +32 -0
  85. package/dist/components/ScaleBarControl/ScaleBarControl.d.ts.map +1 -0
  86. package/dist/components/ScaleBarControl/index.d.ts +2 -0
  87. package/dist/components/ScaleBarControl/index.d.ts.map +1 -0
  88. package/dist/components/SearchPanel/SearchPanel.d.ts +15 -2
  89. package/dist/components/SearchPanel/SearchPanel.d.ts.map +1 -1
  90. package/dist/components/SearchPanel/index.js +1 -1
  91. package/dist/components/SideMenuPanel/SideMenuPanel.d.ts +51 -0
  92. package/dist/components/SideMenuPanel/SideMenuPanel.d.ts.map +1 -0
  93. package/dist/components/SideMenuPanel/index.d.ts +3 -0
  94. package/dist/components/SideMenuPanel/index.d.ts.map +1 -0
  95. package/dist/components/SourceEditor/SourceEditor.d.ts +3 -1
  96. package/dist/components/SourceEditor/SourceEditor.d.ts.map +1 -1
  97. package/dist/components/SourceEditor/SourceList.d.ts +6 -1
  98. package/dist/components/SourceEditor/SourceList.d.ts.map +1 -1
  99. package/dist/components/SourceEditor/index.d.ts +1 -1
  100. package/dist/components/SourceEditor/index.d.ts.map +1 -1
  101. package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts +6 -1
  102. package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts.map +1 -1
  103. package/dist/components/StyleEditor/PropertyField.d.ts +4 -1
  104. package/dist/components/StyleEditor/PropertyField.d.ts.map +1 -1
  105. package/dist/components/StyleEditor/PropertyGroup.d.ts +4 -1
  106. package/dist/components/StyleEditor/PropertyGroup.d.ts.map +1 -1
  107. package/dist/components/StyleEditor/StyleEditor.d.ts +5 -1
  108. package/dist/components/StyleEditor/StyleEditor.d.ts.map +1 -1
  109. package/dist/components/UIConfigEditor/UIConfigEditor.d.ts +13 -2
  110. package/dist/components/UIConfigEditor/UIConfigEditor.d.ts.map +1 -1
  111. package/dist/components/UserMenu/UserMenu.d.ts +15 -0
  112. package/dist/components/UserMenu/UserMenu.d.ts.map +1 -0
  113. package/dist/components/UserMenu/index.d.ts +3 -0
  114. package/dist/components/UserMenu/index.d.ts.map +1 -0
  115. package/dist/components/ViewEditor/ViewEditor.d.ts.map +1 -1
  116. package/dist/components/index.d.ts +22 -5
  117. package/dist/components/index.d.ts.map +1 -1
  118. package/dist/components/shared/controlIcons.d.ts +10 -0
  119. package/dist/components/shared/controlIcons.d.ts.map +1 -0
  120. package/dist/{geo-BXaVaxak.js → geo-DUdRIR7u.js} +1288 -1219
  121. package/dist/hooks/index.js +2 -2
  122. package/dist/hooks/useExport.d.ts +6 -0
  123. package/dist/hooks/useExport.d.ts.map +1 -1
  124. package/dist/id-C2J6iu8_.js +11 -0
  125. package/dist/{index-CzYEPGO9.js → index-BtQnyWPg.js} +1318 -1171
  126. package/dist/main.js +13448 -2959
  127. package/dist/schemas/config.d.ts +341 -2
  128. package/dist/schemas/config.d.ts.map +1 -1
  129. package/dist/schemas/index.d.ts +1 -1
  130. package/dist/schemas/index.d.ts.map +1 -1
  131. package/dist/schemas/index.js +35 -24
  132. package/dist/style.css +1 -1
  133. package/dist/types/index.d.ts +10 -2
  134. package/dist/types/index.d.ts.map +1 -1
  135. package/dist/types/index.js +56 -44
  136. package/dist/useSelection-BFHYsPvU.js +224 -0
  137. package/dist/utils/colorPalettes.d.ts +4 -2
  138. package/dist/utils/colorPalettes.d.ts.map +1 -1
  139. package/dist/utils/colorThemes.d.ts +12 -0
  140. package/dist/utils/colorThemes.d.ts.map +1 -0
  141. package/dist/utils/cql2.d.ts.map +1 -1
  142. package/dist/utils/exportConverters.d.ts.map +1 -1
  143. package/dist/utils/geo.d.ts +53 -0
  144. package/dist/utils/geo.d.ts.map +1 -1
  145. package/dist/utils/id.d.ts +2 -0
  146. package/dist/utils/id.d.ts.map +1 -0
  147. package/dist/utils/index.d.ts +4 -0
  148. package/dist/utils/index.d.ts.map +1 -1
  149. package/dist/utils/index.js +352 -150
  150. package/dist/utils/ogcApi.d.ts +10 -5
  151. package/dist/utils/ogcApi.d.ts.map +1 -1
  152. package/dist/utils/propertyFilters.d.ts +35 -0
  153. package/dist/utils/propertyFilters.d.ts.map +1 -0
  154. package/dist/utils/queryParameters.d.ts +1 -0
  155. package/dist/utils/queryParameters.d.ts.map +1 -1
  156. package/dist/utils/slugify.d.ts +2 -0
  157. package/dist/utils/slugify.d.ts.map +1 -0
  158. package/package.json +13 -7
  159. package/dist/CollapsibleControl-qo9daiD8.js +0 -53
  160. package/dist/CoordinateDisplay-PxPmVjpm.js +0 -47
  161. package/dist/FeatureTooltip-DxzN-jnp.js +0 -49
  162. package/dist/Legend-BLWBzD7Y.js +0 -275
  163. package/dist/PropertyList-BGXHLVBM.js +0 -33
  164. package/dist/SearchPanel-4Y12jfuP.js +0 -401
  165. package/dist/useSelection-B1RnQZlj.js +0 -206
@@ -1,25 +1,25 @@
1
1
  import { jsx as a, jsxs as t } from "react/jsx-runtime";
2
- function l({
2
+ function o({
3
3
  basemaps: u,
4
- activeBasemapId: r,
5
- onSelect: m,
6
- className: p
4
+ activeBasemapId: m,
5
+ onSelect: p,
6
+ className: r
7
7
  }) {
8
8
  return /* @__PURE__ */ a(
9
9
  "div",
10
10
  {
11
- className: `mapui:flex mapui:gap-2 mapui:flex-wrap ${p ?? ""}`,
11
+ className: `mapui:flex mapui:gap-2 mapui:flex-wrap ${r ?? ""}`,
12
12
  role: "group",
13
13
  "aria-label": "Basemap selection",
14
14
  children: u.map((i) => {
15
- const e = i.id === r;
15
+ const e = i.id === m;
16
16
  return /* @__PURE__ */ t(
17
17
  "button",
18
18
  {
19
19
  type: "button",
20
- onClick: () => m(i.id),
20
+ onClick: () => p(i.id),
21
21
  "aria-pressed": e,
22
- className: `mapui:flex mapui:flex-col mapui:items-center mapui:gap-1 mapui:rounded-md mapui:border-2 mapui:px-3 mapui:py-2 mapui:text-sm mapui:font-medium mapui:cursor-pointer mapui:transition-colors ${e ? "mapui:border-blue-500 mapui:bg-blue-50 mapui:text-blue-700" : "mapui:border-gray-200 mapui:bg-white mapui:text-gray-700 hover:mapui:border-gray-300 hover:mapui:bg-gray-50"}`,
22
+ className: `mapui:flex mapui:flex-col mapui:items-center mapui:gap-1 mapui:rounded-md mapui:border-2 mapui:px-3 mapui:py-2 mapui:text-sm mapui:font-medium mapui:cursor-pointer mapui:transition-colors ${e ? "mapui:border-blue-500 mapui:bg-blue-50 mapui:text-blue-700" : "mapui:border-slate-200 mapui:bg-white mapui:text-slate-700 hover:mapui:border-slate-300 hover:mapui:bg-slate-50"}`,
23
23
  children: [
24
24
  i.thumbnail && /* @__PURE__ */ a(
25
25
  "img",
@@ -39,5 +39,5 @@ function l({
39
39
  );
40
40
  }
41
41
  export {
42
- l as B
42
+ o as B
43
43
  };
@@ -0,0 +1,60 @@
1
+ import { jsxs as t, jsx as i } from "react/jsx-runtime";
2
+ import { useState as f } from "react";
3
+ import { LuX as b } from "react-icons/lu";
4
+ const g = {
5
+ "top-right": "mapui:top-0 mapui:right-full mapui:mr-2",
6
+ "top-left": "mapui:top-0 mapui:left-full mapui:ml-2",
7
+ "bottom-right": "mapui:bottom-0 mapui:right-full mapui:mr-2",
8
+ "bottom-left": "mapui:bottom-0 mapui:left-full mapui:ml-2"
9
+ };
10
+ function C({
11
+ icon: m,
12
+ label: a,
13
+ corner: o = "top-right",
14
+ defaultCollapsed: r = !0,
15
+ collapsed: p,
16
+ onToggle: u,
17
+ children: n,
18
+ className: c = ""
19
+ }) {
20
+ const [d, h] = f(r), e = p !== void 0 ? p : d, s = () => {
21
+ const l = !e;
22
+ u ? u(l) : h(l);
23
+ };
24
+ return /* @__PURE__ */ t("div", { className: `mapui:relative mapui:w-10 mapui:h-10 ${c}`, children: [
25
+ /* @__PURE__ */ i(
26
+ "button",
27
+ {
28
+ type: "button",
29
+ onClick: s,
30
+ title: a,
31
+ "aria-label": a,
32
+ className: `mapui:flex mapui:items-center mapui:justify-center mapui:w-10 mapui:h-10 mapui:bg-white mapui:rounded mapui:shadow-md hover:mapui:bg-slate-50 mapui:transition-colors ${e ? "" : "mapui:bg-slate-100"}`,
33
+ children: /* @__PURE__ */ i(m, { size: 20, className: "mapui:text-slate-700" })
34
+ }
35
+ ),
36
+ /* @__PURE__ */ t("div", { className: `mapui:absolute ${g[o]} mapui:z-10 mapui:bg-white/90 mapui:backdrop-blur-sm mapui:rounded-lg mapui:shadow-lg mapui:transition-all mapui:duration-150 mapui:origin-top-right ${e ? "mapui:opacity-0 mapui:scale-95 mapui:pointer-events-none" : "mapui:opacity-100 mapui:scale-100 mapui:pointer-events-auto"}`, children: [
37
+ /* @__PURE__ */ t("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:p-2 mapui:border-b mapui:border-slate-200", children: [
38
+ /* @__PURE__ */ t("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
39
+ /* @__PURE__ */ i(m, { size: 18, className: "mapui:text-slate-700" }),
40
+ /* @__PURE__ */ i("span", { className: "mapui:text-sm mapui:font-medium mapui:text-slate-700", children: a })
41
+ ] }),
42
+ /* @__PURE__ */ i(
43
+ "button",
44
+ {
45
+ type: "button",
46
+ onClick: s,
47
+ title: `Collapse ${a}`,
48
+ "aria-label": `Collapse ${a}`,
49
+ className: "mapui:flex mapui:items-center mapui:justify-center mapui:min-w-[44px] mapui:min-h-[44px] mapui:w-8 mapui:h-8 mapui:rounded hover:mapui:bg-slate-100 mapui:transition-colors",
50
+ children: /* @__PURE__ */ i(b, { size: 16, className: "mapui:text-slate-600" })
51
+ }
52
+ )
53
+ ] }),
54
+ /* @__PURE__ */ i("div", { className: "mapui:p-2", children: n })
55
+ ] })
56
+ ] });
57
+ }
58
+ export {
59
+ C
60
+ };
@@ -0,0 +1,154 @@
1
+ import { jsxs as N, jsx as c } from "react/jsx-runtime";
2
+ import { useState as w } from "react";
3
+ function W(u, n) {
4
+ return `${u.toFixed(6)}, ${n.toFixed(6)}`;
5
+ }
6
+ function j(u, n) {
7
+ const p = (m, a, i) => {
8
+ const t = m >= 0 ? a : i, e = Math.abs(m), r = Math.floor(e), s = (e - r) * 60, b = Math.floor(s), x = ((s - b) * 60).toFixed(1);
9
+ return `${r}°${b}'${x}"${t}`;
10
+ }, o = p(u, "N", "S"), d = p(n, "E", "W");
11
+ return `${o} ${d}`;
12
+ }
13
+ function z(u, n) {
14
+ const p = (m, a, i) => {
15
+ const t = m >= 0 ? a : i, e = Math.abs(m), r = Math.floor(e), s = ((e - r) * 60).toFixed(3);
16
+ return `${r}° ${s}' ${t}`;
17
+ }, o = p(u, "N", "S"), d = p(n, "E", "W");
18
+ return `${o}, ${d}`;
19
+ }
20
+ function M(u) {
21
+ if (!u) return null;
22
+ const n = u.trim();
23
+ if (!n) return null;
24
+ const p = n.match(/[NSEW]/i), o = p ? p[0].toUpperCase() : null, m = n.replace(/[NSEW]/gi, " ").replace(/[°º*]/g, " ").replace(/['′]/g, " ").replace(/["″]/g, " ").replace(/,/g, " ").trim().split(/\s+/).filter(Boolean);
25
+ if (m.length === 0) return null;
26
+ const a = m.map((t) => Number(t));
27
+ if (a.some((t) => !Number.isFinite(t))) return null;
28
+ let i;
29
+ if (a.length === 1)
30
+ i = a[0];
31
+ else if (a.length === 2) {
32
+ const [t, e] = a;
33
+ if (e < 0) return null;
34
+ const r = Math.abs(t) + e / 60;
35
+ i = t < 0 ? -r : r;
36
+ } else if (a.length === 3) {
37
+ const [t, e, r] = a;
38
+ if (e < 0 || r < 0) return null;
39
+ const s = Math.abs(t) + e / 60 + r / 3600;
40
+ i = t < 0 ? -s : s;
41
+ } else
42
+ return null;
43
+ return o === "S" || o === "W" ? i = -Math.abs(i) : (o === "N" || o === "E") && (i = Math.abs(i)), i;
44
+ }
45
+ function U({
46
+ latitude: u,
47
+ longitude: n,
48
+ activeFormat: p,
49
+ formats: o,
50
+ onFormatChange: d,
51
+ className: m = "",
52
+ onNavigate: a,
53
+ isExpanded: i,
54
+ onToggleExpand: t
55
+ }) {
56
+ const e = o.find((l) => l.id === p), [r, s] = w(!1), b = i ?? r, x = !!a, [C, k] = w(""), [$, E] = w(""), [y, g] = w(null), I = () => {
57
+ const f = (o.findIndex((h) => h.id === p) + 1) % o.length;
58
+ d(o[f].id);
59
+ }, S = (l) => {
60
+ t ? t(l) : s(l), l || g(null);
61
+ }, v = () => {
62
+ x && S(!b);
63
+ }, F = (l) => {
64
+ if (l.preventDefault(), !a) return;
65
+ const f = M(C), h = M($);
66
+ if (f == null || f < -90 || f > 90) {
67
+ g("Latitude must be between -90 and 90");
68
+ return;
69
+ }
70
+ if (h == null || h < -180 || h > 180) {
71
+ g("Longitude must be between -180 and 180");
72
+ return;
73
+ }
74
+ g(null), a(f, h), S(!1);
75
+ };
76
+ return /* @__PURE__ */ N(
77
+ "div",
78
+ {
79
+ className: `mapui:bg-black/60 mapui:text-white mapui:text-xs mapui:px-3 mapui:py-1 mapui:flex mapui:flex-col mapui:gap-1 mapui:rounded ${m}`,
80
+ children: [
81
+ /* @__PURE__ */ N("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
82
+ /* @__PURE__ */ c(
83
+ "button",
84
+ {
85
+ onClick: I,
86
+ className: "mapui:text-blue-300 hover:mapui:text-blue-200 mapui:cursor-pointer mapui:border-none mapui:bg-transparent mapui:p-0",
87
+ title: "Click to cycle coordinate format",
88
+ type: "button",
89
+ children: (e == null ? void 0 : e.label) ?? "Unknown"
90
+ }
91
+ ),
92
+ x ? /* @__PURE__ */ c(
93
+ "button",
94
+ {
95
+ type: "button",
96
+ onClick: v,
97
+ className: "mapui:font-mono mapui:cursor-pointer mapui:border-none mapui:bg-transparent mapui:text-inherit mapui:p-0 hover:mapui:text-blue-200",
98
+ title: "Click to go to coordinates",
99
+ "aria-expanded": b,
100
+ children: u !== null && n !== null && e ? e.format(u, n) : "—"
101
+ }
102
+ ) : /* @__PURE__ */ c("span", { className: "mapui:font-mono", children: u !== null && n !== null && e ? e.format(u, n) : "—" })
103
+ ] }),
104
+ x && b && /* @__PURE__ */ N("form", { onSubmit: F, className: "mapui:flex mapui:flex-col mapui:gap-1 mapui:pt-1", children: [
105
+ /* @__PURE__ */ N("div", { className: "mapui:flex mapui:items-center mapui:gap-1", children: [
106
+ /* @__PURE__ */ c("label", { className: "mapui:text-[10px] mapui:uppercase mapui:tracking-wide mapui:opacity-80", htmlFor: "mapui-coord-lat", children: "Lat" }),
107
+ /* @__PURE__ */ c(
108
+ "input",
109
+ {
110
+ id: "mapui-coord-lat",
111
+ type: "text",
112
+ value: C,
113
+ onChange: (l) => k(l.target.value),
114
+ placeholder: "40.7128",
115
+ className: "mapui:bg-white/10 mapui:text-white mapui:rounded mapui:px-1 mapui:py-0.5 mapui:font-mono mapui:w-24 mapui:border mapui:border-white/20 focus:mapui:outline-none focus:mapui:border-blue-300",
116
+ "aria-label": "Latitude",
117
+ autoFocus: !0
118
+ }
119
+ ),
120
+ /* @__PURE__ */ c("label", { className: "mapui:text-[10px] mapui:uppercase mapui:tracking-wide mapui:opacity-80 mapui:ml-1", htmlFor: "mapui-coord-lng", children: "Lng" }),
121
+ /* @__PURE__ */ c(
122
+ "input",
123
+ {
124
+ id: "mapui-coord-lng",
125
+ type: "text",
126
+ value: $,
127
+ onChange: (l) => E(l.target.value),
128
+ placeholder: "-74.006",
129
+ className: "mapui:bg-white/10 mapui:text-white mapui:rounded mapui:px-1 mapui:py-0.5 mapui:font-mono mapui:w-24 mapui:border mapui:border-white/20 focus:mapui:outline-none focus:mapui:border-blue-300",
130
+ "aria-label": "Longitude"
131
+ }
132
+ ),
133
+ /* @__PURE__ */ c(
134
+ "button",
135
+ {
136
+ type: "submit",
137
+ className: "mapui:bg-blue-500 hover:mapui:bg-blue-400 mapui:text-white mapui:rounded mapui:px-2 mapui:py-0.5 mapui:ml-1 mapui:cursor-pointer mapui:border-none",
138
+ children: "Go"
139
+ }
140
+ )
141
+ ] }),
142
+ y && /* @__PURE__ */ c("div", { className: "mapui:text-red-300 mapui:text-[10px]", children: y })
143
+ ] })
144
+ ]
145
+ }
146
+ );
147
+ }
148
+ export {
149
+ U as C,
150
+ j as a,
151
+ W as b,
152
+ z as f,
153
+ M as p
154
+ };
@@ -1,26 +1,26 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- function s({
2
+ function r({
3
3
  icon: e,
4
4
  label: i = "Export",
5
5
  onExport: o,
6
- loading: r = !1,
7
- disabled: u = !1,
6
+ loading: u = !1,
7
+ disabled: s = !1,
8
8
  className: m = ""
9
9
  }) {
10
- const a = u || r;
10
+ const a = s || u;
11
11
  return /* @__PURE__ */ t(
12
12
  "button",
13
13
  {
14
14
  type: "button",
15
15
  title: i,
16
16
  "aria-label": i,
17
- className: `mapui:flex mapui:items-center mapui:justify-center mapui:w-10 mapui:h-10 mapui:bg-white mapui:rounded mapui:shadow-md mapui:transition-colors ${a ? "mapui:cursor-not-allowed mapui:opacity-50" : "mapui:cursor-pointer hover:mapui:bg-gray-50"} ${m}`.trim(),
17
+ className: `mapui:flex mapui:items-center mapui:justify-center mapui:w-10 mapui:h-10 mapui:bg-white mapui:rounded mapui:shadow-md mapui:transition-colors ${a ? "mapui:cursor-not-allowed mapui:opacity-50" : "mapui:cursor-pointer hover:mapui:bg-slate-50"} ${m}`.trim(),
18
18
  disabled: a,
19
19
  onClick: o,
20
- children: /* @__PURE__ */ t(e, { size: 20, className: "mapui:text-gray-700" })
20
+ children: /* @__PURE__ */ t(e, { size: 20, className: "mapui:text-slate-700" })
21
21
  }
22
22
  );
23
23
  }
24
24
  export {
25
- s as E
25
+ r as E
26
26
  };
@@ -1,39 +1,39 @@
1
1
  import { jsxs as p, jsx as a } from "react/jsx-runtime";
2
- import { P as c } from "./PropertyList-BGXHLVBM.js";
3
- function f({
4
- isOpen: r,
2
+ import { P as c } from "./PropertyList-0EonV_BQ.js";
3
+ function b({
4
+ isOpen: t,
5
5
  onClose: m,
6
6
  properties: i,
7
- title: t = "Feature Properties",
8
- fields: l,
9
- labels: o,
7
+ title: l = "Feature Properties",
8
+ fields: r,
9
+ labels: s,
10
10
  variant: e = "panel",
11
- className: n = ""
11
+ className: o = ""
12
12
  }) {
13
- if (!r) return null;
13
+ if (!t) return null;
14
14
  const u = /* @__PURE__ */ p(
15
15
  "div",
16
16
  {
17
17
  className: [
18
- "mapui:flex mapui:flex-col mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:shadow-md",
18
+ "mapui:flex mapui:flex-col mapui:rounded mapui:border mapui:border-slate-200 mapui:bg-white/90 mapui:backdrop-blur-sm mapui:shadow-md",
19
19
  e === "modal" ? "mapui:max-h-[80vh] mapui:w-full mapui:max-w-lg" : "mapui:max-h-[calc(100vh-4rem)] mapui:w-72",
20
- n
20
+ o
21
21
  ].filter(Boolean).join(" ").trim(),
22
- onClick: e === "modal" ? (s) => s.stopPropagation() : void 0,
22
+ onClick: e === "modal" ? (n) => n.stopPropagation() : void 0,
23
23
  children: [
24
- /* @__PURE__ */ p("div", { className: "mapui:flex mapui:shrink-0 mapui:items-center mapui:justify-between mapui:border-b mapui:border-gray-200 mapui:px-4 mapui:py-3", children: [
25
- /* @__PURE__ */ a("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: t }),
24
+ /* @__PURE__ */ p("div", { className: "mapui:flex mapui:shrink-0 mapui:items-center mapui:justify-between mapui:border-b mapui:border-slate-200 mapui:px-4 mapui:py-3", children: [
25
+ /* @__PURE__ */ a("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-slate-700", children: l }),
26
26
  /* @__PURE__ */ a(
27
27
  "button",
28
28
  {
29
29
  onClick: m,
30
- className: "mapui:flex mapui:h-6 mapui:w-6 mapui:cursor-pointer mapui:items-center mapui:justify-center mapui:rounded mapui:border-0 mapui:bg-transparent mapui:text-lg mapui:leading-none mapui:text-gray-400 mapui:transition-colors hover:mapui:bg-gray-100 hover:mapui:text-gray-700",
30
+ className: "mapui:flex mapui:h-6 mapui:w-6 mapui:cursor-pointer mapui:items-center mapui:justify-center mapui:rounded mapui:border-0 mapui:bg-transparent mapui:text-lg mapui:leading-none mapui:text-slate-400 mapui:transition-colors hover:mapui:bg-slate-100 hover:mapui:text-slate-700",
31
31
  "aria-label": "Close",
32
32
  children: "×"
33
33
  }
34
34
  )
35
35
  ] }),
36
- /* @__PURE__ */ a("div", { className: "mapui:overflow-y-auto mapui:px-4 mapui:py-3", children: i && Object.keys(i).length > 0 ? /* @__PURE__ */ a(c, { properties: i, fields: l, labels: o, density: "default" }) : /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-400", children: "No properties available." }) })
36
+ /* @__PURE__ */ a("div", { className: "mapui:overflow-y-auto mapui:px-4 mapui:py-3", children: i && Object.keys(i).length > 0 ? /* @__PURE__ */ a(c, { properties: i, fields: r, labels: s, density: "default" }) : /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-slate-400", children: "No properties available." }) })
37
37
  ]
38
38
  }
39
39
  );
@@ -47,5 +47,5 @@ function f({
47
47
  ) : u;
48
48
  }
49
49
  export {
50
- f as F
50
+ b as F
51
51
  };
@@ -0,0 +1,49 @@
1
+ import { jsx as a, jsxs as l } from "react/jsx-runtime";
2
+ import { P as x } from "./PropertyList-0EonV_BQ.js";
3
+ function f({
4
+ title: d,
5
+ properties: p,
6
+ fields: o,
7
+ labels: c,
8
+ features: e,
9
+ maxItems: m = 4,
10
+ className: t = ""
11
+ }) {
12
+ const s = e && e.length > 0 ? e : p ? [{ title: d, properties: p, fields: o, labels: c }] : [];
13
+ return s.length === 0 ? /* @__PURE__ */ a(
14
+ "div",
15
+ {
16
+ className: `mapui:rounded mapui:border mapui:border-slate-200 mapui:bg-white/90 mapui:backdrop-blur-sm mapui:px-3 mapui:py-2 mapui:shadow-md ${t}`.trim(),
17
+ children: /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:text-slate-400", children: "No data" })
18
+ }
19
+ ) : /* @__PURE__ */ a(
20
+ "div",
21
+ {
22
+ className: `mapui:min-w-[140px] mapui:max-w-[240px] mapui:rounded mapui:border mapui:border-slate-200 mapui:bg-white/90 mapui:backdrop-blur-sm mapui:shadow-md ${t}`.trim(),
23
+ children: s.map((i, r) => {
24
+ const u = i.fields ?? Object.keys(i.properties), n = u.length > m, b = u.length - m;
25
+ return /* @__PURE__ */ a("div", { className: r > 0 ? "mapui:border-t mapui:border-slate-200" : "", children: /* @__PURE__ */ l("div", { className: "mapui:px-3 mapui:py-2", children: [
26
+ i.title && /* @__PURE__ */ a("p", { className: "mapui:mb-1.5 mapui:mt-0 mapui:text-xs mapui:font-semibold mapui:text-slate-700", children: i.title }),
27
+ /* @__PURE__ */ a(
28
+ x,
29
+ {
30
+ properties: i.properties,
31
+ fields: i.fields,
32
+ labels: i.labels,
33
+ maxItems: m,
34
+ density: "compact"
35
+ }
36
+ ),
37
+ n && /* @__PURE__ */ l("p", { className: "mapui:mb-0 mapui:mt-1 mapui:text-xs mapui:text-slate-400", children: [
38
+ "+",
39
+ b,
40
+ " more"
41
+ ] })
42
+ ] }) }, r);
43
+ })
44
+ }
45
+ );
46
+ }
47
+ export {
48
+ f as F
49
+ };
@@ -1,41 +1,41 @@
1
- import { jsxs as o, jsx as m } from "react/jsx-runtime";
2
- import { useState as g, useCallback as u } from "react";
1
+ import { jsxs as o, jsx as p } from "react/jsx-runtime";
2
+ import { useState as g, useCallback as m } from "react";
3
3
  function E({
4
- layers: r,
4
+ layers: c,
5
5
  activeLayerIds: f,
6
6
  onToggleVisibility: v,
7
7
  onReorder: i,
8
8
  className: x = "",
9
9
  hideTitle: h
10
10
  }) {
11
- const [n, l] = g(null), [D, s] = g(null), b = u(
11
+ const [n, r] = g(null), [D, u] = g(null), b = m(
12
12
  (a, e) => {
13
- l(e), a.dataTransfer.effectAllowed = "move", a.dataTransfer.setData("text/plain", e);
13
+ r(e), a.dataTransfer.effectAllowed = "move", a.dataTransfer.setData("text/plain", e);
14
14
  },
15
15
  []
16
- ), N = u(
16
+ ), N = m(
17
17
  (a, e) => {
18
- a.preventDefault(), a.dataTransfer.dropEffect = "move", s(e);
18
+ a.preventDefault(), a.dataTransfer.dropEffect = "move", u(e);
19
19
  },
20
20
  []
21
- ), O = u(() => {
22
- s(null);
23
- }, []), I = u(
21
+ ), O = m(() => {
22
+ u(null);
23
+ }, []), I = m(
24
24
  (a, e) => {
25
- if (a.preventDefault(), s(null), l(null), !i || !n || n === e) return;
26
- const p = r.map((w) => w.id), c = p.indexOf(n), t = p.indexOf(e);
27
- if (c === -1 || t === -1) return;
28
- const d = [...p];
29
- d.splice(c, 1), d.splice(t, 0, n), i(d);
25
+ if (a.preventDefault(), u(null), r(null), !i || !n || n === e) return;
26
+ const s = c.map((w) => w.id), l = s.indexOf(n), t = s.indexOf(e);
27
+ if (l === -1 || t === -1) return;
28
+ const d = [...s];
29
+ d.splice(l, 1), d.splice(t, 0, n), i(d);
30
30
  },
31
- [n, r, i]
32
- ), L = u(() => {
33
- l(null), s(null);
31
+ [n, c, i]
32
+ ), L = m(() => {
33
+ r(null), u(null);
34
34
  }, []);
35
35
  return /* @__PURE__ */ o("div", { className: `mapui:flex mapui:flex-col mapui:gap-1 ${x}`.trim(), children: [
36
- !h && /* @__PURE__ */ m("h3", { className: "mapui:m-0 mapui:mb-2 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Layers" }),
37
- /* @__PURE__ */ m("ul", { className: "mapui:m-0 mapui:list-none mapui:p-0", children: r.map((a) => {
38
- const e = f.includes(a.id), p = n === a.id, c = D === a.id;
36
+ !h && /* @__PURE__ */ p("h3", { className: "mapui:m-0 mapui:mb-2 mapui:text-sm mapui:font-semibold mapui:text-slate-700", children: "Layers" }),
37
+ /* @__PURE__ */ p("ul", { className: "mapui:m-0 mapui:list-none mapui:p-0", children: c.map((a) => {
38
+ const e = f.includes(a.id), s = n === a.id, l = D === a.id;
39
39
  return /* @__PURE__ */ o(
40
40
  "li",
41
41
  {
@@ -48,29 +48,29 @@ function E({
48
48
  className: [
49
49
  "mapui:flex mapui:items-center mapui:gap-2 mapui:rounded mapui:px-2 mapui:py-1.5",
50
50
  "mapui:select-none mapui:transition-colors",
51
- c ? "mapui:bg-gray-200" : "mapui:bg-transparent hover:mapui:bg-gray-100",
52
- p ? "mapui:opacity-50" : "mapui:opacity-100"
51
+ l ? "mapui:bg-slate-200" : "mapui:bg-transparent hover:mapui:bg-slate-100",
52
+ s ? "mapui:opacity-50" : "mapui:opacity-100"
53
53
  ].join(" "),
54
54
  children: [
55
- i && /* @__PURE__ */ m(
55
+ i && /* @__PURE__ */ p(
56
56
  "span",
57
57
  {
58
- className: "mapui:cursor-grab mapui:text-gray-400 active:mapui:cursor-grabbing",
58
+ className: "mapui:cursor-grab mapui:text-slate-400 active:mapui:cursor-grabbing",
59
59
  "aria-hidden": "true",
60
60
  children: "⠿"
61
61
  }
62
62
  ),
63
63
  /* @__PURE__ */ o("label", { className: "mapui:flex mapui:flex-1 mapui:cursor-pointer mapui:items-center mapui:gap-2 mapui:min-w-0", children: [
64
- /* @__PURE__ */ m(
64
+ /* @__PURE__ */ p(
65
65
  "input",
66
66
  {
67
67
  type: "checkbox",
68
68
  checked: e,
69
69
  onChange: () => v(a.id),
70
- className: "mapui:h-4 mapui:w-4 mapui:cursor-pointer mapui:accent-gray-700"
70
+ className: "mapui:h-4 mapui:w-4 mapui:cursor-pointer mapui:accent-slate-700"
71
71
  }
72
72
  ),
73
- /* @__PURE__ */ m("span", { className: "mapui:text-sm mapui:text-gray-800 mapui:truncate", children: a.label })
73
+ /* @__PURE__ */ p("span", { className: "mapui:text-sm mapui:text-slate-800 mapui:truncate", children: a.label })
74
74
  ] })
75
75
  ]
76
76
  },