@local-logic/maps 0.0.20 → 0.0.22

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 (50) hide show
  1. package/dist/index-B85VZGVP.js +56 -0
  2. package/dist/index-BRD3rjLE.js +138 -0
  3. package/dist/index-BpFpg_5A.js +78 -0
  4. package/dist/index-BrxP9NHZ.js +56 -0
  5. package/dist/{index-DiCaFCSI.js → index-CN_dNOir.js} +168 -172
  6. package/dist/index-CRdDPWou.js +34 -0
  7. package/dist/{index-Dz1XJJEv.js → index-CSVsF1EQ.js} +28 -28
  8. package/dist/index-CceEGv05.js +104 -0
  9. package/dist/index-CiWKwaC4.js +23 -0
  10. package/dist/{index-h41HdBg1.js → index-CmajMf1d.js} +21 -21
  11. package/dist/index-D5kHxP9H.js +43 -0
  12. package/dist/index-DNNz78Rc.js +24 -0
  13. package/dist/index-Db33Ugg9.js +34 -0
  14. package/dist/index-DfhwDiOS.js +155 -0
  15. package/dist/index-arkRlpaR.js +80 -0
  16. package/dist/index-ufLC1PLO.js +57 -0
  17. package/dist/index-vHMPqmOL.js +23 -0
  18. package/dist/index.es.js +1 -1
  19. package/dist/{index.modern-fpUBOYPT.js → index.modern-B-ChKejQ.js} +9 -9
  20. package/dist/index.umd.js +148 -148
  21. package/dist/{logo-control-C5ZdRec5.js → logo-control-VgN6MEKI.js} +186 -206
  22. package/dist/{mapbox-gl-D6JObe4m.js → mapbox-gl-C6frO4Gl.js} +1877 -1877
  23. package/dist/{maplibre-gl-DDfJU6SR.js → maplibre-gl-DkDrZ6rP.js} +1230 -1228
  24. package/dist/{scale-control-Cflgzbvb.js → scale-control-jBKptTbw.js} +234 -252
  25. package/dist/src/components/Map/Root/CenterPin/Google/index.d.ts +1 -1
  26. package/dist/src/components/Map/Root/CenterPin/Google/index.d.ts.map +1 -1
  27. package/dist/src/components/Map/Root/CenterPin/Mapbox/index.d.ts +1 -1
  28. package/dist/src/components/Map/Root/CenterPin/Mapbox/index.d.ts.map +1 -1
  29. package/dist/src/components/Map/Root/CenterPin/Maptiler/index.d.ts +1 -1
  30. package/dist/src/components/Map/Root/CenterPin/Maptiler/index.d.ts.map +1 -1
  31. package/dist/src/components/Map/Root/CenterPin/types.d.ts +1 -0
  32. package/dist/src/components/Map/Root/CenterPin/types.d.ts.map +1 -1
  33. package/dist/style.css +1 -1
  34. package/dist/styles-BR85tnqI.js +2771 -0
  35. package/package.json +3 -2
  36. package/dist/index-B8fs8nrA.js +0 -79
  37. package/dist/index-B8yUQ1_f.js +0 -23
  38. package/dist/index-BG_F5Dkz.js +0 -23
  39. package/dist/index-BQ20UVWH.js +0 -34
  40. package/dist/index-C-sxmk7l.js +0 -81
  41. package/dist/index-C7cTTXxY.js +0 -24
  42. package/dist/index-CHSsiFtN.js +0 -139
  43. package/dist/index-CSNuLBAd.js +0 -105
  44. package/dist/index-D0-MIbts.js +0 -43
  45. package/dist/index-D8HDei0S.js +0 -34
  46. package/dist/index-DD3i8r0F.js +0 -56
  47. package/dist/index-DHHG0vNa.js +0 -157
  48. package/dist/index-LU2s85nk.js +0 -57
  49. package/dist/index-oYRVzSxJ.js +0 -56
  50. package/dist/styles-Do-o-qNU.js +0 -48
