@m4l/gclick 0.30.0 → 0.31.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 (25) hide show
  1. package/components/maps/components/GpsMap/GpsMap.d.ts +2 -3
  2. package/components/maps/components/GpsMap/GpsMap.d.ts.map +1 -1
  3. package/components/maps/components/GpsMap/GpsMap.js +26 -24
  4. package/components/maps/components/GpsMap/external/googleMutant/googleMutant.js +133 -109
  5. package/components/maps/components/GpsMap/external/tileReserve/ReservedTileLayer.d.ts +14 -0
  6. package/components/maps/components/GpsMap/external/tileReserve/ReservedTileLayer.d.ts.map +1 -0
  7. package/components/maps/components/GpsMap/external/tileReserve/ReservedTileLayer.js +24 -0
  8. package/components/maps/components/GpsMap/external/tileReserve/constants.d.ts +5 -0
  9. package/components/maps/components/GpsMap/external/tileReserve/constants.d.ts.map +1 -0
  10. package/components/maps/components/GpsMap/external/tileReserve/constants.js +5 -0
  11. package/components/maps/components/GpsMap/external/tileReserve/tileReserve.d.ts +10 -0
  12. package/components/maps/components/GpsMap/external/tileReserve/tileReserve.d.ts.map +1 -0
  13. package/components/maps/components/GpsMap/external/tileReserve/tileReserve.js +36 -0
  14. package/components/maps/components/GpsMap/external/tileReserve/types.d.ts +23 -0
  15. package/components/maps/components/GpsMap/external/tileReserve/types.d.ts.map +1 -0
  16. package/components/maps/components/GpsMap/subcomponents/TileLayers/TileLayers.d.ts +3 -2
  17. package/components/maps/components/GpsMap/subcomponents/TileLayers/TileLayers.d.ts.map +1 -1
  18. package/components/maps/components/GpsMap/subcomponents/TileLayers/TileLayers.js +25 -16
  19. package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/TileLayerGoogle.d.ts +2 -1
  20. package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/TileLayerGoogle.d.ts.map +1 -1
  21. package/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/TileLayerGoogle.js +51 -41
  22. package/components/maps/components/GpsMap/types.d.ts +35 -33
  23. package/components/maps/components/GpsMap/types.d.ts.map +1 -1
  24. package/index.d.ts +1 -1
  25. package/package.json +1 -1
@@ -1,8 +1,7 @@
1
1
  import { MapProps } from './types';
2
2
  /**
3
- * "Map" componente encargado de renderizar las diferentes capas y brindar diferentes herramientas de usabilidad al usuario.
4
- * Se utiliza MapRootContainer que es el estilado del contenedor principal del mapa.
5
- * @param props.gpsTools Herrameitas para gestionar las herramientas de guardian.click
3
+ * Render map layers and usability tools inside the styled map root container.
4
+ * @param props Map configuration and Guardian tools.
6
5
  * @link https://react-leaflet.js.org/
7
6
  */
8
7
  export declare function GpsMap(props: MapProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"GpsMap.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/GpsMap.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAMnC;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,oDAoDrC"}
1
+ {"version":3,"file":"GpsMap.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/GpsMap.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOnC;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,oDAqDrC"}
@@ -1,51 +1,53 @@
1
- import { jsx as o, jsxs as C } from "@emotion/react/jsx-runtime";
1
+ import { jsx as o, jsxs as R } from "@emotion/react/jsx-runtime";
2
2
  import { mapClasses as x } from "./classes/index.js";
