@neshan-maps-platform/mapbox-gl-react 1.0.3-alpha.3 → 1.0.4-alpha.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.
@@ -1,6 +1,6 @@
1
- import re, { useRef as F, useEffect as te } from "react";
2
- import ne from "@neshan-maps-platform/mapbox-gl";
3
- var T = { exports: {} }, _ = {};
1
+ import ee, { useRef as I, useEffect as re } from "react";
2
+ import te from "@neshan-maps-platform/mapbox-gl";
3
+ var b = { exports: {} }, p = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.js
@@ -10,29 +10,29 @@ var T = { exports: {} }, _ = {};
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var D;
14
- function oe() {
15
- if (D) return _;
16
- D = 1;
17
- var a = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
18
- function f(u, s, c) {
19
- var d = null;
20
- if (c !== void 0 && (d = "" + c), s.key !== void 0 && (d = "" + s.key), "key" in s) {
21
- c = {};
22
- for (var E in s)
23
- E !== "key" && (c[E] = s[E]);
24
- } else c = s;
25
- return s = c.ref, {
13
+ var F;
14
+ function ne() {
15
+ if (F) return p;
16
+ F = 1;
17
+ var a = Symbol.for("react.transitional.element"), l = Symbol.for("react.fragment");
18
+ function i(c, s, u) {
19
+ var f = null;
20
+ if (u !== void 0 && (f = "" + u), s.key !== void 0 && (f = "" + s.key), "key" in s) {
21
+ u = {};
22
+ for (var m in s)
23
+ m !== "key" && (u[m] = s[m]);
24
+ } else u = s;
25
+ return s = u.ref, {
26
26
  $$typeof: a,
27
- type: u,
28
- key: d,
27
+ type: c,
28
+ key: f,
29
29
  ref: s !== void 0 ? s : null,
30
- props: c
30
+ props: u
31
31
  };
32
32
  }
33
- return _.Fragment = i, _.jsx = f, _.jsxs = f, _;
33
+ return p.Fragment = l, p.jsx = i, p.jsxs = i, p;
34
34
  }
35
- var b = {};
35
+ var E = {};
36
36
  /**
37
37
  * @license React
38
38
  * react-jsx-runtime.development.js
@@ -42,44 +42,44 @@ var b = {};
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
44
  */
45
- var L;
46
- function ae() {
47
- return L || (L = 1, process.env.NODE_ENV !== "production" && function() {
45
+ var D;
46
+ function oe() {
47
+ return D || (D = 1, process.env.NODE_ENV !== "production" && function() {
48
48
  function a(e) {
49
49
  if (e == null) return null;
50
50
  if (typeof e == "function")
51
- return e.$$typeof === K ? null : e.displayName || e.name || null;
51
+ return e.$$typeof === Z ? null : e.displayName || e.name || null;
52
52
  if (typeof e == "string") return e;
53
53
  switch (e) {
54
- case h:
54
+ case T:
55
55
  return "Fragment";
56
- case q:
57
- return "Profiler";
58
56
  case U:
57
+ return "Profiler";
58
+ case M:
59
59
  return "StrictMode";
60
- case X:
60
+ case G:
61
61
  return "Suspense";
62
- case B:
62
+ case X:
63
63
  return "SuspenseList";
64
- case Z:
64
+ case H:
65
65
  return "Activity";
66
66
  }
67
67
  if (typeof e == "object")
68
68
  switch (typeof e.tag == "number" && console.error(
69
69
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
70
  ), e.$$typeof) {
71
- case M:
71
+ case W:
72
72
  return "Portal";
73
- case J:
74
- return (e.displayName || "Context") + ".Provider";
75
73
  case z:
74
+ return e.displayName || "Context";
75
+ case q:
76
76
  return (e._context.displayName || "Context") + ".Consumer";
77
- case G:
77
+ case J:
78
78
  var r = e.render;
79
79
  return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
- case H:
80
+ case B:
81
81
  return r = e.displayName || null, r !== null ? r : a(e.type) || "Memo";
82
- case j:
82
+ case h:
83
83
  r = e._payload, e = e._init;
84
84
  try {
85
85
  return a(e(r));
@@ -88,12 +88,12 @@ function ae() {
88
88
  }
89
89
  return null;
90
90
  }
91
- function i(e) {
91
+ function l(e) {
92
92
  return "" + e;
93
93
  }
94
- function f(e) {
94
+ function i(e) {
95
95
  try {
96
- i(e);
96
+ l(e);
97
97
  var r = !1;
98
98
  } catch {
99
99
  r = !0;
@@ -105,12 +105,12 @@ function ae() {
105
105
  r,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
107
  n
108
- ), i(e);
108
+ ), l(e);
109
109
  }
110
110
  }
111
- function u(e) {
112
- if (e === h) return "<>";
113
- if (typeof e == "object" && e !== null && e.$$typeof === j)
111
+ function c(e) {
112
+ if (e === T) return "<>";
113
+ if (typeof e == "object" && e !== null && e.$$typeof === h)
114
114
  return "<...>";
115
115
  try {
116
116
  var r = a(e);
@@ -123,19 +123,19 @@ function ae() {
123
123
  var e = k.A;
124
124
  return e === null ? null : e.getOwner();
125
125
  }
126
- function c() {
126
+ function u() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
- function d(e) {
130
- if (N.call(e, "key")) {
129
+ function f(e) {
130
+ if (x.call(e, "key")) {
131
131
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
132
132
  if (r && r.isReactWarning) return !1;
133
133
  }
134
134
  return e.key !== void 0;
135
135
  }
136
- function E(e, r) {
136
+ function m(e, r) {
137
137
  function t() {
138
- y || (y = !0, console.error(
138
+ j || (j = !0, console.error(
139
139
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
140
140
  r
141
141
  ));
@@ -145,22 +145,23 @@ function ae() {
145
145
  configurable: !0
146
146
  });
147
147
  }
148
- function p() {
148
+ function d() {
149
149
  var e = a(this.type);
150
- return C[e] || (C[e] = !0, console.error(
150
+ return N[e] || (N[e] = !0, console.error(
151
151
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
152
  )), e = this.props.ref, e !== void 0 ? e : null;
153
153
  }
154
- function W(e, r, t, n, m, l, S, g) {
155
- return t = l.ref, e = {
156
- $$typeof: x,
154
+ function L(e, r, t, n, v, S) {
155
+ var o = t.ref;
156
+ return e = {
157
+ $$typeof: w,
157
158
  type: e,
158
159
  key: r,
159
- props: l,
160
- _owner: m
161
- }, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
160
+ props: t,
161
+ _owner: n
162
+ }, (o !== void 0 ? o : null) !== null ? Object.defineProperty(e, "ref", {
162
163
  enumerable: !1,
163
- get: p
164
+ get: d
164
165
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
165
166
  configurable: !1,
166
167
  enumerable: !1,
@@ -175,33 +176,33 @@ function ae() {
175
176
  configurable: !1,
176
177
  enumerable: !1,
177
178
  writable: !0,
178
- value: S
179
+ value: v
179
180
  }), Object.defineProperty(e, "_debugTask", {
180
181
  configurable: !1,
181
182
  enumerable: !1,
182
183
  writable: !0,
183
- value: g
184
+ value: S
184
185
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
186
  }
186
- function P(e, r, t, n, m, l, S, g) {
187
+ function A(e, r, t, n, v, S) {
187
188
  var o = r.children;
188
189
  if (o !== void 0)
189
190
  if (n)
190
- if (Q(o)) {
191
+ if (K(o)) {
191
192
  for (n = 0; n < o.length; n++)
192
- w(o[n]);
193
+ P(o[n]);
193
194
  Object.freeze && Object.freeze(o);
194
195
  } else
195
196
  console.error(
196
197
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
198
  );
198
- else w(o);
199
- if (N.call(r, "key")) {
199
+ else P(o);
200
+ if (x.call(r, "key")) {
200
201
  o = a(e);
201
- var R = Object.keys(r).filter(function(ee) {
202
- return ee !== "key";
202
+ var _ = Object.keys(r).filter(function(Q) {
203
+ return Q !== "key";
203
204
  });
204
- n = 0 < R.length ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}", I[o + n] || (R = 0 < R.length ? "{" + R.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ n = 0 < _.length ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}", $[o + n] || (_ = 0 < _.length ? "{" + _.join(": ..., ") + ": ...}" : "{}", console.error(
205
206
  `A props object containing a "key" prop is being spread into JSX:
206
207
  let props = %s;
207
208
  <%s {...props} />
@@ -210,110 +211,107 @@ React keys must be passed directly to JSX without using spread:
210
211
  <%s key={someKey} {...props} />`,
211
212
  n,
212
213
  o,
213
- R,
214
+ _,
214
215
  o
215
- ), I[o + n] = !0);
216
+ ), $[o + n] = !0);
216
217
  }
217
- if (o = null, t !== void 0 && (f(t), o = "" + t), d(r) && (f(r.key), o = "" + r.key), "key" in r) {
218
+ if (o = null, t !== void 0 && (i(t), o = "" + t), f(r) && (i(r.key), o = "" + r.key), "key" in r) {
218
219
  t = {};
219
- for (var A in r)
220
- A !== "key" && (t[A] = r[A]);
220
+ for (var g in r)
221
+ g !== "key" && (t[g] = r[g]);
221
222
  } else t = r;
222
- return o && E(
223
+ return o && m(
223
224
  t,
224
225
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
225
- ), W(
226
+ ), L(
226
227
  e,
227
228
  o,
228
- l,
229
- m,
230
- s(),
231
229
  t,
232
- S,
233
- g
230
+ s(),
231
+ v,
232
+ S
234
233
  );
235
234
  }
236
- function w(e) {
237
- typeof e == "object" && e !== null && e.$$typeof === x && e._store && (e._store.validated = 1);
235
+ function P(e) {
236
+ y(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === h && (e._payload.status === "fulfilled" ? y(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
238
237
  }
239
- var v = re, x = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), z = Symbol.for("react.consumer"), J = Symbol.for("react.context"), G = Symbol.for("react.forward_ref"), X = Symbol.for("react.suspense"), B = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), Z = Symbol.for("react.activity"), K = Symbol.for("react.client.reference"), k = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, Q = Array.isArray, O = console.createTask ? console.createTask : function() {
238
+ function y(e) {
239
+ return typeof e == "object" && e !== null && e.$$typeof === w;
240
+ }
241
+ var R = ee, w = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), M = Symbol.for("react.strict_mode"), U = Symbol.for("react.profiler"), q = Symbol.for("react.consumer"), z = Symbol.for("react.context"), J = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), k = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, x = Object.prototype.hasOwnProperty, K = Array.isArray, O = console.createTask ? console.createTask : function() {
240
242
  return null;
241
243
  };
242
- v = {
243
- "react-stack-bottom-frame": function(e) {
244
+ R = {
245
+ react_stack_bottom_frame: function(e) {
244
246
  return e();
245
247
  }
246
248
  };
247
- var y, C = {}, Y = v["react-stack-bottom-frame"].bind(
248
- v,
249
- c
250
- )(), $ = O(u(c)), I = {};
251
- b.Fragment = h, b.jsx = function(e, r, t, n, m) {
252
- var l = 1e4 > k.recentlyCreatedOwnerStacks++;
253
- return P(
249
+ var j, N = {}, C = R.react_stack_bottom_frame.bind(
250
+ R,
251
+ u
252
+ )(), Y = O(c(u)), $ = {};
253
+ E.Fragment = T, E.jsx = function(e, r, t) {
254
+ var n = 1e4 > k.recentlyCreatedOwnerStacks++;
255
+ return A(
254
256
  e,
255
257
  r,
256
258
  t,
257
259
  !1,
258
- n,
259
- m,
260
- l ? Error("react-stack-top-frame") : Y,
261
- l ? O(u(e)) : $
260
+ n ? Error("react-stack-top-frame") : C,
261
+ n ? O(c(e)) : Y
262
262
  );
263
- }, b.jsxs = function(e, r, t, n, m) {
264
- var l = 1e4 > k.recentlyCreatedOwnerStacks++;
265
- return P(
263
+ }, E.jsxs = function(e, r, t) {
264
+ var n = 1e4 > k.recentlyCreatedOwnerStacks++;
265
+ return A(
266
266
  e,
267
267
  r,
268
268
  t,
269
269
  !0,
270
- n,
271
- m,
272
- l ? Error("react-stack-top-frame") : Y,
273
- l ? O(u(e)) : $
270
+ n ? Error("react-stack-top-frame") : C,
271
+ n ? O(c(e)) : Y
274
272
  );
275
273
  };
276
- }()), b;
274
+ }()), E;
277
275
  }
278
276
  var V;
279
- function se() {
280
- return V || (V = 1, process.env.NODE_ENV === "production" ? T.exports = oe() : T.exports = ae()), T.exports;
277
+ function ae() {
278
+ return V || (V = 1, process.env.NODE_ENV === "production" ? b.exports = ne() : b.exports = oe()), b.exports;
281
279
  }
282
- var ce = se();
280
+ var se = ae();
283
281
  const ue = {
284
282
  center: [54.145464, 32.527699],
285
283
  zoom: 5,
286
284
  poi: !1,
287
285
  traffic: !1
288
286
  };
289
- function me(a) {
290
- const i = F(null), f = F(null), {
291
- options: u,
287
+ function fe(a) {
288
+ const l = I(null), i = I(null), {
289
+ options: c,
292
290
  mapSetter: s,
293
- containerElementSetter: c,
294
- className: d,
295
- ...E
291
+ containerElementSetter: u,
292
+ className: f,
293
+ ...m
296
294
  } = a;
297
- return te(() => {
298
- if (!u.mapKey) {
295
+ return re(() => {
296
+ if (!c.mapKey) {
299
297
  console.error("Please provide a mapKey in options!");
300
298
  return;
301
299
  }
302
- if (i.current && !f.current)
300
+ if (l.current && !i.current)
303
301
  try {
304
- const p = new ne.Map({
302
+ const d = new te.Map({
305
303
  ...ue,
306
- ...u,
307
- container: i.current
304
+ ...c,
305
+ container: l.current
308
306
  });
309
- f.current = p, typeof s == "function" && s(p), typeof c == "function" && c(i.current);
310
- } catch (p) {
311
- console.group("Error in constructing map:"), console.error(p), console.groupEnd();
307
+ i.current = d, typeof s == "function" && s(d), typeof u == "function" && u(l.current);
308
+ } catch (d) {
309
+ console.group("Error in constructing map:"), console.error(d), console.groupEnd();
312
310
  }
313
- }, [c, s, u]), u.mapKey ? /* @__PURE__ */ ce.jsx("div", { className: `map-container ${d || ""}`, ref: i, ...E }) : null;
311
+ }, [u, s, c]), c.mapKey ? /* @__PURE__ */ se.jsx("div", { className: `map-container ${f || ""}`, ref: l, ...m }) : null;
314
312
  }
315
- var le = /* @__PURE__ */ ((a) => (a.neshanVector = "neshanVector", a.neshanVectorNight = "neshanVectorNight", a.neshanRaster = "neshanRaster", a.neshanRasterNight = "neshanRasterNight", a))(le || {});
313
+ var ce = /* @__PURE__ */ ((a) => (a.neshanVector = "neshanVector", a.neshanVectorNight = "neshanVectorNight", a.neshanRaster = "neshanRaster", a.neshanRasterNight = "neshanRasterNight", a))(ce || {});
316
314
  export {
317
- me as MapComponent,
318
- le as MapTypes
315
+ fe as MapComponent,
316
+ ce as MapTypes
319
317
  };
@@ -1,4 +1,4 @@
1
- (function(l,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("@neshan-maps-platform/mapbox-gl")):typeof define=="function"&&define.amd?define(["exports","react","@neshan-maps-platform/mapbox-gl"],m):(l=typeof globalThis<"u"?globalThis:l||self,m(l["neshan-mapbox-sdk-react"]={},l.React,l.nmp_mapboxgl))})(this,function(l,m,z){"use strict";var h={exports:{}},v={};/**
1
+ (function(l,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("@neshan-maps-platform/mapbox-gl")):typeof define=="function"&&define.amd?define(["exports","react","@neshan-maps-platform/mapbox-gl"],f):(l=typeof globalThis<"u"?globalThis:l||self,f(l["neshan-mapbox-sdk-react"]={},l.React,l.nmp_mapboxgl))})(this,function(l,f,U){"use strict";var v={exports:{}},R={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var j;function J(){if(j)return v;j=1;var a=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function d(u,s,c){var E=null;if(c!==void 0&&(E=""+c),s.key!==void 0&&(E=""+s.key),"key"in s){c={};for(var R in s)R!=="key"&&(c[R]=s[R])}else c=s;return s=c.ref,{$$typeof:a,type:u,key:E,ref:s!==void 0?s:null,props:c}}return v.Fragment=f,v.jsx=d,v.jsxs=d,v}var T={};/**
9
+ */var x;function $(){if(x)return R;x=1;var o=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function m(c,s,u){var d=null;if(u!==void 0&&(d=""+u),s.key!==void 0&&(d=""+s.key),"key"in s){u={};for(var p in s)p!=="key"&&(u[p]=s[p])}else u=s;return s=u.ref,{$$typeof:o,type:c,key:d,ref:s!==void 0?s:null,props:u}}return R.Fragment=i,R.jsx=m,R.jsxs=m,R}var b={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,9 +14,9 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var y;function $(){return y||(y=1,process.env.NODE_ENV!=="production"&&function(){function a(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case Q:return"Profiler";case K:return"StrictMode";case ne:return"Suspense";case oe:return"SuspenseList";case se:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Z:return"Portal";case re:return(e.displayName||"Context")+".Provider";case ee:return(e._context.displayName||"Context")+".Consumer";case te:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ae:return r=e.displayName||null,r!==null?r:a(e.type)||"Memo";case F:r=e._payload,e=e._init;try{return a(e(r))}catch{}}return null}function f(e){return""+e}function d(e){try{f(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),f(e)}}function u(e){if(e===g)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===F)return"<...>";try{var r=a(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function s(){var e=O.A;return e===null?null:e.getOwner()}function c(){return Error("react-stack-top-frame")}function E(e){if(D.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function R(e,r){function t(){M||(M=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function b(){var e=a(this.type);return L[e]||(L[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function H(e,r,t,n,p,i,P,x){return t=i.ref,e={$$typeof:I,type:e,key:r,props:i,_owner:p},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:b}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:x}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function C(e,r,t,n,p,i,P,x){var o=r.children;if(o!==void 0)if(n)if(ue(o)){for(n=0;n<o.length;n++)Y(o[n]);Object.freeze&&Object.freeze(o)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Y(o);if(D.call(r,"key")){o=a(e);var _=Object.keys(r).filter(function(ie){return ie!=="key"});n=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",U[o+n]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var A;function z(){return A||(A=1,process.env.NODE_ENV!=="production"&&function(){function o(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case K:return"Profiler";case Z:return"StrictMode";case te:return"Suspense";case ne:return"SuspenseList";case oe:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case H:return"Portal";case ee:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case re:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ae:return r=e.displayName||null,r!==null?r:o(e.type)||"Memo";case y:r=e._payload,e=e._init;try{return o(e(r))}catch{}}return null}function i(e){return""+e}function m(e){try{i(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),i(e)}}function c(e){if(e===k)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===y)return"<...>";try{var r=o(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function s(){var e=g.A;return e===null?null:e.getOwner()}function u(){return Error("react-stack-top-frame")}function d(e){if(F.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function p(e,r){function t(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function _(){var e=o(this.type);return M[e]||(M[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function B(e,r,t,n,h,S){var a=t.ref;return e={$$typeof:I,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:_}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:h}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function N(e,r,t,n,h,S){var a=r.children;if(a!==void 0)if(n)if(ue(a)){for(n=0;n<a.length;n++)C(a[n]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else C(a);if(F.call(r,"key")){a=o(e);var E=Object.keys(r).filter(function(ce){return ce!=="key"});n=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",W[a+n]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,n,o,_,o),U[o+n]=!0)}if(o=null,t!==void 0&&(d(t),o=""+t),E(r)&&(d(r.key),o=""+r.key),"key"in r){t={};for(var A in r)A!=="key"&&(t[A]=r[A])}else t=r;return o&&R(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),H(e,o,i,p,s(),t,P,x)}function Y(e){typeof e=="object"&&e!==null&&e.$$typeof===I&&e._store&&(e._store.validated=1)}var k=m,I=Symbol.for("react.transitional.element"),Z=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),ee=Symbol.for("react.consumer"),re=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),ce=Symbol.for("react.client.reference"),O=k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=Object.prototype.hasOwnProperty,ue=Array.isArray,S=console.createTask?console.createTask:function(){return null};k={"react-stack-bottom-frame":function(e){return e()}};var M,L={},V=k["react-stack-bottom-frame"].bind(k,c)(),W=S(u(c)),U={};T.Fragment=g,T.jsx=function(e,r,t,n,p){var i=1e4>O.recentlyCreatedOwnerStacks++;return C(e,r,t,!1,n,p,i?Error("react-stack-top-frame"):V,i?S(u(e)):W)},T.jsxs=function(e,r,t,n,p){var i=1e4>O.recentlyCreatedOwnerStacks++;return C(e,r,t,!0,n,p,i?Error("react-stack-top-frame"):V,i?S(u(e)):W)}}()),T}var w;function q(){return w||(w=1,process.env.NODE_ENV==="production"?h.exports=J():h.exports=$()),h.exports}var G=q();const X={center:[54.145464,32.527699],zoom:5,poi:!1,traffic:!1};function B(a){const f=m.useRef(null),d=m.useRef(null),{options:u,mapSetter:s,containerElementSetter:c,className:E,...R}=a;return m.useEffect(()=>{if(!u.mapKey){console.error("Please provide a mapKey in options!");return}if(f.current&&!d.current)try{const b=new z.Map({...X,...u,container:f.current});d.current=b,typeof s=="function"&&s(b),typeof c=="function"&&c(f.current)}catch(b){console.group("Error in constructing map:"),console.error(b),console.groupEnd()}},[c,s,u]),u.mapKey?G.jsx("div",{className:`map-container ${E||""}`,ref:f,...R}):null}var N=(a=>(a.neshanVector="neshanVector",a.neshanVectorNight="neshanVectorNight",a.neshanRaster="neshanRaster",a.neshanRasterNight="neshanRasterNight",a))(N||{});l.MapComponent=B,l.MapTypes=N,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
22
+ <%s key={someKey} {...props} />`,n,a,E,a),W[a+n]=!0)}if(a=null,t!==void 0&&(m(t),a=""+t),d(r)&&(m(r.key),a=""+r.key),"key"in r){t={};for(var P in r)P!=="key"&&(t[P]=r[P])}else t=r;return a&&p(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),B(e,a,t,s(),h,S)}function C(e){Y(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===y&&(e._payload.status==="fulfilled"?Y(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function Y(e){return typeof e=="object"&&e!==null&&e.$$typeof===I}var T=f,I=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),se=Symbol.for("react.client.reference"),g=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,ue=Array.isArray,O=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(e){return e()}};var D,M={},V=T.react_stack_bottom_frame.bind(T,u)(),L=O(c(u)),W={};b.Fragment=k,b.jsx=function(e,r,t){var n=1e4>g.recentlyCreatedOwnerStacks++;return N(e,r,t,!1,n?Error("react-stack-top-frame"):V,n?O(c(e)):L)},b.jsxs=function(e,r,t){var n=1e4>g.recentlyCreatedOwnerStacks++;return N(e,r,t,!0,n?Error("react-stack-top-frame"):V,n?O(c(e)):L)}}()),b}var j;function J(){return j||(j=1,process.env.NODE_ENV==="production"?v.exports=$():v.exports=z()),v.exports}var q=J();const G={center:[54.145464,32.527699],zoom:5,poi:!1,traffic:!1};function X(o){const i=f.useRef(null),m=f.useRef(null),{options:c,mapSetter:s,containerElementSetter:u,className:d,...p}=o;return f.useEffect(()=>{if(!c.mapKey){console.error("Please provide a mapKey in options!");return}if(i.current&&!m.current)try{const _=new U.Map({...G,...c,container:i.current});m.current=_,typeof s=="function"&&s(_),typeof u=="function"&&u(i.current)}catch(_){console.group("Error in constructing map:"),console.error(_),console.groupEnd()}},[u,s,c]),c.mapKey?q.jsx("div",{className:`map-container ${d||""}`,ref:i,...p}):null}var w=(o=>(o.neshanVector="neshanVector",o.neshanVectorNight="neshanVectorNight",o.neshanRaster="neshanRaster",o.neshanRasterNight="neshanRasterNight",o))(w||{});l.MapComponent=X,l.MapTypes=w,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@neshan-maps-platform/mapbox-gl-react",
3
- "private": false,
4
- "version": "1.0.3-alpha.3",
3
+ "version": "1.0.4-alpha.0",
5
4
  "description": "A Reactjs wrapper for Neshan-mapbox-sdk",
6
5
  "license": "GPL-3.0-or-later",
7
6
  "type": "module",
@@ -20,8 +19,8 @@
20
19
  },
21
20
  "dependencies": {
22
21
  "@neshan-maps-platform/mapbox-gl": "1.1.5",
23
- "react": "^19.1.0",
24
- "react-dom": "^19.1.0"
22
+ "react": "^19.2.1",
23
+ "react-dom": "^19.2.1"
25
24
  },
26
25
  "devDependencies": {
27
26
  "@types/react": "^19.1.1",