@fileverse-dev/ddoc 2.4.12 → 2.4.14
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/README.md +3 -1
- package/dist/{ccip-BAm9EVjo.mjs → ccip-DYgL9M3j.mjs} +1 -1
- package/dist/{index-yZbcVTPq.mjs → index-I43VM9q_.mjs} +35 -11
- package/dist/index.es.js +1 -1
- package/dist/package/sync-local/actions/index.d.ts +17 -5
- package/dist/package/sync-local/socketClient.d.ts +1 -0
- package/dist/package/sync-local/types/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Ddoc Editor
|
2
2
|
|
3
|
-
[ddocs.new](http://ddocs.new/) is your onchain, privacy-first alternative to
|
3
|
+
[ddocs.new](http://ddocs.new/) is your onchain, privacy-first alternative to Google Docs. A self-sovereign note-taking and collaboration app that is peer-to-peer, end-to-end encrypted, and decentralized :yellow_heart:
|
4
|
+
|
5
|
+
dDocs enables secure, real-time and asynchronous collaboration without compromising user privacy. It also comes with powerful features like Markdown and LaTeX support, dark mode, offline editing, and mobile browser optimization.
|
4
6
|
|
5
7
|
<img width="4410" alt="github_banner_final@3x" src="https://github.com/user-attachments/assets/c6ee706d-979d-41b6-9f73-d29fbabb5152" />
|
6
8
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-
|
1
|
+
import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-I43VM9q_.mjs";
|
2
2
|
class S extends p {
|
3
3
|
constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
|
4
4
|
var o;
|
@@ -89868,7 +89868,7 @@ async function Sk(e, t) {
|
|
89868
89868
|
});
|
89869
89869
|
return V === "0x" ? { data: void 0 } : { data: V };
|
89870
89870
|
} catch (B) {
|
89871
|
-
const L = BWt(B), { offchainLookup: j, offchainLookupSignature: N } = await import("./ccip-
|
89871
|
+
const L = BWt(B), { offchainLookup: j, offchainLookupSignature: N } = await import("./ccip-DYgL9M3j.mjs");
|
89872
89872
|
if (e.ccipRead !== !1 && (L == null ? void 0 : L.slice(0, 10)) === N && b)
|
89873
89873
|
return { data: await j(e, { data: L, to: b }) };
|
89874
89874
|
throw S && (L == null ? void 0 : L.slice(0, 10)) === "0x101bb98d" ? new HVt({ factory: c }) : cpe(B, {
|
@@ -254918,6 +254918,7 @@ class iNn {
|
|
254918
254918
|
ct(this, "_machineEventHandler", null);
|
254919
254919
|
ct(this, "_onConnect", null);
|
254920
254920
|
ct(this, "_onDisconnection", null);
|
254921
|
+
ct(this, "_onHandShakeError", null);
|
254921
254922
|
ct(this, "_sequenceCallbackMap", {});
|
254922
254923
|
ct(this, "_webSocketStatus", No.CLOSED);
|
254923
254924
|
ct(this, "_webSocket", null);
|
@@ -254967,7 +254968,7 @@ class iNn {
|
|
254967
254968
|
return xs(n);
|
254968
254969
|
});
|
254969
254970
|
ct(this, "_handleHandShake", async (t) => {
|
254970
|
-
var s, l, u;
|
254971
|
+
var s, l, u, c;
|
254971
254972
|
if (this._websocketServiceDid = t.data.server_did, this._webSocketStatus !== No.CONNECTED || !this.roomId)
|
254972
254973
|
throw new Error(
|
254973
254974
|
"Cannot establish handshake. WebSocket not connected or roomId not defined"
|
@@ -254992,11 +254993,15 @@ class iNn {
|
|
254992
254993
|
if ((l = this._onCollaborationConnectCallback) == null || l.call(this, {
|
254993
254994
|
data: a,
|
254994
254995
|
roomKey: this.roomKey
|
254995
|
-
}),
|
254996
|
+
}), a.statusCode !== 200) {
|
254997
|
+
(u = this._onHandShakeError) == null || u.call(this, a.error);
|
254998
|
+
return;
|
254999
|
+
}
|
255000
|
+
if (!a.is_handshake_response) {
|
254996
255001
|
this.disconnect();
|
254997
255002
|
return;
|
254998
255003
|
}
|
254999
|
-
(
|
255004
|
+
(c = this._onConnect) == null || c.call(this);
|
255000
255005
|
});
|
255001
255006
|
ct(this, "_executeRequestCallback", (t) => {
|
255002
255007
|
const n = this._getSequenceIdCallback(t.seqId);
|
@@ -255199,7 +255204,7 @@ class iNn {
|
|
255199
255204
|
});
|
255200
255205
|
}
|
255201
255206
|
async init(t) {
|
255202
|
-
this._onConnect = t.onConnect, this._onDisconnection = t.onDisconnect, this._machineEventHandler = t.onWsEvent, this._onError = t.onError, this.roomId = t.roomId, await this.connectSocket();
|
255207
|
+
this._onConnect = t.onConnect, this._onDisconnection = t.onDisconnect, this._machineEventHandler = t.onWsEvent, this._onError = t.onError, this._onHandShakeError = t.onHandShakeError, this.roomId = t.roomId, await this.connectSocket();
|
255203
255208
|
}
|
255204
255209
|
}
|
255205
255210
|
const aNn = (e) => {
|
@@ -255336,10 +255341,25 @@ const aNn = (e) => {
|
|
255336
255341
|
_awarenessUpdateHandler: null,
|
255337
255342
|
uncommittedUpdatesIdList: [],
|
255338
255343
|
updateQueue: []
|
255339
|
-
}), LNn = (e, t) =>
|
255340
|
-
|
255341
|
-
|
255342
|
-
|
255344
|
+
}), LNn = (e, t) => ({
|
255345
|
+
socketClient: null,
|
255346
|
+
roomId: "",
|
255347
|
+
roomMembers: [],
|
255348
|
+
isConnected: !1,
|
255349
|
+
awareness: null,
|
255350
|
+
_awarenessUpdateHandler: null,
|
255351
|
+
roomKey: "",
|
255352
|
+
wsUrl: "",
|
255353
|
+
uncommittedUpdatesIdList: [],
|
255354
|
+
updateQueue: [],
|
255355
|
+
isOwner: !1,
|
255356
|
+
isReady: !1,
|
255357
|
+
isNewDoc: !1,
|
255358
|
+
contentTobeAppliedQueue: [],
|
255359
|
+
initialUpdate: null,
|
255360
|
+
errorCount: 0,
|
255361
|
+
errorMessage: ""
|
255362
|
+
}), NNn = (e) => {
|
255343
255363
|
var t, n;
|
255344
255364
|
return T9(
|
255345
255365
|
e.awareness,
|
@@ -255414,6 +255434,9 @@ const aNn = (e) => {
|
|
255414
255434
|
t({ type: "SYNC_LATEST_COMMIT", data: null });
|
255415
255435
|
},
|
255416
255436
|
onDisconnect: () => t({ type: "DISCONNECTED", data: null }),
|
255437
|
+
onHandShakeError: (i) => {
|
255438
|
+
t({ type: "DISCONNECT", data: { error: "Network error" } }), o == null || o(i);
|
255439
|
+
},
|
255417
255440
|
onWsEvent: (i) => {
|
255418
255441
|
if (!(i != null && i.event_type))
|
255419
255442
|
throw new Error("Message is not an event");
|
@@ -259094,7 +259117,8 @@ const ioe = Ne.memo(u7e), S_n = ({
|
|
259094
259117
|
"w-full h-auto py-8",
|
259095
259118
|
!(Ze != null && Ze.canvasBackground) && "color-bg-default",
|
259096
259119
|
e && "preview-mode",
|
259097
|
-
Ue !== void 0 && gt && "has-available-models"
|
259120
|
+
Ue !== void 0 && gt && "has-available-models",
|
259121
|
+
be && "hide-inline-comments"
|
259098
259122
|
),
|
259099
259123
|
...In() && {
|
259100
259124
|
style: In()
|
@@ -259160,7 +259184,7 @@ const ioe = Ne.memo(u7e), S_n = ({
|
|
259160
259184
|
isPreviewMode: e
|
259161
259185
|
}
|
259162
259186
|
),
|
259163
|
-
/* @__PURE__ */ E.jsx("div", { children: ve && /* @__PURE__ */ E.jsx(
|
259187
|
+
/* @__PURE__ */ E.jsx("div", { children: ve && !be && /* @__PURE__ */ E.jsx(
|
259164
259188
|
A_n,
|
259165
259189
|
{
|
259166
259190
|
editor: ve,
|
package/dist/index.es.js
CHANGED
@@ -114,12 +114,24 @@ export declare const disconnectedStateHandler: () => {
|
|
114
114
|
uncommittedUpdatesIdList: never[];
|
115
115
|
updateQueue: never[];
|
116
116
|
};
|
117
|
-
export declare const handleDisconnectionDueToError: (
|
117
|
+
export declare const handleDisconnectionDueToError: (_context: SyncMachineContext, _event: SyncMachinEvent) => {
|
118
|
+
socketClient: null;
|
119
|
+
roomId: string;
|
120
|
+
roomMembers: never[];
|
121
|
+
isConnected: boolean;
|
122
|
+
awareness: null;
|
123
|
+
_awarenessUpdateHandler: null;
|
124
|
+
roomKey: string;
|
125
|
+
wsUrl: string;
|
126
|
+
uncommittedUpdatesIdList: never[];
|
127
|
+
updateQueue: never[];
|
128
|
+
isOwner: boolean;
|
129
|
+
isReady: boolean;
|
130
|
+
isNewDoc: boolean;
|
131
|
+
contentTobeAppliedQueue: never[];
|
132
|
+
initialUpdate: null;
|
118
133
|
errorCount: number;
|
119
|
-
errorMessage:
|
120
|
-
} | {
|
121
|
-
errorCount?: undefined;
|
122
|
-
errorMessage?: undefined;
|
134
|
+
errorMessage: string;
|
123
135
|
};
|
124
136
|
export declare const terminateSessionHandler: (context: SyncMachineContext) => {
|
125
137
|
socketClient: null;
|