@fileverse-dev/ddoc 2.4.7 → 2.4.8

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 { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-DkDi9ljs.mjs";
1
+ import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-1uy_EVmy.mjs";
2
2
  class S extends p {
3
3
  constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
4
4
  var o;
@@ -89879,7 +89879,7 @@ async function Ak(e, t) {
89879
89879
  });
89880
89880
  return P === "0x" ? { data: void 0 } : { data: P };
89881
89881
  } catch (B) {
89882
- const j = IWt(B), { offchainLookup: N, offchainLookupSignature: L } = await import("./ccip-eDECzbfP.mjs");
89882
+ const j = IWt(B), { offchainLookup: N, offchainLookupSignature: L } = await import("./ccip-7m51wCPL.mjs");
89883
89883
  if (e.ccipRead !== !1 && (j == null ? void 0 : j.slice(0, 10)) === L && b)
89884
89884
  return { data: await N(e, { data: j, to: b }) };
89885
89885
  throw S && (j == null ? void 0 : j.slice(0, 10)) === "0x101bb98d" ? new UVt({ factory: c }) : cpe(B, {
@@ -153499,39 +153499,38 @@ const d9n = an.create({
153499
153499
  const a = i.target.files;
153500
153500
  if (!a || a.length === 0) return;
153501
153501
  const s = a[0];
153502
- if (s.type === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || s.name.endsWith(".docx")) {
153503
- const { showLoader: l, removeLoader: u } = J2(
153504
- this.editor,
153505
- "Importing DOCX file ..."
153506
- ), c = l();
153507
- try {
153508
- const d = await s.arrayBuffer(), { value: f } = await fa.convertToHtml(
153509
- { arrayBuffer: d },
153510
- {
153511
- convertImage: fa.images.inline(
153512
- async (h) => {
153513
- const p = await h.read("base64");
153514
- return {
153515
- src: `data:${h.contentType};base64,${p}`
153516
- };
153517
- }
153518
- )
153519
- }
153520
- );
153521
- await d2(
153522
- r,
153523
- f,
153524
- e
153525
- ), n == null || n();
153526
- } catch (d) {
153527
- console.error("Error importing DOCX file:", d);
153528
- } finally {
153529
- u(c);
153530
- }
153531
- } else
153532
- t == null || t(
153533
- "Oops! That file type isn’t supported. Give it another go with a .docx file."
153502
+ if (!(s.type === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || s.name.endsWith(".docx"))) {
153503
+ const f = "Oops! That file type isn’t supported. Please upload a .docx file.";
153504
+ throw t == null || t(f), new Error(f);
153505
+ }
153506
+ const { showLoader: u, removeLoader: c } = J2(
153507
+ this.editor,
153508
+ "Importing DOCX file ..."
153509
+ ), d = u();
153510
+ try {
153511
+ const f = await s.arrayBuffer(), { value: h } = await fa.convertToHtml(
153512
+ { arrayBuffer: f },
153513
+ {
153514
+ convertImage: fa.images.inline(
153515
+ async (p) => {
153516
+ const g = await p.read("base64");
153517
+ return {
153518
+ src: `data:${p.contentType};base64,${g}`
153519
+ };
153520
+ }
153521
+ )
153522
+ }
153534
153523
  );
153524
+ await d2(
153525
+ r,
153526
+ h,
153527
+ e
153528
+ ), n == null || n();
153529
+ } catch (f) {
153530
+ console.error(f), t == null || t("Error importing DOCX file");
153531
+ } finally {
153532
+ c(d);
153533
+ }
153535
153534
  }, o.click(), !0;
153536
153535
  }
153537
153536
  };
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-DkDi9ljs.mjs";
1
+ import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-1uy_EVmy.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as Editor,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "2.4.7",
5
+ "version": "2.4.8",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {