@local-logic/maps 0.0.4 → 0.0.6

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 (153) hide show
  1. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  2. package/dist/index-B43MtiHH.js +30 -0
  3. package/dist/index-BAAE2pMq.js +64 -0
  4. package/dist/index-BHjgd5HB.js +29 -0
  5. package/dist/index-BZ2605rA.js +39 -0
  6. package/dist/index-B_LO5X9C.js +46 -0
  7. package/dist/index-BbrOUWDy.js +29 -0
  8. package/dist/index-Bd-X-1Gd.js +42 -0
  9. package/dist/index-CPq7k7F4.js +63 -0
  10. package/dist/index-CTk5bvm9.js +155 -0
  11. package/dist/index-CXLLvdx4.js +670 -0
  12. package/dist/index-CXjxZmYt.js +144 -0
  13. package/dist/index-DHw9gU4K.js +29 -0
  14. package/dist/index-DVitM43i.js +137 -0
  15. package/dist/index-J1MKzGEM.js +31 -0
  16. package/dist/index-qqbvBkdn.js +7 -0
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.es.js +4 -0
  19. package/dist/index.modern-EsUgbhzI.js +908 -0
  20. package/dist/index.umd.js +3181 -0
  21. package/dist/logo-control-NE-LlsRy.js +607 -0
  22. package/dist/mapbox-gl-D58OubwB.js +32266 -0
  23. package/dist/maplibre-gl-CfOZKUDd.js +20722 -0
  24. package/dist/scale-control-CyJd4u6j.js +716 -0
  25. package/dist/src/components/Map/Root/BaseMap/Empty/index.d.ts +3 -0
  26. package/dist/src/components/Map/Root/BaseMap/Empty/index.d.ts.map +1 -0
  27. package/dist/src/components/Map/Root/BaseMap/Google/index.d.ts +11 -0
  28. package/dist/src/components/Map/Root/BaseMap/Google/index.d.ts.map +1 -0
  29. package/dist/src/components/Map/Root/BaseMap/Mapbox/index.d.ts +4 -0
  30. package/dist/src/components/Map/Root/BaseMap/Mapbox/index.d.ts.map +1 -0
  31. package/dist/src/components/Map/Root/BaseMap/Maptiler/index.d.ts +4 -0
  32. package/dist/src/components/Map/Root/BaseMap/Maptiler/index.d.ts.map +1 -0
  33. package/dist/src/components/Map/Root/BaseMap/index.d.ts +4 -0
  34. package/dist/src/components/Map/Root/BaseMap/index.d.ts.map +1 -0
  35. package/dist/src/components/Map/Root/BaseMap/styles.d.ts +2 -0
  36. package/dist/src/components/Map/Root/BaseMap/styles.d.ts.map +1 -0
  37. package/dist/src/components/Map/Root/BaseMap/types.d.ts +3 -0
  38. package/dist/src/components/Map/Root/BaseMap/types.d.ts.map +1 -0
  39. package/dist/src/components/Map/Root/Layers/Google/index.d.ts +4 -0
  40. package/dist/src/components/Map/Root/Layers/Google/index.d.ts.map +1 -0
  41. package/dist/src/components/Map/Root/Layers/Mapbox/index.d.ts +4 -0
  42. package/dist/src/components/Map/Root/Layers/Mapbox/index.d.ts.map +1 -0
  43. package/dist/src/components/Map/Root/Layers/Maptiler/index.d.ts +4 -0
  44. package/dist/src/components/Map/Root/Layers/Maptiler/index.d.ts.map +1 -0
  45. package/dist/src/components/Map/Root/Layers/index.d.ts +4 -0
  46. package/dist/src/components/Map/Root/Layers/index.d.ts.map +1 -0
  47. package/dist/src/components/Map/Root/Layers/types.d.ts +13 -0
  48. package/dist/src/components/Map/Root/Layers/types.d.ts.map +1 -0
  49. package/dist/src/components/Map/Root/Layers/utils.d.ts +6 -0
  50. package/dist/src/components/Map/Root/Layers/utils.d.ts.map +1 -0
  51. package/dist/src/components/Map/Root/Markers/Cluster/index.d.ts +6 -0
  52. package/dist/src/components/Map/Root/Markers/Cluster/index.d.ts.map +1 -0
  53. package/dist/src/components/Map/Root/Markers/Cluster/styles.d.ts +2 -0
  54. package/dist/src/components/Map/Root/Markers/Cluster/styles.d.ts.map +1 -0
  55. package/dist/src/components/Map/Root/Markers/Google/index.d.ts +4 -0
  56. package/dist/src/components/Map/Root/Markers/Google/index.d.ts.map +1 -0
  57. package/dist/src/components/Map/Root/Markers/Mapbox/index.d.ts +4 -0
  58. package/dist/src/components/Map/Root/Markers/Mapbox/index.d.ts.map +1 -0
  59. package/dist/src/components/Map/Root/Markers/Maptiler/index.d.ts +4 -0
  60. package/dist/src/components/Map/Root/Markers/Maptiler/index.d.ts.map +1 -0
  61. package/dist/src/components/Map/Root/Markers/index.d.ts +4 -0
  62. package/dist/src/components/Map/Root/Markers/index.d.ts.map +1 -0
  63. package/dist/src/components/Map/Root/Markers/styles.d.ts +5 -0
  64. package/dist/src/components/Map/Root/Markers/styles.d.ts.map +1 -0
  65. package/dist/src/components/Map/Root/Markers/types.d.ts +28 -0
  66. package/dist/src/components/Map/Root/Markers/types.d.ts.map +1 -0
  67. package/dist/src/components/Map/Root/Popup/Google/index.d.ts +4 -0
  68. package/dist/src/components/Map/Root/Popup/Google/index.d.ts.map +1 -0
  69. package/dist/src/components/Map/Root/Popup/Mapbox/index.d.ts +4 -0
  70. package/dist/src/components/Map/Root/Popup/Mapbox/index.d.ts.map +1 -0
  71. package/dist/src/components/Map/Root/Popup/Maptiler/index.d.ts +4 -0
  72. package/dist/src/components/Map/Root/Popup/Maptiler/index.d.ts.map +1 -0
  73. package/dist/src/components/Map/Root/Popup/index.d.ts +4 -0
  74. package/dist/src/components/Map/Root/Popup/index.d.ts.map +1 -0
  75. package/dist/src/components/Map/Root/Popup/styles.d.ts +2 -0
  76. package/dist/src/components/Map/Root/Popup/styles.d.ts.map +1 -0
  77. package/dist/src/components/Map/Root/Popup/types.d.ts +10 -0
  78. package/dist/src/components/Map/Root/Popup/types.d.ts.map +1 -0
  79. package/dist/src/components/Map/Root/constants.d.ts +7 -0
  80. package/dist/src/components/Map/Root/constants.d.ts.map +1 -0
  81. package/dist/src/components/Map/Root/context.d.ts +11 -0
  82. package/dist/src/components/Map/Root/context.d.ts.map +1 -0
  83. package/dist/src/components/Map/Root/index.d.ts +11 -0
  84. package/dist/src/components/Map/Root/index.d.ts.map +1 -0
  85. package/dist/src/components/Map/Root/types.d.ts +26 -0
  86. package/dist/src/components/Map/Root/types.d.ts.map +1 -0
  87. package/dist/src/components/Map/index.d.ts +2 -0
  88. package/dist/src/components/Map/index.d.ts.map +1 -0
  89. package/dist/src/components/Map/index.stories.d.ts +8 -0
  90. package/dist/src/components/Map/index.stories.d.ts.map +1 -0
  91. package/dist/src/components/Map/index.test.d.ts +2 -0
  92. package/dist/src/components/Map/index.test.d.ts.map +1 -0
  93. package/dist/src/components/Map/storybook-data.d.ts +18 -0
  94. package/dist/src/components/Map/storybook-data.d.ts.map +1 -0
  95. package/dist/src/index.d.ts +2 -0
  96. package/dist/src/index.d.ts.map +1 -0
  97. package/dist/style.css +1 -0
  98. package/{src/components/Map/Root/Popup/styles.ts → dist/styles-uPzJnzVS.js} +4 -1
  99. package/dist/utils-YqJg0vBb.js +25 -0
  100. package/package.json +14 -3
  101. package/.env.example +0 -3
  102. package/.storybook/defaults.ts +0 -40
  103. package/.storybook/globals.css +0 -32
  104. package/.storybook/main.ts +0 -19
  105. package/.storybook/preview.tsx +0 -28
  106. package/CHANGELOG.md +0 -27
  107. package/eslint.config.mjs +0 -46
  108. package/lint-staged.config.cjs +0 -4
  109. package/postcss.config.cjs +0 -6
  110. package/prettier.config.cjs +0 -1
  111. package/src/components/Map/Root/BaseMap/Empty/index.tsx +0 -7
  112. package/src/components/Map/Root/BaseMap/Google/index.tsx +0 -96
  113. package/src/components/Map/Root/BaseMap/Mapbox/index.tsx +0 -66
  114. package/src/components/Map/Root/BaseMap/Maptiler/index.tsx +0 -59
  115. package/src/components/Map/Root/BaseMap/index.tsx +0 -34
  116. package/src/components/Map/Root/BaseMap/styles.ts +0 -1
  117. package/src/components/Map/Root/BaseMap/types.ts +0 -3
  118. package/src/components/Map/Root/Layers/Google/index.tsx +0 -97
  119. package/src/components/Map/Root/Layers/Mapbox/index.tsx +0 -74
  120. package/src/components/Map/Root/Layers/Maptiler/index.tsx +0 -74
  121. package/src/components/Map/Root/Layers/index.tsx +0 -32
  122. package/src/components/Map/Root/Layers/types.ts +0 -15
  123. package/src/components/Map/Root/Layers/utils.ts +0 -64
  124. package/src/components/Map/Root/Markers/Cluster/index.tsx +0 -27
  125. package/src/components/Map/Root/Markers/Cluster/styles.ts +0 -11
  126. package/src/components/Map/Root/Markers/Google/index.tsx +0 -49
  127. package/src/components/Map/Root/Markers/Mapbox/index.tsx +0 -52
  128. package/src/components/Map/Root/Markers/Maptiler/index.tsx +0 -52
  129. package/src/components/Map/Root/Markers/index.tsx +0 -81
  130. package/src/components/Map/Root/Markers/styles.ts +0 -37
  131. package/src/components/Map/Root/Markers/types.ts +0 -32
  132. package/src/components/Map/Root/Popup/Google/index.tsx +0 -57
  133. package/src/components/Map/Root/Popup/Google/popup.css +0 -15
  134. package/src/components/Map/Root/Popup/Mapbox/index.tsx +0 -36
  135. package/src/components/Map/Root/Popup/Mapbox/popup.css +0 -15
  136. package/src/components/Map/Root/Popup/Maptiler/index.tsx +0 -37
  137. package/src/components/Map/Root/Popup/Maptiler/popup.css +0 -15
  138. package/src/components/Map/Root/Popup/index.tsx +0 -32
  139. package/src/components/Map/Root/Popup/types.ts +0 -20
  140. package/src/components/Map/Root/constants.ts +0 -6
  141. package/src/components/Map/Root/context.tsx +0 -15
  142. package/src/components/Map/Root/index.tsx +0 -30
  143. package/src/components/Map/Root/types.ts +0 -30
  144. package/src/components/Map/index.stories.tsx +0 -133
  145. package/src/components/Map/index.test.tsx +0 -16
  146. package/src/components/Map/index.tsx +0 -1
  147. package/src/components/Map/storybook-data.ts +0 -255
  148. package/src/index.ts +0 -1
  149. package/tailwind.config.cjs +0 -1
  150. package/tsconfig.json +0 -14
  151. package/tsconfig.node.json +0 -8
  152. package/vite-env.d.ts +0 -13
  153. package/vite.config.ts +0 -46
