@kopexa/tiptap 17.8.0 → 17.8.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.
- package/dist/index.js +10 -3
- package/dist/index.mjs +10 -3
- package/package.json +24 -24
package/dist/index.js
CHANGED
|
@@ -208,7 +208,7 @@ function CollaborationProvider({
|
|
|
208
208
|
(0, import_react3.useEffect)(() => {
|
|
209
209
|
const remote = remoteRef.current;
|
|
210
210
|
if (!remote) return;
|
|
211
|
-
if (enableLocalPersistence) {
|
|
211
|
+
if (enableLocalPersistence && !localRef.current) {
|
|
212
212
|
const local = new import_y_indexeddb.IndexeddbPersistence(documentId, ydoc);
|
|
213
213
|
local.on("synced", () => setLocalSynced(true));
|
|
214
214
|
localRef.current = local;
|
|
@@ -262,12 +262,19 @@ function CollaborationProvider({
|
|
|
262
262
|
remote.off("authenticationFailed", onAuthFailed);
|
|
263
263
|
remote.off("synced", onSynced);
|
|
264
264
|
remote.off("status", onStatus);
|
|
265
|
-
remote.
|
|
265
|
+
remote.disconnect();
|
|
266
266
|
(_a = localRef.current) == null ? void 0 : _a.destroy();
|
|
267
267
|
localRef.current = null;
|
|
268
|
-
|
|
268
|
+
setReady(false);
|
|
269
269
|
};
|
|
270
270
|
}, [documentId, ydoc, enableLocalPersistence]);
|
|
271
|
+
(0, import_react3.useEffect)(() => {
|
|
272
|
+
return () => {
|
|
273
|
+
var _a;
|
|
274
|
+
(_a = remoteRef.current) == null ? void 0 : _a.destroy();
|
|
275
|
+
remoteRef.current = null;
|
|
276
|
+
};
|
|
277
|
+
}, []);
|
|
271
278
|
(0, import_react3.useEffect)(() => {
|
|
272
279
|
var _a;
|
|
273
280
|
const awareness = (_a = remoteRef.current) == null ? void 0 : _a.awareness;
|
package/dist/index.mjs
CHANGED
|
@@ -153,7 +153,7 @@ function CollaborationProvider({
|
|
|
153
153
|
useEffect2(() => {
|
|
154
154
|
const remote = remoteRef.current;
|
|
155
155
|
if (!remote) return;
|
|
156
|
-
if (enableLocalPersistence) {
|
|
156
|
+
if (enableLocalPersistence && !localRef.current) {
|
|
157
157
|
const local = new IndexeddbPersistence(documentId, ydoc);
|
|
158
158
|
local.on("synced", () => setLocalSynced(true));
|
|
159
159
|
localRef.current = local;
|
|
@@ -207,12 +207,19 @@ function CollaborationProvider({
|
|
|
207
207
|
remote.off("authenticationFailed", onAuthFailed);
|
|
208
208
|
remote.off("synced", onSynced);
|
|
209
209
|
remote.off("status", onStatus);
|
|
210
|
-
remote.
|
|
210
|
+
remote.disconnect();
|
|
211
211
|
(_a = localRef.current) == null ? void 0 : _a.destroy();
|
|
212
212
|
localRef.current = null;
|
|
213
|
-
|
|
213
|
+
setReady(false);
|
|
214
214
|
};
|
|
215
215
|
}, [documentId, ydoc, enableLocalPersistence]);
|
|
216
|
+
useEffect2(() => {
|
|
217
|
+
return () => {
|
|
218
|
+
var _a;
|
|
219
|
+
(_a = remoteRef.current) == null ? void 0 : _a.destroy();
|
|
220
|
+
remoteRef.current = null;
|
|
221
|
+
};
|
|
222
|
+
}, []);
|
|
216
223
|
useEffect2(() => {
|
|
217
224
|
var _a;
|
|
218
225
|
const awareness = (_a = remoteRef.current) == null ? void 0 : _a.awareness;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kopexa/tiptap",
|
|
3
|
-
"version": "17.8.
|
|
3
|
+
"version": "17.8.1",
|
|
4
4
|
"description": "our tiptap components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tiptap"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"motion": ">=12.23.6",
|
|
29
29
|
"react": ">=19.0.0-rc.0",
|
|
30
30
|
"react-dom": ">=19.0.0-rc.0",
|
|
31
|
-
"@kopexa/theme": "17.23.
|
|
31
|
+
"@kopexa/theme": "17.23.1"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@floating-ui/dom": "^1.7.4",
|
|
@@ -66,29 +66,29 @@
|
|
|
66
66
|
"react-intl": "^7.1.14",
|
|
67
67
|
"y-indexeddb": "^9.0.12",
|
|
68
68
|
"yjs": "^13.6.0",
|
|
69
|
-
"@kopexa/button": "17.0.
|
|
70
|
-
"@kopexa/chip": "17.1.
|
|
71
|
-
"@kopexa/callout": "17.0.
|
|
72
|
-
"@kopexa/
|
|
73
|
-
"@kopexa/
|
|
74
|
-
"@kopexa/editor-utils": "17.1.0",
|
|
75
|
-
"@kopexa/extension-code": "17.0.49",
|
|
76
|
-
"@kopexa/extension-table": "17.1.1",
|
|
69
|
+
"@kopexa/button": "17.0.50",
|
|
70
|
+
"@kopexa/chip": "17.1.47",
|
|
71
|
+
"@kopexa/callout": "17.0.50",
|
|
72
|
+
"@kopexa/editor-utils": "17.1.1",
|
|
73
|
+
"@kopexa/extension-code": "17.0.50",
|
|
77
74
|
"@kopexa/extension-pages": "17.0.45",
|
|
78
|
-
"@kopexa/
|
|
79
|
-
"@kopexa/
|
|
80
|
-
"@kopexa/
|
|
81
|
-
"@kopexa/
|
|
82
|
-
"@kopexa/
|
|
83
|
-
"@kopexa/
|
|
84
|
-
"@kopexa/
|
|
85
|
-
"@kopexa/
|
|
86
|
-
"@kopexa/
|
|
87
|
-
"@kopexa/
|
|
88
|
-
"@kopexa/
|
|
89
|
-
"@kopexa/
|
|
90
|
-
"@kopexa/
|
|
91
|
-
"@kopexa/
|
|
75
|
+
"@kopexa/dropdown-menu": "17.0.50",
|
|
76
|
+
"@kopexa/extension-controlref": "17.1.32",
|
|
77
|
+
"@kopexa/icons": "17.7.15",
|
|
78
|
+
"@kopexa/dialog": "17.2.15",
|
|
79
|
+
"@kopexa/extension-table": "17.1.2",
|
|
80
|
+
"@kopexa/label": "17.0.50",
|
|
81
|
+
"@kopexa/input": "17.0.50",
|
|
82
|
+
"@kopexa/popover": "17.2.15",
|
|
83
|
+
"@kopexa/switch": "17.2.15",
|
|
84
|
+
"@kopexa/select": "17.2.15",
|
|
85
|
+
"@kopexa/separator": "17.0.50",
|
|
86
|
+
"@kopexa/shared-utils": "17.0.50",
|
|
87
|
+
"@kopexa/react-utils": "17.0.50",
|
|
88
|
+
"@kopexa/tabs": "17.0.50",
|
|
89
|
+
"@kopexa/use-composed-ref": "17.0.50",
|
|
90
|
+
"@kopexa/use-is-mobile": "17.0.50",
|
|
91
|
+
"@kopexa/toolbar": "17.2.15"
|
|
92
92
|
},
|
|
93
93
|
"clean-package": "../../../clean-package.config.json",
|
|
94
94
|
"module": "dist/index.mjs",
|