3
- import { GpsMapRootStyled as M, GpsMapContainerStyled as d } from "./slots/styled.js";
4
- import h from "clsx";
5
- import { useCallback as y } from "react";
6
- import { useMapStore as Z } from "./hooks/useMapStore/index.js";
7
- import { MapEventController as b } from "./subcomponents/MapEventController/MapEventController.js";
8
- import { TileLayers as v } from "./subcomponents/TileLayers/TileLayers.js";
9
- import { LayersContainer as R } from "./subcomponents/LayersContainer/LayersContainer.js";
10
- import { Controls as G } from "./subcomponents/Controls/Controls.js";
11
- function A(t) {
3
+ import { GpsMapRootStyled as E, GpsMapContainerStyled as M } from "./slots/styled.js";
4
+ import d from "clsx";
5
+ import { useCallback as h } from "react";
6
+ import { useMapStore as v } from "./hooks/useMapStore/index.js";
7
+ import { DEFAULT_TILE_RESERVE_FACTOR as y } from "./external/tileReserve/constants.js";
8
+ import { MapEventController as L } from "./subcomponents/MapEventController/MapEventController.js";
9
+ import { TileLayers as T } from "./subcomponents/TileLayers/TileLayers.js";
10
+ import { LayersContainer as Z } from "./subcomponents/LayersContainer/LayersContainer.js";
11
+ import { Controls as b } from "./subcomponents/Controls/Controls.js";
12
+ function w(t) {
12
13
  const {
13
14
  tools: m,
14
15
  center: s = [6.215749485905093, -75.58622905191254],
15
16
  initalZoom: a = 16,
16
17
  maxZoom: l = 22,
17
- minZoom: p = 2,
18
- children: i,
18
+ minZoom: i = 2,
19
+ children: p,
19
20
  className: n,
20
21
  disableMapEvents: f = !1,
21
- style: c
22
- } = t, r = Z((e) => e.mapActions.setMapRef), u = y((e) => {
22
+ tileReserveFactor: c = y,
23
+ style: C
24
+ } = t, r = v((e) => e.mapActions.setMapRef), u = h((e) => {
23
25
  e !== null && r(e);
24
26
  }, [r]);
25
- return /* @__PURE__ */ o(M, { className: h(x.root, n), children: /* @__PURE__ */ C(
26
- d,
27
+ return /* @__PURE__ */ o(E, { className: d(x.root, n), children: /* @__PURE__ */ R(
28
+ M,
27
29
  {
28
30
  ref: u,
29
31
  center: s,
30
32
  zoom: a,
31
- minZoom: p,
33
+ minZoom: i,
32
34
  maxZoom: l,
33
35
  boxZoom: !0,
34
36
  preferCanvas: !0,
35
37
  zoomControl: !1,
36
38
  wheelDebounceTime: 40,
37
39
  wheelPxPerZoomLevel: 240,
38
- style: c,
40
+ style: C,
39
41
  children: [
40
- /* @__PURE__ */ o(b, { disableMapEvents: f }),
41
- /* @__PURE__ */ o(v, {}),
42
- /* @__PURE__ */ o(R, {}),
43
- /* @__PURE__ */ o(G, { tools: m }),
44
- i
42
+ /* @__PURE__ */ o(L, { disableMapEvents: f }),
43
+ /* @__PURE__ */ o(T, { tileReserveFactor: c }),
44
+ /* @__PURE__ */ o(Z, {}),
45
+ /* @__PURE__ */ o(b, { tools: m }),
46
+ p
45
47
  ]
46
48
  }
47
49
  ) });
48
50
  }
49
51
  export {
50
- A as GpsMap
52
+ w as GpsMap
51
53
  };
@@ -1,14 +1,15 @@
1
- import o from "leaflet";
1
+ import a from "leaflet";
2
2
  import { LRUMap as _ } from "./LRUMap.js";
3
- function d(t, e) {
3
+ import { setTileReserveFactor as d, getTileReserveEvents as m, getReservedTilePixelBounds as f, getTileReserveFactor as p } from "../tileReserve/tileReserve.js";
4
+ function g(e, t) {
4
5
  let n = 0, i = null;
5
6
  i = setInterval(function() {
6
7
  if (n >= 20)
7
8
  throw clearInterval(i), new Error("window.google not found after 10 seconds");
8
- window.google && window.google.maps && window.google.maps.Map && (clearInterval(i), t.call(e)), ++n;
9
+ window.google && window.google.maps && window.google.maps.Map && (clearInterval(i), e.call(t)), ++n;
9
10
  }, 500);
10
11
  }
11
- o.GridLayer.GoogleMutant = o.GridLayer.extend({
12
+ a.GridLayer.GoogleMutant = a.GridLayer.extend({
12
13
  options: {
13
14
  maxZoom: 21,
14
15
  // can be 23, but ugly if more than maxNativeZoom
@@ -17,28 +18,33 @@ o.GridLayer.GoogleMutant = o.GridLayer.extend({
17
18
  type: "roads",
18
19
  maxNativeZoom: 21
19
20
  },
21
+ // The Google producer and Leaflet consumer must cover the same reserve;
22
+ // enlarging only the consumer leaves tiles waiting for images never produced.
23
+ _getTiledPixelBounds: f,
24
+ getEvents: m,
25
+ setTileReserveFactor: d,
20
26
  /**
21
- * TODO: Documentar
27
+ * TODO: Document
22
28
  */
23
- initialize: function(t) {
24
- o.GridLayer.prototype.initialize.call(this, t), this._tileCallbacks = {}, this._lru = new _(100), this._imagesPerTile = this.options.type === "hybrid" ? 2 : 1, this._boundOnMutatedImage = this._onMutatedImage.bind(this), this._replaceBySrc = !0;
29
+ initialize: function(e) {
30
+ a.GridLayer.prototype.initialize.call(this, e), this._tileCallbacks = {}, this.on("tileunload", this._onTileUnload, this), this._lru = new _(100), this._imagesPerTile = this.options.type === "hybrid" ? 2 : 1, this._boundOnMutatedImage = this._onMutatedImage.bind(this), this._replaceBySrc = !0;
25
31
  },
26
32
  /**
27
- * TODO: Documentar
33
+ * TODO: Document
28
34
  */
29
- onAdd: function(t) {
30
- const e = this;
31
- o.GridLayer.prototype.onAdd.call(this, t), this._initMutantContainer(), this._logoContainer && t._controlCorners.bottomleft.appendChild(this._logoContainer), this._attributionContainer && t._controlCorners.bottomright.appendChild(this._attributionContainer), d(function() {
32
- e._map && (e._initMutant(), google.maps.event.addListenerOnce(e._mutant, "idle", function() {
33
- e._map && (e._checkZoomLevels(), e._mutantIsReady = !0);
35
+ onAdd: function(e) {
36
+ const t = this;
37
+ a.GridLayer.prototype.onAdd.call(this, e), this._initMutantContainer(), this._logoContainer && e._controlCorners.bottomleft.appendChild(this._logoContainer), this._attributionContainer && e._controlCorners.bottomright.appendChild(this._attributionContainer), g(function() {
38
+ t._map && (t._initMutant(), google.maps.event.addListenerOnce(t._mutant, "idle", function() {
39
+ t._map && (t._checkZoomLevels(), t._mutantIsReady = !0);
34
40
  }));
35
41
  });
36
42
  },
37
43
  /**
38
- * TODO: Documentar
44
+ * TODO: Document
39
45
  */
40
- onRemove: function(t) {
41
- o.GridLayer.prototype.onRemove.call(this, t), this._observer.disconnect(), t._container.removeChild(this._mutantContainer), this._logoContainer && o.DomUtil.remove(this._logoContainer), this._attributionContainer && o.DomUtil.remove(this._attributionContainer), this._mutant && google.maps.event.clearListeners(this._mutant, "idle");
46
+ onRemove: function(e) {
47
+ a.GridLayer.prototype.onRemove.call(this, e), this._observer.disconnect(), e._container.removeChild(this._mutantContainer), this._logoContainer && a.DomUtil.remove(this._logoContainer), this._attributionContainer && a.DomUtil.remove(this._attributionContainer), this._mutant && google.maps.event.clearListeners(this._mutant, "idle");
42
48
  },
43
49
  // 🍂method addGoogleLayer(name: String, options?: Object): this
44
50
  // Adds layer with the given name and options to the google Map instance.
@@ -46,45 +52,48 @@ o.GridLayer.GoogleMutant = o.GridLayer.extend({
46
52
  // currently following values supported: 'TrafficLayer', 'TransitLayer', 'BicyclingLayer'.
47
53
  // `options`: see https://developers.google.com/maps/documentation/javascript/reference/map
48
54
  /**
49
- * TODO: Documentar
55
+ * TODO: Document
50
56
  */
51
- addGoogleLayer: function(t, e) {
57
+ addGoogleLayer: function(e, t) {
52
58
  const n = this;
53
59
  return this._subLayers || (this._subLayers = {}), this.whenReady(function() {
54
- const i = google.maps[t], s = new i(e);
55
- s.setMap(n._mutant), n._subLayers[t] = s;
60
+ const i = google.maps[e], o = new i(t);
61
+ o.setMap(n._mutant), n._subLayers[e] = o;
56
62
  }), this;
57
63
  },
58
64
  // 🍂method removeGoogleLayer(name: String): this
59
65
  // Removes layer with the given name from the google Map instance.
60
66
  /**
61
- * TODO: Documentar
67
+ * TODO: Document
62
68
  */
63
- removeGoogleLayer: function(t) {
64
- const e = this;
69
+ removeGoogleLayer: function(e) {
70
+ const t = this;
65
71
  return this.whenReady(function() {
66
- const n = e._subLayers && e._subLayers[t];
67
- n && (n.setMap(null), delete e._subLayers[t]);
72
+ const n = t._subLayers && t._subLayers[e];
73
+ n && (n.setMap(null), delete t._subLayers[e]);
68
74
  }), this;
69
75
  },
70
76
  /**
71
- * TODO: Documentar
77
+ * TODO: Document
72
78
  */
73
79
  _initMutantContainer: function() {
74
- this._mutantContainer || (this._mutantContainer = o.DomUtil.create(
80
+ this._mutantContainer || (this._mutantContainer = a.DomUtil.create(
75
81
  "div",
76
82
  "leaflet-google-mutant leaflet-top leaflet-left"
77
- ), this._mutantContainer.id = "_MutantContainer_" + o.Util.stamp(this._mutantContainer), this._mutantContainer.style.pointerEvents = "none", this._mutantContainer.style.visibility = "hidden", o.DomEvent.off(this._mutantContainer)), this._map.getContainer().appendChild(this._mutantContainer), this.setOpacity(this.options.opacity);
78
- const t = this._mutantContainer.style;
79
- this._map.options.zoomSnap < 1 ? (t.width = "180%", t.height = "180%") : (t.width = "100%", t.height = "100%"), t.zIndex = -1, this._attachObserver(this._mutantContainer);
83
+ ), this._mutantContainer.id = "_MutantContainer_" + a.Util.stamp(this._mutantContainer), this._mutantContainer.style.pointerEvents = "none", this._mutantContainer.style.visibility = "hidden", a.DomEvent.off(this._mutantContainer)), this._map.getContainer().appendChild(this._mutantContainer), this.setOpacity(this.options.opacity), this._onTileReserveChange(), this._mutantContainer.style.zIndex = -1, this._attachObserver(this._mutantContainer);
84
+ },
85
+ /** Resize the existing Google producer before Leaflet requests the new tile area. */
86
+ _onTileReserveChange: function() {
87
+ const e = this._mutantContainer.style, t = p.call(this);
88
+ this._map.options.zoomSnap < 1 ? (e.width = `${180 * t}%`, e.height = `${180 * t}%`) : (e.width = `${100 * t}%`, e.height = `${100 * t}%`), this._mutant && google.maps.event.trigger(this._mutant, "resize");
80
89
  },
81
90
  /**
82
- * TODO: Documentar
91
+ * TODO: Document
83
92
  */
84
93
  _initMutant: function() {
85
94
  if (this._mutant)
86
95
  return;
87
- const t = new google.maps.Map(this._mutantContainer, {
96
+ const e = new google.maps.Map(this._mutantContainer, {
88
97
  center: { lat: 0, lng: 0 },
89
98
  zoom: 0,
90
99
  tilt: 0,
@@ -97,49 +106,49 @@ o.GridLayer.GoogleMutant = o.GridLayer.extend({
97
106
  styles: this.options.styles || [],
98
107
  backgroundColor: "transparent"
99
108
  });
100
- this._mutant = t, this._update(), this.fire("spawned", { mapObject: t }), this._waitControls(), this.once("controls_ready", this._setupAttribution);
109
+ this._mutant = e, this._update(), this.fire("spawned", { mapObject: e }), this._waitControls(), this.once("controls_ready", this._setupAttribution);
101
110
  },
102
111
  /**
103
- * TODO: Documentar
112
+ * TODO: Document
104
113
  */
105
- _attachObserver: function(e) {
106
- this._observer || (this._observer = new MutationObserver(this._onMutations.bind(this))), this._observer.observe(e, { childList: !0, subtree: !0 }), Array.prototype.forEach.call(e.querySelectorAll("img"), this._boundOnMutatedImage);
114
+ _attachObserver: function(t) {
115
+ this._observer || (this._observer = new MutationObserver(this._onMutations.bind(this))), this._observer.observe(t, { childList: !0, subtree: !0 }), Array.prototype.forEach.call(t.querySelectorAll("img"), this._boundOnMutatedImage);
107
116
  },
108
117
  /**
109
- * TODO: Documentar
118
+ * TODO: Document
110
119
  */
111
120
  _waitControls: function() {
112
- const t = this;
113
- var e = setInterval(function() {
114
- const n = t._mutant.__gm.layoutManager;
121
+ const e = this;
122
+ var t = setInterval(function() {
123
+ const n = e._mutant.__gm.layoutManager;
115
124
  if (!n)
116
125
  return;
117
- clearInterval(e);
126
+ clearInterval(t);
118
127
  let i;
119
- Object.keys(n).forEach(function(s) {
120
- const a = n[s];
121
- a.get && a.get(1) instanceof Node && (i = a);
122
- }), t.fire("controls_ready", { positions: i });
128
+ Object.keys(n).forEach(function(o) {
129
+ const s = n[o];
130
+ s.get && s.get(1) instanceof Node && (i = s);
131
+ }), e.fire("controls_ready", { positions: i });
123
132
  }, 50);
124
133
  },
125
134
  /**
126
- * TODO: Documentar
135
+ * TODO: Document
127
136
  */
128
- _setupAttribution: function(t) {
137
+ _setupAttribution: function(e) {
129
138
  if (!this._map)
130
139
  return;
131
- const e = google.maps.ControlPosition, n = this._attributionContainer = t.positions.get(e.BOTTOM_RIGHT);
132
- o.DomUtil.addClass(n, "leaflet-control leaflet-control-attribution"), o.DomEvent.disableClickPropagation(n), n.style.height = "14px", this._map._controlCorners.bottomright.appendChild(n), this._logoContainer = t.positions.get(e.BOTTOM_LEFT), this._logoContainer.style.pointerEvents = "auto";
140
+ const t = google.maps.ControlPosition, n = this._attributionContainer = e.positions.get(t.BOTTOM_RIGHT);
141
+ a.DomUtil.addClass(n, "leaflet-control leaflet-control-attribution"), a.DomEvent.disableClickPropagation(n), n.style.height = "14px", this._map._controlCorners.bottomright.appendChild(n), this._logoContainer = e.positions.get(t.BOTTOM_LEFT), this._logoContainer.style.pointerEvents = "auto";
133
142
  },
134
143
  /**
135
- * TODO: Documentar
144
+ * TODO: Document
136
145
  */
137
- _onMutations: function(e) {
138
- for (let n = 0; n < e.length; ++n) {
139
- const i = e[n];
140
- for (let s = 0; s < i.addedNodes.length; ++s) {
141
- const a = i.addedNodes[s];
142
- a instanceof HTMLImageElement ? this._onMutatedImage(a) : a instanceof HTMLElement && Array.prototype.forEach.call(a.querySelectorAll("img"), this._boundOnMutatedImage);
146
+ _onMutations: function(t) {
147
+ for (let n = 0; n < t.length; ++n) {
148
+ const i = t[n];
149
+ for (let o = 0; o < i.addedNodes.length; ++o) {
150
+ const s = i.addedNodes[o];
151
+ s instanceof HTMLImageElement ? this._onMutatedImage(s) : s instanceof HTMLElement && Array.prototype.forEach.call(s.querySelectorAll("img"), this._boundOnMutatedImage);
143
152
  }
144
153
  }
145
154
  },
@@ -150,102 +159,117 @@ o.GridLayer.GoogleMutant = o.GridLayer.extend({
150
159
  // On the other hand, raster imagery matches this other pattern
151
160
  _satRegexp: /x=(\d+)&y=(\d+)&z=(\d+|VinaFnapurmBegrtn)/,
152
161
  /**
153
- * TODO: Documentar
162
+ * TODO: Document
154
163
  */
155
- _onMutatedImage: function(e) {
156
- let n, i = e.src.match(this._roadRegexp), s = 0;
164
+ _onMutatedImage: function(t) {
165
+ let n, i = t.src.match(this._roadRegexp), o = 0;
157
166
  if (i ? (n = {
158
167
  z: i[1],
159
168
  x: i[2],
160
169
  y: i[3]
161
- }, this._imagesPerTile > 1 && (e.style.zIndex = 1, s = 1)) : (i = e.src.match(this._satRegexp), i && (n = {
170
+ }, this._imagesPerTile > 1 && (t.style.zIndex = 1, o = 1)) : (i = t.src.match(this._satRegexp), i && (n = {
162
171
  x: i[1],
163
172
  y: i[2],
164
173
  z: i[3]
165
- }), s = 0), n) {
166
- const a = this._tileCoordsToKey(n);
167
- e.style.position = "absolute", e.style.propJuan = a;
168
- const h = a + "/" + s;
169
- this._lru.set(h, e);
170
- const r = this._map._container.querySelector(
171
- '.leaflet-tile[data-key="' + a + '"]'
174
+ }), o = 0), n) {
175
+ const s = this._tileCoordsToKey(n);
176
+ t.style.position = "absolute", t.style.propJuan = s;
177
+ const r = s + "/" + o;
178
+ this._lru.set(r, t);
179
+ const l = this._map._container.querySelector(
180
+ '.leaflet-tile[data-key="' + s + '"]'
172
181
  );
173
- let l;
174
- r && (l = r.querySelector('.leaflet-tile-container img[src*="' + i[0] + '"]')), r && l && l.src !== e.src && (this._replaceBySrc ? l.src = e.src : (r.removeChild(l), l = this._clone(e), s === 0 && this._imagesPerTile > 1 ? r.prepend(l) : r.appendChild(l))), h in this._tileCallbacks && this._tileCallbacks[h] && (this._tileCallbacks[h].forEach(function(c) {
175
- return c(e);
176
- }), delete this._tileCallbacks[h]);
182
+ let h;
183
+ l && (h = l.querySelector('.leaflet-tile-container img[src*="' + i[0] + '"]')), l && h && h.src !== t.src && (this._replaceBySrc ? h.src = t.src : (l.removeChild(h), h = this._clone(t), o === 0 && this._imagesPerTile > 1 ? l.prepend(h) : l.appendChild(h))), r in this._tileCallbacks && this._tileCallbacks[r] && (this._tileCallbacks[r].forEach(function(u) {
184
+ u.cancelled || u.callback(t);
185
+ }), delete this._tileCallbacks[r]);
186
+ }
187
+ },
188
+ /** Release only the callbacks owned by an unloaded tile, including wrapped copies. */
189
+ _onTileUnload: function(e) {
190
+ const t = e.tile.dataset.key;
191
+ for (let n = 0; n < this._imagesPerTile; ++n) {
192
+ const i = t + "/" + n, o = this._tileCallbacks[i];
193
+ if (!o)
194
+ continue;
195
+ const s = o.filter(function(r) {
196
+ return r.tile === e.tile ? (r.cancelled = !0, !1) : !0;
197
+ });
198
+ s.length ? this._tileCallbacks[i] = s : delete this._tileCallbacks[i];
177
199
  }
178
200
  },
179
201
  /**
180
- * TODO: Documentar
202
+ * TODO: Document
181
203
  */
182
- createTile: function(t, e) {
183
- const n = this._tileCoordsToKey(t), i = o.DomUtil.create("div");
184
- i.style.textAlign = "left", i.dataset.pending = this._imagesPerTile, i.dataset.key = n, e = e.bind(this, null, i);
185
- for (let s = 0; s < this._imagesPerTile; ++s) {
186
- const a = n + "/" + s, h = this._lru.get(a);
187
- h ? (i.appendChild(this._clone(h)), --i.dataset.pending) : (this._tileCallbacks[a] = this._tileCallbacks[a] || [], this._tileCallbacks[a].push(
188
- (function(r) {
189
- return (function(l) {
190
- r.appendChild(this._clone(l)), --r.dataset.pending, parseInt(r.dataset.pending) || e();
204
+ createTile: function(e, t) {
205
+ const n = this._tileCoordsToKey(e), i = a.DomUtil.create("div");
206
+ i.style.textAlign = "left", i.dataset.pending = this._imagesPerTile, i.dataset.key = n, t = t.bind(this, null, i);
207
+ for (let o = 0; o < this._imagesPerTile; ++o) {
208
+ const s = n + "/" + o, r = this._lru.get(s);
209
+ r ? (i.appendChild(this._clone(r)), --i.dataset.pending) : (this._tileCallbacks[s] = this._tileCallbacks[s] || [], this._tileCallbacks[s].push({
210
+ tile: i,
211
+ cancelled: !1,
212
+ callback: (function(l) {
213
+ return (function(h) {
214
+ l.appendChild(this._clone(h)), --l.dataset.pending, parseInt(l.dataset.pending) || t();
191
215
  }).bind(this);
192
216
  }).bind(this)(
193
217
  i
194
218
  /*, key2*/
195
219
  )
196
- ));
220
+ }));
197
221
  }
198
- return parseInt(i.dataset.pending) || o.Util.requestAnimFrame(e), i;
222
+ return parseInt(i.dataset.pending) || a.Util.requestAnimFrame(t), i;
199
223
  },
200
224
  /**
201
- * TODO: Documentar
225
+ * TODO: Document
202
226
  */
203
- _clone: function(t) {
204
- const e = t.cloneNode(!0);
205
- return e.style.visibility = "visible", e;
227
+ _clone: function(e) {
228
+ const t = e.cloneNode(!0);
229
+ return t.style.visibility = "visible", t;
206
230
  },
207
231
  /**
208
- * TODO: Documentar
232
+ * TODO: Document
209
233
  */
210
234
  _checkZoomLevels: function() {
211
- const t = this._map.getZoom(), e = this._mutant.getZoom();
212
- !t || !e || (e !== t || //zoom levels are out of sync, Google doesn't have data
213
- e > this.options.maxNativeZoom) && this._setMaxNativeZoom(e);
235
+ const e = this._map.getZoom(), t = this._mutant.getZoom();
236
+ !e || !t || (t !== e || //zoom levels are out of sync, Google doesn't have data
237
+ t > this.options.maxNativeZoom) && this._setMaxNativeZoom(t);
214
238
  },
215
239
  /**
216
- * TODO: Documentar
240
+ * TODO: Document
217
241
  */
218
- _setMaxNativeZoom: function(t) {
219
- t !== this.options.maxNativeZoom && (this.options.maxNativeZoom = t, this._resetView());
242
+ _setMaxNativeZoom: function(e) {
243
+ e !== this.options.maxNativeZoom && (this.options.maxNativeZoom = e, this._resetView());
220
244
  },
221
245
  /**
222
- * TODO: Documentar
246
+ * TODO: Document
223
247
  */
224
- _update: function(t) {
248
+ _update: function(e) {
225
249
  if (this._mutant) {
226
- t = t || this._map.getCenter();
227
- const e = new google.maps.LatLng(t.lat, t.lng), n = Math.round(this._map.getZoom()), i = this._mutant.getZoom();
228
- this._mutant.setCenter(e), n !== i && (this._mutant.setZoom(n), this._mutantIsReady && this._checkZoomLevels());
250
+ e = e || this._map.getCenter();
251
+ const t = new google.maps.LatLng(e.lat, e.lng), n = Math.round(this._map.getZoom()), i = this._mutant.getZoom();
252
+ this._mutant.setCenter(t), n !== i && (this._mutant.setZoom(n), this._mutantIsReady && this._checkZoomLevels());
229
253
  }
230
- o.GridLayer.prototype._update.call(this, t);
254
+ a.GridLayer.prototype._update.call(this, e);
231
255
  },
232
256
  // @method whenReady(fn: Function, context?: Object): this
233
257
  // Runs the given function `fn` when the mutant gets initialized, or immediately
234
258
  // if it's already initialized, optionally passing a function context.
235
259
  /**
236
- * TODO: Documentar
260
+ * TODO: Document
237
261
  */
238
- whenReady: function(t, e) {
239
- return this._mutant ? t.call(e || this, { target: this }) : this.on("spawned", t, e), this;
262
+ whenReady: function(e, t) {
263
+ return this._mutant ? e.call(t || this, { target: this }) : this.on("spawned", e, t), this;
240
264
  }
241
265
  });
242
- const u = o.GridLayer.GoogleMutant;
243
- function m() {
244
- o.GridLayer.GoogleMutant = u, o.gridLayer.googleMutant = function(t) {
245
- return new u(t);
266
+ const c = a.GridLayer.GoogleMutant;
267
+ function y() {
268
+ a.GridLayer.GoogleMutant = c, a.gridLayer.googleMutant = function(e) {
269
+ return new c(e);
246
270
  };
247
271
  }
248
- m();
272
+ y();
249
273
  export {
250
- m as registerGoogleMutantRuntime
274
+ y as registerGoogleMutantRuntime
251
275
  };
@@ -0,0 +1,14 @@
1
+ import { default as L } from 'leaflet';
2
+ /** A local subclass keeps the reserve out of unrelated maps and providers. */
3
+ declare class ReservedTileLayer extends L.TileLayer {
4
+ /** Follow the consumer's reserve preference without recreating visible tiles. */
5
+ setTileReserveFactor(factor: number): void;
6
+ /** Preserve native desktop updates and add gated mobile reserve refills. */
7
+ getEvents(): Record<string, L.LeafletEventHandlerFn>;
8
+ /** Expand this layer's request bounds while preserving Leaflet zoom scaling. */
9
+ protected _getTiledPixelBounds(center: L.LatLng): L.Bounds;
10
+ }
11
+ /** Create raster tiles with an optional viewport reserve refilled during camera pans. */
12
+ export declare function createReservedTileLayer(url: string, options: L.TileLayerOptions, tileReserveFactor?: number): ReservedTileLayer;
13
+ export {};
14
+ //# sourceMappingURL=ReservedTileLayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReservedTileLayer.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/external/tileReserve/ReservedTileLayer.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,SAAS,CAAC;AAIxB,8EAA8E;AAC9E,cAAM,iBAAkB,SAAQ,CAAC,CAAC,SAAS;IACzC,iFAAiF;IACjF,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI1C,4EAA4E;IACnE,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,qBAAqB,CAAC;IAI7D,gFAAgF;IAChF,SAAS,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM;CAG3D;AAED,yFAAyF;AACzF,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,gBAAgB,EAAE,iBAAiB,SAA8B,GACxF,iBAAiB,CAInB"}
@@ -0,0 +1,24 @@
1
+ import l from "leaflet";
2
+ import { setTileReserveFactor as i, getTileReserveEvents as o, getReservedTilePixelBounds as a } from "./tileReserve.js";
3
+ import { DEFAULT_TILE_RESERVE_FACTOR as n } from "./constants.js";
4
+ class T extends l.TileLayer {
5
+ /** Follow the consumer's reserve preference without recreating visible tiles. */
6
+ setTileReserveFactor(e) {
7
+ i.call(this, e);
8
+ }
9
+ /** Preserve native desktop updates and add gated mobile reserve refills. */
10
+ getEvents() {
11
+ return o.call(this);
12
+ }
13
+ /** Expand this layer's request bounds while preserving Leaflet zoom scaling. */
14
+ _getTiledPixelBounds(e) {
15
+ return a.call(this, e);
16
+ }
17
+ }
18
+ function d(r, e, s = n) {
19
+ const t = new T(r, e);
20
+ return t.setTileReserveFactor(s), t;
21
+ }
22
+ export {
23
+ d as createReservedTileLayer
24
+ };
@@ -0,0 +1,5 @@
1
+ /** Native viewport loading is the default; consumers increase the factor during autofollow. */
2
+ export declare const DEFAULT_TILE_RESERVE_FACTOR = 1;
3
+ /** Bound configurable preloading so a malformed setting cannot request an unbounded tile grid. */
4
+ export declare const MAX_TILE_RESERVE_FACTOR = 4;
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/external/tileReserve/constants.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,kGAAkG;AAClG,eAAO,MAAM,uBAAuB,IAAI,CAAC"}
@@ -0,0 +1,5 @@
1
+ const E = 1, R = 4;
2
+ export {
3
+ E as DEFAULT_TILE_RESERVE_FACTOR,
4
+ R as MAX_TILE_RESERVE_FACTOR
5
+ };
@@ -0,0 +1,10 @@
1
+ import { default as L } from 'leaflet';
2
+ /** Return the active scale shared by Leaflet requests and the hidden Google producer. */
3
+ export declare function getTileReserveFactor(this: L.GridLayer): number;
4
+ /** Request a bounded tile reserve without changing the map's visible bounds. */
5
+ export declare function getReservedTilePixelBounds(this: L.GridLayer, center: L.LatLng): L.Bounds;
6
+ /** Keep one stable move listener so Leaflet can remove it through its normal lifecycle. */
7
+ export declare function getTileReserveEvents(this: L.GridLayer): Record<string, L.LeafletEventHandlerFn>;
8
+ /** Change the active request area without dropping visible tiles or recreating the layer. */
9
+ export declare function setTileReserveFactor(this: L.GridLayer, factor: number): void;
10
+ //# sourceMappingURL=tileReserve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tileReserve.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/external/tileReserve/tileReserve.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,SAAS,CAAC;AAIxB,yFAAyF;AACzF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,GAAG,MAAM,CAG9D;AAED,gFAAgF;AAChF,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAexF;AASD,2FAA2F;AAC3F,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,qBAAqB,CAAC,CAU/F;AAED,6FAA6F;AAC7F,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAc5E"}
@@ -0,0 +1,36 @@
1
+ import o from "leaflet";
2
+ import { DEFAULT_TILE_RESERVE_FACTOR as n, MAX_TILE_RESERVE_FACTOR as l } from "./constants.js";
3
+ function r() {
4
+ return this._tileReserveFactor ?? n;
5
+ }
6
+ function v(t) {
7
+ const e = o.GridLayer.prototype._getTiledPixelBounds.call(this, t), i = r.call(this);
8
+ if (i === 1)
9
+ return e;
10
+ const s = e.getSize().multiplyBy((i - 1) / 2);
11
+ return o.bounds(
12
+ e.getTopLeft().subtract(s),
13
+ e.getBottomRight().add(s)
14
+ );
15
+ }
16
+ function a() {
17
+ r.call(this) > 1 && this._onMoveEnd();
18
+ }
19
+ function _() {
20
+ const t = this, e = o.GridLayer.prototype.getEvents.call(this);
21
+ return e.move || (t._onTileReserveMove ??= o.Util.throttle(
22
+ a,
23
+ t.options.updateInterval,
24
+ t
25
+ ), e.move = t._onTileReserveMove), e;
26
+ }
27
+ function p(t) {
28
+ const e = this, i = r.call(this);
29
+ e._tileReserveFactor = Number.isFinite(t) ? Math.min(l, Math.max(n, t)) : n, r.call(this) !== i && e._map && (e._onTileReserveChange?.(), e._update(), e._pruneTiles());
30
+ }
31
+ export {
32
+ v as getReservedTilePixelBounds,
33
+ _ as getTileReserveEvents,
34
+ r as getTileReserveFactor,
35
+ p as setTileReserveFactor
36
+ };
@@ -0,0 +1,23 @@
1
+ import { Bounds, GridLayer, GridLayerOptions, LatLng, LeafletEventHandlerFn, Map as LeafletMap } from 'leaflet';
2
+ /** Leaflet 1.9.4 extension seam absent from its public TypeScript declarations. */
3
+ export type GridLayerTileBounds = {
4
+ _getTiledPixelBounds: (this: GridLayer, center: LatLng) => Bounds;
5
+ };
6
+ /** Public reserve control shared by the local raster and GoogleMutant layers. */
7
+ export type TileReserveLayer = GridLayer & {
8
+ options: GridLayerOptions;
9
+ setTileReserveFactor: (factor: number) => void;
10
+ };
11
+ /** Leaflet 1.9.4 lifecycle seams used only by the local reserve adapters. */
12
+ export type GridLayerTileReserve = GridLayer & GridLayerTileBounds & {
13
+ options: GridLayerOptions;
14
+ _map?: LeafletMap;
15
+ _tileReserveFactor?: number;
16
+ _onTileReserveMove?: LeafletEventHandlerFn;
17
+ _onTileReserveChange?: () => void;
18
+ _onMoveEnd: () => void;
19
+ _update: () => void;
20
+ _pruneTiles: () => void;
21
+ getEvents: () => Record<string, LeafletEventHandlerFn>;
22
+ };
23
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/external/tileReserve/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,qBAAqB,EAAE,GAAG,IAAI,UAAU,EAAE,MAAM,SAAS,CAAC;AAErH,mFAAmF;AACnF,MAAM,MAAM,mBAAmB,GAAG;IAChC,oBAAoB,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACnE,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG;IACzC,OAAO,EAAE,gBAAgB,CAAC;IAC1B,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,6EAA6E;AAC7E,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,mBAAmB,GAAG;IACnE,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,qBAAqB,CAAC;IAC3C,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;CACxD,CAAC"}
@@ -1,5 +1,6 @@
1
+ import { MapProps } from '../../types';
1
2
  /**
2
- * Renders the tile layers for the map type currently selected in the store.
3
+ * Render the selected base-map source with the live theme and tile reserve preference.
3
4
  */
4
- export declare function TileLayers(): import("@emotion/react/jsx-runtime").JSX.Element;
5
+ export declare function TileLayers({ tileReserveFactor, }: Pick<MapProps, 'tileReserveFactor'>): import("@emotion/react/jsx-runtime").JSX.Element;
5
6
  //# sourceMappingURL=TileLayers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TileLayers.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/subcomponents/TileLayers/TileLayers.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,UAAU,qDA0BzB"}
1
+ {"version":3,"file":"TileLayers.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/subcomponents/TileLayers/TileLayers.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,iBAA+C,GAChD,EAAE,IAAI,CAAC,QAAQ,EAAE,mBAAmB,CAAC,oDA8BrC"}
@@ -1,25 +1,34 @@
1
- import { jsxs as s, jsx as o } from "@emotion/react/jsx-runtime";
2
- import n, { useEffect as m } from "react";
3
- import { useMap as a } from "react-leaflet";
4
- import { useMapThemeMode as p } from "./hooks/useMapThemeMode.js";
5
- import { TileLayerOthers as f } from "./subcomponents/TileLayerOthers/TileLayerOthers.js";
6
- import { TileLayerGoogle as c } from "./subcomponents/TileLayerGoogle/TileLayerGoogle.js";
7
- function z() {
8
- const e = a(), t = p();
9
- return m(() => {
10
- const i = () => {
1
+ import { jsxs as m, jsx as o } from "@emotion/react/jsx-runtime";
2
+ import n, { useEffect as a } from "react";
3
+ import { useMap as p } from "react-leaflet";
4
+ import { useMapThemeMode as f } from "./hooks/useMapThemeMode.js";
5
+ import { DEFAULT_TILE_RESERVE_FACTOR as c } from "../../external/tileReserve/constants.js";
6
+ import { TileLayerOthers as l } from "./subcomponents/TileLayerOthers/TileLayerOthers.js";
7
+ import { TileLayerGoogle as u } from "./subcomponents/TileLayerGoogle/TileLayerGoogle.js";
8
+ function g({
9
+ tileReserveFactor: t = c
10
+ }) {
11
+ const e = p(), i = f();
12
+ return a(() => {
13
+ const s = () => {
11
14
  e.invalidateSize();
12
- }, r = new ResizeObserver((l) => {
13
- i();
15
+ }, r = new ResizeObserver((T) => {
16
+ s();
14
17
  });
15
18
  return r.observe(e.getContainer()), () => {
16
19
  r.unobserve(e.getContainer());
17
20
  };
18
- }, [e]), /* @__PURE__ */ s(n.Fragment, { children: [
19
- /* @__PURE__ */ o(f, {}),
20
- /* @__PURE__ */ o(c, { mode: t })
21
+ }, [e]), /* @__PURE__ */ m(n.Fragment, { children: [
22
+ /* @__PURE__ */ o(l, {}),
23
+ /* @__PURE__ */ o(
24
+ u,
25
+ {
26
+ mode: i,
27
+ tileReserveFactor: t
28
+ }
29
+ )
21
30
  ] });
22
31
  }
23
32
  export {
24
- z as TileLayers
33
+ g as TileLayers
25
34
  };
@@ -1,4 +1,5 @@
1
1
  import { ThemeUserMode } from '@m4l/styles';
2
+ import { MapProps } from '../../../../types';
2
3
  /**
3
4
  * TileLayerGoogle renders the plain Google tile layer when no Google API
4
5
  * features are needed, and switches to the googleMutant-backed Google Maps API
@@ -6,5 +7,5 @@ import { ThemeUserMode } from '@m4l/styles';
6
7
  */
7
8
  export declare function TileLayerGoogle(props: {
8
9
  mode: ThemeUserMode;
9
- }): null;
10
+ } & Pick<MapProps, 'tileReserveFactor'>): null;
10
11
  //# sourceMappingURL=TileLayerGoogle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TileLayerGoogle.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/TileLayerGoogle.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAuC5C;;;;GAIG;AACH,wBAAgB,eAAe,CAAE,KAAK,EAAE;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,QA+L9D"}
1
+ {"version":3,"file":"TileLayerGoogle.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/subcomponents/TileLayers/subcomponents/TileLayerGoogle/TileLayerGoogle.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAI5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAwClD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,mBAAmB,CAAC,QA+MrE"}
@@ -1,64 +1,74 @@
1
- import f, { useEffect as M } from "react";
2
- import { useMap as v } from "react-leaflet";
3
- import { ensureGoogleMutantRegistered as A } from "../../../../external/googleMutant/index.js";
4
- import T from "leaflet";
5
- import { useMapStore as E } from "../../../../hooks/useMapStore/index.js";
1
+ import i, { useEffect as T } from "react";
2
+ import { useMap as F } from "react-leaflet";
3
+ import { ensureGoogleMutantRegistered as _ } from "../../../../external/googleMutant/index.js";
4
+ import b from "leaflet";
5
+ import { useMapStore as U } from "../../../../hooks/useMapStore/index.js";
6
6
  import { deepShallow as x } from "@m4l/components";
7
- import { DARK_STYLES as K } from "./darkStyles.js";
8
- import { loadGoogleMapsLibrary as U } from "./googleMapsLoader.js";
9
- const _ = [], b = (G) => G === "dark" ? K : _;
10
- function C(G) {
11
- const i = v(), { mode: g } = G, o = f.useRef(null), m = f.useRef(null), L = f.useRef(b(g));
12
- L.current = b(g);
13
- const { sourceId: l, layer: r, trafficLayer: t, transitLayer: a, bicyclingLayer: n, googleApiKey: S, googleMapVersion: R } = E(
7
+ import { DARK_STYLES as I } from "./darkStyles.js";
8
+ import { loadGoogleMapsLibrary as K } from "./googleMapsLoader.js";
9
+ import { createReservedTileLayer as h } from "../../../../external/tileReserve/ReservedTileLayer.js";
10
+ import { DEFAULT_TILE_RESERVE_FACTOR as V } from "../../../../external/tileReserve/constants.js";
11
+ const Z = [], A = (S) => S === "dark" ? I : Z;
12
+ function J(S) {
13
+ const l = F(), { mode: g, tileReserveFactor: L = V } = S, G = i.useRef(null), r = i.useRef(null), M = i.useRef(L);
14
+ M.current = L;
15
+ const R = i.useRef(null), p = i.useRef(A(g));
16
+ p.current = A(g);
17
+ const { sourceId: c, layer: t, trafficLayer: o, transitLayer: a, bicyclingLayer: n, googleApiKey: v, googleMapVersion: E } = U(
14
18
  (e) => {
15
- const y = e.mapSources.find((d) => d.id === e.currentMapSourceLayer.mapSourceId) || e.mapSources[0], c = y.layers.find((d) => d.id === e.currentMapSourceLayer.mapSourceLayerId) || y.layers[0];
19
+ const y = e.mapSources.find((m) => m.id === e.currentMapSourceLayer.mapSourceId) || e.mapSources[0], s = y.layers.find((m) => m.id === e.currentMapSourceLayer.mapSourceLayerId) || y.layers[0];
16
20
  return {
17
21
  sourceId: y.id,
18
- layer: c,
19
- trafficLayer: c?.roadSelectedOptions?.trafficLayer || !1,
20
- transitLayer: c?.roadSelectedOptions?.transitLayer || !1,
21
- bicyclingLayer: c?.roadSelectedOptions?.bicyclingLayer || !1,
22
+ layer: s,
23
+ trafficLayer: s?.roadSelectedOptions?.trafficLayer || !1,
24
+ transitLayer: s?.roadSelectedOptions?.transitLayer || !1,
25
+ bicyclingLayer: s?.roadSelectedOptions?.bicyclingLayer || !1,
22
26
  googleApiKey: e.googleMapsApiKey,
23
27
  googleMapVersion: e.googleMapVersion
24
28
  };
25
29
  },
26
30
  x
27
- ), u = t || a || n || g === "dark", p = f.useRef({ trafficLayer: t, transitLayer: a, bicyclingLayer: n }), s = f.useRef({ trafficLayer: t, transitLayer: a, bicyclingLayer: n });
28
- return s.current = { trafficLayer: t, transitLayer: a, bicyclingLayer: n }, M(() => {
31
+ ), u = o || a || n || g === "dark", d = i.useRef({ trafficLayer: o, transitLayer: a, bicyclingLayer: n }), f = i.useRef({ trafficLayer: o, transitLayer: a, bicyclingLayer: n });
32
+ return f.current = { trafficLayer: o, transitLayer: a, bicyclingLayer: n }, T(() => {
29
33
  let e;
30
- if (l === "google")
31
- return u || (e = T.tileLayer(r.urlTemplate, r.options), r.getTileUrl && (e.getTileUrl = r.getTileUrl), i.addLayer(e), r.options && r.options.maxZoom && i.setMaxZoom(r.options.maxZoom)), () => {
32
- e && i.removeLayer(e);
34
+ if (c === "google")
35
+ return u || (e = h(
36
+ t.urlTemplate,
37
+ t.options,
38
+ M.current
39
+ ), t.getTileUrl && (e.getTileUrl = t.getTileUrl), l.addLayer(e), G.current = e, t.options && t.options.maxZoom && l.setMaxZoom(t.options.maxZoom)), () => {
40
+ e && (l.removeLayer(e), G.current = null);
33
41
  };
34
- }, [l, r.urlTemplate, r.options, r.getTileUrl, i, u]), M(() => {
35
- if (l !== "google" || !u || !S)
42
+ }, [c, t.urlTemplate, t.options, t.getTileUrl, l, u]), T(() => {
43
+ if (c !== "google" || !u || !v)
36
44
  return;
37
45
  let e = null, y = !1;
38
- return A().then(() => U({
39
- apiKey: S,
40
- version: R
46
+ return _().then(() => K({
47
+ apiKey: v,
48
+ version: E
41
49
  })).then(() => {
42
50
  if (y)
43
51
  return;
44
- const c = T.gridLayer.googleMutant, d = T.GridLayer.GoogleMutant;
45
- typeof c != "function" || typeof d != "function" || (e = c({
52
+ const s = b.gridLayer.googleMutant, m = b.GridLayer.GoogleMutant;
53
+ typeof s != "function" || typeof m != "function" || (e = s({
46
54
  maxZoom: 22,
47
- type: r.type,
48
- styles: L.current
55
+ type: t.type,
56
+ styles: p.current
49
57
  // ...layer.options,
50
- }), e.on("spawned", (O) => {
51
- m.current = O.mapObject, O.mapObject.setOptions({ styles: L.current });
52
- }), o.current = e, s.current.trafficLayer && e.addGoogleLayer("TrafficLayer"), s.current.transitLayer && e.addGoogleLayer("TransitLayer"), s.current.bicyclingLayer && e.addGoogleLayer("BicyclingLayer"), p.current = { ...s.current }, i.addLayer(e));
58
+ }), e.setTileReserveFactor(M.current), e.on("spawned", (O) => {
59
+ R.current = O.mapObject, O.mapObject.setOptions({ styles: p.current });
60
+ }), r.current = e, f.current.trafficLayer && e.addGoogleLayer("TrafficLayer"), f.current.transitLayer && e.addGoogleLayer("TransitLayer"), f.current.bicyclingLayer && e.addGoogleLayer("BicyclingLayer"), d.current = { ...f.current }, l.addLayer(e));
53
61
  }), () => {
54
- y = !0, e && (i.removeLayer(e), o.current = null), m.current = null;
62
+ y = !0, e && (l.removeLayer(e), r.current = null), R.current = null;
55
63
  };
56
- }, [i, r.type, l, S, R, u]), M(() => {
57
- l !== "google" || !u || !m.current || g === "light" || (m.current.setOptions({ styles: L.current }), o.current && (o.current.options.styles = L.current));
58
- }, [l, u, g]), f.useEffect(() => {
59
- l === "google" && o.current && (t !== p.current.trafficLayer && (t ? o.current.addGoogleLayer("TrafficLayer") : t === !1 && o.current.removeGoogleLayer("TrafficLayer")), a !== p.current.transitLayer && (a ? o.current.addGoogleLayer("TransitLayer") : a === !1 && o.current.removeGoogleLayer("TransitLayer")), n !== p.current.bicyclingLayer && (n ? o.current.addGoogleLayer("BicyclingLayer") : n === !1 && o.current.removeGoogleLayer("BicyclingLayer")), p.current = { ...s.current });
60
- }, [t, a, n]), null;
64
+ }, [l, t.type, c, v, E, u]), T(() => {
65
+ G.current?.setTileReserveFactor(L), r.current?.setTileReserveFactor(L);
66
+ }, [L]), T(() => {
67
+ c !== "google" || !u || !R.current || g === "light" || (R.current.setOptions({ styles: p.current }), r.current && (r.current.options.styles = p.current));
68
+ }, [c, u, g]), i.useEffect(() => {
69
+ c === "google" && r.current && (o !== d.current.trafficLayer && (o ? r.current.addGoogleLayer("TrafficLayer") : o === !1 && r.current.removeGoogleLayer("TrafficLayer")), a !== d.current.transitLayer && (a ? r.current.addGoogleLayer("TransitLayer") : a === !1 && r.current.removeGoogleLayer("TransitLayer")), n !== d.current.bicyclingLayer && (n ? r.current.addGoogleLayer("BicyclingLayer") : n === !1 && r.current.removeGoogleLayer("BicyclingLayer")), d.current = { ...f.current });
70
+ }, [o, a, n]), null;
61
71
  }
62
72
  export {
63
- C as TileLayerGoogle
73
+ J as TileLayerGoogle
64
74
  };
@@ -10,21 +10,21 @@ import { MapMeasureToolOwnerState } from './subcomponents/Controls/subcomponents
10
10
  import { InteractionChannel, InteractionOwnerId } from './contexts/MapContext/types';
11
11
  export type Localization = {
12
12
  /**
13
- * "lat" Posición en del eje "Y" en grados.
13
+ * "lat" Y-axis position in degrees.
14
14
  */
15
15
  lat: number;
16
16
  /**
17
- * "lng" Posición en del eje "X" en grados.
17
+ * "lng" X-axis position in degrees.
18
18
  */
19
19
  lng: number;
20
20
  };
21
21
  export type Point = {
22
22
  /**
23
- * "x" Posición en del eje "X" en pixeles.
23
+ * "x" X-axis position in pixels.
24
24
  */
25
25
  x: number;
26
26
  /**
27
- * "y" Posición en del eje "Y" en pixeles.
27
+ * "y" Y-axis position in pixels.
28
28
  */
29
29
  y: number;
30
30
  };
@@ -48,32 +48,32 @@ export type MapToolOpenInteractionCapture = {
48
48
  };
49
49
  export interface BaseMapTool {
50
50
  /**
51
- * "id" id de la herramienta, tambien sirve como id del popup cuando es de tipo popup
51
+ * "id" Tool id, also used as the popup id for popup tools.
52
52
  */
53
53
  id: string;
54
54
  /**
55
- * "type" tipo de herramienta
55
+ * "type" Tool type.
56
56
  */
57
57
  type: MapToolType;
58
58
  /**
59
- * "disabled" si la herramienta está deshabilitada
59
+ * "disabled" Whether the tool is disabled.
60
60
  */
61
61
  disabled?: boolean;
62
62
  }
63
63
  /**
64
- * "MapToolPopup" tipo de herramienta popup que ingresa como props al componente Map
64
+ * "MapToolPopup" Tool type. popup que ingresa como props al componente Map
65
65
  */
66
66
  export interface BaseMapToolPopup extends BaseMapTool {
67
67
  /**
68
- * "type" tipo de herramienta
68
+ * "type" Tool type.
69
69
  */
70
70
  type: 'popup';
71
71
  /**
72
- * "popupDefaultPosition" posición por defecto del arranque de el popup de la herramienta
72
+ * "popupDefaultPosition" Default position when the tool popup opens.
73
73
  */
74
74
  popupDefaultPosition: RNDDefaultPosition;
75
75
  /**
76
- * "PopupContentComponent" componente que se renderiza dentro del popup de la herramienta
76
+ * "PopupContentComponent" Component rendered inside the tool popup.
77
77
  */
78
78
  PopupContentComponent: JSX_REACT_NODE;
79
79
  /**
@@ -89,45 +89,45 @@ export interface BaseMapToolPopup extends BaseMapTool {
89
89
  openInteractionCapture?: MapToolOpenInteractionCapture;
90
90
  }
91
91
  /**
92
- * "MapToolPopup" tipo de herramienta popup que ingresa como props al componente Map
93
- * Que es agregado por el sistema y hace parte de las herramientas internas del mapa.
92
+ * "MapToolPopup" Tool type. popup que ingresa como props al componente Map
93
+ * Added by the system as an internal map tool.
94
94
  */
95
95
  export interface MapToolPopupInternal extends BaseMapToolPopup {
96
96
  /**
97
- * "isInternal" si la herramienta es interna del mapa
97
+ * "isInternal" Whether this is an internal map tool.
98
98
  */
99
99
  isInternal: true;
100
100
  /**
101
- * Id componente donde se encuentran los iconos en s3
101
+ * Legacy component path identifying the former S3 icon location.
102
102
  */
103
103
  componentPathId: string;
104
104
  /**
105
- * "iconUrl" url del icono de la herramienta
105
+ * "iconUrl" Tool icon reference.
106
106
  */
107
107
  iconId: string;
108
108
  /**
109
- * "popupTitle" titulo del popup de la herramienta
109
+ * "popupTitle" Tool popup title.
110
110
  */
111
111
  dictionaryId: string;
112
112
  }
113
113
  /**
114
- * "MapToolPopupExternal" tipo de herramienta popup que ingresa como props al componente Map
115
- * Que es agregado por el usuario y no hace parte de las herramientas internas del mapa.
114
+ * "MapToolPopupExternal" Tool type. popup que ingresa como props al componente Map
115
+ * Added by the consumer and separate from internal map tools.
116
116
  */
117
117
  export interface MapToolPopupExternal extends BaseMapToolPopup {
118
118
  /**
119
- * "iconUrl" url del icono de la herramienta
119
+ * "iconUrl" Tool icon reference.
120
120
  */
121
121
  iconUrl: string;
122
122
  /**
123
- * "popupTitle" titulo del popup de la herramienta
123
+ * "popupTitle" Tool popup title.
124
124
  */
125
125
  PopupTitle: string;
126
126
  }
127
127
  export type MapToolPopup = MapToolPopupInternal | MapToolPopupExternal;
128
128
  export interface MapToolButton extends BaseMapTool {
129
129
  /**
130
- * "type" tipo de herramienta
130
+ * "type" Tool type.
131
131
  */
132
132
  type: 'button';
133
133
  /**
@@ -138,53 +138,55 @@ export interface MapToolButton extends BaseMapTool {
138
138
  export type MapTool = MapToolPopup | MapToolButton;
139
139
  export type PositionMapTool = MapTool & {
140
140
  /**
141
- * "position" posición de la herramienta
141
+ * "position" Tool position.
142
142
  */
143
143
  position: MapToolPosition;
144
144
  };
145
145
  export interface MapProps {
146
146
  /**
147
- * "className" className del mapa
147
+ * "className" sets the map class name.
148
148
  */
149
149
  className?: string;
150
150
  /**
151
- * "center" posición inicial del mapa.
151
+ * "center" sets the initial map position.
152
152
  */
153
153
  center?: LatLngExpression | undefined;
154
154
  /**
155
- * "minZoom" Zoom mínimo del mapa. Por defecto es 2
155
+ * "minZoom" sets the minimum map zoom; defaults to 2.
156
156
  */
157
157
  minZoom?: number;
158
158
  /**
159
- * "initialZoom" Zoom inicial del mapa. Por defecto es 16
159
+ * "initialZoom" sets the initial map zoom; defaults to 16.
160
160
  */
161
161
  initalZoom?: number;
162
162
  /**
163
- * "maxZoom" Max Zoom global, por defecto es 22, sin embargo cada TileLayer coloca su propio maxZoom.
163
+ * "maxZoom" defaults to 22; each TileLayer can apply its own maximum.
164
164
  */
165
165
  maxZoom?: number;
166
166
  children?: ReactNode;
167
167
  /**
168
- * "disableMapEvents" permite deshabilitar los eventos del mapa, cuando se requiera
168
+ * "disableMapEvents" disables map events when needed.
169
169
  */
170
170
  disableMapEvents?: boolean;
171
+ /** Scale Google tile requests during autofollow; defaults to native loading (1) and is bounded to 1–4. */
172
+ tileReserveFactor?: number;
171
173
  /**
172
- * "style" permite definir el estilo del mapa
174
+ * "style" sets the map style.
173
175
  */
174
176
  style?: React.CSSProperties;
175
177
  /**
176
- * "tools" Herramientas del mapa, se pueden agregar herramientas como geocercas, puntos de interes, etc.
178
+ * "tools" adds map tools such as geofences and points of interest.
177
179
  */
178
180
  tools?: PositionMapTool[];
179
181
  }
180
182
  export type MapSlotsType = keyof typeof MapSlots;
181
183
  export type MapOwnerState = {
182
184
  /**
183
- * "isMobile" cuando el navegador está corriendo en dispositivo móvil
185
+ * "isMobile" Whether the browser runs on a mobile device.
184
186
  */
185
187
  isMobile?: boolean;
186
188
  /**
187
- * "hidden" permite definir si la ventana está oculta o no. Por defecto es "false
189
+ * "hidden" controls whether the window is hidden; defaults to false.
188
190
  */
189
191
  hidden?: boolean;
190
192
  mapSourcesTool?: MapSourcesToolOwnerState;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,wBAAwB,EAAE,MAAM,4FAA4F,CAAC;AACtI,OAAO,EAAE,uBAAuB,EAAE,MAAM,2FAA2F,CAAC;AACpI,OAAO,EAAE,wBAAwB,EAAE,MAAM,yFAAyF,CAAC;AACnI,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EACnB,MA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ACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,EAAE,CAAE;CAC5B;AACD,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,QAAQ,CAAC;AACjD,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAGjB,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC,cAAc,CAAC,EAAE,wBAAwB,CAAC;CAC3C,CAAC;AACF,MAAM,MAAM,SAAS,GAAE,sBAAsB,CAAC,YAAY,EAAE,OAAO,0BAA0B,EAAE,KAAK,CAAC,CAAE"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/maps/components/GpsMap/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,wBAAwB,EAAE,MAAM,4FAA4F,CAAC;AACtI,OAAO,EAAE,uBAAuB,EAAE,MAAM,2FAA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AEG;IACH,MAAM,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0GAA0G;IAC1G,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,EAAE,CAAE;CAC5B;AACD,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,QAAQ,CAAC;AACjD,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAGjB,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC,cAAc,CAAC,EAAE,wBAAwB,CAAC;CAC3C,CAAC;AACF,MAAM,MAAM,SAAS,GAAE,sBAAsB,CAAC,YAAY,EAAE,OAAO,0BAA0B,EAAE,KAAK,CAAC,CAAE"}
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Barrel
2
+ * Barrel
3
3
  */
4
4
  export * from './components';
5
5
  export * from './formatters';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/gclick",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },