@fileverse-dev/ddoc 5.1.11 → 5.1.13
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/headless-editor-utils.es.js +1 -1
- package/dist/{index-B5LQvloV.mjs → index-DdSVo3bS.mjs} +1 -1
- package/dist/index.es.js +4811 -4778
- package/dist/{markdown-source-pane-C2Xep2As.mjs → markdown-source-pane-CGw52H-P.mjs} +1 -1
- package/dist/package/sync-local/server-clock.d.ts +26 -0
- package/dist/package/sync-local/socketClient.d.ts +1 -1
- package/dist/package/utils/focus-mode-canvas-click.d.ts +2 -0
- package/dist/{split-view-toolbar-BD6evA3F.mjs → split-view-toolbar-rXlmeoLe.mjs} +1 -1
- package/dist/{use-headless-editor-Q1TaFxVX.mjs → use-headless-editor-DQoc0Oo1.mjs} +2766 -2765
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ var Wr = (t, e, O) => e in t ? Vr(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var gt = (t, e, O) => Wr(t, typeof e != "symbol" ? e + "" : e, O);
|
|
4
4
|
import { jsx as Cr } from "react/jsx-runtime";
|
|
5
5
|
import { useRef as pe, useEffect as St } from "react";
|
|
6
|
-
import { s as y, A as pO, T as dO, a as Gr, S as et, b as Lr, P as fO, E as j, i as QO, c as _, D as le, k as tt, F as Ar, M as Pt, W as Er, R as Ur, d as mO, N as oe, e as V, f as Mr, g as Ot, h as ce, p as $O, j as Y, t as h, l as Ir, I as rt, L as at, m as ye, n as ue, o as Qe, q as gO, r as te, u as SO, v as Br, w as Nr, x as PO, y as kO, z as Dr, B as Fr, C as Kr, G as Oe, H as ZO, J as Jr, K as kt, O as Hr, Q as ea, U as ta, V as Oa, X as ra, Y as aa, Z as ia, _ as sa, $ as na, a0 as la, a1 as oa, a2 as ca } from "./index-
|
|
6
|
+
import { s as y, A as pO, T as dO, a as Gr, S as et, b as Lr, P as fO, E as j, i as QO, c as _, D as le, k as tt, F as Ar, M as Pt, W as Er, R as Ur, d as mO, N as oe, e as V, f as Mr, g as Ot, h as ce, p as $O, j as Y, t as h, l as Ir, I as rt, L as at, m as ye, n as ue, o as Qe, q as gO, r as te, u as SO, v as Br, w as Nr, x as PO, y as kO, z as Dr, B as Fr, C as Kr, G as Oe, H as ZO, J as Jr, K as kt, O as Hr, Q as ea, U as ta, V as Oa, X as ra, Y as aa, Z as ia, _ as sa, $ as na, a0 as la, a1 as oa, a2 as ca } from "./index-DdSVo3bS.mjs";
|
|
7
7
|
class ua {
|
|
8
8
|
/**
|
|
9
9
|
Create a new completion context. (Mostly useful for testing
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type * as ucans from '@ucans/ucans';
|
|
2
|
+
/**
|
|
3
|
+
* The collab server's clock, learned from its handshake. The server checks auth UCAN nbf/exp
|
|
4
|
+
* against its own clock, so tokens built from a skewed device clock get a 401.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ServerClock {
|
|
7
|
+
private readonly wallNow;
|
|
8
|
+
private readonly monoNow;
|
|
9
|
+
private anchor;
|
|
10
|
+
constructor(wallNow?: () => number, monoNow?: (() => number) | null);
|
|
11
|
+
/**
|
|
12
|
+
* Time since the handshake is measured on the monotonic clock, so a device clock change
|
|
13
|
+
* mid-session cannot skew it. A missing or implausible stamp (older server) falls back to the
|
|
14
|
+
* device clock. Delivery delay and sleep only make the estimate trail the server, which the
|
|
15
|
+
* token window absorbs.
|
|
16
|
+
*/
|
|
17
|
+
sync(serverTimeMs: unknown): void;
|
|
18
|
+
nowSeconds(): number;
|
|
19
|
+
ucanWindow(): {
|
|
20
|
+
notBefore: number;
|
|
21
|
+
expiration: number;
|
|
22
|
+
};
|
|
23
|
+
/** Whether a cached UCAN can still be presented: active, and not expiring within the margin. */
|
|
24
|
+
isUsable(ucan: ucans.Ucan): boolean;
|
|
25
|
+
private elapsedBase;
|
|
26
|
+
}
|
|
@@ -74,6 +74,7 @@ export declare class SocketClient {
|
|
|
74
74
|
private contractAddress?;
|
|
75
75
|
private ownerUcan?;
|
|
76
76
|
private collaborationUcan?;
|
|
77
|
+
private serverClock;
|
|
77
78
|
private ownerAddress?;
|
|
78
79
|
private ddocId?;
|
|
79
80
|
private editLock?;
|
|
@@ -130,7 +131,6 @@ export declare class SocketClient {
|
|
|
130
131
|
terminateSession: () => Promise<void>;
|
|
131
132
|
flushBeacon(mergedUpdate: string): void;
|
|
132
133
|
private getCollaborationKeyPair;
|
|
133
|
-
private isUcanValid;
|
|
134
134
|
private getOwnerToken;
|
|
135
135
|
private buildSessionToken;
|
|
136
136
|
private _authenticate;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m, jsxs as L } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as D, useState as E, useEffect as A } from "react";
|
|
3
3
|
import { DynamicDropdown as P, Tooltip as O, IconButton as T } from "@fileverse/ui";
|
|
4
|
-
import { a3 as _, a4 as w, c as R } from "./index-
|
|
4
|
+
import { a3 as _, a4 as w, c as R } from "./index-DdSVo3bS.mjs";
|
|
5
5
|
const p = (e, n, o = n) => {
|
|
6
6
|
const { state: i } = e, l = i.changeByRange((t) => {
|
|
7
7
|
const d = i.sliceDoc(t.from, t.to), r = i.sliceDoc(
|