@idmwx/idmui-gl4 3.7.5 → 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.
@@ -1,4 +1,4 @@
1
- import { l as b } from "./index-9319953f.js";
1
+ import { l as b } from "./index-d36f23b5.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-ae45db39.js";
1
+ import { W as a } from "./chunk-3VYIPD3A-8275a877.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-ae45db39.js";
1
+ import { W as m } from "./chunk-3VYIPD3A-8275a877.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-b51ecbd6.js";
2
- import { W as f } from "./chunk-3VYIPD3A-ae45db39.js";
3
- import "./index-9319953f.js";
1
+ import { m as d } from "./chunk-T4JIPPZO-67bd3b89.js";
2
+ import { W as f } from "./chunk-3VYIPD3A-8275a877.js";
3
+ import "./index-d36f23b5.js";
4
4
  import "axios";
5
5
  import "vuetify";
6
6
  import "vue";
@@ -17759,52 +17759,52 @@ Te.capture = async (t, e, a) => {
17759
17759
  if (a !== tl)
17760
17760
  throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");
17761
17761
  let i = await el(t, e), o = { img: async (u, h) => {
17762
- let { toImg: y } = await import("./toImg-bcd0acf2.js");
17762
+ let { toImg: y } = await import("./toImg-aa724041.js");
17763
17763
  return y(i, { ...u, ...h || {} });
17764
17764
  }, svg: async (u, h) => {
17765
- let { toSvg: y } = await import("./toImg-bcd0acf2.js");
17765
+ let { toSvg: y } = await import("./toImg-aa724041.js");
17766
17766
  return y(i, { ...u, ...h || {} });
17767
17767
  }, canvas: async (u, h) => {
17768
- let { toCanvas: y } = await import("./toCanvas-56f64d35.js");
17768
+ let { toCanvas: y } = await import("./toCanvas-a290400a.js");
17769
17769
  return y(i, { ...u, ...h || {} });
17770
17770
  }, blob: async (u, h) => {
17771
- let { toBlob: y } = await import("./toBlob-4263abe6.js");
17771
+ let { toBlob: y } = await import("./toBlob-dab754f2.js");
17772
17772
  return y(i, { ...u, ...h || {} });
17773
17773
  }, png: async (u, h) => {
17774
- let { rasterize: y } = await import("./rasterize-JS5G2XHH-05ddc8fb.js");
17774
+ let { rasterize: y } = await import("./rasterize-JS5G2XHH-1a6b71c8.js");
17775
17775
  return y(i, { ...u, ...h || {}, format: "png" });
17776
17776
  }, jpeg: async (u, h) => {
17777
- let { rasterize: y } = await import("./rasterize-JS5G2XHH-05ddc8fb.js");
17777
+ let { rasterize: y } = await import("./rasterize-JS5G2XHH-1a6b71c8.js");
17778
17778
  return y(i, { ...u, ...h || {}, format: "jpeg" });
17779
17779
  }, webp: async (u, h) => {
17780
- let { rasterize: y } = await import("./rasterize-JS5G2XHH-05ddc8fb.js");
17780
+ let { rasterize: y } = await import("./rasterize-JS5G2XHH-1a6b71c8.js");
17781
17781
  return y(i, { ...u, ...h || {}, format: "webp" });
17782
17782
  }, download: async (u, h) => {
17783
- let { download: y } = await import("./download-1e5db1aa.js");
17783
+ let { download: y } = await import("./download-1994fe4e.js");
17784
17784
  return y(i, { ...u, ...h || {} });
17785
17785
  } }, r = { ...e, export: { url: i }, exports: { svg: async (u) => {
17786
- let { toSvg: h } = await import("./toImg-bcd0acf2.js");
17786
+ let { toSvg: h } = await import("./toImg-aa724041.js");
17787
17787
  return h(i, { ...e, ...u || {}, [da]: !0 });
17788
17788
  }, canvas: async (u) => {
17789
- let { toCanvas: h } = await import("./toCanvas-56f64d35.js");
17789
+ let { toCanvas: h } = await import("./toCanvas-a290400a.js");
17790
17790
  return h(i, { ...e, ...u || {}, [da]: !0 });
17791
17791
  }, png: async (u) => {
17792
- let { rasterize: h } = await import("./rasterize-JS5G2XHH-05ddc8fb.js");
17792
+ let { rasterize: h } = await import("./rasterize-JS5G2XHH-1a6b71c8.js");
17793
17793
  return h(i, { ...e, ...u || {}, format: "png", [da]: !0 });
17794
17794
  }, jpeg: async (u) => {
17795
- let { rasterize: h } = await import("./rasterize-JS5G2XHH-05ddc8fb.js");
17795
+ let { rasterize: h } = await import("./rasterize-JS5G2XHH-1a6b71c8.js");
17796
17796
  return h(i, { ...e, ...u || {}, format: "jpeg", [da]: !0 });
17797
17797
  }, jpg: async (u) => {
17798
- let { rasterize: h } = await import("./rasterize-JS5G2XHH-05ddc8fb.js");
17798
+ let { rasterize: h } = await import("./rasterize-JS5G2XHH-1a6b71c8.js");
17799
17799
  return h(i, { ...e, ...u || {}, format: "jpeg", [da]: !0 });
17800
17800
  }, webp: async (u) => {
17801
- let { rasterize: h } = await import("./rasterize-JS5G2XHH-05ddc8fb.js");
17801
+ let { rasterize: h } = await import("./rasterize-JS5G2XHH-1a6b71c8.js");
17802
17802
  return h(i, { ...e, ...u || {}, format: "webp", [da]: !0 });
17803
17803
  }, blob: async (u) => {
17804
- let { toBlob: h } = await import("./toBlob-4263abe6.js");
17804
+ let { toBlob: h } = await import("./toBlob-dab754f2.js");
17805
17805
  return h(i, { ...e, ...u || {}, [da]: !0 });
17806
17806
  }, img: async (u) => {
17807
- let { toImg: h } = await import("./toImg-bcd0acf2.js");
17807
+ let { toImg: h } = await import("./toImg-aa724041.js");
17808
17808
  return h(i, { ...e, ...u || {}, [da]: !0 });
17809
17809
  } } }, l = await qf("defineExports", r), s = Object.assign({}, ...l.filter((u) => u && typeof u == "object")), c = { ...o, ...s };
17810
17810
  c.jpeg && !c.jpg && (c.jpg = (u, h) => c.jpeg(u, h));
@@ -18206,6 +18206,10 @@ const Py = {
18206
18206
  token: {
18207
18207
  type: String,
18208
18208
  default: ""
18209
+ },
18210
+ uploadEnabled: {
18211
+ type: Boolean,
18212
+ default: !1
18209
18213
  }
18210
18214
  },
18211
18215
  emits: ["closeRecord", "preview", "frameCount"],
@@ -18258,7 +18262,7 @@ const Py = {
18258
18262
  },
18259
18263
  actionStatus: {
18260
18264
  handler(t) {
18261
- this.actionStatus === 4 && this.startRecord(), this.actionStatus === 5 && this.recorder && this.createExports(), this.actionStatus === 6 && this.handleUpload(), this.actionStatus === 7 && this.$emit("preview", this.gifUrl, this.mp4Url);
18265
+ this.actionStatus === 4 && this.startRecord(), this.actionStatus === 5 && this.recorder && this.createExports(), this.actionStatus === 6 && (this.uploadEnabled ? this.uploadRecordings() : this.saveToLocal()), this.actionStatus === 7 && this.$emit("preview", this.gifUrl, this.mp4Url);
18262
18266
  }
18263
18267
  }
18264
18268
  },
