@arbidocs/coedit 0.5.30 → 0.5.31

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.
@@ -0,0 +1,21 @@
1
+ declare const COLLAB_PROTOCOL = 1;
2
+ /** What a client sends with its token so the server can refuse an incompatible build. */
3
+ declare const DOCUMENT_COLLABORATION_VERSIONS: {
4
+ readonly format: "arbi-docx/2";
5
+ readonly protocol: 1;
6
+ };
7
+ /**
8
+ * The reason a server refusing an incompatible client gives (Hocuspocus `permission-denied` reason):
9
+ * this prefix and the server's own format.
10
+ */
11
+ declare const FORMAT_REFUSAL = "collaboration-format:";
12
+ /**
13
+ * A refusal because client and server run different room formats: whether the server is newer (the
14
+ * page should reload to get the matching editor) or older (its update is still rolling out: retry).
15
+ * Null for any other reason.
16
+ */
17
+ declare function formatRefusal(reason: string | undefined): {
18
+ serverNewer: boolean;
19
+ } | null;
20
+
21
+ export { COLLAB_PROTOCOL as C, DOCUMENT_COLLABORATION_VERSIONS as D, FORMAT_REFUSAL as F, formatRefusal as f };
@@ -0,0 +1,21 @@
1
+ declare const COLLAB_PROTOCOL = 1;
2
+ /** What a client sends with its token so the server can refuse an incompatible build. */
3
+ declare const DOCUMENT_COLLABORATION_VERSIONS: {
4
+ readonly format: "arbi-docx/2";
5
+ readonly protocol: 1;
6
+ };
7
+ /**
8
+ * The reason a server refusing an incompatible client gives (Hocuspocus `permission-denied` reason):
9
+ * this prefix and the server's own format.
10
+ */
11
+ declare const FORMAT_REFUSAL = "collaboration-format:";
12
+ /**
13
+ * A refusal because client and server run different room formats: whether the server is newer (the
14
+ * page should reload to get the matching editor) or older (its update is still rolling out: retry).
15
+ * Null for any other reason.
16
+ */
17
+ declare function formatRefusal(reason: string | undefined): {
18
+ serverNewer: boolean;
19
+ } | null;
20
+
21
+ export { COLLAB_PROTOCOL as C, DOCUMENT_COLLABORATION_VERSIONS as D, FORMAT_REFUSAL as F, formatRefusal as f };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/coedit",
3
- "version": "0.5.30",
3
+ "version": "0.5.31",
4
4
  "description": "Real-time collaboration for the ARBI native DOCX editor: a Yjs mirror of the canonical OOXML package, session, and server runtime",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1,8 +0,0 @@
1
- declare const COLLAB_PROTOCOL = 1;
2
- /** What a client sends with its token so the server can refuse an incompatible build. */
3
- declare const DOCUMENT_COLLABORATION_VERSIONS: {
4
- readonly format: "arbi-docx/2";
5
- readonly protocol: 1;
6
- };
7
-
8
- export { COLLAB_PROTOCOL as C, DOCUMENT_COLLABORATION_VERSIONS as D };
@@ -1,8 +0,0 @@
1
- declare const COLLAB_PROTOCOL = 1;
2
- /** What a client sends with its token so the server can refuse an incompatible build. */
3
- declare const DOCUMENT_COLLABORATION_VERSIONS: {
4
- readonly format: "arbi-docx/2";
5
- readonly protocol: 1;
6
- };
7
-
8
- export { COLLAB_PROTOCOL as C, DOCUMENT_COLLABORATION_VERSIONS as D };