@fileverse-dev/ddoc 3.0.45-patch-16 → 3.0.45-patch-18
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-RuRmTsSo.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;
|
|
@@ -94001,7 +94001,7 @@ async function EC(e, t) {
|
|
|
94001
94001
|
});
|
|
94002
94002
|
return ie === "0x" ? { data: void 0 } : { data: ie };
|
|
94003
94003
|
} catch (B) {
|
|
94004
|
-
const I = SJt(B), { offchainLookup: U, offchainLookupSignature: $ } = await import("./ccip-
|
|
94004
|
+
const I = SJt(B), { offchainLookup: U, offchainLookupSignature: $ } = await import("./ccip-4DDgDYWr.mjs");
|
|
94005
94005
|
if (e.ccipRead !== !1 && (I == null ? void 0 : I.slice(0, 10)) === $ && x)
|
|
94006
94006
|
return { data: await U(e, { data: I, to: x }) };
|
|
94007
94007
|
throw _ && (I == null ? void 0 : I.slice(0, 10)) === "0x101bb98d" ? new lXt({ factory: f }) : y3e(B, {
|
|
@@ -251834,7 +251834,7 @@ const gk = (e = 32, t) => {
|
|
|
251834
251834
|
ydoc: e,
|
|
251835
251835
|
initialContent: t,
|
|
251836
251836
|
enableCollaboration: n,
|
|
251837
|
-
|
|
251837
|
+
isDDocOwner: r
|
|
251838
251838
|
}) => {
|
|
251839
251839
|
const [o, i] = Ne(""), [a, s] = Ne([]), l = (p) => {
|
|
251840
251840
|
if (!e) return;
|
|
@@ -251842,14 +251842,15 @@ const gk = (e = 32, t) => {
|
|
|
251842
251842
|
g.delete(0, g.length), g.insert(0, p), i(p);
|
|
251843
251843
|
};
|
|
251844
251844
|
Ie(() => {
|
|
251845
|
-
if (
|
|
251846
|
-
|
|
251847
|
-
|
|
251848
|
-
|
|
251849
|
-
|
|
251850
|
-
|
|
251851
|
-
|
|
251852
|
-
|
|
251845
|
+
if (e && (t || r && !n)) {
|
|
251846
|
+
console.log("deriving from state", t, r);
|
|
251847
|
+
const { tabList: p, activeTabId: g } = CIn(
|
|
251848
|
+
t,
|
|
251849
|
+
e
|
|
251850
|
+
);
|
|
251851
|
+
i(g), s(p);
|
|
251852
|
+
}
|
|
251853
|
+
}, [e, t, r, n]), Ie(() => {
|
|
251853
251854
|
if (!e) return;
|
|
251854
251855
|
const p = e.getMap("ddocTabs");
|
|
251855
251856
|
let g = p.get("order");
|
|
@@ -263018,7 +263019,7 @@ const jHn = (e) => e.context.awareness, LHn = (e) => !!(e.context.isReady && e.c
|
|
|
263018
263019
|
ydoc: I.ydoc,
|
|
263019
263020
|
initialContent: t,
|
|
263020
263021
|
enableCollaboration: n,
|
|
263021
|
-
|
|
263022
|
+
isDDocOwner: L.isDDocOwner || !1
|
|
263022
263023
|
}), $ = gIn({
|
|
263023
263024
|
ydoc: I.ydoc,
|
|
263024
263025
|
isPreviewMode: e,
|
package/dist/index.es.js
CHANGED
|
@@ -5,9 +5,9 @@ interface UseTabManagerArgs {
|
|
|
5
5
|
ydoc: Y.Doc;
|
|
6
6
|
initialContent: DdocProps['initialContent'];
|
|
7
7
|
enableCollaboration: DdocProps['enableCollaboration'];
|
|
8
|
-
|
|
8
|
+
isDDocOwner: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare const useTabManager: ({ ydoc, initialContent, enableCollaboration,
|
|
10
|
+
export declare const useTabManager: ({ ydoc, initialContent, enableCollaboration, isDDocOwner, }: UseTabManagerArgs) => {
|
|
11
11
|
tabs: Tab[];
|
|
12
12
|
activeTabId: string;
|
|
13
13
|
setTabs: import('react').Dispatch<import('react').SetStateAction<Tab[]>>;
|