@idmwx/idmui-gl4 3.8.1 → 3.8.3

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,4 +1,4 @@
1
- import { l as b } from "./index-28a4f6f9.js";
1
+ import { l as b } from "./index-0f297b00.js";
2
2
  function M(e) {
3
3
  return typeof e == "string" && /^data:image\/svg\+xml/i.test(e);
4
4
  }
@@ -1,4 +1,4 @@
1
- import { W as a } from "./chunk-3VYIPD3A-7c3245c9.js";
1
+ import { W as a } from "./chunk-3VYIPD3A-03109a46.js";
2
2
  async function o(r, t) {
3
3
  let i = await a(r, t), e = new Image();
4
4
  return e.src = i.toDataURL(`image/${t.format}`, t.quality), await e.decode(), e.style.width = `${i.width / t.dpr}px`, e.style.height = `${i.height / t.dpr}px`, e;
@@ -1,4 +1,4 @@
1
- import { W as m } from "./chunk-3VYIPD3A-7c3245c9.js";
1
+ import { W as m } from "./chunk-3VYIPD3A-03109a46.js";
2
2
  async function a(n, e) {
3
3
  let o = e.type;
4
4
  if (o === "svg") {
@@ -1,6 +1,6 @@
1
- import { m as d } from "./chunk-T4JIPPZO-4cdcfb4a.js";
2
- import { W as f } from "./chunk-3VYIPD3A-7c3245c9.js";
3
- import "./index-28a4f6f9.js";
1
+ import { m as d } from "./chunk-T4JIPPZO-bfa83c91.js";
2
+ import { W as f } from "./chunk-3VYIPD3A-03109a46.js";
3
+ import "./index-0f297b00.js";
4
4
  import "axios";
5
5
  import "vuetify";
6
6
  import "vue";
@@ -3274,6 +3274,9 @@ const dc = {
3274
3274
  },
3275
3275
  platform: {
3276
3276
  type: String
3277
+ },
3278
+ mapFeather: {
3279
+ type: String
3277
3280
  }
3278
3281
  },
3279
3282
  emits: ["map", "other", "menuToggle", "mapFeather", "theme", "followLayerList", "otherCheckList"],
@@ -3281,20 +3284,20 @@ const dc = {
3281
3284
  return {
3282
3285
  right: 10,
3283
3286
  toggle: !1,
3284
- mapFeather: localStorage.getItem("mapFeathersCacheGL4") || "dark",
3287
+ mapboxFeather: void 0,
3285
3288
  tagLayers: [...qa.OTHER_LAYERS.filter((t) => t.enabled)],
3286
3289
  layerWeight: 0,
3287
3290
  otherLayers: {},
3288
3291
  activeOtherLayers: [],
3289
3292
  cache: {
3290
- v: "0.0.3",
3293
+ v: "0.0.2",
3291
3294
  versionKey: "otherLayerCacheVersionGL4",
3292
3295
  checkListKey: "otherChecklistCacheGL4",
3293
3296
  followListKey: "otherFollowListCacheGL4",
3294
3297
  mapFeatherKey: "mapFeathersCacheGL4",
3295
3298
  nauticalKey: "nauticalLayerCacheGL4"
3296
3299
  },
3297
- mapFeathers: [
3300
+ featherOptions: [
3298
3301
  { name: "Light Map", value: "light", locale: "lightMap" },
3299
3302
  { name: "Dark Map", value: "dark", locale: "darkMap" },
3300
3303
  { name: "Satelite Map", value: "satellite", locale: "satelliteMap", hide: this.platform === "ops", replace: "dark" },
@@ -3325,16 +3328,22 @@ const dc = {
3325
3328
  },
3326
3329
  theme: {
3327
3330
  handler() {
3328
- this.theme === "light" ? this.mapFeather = ["light", "nautical"].includes(this.mapFeather) ? this.mapFeather : "light" : this.theme === "dark" && (this.mapFeather = ["dark", "satellite"].includes(this.mapFeather) ? this.mapFeather : "dark");
3331
+ this.theme === "light" ? this.mapboxFeather = ["light", "nautical"].includes(this.mapboxFeather) ? this.mapboxFeather : "light" : this.theme === "dark" && (this.mapboxFeather = ["dark", "satellite"].includes(this.mapboxFeather) ? this.mapboxFeather : "dark");
3329
3332
  }
3330
3333
  // immediate: true,
3331
3334
  },
3332
3335
  mapFeather: {
3333
3336
  handler() {
3334
- localStorage.setItem(this.cache.mapFeatherKey, this.mapFeather), this.$emit("mapFeather", this.mapFeather), this.$emit("theme", ["light", "nautical"].includes(this.mapFeather) ? "light" : "dark");
3337
+ this.mapFeather && (this.mapboxFeather = this.mapFeather);
3335
3338
  },
3336
3339
  immediate: !0
3337
3340
  },
3341
+ mapboxFeather: {
3342
+ handler() {
3343
+ localStorage.setItem(this.cache.mapFeatherKey, this.mapboxFeather), this.$emit("mapFeather", this.mapboxFeather), this.$emit("theme", ["light", "nautical"].includes(this.mapboxFeather) ? "light" : "dark");
3344
+ }
3345
+ // immediate: true
3346
+ },
3338
3347
  checkList: {
3339
3348
  handler(t, e) {
3340
3349
  localStorage.setItem(this.cache.checkListKey, JSON.stringify(this.checkList)), this.activeOtherLayers = this.tagLayers.filter((r) => this.checkList.includes(r.key)) || [];
@@ -3359,14 +3368,14 @@ const dc = {
3359
3368
  this.cache.v !== t && (localStorage.removeItem(this.cache.checkListKey), localStorage.removeItem(this.cache.followListKey), localStorage.removeItem(this.cache.mapFeatherKey), localStorage.removeItem(this.cache.nauticalKey), localStorage.setItem(this.cache.versionKey, this.cache.v));
3360
3369
  let e = localStorage.getItem(this.cache.checkListKey);
3361
3370
  this.checkList = JSON.parse(e || '["eca-zones"]'), localStorage.setItem(this.cache.checkListKey, JSON.stringify(this.checkList)), e = localStorage.getItem(this.cache.mapFeatherKey);
3362
- const a = this.mapFeathers.some((o) => o.value === e && !o.hide) ? e : ((i = this.mapFeathers.find((o) => o.value === e)) == null ? void 0 : i.replace) || "dark";
3371
+ const a = this.featherOptions.some((o) => o.value === e && !o.hide) ? e : ((i = this.featherOptions.find((o) => o.value === e)) == null ? void 0 : i.replace) || "dark";
3363
3372
  this.$emit("mapFeather", a), localStorage.setItem(this.cache.mapFeatherKey, a);
3364
3373
  },
3365
3374
  handleMenuToggle() {
3366
3375
  this.$emit("menuToggle", "otherLayers");
3367
3376
  },
3368
3377
  handleToggleMapFeather(t) {
3369
- this.mapFeather = t.value;
3378
+ this.mapboxFeather = t.value;
3370
3379
  },
3371
3380
  async fetchOtherLayers() {
3372
3381
  var e, a;
@@ -3493,7 +3502,7 @@ function Ac(t, e, a, i, o, r) {
3493
3502
  default: x(() => [
3494
3503
  w(c, { class: "text-h6" }, {
3495
3504
  default: x(() => [
3496
- N(b(t.$t("layer.mapFeathers")), 1)
3505
+ N(b(t.$t("layer.featherOptions")), 1)
3497
3506
  ]),
3498
3507
  _: 1
3499
3508
  })
@@ -3505,13 +3514,13 @@ function Ac(t, e, a, i, o, r) {
3505
3514
  var ae;
3506
3515
  return [
3507
3516
  n("div", gc, [
3508
- (v(!0), D(Me, null, Se((ae = o.mapFeathers) == null ? void 0 : ae.filter((ce) => !ce.hide), (ce) => (v(), D("div", {
3517
+ (v(!0), D(Me, null, Se((ae = o.featherOptions) == null ? void 0 : ae.filter((ce) => !ce.hide), (ce) => (v(), D("div", {
3509
3518
  key: ce.value,
3510
3519
  class: "mb-4 feather-item",
3511
3520
  onClick: (Ae) => r.handleToggleMapFeather(ce)
3512
3521
  }, [
3513
3522
  n("div", {
3514
- class: ye([o.mapFeather === ce.value ? "active" : "", "img-box"])
3523
+ class: ye([o.mapboxFeather === ce.value ? "active" : "", "img-box"])
3515
3524
  }, [
3516
3525
  ce.value === "dark" ? (v(), D("img", yc)) : ce.value === "nautical" ? (v(), D("img", bc)) : ce.value === "satellite" ? (v(), D("img", wc)) : (v(), D("img", xc))
3517
3526
  ], 2),
@@ -5993,6 +6002,12 @@ const qc = /* @__PURE__ */ ne(Kc, [["render", Qc]]), $c = {
5993
6002
  },
5994
6003
  theme: {
5995
6004
  type: String
6005
+ },
6006
+ hasRampLayer: {
6007
+ type: Boolean
6008
+ },
6009
+ nautical: {
6010
+ type: String
5996
6011
  }
5997
6012
  },
5998
6013
  data() {
@@ -6004,6 +6019,11 @@ const qc = /* @__PURE__ */ ne(Kc, [["render", Qc]]), $c = {
6004
6019
  empty: W.featureCollection([])
6005
6020
  };
6006
6021
  },
6022
+ computed: {
6023
+ opacity() {
6024
+ return (this.theme === "light" || this.nautical === "hi" || this.nautical === "i4") && !this.hasRampLayer ? 1 : 0.3;
6025
+ }
6026
+ },
6007
6027
  watch: {
6008
6028
  "prmsl.version": {
6009
6029
  handler() {
@@ -6011,6 +6031,12 @@ const qc = /* @__PURE__ */ ne(Kc, [["render", Qc]]), $c = {
6011
6031
  (t = this.prmsl) != null && t.active ? this.handleRender() : this.handleClear();
6012
6032
  },
6013
6033
  immediate: !0
6034
+ },
6035
+ opacity: {
6036
+ handler() {
6037
+ var t;
6038
+ (t = this.prmsl) != null && t.active && (this.handleClear(), this.handleRender());
6039
+ }
6014
6040
  }
6015
6041
  },
6016
6042
  methods: {
@@ -6038,7 +6064,7 @@ const qc = /* @__PURE__ */ ne(Kc, [["render", Qc]]), $c = {
6038
6064
  "rgba(199,171,250,1)"
6039
6065
  ],
6040
6066
  "line-width": 1,
6041
- "line-opacity": this.theme === "light" ? 1 : 0.3
6067
+ "line-opacity": this.opacity
6042
6068
  }
6043
6069
  },
6044
6070
  this.beforeLayer
@@ -17777,52 +17803,52 @@ Te.capture = async (t, e, a) => {
17777
17803
  if (a !== tl)
17778
17804
  throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");
17779
17805
  let i = await el(t, e), o = { img: async (u, h) => {
17780
- let { toImg: y } = await import("./toImg-d29e4678.js");
17806
+ let { toImg: y } = await import("./toImg-1ebb6a86.js");
17781
17807
  return y(i, { ...u, ...h || {} });
17782
17808
  }, svg: async (u, h) => {
17783
- let { toSvg: y } = await import("./toImg-d29e4678.js");
17809
+ let { toSvg: y } = await import("./toImg-1ebb6a86.js");
17784
17810
  return y(i, { ...u, ...h || {} });
17785
17811
  }, canvas: async (u, h) => {
17786
- let { toCanvas: y } = await import("./toCanvas-5845fed6.js");
17812
+ let { toCanvas: y } = await import("./toCanvas-017719bc.js");
17787
17813
  return y(i, { ...u, ...h || {} });
17788
17814
  }, blob: async (u, h) => {
17789
- let { toBlob: y } = await import("./toBlob-09130b9b.js");
17815
+ let { toBlob: y } = await import("./toBlob-fed1c14a.js");
17790
17816
  return y(i, { ...u, ...h || {} });
17791
17817
  }, png: async (u, h) => {
17792
- let { rasterize: y } = await import("./rasterize-JS5G2XHH-c48564a9.js");
17818
+ let { rasterize: y } = await import("./rasterize-JS5G2XHH-6f31de44.js");
17793
17819
  return y(i, { ...u, ...h || {}, format: "png" });
17794
17820
  }, jpeg: async (u, h) => {
17795
- let { rasterize: y } = await import("./rasterize-JS5G2XHH-c48564a9.js");
17821
+ let { rasterize: y } = await import("./rasterize-JS5G2XHH-6f31de44.js");
17796
17822
  return y(i, { ...u, ...h || {}, format: "jpeg" });
17797
17823
  }, webp: async (u, h) => {
17798
- let { rasterize: y } = await import("./rasterize-JS5G2XHH-c48564a9.js");
17824
+ let { rasterize: y } = await import("./rasterize-JS5G2XHH-6f31de44.js");
17799
17825
  return y(i, { ...u, ...h || {}, format: "webp" });
17800
17826
  }, download: async (u, h) => {
17801
- let { download: y } = await import("./download-87732143.js");
17827
+ let { download: y } = await import("./download-f1f9b65a.js");
17802
17828
  return y(i, { ...u, ...h || {} });
17803
17829
  } }, r = { ...e, export: { url: i }, exports: { svg: async (u) => {
17804
- let { toSvg: h } = await import("./toImg-d29e4678.js");
17830
+ let { toSvg: h } = await import("./toImg-1ebb6a86.js");
17805
17831
  return h(i, { ...e, ...u || {}, [da]: !0 });
17806
17832
  }, canvas: async (u) => {
17807
- let { toCanvas: h } = await import("./toCanvas-5845fed6.js");
17833
+ let { toCanvas: h } = await import("./toCanvas-017719bc.js");
17808
17834
  return h(i, { ...e, ...u || {}, [da]: !0 });
17809
17835
  }, png: async (u) => {
17810
- let { rasterize: h } = await import("./rasterize-JS5G2XHH-c48564a9.js");
17836
+ let { rasterize: h } = await import("./rasterize-JS5G2XHH-6f31de44.js");
17811
17837
  return h(i, { ...e, ...u || {}, format: "png", [da]: !0 });
17812
17838
  }, jpeg: async (u) => {
17813
- let { rasterize: h } = await import("./rasterize-JS5G2XHH-c48564a9.js");
17839
+ let { rasterize: h } = await import("./rasterize-JS5G2XHH-6f31de44.js");
17814
17840
  return h(i, { ...e, ...u || {}, format: "jpeg", [da]: !0 });
17815
17841
  }, jpg: async (u) => {
17816
- let { rasterize: h } = await import("./rasterize-JS5G2XHH-c48564a9.js");
17842
+ let { rasterize: h } = await import("./rasterize-JS5G2XHH-6f31de44.js");
17817
17843
  return h(i, { ...e, ...u || {}, format: "jpeg", [da]: !0 });
17818
17844
  }, webp: async (u) => {
17819
- let { rasterize: h } = await import("./rasterize-JS5G2XHH-c48564a9.js");
17845
+ let { rasterize: h } = await import("./rasterize-JS5G2XHH-6f31de44.js");
17820
17846
  return h(i, { ...e, ...u || {}, format: "webp", [da]: !0 });
17821
17847
  }, blob: async (u) => {
17822
- let { toBlob: h } = await import("./toBlob-09130b9b.js");
17848
+ let { toBlob: h } = await import("./toBlob-fed1c14a.js");
17823
17849
  return h(i, { ...e, ...u || {}, [da]: !0 });
17824
17850
  }, img: async (u) => {
17825
- let { toImg: h } = await import("./toImg-d29e4678.js");
17851
+ let { toImg: h } = await import("./toImg-1ebb6a86.js");
17826
17852
  return h(i, { ...e, ...u || {}, [da]: !0 });
17827
17853
  } } }, l = await qf("defineExports", r), s = Object.assign({}, ...l.filter((u) => u && typeof u == "object")), c = { ...o, ...s };
17828
17854
  c.jpeg && !c.jpg && (c.jpg = (u, h) => c.jpeg(u, h));
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as g, c as n, D as x, L as D, a as T, b as W, M as h, f, e as k, P as y, S as B, T as V, V as d, W as u, d as v } from "./index-28a4f6f9.js";
1
+ import { B as g, c as n, D as x, L as D, a as T, b as W, M as h, f, e as k, P as y, S as B, T as V, V as d, W as u, d as v } from "./index-0f297b00.js";
2
2
  import "axios";
3
3
  import "vuetify";
4
4
  import "vue";