@hybridcore/ui 1.5.30 → 1.5.32

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,74 +1,64 @@
1
- import { S as r, F as t, a as i, C as s, I as c, T as d } from "../../Text-BT5kPHOo.js";
2
- import { c as f } from "../../createStyled-CUatW1r9.js";
3
- const g = f(), a = 0.4, w = g("div")(
4
- ({ theme: o, cssPosition: n = "absolute" }) => ({
5
- position: n,
1
+ import { S as c, F as t, a, C as i, I as r, T as f } from "../../Text-Cl1H4b0h.js";
2
+ import { c as w } from "../../createStyled-CUatW1r9.js";
3
+ const d = w(), s = 0.4, g = d("div")(
4
+ ({ theme: n, cssPosition: o = "absolute" }) => ({
5
+ position: o,
6
6
  width: "100%",
7
7
  height: "100%",
8
8
  // minHeight: 500,
9
- backgroundColor: o.palette.background.paper,
10
- "& .ol-zoom": {
11
- backgroundColor: "transparent",
12
- "& button": {
13
- borderRadius: "50%",
14
- fontSize: 20,
15
- width: 34,
16
- height: 34,
17
- marginTop: 3
18
- }
19
- }
9
+ backgroundColor: n.palette.background.paper
20
10
  })
21
- ), y = new r({
11
+ ), p = new c({
22
12
  fill: new t({
23
13
  color: "rgba(255, 255, 255, 0.2)"
24
14
  }),
25
- stroke: new i({
15
+ stroke: new a({
26
16
  color: "#2daae1",
27
17
  width: 2
28
18
  }),
29
- image: new s({
19
+ image: new i({
30
20
  radius: 7,
31
21
  fill: new t({
32
22
  color: "#2daae1"
33
23
  })
34
24
  })
35
- }), u = new r({
25
+ }), S = new c({
36
26
  fill: new t({
37
27
  color: "rgba(255, 255, 255, 0.4)"
38
28
  }),
39
- stroke: new i({
29
+ stroke: new a({
40
30
  color: "#0f70b7",
41
31
  width: 2
42
32
  }),
43
- image: new s({
33
+ image: new i({
44
34
  radius: 7,
45
35
  fill: new t({
46
36
  color: "#0f70b7"
47
37
  })
48
38
  })
49
- }), b = (o) => {
50
- const n = o.get("icon");
51
- if (n)
52
- return new r({
53
- image: new c({
39
+ }), m = (n) => {
40
+ const o = n.get("icon");
41
+ if (o)
42
+ return new c({
43
+ image: new r({
54
44
  anchor: [0.5, 0.5],
55
- src: n,
56
- scale: a
45
+ src: o,
46
+ scale: s
57
47
  }),
58
48
  zIndex: 2
59
49
  });
60
- const e = o.get("features");
50
+ const e = n.get("features");
61
51
  if (e) {
62
52
  const l = e.length > 1 ? e[0].get("clusterIcon") : e[0].get("icon");
63
53
  if (l)
64
- return new r({
65
- image: new c({
54
+ return new c({
55
+ image: new r({
66
56
  anchor: [0.5, 0.5],
67
57
  src: l,
68
- scale: a
58
+ scale: s
69
59
  }),
70
60
  ...e.length > 1 && {
71
- text: new d({
61
+ text: new f({
72
62
  text: e.length.toString(),
73
63
  font: "14px sans-serif",
74
64
  fill: new t({
@@ -79,13 +69,13 @@ const g = f(), a = 0.4, w = g("div")(
79
69
  zIndex: 2
80
70
  });
81
71
  }
82
- return u;
83
- }, m = {
84
- Container: w
72
+ return S;
73
+ }, b = {
74
+ Container: g
85
75
  };
86
76
  export {
87
- m as default,
88
- y as defaultStyle,
89
- b as selectStyleFunction,
90
- u as selectedStyle
77
+ b as default,
78
+ p as defaultStyle,
79
+ m as selectStyleFunction,
80
+ S as selectedStyle
91
81
  };
@@ -4,7 +4,7 @@ import { Dialog as de, DialogTitle as pe, Box as m, Typography as $, TextField a
4
4
  import { DataGrid as fe } from "@mui/x-data-grid";
5
5
  import { useState as H, useEffect as ue } from "react";
6
6
  import h from "lodash";
7
- import { e as ye } from "../../ol-9hySGI6D.js";
7
+ import { d as ye } from "../../ol-lGwSyEIV.js";
8
8
  import { V as he } from "../../index-CdecY907.js";
9
9
  import { RangeSelector as me } from "../range-selector/index.js";
10
10
  const $e = ({
@@ -2,13 +2,13 @@ function m(n) {
2
2
  for (const e in n)
3
3
  delete n[e];
4
4
  }
5
- function _(n) {
5
+ function A(n) {
6
6
  let e;
7
7
  for (e in n)
8
8
  return !1;
9
9
  return !e;
10
10
  }
11
- const b = {
11
+ const w = {
12
12
  1: "The view center is not defined",
13
13
  2: "The view resolution is not defined",
14
14
  3: "The view rotation is not defined",
@@ -67,35 +67,35 @@ const b = {
67
67
  68: "A VectorTile source can only be rendered if it has a projection compatible with the view projection",
68
68
  69: "`width` or `height` cannot be provided together with `scale`"
69
69
  };
70
- class A extends Error {
70
+ class R extends Error {
71
71
  /**
72
72
  * @param {number} code Error code.
73
73
  */
74
74
  constructor(e) {
75
- const s = b[e];
75
+ const s = w[e];
76
76
  super(s), this.code = e, this.name = "AssertionError", this.message = s;
77
77
  }
78
78
  }
79
79
  function N(n, e) {
80
80
  if (!n)
81
- throw new A(e);
81
+ throw new R(e);
82
82
  }
83
- function M(n, e, s) {
83
+ function U(n, e, s) {
84
84
  return Math.min(Math.max(n, e), s);
85
85
  }
86
- function U(n, e, s, t, i, r) {
86
+ function D(n, e, s, t, i, r) {
87
87
  const a = i - s, o = r - t;
88
88
  if (a !== 0 || o !== 0) {
89
89
  const l = ((n - s) * a + (e - t) * o) / (a * a + o * o);
90
90
  l > 1 ? (s = i, t = r) : l > 0 && (s += a * l, t += o * l);
91
91
  }
92
- return w(n, e, s, t);
92
+ return L(n, e, s, t);
93
93
  }
94
- function w(n, e, s, t) {
94
+ function L(n, e, s, t) {
95
95
  const i = s - n, r = t - e;
96
96
  return i * i + r * r;
97
97
  }
98
- function D(n) {
98
+ function V(n) {
99
99
  const e = n.length;
100
100
  for (let t = 0; t < e; t++) {
101
101
  let i = t, r = Math.abs(n[t][t]);
@@ -121,21 +121,27 @@ function D(n) {
121
121
  }
122
122
  return s;
123
123
  }
124
- function V(n) {
124
+ function B(n) {
125
125
  return n * Math.PI / 180;
126
126
  }
127
- function B(n, e) {
127
+ function G(n, e) {
128
128
  const s = n % e;
129
129
  return s * e < 0 ? s + e : s;
130
130
  }
131
- function G(n, e, s) {
131
+ function k(n, e, s) {
132
132
  return n + s * (e - n);
133
133
  }
134
- function k(n, e) {
134
+ function y(n, e) {
135
135
  const s = Math.pow(10, e);
136
136
  return Math.round(n * s) / s;
137
137
  }
138
- class y {
138
+ function j(n, e) {
139
+ return Math.floor(y(n, e));
140
+ }
141
+ function q(n, e) {
142
+ return Math.ceil(y(n, e));
143
+ }
144
+ class E {
139
145
  /**
140
146
  * @param {string} type Type.
141
147
  */
@@ -158,7 +164,7 @@ class y {
158
164
  this.propagationStopped = !0;
159
165
  }
160
166
  }
161
- const R = {
167
+ const I = {
162
168
  /**
163
169
  * Triggered when a property is changed.
164
170
  * @event module:ol/Object.ObjectEvent#propertychange
@@ -166,7 +172,7 @@ const R = {
166
172
  */
167
173
  PROPERTYCHANGE: "propertychange"
168
174
  };
169
- class L {
175
+ class S {
170
176
  constructor() {
171
177
  this.disposed = !1;
172
178
  }
@@ -183,18 +189,18 @@ class L {
183
189
  disposeInternal() {
184
190
  }
185
191
  }
186
- function j(n, e, s) {
192
+ function K(n, e, s) {
187
193
  let t, i;
188
- s = s || I;
194
+ s = s || _;
189
195
  let r = 0, a = n.length, o = !1;
190
196
  for (; r < a; )
191
197
  t = r + (a - r >> 1), i = +s(n[t], e), i < 0 ? r = t + 1 : (a = t, o = !i);
192
198
  return o ? r : ~r;
193
199
  }
194
- function I(n, e) {
200
+ function _(n, e) {
195
201
  return n > e ? 1 : n < e ? -1 : 0;
196
202
  }
197
- function q(n, e, s) {
203
+ function W(n, e, s) {
198
204
  if (n[0] <= e)
199
205
  return 0;
200
206
  const t = n.length;
@@ -230,13 +236,13 @@ function q(n, e, s) {
230
236
  }
231
237
  return t - 1;
232
238
  }
233
- function K(n, e, s) {
239
+ function z(n, e, s) {
234
240
  for (; e < s; ) {
235
241
  const t = n[e];
236
242
  n[e] = n[s], n[s] = t, ++e, --s;
237
243
  }
238
244
  }
239
- function W(n, e) {
245
+ function H(n, e) {
240
246
  const s = Array.isArray(e) ? e : [e], t = s.length;
241
247
  for (let i = 0; i < t; i++)
242
248
  n[n.length] = s[i];
@@ -250,22 +256,31 @@ function T(n, e) {
250
256
  return !1;
251
257
  return !0;
252
258
  }
253
- function z() {
259
+ function Y(n, e, s) {
260
+ const t = e || _;
261
+ return n.every(function(i, r) {
262
+ if (r === 0)
263
+ return !0;
264
+ const a = t(n[r - 1], i);
265
+ return !(a > 0 || a === 0);
266
+ });
267
+ }
268
+ function J() {
254
269
  return !0;
255
270
  }
256
- function H() {
271
+ function X() {
257
272
  return !1;
258
273
  }
259
274
  function f() {
260
275
  }
261
- function Y(n) {
276
+ function $(n) {
262
277
  let e = !1, s, t, i;
263
278
  return function() {
264
279
  const r = Array.prototype.slice.call(arguments);
265
280
  return (!e || this !== i || !T(r, t)) && (e = !0, i = this, t = r, s = n.apply(this, arguments)), s;
266
281
  };
267
282
  }
268
- class S extends L {
283
+ class O extends S {
269
284
  /**
270
285
  * @param {*} [target] Default event target for dispatched events.
271
286
  */
@@ -296,7 +311,7 @@ class S extends L {
296
311
  const s = typeof e == "string", t = s ? e : e.type, i = this.listeners_ && this.listeners_[t];
297
312
  if (!i)
298
313
  return;
299
- const r = s ? new y(e) : (
314
+ const r = s ? new E(e) : (
300
315
  /** @type {Event} */
301
316
  e
302
317
  );
@@ -304,7 +319,7 @@ class S extends L {
304
319
  const a = this.dispatching_ || (this.dispatching_ = {}), o = this.pendingRemovals_ || (this.pendingRemovals_ = {});
305
320
  t in a || (a[t] = 0, o[t] = 0), ++a[t];
306
321
  let l;
307
- for (let u = 0, E = i.length; u < E; ++u)
322
+ for (let u = 0, b = i.length; u < b; ++u)
308
323
  if ("handleEvent" in i[u] ? l = /** @type {import("../events.js").ListenerObject} */
309
324
  i[u].handleEvent(r) : l = /** @type {import("../events.js").ListenerFunction} */
310
325
  i[u].call(this, r), l === !1 || r.propagationStopped) {
@@ -355,7 +370,7 @@ class S extends L {
355
370
  }
356
371
  }
357
372
  }
358
- const O = {
373
+ const C = {
359
374
  /**
360
375
  * Generic change event. Triggered when the revision counter is increased.
361
376
  * @event module:ol/events/Event~BaseEvent#change
@@ -404,7 +419,7 @@ function p(n, e, s, t) {
404
419
  function v(n) {
405
420
  n && n.target && (n.target.removeEventListener(n.type, n.listener), m(n));
406
421
  }
407
- class d extends S {
422
+ class d extends O {
408
423
  constructor() {
409
424
  super(), this.on = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
410
425
  this.onInternal, this.once = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
@@ -416,7 +431,7 @@ class d extends S {
416
431
  * @api
417
432
  */
418
433
  changed() {
419
- ++this.revision_, this.dispatchEvent(O.CHANGE);
434
+ ++this.revision_, this.dispatchEvent(C.CHANGE);
420
435
  }
421
436
  /**
422
437
  * Get the version number for this object. Each time the object is modified,
@@ -502,14 +517,14 @@ function x(n) {
502
517
  n
503
518
  );
504
519
  }
505
- function X() {
520
+ function Q() {
506
521
  throw new Error("Unimplemented abstract method.");
507
522
  }
508
- let C = 0;
509
- function P(n) {
510
- return n.ol_uid || (n.ol_uid = String(++C));
523
+ let P = 0;
524
+ function F(n) {
525
+ return n.ol_uid || (n.ol_uid = String(++P));
511
526
  }
512
- class g extends y {
527
+ class g extends E {
513
528
  /**
514
529
  * @param {string} type The event type.
515
530
  * @param {string} key The property name.
@@ -519,12 +534,12 @@ class g extends y {
519
534
  super(e), this.key = s, this.oldValue = t;
520
535
  }
521
536
  }
522
- class $ extends d {
537
+ class Z extends d {
523
538
  /**
524
539
  * @param {Object<string, *>} [values] An object with key-value pairs.
525
540
  */
526
541
  constructor(e) {
527
- super(), this.on, this.once, this.un, P(this), this.values_ = null, e !== void 0 && this.setProperties(e);
542
+ super(), this.on, this.once, this.un, F(this), this.values_ = null, e !== void 0 && this.setProperties(e);
528
543
  }
529
544
  /**
530
545
  * Gets a value.
@@ -564,7 +579,7 @@ class $ extends d {
564
579
  */
565
580
  notify(e, s) {
566
581
  let t;
567
- t = `change:${e}`, this.hasListener(t) && this.dispatchEvent(new g(t, e, s)), t = R.PROPERTYCHANGE, this.hasListener(t) && this.dispatchEvent(new g(t, e, s));
582
+ t = `change:${e}`, this.hasListener(t) && this.dispatchEvent(new g(t, e, s)), t = I.PROPERTYCHANGE, this.hasListener(t) && this.dispatchEvent(new g(t, e, s));
568
583
  }
569
584
  /**
570
585
  * @param {string} key Key name.
@@ -624,13 +639,13 @@ class $ extends d {
624
639
  unset(e, s) {
625
640
  if (this.values_ && e in this.values_) {
626
641
  const t = this.values_[e];
627
- delete this.values_[e], _(this.values_) && (this.values_ = null), s || this.notify(e, t);
642
+ delete this.values_[e], A(this.values_) && (this.values_ = null), s || this.notify(e, t);
628
643
  }
629
644
  }
630
645
  }
631
- const c = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", J = c.includes("firefox"), F = c.includes("safari") && !c.includes("chrom");
632
- F && (c.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(c));
633
- const Q = c.includes("webkit") && !c.includes("edge"), Z = c.includes("macintosh"), ee = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, te = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, ne = typeof Image < "u" && Image.prototype.decode, se = function() {
646
+ const c = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", ee = c.includes("firefox"), M = c.includes("safari") && !c.includes("chrom");
647
+ M && (c.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(c));
648
+ const te = c.includes("webkit") && !c.includes("edge"), ne = c.includes("macintosh"), se = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, ie = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, re = typeof Image < "u" && Image.prototype.decode, oe = function() {
634
649
  let n = !1;
635
650
  try {
636
651
  const e = Object.defineProperty({}, "passive", {
@@ -644,45 +659,48 @@ const Q = c.includes("webkit") && !c.includes("edge"), Z = c.includes("macintosh
644
659
  return n;
645
660
  }();
646
661
  export {
647
- A,
648
- y as B,
649
- j as C,
650
- L as D,
651
- O as E,
652
- H as F,
653
- _ as G,
654
- K as H,
655
- ne as I,
656
- Z as M,
657
- R as O,
658
- se as P,
659
- z as T,
662
+ R as A,
663
+ Z as B,
664
+ se as C,
665
+ S as D,
666
+ C as E,
667
+ X as F,
668
+ d as G,
669
+ V as H,
670
+ re as I,
671
+ K as J,
672
+ A as K,
673
+ z as L,
674
+ ne as M,
675
+ I as O,
676
+ oe as P,
677
+ O as T,
660
678
  f as V,
661
- te as W,
662
- T as a,
663
- M as b,
664
- m as c,
665
- N as d,
666
- W as e,
667
- $ as f,
668
- P as g,
669
- p as h,
670
- X as i,
671
- S as j,
672
- V as k,
673
- h as l,
674
- B as m,
679
+ ie as W,
680
+ N as a,
681
+ m as b,
682
+ U as c,
683
+ Q as d,
684
+ J as e,
685
+ H as f,
686
+ F as g,
687
+ E as h,
688
+ T as i,
689
+ h as j,
690
+ Y as k,
691
+ p as l,
692
+ W as m,
675
693
  q as n,
676
- Y as o,
694
+ j as o,
677
695
  G as p,
678
- U as q,
679
- I as r,
680
- w as s,
681
- k as t,
696
+ B as q,
697
+ $ as r,
698
+ L as s,
699
+ y as t,
682
700
  v as u,
683
- Q as v,
684
- J as w,
685
- ee as x,
686
- d as y,
687
- D as z
701
+ k as v,
702
+ D as w,
703
+ _ as x,
704
+ te as y,
705
+ ee as z
688
706
  };
package/dist/main.d.ts CHANGED
@@ -377,7 +377,7 @@ K extends
377
377
  */
378
378
  policyList: POLICY.Policy[];
379
379
 
380
- mapboxAccessToken: string;
380
+ mapboxAccessToken?: string;
381
381
  /**
382
382
  *
383
383
  * @param template
@@ -713,7 +713,7 @@ declare interface Props_5 {
713
713
  /**
714
714
  *
715
715
  */
716
- mapboxAccessToken: string;
716
+ mapboxAccessToken?: string;
717
717
  /**
718
718
  *
719
719
  */