@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
|
|
2
|
-
import
|
|
3
|
-
var
|
|
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
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var a = Symbol.for("react.transitional.element"),
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
for (var
|
|
23
|
-
|
|
24
|
-
} else
|
|
25
|
-
return s =
|
|
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:
|
|
28
|
-
key:
|
|
27
|
+
type: c,
|
|
28
|
+
key: f,
|
|
29
29
|
ref: s !== void 0 ? s : null,
|
|
30
|
-
props:
|
|
30
|
+
props: u
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return p.Fragment = l, p.jsx = i, p.jsxs = i, p;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
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
|
|
46
|
-
function
|
|
47
|
-
return
|
|
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 ===
|
|
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
|
|
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
|
|
60
|
+
case G:
|
|
61
61
|
return "Suspense";
|
|
62
|
-
case
|
|
62
|
+
case X:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
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
|
|
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
|
|
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
|
|
80
|
+
case B:
|
|
81
81
|
return r = e.displayName || null, r !== null ? r : a(e.type) || "Memo";
|
|
82
|
-
case
|
|
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
|
|
91
|
+
function l(e) {
|
|
92
92
|
return "" + e;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function i(e) {
|
|
95
95
|
try {
|
|
96
|
-
|
|
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
|
-
),
|
|
108
|
+
), l(e);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (e ===
|
|
113
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
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
|
|
126
|
+
function u() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
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
|
|
136
|
+
function m(e, r) {
|
|
137
137
|
function t() {
|
|
138
|
-
|
|
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
|
|
148
|
+
function d() {
|
|
149
149
|
var e = a(this.type);
|
|
150
|
-
return
|
|
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
|
|
155
|
-
|
|
156
|
-
|
|
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:
|
|
160
|
-
_owner:
|
|
161
|
-
}, (
|
|
160
|
+
props: t,
|
|
161
|
+
_owner: n
|
|
162
|
+
}, (o !== void 0 ? o : null) !== null ? Object.defineProperty(e, "ref", {
|
|
162
163
|
enumerable: !1,
|
|
163
|
-
get:
|
|
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:
|
|
179
|
+
value: v
|
|
179
180
|
}), Object.defineProperty(e, "_debugTask", {
|
|
180
181
|
configurable: !1,
|
|
181
182
|
enumerable: !1,
|
|
182
183
|
writable: !0,
|
|
183
|
-
value:
|
|
184
|
+
value: S
|
|
184
185
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
185
186
|
}
|
|
186
|
-
function
|
|
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 (
|
|
191
|
+
if (K(o)) {
|
|
191
192
|
for (n = 0; n < o.length; n++)
|
|
192
|
-
|
|
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
|
|
199
|
-
if (
|
|
199
|
+
else P(o);
|
|
200
|
+
if (x.call(r, "key")) {
|
|
200
201
|
o = a(e);
|
|
201
|
-
var
|
|
202
|
-
return
|
|
202
|
+
var _ = Object.keys(r).filter(function(Q) {
|
|
203
|
+
return Q !== "key";
|
|
203
204
|
});
|
|
204
|
-
n = 0 <
|
|
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
|
-
|
|
214
|
+
_,
|
|
214
215
|
o
|
|
215
|
-
),
|
|
216
|
+
), $[o + n] = !0);
|
|
216
217
|
}
|
|
217
|
-
if (o = null, t !== void 0 && (
|
|
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
|
|
220
|
-
|
|
220
|
+
for (var g in r)
|
|
221
|
+
g !== "key" && (t[g] = r[g]);
|
|
221
222
|
} else t = r;
|
|
222
|
-
return o &&
|
|
223
|
+
return o && m(
|
|
223
224
|
t,
|
|
224
225
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
225
|
-
),
|
|
226
|
+
), L(
|
|
226
227
|
e,
|
|
227
228
|
o,
|
|
228
|
-
l,
|
|
229
|
-
m,
|
|
230
|
-
s(),
|
|
231
229
|
t,
|
|
232
|
-
|
|
233
|
-
|
|
230
|
+
s(),
|
|
231
|
+
v,
|
|
232
|
+
S
|
|
234
233
|
);
|
|
235
234
|
}
|
|
236
|
-
function
|
|
237
|
-
typeof e == "object" && e !== null && e.$$typeof ===
|
|
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
|
-
|
|
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
|
-
|
|
243
|
-
|
|
244
|
+
R = {
|
|
245
|
+
react_stack_bottom_frame: function(e) {
|
|
244
246
|
return e();
|
|
245
247
|
}
|
|
246
248
|
};
|
|
247
|
-
var
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
)(),
|
|
251
|
-
|
|
252
|
-
var
|
|
253
|
-
return
|
|
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
|
-
|
|
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
|
-
},
|
|
264
|
-
var
|
|
265
|
-
return
|
|
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
|
-
|
|
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
|
-
}()),
|
|
274
|
+
}()), E;
|
|
277
275
|
}
|
|
278
276
|
var V;
|
|
279
|
-
function
|
|
280
|
-
return V || (V = 1, process.env.NODE_ENV === "production" ?
|
|
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
|
|
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
|
|
290
|
-
const
|
|
291
|
-
options:
|
|
287
|
+
function fe(a) {
|
|
288
|
+
const l = I(null), i = I(null), {
|
|
289
|
+
options: c,
|
|
292
290
|
mapSetter: s,
|
|
293
|
-
containerElementSetter:
|
|
294
|
-
className:
|
|
295
|
-
...
|
|
291
|
+
containerElementSetter: u,
|
|
292
|
+
className: f,
|
|
293
|
+
...m
|
|
296
294
|
} = a;
|
|
297
|
-
return
|
|
298
|
-
if (!
|
|
295
|
+
return re(() => {
|
|
296
|
+
if (!c.mapKey) {
|
|
299
297
|
console.error("Please provide a mapKey in options!");
|
|
300
298
|
return;
|
|
301
299
|
}
|
|
302
|
-
if (
|
|
300
|
+
if (l.current && !i.current)
|
|
303
301
|
try {
|
|
304
|
-
const
|
|
302
|
+
const d = new te.Map({
|
|
305
303
|
...ue,
|
|
306
|
-
...
|
|
307
|
-
container:
|
|
304
|
+
...c,
|
|
305
|
+
container: l.current
|
|
308
306
|
});
|
|
309
|
-
|
|
310
|
-
} catch (
|
|
311
|
-
console.group("Error in constructing map:"), console.error(
|
|
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
|
-
}, [
|
|
311
|
+
}, [u, s, c]), c.mapKey ? /* @__PURE__ */ se.jsx("div", { className: `map-container ${f || ""}`, ref: l, ...m }) : null;
|
|
314
312
|
}
|
|
315
|
-
var
|
|
313
|
+
var ce = /* @__PURE__ */ ((a) => (a.neshanVector = "neshanVector", a.neshanVectorNight = "neshanVectorNight", a.neshanRaster = "neshanRaster", a.neshanRasterNight = "neshanRasterNight", a))(ce || {});
|
|
316
314
|
export {
|
|
317
|
-
|
|
318
|
-
|
|
315
|
+
fe as MapComponent,
|
|
316
|
+
ce as MapTypes
|
|
319
317
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(l,
|
|
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
|
|
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
|
|
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,
|
|
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
|
-
"
|
|
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
|
|
24
|
-
"react-dom": "^19.1
|
|
22
|
+
"react": "^19.2.1",
|
|
23
|
+
"react-dom": "^19.2.1"
|
|
25
24
|
},
|
|
26
25
|
"devDependencies": {
|
|
27
26
|
"@types/react": "^19.1.1",
|