@@ -0,0 +1,144 @@
1
+ import a, { createContext as M, forwardRef as g, useContext as P, useMemo as $ } from "react";
2
+ import { jsx as z } from "react/jsx-runtime";
3
+ const F = /* @__PURE__ */ new Map([
4
+ [
5
+ "bold",
6
+ /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("path", { d: "M128,60a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,60Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,124Zm0-112a92.1,92.1,0,0,0-92,92c0,77.36,81.64,135.4,85.12,137.83a12,12,0,0,0,13.76,0,259,259,0,0,0,42.18-39C205.15,170.57,220,136.37,220,104A92.1,92.1,0,0,0,128,12Zm31.3,174.71A249.35,249.35,0,0,1,128,216.89a249.35,249.35,0,0,1-31.3-30.18C80,167.37,60,137.31,60,104a68,68,0,0,1,136,0C196,137.31,176,167.37,159.3,186.71Z" }))
7
+ ],
8
+ [
9
+ "duotone",
10
+ /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
11
+ "path",
12
+ {
13
+ d: "M128,24a80,80,0,0,0-80,80c0,72,80,128,80,128s80-56,80-128A80,80,0,0,0,128,24Zm0,112a32,32,0,1,1,32-32A32,32,0,0,1,128,136Z",
14
+ opacity: "0.2"
15
+ }
16
+ ), /* @__PURE__ */ a.createElement("path", { d: "M128,64a40,40,0,1,0,40,40A40,40,0,0,0,128,64Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,128Zm0-112a88.1,88.1,0,0,0-88,88c0,31.4,14.51,64.68,42,96.25a254.19,254.19,0,0,0,41.45,38.3,8,8,0,0,0,9.18,0A254.19,254.19,0,0,0,174,200.25c27.45-31.57,42-64.85,42-96.25A88.1,88.1,0,0,0,128,16Zm0,206c-16.53-13-72-60.75-72-118a72,72,0,0,1,144,0C200,161.23,144.53,209,128,222Z" }))
17
+ ],
18
+ [
19
+ "fill",
20
+ /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("path", { d: "M128,16a88.1,88.1,0,0,0-88,88c0,75.3,80,132.17,83.41,134.55a8,8,0,0,0,9.18,0C136,236.17,216,179.3,216,104A88.1,88.1,0,0,0,128,16Zm0,56a32,32,0,1,1-32,32A32,32,0,0,1,128,72Z" }))
21
+ ],
22
+ [
23
+ "light",
24
+ /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("path", { d: "M128,66a38,38,0,1,0,38,38A38,38,0,0,0,128,66Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,130Zm0-112a86.1,86.1,0,0,0-86,86c0,30.91,14.34,63.74,41.47,94.94a252.32,252.32,0,0,0,41.09,38,6,6,0,0,0,6.88,0,252.32,252.32,0,0,0,41.09-38c27.13-31.2,41.47-64,41.47-94.94A86.1,86.1,0,0,0,128,18Zm0,206.51C113,212.93,54,163.62,54,104a74,74,0,0,1,148,0C202,163.62,143,212.93,128,224.51Z" }))
25
+ ],
26
+ [
27
+ "regular",
28
+ /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("path", { d: "M128,64a40,40,0,1,0,40,40A40,40,0,0,0,128,64Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,128Zm0-112a88.1,88.1,0,0,0-88,88c0,31.4,14.51,64.68,42,96.25a254.19,254.19,0,0,0,41.45,38.3,8,8,0,0,0,9.18,0A254.19,254.19,0,0,0,174,200.25c27.45-31.57,42-64.85,42-96.25A88.1,88.1,0,0,0,128,16Zm0,206c-16.53-13-72-60.75-72-118a72,72,0,0,1,144,0C200,161.23,144.53,209,128,222Z" }))
29
+ ],
30
+ [
31
+ "thin",
32
+ /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("path", { d: "M128,68a36,36,0,1,0,36,36A36,36,0,0,0,128,68Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,132Zm0-112a84.09,84.09,0,0,0-84,84c0,30.42,14.17,62.79,41,93.62a250,250,0,0,0,40.73,37.66,4,4,0,0,0,4.58,0A250,250,0,0,0,171,197.62c26.81-30.83,41-63.2,41-93.62A84.09,84.09,0,0,0,128,20Zm37.1,172.23A254.62,254.62,0,0,1,128,227a254.62,254.62,0,0,1-37.1-34.81C73.15,171.8,52,139.9,52,104a76,76,0,0,1,152,0C204,139.9,182.85,171.8,165.1,192.23Z" }))
33
+ ]
34
+ ]), _ = M({
35
+ color: "currentColor",
36
+ size: "1em",
37
+ weight: "regular",
38
+ mirrored: !1
39
+ });
40
+ var I = Object.defineProperty, o = Object.getOwnPropertySymbols, b = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable, p = (r, e, t) => e in r ? I(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, u = (r, e) => {
41
+ for (var t in e || (e = {}))
42
+ b.call(e, t) && p(r, t, e[t]);
43
+ if (o)
44
+ for (var t of o(e))
45
+ v.call(e, t) && p(r, t, e[t]);
46
+ return r;
47
+ }, d = (r, e) => {
48
+ var t = {};
49
+ for (var n in r)
50
+ b.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]);
51
+ if (r != null && o)
52
+ for (var n of o(r))
53
+ e.indexOf(n) < 0 && v.call(r, n) && (t[n] = r[n]);
54
+ return t;
55
+ };
56
+ const w = g((r, e) => {
57
+ const t = r, {
58
+ alt: n,
59
+ color: i,
60
+ size: l,
61
+ weight: c,
62
+ mirrored: y,
63
+ children: A,
64
+ weights: Z
65
+ } = t, E = d(t, [
66
+ "alt",
67
+ "color",
68
+ "size",
69
+ "weight",
70
+ "mirrored",
71
+ "children",
72
+ "weights"
73
+ ]), m = P(_), {
74
+ color: C = "currentColor",
75
+ size: s,
76
+ weight: O = "regular",
77
+ mirrored: x = !1
78
+ } = m, j = d(m, [
79
+ "color",
80
+ "size",
81
+ "weight",
82
+ "mirrored"
83
+ ]);
84
+ return /* @__PURE__ */ a.createElement(
85
+ "svg",
86
+ u(u({
87
+ ref: e,
88
+ xmlns: "http://www.w3.org/2000/svg",
89
+ width: l ?? s,
90
+ height: l ?? s,
91
+ fill: i ?? C,
92
+ viewBox: "0 0 256 256",
93
+ transform: y || x ? "scale(-1, 1)" : void 0
94
+ }, j), E),
95
+ !!n && /* @__PURE__ */ a.createElement("title", null, n),
96
+ A,
97
+ Z.get(c ?? O)
98
+ );
99
+ });
100
+ w.displayName = "IconBase";
101
+ const B = w;
102
+ var N = Object.defineProperty, S = Object.defineProperties, R = Object.getOwnPropertyDescriptors, f = Object.getOwnPropertySymbols, D = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable, h = (r, e, t) => e in r ? N(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, q = (r, e) => {
103
+ for (var t in e || (e = {}))
104
+ D.call(e, t) && h(r, t, e[t]);
105
+ if (f)
106
+ for (var t of f(e))
107
+ k.call(e, t) && h(r, t, e[t]);
108
+ return r;
109
+ }, G = (r, e) => S(r, R(e));
110
+ const H = g((r, e) => /* @__PURE__ */ a.createElement(B, G(q({ ref: e }, r), { weights: F })));
111
+ H.displayName = "MapPin";
112
+ const J = `
113
+ rounded-full leading-none font-sans border-2
114
+ border-solid shadow-sm
115
+ flex justify-center items-center
116
+ bg-primary-100 text-base-white border-base-white
117
+ transition-all
118
+
119
+ hover:bg-base-white
120
+ hover:text-primary-100
121
+ hover:border-primary-100
122
+ `;
123
+ function Q({ cluster: r }) {
124
+ const e = $(
125
+ () => 20 + r.properties.point_count * 4,
126
+ [r.properties.point_count]
127
+ );
128
+ return /* @__PURE__ */ z(
129
+ "div",
130
+ {
131
+ className: J,
132
+ style: {
133
+ width: `${e}px`,
134
+ height: `${e}px`,
135
+ fontSize: `${e / 2.5}px`
136
+ },
137
+ children: r.properties.point_count
138
+ }
139
+ );
140
+ }
141
+ export {
142
+ Q as C,
143
+ H as M
144
+ };
@@ -0,0 +1,29 @@
1
+ import { jsx as r, jsxs as d, Fragment as c } from "react/jsx-runtime";
2
+ import { C as h, M as l } from "./index-CXjxZmYt.js";
3
+ import { a as f } from "./logo-control-NE-LlsRy.js";
4
+ import "react";
5
+ import { c as g, i as M, a as t } from "./index-CXLLvdx4.js";
6
+ function y({ clusters: o, onClick: e, children: p }) {
7
+ return o == null ? void 0 : o.map((a, m) => {
8
+ const i = a.geometry.coordinates[0], n = a.geometry.coordinates[1];
9
+ return /* @__PURE__ */ r(
10
+ f,
11
+ {
12
+ anchor: "bottom",
13
+ longitude: i,
14
+ latitude: n,
15
+ onClick: (s) => {
16
+ s.originalEvent.stopPropagation(), e == null || e(a);
17
+ },
18
+ children: /* @__PURE__ */ r("div", { className: g, "data-is-cluster": !!a.properties.cluster, children: a.properties.cluster ? /* @__PURE__ */ r(h, { cluster: a }) : /* @__PURE__ */ d(c, { children: [
19
+ /* @__PURE__ */ r("div", { className: M, children: a.properties.icon ? /* @__PURE__ */ r(a.properties.icon, { className: t }) : /* @__PURE__ */ r(l, { className: t }) }),
20
+ p
21
+ ] }) })
22
+ },
23
+ `map-marker-${i}-${n}-${m}`
24
+ );
25
+ });
26
+ }
27
+ export {
28
+ y as default
29
+ };
@@ -0,0 +1,137 @@
1
+ import { jsx as u, Fragment as b } from "react/jsx-runtime";
2
+ import * as j from "react";
3
+ import { useContext as S, useRef as k, useState as x, useMemo as m, useEffect as C, cloneElement as I } from "react";
4
+ import { b as w, d as s } from "./scale-control-CyJd4u6j.js";
5
+ import { g as M } from "./utils-YqJg0vBb.js";
6
+ function g(t, e) {
7
+ if (!t)
8
+ throw new Error(e);
9
+ }
10
+ let U = 0;
11
+ function $(t, e, n) {
12
+ if (t.style && t.style._loaded) {
13
+ const a = { ...n };
14
+ return delete a.id, delete a.children, t.addSource(e, a), t.getSource(e);
15
+ }
16
+ return null;
17
+ }
18
+ function z(t, e, n) {
19
+ g(e.id === n.id, "source id changed"), g(e.type === n.type, "source type changed");
20
+ let a = "", i = 0;
21
+ for (const o in e)
22
+ o !== "children" && o !== "id" && !s(n[o], e[o]) && (a = o, i++);
23
+ if (!i)
24
+ return;
25
+ const r = e.type;
26
+ r === "geojson" ? t.setData(e.data) : r === "image" ? t.updateImage({
27
+ url: e.url,
28
+ coordinates: e.coordinates
29
+ }) : "setCoordinates" in t && i === 1 && a === "coordinates" ? t.setCoordinates(e.coordinates) : "setUrl" in t && a === "url" ? t.setUrl(e.url) : "setTiles" in t && a === "tiles" ? t.setTiles(e.tiles) : console.warn(`Unable to update <Source> prop: ${a}`);
30
+ }
31
+ function A(t) {
32
+ const e = S(w).map.getMap(), n = k(t), [, a] = x(0), i = m(() => t.id || `jsx-source-${U++}`, []);
33
+ C(() => {
34
+ if (e) {
35
+ const o = () => setTimeout(() => a((y) => y + 1), 0);
36
+ return e.on("styledata", o), o(), () => {
37
+ var y;
38
+ if (e.off("styledata", o), e.style && e.style._loaded && e.getSource(i)) {
39
+ const f = (y = e.getStyle()) == null ? void 0 : y.layers;
40
+ if (f)
41
+ for (const d of f)
42
+ d.source === i && e.removeLayer(d.id);
43
+ e.removeSource(i);
44
+ }
45
+ };
46
+ }
47
+ }, [e]);
48
+ let r = e && e.style && e.getSource(i);
49
+ return r ? z(r, t, n.current) : r = $(e, i, t), n.current = t, r && j.Children.map(t.children, (o) => o && I(o, {
50
+ source: i
51
+ })) || null;
52
+ }
53
+ function E(t, e, n, a) {
54
+ if (g(n.id === a.id, "layer id changed"), g(n.type === a.type, "layer type changed"), n.type === "custom" || a.type === "custom")
55
+ return;
56
+ const { layout: i = {}, paint: r = {}, filter: o, minzoom: y, maxzoom: f, beforeId: d } = n;
57
+ if (d !== a.beforeId && t.moveLayer(e, d), i !== a.layout) {
58
+ const c = a.layout || {};
59
+ for (const l in i)
60
+ s(i[l], c[l]) || t.setLayoutProperty(e, l, i[l]);
61
+ for (const l in c)
62
+ i.hasOwnProperty(l) || t.setLayoutProperty(e, l, void 0);
63
+ }
64
+ if (r !== a.paint) {
65
+ const c = a.paint || {};
66
+ for (const l in r)
67
+ s(r[l], c[l]) || t.setPaintProperty(e, l, r[l]);
68
+ for (const l in c)
69
+ r.hasOwnProperty(l) || t.setPaintProperty(e, l, void 0);
70
+ }
71
+ s(o, a.filter) || t.setFilter(e, o), (y !== a.minzoom || f !== a.maxzoom) && t.setLayerZoomRange(e, y, f);
72
+ }
73
+ function F(t, e, n) {
74
+ if (t.style && t.style._loaded && (!("source" in n) || t.getSource(n.source))) {
75
+ const a = { ...n, id: e };
76
+ delete a.beforeId, t.addLayer(a, n.beforeId);
77
+ }
78
+ }
79
+ let R = 0;
80
+ function h(t) {
81
+ const e = S(w).map.getMap(), n = k(t), [, a] = x(0), i = m(() => t.id || `jsx-layer-${R++}`, []);
82
+ if (C(() => {
83
+ if (e) {
84
+ const o = () => a((y) => y + 1);
85
+ return e.on("styledata", o), o(), () => {
86
+ e.off("styledata", o), e.style && e.style._loaded && e.getLayer(i) && e.removeLayer(i);
87
+ };
88
+ }
89
+ }, [e]), e && e.style && e.getLayer(i))
90
+ try {
91
+ E(e, i, t, n.current);
92
+ } catch (o) {
93
+ console.warn(o);
94
+ }
95
+ else
96
+ F(e, i, t);
97
+ return n.current = t, null;
98
+ }
99
+ function L(t, e) {
100
+ switch (t) {
101
+ case "fill":
102
+ return {
103
+ "fill-color": e,
104
+ "fill-opacity": 0.25
105
+ };
106
+ case "line":
107
+ return {
108
+ "line-color": e,
109
+ "line-width": 2
110
+ };
111
+ default:
112
+ return {};
113
+ }
114
+ }
115
+ function O({ sources: t }) {
116
+ const e = m(() => !Array.isArray(t) || t.length === 0 ? [] : t.map((n) => ({
117
+ ...n,
118
+ geoJson: n.geometry ? M(n.geometry) : null
119
+ })), [t]);
120
+ return (e == null ? void 0 : e.length) === 0 ? null : /* @__PURE__ */ u(b, { children: e == null ? void 0 : e.map((n) => /* @__PURE__ */ u("div", { children: n.geoJson && /* @__PURE__ */ u(A, { id: n.key, type: "geojson", data: n.geoJson, children: n.layer && (Array.isArray(n.layer) ? n.layer.map((a, i) => /* @__PURE__ */ u(
121
+ h,
122
+ {
123
+ type: a.type,
124
+ paint: L(a.type, a.color)
125
+ },
126
+ `${n.key}-${i}`
127
+ )) : /* @__PURE__ */ u(
128
+ h,
129
+ {
130
+ type: n.layer.type,
131
+ paint: L(n.layer.type, n.layer.color)
132
+ }
133
+ )) }, n.key) }, n.key)) });
134
+ }
135
+ export {
136
+ O as default
137
+ };
@@ -0,0 +1,31 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { P as a } from "./logo-control-NE-LlsRy.js";
3
+ import "react";
4
+ import { c as i } from "./styles-uPzJnzVS.js";
5
+ function c({
6
+ latitude: p,
7
+ longitude: e,
8
+ anchor: o,
9
+ offset: t = [0, -35],
10
+ onClose: f,
11
+ children: n
12
+ }) {
13
+ return typeof p > "u" || typeof e > "u" ? null : /* @__PURE__ */ r(
14
+ a,
15
+ {
16
+ className: "maplibre-popup",
17
+ focusAfterOpen: !0,
18
+ latitude: p,
19
+ longitude: e,
20
+ anchor: o,
21
+ offset: t,
22
+ onClose: f,
23
+ closeButton: !1,
24
+ children: /* @__PURE__ */ r("div", { className: i, children: n })
25
+ },
26
+ "maplibre-popup"
27
+ );
28
+ }
29
+ export {
30
+ c as default
31
+ };
@@ -0,0 +1,7 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ function e() {
3
+ return /* @__PURE__ */ r("div", { children: "Invalid map provider" });
4
+ }
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,2 @@
1
+ export * from './src/index'
2
+ export {}
@@ -0,0 +1,4 @@
1
+ import { b as c } from "./index-CXLLvdx4.js";
2
+ export {
3
+ c as LocalLogicMap
4
+ };