@fileverse-dev/ddoc 2.4.15-patch-3 → 2.4.16-patch-1
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-
|
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-CDPJMA3f.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 Sk(e, t) {
|
|
89868
89868
|
});
|
89869
89869
|
return V === "0x" ? { data: void 0 } : { data: V };
|
89870
89870
|
} catch (B) {
|
89871
|
-
const L = OWt(B), { offchainLookup: j, offchainLookupSignature: N } = await import("./ccip-
|
89871
|
+
const L = OWt(B), { offchainLookup: j, offchainLookupSignature: N } = await import("./ccip-CCzKwLTp.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 qVt({ factory: c }) : cpe(B, {
|
@@ -256532,7 +256532,6 @@ const e_n = (e) => e.context.awareness, t_n = (e) => !!(e.context.isReady && e.c
|
|
256532
256532
|
const W = rt(null), ee = async () => {
|
256533
256533
|
const Ie = W.current;
|
256534
256534
|
if (Ie && await Ie.destroy(), d && c) {
|
256535
|
-
console.log("Initialising IndexedDB persistence for ddocId:", c);
|
256536
256535
|
const $e = new PMn(c, j);
|
256537
256536
|
W.current = $e;
|
256538
256537
|
}
|
@@ -256594,37 +256593,23 @@ const e_n = (e) => e.context.awareness, t_n = (e) => !!(e.context.isReady && e.c
|
|
256594
256593
|
window.removeEventListener("keydown", Ie);
|
256595
256594
|
};
|
256596
256595
|
}, [he, m]), He(() => {
|
256597
|
-
|
256598
|
-
|
256599
|
-
|
256600
|
-
|
256601
|
-
|
256602
|
-
|
256603
|
-
|
256604
|
-
|
256605
|
-
|
256606
|
-
|
256607
|
-
|
256608
|
-
|
256609
|
-
|
256610
|
-
|
256611
|
-
|
256612
|
-
|
256613
|
-
|
256614
|
-
ignoreCorruptedData: g,
|
256615
|
-
onInvalidContentError: p
|
256616
|
-
})
|
256617
|
-
));
|
256618
|
-
}
|
256619
|
-
h && BS.setZoom(h), ee().then(() => {
|
256620
|
-
console.log("Initial content set successfully"), M(!1);
|
256621
|
-
}).catch((Ie) => {
|
256622
|
-
console.log(Ie);
|
256623
|
-
});
|
256624
|
-
}), ye.current = !0) : t !== null && (console.log("Initial content already set"), M(!1));
|
256625
|
-
} catch (Ie) {
|
256626
|
-
console.log("Error in useDdocEditor useEffect:", Ie);
|
256627
|
-
}
|
256596
|
+
!ke(t) && he && !ye.current && j ? (M(!0), queueMicrotask(() => {
|
256597
|
+
t !== "" && (be(t) ? Array.isArray(t) ? de(t) : Kc(
|
256598
|
+
j,
|
256599
|
+
er(t),
|
256600
|
+
"self"
|
256601
|
+
) : he.commands.setContent(
|
256602
|
+
F9e({
|
256603
|
+
data: t,
|
256604
|
+
ignoreCorruptedData: g,
|
256605
|
+
onInvalidContentError: p
|
256606
|
+
})
|
256607
|
+
)), h && BS.setZoom(h), ee().then(() => {
|
256608
|
+
M(!1);
|
256609
|
+
}).catch((Ie) => {
|
256610
|
+
console.log(Ie);
|
256611
|
+
});
|
256612
|
+
}), ye.current = !0) : t !== null && M(!1);
|
256628
256613
|
}, [t, he, j]), He(() => (n && (P != null && P.collaborationId) && (P != null && P.roomKey) && N({
|
256629
256614
|
username: P == null ? void 0 : P.username,
|
256630
256615
|
roomKey: P == null ? void 0 : P.roomKey,
|
@@ -258869,7 +258854,7 @@ const ioe = Ne.memo(c7e), S_n = ({
|
|
258869
258854
|
return mn.addEventListener("keydown", Mn), () => {
|
258870
258855
|
mn.removeEventListener("keydown", Mn);
|
258871
258856
|
};
|
258872
|
-
}, [ve]),
|
258857
|
+
}, [ve]), He(() => {
|
258873
258858
|
if (!Be || !ve) return;
|
258874
258859
|
const Mn = () => {
|
258875
258860
|
ze.current && ze.current.scrollIntoView();
|
@@ -259457,14 +259442,15 @@ const ioe = Ne.memo(c7e), S_n = ({
|
|
259457
259442
|
), YIn = (e) => {
|
259458
259443
|
const t = () => {
|
259459
259444
|
const f = new Ou(), h = () => {
|
259445
|
+
var y;
|
259460
259446
|
const m = [];
|
259461
|
-
if (e != null &&
|
259462
|
-
const
|
259447
|
+
if ((y = e == null ? void 0 : e.optionalExtensions) != null && y.includes("comment")) {
|
259448
|
+
const b = D9e.configure({
|
259463
259449
|
HTMLAttributes: {
|
259464
259450
|
class: "inline-comment"
|
259465
259451
|
}
|
259466
259452
|
});
|
259467
|
-
m.push(
|
259453
|
+
m.push(b);
|
259468
259454
|
}
|
259469
259455
|
return m;
|
259470
259456
|
}, p = [
|
package/dist/index.es.js
CHANGED
@@ -4,7 +4,7 @@ import { IpfsImageUploadResponse } from '../types';
|
|
4
4
|
|
5
5
|
import * as Y from 'yjs';
|
6
6
|
export declare const useHeadlessEditor: (props?: {
|
7
|
-
|
7
|
+
optionalExtensions?: string[];
|
8
8
|
}) => {
|
9
9
|
setContent: (initialContent: string | string[] | JSONContent, editor: Editor, ydoc: Y.Doc) => void;
|
10
10
|
getEditor: () => {
|