@fileverse-dev/dsheet 0.0.6 → 0.0.7

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.
Files changed (2) hide show
  1. package/dist/index.es.js +15 -13
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -81788,20 +81788,22 @@ const kV = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
81788
81788
  color: "yellow",
81789
81789
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
81790
81790
  }
81791
- }), h.current = I, !v.current && (o == null ? void 0 : o.length) !== 0) {
81792
- const k = new cV(
81793
- "wss://demos.yjs.dev/ws",
81794
- t,
81795
- M
81796
- );
81797
- v.current = k, v.current.on("status", (D) => {
81798
- console.log("WebRTC connection status:", D);
81799
- }), v.current.on("sync", (D) => {
81800
- });
81791
+ }), h.current = I, !(!o || (o == null ? void 0 : o.length) === 0)) {
81792
+ if (!v.current && (o == null ? void 0 : o.length) !== 0) {
81793
+ const k = new cV(
81794
+ "wss://demos.yjs.dev/ws",
81795
+ t,
81796
+ M
81797
+ );
81798
+ v.current = k, v.current.on("status", (D) => {
81799
+ console.log("WebRTC connection status:", D);
81800
+ }), v.current.on("sync", (D) => {
81801
+ });
81802
+ }
81803
+ return () => {
81804
+ v.current && (v.current.disconnect(), v.current.destroy(), v.current = null);
81805
+ };
81801
81806
  }
81802
- return () => {
81803
- v.current && (v.current.disconnect(), v.current.destroy(), v.current = null);
81804
- };
81805
81807
  }, [u, d.current, o]);
81806
81808
  const w = Tt((M) => {
81807
81809
  if (console.log("handleChange:", M, s.current, f.current), s.current) {
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.6",
5
+ "version": "0.0.7",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {