@fileverse-dev/ddoc 2.4.8-patch-1 → 2.4.9

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-BhKDrm-K.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-BK1dRkFn.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;
@@ -89868,7 +89868,7 @@ async function Ak(e, t) {
89868
89868
  });
89869
89869
  return V === "0x" ? { data: void 0 } : { data: V };
89870
89870
  } catch (B) {
89871
- const L = IWt(B), { offchainLookup: j, offchainLookupSignature: N } = await import("./ccip-0IprHfBU.mjs");
89871
+ const L = IWt(B), { offchainLookup: j, offchainLookupSignature: N } = await import("./ccip-C-eFDb9l.mjs");
89872
89872
  if (e.ccipRead !== !1 && (L == null ? void 0 : L.slice(0, 10)) === N && b)
89873
89873
  return { data: await j(e, { data: L, to: b }) };
89874
89874
  throw S && (L == null ? void 0 : L.slice(0, 10)) === "0x101bb98d" ? new UVt({ factory: c }) : upe(B, {
@@ -110820,8 +110820,8 @@ const lin = (e, t) => lP(e) ? new sin(t) : new ain(t, {
110820
110820
  onHtmlExport: c,
110821
110821
  onTxtExport: d,
110822
110822
  ipfsImageFetchFn: p,
110823
- fetchV1ImageFn: g,
110824
- onDocxImport: f
110823
+ onDocxImport: f,
110824
+ fetchV1ImageFn: g
110825
110825
  }), C = gge(e), S = e ? C.currentSize : void 0, z = e ? C.onSetFontSize : () => {
110826
110826
  }, P = Qi("(max-width: 1480px)"), T = [
110827
110827
  { title: "Fit", value: "1.4" },
@@ -121394,23 +121394,19 @@ const acn = Yr.create({
121394
121394
  let h = !0, p = null;
121395
121395
  return f && (async () => {
121396
121396
  try {
121397
- if (!t.split("ipfs/")[1]) {
121398
- console.error("Invalid IPFS URL");
121399
- return;
121400
- }
121401
- const y = await l(t);
121402
- if (!y || !h) return;
121403
- const b = await Bfe({
121397
+ const m = await l(t);
121398
+ if (!m || !h) return;
121399
+ const y = await Bfe({
121404
121400
  encryptedKey: e,
121405
121401
  privateKey: VO(r),
121406
121402
  iv: n,
121407
- imageBuffer: y
121403
+ imageBuffer: m
121408
121404
  });
121409
- if (!h || !b) return;
121410
- const v = new Blob([b], {
121405
+ if (!h || !y) return;
121406
+ const b = new Blob([y], {
121411
121407
  type: "image/jpeg"
121412
121408
  });
121413
- p = URL.createObjectURL(v), h && d(p);
121409
+ p = URL.createObjectURL(b), h && d(p);
121414
121410
  } catch (m) {
121415
121411
  console.error("Error decrypting image:", m);
121416
121412
  }
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-BhKDrm-K.mjs";
1
+ import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-BK1dRkFn.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as Editor,
@@ -51,8 +51,8 @@ export declare const useEditorToolbar: ({ editor, onError, ipfsImageUploadFn, on
51
51
  url: string;
52
52
  file: File;
53
53
  }>;
54
- fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
55
54
  onDocxImport?: () => void;
55
+ fetchV1ImageFn?: (url: string) => Promise<ArrayBuffer | undefined>;
56
56
  }) => {
57
57
  undoRedoTools: (IEditorToolElement | null)[];
58
58
  toolbar: (IEditorToolElement | null)[];
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.8-patch-1",
5
+ "version": "2.4.9",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {