@fileverse-dev/ddoc 3.2.2-sg-2 → 3.2.2-sg-3
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.
- package/dist/index.es.js +28 -18
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -184065,37 +184065,47 @@ const CKe = { status: "idle" }, _Ke = (e) => {
|
|
|
184065
184065
|
onLocalUpdate: e,
|
|
184066
184066
|
ignoredOrigins: [d]
|
|
184067
184067
|
}), F = Te(async () => {
|
|
184068
|
-
const
|
|
184069
|
-
if (
|
|
184068
|
+
const k = d.current;
|
|
184069
|
+
if (k && await k.destroy(), t && n) {
|
|
184070
184070
|
a(!1);
|
|
184071
184071
|
try {
|
|
184072
|
-
const
|
|
184073
|
-
d.current =
|
|
184074
|
-
} catch (
|
|
184075
|
-
console.error("IndexedDB initialization failed:",
|
|
184076
|
-
|
|
184072
|
+
const E = new x$e(n, i);
|
|
184073
|
+
d.current = E, await E.whenSynced, a(!0);
|
|
184074
|
+
} catch (E) {
|
|
184075
|
+
console.error("IndexedDB initialization failed:", E), d.current = null, a(!0), o == null || o(
|
|
184076
|
+
E instanceof Error ? E : new Error(String(E))
|
|
184077
184077
|
);
|
|
184078
184078
|
}
|
|
184079
184079
|
} else
|
|
184080
184080
|
a(!0);
|
|
184081
184081
|
}, [t, n, i, o]), x = je(
|
|
184082
184082
|
null
|
|
184083
|
-
), D =
|
|
184084
|
-
|
|
184085
|
-
|
|
184083
|
+
), D = je(e);
|
|
184084
|
+
_e(() => {
|
|
184085
|
+
D.current = e;
|
|
184086
|
+
}, [e]);
|
|
184087
|
+
const w = Te(() => {
|
|
184088
|
+
var k;
|
|
184089
|
+
x.current && (clearTimeout(x.current), x.current = null), (k = D.current) == null || k.call(D, Xn(lo(i)), "");
|
|
184090
|
+
}, [i]);
|
|
184086
184091
|
return _e(() => {
|
|
184087
|
-
const
|
|
184088
|
-
if (
|
|
184092
|
+
const k = (E, A) => {
|
|
184093
|
+
if (A === "self" || A === d.current)
|
|
184089
184094
|
return;
|
|
184090
|
-
const
|
|
184095
|
+
const O = Xn(E);
|
|
184091
184096
|
x.current && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
184092
|
-
|
|
184097
|
+
var j;
|
|
184098
|
+
x.current = null, (j = D.current) == null || j.call(
|
|
184099
|
+
D,
|
|
184100
|
+
Xn(lo(i)),
|
|
184101
|
+
O
|
|
184102
|
+
);
|
|
184093
184103
|
}, 300);
|
|
184094
184104
|
};
|
|
184095
|
-
return i && i.on("update",
|
|
184096
|
-
i == null || i.off("update",
|
|
184105
|
+
return i && i.on("update", k), () => {
|
|
184106
|
+
i == null || i.off("update", k);
|
|
184097
184107
|
};
|
|
184098
|
-
}, [
|
|
184108
|
+
}, [i]), {
|
|
184099
184109
|
ydoc: i,
|
|
184100
184110
|
onConnect: p,
|
|
184101
184111
|
isReady: h,
|
|
@@ -184106,7 +184116,7 @@ const CKe = { status: "idle" }, _Ke = (e) => {
|
|
|
184106
184116
|
isIndexeddbSynced: s,
|
|
184107
184117
|
initialiseYjsIndexedDbProvider: F,
|
|
184108
184118
|
refreshYjsIndexedDbProvider: F,
|
|
184109
|
-
flushPendingUpdate:
|
|
184119
|
+
flushPendingUpdate: w,
|
|
184110
184120
|
collabState: y
|
|
184111
184121
|
};
|
|
184112
184122
|
}, Xee = ({
|