@arenarium/maps 1.0.138 → 1.0.139

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.
package/dist/main.es.js CHANGED
@@ -283,7 +283,7 @@ function an(r) {
283
283
  ee(r, t);
284
284
  }
285
285
  }
286
- const He = /* @__PURE__ */ new Map();
286
+ const Je = /* @__PURE__ */ new Map();
287
287
  function Lt(r, e) {
288
288
  var t = {
289
289
  f: 0,
@@ -309,7 +309,7 @@ function Z(r, e, t = !1) {
309
309
  function ls(r, e) {
310
310
  if (!r.equals(e)) {
311
311
  var t = r.v;
312
- Fe ? He.set(r, e) : He.set(r, t), r.v = e, (r.f & J) !== 0 && ((r.f & he) !== 0 && sn(
312
+ Fe ? Je.set(r, e) : Je.set(r, t), r.v = e, (r.f & J) !== 0 && ((r.f & he) !== 0 && sn(
313
313
  /** @type {Derived} */
314
314
  r
315
315
  ), ee(r, (r.f & V) === 0 ? X : we)), r.wv = wn(), on(r, he), T !== null && (T.f & X) !== 0 && (T.f & (ge | Pe)) === 0 && ($ === null ? As([r]) : $.push(r));
@@ -733,7 +733,7 @@ function Ts() {
733
733
  var a = Ns(t[s]);
734
734
  Os(a);
735
735
  }
736
- He.clear();
736
+ Je.clear();
737
737
  }
738
738
  } finally {
739
739
  Pt = !1, ye = r, ht = null;
@@ -793,7 +793,7 @@ function O(r) {
793
793
  a !== null && (a.f & V) === 0 && (s.f ^= V);
794
794
  }
795
795
  return t && (s = /** @type {Derived} */
796
- r, Ct(s) && an(s)), Fe && He.has(r) ? He.get(r) : r.v;
796
+ r, Ct(s) && an(s)), Fe && Je.has(r) ? Je.get(r) : r.v;
797
797
  }
798
798
  function Is(r) {
799
799
  var e = G;
@@ -1681,7 +1681,7 @@ class Y extends Error {
1681
1681
  }
1682
1682
  }
1683
1683
  Y.create = (r) => new Y(r);
1684
- const Je = (r, e) => {
1684
+ const Ge = (r, e) => {
1685
1685
  let t;
1686
1686
  switch (r.code) {
1687
1687
  case d.invalid_type:
@@ -1737,7 +1737,7 @@ const Je = (r, e) => {
1737
1737
  }
1738
1738
  return { message: t };
1739
1739
  };
1740
- let na = Je;
1740
+ let na = Ge;
1741
1741
  function Vt() {
1742
1742
  return na;
1743
1743
  }
@@ -1774,7 +1774,7 @@ function p(r, e) {
1774
1774
  // then schema-bound map if available
1775
1775
  t,
1776
1776
  // then global override map
1777
- t === Je ? void 0 : Je
1777
+ t === Ge ? void 0 : Ge
1778
1778
  // then global default map
1779
1779
  ].filter((s) => !!s)
1780
1780
  });
@@ -2020,7 +2020,7 @@ class b {
2020
2020
  return K.create(this);
2021
2021
  }
2022
2022
  promise() {
2023
- return Ke.create(this, this._def);
2023
+ return et.create(this, this._def);
2024
2024
  }
2025
2025
  or(e) {
2026
2026
  return kt.create([this, e], this._def);
@@ -2673,7 +2673,7 @@ Re.create = (r) => new Re({
2673
2673
  coerce: (r == null ? void 0 : r.coerce) || !1,
2674
2674
  ...w(r)
2675
2675
  });
2676
- class Ge extends b {
2676
+ class Qe extends b {
2677
2677
  constructor() {
2678
2678
  super(...arguments), this.min = this.gte, this.max = this.lte;
2679
2679
  }
@@ -2729,7 +2729,7 @@ class Ge extends b {
2729
2729
  return this.setLimit("max", e, !1, g.toString(t));
2730
2730
  }
2731
2731
  setLimit(e, t, n, s) {
2732
- return new Ge({
2732
+ return new Qe({
2733
2733
  ...this._def,
2734
2734
  checks: [
2735
2735
  ...this._def.checks,
@@ -2743,7 +2743,7 @@ class Ge extends b {
2743
2743
  });
2744
2744
  }
2745
2745
  _addCheck(e) {
2746
- return new Ge({
2746
+ return new Qe({
2747
2747
  ...this._def,
2748
2748
  checks: [...this._def.checks, e]
2749
2749
  });
@@ -2800,7 +2800,7 @@ class Ge extends b {
2800
2800
  return e;
2801
2801
  }
2802
2802
  }
2803
- Ge.create = (r) => new Ge({
2803
+ Qe.create = (r) => new Qe({
2804
2804
  checks: [],
2805
2805
  typeName: k.ZodBigInt,
2806
2806
  coerce: (r == null ? void 0 : r.coerce) ?? !1,
@@ -3620,7 +3620,7 @@ Ur.create = (r, e, t) => new Ur({
3620
3620
  typeName: k.ZodMap,
3621
3621
  ...w(t)
3622
3622
  });
3623
- class Qe extends b {
3623
+ class Ke extends b {
3624
3624
  _parse(e) {
3625
3625
  const { status: t, ctx: n } = this._processInputParams(e);
3626
3626
  if (n.parsedType !== v.set)
@@ -3659,13 +3659,13 @@ class Qe extends b {
3659
3659
  return n.common.async ? Promise.all(o).then((l) => i(l)) : i(o);
3660
3660
  }
3661
3661
  min(e, t) {
3662
- return new Qe({
3662
+ return new Ke({
3663
3663
  ...this._def,
3664
3664
  minSize: { value: e, message: g.toString(t) }
3665
3665
  });
3666
3666
  }
3667
3667
  max(e, t) {
3668
- return new Qe({
3668
+ return new Ke({
3669
3669
  ...this._def,
3670
3670
  maxSize: { value: e, message: g.toString(t) }
3671
3671
  });
@@ -3677,7 +3677,7 @@ class Qe extends b {
3677
3677
  return this.min(1, e);
3678
3678
  }
3679
3679
  }
3680
- Qe.create = (r, e) => new Qe({
3680
+ Ke.create = (r, e) => new Ke({
3681
3681
  valueType: r,
3682
3682
  minSize: null,
3683
3683
  maxSize: null,
@@ -3700,7 +3700,7 @@ class Xe extends b {
3700
3700
  return Ut({
3701
3701
  data: o,
3702
3702
  path: t.path,
3703
- errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, Vt(), Je].filter((u) => !!u),
3703
+ errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, Vt(), Ge].filter((u) => !!u),
3704
3704
  issueData: {
3705
3705
  code: d.invalid_arguments,
3706
3706
  argumentsError: l
@@ -3711,7 +3711,7 @@ class Xe extends b {
3711
3711
  return Ut({
3712
3712
  data: o,
3713
3713
  path: t.path,
3714
- errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, Vt(), Je].filter((u) => !!u),
3714
+ errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, Vt(), Ge].filter((u) => !!u),
3715
3715
  issueData: {
3716
3716
  code: d.invalid_return_type,
3717
3717
  returnTypeError: l
@@ -3719,7 +3719,7 @@ class Xe extends b {
3719
3719
  });
3720
3720
  }
3721
3721
  const a = { errorMap: t.common.contextualErrorMap }, i = t.data;
3722
- if (this._def.returns instanceof Ke) {
3722
+ if (this._def.returns instanceof et) {
3723
3723
  const o = this;
3724
3724
  return j(async function(...l) {
3725
3725
  const u = new Y([]), c = await o._def.args.parseAsync(l, a).catch((_) => {
@@ -3902,7 +3902,7 @@ qr.create = (r, e) => new qr({
3902
3902
  typeName: k.ZodNativeEnum,
3903
3903
  ...w(e)
3904
3904
  });
3905
- class Ke extends b {
3905
+ class et extends b {
3906
3906
  unwrap() {
3907
3907
  return this._def.type;
3908
3908
  }
@@ -3921,7 +3921,7 @@ class Ke extends b {
3921
3921
  })));
3922
3922
  }
3923
3923
  }
3924
- Ke.create = (r, e) => new Ke({
3924
+ et.create = (r, e) => new et({
3925
3925
  type: r,
3926
3926
  typeName: k.ZodPromise,
3927
3927
  ...w(e)
@@ -4203,7 +4203,7 @@ kt.create;
4203
4203
  wt.create;
4204
4204
  const Yr = ie.create, ae = Xe.create;
4205
4205
  De.create;
4206
- const Ma = Ke.create;
4206
+ const Ma = et.create;
4207
4207
  fe.create;
4208
4208
  Ze.create;
4209
4209
  I({
@@ -4288,10 +4288,10 @@ I({
4288
4288
  parameters: Ln,
4289
4289
  input: hr(Ra)
4290
4290
  });
4291
- var et;
4291
+ var He;
4292
4292
  ((r) => {
4293
4293
  r.COUNT = 12, r.DEFAULT = 270, r.DEGREES = [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330];
4294
- })(et || (et = {}));
4294
+ })(He || (He = {}));
4295
4295
  const Xr = "https://arenarium.dev/api/public/v1/tooltip/states";
4296
4296
  class ja {
4297
4297
  constructor(e, t, n) {
@@ -4576,11 +4576,12 @@ const xt = class xt extends pr {
4576
4576
  f(this, "margin");
4577
4577
  f(this, "radius");
4578
4578
  f(this, "zoom");
4579
+ f(this, "angle");
4579
4580
  f(this, "states");
4580
4581
  f(this, "bodyLoading", !1);
4581
4582
  f(this, "bodyLoaded", !1);
4582
4583
  f(this, "bodyCallback");
4583
- this.width = n.tooltip.style.width, this.height = n.tooltip.style.height, this.margin = n.tooltip.style.margin, this.radius = n.tooltip.style.radius, this.zoom = s[0], this.states = s[1].map((a) => [a[0], et.DEGREES[a[1]]]), this.bodyCallback = n.tooltip.body;
4584
+ this.width = n.tooltip.style.width, this.height = n.tooltip.style.height, this.margin = n.tooltip.style.margin, this.radius = n.tooltip.style.radius, this.zoom = s[0], this.angle = He.DEFAULT, this.states = s[1].map((a) => [a[0], He.DEGREES[a[1]]]), this.bodyCallback = n.tooltip.body;
4584
4585
  }
4585
4586
  createElement() {
4586
4587
  this.element = document.createElement("div"), this.element.classList.add("tooltip"), this.component = cr(Sn, {
@@ -4597,7 +4598,7 @@ const xt = class xt extends pr {
4597
4598
  });
4598
4599
  }
4599
4600
  update(t) {
4600
- this.zoom = t[0], this.states = t[1].map((n) => [n[0], et.DEGREES[n[1]]]), this.updateZIndex();
4601
+ this.zoom = t[0], this.states = t[1].map((n) => [n[0], He.DEGREES[n[1]]]), this.updateZIndex();
4601
4602
  }
4602
4603
  updateMap(t) {
4603
4604
  var n;
@@ -4605,7 +4606,7 @@ const xt = class xt extends pr {
4605
4606
  }
4606
4607
  updateState(t) {
4607
4608
  if (this.component == null) throw new Error("Failed to update tooltip state");
4608
- this.component.setAngle(this.getAngle(t));
4609
+ this.angle = this.getAngle(t), this.component.setAngle(this.angle);
4609
4610
  }
4610
4611
  updateBody() {
4611
4612
  var n;
@@ -4683,7 +4684,7 @@ const bt = class bt extends pr {
4683
4684
  margin: this.margin,
4684
4685
  radius: this.radius
4685
4686
  }
4686
- }), this.component.setAngle(et.DEFAULT);
4687
+ });
4687
4688
  }
4688
4689
  updateMap(t) {
4689
4690
  var n;
@@ -4701,9 +4702,13 @@ const bt = class bt extends pr {
4701
4702
  return bt.Z_INDEX_OFFSET;
4702
4703
  }
4703
4704
  setCollapsed(t) {
4704
- if (this.component == null) throw new Error("Failed to set tooltip collapsed");
4705
+ if (this.component == null) throw new Error("Failed to set popup collapsed");
4705
4706
  this.component.setCollapsed(t);
4706
4707
  }
4708
+ setAngle(t) {
4709
+ if (this.component == null) throw new Error("Failed to set popup angle");
4710
+ this.component.setAngle(t);
4711
+ }
4707
4712
  isExpanded() {
4708
4713
  return this.component == null ? !1 : this.component.getExpanded();
4709
4714
  }
@@ -4726,7 +4731,7 @@ class La {
4726
4731
  show(e) {
4727
4732
  e.pin.shown = !1, e.tooltip.shown = !1;
4728
4733
  const t = new rr(this.provider, e.marker);
4729
- this.popupElements.set(e.marker.id, t), t.create(), t.shown = !0;
4734
+ this.popupElements.set(e.marker.id, t), t.create(), t.setAngle(e.tooltip.angle), t.shown = !0;
4730
4735
  }
4731
4736
  hide(e) {
4732
4737
  e.pin.shown = !0, e.tooltip.shown = !0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arenarium/maps",
3
- "version": "1.0.138",
3
+ "version": "1.0.139",
4
4
  "license": "MIT",
5
5
  "author": "arenarium.dev",
6
6
  "description": "The best way to visualize ranked markers on a map.",