@@ -18343,7 +18347,7 @@ const Py = {
18343
18347
  var t;
18344
18348
  clearTimeout(this.generationTimer), this.generationTimer = null, this.generating = !1, this.exportErrors = [], this.actionStatus = 0, this.frameCount = 0, this.gifBlob = null, this.mp4Blob = null, this.gifUrl = "", this.mp4Url = "", this.recorder && ((t = this.recorder) == null || t.reset(), this.recorder = null), this.$emit("closeRecord"), console.log("[BottomBar] 关闭录制功能,清空数据");
18345
18349
  },
18346
- async handleUpload() {
18350
+ async uploadRecordings() {
18347
18351
  console.log("[BottomBar] 开始上传");
18348
18352
  const t = [];
18349
18353
  if (this.gifBlob && t.push({
@@ -18372,6 +18376,13 @@ const Py = {
18372
18376
  console.error("[BottomBar] 上传失败:", a);
18373
18377
  }
18374
18378
  },
18379
+ // 不上传 OSS,直接将生成的文件保存到本地,并用本地对象地址走预览流程
18380
+ saveToLocal() {
18381
+ var e, a;
18382
+ console.log("[BottomBar] 不上传,保存到本地");
18383
+ const t = T().format("yyyyMMDD-HHmm");
18384
+ this.gifBlob && ((e = this.recorder) == null || e.downloadGif(this.gifBlob, `ORM-Record-${t}.gif`), this.gifUrl = URL.createObjectURL(this.gifBlob)), this.mp4Blob && ((a = this.recorder) == null || a.downloadMp4(this.mp4Blob, `ORM-Record-${t}.mp4`), this.mp4Url = URL.createObjectURL(this.mp4Blob)), this.actionStatus = 7;
18385
+ },
18375
18386
  handleDownloadGif() {
18376
18387
  const e = `ORM-Record-${T().format("yyyyMMDD-HHmm")}.gif`;
18377
18388
  this.recorder.downloadGif(this.gifBlob, e);
@@ -18470,7 +18481,7 @@ function jy(t, e, a, i, o, r) {
18470
18481
  ], 6)) : I("", !0)
18471
18482
  ], 32);
18472
18483
  }
18473
- const Ny = /* @__PURE__ */ le(Py, [["render", jy], ["__scopeId", "data-v-b24c44b4"]]);
18484
+ const Ny = /* @__PURE__ */ le(Py, [["render", jy], ["__scopeId", "data-v-0dbcd296"]]);
18474
18485
  const Wy = {
18475
18486
  name: "IdmBottomBar",
18476
18487
  components: { DateTimePicker: ao, IdmCapture: Ny },
@@ -20294,10 +20305,7 @@ function z1(t, e, a, i, o, r) {
20294
20305
  "assist-gateway": o.assistGateway,
20295
20306
  "forecast-model": a.forecastModel,
20296
20307
  "map-feather": a.mapFeather
20297
- }, t.$attrs, {
20298
- onOtherCheckList: r.handleChangeOtherChecklist,
20299
- onMapFeather: e[0] || (e[0] = (h) => t.$emit("mapFeather", h))
20300
- }), null, 16, ["simple", "token", "default-meteo-token", "map", "gateway", "assist-gateway", "forecast-model", "map-feather", "onOtherCheckList"]),
20308
+ }, t.$attrs, { onOtherCheckList: r.handleChangeOtherChecklist }), null, 16, ["simple", "token", "default-meteo-token", "map", "gateway", "assist-gateway", "forecast-model", "map-feather", "onOtherCheckList"]),
20301
20309
  w(s, V({
20302
20310
  ref: "idmWeatherLayers",
20303
20311
  simple: a.simple,
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-9319953f.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-d36f23b5.js";
2
2
  import "axios";
3
3
  import "vuetify";
4
4
  import "vue";