@fileverse-dev/ddoc 4.2.0-durability-4 → 4.2.0-durability-5
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-BBUrVb_K.mjs → index-Cj6IqS3E.mjs} +1 -1
- package/dist/{index-DAyn7Bvw.mjs → index-DyCMrsW4.mjs} +215 -193
- package/dist/index.es.js +1 -1
- package/dist/{markdown-source-pane-edyRbYf5.mjs → markdown-source-pane-aEnkDOx7.mjs} +2 -2
- package/dist/package/sync-local/SyncManager.d.ts +2 -0
- package/dist/package/sync-local/socketClient.d.ts +10 -1
- package/dist/package/sync-local/types/index.d.ts +11 -4
- package/dist/{split-view-toolbar-CJ28ino3.mjs → split-view-toolbar-Y4c84oHs.mjs} +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as Ql, b as Zl, s as eh } from "./index-
|
|
1
|
+
import { k as Ql, b as Zl, s as eh } from "./index-DyCMrsW4.mjs";
|
|
2
2
|
let An = [], Xr = [];
|
|
3
3
|
(() => {
|
|
4
4
|
let s = "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e) => e ? parseInt(e, 36) : 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var jre = Object.defineProperty;
|
|
2
2
|
var Bre = (e, t, n) => t in e ? jre(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
3
|
+
var Pe = (e, t, n) => Bre(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as tr from "react";
|
|
5
5
|
import It, { useContext as xp, useState as Be, useLayoutEffect as qs, useEffect as _e, useDebugValue as BU, createContext as Cf, createRef as Nre, memo as Af, createElement as Uh, version as j_, useRef as Se, forwardRef as Jn, useMemo as wt, useImperativeHandle as $8, useCallback as Ce, useSyncExternalStore as Mre, Fragment as Ire, Component as Ore, cloneElement as NU, useId as Rre, useReducer as MU, lazy as IU, Suspense as B_ } from "react";
|
|
6
6
|
import OU, { flushSync as Lre, createPortal as _f } from "react-dom";
|
|
@@ -312,7 +312,7 @@ function Eoe() {
|
|
|
312
312
|
} finally {
|
|
313
313
|
X = !1, Q.current = Jt, J(), Error.prepareStackTrace = Yt;
|
|
314
314
|
}
|
|
315
|
-
var
|
|
315
|
+
var ze = xe ? xe.displayName || xe.name : "", dt = ze ? ee(ze) : "";
|
|
316
316
|
return typeof xe == "function" && N.set(xe, dt), dt;
|
|
317
317
|
}
|
|
318
318
|
function oe(xe, Ie, Oe) {
|
|
@@ -626,8 +626,8 @@ Check the top-level render call using <` + Oe + ">.");
|
|
|
626
626
|
if (ve !== void 0)
|
|
627
627
|
if (ft)
|
|
628
628
|
if (he(ve)) {
|
|
629
|
-
for (var
|
|
630
|
-
jt(ve[
|
|
629
|
+
for (var ze = 0; ze < ve.length; ze++)
|
|
630
|
+
jt(ve[ze], xe);
|
|
631
631
|
Object.freeze && Object.freeze(ve);
|
|
632
632
|
} else
|
|
633
633
|
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
@@ -49464,8 +49464,8 @@ function bV() {
|
|
|
49464
49464
|
return;
|
|
49465
49465
|
(!ve || typeof ve != "object") && (ve = {}), ve = Qo(ve), ct = // eslint-disable-next-line unicorn/prefer-includes
|
|
49466
49466
|
Ue.indexOf(ve.PARSER_MEDIA_TYPE) === -1 ? Zt : ve.PARSER_MEDIA_TYPE, bt = ct === "application/xhtml+xml" ? VF : G0, U = pr(ve, "ALLOWED_TAGS") && Uo(ve.ALLOWED_TAGS) ? ln({}, ve.ALLOWED_TAGS, bt) : O, Y = pr(ve, "ALLOWED_ATTR") && Uo(ve.ALLOWED_ATTR) ? ln({}, ve.ALLOWED_ATTR, bt) : ae, Ke = pr(ve, "ALLOWED_NAMESPACES") && Uo(ve.ALLOWED_NAMESPACES) ? ln({}, ve.ALLOWED_NAMESPACES, VF) : yt, be = pr(ve, "ADD_URI_SAFE_ATTR") && Uo(ve.ADD_URI_SAFE_ATTR) ? ln(Qo(ke), ve.ADD_URI_SAFE_ATTR, bt) : ke, pe = pr(ve, "ADD_DATA_URI_TAGS") && Uo(ve.ADD_DATA_URI_TAGS) ? ln(Qo(ge), ve.ADD_DATA_URI_TAGS, bt) : ge, W = pr(ve, "FORBID_CONTENTS") && Uo(ve.FORBID_CONTENTS) ? ln({}, ve.FORBID_CONTENTS, bt) : Z, Q = pr(ve, "FORBID_TAGS") && Uo(ve.FORBID_TAGS) ? ln({}, ve.FORBID_TAGS, bt) : Qo({}), re = pr(ve, "FORBID_ATTR") && Uo(ve.FORBID_ATTR) ? ln({}, ve.FORBID_ATTR, bt) : Qo({}), L = pr(ve, "USE_PROFILES") ? ve.USE_PROFILES && typeof ve.USE_PROFILES == "object" ? Qo(ve.USE_PROFILES) : ve.USE_PROFILES : !1, X = ve.ALLOW_ARIA_ATTR !== !1, N = ve.ALLOW_DATA_ATTR !== !1, V = ve.ALLOW_UNKNOWN_PROTOCOLS || !1, G = ve.ALLOW_SELF_CLOSE_IN_ATTR !== !1, oe = ve.SAFE_FOR_TEMPLATES || !1, B = ve.SAFE_FOR_XML !== !1, ie = ve.WHOLE_DOCUMENT || !1, te = ve.RETURN_DOM || !1, le = ve.RETURN_DOM_FRAGMENT || !1, me = ve.RETURN_TRUSTED_TYPE || !1, K = ve.FORCE_BODY || !1, De = ve.SANITIZE_DOM !== !1, he = ve.SANITIZE_NAMED_PROPS || !1, de = ve.KEEP_CONTENT !== !1, ye = ve.IN_PLACE || !1, H = qve(ve.ALLOWED_URI_REGEXP) ? ve.ALLOWED_URI_REGEXP : gV, Me = typeof ve.NAMESPACE == "string" ? ve.NAMESPACE : Te, xt = pr(ve, "MATHML_TEXT_INTEGRATION_POINTS") && ve.MATHML_TEXT_INTEGRATION_POINTS && typeof ve.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Qo(ve.MATHML_TEXT_INTEGRATION_POINTS) : ln({}, ["mi", "mo", "mn", "ms", "mtext"]), Xt = pr(ve, "HTML_INTEGRATION_POINTS") && ve.HTML_INTEGRATION_POINTS && typeof ve.HTML_INTEGRATION_POINTS == "object" ? Qo(ve.HTML_INTEGRATION_POINTS) : ln({}, ["annotation-xml"]);
|
|
49467
|
-
const
|
|
49468
|
-
if (J = ah(null), pr(
|
|
49467
|
+
const ze = pr(ve, "CUSTOM_ELEMENT_HANDLING") && ve.CUSTOM_ELEMENT_HANDLING && typeof ve.CUSTOM_ELEMENT_HANDLING == "object" ? Qo(ve.CUSTOM_ELEMENT_HANDLING) : ah(null);
|
|
49468
|
+
if (J = ah(null), pr(ze, "tagNameCheck") && Je(ze.tagNameCheck) && (J.tagNameCheck = ze.tagNameCheck), pr(ze, "attributeNameCheck") && Je(ze.attributeNameCheck) && (J.attributeNameCheck = ze.attributeNameCheck), pr(ze, "allowCustomizedBuiltInElements") && typeof ze.allowCustomizedBuiltInElements == "boolean" && (J.allowCustomizedBuiltInElements = ze.allowCustomizedBuiltInElements), oe && (N = !1), le && (te = !0), L && (U = ln({}, OB), Y = ah(null), L.html === !0 && (ln(U, IB), ln(Y, RB)), L.svg === !0 && (ln(U, KF), ln(Y, YF), ln(Y, F2)), L.svgFilters === !0 && (ln(U, GF), ln(Y, YF), ln(Y, F2)), L.mathMl === !0 && (ln(U, XF), ln(Y, LB), ln(Y, F2))), ee.tagCheck = null, ee.attributeCheck = null, pr(ve, "ADD_TAGS") && (typeof ve.ADD_TAGS == "function" ? ee.tagCheck = ve.ADD_TAGS : Uo(ve.ADD_TAGS) && (U === O && (U = Qo(U)), ln(U, ve.ADD_TAGS, bt))), pr(ve, "ADD_ATTR") && (typeof ve.ADD_ATTR == "function" ? ee.attributeCheck = ve.ADD_ATTR : Uo(ve.ADD_ATTR) && (Y === ae && (Y = Qo(Y)), ln(Y, ve.ADD_ATTR, bt))), pr(ve, "ADD_URI_SAFE_ATTR") && Uo(ve.ADD_URI_SAFE_ATTR) && ln(be, ve.ADD_URI_SAFE_ATTR, bt), pr(ve, "FORBID_CONTENTS") && Uo(ve.FORBID_CONTENTS) && (W === Z && (W = Qo(W)), ln(W, ve.FORBID_CONTENTS, bt)), pr(ve, "ADD_FORBID_CONTENTS") && Uo(ve.ADD_FORBID_CONTENTS) && (W === Z && (W = Qo(W)), ln(W, ve.ADD_FORBID_CONTENTS, bt)), de && (U["#text"] = !0), ie && ln(U, ["html", "head", "body"]), U.table && (ln(U, ["tbody"]), delete Q.tbody), ve.TRUSTED_TYPES_POLICY) {
|
|
49469
49469
|
if (typeof ve.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
49470
49470
|
throw v2('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
49471
49471
|
if (typeof ve.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -49475,13 +49475,13 @@ function bV() {
|
|
|
49475
49475
|
v === void 0 && (v = r3e(h, o)), v !== null && typeof w == "string" && (w = v.createHTML(""));
|
|
49476
49476
|
Yo && Yo(ve), St = ve;
|
|
49477
49477
|
}, kt = ln({}, [...KF, ...GF, ...Vve]), gt = ln({}, [...XF, ...Kve]), yn = function(ve) {
|
|
49478
|
-
let
|
|
49479
|
-
(!
|
|
49478
|
+
let ze = F(ve);
|
|
49479
|
+
(!ze || !ze.tagName) && (ze = {
|
|
49480
49480
|
namespaceURI: Me,
|
|
49481
49481
|
tagName: "template"
|
|
49482
49482
|
});
|
|
49483
|
-
const dt = G0(ve.tagName), qt = G0(
|
|
49484
|
-
return Ke[ve.namespaceURI] ? ve.namespaceURI === fe ?
|
|
49483
|
+
const dt = G0(ve.tagName), qt = G0(ze.tagName);
|
|
49484
|
+
return Ke[ve.namespaceURI] ? ve.namespaceURI === fe ? ze.namespaceURI === Te ? dt === "svg" : ze.namespaceURI === Ee ? dt === "svg" && (qt === "annotation-xml" || xt[qt]) : !!kt[dt] : ve.namespaceURI === Ee ? ze.namespaceURI === Te ? dt === "math" : ze.namespaceURI === fe ? dt === "math" && Xt[qt] : !!gt[dt] : ve.namespaceURI === Te ? ze.namespaceURI === fe && !Xt[qt] || ze.namespaceURI === Ee && !xt[qt] ? !1 : !gt[dt] && (Wt[dt] || !kt[dt]) : !!(ct === "application/xhtml+xml" && Ke[ve.namespaceURI]) : !1;
|
|
49485
49485
|
}, At = function(ve) {
|
|
49486
49486
|
f0(t.removed, {
|
|
49487
49487
|
element: ve
|
|
@@ -49491,31 +49491,31 @@ function bV() {
|
|
|
49491
49491
|
} catch {
|
|
49492
49492
|
m(ve);
|
|
49493
49493
|
}
|
|
49494
|
-
}, tt = function(ve,
|
|
49494
|
+
}, tt = function(ve, ze) {
|
|
49495
49495
|
try {
|
|
49496
49496
|
f0(t.removed, {
|
|
49497
|
-
attribute:
|
|
49498
|
-
from:
|
|
49497
|
+
attribute: ze.getAttributeNode(ve),
|
|
49498
|
+
from: ze
|
|
49499
49499
|
});
|
|
49500
49500
|
} catch {
|
|
49501
49501
|
f0(t.removed, {
|
|
49502
49502
|
attribute: null,
|
|
49503
|
-
from:
|
|
49503
|
+
from: ze
|
|
49504
49504
|
});
|
|
49505
49505
|
}
|
|
49506
|
-
if (
|
|
49506
|
+
if (ze.removeAttribute(ve), ve === "is")
|
|
49507
49507
|
if (te || le)
|
|
49508
49508
|
try {
|
|
49509
|
-
At(
|
|
49509
|
+
At(ze);
|
|
49510
49510
|
} catch {
|
|
49511
49511
|
}
|
|
49512
49512
|
else
|
|
49513
49513
|
try {
|
|
49514
|
-
|
|
49514
|
+
ze.setAttribute(ve, "");
|
|
49515
49515
|
} catch {
|
|
49516
49516
|
}
|
|
49517
49517
|
}, hn = function(ve) {
|
|
49518
|
-
let
|
|
49518
|
+
let ze = null, dt = null;
|
|
49519
49519
|
if (K)
|
|
49520
49520
|
ve = "<remove></remove>" + ve;
|
|
49521
49521
|
else {
|
|
@@ -49526,18 +49526,18 @@ function bV() {
|
|
|
49526
49526
|
const qt = v ? v.createHTML(ve) : ve;
|
|
49527
49527
|
if (Me === Te)
|
|
49528
49528
|
try {
|
|
49529
|
-
|
|
49529
|
+
ze = new p().parseFromString(qt, ct);
|
|
49530
49530
|
} catch {
|
|
49531
49531
|
}
|
|
49532
|
-
if (!
|
|
49533
|
-
|
|
49532
|
+
if (!ze || !ze.documentElement) {
|
|
49533
|
+
ze = k.createDocument(Me, "template", null);
|
|
49534
49534
|
try {
|
|
49535
|
-
|
|
49535
|
+
ze.documentElement.innerHTML = $e ? w : qt;
|
|
49536
49536
|
} catch {
|
|
49537
49537
|
}
|
|
49538
49538
|
}
|
|
49539
|
-
const at =
|
|
49540
|
-
return ve && dt && at.insertBefore(n.createTextNode(dt), at.childNodes[0] || null), Me === Te ? A.call(
|
|
49539
|
+
const at = ze.body || ze.documentElement;
|
|
49540
|
+
return ve && dt && at.insertBefore(n.createTextNode(dt), at.childNodes[0] || null), Me === Te ? A.call(ze, ie ? "html" : "body")[0] : ie ? ze.documentElement : at;
|
|
49541
49541
|
}, xe = function(ve) {
|
|
49542
49542
|
return D.call(
|
|
49543
49543
|
ve.ownerDocument || ve,
|
|
@@ -49551,13 +49551,13 @@ function bV() {
|
|
|
49551
49551
|
}, Oe = function(ve) {
|
|
49552
49552
|
return typeof a == "function" && ve instanceof a;
|
|
49553
49553
|
};
|
|
49554
|
-
function ft(nt, ve,
|
|
49554
|
+
function ft(nt, ve, ze) {
|
|
49555
49555
|
h0(nt, (dt) => {
|
|
49556
|
-
dt.call(t, ve,
|
|
49556
|
+
dt.call(t, ve, ze, St);
|
|
49557
49557
|
});
|
|
49558
49558
|
}
|
|
49559
49559
|
const Yt = function(ve) {
|
|
49560
|
-
let
|
|
49560
|
+
let ze = null;
|
|
49561
49561
|
if (ft(R.beforeSanitizeElements, ve, null), Ie(ve))
|
|
49562
49562
|
return At(ve), !0;
|
|
49563
49563
|
const dt = bt(ve.nodeName);
|
|
@@ -49581,29 +49581,29 @@ function bV() {
|
|
|
49581
49581
|
}
|
|
49582
49582
|
return At(ve), !0;
|
|
49583
49583
|
}
|
|
49584
|
-
return ve instanceof l && !yn(ve) || (dt === "noscript" || dt === "noembed" || dt === "noframes") && ro(/<\/no(script|embed|frames)/i, ve.innerHTML) ? (At(ve), !0) : (oe && ve.nodeType === m0.text && (
|
|
49585
|
-
|
|
49586
|
-
}), ve.textContent !==
|
|
49584
|
+
return ve instanceof l && !yn(ve) || (dt === "noscript" || dt === "noembed" || dt === "noframes") && ro(/<\/no(script|embed|frames)/i, ve.innerHTML) ? (At(ve), !0) : (oe && ve.nodeType === m0.text && (ze = ve.textContent, h0([_, I, E], (qt) => {
|
|
49585
|
+
ze = Hp(ze, qt, " ");
|
|
49586
|
+
}), ve.textContent !== ze && (f0(t.removed, {
|
|
49587
49587
|
element: ve.cloneNode()
|
|
49588
|
-
}), ve.textContent =
|
|
49589
|
-
}, Jt = function(ve,
|
|
49590
|
-
if (re[
|
|
49588
|
+
}), ve.textContent = ze)), ft(R.afterSanitizeElements, ve, null), !1);
|
|
49589
|
+
}, Jt = function(ve, ze, dt) {
|
|
49590
|
+
if (re[ze] || De && (ze === "id" || ze === "name") && (dt in n || dt in jt))
|
|
49591
49591
|
return !1;
|
|
49592
|
-
const qt = Y[
|
|
49593
|
-
if (!(N && !re[
|
|
49594
|
-
if (!(X && ro(T,
|
|
49595
|
-
if (!qt || re[
|
|
49592
|
+
const qt = Y[ze] || ee.attributeCheck instanceof Function && ee.attributeCheck(ze, ve);
|
|
49593
|
+
if (!(N && !re[ze] && ro(j, ze))) {
|
|
49594
|
+
if (!(X && ro(T, ze))) {
|
|
49595
|
+
if (!qt || re[ze]) {
|
|
49596
49596
|
if (
|
|
49597
49597
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
49598
49598
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
49599
49599
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
49600
|
-
!(zt(ve) && (J.tagNameCheck instanceof RegExp && ro(J.tagNameCheck, ve) || J.tagNameCheck instanceof Function && J.tagNameCheck(ve)) && (J.attributeNameCheck instanceof RegExp && ro(J.attributeNameCheck,
|
|
49600
|
+
!(zt(ve) && (J.tagNameCheck instanceof RegExp && ro(J.tagNameCheck, ve) || J.tagNameCheck instanceof Function && J.tagNameCheck(ve)) && (J.attributeNameCheck instanceof RegExp && ro(J.attributeNameCheck, ze) || J.attributeNameCheck instanceof Function && J.attributeNameCheck(ze, ve)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
49601
49601
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
49602
|
-
|
|
49602
|
+
ze === "is" && J.allowCustomizedBuiltInElements && (J.tagNameCheck instanceof RegExp && ro(J.tagNameCheck, dt) || J.tagNameCheck instanceof Function && J.tagNameCheck(dt)))
|
|
49603
49603
|
) return !1;
|
|
49604
|
-
} else if (!be[
|
|
49604
|
+
} else if (!be[ze]) {
|
|
49605
49605
|
if (!ro(H, Hp(dt, M, ""))) {
|
|
49606
|
-
if (!((
|
|
49606
|
+
if (!((ze === "src" || ze === "xlink:href" || ze === "href") && ve !== "script" && BB(dt, "data:") === 0 && pe[ve])) {
|
|
49607
49607
|
if (!(V && !ro(z, Hp(dt, M, "")))) {
|
|
49608
49608
|
if (dt)
|
|
49609
49609
|
return !1;
|
|
@@ -49619,9 +49619,9 @@ function bV() {
|
|
|
49619
49619
|
}, In = function(ve) {
|
|
49620
49620
|
ft(R.beforeSanitizeAttributes, ve, null);
|
|
49621
49621
|
const {
|
|
49622
|
-
attributes:
|
|
49622
|
+
attributes: ze
|
|
49623
49623
|
} = ve;
|
|
49624
|
-
if (!
|
|
49624
|
+
if (!ze || Ie(ve))
|
|
49625
49625
|
return;
|
|
49626
49626
|
const dt = {
|
|
49627
49627
|
attrName: "",
|
|
@@ -49630,9 +49630,9 @@ function bV() {
|
|
|
49630
49630
|
allowedAttributes: Y,
|
|
49631
49631
|
forceKeepAttr: void 0
|
|
49632
49632
|
};
|
|
49633
|
-
let qt =
|
|
49633
|
+
let qt = ze.length;
|
|
49634
49634
|
for (; qt--; ) {
|
|
49635
|
-
const at =
|
|
49635
|
+
const at = ze[qt], {
|
|
49636
49636
|
name: it,
|
|
49637
49637
|
namespaceURI: vt,
|
|
49638
49638
|
value: Ft
|
|
@@ -49684,14 +49684,14 @@ function bV() {
|
|
|
49684
49684
|
}
|
|
49685
49685
|
ft(R.afterSanitizeAttributes, ve, null);
|
|
49686
49686
|
}, sn = function(ve) {
|
|
49687
|
-
let
|
|
49687
|
+
let ze = null;
|
|
49688
49688
|
const dt = xe(ve);
|
|
49689
|
-
for (ft(R.beforeSanitizeShadowDOM, ve, null);
|
|
49690
|
-
ft(R.uponSanitizeShadowNode,
|
|
49689
|
+
for (ft(R.beforeSanitizeShadowDOM, ve, null); ze = dt.nextNode(); )
|
|
49690
|
+
ft(R.uponSanitizeShadowNode, ze, null), Yt(ze), In(ze), ze.content instanceof i && sn(ze.content);
|
|
49691
49691
|
ft(R.afterSanitizeShadowDOM, ve, null);
|
|
49692
49692
|
};
|
|
49693
49693
|
return t.sanitize = function(nt) {
|
|
49694
|
-
let ve = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
49694
|
+
let ve = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, ze = null, dt = null, qt = null, at = null;
|
|
49695
49695
|
if ($e = !nt, $e && (nt = "<!-->"), typeof nt != "string" && !Oe(nt) && (nt = Wve(nt), typeof nt != "string"))
|
|
49696
49696
|
throw v2("dirty is not a string, aborting");
|
|
49697
49697
|
if (!t.isSupported)
|
|
@@ -49704,37 +49704,37 @@ function bV() {
|
|
|
49704
49704
|
throw v2("root node is forbidden and cannot be sanitized in-place");
|
|
49705
49705
|
}
|
|
49706
49706
|
} else if (nt instanceof a)
|
|
49707
|
-
|
|
49707
|
+
ze = hn("<!---->"), dt = ze.ownerDocument.importNode(nt, !0), dt.nodeType === m0.element && dt.nodeName === "BODY" || dt.nodeName === "HTML" ? ze = dt : ze.appendChild(dt);
|
|
49708
49708
|
else {
|
|
49709
49709
|
if (!te && !oe && !ie && // eslint-disable-next-line unicorn/prefer-includes
|
|
49710
49710
|
nt.indexOf("<") === -1)
|
|
49711
49711
|
return v && me ? v.createHTML(nt) : nt;
|
|
49712
|
-
if (
|
|
49712
|
+
if (ze = hn(nt), !ze)
|
|
49713
49713
|
return te ? null : me ? w : "";
|
|
49714
49714
|
}
|
|
49715
|
-
|
|
49716
|
-
const it = xe(ye ? nt :
|
|
49715
|
+
ze && K && At(ze.firstChild);
|
|
49716
|
+
const it = xe(ye ? nt : ze);
|
|
49717
49717
|
for (; qt = it.nextNode(); )
|
|
49718
49718
|
Yt(qt), In(qt), qt.content instanceof i && sn(qt.content);
|
|
49719
49719
|
if (ye)
|
|
49720
49720
|
return nt;
|
|
49721
49721
|
if (te) {
|
|
49722
49722
|
if (oe) {
|
|
49723
|
-
|
|
49724
|
-
let Ft =
|
|
49723
|
+
ze.normalize();
|
|
49724
|
+
let Ft = ze.innerHTML;
|
|
49725
49725
|
h0([_, I, E], ($t) => {
|
|
49726
49726
|
Ft = Hp(Ft, $t, " ");
|
|
49727
|
-
}),
|
|
49727
|
+
}), ze.innerHTML = Ft;
|
|
49728
49728
|
}
|
|
49729
49729
|
if (le)
|
|
49730
|
-
for (at = C.call(
|
|
49731
|
-
at.appendChild(
|
|
49730
|
+
for (at = C.call(ze.ownerDocument); ze.firstChild; )
|
|
49731
|
+
at.appendChild(ze.firstChild);
|
|
49732
49732
|
else
|
|
49733
|
-
at =
|
|
49733
|
+
at = ze;
|
|
49734
49734
|
return (Y.shadowroot || Y.shadowrootmode) && (at = S.call(r, at, !0)), at;
|
|
49735
49735
|
}
|
|
49736
|
-
let vt = ie ?
|
|
49737
|
-
return ie && U["!doctype"] &&
|
|
49736
|
+
let vt = ie ? ze.outerHTML : ze.innerHTML;
|
|
49737
|
+
return ie && U["!doctype"] && ze.ownerDocument && ze.ownerDocument.doctype && ze.ownerDocument.doctype.name && ro(mV, ze.ownerDocument.doctype.name) && (vt = "<!DOCTYPE " + ze.ownerDocument.doctype.name + `>
|
|
49738
49738
|
` + vt), oe && h0([_, I, E], (Ft) => {
|
|
49739
49739
|
vt = Hp(vt, Ft, " ");
|
|
49740
49740
|
}), v && me ? v.createHTML(vt) : vt;
|
|
@@ -49743,16 +49743,16 @@ function bV() {
|
|
|
49743
49743
|
Qe(nt), se = !0;
|
|
49744
49744
|
}, t.clearConfig = function() {
|
|
49745
49745
|
St = null, se = !1;
|
|
49746
|
-
}, t.isValidAttribute = function(nt, ve,
|
|
49746
|
+
}, t.isValidAttribute = function(nt, ve, ze) {
|
|
49747
49747
|
St || Qe({});
|
|
49748
49748
|
const dt = bt(nt), qt = bt(ve);
|
|
49749
|
-
return Jt(dt, qt,
|
|
49749
|
+
return Jt(dt, qt, ze);
|
|
49750
49750
|
}, t.addHook = function(nt, ve) {
|
|
49751
49751
|
typeof ve == "function" && f0(R[nt], ve);
|
|
49752
49752
|
}, t.removeHook = function(nt, ve) {
|
|
49753
49753
|
if (ve !== void 0) {
|
|
49754
|
-
const
|
|
49755
|
-
return
|
|
49754
|
+
const ze = Rve(R[nt], ve);
|
|
49755
|
+
return ze === -1 ? void 0 : Lve(R[nt], ze, 1)[0];
|
|
49756
49756
|
}
|
|
49757
49757
|
return TB(R[nt]);
|
|
49758
49758
|
}, t.removeHooks = function(nt) {
|
|
@@ -56066,8 +56066,8 @@ class Oy extends Ht {
|
|
|
56066
56066
|
constructor(n) {
|
|
56067
56067
|
const { $from: r, $to: o } = n;
|
|
56068
56068
|
super(r, o);
|
|
56069
|
-
|
|
56070
|
-
|
|
56069
|
+
Pe(this, "_$from");
|
|
56070
|
+
Pe(this, "_$to");
|
|
56071
56071
|
this._$from = r, this._$to = o;
|
|
56072
56072
|
}
|
|
56073
56073
|
get $from() {
|
|
@@ -56954,9 +56954,9 @@ function MFe(e) {
|
|
|
56954
56954
|
}
|
|
56955
56955
|
class IFe {
|
|
56956
56956
|
constructor(t) {
|
|
56957
|
-
|
|
56958
|
-
|
|
56959
|
-
|
|
56957
|
+
Pe(this, "tagName");
|
|
56958
|
+
Pe(this, "attributes", []);
|
|
56959
|
+
Pe(this, "children", []);
|
|
56960
56960
|
this.tagName = t;
|
|
56961
56961
|
}
|
|
56962
56962
|
/** Set an attribute on this element. Returns this for chaining. */
|
|
@@ -57626,7 +57626,7 @@ function cN(e, t, n) {
|
|
|
57626
57626
|
class wK {
|
|
57627
57627
|
constructor() {
|
|
57628
57628
|
/** @internal */
|
|
57629
|
-
|
|
57629
|
+
Pe(this, "runs", []);
|
|
57630
57630
|
}
|
|
57631
57631
|
/**
|
|
57632
57632
|
* Add a run of text with optional formatting.
|
|
@@ -57748,7 +57748,7 @@ class wK {
|
|
|
57748
57748
|
class b6e {
|
|
57749
57749
|
constructor() {
|
|
57750
57750
|
/** @internal */
|
|
57751
|
-
|
|
57751
|
+
Pe(this, "runs", []);
|
|
57752
57752
|
}
|
|
57753
57753
|
/**
|
|
57754
57754
|
* Add a run of text with optional formatting.
|
|
@@ -57780,7 +57780,7 @@ class b6e {
|
|
|
57780
57780
|
class y6e {
|
|
57781
57781
|
constructor() {
|
|
57782
57782
|
/** @internal */
|
|
57783
|
-
|
|
57783
|
+
Pe(this, "runs", []);
|
|
57784
57784
|
}
|
|
57785
57785
|
/**
|
|
57786
57786
|
* Add a run of text with optional formatting.
|
|
@@ -57796,7 +57796,7 @@ class y6e {
|
|
|
57796
57796
|
class x6e {
|
|
57797
57797
|
constructor() {
|
|
57798
57798
|
/** @internal */
|
|
57799
|
-
|
|
57799
|
+
Pe(this, "cells", []);
|
|
57800
57800
|
}
|
|
57801
57801
|
/**
|
|
57802
57802
|
* Add a cell to this row.
|
|
@@ -57843,7 +57843,7 @@ class x6e {
|
|
|
57843
57843
|
class v6e {
|
|
57844
57844
|
constructor() {
|
|
57845
57845
|
/** @internal */
|
|
57846
|
-
|
|
57846
|
+
Pe(this, "rows", []);
|
|
57847
57847
|
}
|
|
57848
57848
|
/**
|
|
57849
57849
|
* Add a row to this table.
|
|
@@ -57877,7 +57877,7 @@ function w6e(e) {
|
|
|
57877
57877
|
class sC {
|
|
57878
57878
|
constructor() {
|
|
57879
57879
|
/** @internal */
|
|
57880
|
-
|
|
57880
|
+
Pe(this, "items", []);
|
|
57881
57881
|
}
|
|
57882
57882
|
/**
|
|
57883
57883
|
* Add an item to the list.
|
|
@@ -57922,11 +57922,11 @@ function D6e(e) {
|
|
|
57922
57922
|
const k6e = "application/vnd.oasis.opendocument.text";
|
|
57923
57923
|
class E6e {
|
|
57924
57924
|
constructor() {
|
|
57925
|
-
|
|
57926
|
-
|
|
57927
|
-
|
|
57928
|
-
|
|
57929
|
-
|
|
57925
|
+
Pe(this, "elements", []);
|
|
57926
|
+
Pe(this, "metadata", {});
|
|
57927
|
+
Pe(this, "pageLayout");
|
|
57928
|
+
Pe(this, "headerRuns", null);
|
|
57929
|
+
Pe(this, "footerRuns", null);
|
|
57930
57930
|
}
|
|
57931
57931
|
/** Set document metadata (title, creator, etc.). */
|
|
57932
57932
|
setMetadata(t) {
|
|
@@ -65658,7 +65658,7 @@ const tke = (e) => ({
|
|
|
65658
65658
|
class d8e extends Ore {
|
|
65659
65659
|
constructor() {
|
|
65660
65660
|
super(...arguments);
|
|
65661
|
-
|
|
65661
|
+
Pe(this, "state", { hasError: !1 });
|
|
65662
65662
|
}
|
|
65663
65663
|
static getDerivedStateFromError() {
|
|
65664
65664
|
return { hasError: !0 };
|
|
@@ -66341,17 +66341,17 @@ class W8e {
|
|
|
66341
66341
|
getRuntimeState: s,
|
|
66342
66342
|
onCopyHeadingLink: a
|
|
66343
66343
|
}) {
|
|
66344
|
-
|
|
66345
|
-
|
|
66346
|
-
|
|
66347
|
-
|
|
66348
|
-
|
|
66349
|
-
|
|
66350
|
-
|
|
66351
|
-
|
|
66352
|
-
|
|
66353
|
-
|
|
66354
|
-
|
|
66344
|
+
Pe(this, "node");
|
|
66345
|
+
Pe(this, "editor");
|
|
66346
|
+
Pe(this, "getPos");
|
|
66347
|
+
Pe(this, "dom");
|
|
66348
|
+
Pe(this, "gutterElement");
|
|
66349
|
+
Pe(this, "contentElement");
|
|
66350
|
+
Pe(this, "contentDOM");
|
|
66351
|
+
Pe(this, "id");
|
|
66352
|
+
Pe(this, "decorations");
|
|
66353
|
+
Pe(this, "getRuntimeState");
|
|
66354
|
+
Pe(this, "unregister");
|
|
66355
66355
|
this.editor = t, this.node = n, this.getPos = r, this.decorations = o, this.getRuntimeState = s, this.id = uf(), this.dom = document.createElement("div"), this.dom.dataset.type = "d-block", this.dom.dataset.dblockNodeView = "true", this.dom.dataset.nodeViewWrapper = "true", this.dom.setAttribute("data-dblock-id", this.id), H8e(this.dom, i), this.gutterElement = document.createElement("section"), this.gutterElement.className = "flex h-0 lg:h-6 shrink-0 items-center gap-[2px] min-w-5 lg:min-w-16 justify-end", this.gutterElement.setAttribute("aria-label", "left-menu"), this.gutterElement.setAttribute("contenteditable", "false"), this.gutterElement.dataset.dblockGutter = "true", this.contentElement = document.createElement("div"), this.contentElement.dataset.dblockContentShell = "true", this.contentDOM = document.createElement("div"), this.contentDOM.dataset.nodeViewContent = "true", this.contentElement.appendChild(this.contentDOM), this.dom.append(this.gutterElement, this.contentElement), this.unregister = U8e({
|
|
66356
66356
|
id: this.id,
|
|
66357
66357
|
dom: this.dom,
|
|
@@ -67040,12 +67040,12 @@ function ZN(e, t, n, r, o, i) {
|
|
|
67040
67040
|
}
|
|
67041
67041
|
class Z8e {
|
|
67042
67042
|
constructor(t, n) {
|
|
67043
|
-
|
|
67044
|
-
|
|
67045
|
-
|
|
67046
|
-
|
|
67047
|
-
|
|
67048
|
-
|
|
67043
|
+
Pe(this, "node");
|
|
67044
|
+
Pe(this, "cellMinWidth");
|
|
67045
|
+
Pe(this, "dom");
|
|
67046
|
+
Pe(this, "table");
|
|
67047
|
+
Pe(this, "colgroup");
|
|
67048
|
+
Pe(this, "contentDOM");
|
|
67049
67049
|
this.node = t, this.cellMinWidth = n, this.dom = document.createElement("div"), this.dom.className = "tableWrapper custom-scrollbar", this.table = this.dom.appendChild(document.createElement("table")), this.colgroup = this.table.appendChild(document.createElement("colgroup")), ZN(t, this.colgroup, this.table, n), this.contentDOM = this.table.appendChild(document.createElement("tbody"));
|
|
67050
67050
|
}
|
|
67051
67051
|
update(t) {
|
|
@@ -71787,7 +71787,7 @@ Expected it to be ${r}.`;
|
|
|
71787
71787
|
var gAe = class extends Error {
|
|
71788
71788
|
constructor(n) {
|
|
71789
71789
|
super(fAe(n));
|
|
71790
|
-
|
|
71790
|
+
Pe(this, "name", "InvalidDocError");
|
|
71791
71791
|
this.doc = n;
|
|
71792
71792
|
}
|
|
71793
71793
|
}, ff = gAe, SM = {};
|
|
@@ -72757,12 +72757,12 @@ function y_e(e) {
|
|
|
72757
72757
|
var NX = class extends Error {
|
|
72758
72758
|
constructor() {
|
|
72759
72759
|
super(...arguments);
|
|
72760
|
-
|
|
72760
|
+
Pe(this, "name", "ConfigError");
|
|
72761
72761
|
}
|
|
72762
72762
|
}, NM = class extends Error {
|
|
72763
72763
|
constructor() {
|
|
72764
72764
|
super(...arguments);
|
|
72765
|
-
|
|
72765
|
+
Pe(this, "name", "UndefinedParserError");
|
|
72766
72766
|
}
|
|
72767
72767
|
}, x_e = { checkIgnorePragma: { category: "Special", type: "boolean", default: !1, description: "Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.", cliCategory: "Other" }, cursorOffset: { category: "Special", type: "int", default: -1, range: { start: -1, end: 1 / 0, step: 1 }, description: "Print (to stderr) where a cursor at the given position would move to after formatting.", cliCategory: "Editor" }, endOfLine: { category: "Global", type: "choice", default: "lf", description: "Which end of line characters to apply.", choices: [{ value: "lf", description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" }, { value: "crlf", description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows" }, { value: "cr", description: "Carriage Return character only (\\r), used very rarely" }, { value: "auto", description: `Maintain existing
|
|
72768
72768
|
(mixed values within one file are normalised by looking at what's used after the first line)` }] }, filepath: { category: "Special", type: "path", description: "Specify the input filepath. This will be used to do parser inference.", cliName: "stdin-filepath", cliCategory: "Other", cliDescription: "Path to the file to pretend that stdin comes from." }, insertPragma: { category: "Special", type: "boolean", default: !1, description: "Insert @format pragma into file's first docblock comment.", cliCategory: "Other" }, parser: { category: "Global", type: "choice", default: void 0, description: "Which parser to use.", exception: (e) => typeof e == "string" || typeof e == "function", choices: [{ value: "flow", description: "Flow" }, { value: "babel", description: "JavaScript" }, { value: "babel-flow", description: "Flow" }, { value: "babel-ts", description: "TypeScript" }, { value: "typescript", description: "TypeScript" }, { value: "acorn", description: "JavaScript" }, { value: "espree", description: "JavaScript" }, { value: "meriyah", description: "JavaScript" }, { value: "css", description: "CSS" }, { value: "less", description: "Less" }, { value: "scss", description: "SCSS" }, { value: "json", description: "JSON" }, { value: "json5", description: "JSON5" }, { value: "jsonc", description: "JSON with Comments" }, { value: "json-stringify", description: "JSON.stringify" }, { value: "graphql", description: "GraphQL" }, { value: "markdown", description: "Markdown" }, { value: "mdx", description: "MDX" }, { value: "vue", description: "Vue" }, { value: "yaml", description: "YAML" }, { value: "glimmer", description: "Ember / Handlebars" }, { value: "html", description: "HTML" }, { value: "angular", description: "Angular" }, { value: "lwc", description: "Lightning Web Components" }, { value: "mjml", description: "MJML" }] }, plugins: { type: "path", array: !0, default: [{ value: [] }], category: "Global", description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", exception: (e) => typeof e == "string" || typeof e == "object", cliName: "plugin", cliCategory: "Config" }, printWidth: { category: "Global", type: "int", default: 80, description: "The line length where Prettier will try wrap.", range: { start: 0, end: 1 / 0, step: 1 } }, rangeEnd: { category: "Special", type: "int", default: 1 / 0, range: { start: 0, end: 1 / 0, step: 1 }, description: `Format code ending at a given character offset (exclusive).
|
|
@@ -73784,7 +73784,7 @@ Expected it to be ${r}.`;
|
|
|
73784
73784
|
var kTe = class extends Error {
|
|
73785
73785
|
constructor(t) {
|
|
73786
73786
|
super(DTe(t));
|
|
73787
|
-
|
|
73787
|
+
Pe(this, "name", "InvalidDocError");
|
|
73788
73788
|
this.doc = t;
|
|
73789
73789
|
}
|
|
73790
73790
|
}, ETe = kTe;
|
|
@@ -73935,7 +73935,7 @@ var LTe = RTe, UTe = [" ", `
|
|
|
73935
73935
|
`, "\f", "\r", " "], PTe = new LTe(UTe), Zl = PTe, zTe = class extends Error {
|
|
73936
73936
|
constructor(t, n, r = "type") {
|
|
73937
73937
|
super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`);
|
|
73938
|
-
|
|
73938
|
+
Pe(this, "name", "UnexpectedNodeError");
|
|
73939
73939
|
this.node = t;
|
|
73940
73940
|
}
|
|
73941
73941
|
}, $Te = zTe;
|
|
@@ -171155,7 +171155,7 @@ function nte(e) {
|
|
|
171155
171155
|
}
|
|
171156
171156
|
const gd = class gd {
|
|
171157
171157
|
constructor() {
|
|
171158
|
-
|
|
171158
|
+
Pe(this, "_currentZoom", "1");
|
|
171159
171159
|
}
|
|
171160
171160
|
static getInstance() {
|
|
171161
171161
|
return gd.instance || (gd.instance = new gd()), gd.instance;
|
|
@@ -171184,7 +171184,7 @@ const gd = class gd {
|
|
|
171184
171184
|
), !window.matchMedia("(max-width: 1280px)").matches && n in r && t.classList.add(r[n]);
|
|
171185
171185
|
}
|
|
171186
171186
|
};
|
|
171187
|
-
|
|
171187
|
+
Pe(gd, "instance");
|
|
171188
171188
|
let h8 = gd;
|
|
171189
171189
|
const o5 = h8.getInstance(), JHe = (e) => ({
|
|
171190
171190
|
type: "dBlock",
|
|
@@ -173379,7 +173379,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
173379
173379
|
$,
|
|
173380
173380
|
H
|
|
173381
173381
|
]);
|
|
173382
|
-
const In = window.location.hash.startsWith("#") ? window.location.hash.substring(1) : window.location.hash, { isNativeMobile: sn } = Qi(), nt = new URLSearchParams(In), ve = nt.get("heading"),
|
|
173382
|
+
const In = window.location.hash.startsWith("#") ? window.location.hash.substring(1) : window.location.hash, { isNativeMobile: sn } = Qi(), nt = new URLSearchParams(In), ve = nt.get("heading"), ze = ve == null ? void 0 : ve.split("-").pop(), dt = Ce(
|
|
173383
173383
|
(at) => {
|
|
173384
173384
|
if (Ue)
|
|
173385
173385
|
try {
|
|
@@ -173414,14 +173414,14 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
173414
173414
|
[Ue, sn]
|
|
173415
173415
|
);
|
|
173416
173416
|
_e(() => {
|
|
173417
|
-
!o || !
|
|
173418
|
-
dt(
|
|
173417
|
+
!o || !ze || ae || setTimeout(() => {
|
|
173418
|
+
dt(ze);
|
|
173419
173419
|
}, 100);
|
|
173420
173420
|
}, [
|
|
173421
173421
|
Ue,
|
|
173422
173422
|
o,
|
|
173423
173423
|
sn,
|
|
173424
|
-
|
|
173424
|
+
ze,
|
|
173425
173425
|
ae,
|
|
173426
173426
|
dt
|
|
173427
173427
|
]), _e(() => {
|
|
@@ -180186,25 +180186,25 @@ class pXe {
|
|
|
180186
180186
|
// indicates whether the hash was finalized
|
|
180187
180187
|
constructor() {
|
|
180188
180188
|
/** Length of hash output */
|
|
180189
|
-
|
|
180189
|
+
Pe(this, "digestLength", dXe);
|
|
180190
180190
|
/** Block size */
|
|
180191
|
-
|
|
180191
|
+
Pe(this, "blockSize", GL);
|
|
180192
180192
|
// Note: Int32Array is used instead of Uint32Array for performance reasons.
|
|
180193
|
-
|
|
180193
|
+
Pe(this, "_stateHi", new Int32Array(8));
|
|
180194
180194
|
// hash state, high bytes
|
|
180195
|
-
|
|
180195
|
+
Pe(this, "_stateLo", new Int32Array(8));
|
|
180196
180196
|
// hash state, low bytes
|
|
180197
|
-
|
|
180197
|
+
Pe(this, "_tempHi", new Int32Array(16));
|
|
180198
180198
|
// temporary state, high bytes
|
|
180199
|
-
|
|
180199
|
+
Pe(this, "_tempLo", new Int32Array(16));
|
|
180200
180200
|
// temporary state, low bytes
|
|
180201
|
-
|
|
180201
|
+
Pe(this, "_buffer", new Uint8Array(256));
|
|
180202
180202
|
// buffer for data to hash
|
|
180203
|
-
|
|
180203
|
+
Pe(this, "_bufferLength", 0);
|
|
180204
180204
|
// number of bytes in buffer
|
|
180205
|
-
|
|
180205
|
+
Pe(this, "_bytesHashed", 0);
|
|
180206
180206
|
// number of total bytes hashed
|
|
180207
|
-
|
|
180207
|
+
Pe(this, "_finished", !1);
|
|
180208
180208
|
this.reset();
|
|
180209
180209
|
}
|
|
180210
180210
|
_initState() {
|
|
@@ -182363,45 +182363,51 @@ const M8 = zm(p_.p, { sqrt: cYe }), dYe = lYe({ ...p_, Fp: M8, lowS: !0, endo: u
|
|
|
182363
182363
|
};
|
|
182364
182364
|
class pYe {
|
|
182365
182365
|
constructor(t) {
|
|
182366
|
-
|
|
182367
|
-
|
|
182368
|
-
|
|
182369
|
-
|
|
182370
|
-
|
|
182371
|
-
|
|
182372
|
-
|
|
182373
|
-
|
|
182374
|
-
|
|
182375
|
-
|
|
182376
|
-
|
|
182377
|
-
|
|
182378
|
-
|
|
182379
|
-
|
|
182380
|
-
|
|
182381
|
-
|
|
182382
|
-
|
|
182383
|
-
|
|
182384
|
-
|
|
182385
|
-
|
|
182386
|
-
|
|
182387
|
-
|
|
182388
|
-
|
|
182389
|
-
|
|
182390
|
-
|
|
182391
|
-
|
|
182392
|
-
|
|
182393
|
-
|
|
182394
|
-
|
|
182395
|
-
|
|
182396
|
-
|
|
182366
|
+
Pe(this, "_socketUrl");
|
|
182367
|
+
Pe(this, "_restBase");
|
|
182368
|
+
Pe(this, "_lastSessionToken", null);
|
|
182369
|
+
Pe(this, "_socket", null);
|
|
182370
|
+
Pe(this, "_webSocketStatus", wr.CLOSED);
|
|
182371
|
+
Pe(this, "_isIntentionalDisconnect", !1);
|
|
182372
|
+
Pe(this, "_websocketServiceDid", "");
|
|
182373
|
+
Pe(this, "roomId", "");
|
|
182374
|
+
Pe(this, "roomMembers", []);
|
|
182375
|
+
Pe(this, "_lastPresenceSignature", "");
|
|
182376
|
+
Pe(this, "_onPresenceChange");
|
|
182377
|
+
Pe(this, "collaborationKeyPair", null);
|
|
182378
|
+
Pe(this, "ownerKeyPair");
|
|
182379
|
+
Pe(this, "contractAddress");
|
|
182380
|
+
Pe(this, "ownerUcan");
|
|
182381
|
+
Pe(this, "collaborationUcan");
|
|
182382
|
+
Pe(this, "ownerAddress");
|
|
182383
|
+
Pe(this, "ownerIdentityDid");
|
|
182384
|
+
Pe(this, "editLock");
|
|
182385
|
+
Pe(this, "encryptedTitle");
|
|
182386
|
+
Pe(this, "identityToken");
|
|
182387
|
+
Pe(this, "identityContractAddress");
|
|
182388
|
+
Pe(this, "editUcan");
|
|
182389
|
+
Pe(this, "refreshEditClaim");
|
|
182390
|
+
Pe(this, "lastGoodEditUcan");
|
|
182391
|
+
Pe(this, "actorHandle");
|
|
182392
|
+
Pe(this, "roomKey");
|
|
182393
|
+
Pe(this, "roomInfo");
|
|
182394
|
+
Pe(this, "awareness", null);
|
|
182395
|
+
Pe(this, "connectionAttemptErrorCount", 0);
|
|
182396
|
+
Pe(this, "_onHandshakeData", null);
|
|
182397
|
+
Pe(this, "_recomputePresence", () => {
|
|
182397
182398
|
if (!this.isConnected || !this.awareness || !this._onPresenceChange) return;
|
|
182398
182399
|
const t = lXe(this.awareness.getStates()), n = cXe(this.roomMembers, t);
|
|
182399
182400
|
n !== this._lastPresenceSignature && (this._lastPresenceSignature = n, this._onPresenceChange(uXe(this.roomMembers, t)));
|
|
182400
182401
|
});
|
|
182401
|
-
|
|
182402
|
+
Pe(this, "disconnect", () => {
|
|
182402
182403
|
this._isIntentionalDisconnect = !0, this._webSocketStatus = wr.CLOSED, this._socket && (this._socket.disconnect(), this._socket = null, this._webSocketStatus = wr.CLOSED);
|
|
182403
182404
|
});
|
|
182404
|
-
|
|
182405
|
+
// Re-establishes the connection so '/server/handshake' → '/auth' re-runs (re-minting the
|
|
182406
|
+
// editUcan via refreshEditClaim), without tearing down editor/SyncManager state.
|
|
182407
|
+
Pe(this, "reauth", () => {
|
|
182408
|
+
this._socket && (this._socket.connected ? this._socket.disconnect().connect() : this._socket.connect());
|
|
182409
|
+
});
|
|
182410
|
+
Pe(this, "terminateSession", async () => {
|
|
182405
182411
|
var t;
|
|
182406
182412
|
try {
|
|
182407
182413
|
const n = await this.getOwnerToken(), r = {
|
|
@@ -182416,7 +182422,7 @@ class pYe {
|
|
|
182416
182422
|
this.disconnect();
|
|
182417
182423
|
}
|
|
182418
182424
|
});
|
|
182419
|
-
|
|
182425
|
+
Pe(this, "buildSessionToken", async () => {
|
|
182420
182426
|
if (!this._websocketServiceDid)
|
|
182421
182427
|
throw new Error(
|
|
182422
182428
|
"SocketClient: Server did not response with the server DID"
|
|
@@ -182441,7 +182447,7 @@ class pYe {
|
|
|
182441
182447
|
]
|
|
182442
182448
|
}), this._lastSessionToken = $i(this.collaborationUcan), this._lastSessionToken;
|
|
182443
182449
|
});
|
|
182444
|
-
|
|
182450
|
+
Pe(this, "_handleHandShake", async (t, n) => {
|
|
182445
182451
|
var a, l, u;
|
|
182446
182452
|
if (this._websocketServiceDid = t.server_did, this._webSocketStatus === wr.CLOSED || !this.roomId)
|
|
182447
182453
|
throw new Error(
|
|
@@ -182456,7 +182462,12 @@ class pYe {
|
|
|
182456
182462
|
pi(this.roomKey),
|
|
182457
182463
|
new TextEncoder().encode(JSON.stringify(this.roomInfo))
|
|
182458
182464
|
)), this.ownerKeyPair && (o.ownerToken = await this.getOwnerToken()), this.ownerAddress && (o.ownerAddress = this.ownerAddress), this.contractAddress && (o.contractAddress = this.contractAddress), this.ownerIdentityDid && (o.ownerIdentityDid = this.ownerIdentityDid), this.identityToken && (o.identityToken = this.identityToken), this.identityContractAddress && (o.identityContractAddress = this.identityContractAddress);
|
|
182459
|
-
|
|
182465
|
+
let i;
|
|
182466
|
+
if (this.refreshEditClaim) {
|
|
182467
|
+
const c = await this.refreshEditClaim();
|
|
182468
|
+
c.status === "ok" ? (i = c.token, this.lastGoodEditUcan = c.token) : c.status === "unavailable" && (i = this.lastGoodEditUcan ?? this.editUcan);
|
|
182469
|
+
} else
|
|
182470
|
+
i = this.editUcan;
|
|
182460
182471
|
i && (o.editUcan = i), this.actorHandle && (o.actorHandle = this.actorHandle);
|
|
182461
182472
|
const s = await this._emitWithAck("/auth", o);
|
|
182462
182473
|
if ((l = this._onHandshakeData) == null || l.call(this, {
|
|
@@ -182470,7 +182481,7 @@ class pYe {
|
|
|
182470
182481
|
this._webSocketStatus = wr.CONNECTED, n.onHandshakeSuccess(), await this._fetchRoomMembers().catch(() => {
|
|
182471
182482
|
}), this._onPresenceChange = n.onPresenceChange, this.awareness && ((u = this._socket) != null && u.id) && this.awareness.setLocalStateField("socketId", this._socket.id), this._recomputePresence();
|
|
182472
182483
|
});
|
|
182473
|
-
|
|
182484
|
+
Pe(this, "_handleAwarenessUpdate", (t) => {
|
|
182474
182485
|
if (!this.awareness) return;
|
|
182475
182486
|
const n = this.roomKey, r = t.data.position;
|
|
182476
182487
|
if (n)
|
|
@@ -182491,10 +182502,10 @@ class pYe {
|
|
|
182491
182502
|
);
|
|
182492
182503
|
}
|
|
182493
182504
|
});
|
|
182494
|
-
|
|
182505
|
+
Pe(this, "_onSessionTerminated", () => {
|
|
182495
182506
|
this.disconnect(), this.resetSocketClient();
|
|
182496
182507
|
});
|
|
182497
|
-
|
|
182508
|
+
Pe(this, "resetSocketClient", () => {
|
|
182498
182509
|
this._webSocketStatus = wr.CLOSED, this._socket = null, this._websocketServiceDid = "", this.roomId = "", this.roomMembers = [];
|
|
182499
182510
|
});
|
|
182500
182511
|
this._socketUrl = t.wsUrl || "ws://localhost:5000", this._restBase = (t.wsUrl || "http://localhost:5000").replace(/^ws(s?):\/\//, "http$1://").replace(/\/+$/, "");
|
|
@@ -182503,7 +182514,7 @@ class pYe {
|
|
|
182503
182514
|
);
|
|
182504
182515
|
this.roomKey = t.roomKey, this.roomId = t.roomId, this.collaborationKeyPair = Vg.fromSecretKey(
|
|
182505
182516
|
br(n)
|
|
182506
|
-
), t.ownerEdSecret && (this.ownerKeyPair = Vg.fromSecretKey(t.ownerEdSecret)), t.contractAddress && (this.contractAddress = t.contractAddress), t.ownerAddress && (this.ownerAddress = t.ownerAddress), t.ownerIdentityDid && (this.ownerIdentityDid = t.ownerIdentityDid), t.editLock && (this.editLock = t.editLock), t.identityToken && (this.identityToken = t.identityToken), t.identityContractAddress && (this.identityContractAddress = t.identityContractAddress), t.editUcan && (this.editUcan = t.editUcan), t.refreshEditClaim && (this.refreshEditClaim = t.refreshEditClaim), t.actorHandle && (this.actorHandle = t.actorHandle), t.encryptedTitle && (this.encryptedTitle = t.encryptedTitle), t.onHandshakeData && (this._onHandshakeData = t.onHandshakeData), t.roomInfo && (this.roomInfo = t.roomInfo);
|
|
182517
|
+
), t.ownerEdSecret && (this.ownerKeyPair = Vg.fromSecretKey(t.ownerEdSecret)), t.contractAddress && (this.contractAddress = t.contractAddress), t.ownerAddress && (this.ownerAddress = t.ownerAddress), t.ownerIdentityDid && (this.ownerIdentityDid = t.ownerIdentityDid), t.editLock && (this.editLock = t.editLock), t.identityToken && (this.identityToken = t.identityToken), t.identityContractAddress && (this.identityContractAddress = t.identityContractAddress), t.editUcan && (this.editUcan = t.editUcan), this.lastGoodEditUcan = t.editUcan, t.refreshEditClaim && (this.refreshEditClaim = t.refreshEditClaim), t.actorHandle && (this.actorHandle = t.actorHandle), t.encryptedTitle && (this.encryptedTitle = t.encryptedTitle), t.onHandshakeData && (this._onHandshakeData = t.onHandshakeData), t.roomInfo && (this.roomInfo = t.roomInfo);
|
|
182507
182518
|
}
|
|
182508
182519
|
get isConnected() {
|
|
182509
182520
|
return this._webSocketStatus === wr.CONNECTED;
|
|
@@ -182900,34 +182911,34 @@ const _5 = 3;
|
|
|
182900
182911
|
class bYe {
|
|
182901
182912
|
constructor(t, n) {
|
|
182902
182913
|
// --- State machine ---
|
|
182903
|
-
|
|
182904
|
-
|
|
182905
|
-
|
|
182914
|
+
Pe(this, "_status", "idle");
|
|
182915
|
+
Pe(this, "_context", { ...Uu });
|
|
182916
|
+
Pe(this, "_awareness", null);
|
|
182906
182917
|
// --- Internal state ---
|
|
182907
|
-
|
|
182908
|
-
|
|
182909
|
-
|
|
182910
|
-
|
|
182911
|
-
|
|
182912
|
-
|
|
182913
|
-
|
|
182914
|
-
|
|
182915
|
-
|
|
182916
|
-
|
|
182917
|
-
|
|
182918
|
-
|
|
182919
|
-
|
|
182920
|
-
|
|
182921
|
-
|
|
182922
|
-
|
|
182923
|
-
|
|
182924
|
-
|
|
182925
|
-
|
|
182926
|
-
|
|
182918
|
+
Pe(this, "socketClient", null);
|
|
182919
|
+
Pe(this, "roomKey", "");
|
|
182920
|
+
Pe(this, "roomKeyBytes", null);
|
|
182921
|
+
Pe(this, "encryptMirror", null);
|
|
182922
|
+
Pe(this, "fileKeyEpoch", 0);
|
|
182923
|
+
Pe(this, "mirrorIdleTimer", null);
|
|
182924
|
+
Pe(this, "MIRROR_IDLE_MS", 4e3);
|
|
182925
|
+
Pe(this, "isOwner", !1);
|
|
182926
|
+
Pe(this, "updateQueue", []);
|
|
182927
|
+
Pe(this, "contentTobeAppliedQueue", []);
|
|
182928
|
+
Pe(this, "isProcessing", !1);
|
|
182929
|
+
Pe(this, "syncId", 0);
|
|
182930
|
+
Pe(this, "floor", 0);
|
|
182931
|
+
Pe(this, "updatesSinceSnapshot", 0);
|
|
182932
|
+
Pe(this, "isAuthoringSnapshot", !1);
|
|
182933
|
+
Pe(this, "SNAPSHOT_THRESHOLD", 100);
|
|
182934
|
+
Pe(this, "flushTimer", null);
|
|
182935
|
+
Pe(this, "FLUSH_INTERVAL_MS", 50);
|
|
182936
|
+
Pe(this, "MAX_QUEUE_SIZE", 5);
|
|
182937
|
+
Pe(this, "_awarenessUpdateHandler", null);
|
|
182927
182938
|
// --- Config (from constructor) ---
|
|
182928
|
-
|
|
182929
|
-
|
|
182930
|
-
|
|
182939
|
+
Pe(this, "ydoc");
|
|
182940
|
+
Pe(this, "callbacksRef");
|
|
182941
|
+
Pe(this, "onLocalUpdate");
|
|
182931
182942
|
this.onCollabStateChange = n, this.ydoc = t.ydoc, this.callbacksRef = t.callbacks, this.onLocalUpdate = t.onLocalUpdate;
|
|
182932
182943
|
}
|
|
182933
182944
|
/** Called by useSyncManager on every render to keep refs fresh */
|
|
@@ -183093,7 +183104,7 @@ class bYe {
|
|
|
183093
183104
|
(o = this.socketClient) == null || o.sendUpdate({ update: r }).then((i) => {
|
|
183094
183105
|
if (!(i != null && i.status)) {
|
|
183095
183106
|
if (this.isRevocationResponse(i)) {
|
|
183096
|
-
this.
|
|
183107
|
+
this.updateQueue = [...t, ...this.updateQueue], this.handleWriteRevocation(i);
|
|
183097
183108
|
return;
|
|
183098
183109
|
}
|
|
183099
183110
|
console.error("SyncManager: server rejected update", i == null ? void 0 : i.error);
|
|
@@ -183107,6 +183118,17 @@ class bYe {
|
|
|
183107
183118
|
isRevocationResponse(t) {
|
|
183108
183119
|
return (t == null ? void 0 : t.statusCode) === 403 && (t.errorCode === t1.JOIN_DISABLED || t.errorCode === t1.EDIT_REVOKED);
|
|
183109
183120
|
}
|
|
183121
|
+
classifyRevocation(t) {
|
|
183122
|
+
return "soft";
|
|
183123
|
+
}
|
|
183124
|
+
handleWriteRevocation(t) {
|
|
183125
|
+
var n;
|
|
183126
|
+
if (this.classifyRevocation(t) === "terminal") {
|
|
183127
|
+
this.send({ type: "SESSION_TERMINATED", reason: "EDIT_REVOKED" });
|
|
183128
|
+
return;
|
|
183129
|
+
}
|
|
183130
|
+
(this._status === "ready" || this._status === "syncing") && this.send({ type: "SOCKET_DROPPED" }), (n = this.socketClient) == null || n.reauth();
|
|
183131
|
+
}
|
|
183110
183132
|
// Count a successfully-sent update toward the snapshot cadence and author a snapshot once
|
|
183111
183133
|
// the threshold is crossed. Called from every send path — the live batch, the reconnect
|
|
183112
183134
|
// drain, and the full-state rebroadcast — so the reconnect tail can bound itself instead
|
|
@@ -183373,7 +183395,7 @@ class bYe {
|
|
|
183373
183395
|
if (r()) {
|
|
183374
183396
|
if (!(i != null && i.status)) {
|
|
183375
183397
|
if (this.isRevocationResponse(i)) {
|
|
183376
|
-
this.
|
|
183398
|
+
this.handleWriteRevocation(i);
|
|
183377
183399
|
return;
|
|
183378
183400
|
}
|
|
183379
183401
|
const a = (i == null ? void 0 : i.error) || "Server rejected update";
|
|
@@ -183388,7 +183410,7 @@ class bYe {
|
|
|
183388
183410
|
if (!this.isProcessing) {
|
|
183389
183411
|
this.isProcessing = !0;
|
|
183390
183412
|
try {
|
|
183391
|
-
for (; this.updateQueue.length > 0 && this.
|
|
183413
|
+
for (; this.updateQueue.length > 0 && !(this._status !== "ready" && this._status !== "syncing"); )
|
|
183392
183414
|
await this.processNextUpdate();
|
|
183393
183415
|
this.isConnected || await this.disconnectInternal();
|
|
183394
183416
|
} catch (t) {
|
|
@@ -183413,7 +183435,7 @@ class bYe {
|
|
|
183413
183435
|
}));
|
|
183414
183436
|
if (!(a != null && a.status)) {
|
|
183415
183437
|
if (this.isRevocationResponse(a)) {
|
|
183416
|
-
this.
|
|
183438
|
+
this.handleWriteRevocation(a);
|
|
183417
183439
|
return;
|
|
183418
183440
|
}
|
|
183419
183441
|
const l = (a == null ? void 0 : a.error) || "Server rejected update";
|
|
@@ -194406,7 +194428,7 @@ const JJe = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], QJe = ZJe("Chevro
|
|
|
194406
194428
|
),
|
|
194407
194429
|
t && /* @__PURE__ */ x.jsx("pre", { className: "m-0 px-3 pb-2 text-[11px] leading-relaxed font-mono color-text-secondary whitespace-pre-wrap break-words max-h-40 overflow-auto select-text", children: r })
|
|
194408
194430
|
] }) : null;
|
|
194409
|
-
}, tQe = IU(() => import("./markdown-source-pane-
|
|
194431
|
+
}, tQe = IU(() => import("./markdown-source-pane-aEnkDOx7.mjs")), nQe = IU(() => import("./split-view-toolbar-Y4c84oHs.mjs")), rQe = ({
|
|
194410
194432
|
markdown: e,
|
|
194411
194433
|
onMarkdownChange: t,
|
|
194412
194434
|
ipfsImageUploadFn: n,
|
|
@@ -194773,7 +194795,7 @@ const JJe = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], QJe = ZJe("Chevro
|
|
|
194773
194795
|
canvas: Object.keys(qe).length > 0 ? qe : void 0,
|
|
194774
194796
|
background: Object.keys(Ot).length > 0 ? Ot : void 0
|
|
194775
194797
|
};
|
|
194776
|
-
})(), ve = () => nt.canvas,
|
|
194798
|
+
})(), ve = () => nt.canvas, ze = () => nt.background, dt = Se(null), qt = Se(null), at = Se(null), { isBelow1280px: it, isNativeMobile: vt } = Qi(), [Ft, $t] = Be(!1), fn = Se(null), Bt = (D == null ? void 0 : D.slice(0, 4)) || [], _n = D ? Math.max(0, D.length - 4) : 0;
|
|
194777
194799
|
Lf(fn, () => {
|
|
194778
194800
|
$t(!1);
|
|
194779
194801
|
}), _e(() => {
|
|
@@ -195660,7 +195682,7 @@ const JJe = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], QJe = ZJe("Chevro
|
|
|
195660
195682
|
z ? "color-bg-default" : "color-bg-secondary",
|
|
195661
195683
|
ie
|
|
195662
195684
|
),
|
|
195663
|
-
style: Oe ? void 0 :
|
|
195685
|
+
style: Oe ? void 0 : ze(),
|
|
195664
195686
|
children: [
|
|
195665
195687
|
/* @__PURE__ */ x.jsx(KJe, { editor: lt, viewerMode: t }),
|
|
195666
195688
|
/* @__PURE__ */ x.jsxs(
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as e, a as o, E as t, P as d, f as r, h as i, m as n, e as E, c as m, d as u, u as C, v as l } from "./index-
|
|
1
|
+
import { D as e, a as o, E as t, P as d, f as r, h as i, m as n, e as E, c as m, d as u, u as C, v as l } from "./index-DyCMrsW4.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as DdocEditor,
|
|
4
4
|
o as DdocExportModal,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var Vr = Object.defineProperty;
|
|
2
2
|
var Wr = (t, e, O) => e in t ? Vr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: O }) : t[e] = O;
|
|
3
3
|
var gt = (t, e, O) => Wr(t, typeof e != "symbol" ? e + "" : e, O);
|
|
4
|
-
import { j as Cr } from "./index-
|
|
4
|
+
import { j as Cr } from "./index-DyCMrsW4.mjs";
|
|
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-Cj6IqS3E.mjs";
|
|
7
7
|
class ua {
|
|
8
8
|
/**
|
|
9
9
|
Create a new completion context. (Mostly useful for testing
|
|
@@ -14,7 +14,14 @@ interface ISocketClientConfig {
|
|
|
14
14
|
identityToken?: string;
|
|
15
15
|
identityContractAddress?: string;
|
|
16
16
|
editUcan?: string;
|
|
17
|
-
refreshEditClaim?: () => Promise<
|
|
17
|
+
refreshEditClaim?: () => Promise<{
|
|
18
|
+
status: 'ok';
|
|
19
|
+
token: string;
|
|
20
|
+
} | {
|
|
21
|
+
status: 'demoted';
|
|
22
|
+
} | {
|
|
23
|
+
status: 'unavailable';
|
|
24
|
+
}>;
|
|
18
25
|
actorHandle?: string;
|
|
19
26
|
onHandshakeData?: (response: {
|
|
20
27
|
data: AckResponse;
|
|
@@ -53,6 +60,7 @@ export declare class SocketClient {
|
|
|
53
60
|
private identityContractAddress?;
|
|
54
61
|
private editUcan?;
|
|
55
62
|
private refreshEditClaim?;
|
|
63
|
+
private lastGoodEditUcan?;
|
|
56
64
|
private actorHandle?;
|
|
57
65
|
private roomKey;
|
|
58
66
|
private roomInfo?;
|
|
@@ -80,6 +88,7 @@ export declare class SocketClient {
|
|
|
80
88
|
setDocumentMeta(): Promise<void>;
|
|
81
89
|
broadcastAwareness(awarenessUpdate: string): Promise<void>;
|
|
82
90
|
disconnect: () => void;
|
|
91
|
+
reauth: () => void;
|
|
83
92
|
terminateSession: () => Promise<void>;
|
|
84
93
|
flushBeacon(mergedUpdate: string): void;
|
|
85
94
|
private getCollaborationKeyPair;
|
|
@@ -25,10 +25,17 @@ export interface CollabConnectionConfig {
|
|
|
25
25
|
* server admits this connection as a GP-rail editor. Opaque to the package. */
|
|
26
26
|
editUcan?: string;
|
|
27
27
|
/** Host signal (non-owner editor): re-mints a CURRENT-epoch editUcan. Called at every /auth
|
|
28
|
-
* (incl. reconnect after a force-drop)
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
refreshEditClaim?: () => Promise<
|
|
28
|
+
* (incl. reconnect after a force-drop). Tri-state: `ok` (fresh token; overrides the static
|
|
29
|
+
* `editUcan`), `demoted` (no longer an editor → terminal, drop to viewer), or `unavailable`
|
|
30
|
+
* (transient/network → retry on the last-good claim). Opaque to the package. */
|
|
31
|
+
refreshEditClaim?: () => Promise<{
|
|
32
|
+
status: 'ok';
|
|
33
|
+
token: string;
|
|
34
|
+
} | {
|
|
35
|
+
status: 'demoted';
|
|
36
|
+
} | {
|
|
37
|
+
status: 'unavailable';
|
|
38
|
+
}>;
|
|
32
39
|
/** Host signal: an anonymous per-connection actor handle (public rail). Record-only; opaque. */
|
|
33
40
|
actorHandle?: string;
|
|
34
41
|
/** Host signal (editor): produces the view-plane mirror ciphertext from the live Yjs state. The app
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as d } from "./index-
|
|
1
|
+
import { j as d } from "./index-DyCMrsW4.mjs";
|
|
2
2
|
import { useRef as I, useState as N, useEffect as D } from "react";
|
|
3
3
|
import { DynamicDropdown as E, Tooltip as R, IconButton as O } from "@fileverse/ui";
|
|
4
|
-
import { a3 as A, a4 as P, c as y } from "./index-
|
|
4
|
+
import { a3 as A, a4 as P, c as y } from "./index-Cj6IqS3E.mjs";
|
|
5
5
|
const p = (e, t, o = t) => {
|
|
6
6
|
const { state: s } = e, l = s.changeByRange((n) => {
|
|
7
7
|
const u = s.sliceDoc(n.from, n.to), r = s.sliceDoc(
|