@fileverse-dev/dsheet 0.0.84 → 0.0.85
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 +38 -39
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -6905,31 +6905,30 @@ const aJ = (e, r, t, a) => {
|
|
|
6905
6905
|
};
|
|
6906
6906
|
return delete s.data, s;
|
|
6907
6907
|
}), iJ = (e, r, t, a, n, o = !1, i, s, u) => {
|
|
6908
|
-
const [l, c] = _t([]), [f, d] = _t(!1), h = Vt([]), p = Vt(!1), m = Vt(!1), v = Vt(!0), g = Vt(!1), y = Vt(null), b = Vt(!1)
|
|
6908
|
+
const [l, c] = _t([]), [f, d] = _t(!1), h = Vt([]), p = Vt(!1), m = Vt(!1), v = Vt(!0), g = Vt(!1), y = Vt(null), b = Vt(!1);
|
|
6909
6909
|
Jt(() => {
|
|
6910
6910
|
if (!(!(n != null && n.length) || !e.current || !r))
|
|
6911
6911
|
try {
|
|
6912
|
-
const
|
|
6913
|
-
V3(
|
|
6914
|
-
const
|
|
6915
|
-
if (Array.from(
|
|
6916
|
-
V3(
|
|
6917
|
-
const
|
|
6918
|
-
h.current =
|
|
6919
|
-
}
|
|
6920
|
-
|
|
6921
|
-
} catch (
|
|
6922
|
-
console.error("[DSheet] Error processing portal content:",
|
|
6912
|
+
const w = e.current, A = BY(n), S = new sf();
|
|
6913
|
+
V3(S, A);
|
|
6914
|
+
const x = S.getArray(r);
|
|
6915
|
+
if (Array.from(x).length > 0) {
|
|
6916
|
+
V3(w, A);
|
|
6917
|
+
const D = w.getArray(r), j = Array.from(D);
|
|
6918
|
+
h.current = j, m.current = !0, d(!0), b.current = !0, a && a((O) => O + 1);
|
|
6919
|
+
}
|
|
6920
|
+
S.destroy();
|
|
6921
|
+
} catch (w) {
|
|
6922
|
+
console.error("[DSheet] Error processing portal content:", w);
|
|
6923
6923
|
}
|
|
6924
6924
|
}, [n, r, e, o]), Jt(() => {
|
|
6925
6925
|
if (!(!u || !e.current || !r))
|
|
6926
6926
|
try {
|
|
6927
|
-
const
|
|
6928
|
-
|
|
6929
|
-
const N =
|
|
6927
|
+
const w = e.current.getArray(r), A = Array.from(w);
|
|
6928
|
+
A.length > 0 && u && A.forEach((S, x) => {
|
|
6929
|
+
const N = S.celldata;
|
|
6930
6930
|
N == null || N.forEach((D) => {
|
|
6931
|
-
|
|
6932
|
-
j && j.sheetId === x.id ? D.v && (D.v = {
|
|
6931
|
+
u[`${x}_${D.r}_${D.c}`] ? D.v && (D.v = {
|
|
6933
6932
|
...D.v,
|
|
6934
6933
|
ps: tJ
|
|
6935
6934
|
}) : D.v && (D.v = {
|
|
@@ -6937,46 +6936,46 @@ const aJ = (e, r, t, a) => {
|
|
|
6937
6936
|
ps: void 0
|
|
6938
6937
|
});
|
|
6939
6938
|
});
|
|
6940
|
-
})
|
|
6941
|
-
} catch (
|
|
6942
|
-
console.error("[DSheet] Error processing comment data:",
|
|
6939
|
+
});
|
|
6940
|
+
} catch (w) {
|
|
6941
|
+
console.error("[DSheet] Error processing comment data:", w);
|
|
6943
6942
|
}
|
|
6944
6943
|
}, [u, r, e, o, f]), Jt(() => {
|
|
6945
6944
|
!e.current || !r || s === "synced" && (() => {
|
|
6946
|
-
var
|
|
6945
|
+
var x, N;
|
|
6947
6946
|
if (m.current)
|
|
6948
6947
|
return;
|
|
6949
|
-
const
|
|
6950
|
-
if (
|
|
6948
|
+
const A = (x = e.current) == null ? void 0 : x.getArray(r), S = Array.from(A || []);
|
|
6949
|
+
if (S.length === 0)
|
|
6951
6950
|
if (o)
|
|
6952
6951
|
d(!0), b.current;
|
|
6953
6952
|
else {
|
|
6954
|
-
const
|
|
6955
|
-
(
|
|
6956
|
-
|
|
6957
|
-
}), h.current =
|
|
6953
|
+
const D = LE;
|
|
6954
|
+
(N = e.current) == null || N.transact(() => {
|
|
6955
|
+
A == null || A.delete(0, A.length), A == null || A.insert(0, D);
|
|
6956
|
+
}), h.current = D;
|
|
6958
6957
|
}
|
|
6959
6958
|
else
|
|
6960
|
-
h.current =
|
|
6959
|
+
h.current = S, a && a((D) => D + 1);
|
|
6961
6960
|
m.current = !0, d(!0);
|
|
6962
6961
|
})();
|
|
6963
6962
|
}, [r, o, s]), Jt(() => {
|
|
6964
6963
|
if (!e.current || !r) return;
|
|
6965
|
-
const
|
|
6964
|
+
const w = e.current.getArray(r), A = () => {
|
|
6966
6965
|
if (g.current)
|
|
6967
6966
|
return;
|
|
6968
6967
|
p.current = !0;
|
|
6969
|
-
const
|
|
6970
|
-
h.current =
|
|
6971
|
-
a && a((
|
|
6968
|
+
const S = Array.from(w);
|
|
6969
|
+
h.current = S, y.current !== null && window.clearTimeout(y.current), y.current = window.setTimeout(() => {
|
|
6970
|
+
a && a((x) => x + 1), y.current = null;
|
|
6972
6971
|
}, 50);
|
|
6973
6972
|
};
|
|
6974
|
-
return
|
|
6975
|
-
|
|
6973
|
+
return w.observe(A), () => {
|
|
6974
|
+
w.unobserve(A), y.current !== null && window.clearTimeout(y.current);
|
|
6976
6975
|
};
|
|
6977
6976
|
}, [e, r]);
|
|
6978
|
-
const
|
|
6979
|
-
(
|
|
6977
|
+
const F = Ut(
|
|
6978
|
+
(w) => {
|
|
6980
6979
|
if (v.current) {
|
|
6981
6980
|
v.current = !1;
|
|
6982
6981
|
return;
|
|
@@ -6985,9 +6984,9 @@ const aJ = (e, r, t, a) => {
|
|
|
6985
6984
|
p.current = !1;
|
|
6986
6985
|
return;
|
|
6987
6986
|
}
|
|
6988
|
-
g.current = !0, aJ(e.current, r,
|
|
6987
|
+
g.current = !0, aJ(e.current, r, w, t.current), setTimeout(() => {
|
|
6989
6988
|
g.current = !1;
|
|
6990
|
-
}, 50), i && i(
|
|
6989
|
+
}, 50), i && i(w);
|
|
6991
6990
|
},
|
|
6992
6991
|
[r, i]
|
|
6993
6992
|
);
|
|
@@ -6997,7 +6996,7 @@ const aJ = (e, r, t, a) => {
|
|
|
6997
6996
|
currentDataRef: h,
|
|
6998
6997
|
remoteUpdateRef: p,
|
|
6999
6998
|
isDataLoaded: f,
|
|
7000
|
-
handleChange:
|
|
6999
|
+
handleChange: F
|
|
7001
7000
|
};
|
|
7002
7001
|
}, oJ = 1200, lJ = 2500, tg = 3e4, Eb = (e) => {
|
|
7003
7002
|
if (e.shouldConnect && e.ws === null) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fileverse-dev/dsheet",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "DSheet",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.85",
|
|
6
6
|
"main": "dist/index.es.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
8
8
|
"exports": {
|
|
@@ -82,4 +82,4 @@
|
|
|
82
82
|
"typescript": "^5.2.2",
|
|
83
83
|
"vite": "^5.0.0"
|
|
84
84
|
}
|
|
85
|
-
}
|
|
85
|
+
}
|