@@ -1,157 +0,0 @@
1
- import { jsx as u, Fragment as x } from "react/jsx-runtime";
2
- import * as $ from "react";
3
- import { useContext as k, useRef as S, useState as b, useMemo as m, useEffect as w, cloneElement as j } from "react";
4
- import { b as C, d as s } from "./logo-control-C5ZdRec5.js";
5
- import { g as I } from "./utils-DJ13veBM.js";
6
- function g(t, e) {
7
- if (!t)
8
- throw new Error(e);
9
- }
10
- let M = 0;
11
- function z(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 A(t, e, n) {
19
- var l, y, f;
20
- g(e.id === n.id, "source id changed"), g(e.type === n.type, "source type changed");
21
- let a = "", i = 0;
22
- for (const d in e)
23
- d !== "children" && d !== "id" && !s(n[d], e[d]) && (a = d, i++);
24
- if (!i)
25
- return;
26
- const o = e.type;
27
- if (o === "geojson")
28
- t.setData(e.data);
29
- else if (o === "image")
30
- t.updateImage({
31
- url: e.url,
32
- coordinates: e.coordinates
33
- });
34
- else
35
- switch (a) {
36
- case "coordinates":
37
- (l = t.setCoordinates) == null || l.call(t, e.coordinates);
38
- break;
39
- case "url":
40
- (y = t.setUrl) == null || y.call(t, e.url);
41
- break;
42
- case "tiles":
43
- (f = t.setTiles) == null || f.call(t, e.tiles);
44
- break;
45
- default:
46
- console.warn(`Unable to update <Source> prop: ${a}`);
47
- }
48
- }
49
- function E(t) {
50
- const e = k(C).map.getMap(), n = S(t), [, a] = b(0), i = m(() => t.id || `jsx-source-${M++}`, []);
51
- w(() => {
52
- if (e) {
53
- const l = () => setTimeout(() => a((y) => y + 1), 0);
54
- return e.on("styledata", l), l(), () => {
55
- var y;
56
- if (e.off("styledata", l), e.style && e.style._loaded && e.getSource(i)) {
57
- const f = (y = e.getStyle()) == null ? void 0 : y.layers;
58
- if (f)
59
- for (const d of f)
60
- d.source === i && e.removeLayer(d.id);
61
- e.removeSource(i);
62
- }
63
- };
64
- }
65
- }, [e]);
66
- let o = e && e.style && e.getSource(i);
67
- return o ? A(o, t, n.current) : o = z(e, i, t), n.current = t, o && $.Children.map(t.children, (l) => l && j(l, {
68
- source: i
69
- })) || null;
70
- }
71
- function F(t, e, n, a) {
72
- if (g(n.id === a.id, "layer id changed"), g(n.type === a.type, "layer type changed"), n.type === "custom" || a.type === "custom")
73
- return;
74
- const { layout: i = {}, paint: o = {}, filter: l, minzoom: y, maxzoom: f, beforeId: d } = n;
75
- if (d !== a.beforeId && t.moveLayer(e, d), i !== a.layout) {
76
- const c = a.layout || {};
77
- for (const r in i)
78
- s(i[r], c[r]) || t.setLayoutProperty(e, r, i[r]);
79
- for (const r in c)
80
- i.hasOwnProperty(r) || t.setLayoutProperty(e, r, void 0);
81
- }
82
- if (o !== a.paint) {
83
- const c = a.paint || {};
84
- for (const r in o)
85
- s(o[r], c[r]) || t.setPaintProperty(e, r, o[r]);
86
- for (const r in c)
87
- o.hasOwnProperty(r) || t.setPaintProperty(e, r, void 0);
88
- }
89
- s(l, a.filter) || t.setFilter(e, l), (y !== a.minzoom || f !== a.maxzoom) && t.setLayerZoomRange(e, y, f);
90
- }
91
- function R(t, e, n) {
92
- if (t.style && t.style._loaded && (!("source" in n) || t.getSource(n.source))) {
93
- const a = { ...n, id: e };
94
- delete a.beforeId, t.addLayer(a, n.beforeId);
95
- }
96
- }
97
- let U = 0;
98
- function h(t) {
99
- const e = k(C).map.getMap(), n = S(t), [, a] = b(0), i = m(() => t.id || `jsx-layer-${U++}`, []);
100
- if (w(() => {
101
- if (e) {
102
- const l = () => a((y) => y + 1);
103
- return e.on("styledata", l), l(), () => {
104
- e.off("styledata", l), e.style && e.style._loaded && e.getLayer(i) && e.removeLayer(i);
105
- };
106
- }
107
- }, [e]), e && e.style && e.getLayer(i))
108
- try {
109
- F(e, i, t, n.current);
110
- } catch (l) {
111
- console.warn(l);
112
- }
113
- else
114
- R(e, i, t);
115
- return n.current = t, null;
116
- }
117
- function L(t, e, n) {
118
- switch (t) {
119
- case "fill":
120
- return {
121
- "fill-color": e,
122
- "fill-opacity": 0.25
123
- };
124
- case "line":
125
- return {
126
- "line-color": e,
127
- "line-width": n === "LineString" ? 6 : 2
128
- };
129
- default:
130
- return {};
131
- }
132
- }
133
- function T({ sources: t }) {
134
- const e = m(() => !Array.isArray(t) || t.length === 0 ? [] : t.map((n) => ({
135
- ...n,
136
- geoJson: n.geometry ? I(n.geometry, n.type) : null
137
- })), [t]);
138
- return (e == null ? void 0 : e.length) === 0 ? null : /* @__PURE__ */ u(x, { children: e == null ? void 0 : e.map((n) => /* @__PURE__ */ u("div", { children: n.geoJson && /* @__PURE__ */ u(E, { id: n.key, type: "geojson", data: n.geoJson, children: n.layer && (Array.isArray(n.layer) ? n.layer.map((a, i) => /* @__PURE__ */ u(
139
- h,
140
- {
141
- id: `${n.key}-${i}`,
142
- type: a.type,
143
- paint: L(a.type, a.color, n.type)
144
- },
145
- `${n.key}-${i}`
146
- )) : /* @__PURE__ */ u(
147
- h,
148
- {
149
- id: n.key,
150
- type: n.layer.type,
151
- paint: L(n.layer.type, n.layer.color, n.type)
152
- }
153
- )) }, n.key) }, n.key)) });
154
- }
155
- export {
156
- T as default
157
- };
@@ -1,57 +0,0 @@
1
- import { jsxs as u, jsx as o } from "react/jsx-runtime";
2
- import { u as M, a as k } from "./index.modern-fpUBOYPT.js";
3
- import { u as I, M as O } from "./index-DiCaFCSI.js";
4
- import { C as _, c as b, M as h } from "./index-h41HdBg1.js";
5
- function C({
6
- clusters: a,
7
- colors: i,
8
- clusterIcon: d,
9
- onClick: t,
10
- doesSuperclusterContainActiveMarker: m
11
- }) {
12
- M();
13
- const { activeMarker: r, zoom: s } = I(), f = (e) => () => {
14
- e.properties.disableClick || t == null || t(e);
15
- };
16
- return a == null ? void 0 : a.map((e, g) => {
17
- const n = e.geometry.coordinates[0], p = e.geometry.coordinates[1];
18
- return /* @__PURE__ */ u(
19
- k,
20
- {
21
- position: {
22
- lat: p,
23
- lng: n
24
- },
25
- onClick: f(e),
26
- children: [
27
- e.properties.cluster && /* @__PURE__ */ o(
28
- _,
29
- {
30
- colors: i,
31
- icon: d,
32
- isActive: m(e.properties.cluster_id)
33
- }
34
- ),
35
- !e.properties.cluster && /* @__PURE__ */ o(
36
- "div",
37
- {
38
- className: b,
39
- style: e.properties.defaultColor ? {} : {
40
- "--background": i == null ? void 0 : i.background,
41
- "--fill": i == null ? void 0 : i.fill
42
- },
43
- "data-is-cluster": !!e.properties.cluster,
44
- "data-is-zoomed-out": s - 1 < O + 1,
45
- "data-is-active": (r == null ? void 0 : r.id) === e.properties.id,
46
- children: /* @__PURE__ */ o(h, { icon: e.properties.icon })
47
- }
48
- )
49
- ]
50
- },
51
- `map-marker-${n}-${p}-${g}`
52
- );
53
- });
54
- }
55
- export {
56
- C as default
57
- };
@@ -1,56 +0,0 @@
1
- import { jsxs as M, jsx as p } from "react/jsx-runtime";
2
- import { a as b } from "./scale-control-Cflgzbvb.js";
3
- import "react";
4
- import { u, M as h } from "./index-DiCaFCSI.js";
5
- import { C as k, c as x, M as I } from "./index-h41HdBg1.js";
6
- function N({
7
- clusters: t,
8
- colors: e,
9
- clusterIcon: m,
10
- onClick: a,
11
- doesSuperclusterContainActiveMarker: s
12
- }) {
13
- const { activeMarker: r, zoom: f } = u(), g = (i) => (o) => {
14
- o.originalEvent.stopPropagation(), !i.properties.disableClick && (a == null || a(i));
15
- };
16
- return t == null ? void 0 : t.map((i, o) => {
17
- const n = i.geometry.coordinates[0], d = i.geometry.coordinates[1];
18
- return /* @__PURE__ */ M(
19
- b,
20
- {
21
- anchor: "bottom",
22
- longitude: n,
23
- latitude: d,
24
- onClick: g(i),
25
- children: [
26
- i.properties.cluster && /* @__PURE__ */ p(
27
- k,
28
- {
29
- colors: e,
30
- icon: m,
31
- isActive: s(i.properties.cluster_id)
32
- }
33
- ),
34
- !i.properties.cluster && /* @__PURE__ */ p(
35
- "div",
36
- {
37
- className: x,
38
- style: i.properties.defaultColor ? {} : {
39
- "--background": e == null ? void 0 : e.background,
40
- "--fill": e == null ? void 0 : e.fill
41
- },
42
- "data-is-cluster": !!i.properties.cluster,
43
- "data-is-zoomed-out": f < h,
44
- "data-is-active": (r == null ? void 0 : r.id) === i.properties.id,
45
- children: /* @__PURE__ */ p(I, { icon: i.properties.icon })
46
- }
47
- )
48
- ]
49
- },
50
- `map-marker-${n}-${d}-${o}`
51
- );
52
- });
53
- }
54
- export {
55
- N as default
56
- };
@@ -1,48 +0,0 @@
1
- import * as e from "react";
2
- import { p as l } from "./IconBase.es-rM5tt24D.js";
3
- const n = /* @__PURE__ */ new Map([
4
- [
5
- "bold",
6
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M240,204H228V144a12,12,0,0,0,12.49-19.78L142.14,25.85a20,20,0,0,0-28.28,0L15.51,124.2A12,12,0,0,0,28,144v60H16a12,12,0,0,0,0,24H240a12,12,0,0,0,0-24ZM52,121.65l76-76,76,76V204H164V152a12,12,0,0,0-12-12H104a12,12,0,0,0-12,12v52H52ZM140,204H116V164h24Z" }))
7
- ],
8
- [
9
- "duotone",
10
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
11
- "path",
12
- {
13
- d: "M216,116.69V216H152V152H104v64H40V116.69l82.34-82.35a8,8,0,0,1,11.32,0Z",
14
- opacity: "0.2"
15
- }
16
- ), /* @__PURE__ */ e.createElement("path", { d: "M240,208H224V136l2.34,2.34A8,8,0,0,0,237.66,127L139.31,28.68a16,16,0,0,0-22.62,0L18.34,127a8,8,0,0,0,11.32,11.31L32,136v72H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM48,120l80-80,80,80v88H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48Zm96,88H112V160h32Z" }))
17
- ],
18
- [
19
- "fill",
20
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M240,208H224V136l2.34,2.34A8,8,0,0,0,237.66,127L139.31,28.68a16,16,0,0,0-22.62,0L18.34,127a8,8,0,0,0,11.32,11.31L32,136v72H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16Zm-88,0H104V160a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4Z" }))
21
- ],
22
- [
23
- "light",
24
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M240,210H222V131.17l5.76,5.76a6,6,0,0,0,8.48-8.49L137.9,30.09a14,14,0,0,0-19.8,0L19.76,128.44a6,6,0,0,0,8.48,8.49L34,131.17V210H16a6,6,0,0,0,0,12H240a6,6,0,0,0,0-12ZM46,119.17l80.58-80.59a2,2,0,0,1,2.84,0L210,119.17V210H158V152a6,6,0,0,0-6-6H104a6,6,0,0,0-6,6v58H46ZM146,210H110V158h36Z" }))
25
- ],
26
- [
27
- "regular",
28
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M240,208H224V136l2.34,2.34A8,8,0,0,0,237.66,127L139.31,28.68a16,16,0,0,0-22.62,0L18.34,127a8,8,0,0,0,11.32,11.31L32,136v72H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM48,120l80-80,80,80v88H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48Zm96,88H112V160h32Z" }))
29
- ],
30
- [
31
- "thin",
32
- /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M240,212H220V126.34l9.17,9.17a4,4,0,1,0,5.66-5.66L136.49,31.51a12,12,0,0,0-17,0L21.17,129.85a4,4,0,1,0,5.66,5.66L36,126.34V212H16a4,4,0,0,0,0,8H240a4,4,0,0,0,0-8ZM44,118.34l81.17-81.17a4,4,0,0,1,5.66,0L212,118.34V212H156V152a4,4,0,0,0-4-4H104a4,4,0,0,0-4,4v60H44ZM148,212H108V156h40Z" }))
33
- ]
34
- ]), r = e.forwardRef((a, t) => /* @__PURE__ */ e.createElement(l, { ref: t, ...a, weights: n }));
35
- r.displayName = "HouseLineIcon";
36
- const m = (a) => /* @__PURE__ */ e.createElement("svg", { width: 34, height: 41, viewBox: "0 0 34 41", fill: "inherit", xmlns: "http://www.w3.org/2000/svg", ...a }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17 0C26.3888 0 34 7.61116 34 17C34 24.1987 29.5256 30.3524 23.2061 32.8316L17.9683 39.991C17.8591 40.1409 17.7141 40.2632 17.5456 40.3476C17.377 40.4321 17.1899 40.4762 17 40.4762C16.8101 40.4762 16.623 40.4321 16.4544 40.3476C16.2859 40.2632 16.1409 40.1409 16.0317 39.991L10.7939 32.8316C4.47445 30.3524 0 24.1987 0 17C0 7.61116 7.61116 0 17 0Z", fill: "currentColor" })), c = `
37
- relative flex items-center justify-center z-10 w-fit
38
- `, o = "text-primary-100", i = `
39
- w-5 h-5 fill-base-white
40
- absolute top-1.5 left-1/2 transform -translate-x-1/2
41
- `;
42
- export {
43
- m as S,
44
- o as b,
45
- c,
46
- i,
47
- r as o
48
- };