@idmwx/idmui-gl4 3.7.6 → 3.7.7

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.
@@ -0,0 +1,20 @@
1
+ import { W as g } from "./chunk-3VYIPD3A-8275a877.js";
2
+ import "./index-d36f23b5.js";
3
+ import "axios";
4
+ import "vuetify";
5
+ import "vue";
6
+ import "mapbox-gl";
7
+ import "moment";
8
+ import "@idm-plugin/geo";
9
+ import "@idm-plugin/meteo";
10
+ import "echarts";
11
+ import "@turf/turf";
12
+ import "@idm-plugin/tag2";
13
+ import "@mapbox/sphericalmercator";
14
+ import "@idm-plugin/tag";
15
+ import "shpjs";
16
+ import "gif.js";
17
+ import "@idm-plugin/aliclient";
18
+ export {
19
+ g as toCanvas
20
+ };
@@ -0,0 +1,46 @@
1
+ import { d as u } from "./chunk-ANSXOGKI-395d046a.js";
2
+ import { l as g } from "./index-d36f23b5.js";
3
+ import "./chunk-3VYIPD3A-8275a877.js";
4
+ import "axios";
5
+ import "vuetify";
6
+ import "vue";
7
+ import "mapbox-gl";
8
+ import "moment";
9
+ import "@idm-plugin/geo";
10
+ import "@idm-plugin/meteo";
11
+ import "echarts";
12
+ import "@turf/turf";
13
+ import "@idm-plugin/tag2";
14
+ import "@mapbox/sphericalmercator";
15
+ import "@idm-plugin/tag";
16
+ import "shpjs";
17
+ import "gif.js";
18
+ import "@idm-plugin/aliclient";
19
+ async function S(i, l) {
20
+ let { scale: m = 1, width: o, height: p, meta: e = {} } = l, s = Number.isFinite(o), n = Number.isFinite(p), d = Number.isFinite(m) && m !== 1 || s || n;
21
+ if (g() && d)
22
+ return await u(i, { ...l, format: "png", quality: 1, meta: e });
23
+ let t = new Image();
24
+ if (t.decoding = "sync", t.loading = "eager", t.src = i, await t.decode(), s && n)
25
+ t.style.width = `${o}px`, t.style.height = `${p}px`;
26
+ else if (s) {
27
+ let r = Number.isFinite(e.w0) ? e.w0 : t.naturalWidth, a = Number.isFinite(e.h0) ? e.h0 : t.naturalHeight, h = o / Math.max(1, r);
28
+ t.style.width = `${o}px`, t.style.height = `${Math.round(a * h)}px`;
29
+ } else if (n) {
30
+ let r = Number.isFinite(e.w0) ? e.w0 : t.naturalWidth, a = Number.isFinite(e.h0) ? e.h0 : t.naturalHeight, h = p / Math.max(1, a);
31
+ t.style.height = `${p}px`, t.style.width = `${Math.round(r * h)}px`;
32
+ } else {
33
+ let r = Math.round(t.naturalWidth * m), a = Math.round(t.naturalHeight * m);
34
+ if (t.style.width = `${r}px`, t.style.height = `${a}px`, typeof i == "string" && i.startsWith("data:image/svg+xml"))
35
+ try {
36
+ let h = decodeURIComponent(i.split(",")[1]).replace(/width="[^"]*"/, `width="${r}"`).replace(/height="[^"]*"/, `height="${a}"`);
37
+ i = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(h)}`, t.src = i;
38
+ } catch {
39
+ }
40
+ }
41
+ return t;
42
+ }
43
+ export {
44
+ S as toImg,
45
+ S as toSvg
46
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idmwx/idmui-gl4",
3
3
  "private": false,
4
- "version": "3.7.6",
4
+ "version": "3.7.7",
5
5
  "description": "idm webgl4",
6
6
  "type": "module",
7
7
  "keywords": [