@fileverse-dev/ddoc 3.0.96-zustand-35 → 3.0.96-zustand-40
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.es.js +184 -176
- package/dist/package/stores/comment-store.d.ts +3 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var gQ = Object.defineProperty;
|
|
2
2
|
var mQ = (e, t, n) => t in e ? gQ(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var ct = (e, t, n) => mQ(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import * as
|
|
4
|
+
import * as kn from "react";
|
|
5
5
|
import wt, { createRef as bQ, memo as O1, createContext as Cd, createElement as C2, useContext as _d, version as xC, useRef as Ne, useState as Be, useDebugValue as YD, useEffect as Ae, forwardRef as ir, useLayoutEffect as kh, useCallback as je, useMemo as Ct, Fragment as yQ, useReducer as xQ, cloneElement as yI, useImperativeHandle as xI } from "react";
|
|
6
6
|
import vI, { flushSync as vQ, createPortal as Ny } from "react-dom";
|
|
7
7
|
import { Drawer as FI, DrawerContent as FQ, DrawerHeader as wQ, DrawerTitle as DQ, DrawerClose as kQ, LucideIcon as Re, useTheme as EQ, Button as Tt, TextField as Su, DynamicDropdown as qr, Tooltip as ln, IconButton as un, Dialog as CQ, DialogContent as _Q, cn as qe, DialogHeader as AQ, DialogTitle as SQ, DialogFooter as TQ, DialogClose as jQ, Avatar as Ad, Skeleton as xr, TextAreaFieldV2 as Jc, DynamicModal as ZD, Select as Qc, SelectTrigger as ed, SelectValue as zp, SelectContent as td, SelectItem as nd, DynamicDropdownV2 as My, Popover as Df, PopoverTrigger as kf, PopoverContent as Ef, toast as JD, ButtonGroup as BQ, Divider as $p, UltimateIcons as NQ, PopoverClose as wI, SelectGroup as DI, SelectLabel as MQ, Checkbox as OQ, DrawerTrigger as vC, AnimatedLoader as IQ, Label as RQ, DynamicDrawerV2 as LQ, BottomDrawer as UQ, Tag as _2, TagInput as kI } from "@fileverse/ui";
|
|
@@ -607,7 +607,7 @@ Check the top-level render call using <` + ot + ">.");
|
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
609
|
var Zt = {};
|
|
610
|
-
function
|
|
610
|
+
function Dn(ve, Oe, ot, gt, Jt, nn) {
|
|
611
611
|
{
|
|
612
612
|
var Vt = O(ve);
|
|
613
613
|
if (!Vt) {
|
|
@@ -652,10 +652,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
654
|
function qn(ve, Oe, ot) {
|
|
655
|
-
return
|
|
655
|
+
return Dn(ve, Oe, ot, !0);
|
|
656
656
|
}
|
|
657
657
|
function dn(ve, Oe, ot) {
|
|
658
|
-
return
|
|
658
|
+
return Dn(ve, Oe, ot, !1);
|
|
659
659
|
}
|
|
660
660
|
var an = dn, Vn = qn;
|
|
661
661
|
o0.Fragment = r, o0.jsx = an, o0.jsxs = Vn;
|
|
@@ -8821,7 +8821,7 @@ class O2 {
|
|
|
8821
8821
|
}
|
|
8822
8822
|
map(t, n, r, o) {
|
|
8823
8823
|
let { pos: i, deleted: s } = t.mapResult(n.from + o, this.side < 0 ? -1 : 1);
|
|
8824
|
-
return s ? null : new
|
|
8824
|
+
return s ? null : new En(i - r, i - r, this);
|
|
8825
8825
|
}
|
|
8826
8826
|
valid() {
|
|
8827
8827
|
return !0;
|
|
@@ -8839,7 +8839,7 @@ class vu {
|
|
|
8839
8839
|
}
|
|
8840
8840
|
map(t, n, r, o) {
|
|
8841
8841
|
let i = t.map(n.from + o, this.spec.inclusiveStart ? -1 : 1) - r, s = t.map(n.to + o, this.spec.inclusiveEnd ? 1 : -1) - r;
|
|
8842
|
-
return i >= s ? null : new
|
|
8842
|
+
return i >= s ? null : new En(i, s, this);
|
|
8843
8843
|
}
|
|
8844
8844
|
valid(t, n) {
|
|
8845
8845
|
return n.from < n.to;
|
|
@@ -8862,7 +8862,7 @@ let Une = class GR {
|
|
|
8862
8862
|
if (i.deleted)
|
|
8863
8863
|
return null;
|
|
8864
8864
|
let s = t.mapResult(n.to + o, -1);
|
|
8865
|
-
return s.deleted || s.pos <= i.pos ? null : new
|
|
8865
|
+
return s.deleted || s.pos <= i.pos ? null : new En(i.pos - r, s.pos - r, this);
|
|
8866
8866
|
}
|
|
8867
8867
|
valid(t, n) {
|
|
8868
8868
|
let { index: r, offset: o } = t.content.findIndex(n.from), i;
|
|
@@ -8874,7 +8874,7 @@ let Une = class GR {
|
|
|
8874
8874
|
destroy() {
|
|
8875
8875
|
}
|
|
8876
8876
|
};
|
|
8877
|
-
class
|
|
8877
|
+
class En {
|
|
8878
8878
|
/**
|
|
8879
8879
|
@internal
|
|
8880
8880
|
*/
|
|
@@ -8885,7 +8885,7 @@ class Dn {
|
|
|
8885
8885
|
@internal
|
|
8886
8886
|
*/
|
|
8887
8887
|
copy(t, n) {
|
|
8888
|
-
return new
|
|
8888
|
+
return new En(t, n, this.type);
|
|
8889
8889
|
}
|
|
8890
8890
|
/**
|
|
8891
8891
|
@internal
|
|
@@ -8908,14 +8908,14 @@ class Dn {
|
|
|
8908
8908
|
widget's current document position.
|
|
8909
8909
|
*/
|
|
8910
8910
|
static widget(t, n, r) {
|
|
8911
|
-
return new
|
|
8911
|
+
return new En(t, t, new O2(n, r));
|
|
8912
8912
|
}
|
|
8913
8913
|
/**
|
|
8914
8914
|
Creates an inline decoration, which adds the given attributes to
|
|
8915
8915
|
each inline node between `from` and `to`.
|
|
8916
8916
|
*/
|
|
8917
8917
|
static inline(t, n, r, o) {
|
|
8918
|
-
return new
|
|
8918
|
+
return new En(t, n, new vu(r, o));
|
|
8919
8919
|
}
|
|
8920
8920
|
/**
|
|
8921
8921
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -8923,7 +8923,7 @@ class Dn {
|
|
|
8923
8923
|
node, will receive the given attributes.
|
|
8924
8924
|
*/
|
|
8925
8925
|
static node(t, n, r, o) {
|
|
8926
|
-
return new
|
|
8926
|
+
return new En(t, n, new Une(r, o));
|
|
8927
8927
|
}
|
|
8928
8928
|
/**
|
|
8929
8929
|
The spec provided when creating this decoration. Can be useful
|
|
@@ -8946,7 +8946,7 @@ class Dn {
|
|
|
8946
8946
|
}
|
|
8947
8947
|
}
|
|
8948
8948
|
const up = [], $c = {};
|
|
8949
|
-
class
|
|
8949
|
+
class zt {
|
|
8950
8950
|
/**
|
|
8951
8951
|
@internal
|
|
8952
8952
|
*/
|
|
@@ -9000,7 +9000,7 @@ class Pt {
|
|
|
9000
9000
|
let l = this.local[a].map(t, r, o);
|
|
9001
9001
|
l && l.type.valid(n, l) ? (s || (s = [])).push(l) : i.onRemove && i.onRemove(this.local[a].spec);
|
|
9002
9002
|
}
|
|
9003
|
-
return this.children.length ? Pne(this.children, s || [], t, n, r, o, i) : s ? new
|
|
9003
|
+
return this.children.length ? Pne(this.children, s || [], t, n, r, o, i) : s ? new zt(s.sort(Hc), up) : no;
|
|
9004
9004
|
}
|
|
9005
9005
|
/**
|
|
9006
9006
|
Add the given array of decorations to the ones in the set,
|
|
@@ -9009,7 +9009,7 @@ class Pt {
|
|
|
9009
9009
|
structure.
|
|
9010
9010
|
*/
|
|
9011
9011
|
add(t, n) {
|
|
9012
|
-
return n.length ? this == no ?
|
|
9012
|
+
return n.length ? this == no ? zt.create(t, n) : this.addInner(t, n, 0) : this;
|
|
9013
9013
|
}
|
|
9014
9014
|
addInner(t, n, r) {
|
|
9015
9015
|
let o, i = 0;
|
|
@@ -9024,7 +9024,7 @@ class Pt {
|
|
|
9024
9024
|
let s = KR(i ? YR(n) : n, -r);
|
|
9025
9025
|
for (let a = 0; a < s.length; a++)
|
|
9026
9026
|
s[a].type.valid(t, s[a]) || s.splice(a--, 1);
|
|
9027
|
-
return new
|
|
9027
|
+
return new zt(s.length ? this.local.concat(s).sort(Hc) : this.local, o || this.children);
|
|
9028
9028
|
}
|
|
9029
9029
|
/**
|
|
9030
9030
|
Create a new set that contains the decorations in this set, minus
|
|
@@ -9051,13 +9051,13 @@ class Pt {
|
|
|
9051
9051
|
for (let a = 0; a < o.length; a++)
|
|
9052
9052
|
o[a].eq(s, n) && (o == this.local && (o = this.local.slice()), o.splice(a--, 1));
|
|
9053
9053
|
}
|
|
9054
|
-
return r == this.children && o == this.local ? this : o.length || r.length ? new
|
|
9054
|
+
return r == this.children && o == this.local ? this : o.length || r.length ? new zt(o, r) : no;
|
|
9055
9055
|
}
|
|
9056
9056
|
forChild(t, n) {
|
|
9057
9057
|
if (this == no)
|
|
9058
9058
|
return this;
|
|
9059
9059
|
if (n.isLeaf)
|
|
9060
|
-
return
|
|
9060
|
+
return zt.empty;
|
|
9061
9061
|
let r, o;
|
|
9062
9062
|
for (let a = 0; a < this.children.length; a += 3)
|
|
9063
9063
|
if (this.children[a] >= t) {
|
|
@@ -9073,7 +9073,7 @@ class Pt {
|
|
|
9073
9073
|
}
|
|
9074
9074
|
}
|
|
9075
9075
|
if (o) {
|
|
9076
|
-
let a = new
|
|
9076
|
+
let a = new zt(o.sort(Hc), up);
|
|
9077
9077
|
return r ? new nu([a, r]) : a;
|
|
9078
9078
|
}
|
|
9079
9079
|
return r || no;
|
|
@@ -9084,7 +9084,7 @@ class Pt {
|
|
|
9084
9084
|
eq(t) {
|
|
9085
9085
|
if (this == t)
|
|
9086
9086
|
return !0;
|
|
9087
|
-
if (!(t instanceof
|
|
9087
|
+
if (!(t instanceof zt) || this.local.length != t.local.length || this.children.length != t.children.length)
|
|
9088
9088
|
return !1;
|
|
9089
9089
|
for (let n = 0; n < this.local.length; n++)
|
|
9090
9090
|
if (!this.local[n].eq(t.local[n]))
|
|
@@ -9117,9 +9117,9 @@ class Pt {
|
|
|
9117
9117
|
t(this);
|
|
9118
9118
|
}
|
|
9119
9119
|
}
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
const no =
|
|
9120
|
+
zt.empty = new zt([], []);
|
|
9121
|
+
zt.removeOverlap = yk;
|
|
9122
|
+
const no = zt.empty;
|
|
9123
9123
|
class nu {
|
|
9124
9124
|
constructor(t) {
|
|
9125
9125
|
this.members = t;
|
|
@@ -9130,7 +9130,7 @@ class nu {
|
|
|
9130
9130
|
}
|
|
9131
9131
|
forChild(t, n) {
|
|
9132
9132
|
if (n.isLeaf)
|
|
9133
|
-
return
|
|
9133
|
+
return zt.empty;
|
|
9134
9134
|
let r = [];
|
|
9135
9135
|
for (let o = 0; o < this.members.length; o++) {
|
|
9136
9136
|
let i = this.members[o].forChild(t, n);
|
|
@@ -9170,7 +9170,7 @@ class nu {
|
|
|
9170
9170
|
case 1:
|
|
9171
9171
|
return t[0];
|
|
9172
9172
|
default:
|
|
9173
|
-
return new nu(t.every((n) => n instanceof
|
|
9173
|
+
return new nu(t.every((n) => n instanceof zt) ? t : t.reduce((n, r) => n.concat(r instanceof zt ? r : r.members), []));
|
|
9174
9174
|
}
|
|
9175
9175
|
}
|
|
9176
9176
|
forEachSet(t) {
|
|
@@ -9225,7 +9225,7 @@ function Pne(e, t, n, r, o, i, s) {
|
|
|
9225
9225
|
a.splice(p, 0, c.children[d], c.children[d + 1], c.children[d + 2]);
|
|
9226
9226
|
}
|
|
9227
9227
|
}
|
|
9228
|
-
return new
|
|
9228
|
+
return new zt(t.sort(Hc), a);
|
|
9229
9229
|
}
|
|
9230
9230
|
function KR(e, t) {
|
|
9231
9231
|
if (!t || !e.length)
|
|
@@ -9233,7 +9233,7 @@ function KR(e, t) {
|
|
|
9233
9233
|
let n = [];
|
|
9234
9234
|
for (let r = 0; r < e.length; r++) {
|
|
9235
9235
|
let o = e[r];
|
|
9236
|
-
n.push(new
|
|
9236
|
+
n.push(new En(o.from + t, o.to + t, o.type));
|
|
9237
9237
|
}
|
|
9238
9238
|
return n;
|
|
9239
9239
|
}
|
|
@@ -9277,7 +9277,7 @@ function I2(e, t, n, r) {
|
|
|
9277
9277
|
let s = KR(i ? YR(e) : e, -n).sort(Hc);
|
|
9278
9278
|
for (let a = 0; a < s.length; a++)
|
|
9279
9279
|
s[a].type.valid(t, s[a]) || (r.onRemove && r.onRemove(s[a].spec), s.splice(a--, 1));
|
|
9280
|
-
return s.length || o.length ? new
|
|
9280
|
+
return s.length || o.length ? new zt(s, o) : no;
|
|
9281
9281
|
}
|
|
9282
9282
|
function Hc(e, t) {
|
|
9283
9283
|
return e.from - t.from || e.to - t.to;
|
|
@@ -9310,7 +9310,7 @@ function bv(e) {
|
|
|
9310
9310
|
return e.someProp("decorations", (n) => {
|
|
9311
9311
|
let r = n(e.state);
|
|
9312
9312
|
r && r != no && t.push(r);
|
|
9313
|
-
}), e.cursorWrapper && t.push(
|
|
9313
|
+
}), e.cursorWrapper && t.push(zt.create(e.state.doc, [e.cursorWrapper.deco])), nu.from(t);
|
|
9314
9314
|
}
|
|
9315
9315
|
const $ne = {
|
|
9316
9316
|
childList: !0,
|
|
@@ -10043,12 +10043,12 @@ function x_(e) {
|
|
|
10043
10043
|
if (typeof n == "function" && (n = n(e.state)), n)
|
|
10044
10044
|
for (let r in n)
|
|
10045
10045
|
r == "class" ? t.class += " " + n[r] : r == "style" ? t.style = (t.style ? t.style + ";" : "") + n[r] : !t[r] && r != "contenteditable" && r != "nodeName" && (t[r] = String(n[r]));
|
|
10046
|
-
}), t.translate || (t.translate = "no"), [
|
|
10046
|
+
}), t.translate || (t.translate = "no"), [En.node(0, e.state.doc.content.size, t)];
|
|
10047
10047
|
}
|
|
10048
10048
|
function v_(e) {
|
|
10049
10049
|
if (e.markCursor) {
|
|
10050
10050
|
let t = document.createElement("img");
|
|
10051
|
-
t.className = "ProseMirror-separator", t.setAttribute("mark-placeholder", "true"), t.setAttribute("alt", ""), e.cursorWrapper = { dom: t, deco:
|
|
10051
|
+
t.className = "ProseMirror-separator", t.setAttribute("mark-placeholder", "true"), t.setAttribute("alt", ""), e.cursorWrapper = { dom: t, deco: En.widget(e.state.selection.from, t, { raw: !0, marks: e.markCursor }) };
|
|
10052
10052
|
} else
|
|
10053
10053
|
e.cursorWrapper = null;
|
|
10054
10054
|
}
|
|
@@ -16243,9 +16243,9 @@ function kse(e) {
|
|
|
16243
16243
|
const t = [];
|
|
16244
16244
|
return e.selection.forEachCell((n, r) => {
|
|
16245
16245
|
t.push(
|
|
16246
|
-
|
|
16246
|
+
En.node(r, r + n.nodeSize, { class: "selectedCell" })
|
|
16247
16247
|
);
|
|
16248
|
-
}),
|
|
16248
|
+
}), zt.create(e.doc, t);
|
|
16249
16249
|
}
|
|
16250
16250
|
function Ese({ $from: e, $to: t }) {
|
|
16251
16251
|
if (e.pos == t.pos || e.pos < t.pos - 6) return !1;
|
|
@@ -17406,24 +17406,24 @@ function cae(e, t) {
|
|
|
17406
17406
|
var n;
|
|
17407
17407
|
const r = [], o = e.doc.resolve(t), i = o.node(-1);
|
|
17408
17408
|
if (!i)
|
|
17409
|
-
return
|
|
17409
|
+
return zt.empty;
|
|
17410
17410
|
const s = Qn.get(i), a = o.start(-1), l = s.colCount(o.pos - a) + o.nodeAfter.attrs.colspan - 1;
|
|
17411
17411
|
for (let u = 0; u < s.height; u++) {
|
|
17412
17412
|
const c = l + u * s.width;
|
|
17413
17413
|
if ((l == s.width - 1 || s.map[c] != s.map[c + 1]) && (u == 0 || s.map[c] != s.map[c - s.width])) {
|
|
17414
17414
|
const d = s.map[c], p = a + d + i.nodeAt(d).nodeSize - 1, h = document.createElement("div");
|
|
17415
17415
|
h.className = "column-resize-handle", (n = yi.getState(e)) != null && n.dragging && r.push(
|
|
17416
|
-
|
|
17416
|
+
En.node(
|
|
17417
17417
|
a + d,
|
|
17418
17418
|
a + d + i.nodeAt(d).nodeSize,
|
|
17419
17419
|
{
|
|
17420
17420
|
class: "column-resize-dragging"
|
|
17421
17421
|
}
|
|
17422
17422
|
)
|
|
17423
|
-
), r.push(
|
|
17423
|
+
), r.push(En.widget(p, h));
|
|
17424
17424
|
}
|
|
17425
17425
|
}
|
|
17426
|
-
return
|
|
17426
|
+
return zt.create(e.doc, r);
|
|
17427
17427
|
}
|
|
17428
17428
|
function dae({
|
|
17429
17429
|
allowTableNodeSelection: e = !1
|
|
@@ -18027,7 +18027,7 @@ const bU = (e) => Pk(e).buffer, M5 = (e) => {
|
|
|
18027
18027
|
key: bp,
|
|
18028
18028
|
state: {
|
|
18029
18029
|
init() {
|
|
18030
|
-
return
|
|
18030
|
+
return zt.empty;
|
|
18031
18031
|
},
|
|
18032
18032
|
apply(e, t) {
|
|
18033
18033
|
t = t.map(e.mapping, e.doc);
|
|
@@ -18035,7 +18035,7 @@ const bU = (e) => Pk(e).buffer, M5 = (e) => {
|
|
|
18035
18035
|
if (n && n.add) {
|
|
18036
18036
|
const { id: r, pos: o, content: i } = n.add, s = document.createElement("div");
|
|
18037
18037
|
s.setAttribute("class", "img-placeholder"), s.textContent = i;
|
|
18038
|
-
const a =
|
|
18038
|
+
const a = En.widget(o + 1, s, {
|
|
18039
18039
|
id: r
|
|
18040
18040
|
});
|
|
18041
18041
|
t = t.add(e.doc, [a]);
|
|
@@ -34017,7 +34017,7 @@ const jd = () => new G1(), Cde = (e) => {
|
|
|
34017
34017
|
}, Cr = (e, t) => {
|
|
34018
34018
|
const n = e.cbuf.length;
|
|
34019
34019
|
e.cpos === n && (e.bufs.push(e.cbuf), e.cbuf = new Uint8Array(n * 2), e.cpos = 0), e.cbuf[e.cpos++] = t;
|
|
34020
|
-
}, Gf = Cr,
|
|
34020
|
+
}, Gf = Cr, Pt = (e, t) => {
|
|
34021
34021
|
for (; t > Wc; )
|
|
34022
34022
|
Cr(e, Ao | Wc & t), t = ba(t / 128);
|
|
34023
34023
|
Cr(e, Wc & t);
|
|
@@ -34028,14 +34028,14 @@ const jd = () => new G1(), Cde = (e) => {
|
|
|
34028
34028
|
}, nw = new Uint8Array(3e4), Sde = nw.length / 3, Tde = (e, t) => {
|
|
34029
34029
|
if (t.length < Sde) {
|
|
34030
34030
|
const n = Vf.encodeInto(t, nw).written || 0;
|
|
34031
|
-
|
|
34031
|
+
Pt(e, n);
|
|
34032
34032
|
for (let r = 0; r < n; r++)
|
|
34033
34033
|
Cr(e, nw[r]);
|
|
34034
34034
|
} else
|
|
34035
34035
|
hi(e, Ede(t));
|
|
34036
34036
|
}, jde = (e, t) => {
|
|
34037
34037
|
const n = unescape(encodeURIComponent(t)), r = n.length;
|
|
34038
|
-
|
|
34038
|
+
Pt(e, r);
|
|
34039
34039
|
for (let o = 0; o < r; o++)
|
|
34040
34040
|
Cr(
|
|
34041
34041
|
e,
|
|
@@ -34047,7 +34047,7 @@ Vf.encodeInto ? Tde : jde, bx = (e, t) => {
|
|
|
34047
34047
|
const n = e.cbuf.length, r = e.cpos, o = ul(n - r, t.length), i = t.length - o;
|
|
34048
34048
|
e.cbuf.set(t.subarray(0, o), r), e.cpos += o, i > 0 && (e.bufs.push(e.cbuf), e.cbuf = new Uint8Array(_s(n * 2, i)), e.cbuf.set(t.subarray(o)), e.cpos = i);
|
|
34049
34049
|
}, hi = (e, t) => {
|
|
34050
|
-
|
|
34050
|
+
Pt(e, t.byteLength), bx(e, t);
|
|
34051
34051
|
}, g8 = (e, t) => {
|
|
34052
34052
|
Ade(e, t);
|
|
34053
34053
|
const n = new DataView(e.cbuf.buffer, e.cpos, t);
|
|
@@ -34070,7 +34070,7 @@ Vf.encodeInto ? Tde : jde, bx = (e, t) => {
|
|
|
34070
34070
|
if (t === null)
|
|
34071
34071
|
Cr(e, 126);
|
|
34072
34072
|
else if (ew(t)) {
|
|
34073
|
-
Cr(e, 117),
|
|
34073
|
+
Cr(e, 117), Pt(e, t.length);
|
|
34074
34074
|
for (let n = 0; n < t.length; n++)
|
|
34075
34075
|
Qp(e, t[n]);
|
|
34076
34076
|
} else if (t instanceof Uint8Array)
|
|
@@ -34078,7 +34078,7 @@ Vf.encodeInto ? Tde : jde, bx = (e, t) => {
|
|
|
34078
34078
|
else {
|
|
34079
34079
|
Cr(e, 118);
|
|
34080
34080
|
const n = Object.keys(t);
|
|
34081
|
-
|
|
34081
|
+
Pt(e, n.length);
|
|
34082
34082
|
for (let r = 0; r < n.length; r++) {
|
|
34083
34083
|
const o = n[r];
|
|
34084
34084
|
wu(e, o), Qp(e, t[o]);
|
|
@@ -34103,11 +34103,11 @@ class QA extends G1 {
|
|
|
34103
34103
|
* @param {T} v
|
|
34104
34104
|
*/
|
|
34105
34105
|
write(t) {
|
|
34106
|
-
this.s === t ? this.count++ : (this.count > 0 &&
|
|
34106
|
+
this.s === t ? this.count++ : (this.count > 0 && Pt(this, this.count - 1), this.count = 1, this.w(this, t), this.s = t);
|
|
34107
34107
|
}
|
|
34108
34108
|
}
|
|
34109
34109
|
const eS = (e) => {
|
|
34110
|
-
e.count > 0 && (mx(e.encoder, e.count === 1 ? e.s : -e.s), e.count > 1 &&
|
|
34110
|
+
e.count > 0 && (mx(e.encoder, e.count === 1 ? e.s : -e.s), e.count > 1 && Pt(e.encoder, e.count - 2));
|
|
34111
34111
|
};
|
|
34112
34112
|
class s2 {
|
|
34113
34113
|
constructor() {
|
|
@@ -34131,7 +34131,7 @@ class s2 {
|
|
|
34131
34131
|
const tS = (e) => {
|
|
34132
34132
|
if (e.count > 0) {
|
|
34133
34133
|
const t = e.diff * 2 + (e.count === 1 ? 0 : 1);
|
|
34134
|
-
mx(e.encoder, t), e.count > 1 &&
|
|
34134
|
+
mx(e.encoder, t), e.count > 1 && Pt(e.encoder, e.count - 2);
|
|
34135
34135
|
}
|
|
34136
34136
|
};
|
|
34137
34137
|
class Gv {
|
|
@@ -34668,10 +34668,10 @@ const Lu = (e, t, n) => t.clients.forEach((r, o) => {
|
|
|
34668
34668
|
o.length > 0 && t.clients.set(r, o);
|
|
34669
34669
|
}), t;
|
|
34670
34670
|
}, Mh = (e, t) => {
|
|
34671
|
-
|
|
34672
|
-
e.resetDsCurVal(),
|
|
34671
|
+
Pt(e.restEncoder, t.clients.size), ml(t.clients.entries()).sort((n, r) => r[0] - n[0]).forEach(([n, r]) => {
|
|
34672
|
+
e.resetDsCurVal(), Pt(e.restEncoder, n);
|
|
34673
34673
|
const o = r.length;
|
|
34674
|
-
|
|
34674
|
+
Pt(e.restEncoder, o);
|
|
34675
34675
|
for (let i = 0; i < o; i++) {
|
|
34676
34676
|
const s = r[i];
|
|
34677
34677
|
e.writeDsClock(s.clock), e.writeDsLen(s.len);
|
|
@@ -34710,7 +34710,7 @@ const Lu = (e, t, n) => t.clients.forEach((r, o) => {
|
|
|
34710
34710
|
}
|
|
34711
34711
|
if (r.clients.size > 0) {
|
|
34712
34712
|
const i = new cd();
|
|
34713
|
-
return
|
|
34713
|
+
return Pt(i.restEncoder, 0), Mh(i, r), i.toUint8Array();
|
|
34714
34714
|
}
|
|
34715
34715
|
return null;
|
|
34716
34716
|
}, cz = KP;
|
|
@@ -35161,13 +35161,13 @@ class hz {
|
|
|
35161
35161
|
* @param {number} clock
|
|
35162
35162
|
*/
|
|
35163
35163
|
writeDsClock(t) {
|
|
35164
|
-
|
|
35164
|
+
Pt(this.restEncoder, t);
|
|
35165
35165
|
}
|
|
35166
35166
|
/**
|
|
35167
35167
|
* @param {number} len
|
|
35168
35168
|
*/
|
|
35169
35169
|
writeDsLen(t) {
|
|
35170
|
-
|
|
35170
|
+
Pt(this.restEncoder, t);
|
|
35171
35171
|
}
|
|
35172
35172
|
}
|
|
35173
35173
|
class K1 extends hz {
|
|
@@ -35175,20 +35175,20 @@ class K1 extends hz {
|
|
|
35175
35175
|
* @param {ID} id
|
|
35176
35176
|
*/
|
|
35177
35177
|
writeLeftID(t) {
|
|
35178
|
-
|
|
35178
|
+
Pt(this.restEncoder, t.client), Pt(this.restEncoder, t.clock);
|
|
35179
35179
|
}
|
|
35180
35180
|
/**
|
|
35181
35181
|
* @param {ID} id
|
|
35182
35182
|
*/
|
|
35183
35183
|
writeRightID(t) {
|
|
35184
|
-
|
|
35184
|
+
Pt(this.restEncoder, t.client), Pt(this.restEncoder, t.clock);
|
|
35185
35185
|
}
|
|
35186
35186
|
/**
|
|
35187
35187
|
* Use writeClient and writeClock instead of writeID if possible.
|
|
35188
35188
|
* @param {number} client
|
|
35189
35189
|
*/
|
|
35190
35190
|
writeClient(t) {
|
|
35191
|
-
|
|
35191
|
+
Pt(this.restEncoder, t);
|
|
35192
35192
|
}
|
|
35193
35193
|
/**
|
|
35194
35194
|
* @param {number} info An unsigned 8-bit integer
|
|
@@ -35206,13 +35206,13 @@ class K1 extends hz {
|
|
|
35206
35206
|
* @param {boolean} isYKey
|
|
35207
35207
|
*/
|
|
35208
35208
|
writeParentInfo(t) {
|
|
35209
|
-
|
|
35209
|
+
Pt(this.restEncoder, t ? 1 : 0);
|
|
35210
35210
|
}
|
|
35211
35211
|
/**
|
|
35212
35212
|
* @param {number} info An unsigned 8-bit integer
|
|
35213
35213
|
*/
|
|
35214
35214
|
writeTypeRef(t) {
|
|
35215
|
-
|
|
35215
|
+
Pt(this.restEncoder, t);
|
|
35216
35216
|
}
|
|
35217
35217
|
/**
|
|
35218
35218
|
* Write len of a struct - well suited for Opt RLE encoder.
|
|
@@ -35220,7 +35220,7 @@ class K1 extends hz {
|
|
|
35220
35220
|
* @param {number} len
|
|
35221
35221
|
*/
|
|
35222
35222
|
writeLen(t) {
|
|
35223
|
-
|
|
35223
|
+
Pt(this.restEncoder, t);
|
|
35224
35224
|
}
|
|
35225
35225
|
/**
|
|
35226
35226
|
* @param {any} any
|
|
@@ -35262,13 +35262,13 @@ class fz {
|
|
|
35262
35262
|
*/
|
|
35263
35263
|
writeDsClock(t) {
|
|
35264
35264
|
const n = t - this.dsCurrVal;
|
|
35265
|
-
this.dsCurrVal = t,
|
|
35265
|
+
this.dsCurrVal = t, Pt(this.restEncoder, n);
|
|
35266
35266
|
}
|
|
35267
35267
|
/**
|
|
35268
35268
|
* @param {number} len
|
|
35269
35269
|
*/
|
|
35270
35270
|
writeDsLen(t) {
|
|
35271
|
-
t === 0 && po(),
|
|
35271
|
+
t === 0 && po(), Pt(this.restEncoder, t - 1), this.dsCurrVal += t;
|
|
35272
35272
|
}
|
|
35273
35273
|
}
|
|
35274
35274
|
class cd extends fz {
|
|
@@ -35277,7 +35277,7 @@ class cd extends fz {
|
|
|
35277
35277
|
}
|
|
35278
35278
|
toUint8Array() {
|
|
35279
35279
|
const t = jd();
|
|
35280
|
-
return
|
|
35280
|
+
return Pt(t, 0), hi(t, this.keyClockEncoder.toUint8Array()), hi(t, this.clientEncoder.toUint8Array()), hi(t, this.leftClockEncoder.toUint8Array()), hi(t, this.rightClockEncoder.toUint8Array()), hi(t, wi(this.infoEncoder)), hi(t, this.stringEncoder.toUint8Array()), hi(t, wi(this.parentInfoEncoder)), hi(t, this.typeRefEncoder.toUint8Array()), hi(t, this.lenEncoder.toUint8Array()), bx(t, wi(this.restEncoder)), wi(t);
|
|
35281
35281
|
}
|
|
35282
35282
|
/**
|
|
35283
35283
|
* @param {ID} id
|
|
@@ -35367,7 +35367,7 @@ class cd extends fz {
|
|
|
35367
35367
|
const Bpe = (e, t, n, r) => {
|
|
35368
35368
|
r = _s(r, t[0].id.clock);
|
|
35369
35369
|
const o = As(t, r);
|
|
35370
|
-
|
|
35370
|
+
Pt(e.restEncoder, t.length - o), e.writeClient(n), Pt(e.restEncoder, r);
|
|
35371
35371
|
const i = t[o];
|
|
35372
35372
|
i.write(e, r - i.id.clock);
|
|
35373
35373
|
for (let s = o + 1; s < t.length; s++)
|
|
@@ -35378,7 +35378,7 @@ const Bpe = (e, t, n, r) => {
|
|
|
35378
35378
|
or(t, i) > o && r.set(i, o);
|
|
35379
35379
|
}), X1(t).forEach((o, i) => {
|
|
35380
35380
|
n.has(i) || r.set(i, 0);
|
|
35381
|
-
}),
|
|
35381
|
+
}), Pt(e.restEncoder, r.size), ml(r.entries()).sort((o, i) => i[0] - o[0]).forEach(([o, i]) => {
|
|
35382
35382
|
Bpe(
|
|
35383
35383
|
e,
|
|
35384
35384
|
/** @type {Array<GC|Item>} */
|
|
@@ -35512,7 +35512,7 @@ const Bpe = (e, t, n, r) => {
|
|
|
35512
35512
|
}
|
|
35513
35513
|
if (a.clients.size > 0) {
|
|
35514
35514
|
const h = new cd();
|
|
35515
|
-
return k8(h, a, /* @__PURE__ */ new Map()),
|
|
35515
|
+
return k8(h, a, /* @__PURE__ */ new Map()), Pt(h.restEncoder, 0), { missing: l, update: h.toUint8Array() };
|
|
35516
35516
|
}
|
|
35517
35517
|
return null;
|
|
35518
35518
|
}, Ope = (e, t) => k8(e, t.doc.store, t.beforeState), Ipe = (e, t, n, r = new rh(e)) => wn(t, (o) => {
|
|
@@ -35572,8 +35572,8 @@ const Bpe = (e, t, n, r) => {
|
|
|
35572
35572
|
t.set(o, i);
|
|
35573
35573
|
}
|
|
35574
35574
|
return t;
|
|
35575
|
-
}, gz = (e) => Upe(new dz(Zu(e))), mz = (e, t) => (
|
|
35576
|
-
|
|
35575
|
+
}, gz = (e) => Upe(new dz(Zu(e))), mz = (e, t) => (Pt(e.restEncoder, t.size), ml(t.entries()).sort((n, r) => r[0] - n[0]).forEach(([n, r]) => {
|
|
35576
|
+
Pt(e.restEncoder, n), Pt(e.restEncoder, r);
|
|
35577
35577
|
}), e), Ppe = (e, t) => mz(e, X1(t.store)), zpe = (e, t = new fz()) => (e instanceof Map ? mz(t, e) : Ppe(t, e), t.toUint8Array()), $pe = (e) => zpe(e, new hz());
|
|
35578
35578
|
class Hpe {
|
|
35579
35579
|
constructor() {
|
|
@@ -35594,7 +35594,7 @@ class jp {
|
|
|
35594
35594
|
}
|
|
35595
35595
|
}
|
|
35596
35596
|
const yp = (e, t) => e === t || e !== null && t !== null && e.client === t.client && e.clock === t.clock, Lt = (e, t) => new jp(e, t), dS = (e, t) => {
|
|
35597
|
-
|
|
35597
|
+
Pt(e, t.client), Pt(e, t.clock);
|
|
35598
35598
|
}, pS = (e) => Lt(Ot(e), Ot(e)), Zf = (e) => {
|
|
35599
35599
|
for (const [t, n] of e.doc.share.entries())
|
|
35600
35600
|
if (n === e)
|
|
@@ -35655,7 +35655,7 @@ const qpe = (e, t, n = 0) => new Wpe(e, t, n), Jg = (e, t, n) => {
|
|
|
35655
35655
|
}, Vpe = (e, t) => {
|
|
35656
35656
|
const { type: n, tname: r, item: o, assoc: i } = t;
|
|
35657
35657
|
if (o !== null)
|
|
35658
|
-
|
|
35658
|
+
Pt(e, 0), dS(e, o);
|
|
35659
35659
|
else if (r !== null)
|
|
35660
35660
|
Gf(e, 1), wu(e, r);
|
|
35661
35661
|
else if (n !== null)
|
|
@@ -36321,14 +36321,14 @@ const Np = (e) => J2(e, pz, K1), rhe = (e, t) => {
|
|
|
36321
36321
|
}, kz = (e) => {
|
|
36322
36322
|
e.written > 0 && (e.clientStructs.push({ written: e.written, restEncoder: wi(e.encoder.restEncoder) }), e.encoder.restEncoder = jd(), e.written = 0);
|
|
36323
36323
|
}, ou = (e, t, n) => {
|
|
36324
|
-
e.written > 0 && e.currClient !== t.id.client && kz(e), e.written === 0 && (e.currClient = t.id.client, e.encoder.writeClient(t.id.client),
|
|
36324
|
+
e.written > 0 && e.currClient !== t.id.client && kz(e), e.written === 0 && (e.currClient = t.id.client, e.encoder.writeClient(t.id.client), Pt(e.encoder.restEncoder, t.id.clock + n)), t.write(e.encoder, n), e.written++;
|
|
36325
36325
|
}, A8 = (e) => {
|
|
36326
36326
|
kz(e);
|
|
36327
36327
|
const t = e.encoder.restEncoder;
|
|
36328
|
-
|
|
36328
|
+
Pt(t, e.clientStructs.length);
|
|
36329
36329
|
for (let n = 0; n < e.clientStructs.length; n++) {
|
|
36330
36330
|
const r = e.clientStructs[n];
|
|
36331
|
-
|
|
36331
|
+
Pt(t, r.written), bx(t, r.restEncoder);
|
|
36332
36332
|
}
|
|
36333
36333
|
}, ihe = (e, t, n, r) => {
|
|
36334
36334
|
const o = new n(Zu(e)), i = new C8(o, !1), s = new r(), a = new _8(s);
|
|
@@ -39900,7 +39900,7 @@ class Wi extends B8 {
|
|
|
39900
39900
|
* @param {number} offset
|
|
39901
39901
|
*/
|
|
39902
39902
|
write(t, n) {
|
|
39903
|
-
t.writeInfo(Khe),
|
|
39903
|
+
t.writeInfo(Khe), Pt(t.restEncoder, this.length - n);
|
|
39904
39904
|
}
|
|
39905
39905
|
/**
|
|
39906
39906
|
* @param {Transaction} transaction
|
|
@@ -39996,13 +39996,13 @@ const Vc = (e, t, n) => {
|
|
|
39996
39996
|
r.length > 0 && (e.emit("change", [{ added: [], updated: [], removed: r }, n]), e.emit("update", [{ added: [], updated: [], removed: r }, n]));
|
|
39997
39997
|
}, Vz = (e, t, n = e.states) => {
|
|
39998
39998
|
const r = t.length, o = jd();
|
|
39999
|
-
|
|
39999
|
+
Pt(o, r);
|
|
40000
40000
|
for (let i = 0; i < r; i++) {
|
|
40001
40001
|
const s = t[i], a = n.get(s) || null, l = (
|
|
40002
40002
|
/** @type {MetaClientState} */
|
|
40003
40003
|
e.meta.get(s).clock
|
|
40004
40004
|
);
|
|
40005
|
-
|
|
40005
|
+
Pt(o, s), Pt(o, l), wu(o, JSON.stringify(a));
|
|
40006
40006
|
}
|
|
40007
40007
|
return wi(o);
|
|
40008
40008
|
}, Yhe = (e, t, n) => {
|
|
@@ -41000,7 +41000,7 @@ const S0e = (e, t, n) => e !== t, T0e = (e) => {
|
|
|
41000
41000
|
class: "ProseMirror-yjs-selection"
|
|
41001
41001
|
}), B0e = /^#[0-9a-fA-F]{6}$/, _S = (e, t, n, r, o) => {
|
|
41002
41002
|
const i = Sn.getState(e), s = i.doc, a = [];
|
|
41003
|
-
return i.snapshot != null || i.prevSnapshot != null || i.binding.mapping.size === 0 ?
|
|
41003
|
+
return i.snapshot != null || i.prevSnapshot != null || i.binding.mapping.size === 0 ? zt.create(e.doc, []) : (t.getStates().forEach((l, u) => {
|
|
41004
41004
|
if (n(s.clientID, u, l) && l.cursor != null) {
|
|
41005
41005
|
const c = l.user || {};
|
|
41006
41006
|
c.color == null ? c.color = "#ffa500" : B0e.test(c.color) || console.warn("A user uses an unsupported color format", c), c.name == null && (c.name = `User: ${u}`);
|
|
@@ -41018,21 +41018,21 @@ const S0e = (e, t, n) => e !== t, T0e = (e) => {
|
|
|
41018
41018
|
if (d !== null && p !== null) {
|
|
41019
41019
|
const h = _s(e.doc.content.size - 1, 0);
|
|
41020
41020
|
d = ul(d, h), p = ul(p, h), a.push(
|
|
41021
|
-
|
|
41021
|
+
En.widget(p, () => r(c, u), {
|
|
41022
41022
|
key: u + "",
|
|
41023
41023
|
side: 10
|
|
41024
41024
|
})
|
|
41025
41025
|
);
|
|
41026
41026
|
const f = ul(d, p), g = _s(d, p);
|
|
41027
41027
|
a.push(
|
|
41028
|
-
|
|
41028
|
+
En.inline(f, g, o(c, u), {
|
|
41029
41029
|
inclusiveEnd: !0,
|
|
41030
41030
|
inclusiveStart: !1
|
|
41031
41031
|
})
|
|
41032
41032
|
);
|
|
41033
41033
|
}
|
|
41034
41034
|
}
|
|
41035
|
-
}),
|
|
41035
|
+
}), zt.create(e.doc, a));
|
|
41036
41036
|
}, N0e = (e, {
|
|
41037
41037
|
awarenessStateFilter: t = S0e,
|
|
41038
41038
|
cursorBuilder: n = T0e,
|
|
@@ -41181,7 +41181,7 @@ function kx(e, t) {
|
|
|
41181
41181
|
}
|
|
41182
41182
|
}
|
|
41183
41183
|
function U0e(e, t) {
|
|
41184
|
-
const n = rf.getState(t), r = (n == null ? void 0 : n.decorations.find(void 0, void 0, (s) => s.
|
|
41184
|
+
const n = rf.getState(t), r = (n == null ? void 0 : n.decorations.find(void 0, void 0, (s) => (s == null ? void 0 : s.commentId) === e)) ?? [];
|
|
41185
41185
|
if (r.length === 0)
|
|
41186
41186
|
return null;
|
|
41187
41187
|
const o = Math.min(
|
|
@@ -41192,7 +41192,13 @@ function U0e(e, t) {
|
|
|
41192
41192
|
return o >= i ? null : { from: o, to: i };
|
|
41193
41193
|
}
|
|
41194
41194
|
function P0e(e, t) {
|
|
41195
|
-
return
|
|
41195
|
+
return (
|
|
41196
|
+
// For pre-transaction analysis, trust the rendered highlight snapshot first.
|
|
41197
|
+
// The sync plugin's Yjs mapping objects are live and can drift relative to
|
|
41198
|
+
// an old EditorState, while the old decoration set still reflects what the
|
|
41199
|
+
// user actually saw highlighted before the edit.
|
|
41200
|
+
U0e(e.id, t) ?? kx(e, t)
|
|
41201
|
+
);
|
|
41196
41202
|
}
|
|
41197
41203
|
function Yz(e, t, n) {
|
|
41198
41204
|
const r = Sn.getState(e);
|
|
@@ -41236,16 +41242,9 @@ function q0e(e, t) {
|
|
|
41236
41242
|
}
|
|
41237
41243
|
return r >= t.to;
|
|
41238
41244
|
}
|
|
41239
|
-
function V0e(e, t, n
|
|
41240
|
-
const
|
|
41241
|
-
|
|
41242
|
-
]).map(n.mapping, r).find();
|
|
41243
|
-
if (i.length === 0)
|
|
41244
|
-
return null;
|
|
41245
|
-
const s = Math.min(
|
|
41246
|
-
...i.map((l) => l.from)
|
|
41247
|
-
), a = Math.max(...i.map((l) => l.to));
|
|
41248
|
-
return s >= a ? null : { from: s, to: a };
|
|
41245
|
+
function V0e(e, t, n) {
|
|
41246
|
+
const r = t.mapping.map(e.from, 1), o = t.mapping.map(e.to, -1);
|
|
41247
|
+
return r >= o || r < 0 || o > n.content.size ? null : { from: r, to: o };
|
|
41249
41248
|
}
|
|
41250
41249
|
function G0e(e, t, n, r) {
|
|
41251
41250
|
const o = _k(r);
|
|
@@ -41267,7 +41266,6 @@ function G0e(e, t, n, r) {
|
|
|
41267
41266
|
) || q0e(a, s))
|
|
41268
41267
|
return { id: i.id, type: "deleted" };
|
|
41269
41268
|
const u = V0e(
|
|
41270
|
-
t.doc,
|
|
41271
41269
|
s,
|
|
41272
41270
|
r,
|
|
41273
41271
|
n.doc
|
|
@@ -41298,14 +41296,14 @@ function G0e(e, t, n, r) {
|
|
|
41298
41296
|
function AS(e, t) {
|
|
41299
41297
|
const n = Sn.getState(t);
|
|
41300
41298
|
if (!(n != null && n.binding))
|
|
41301
|
-
return
|
|
41299
|
+
return zt.empty;
|
|
41302
41300
|
const r = [];
|
|
41303
41301
|
for (const o of e) {
|
|
41304
41302
|
if (o.deleted || o.resolved)
|
|
41305
41303
|
continue;
|
|
41306
41304
|
const i = kx(o, t);
|
|
41307
41305
|
i && r.push(
|
|
41308
|
-
|
|
41306
|
+
En.inline(
|
|
41309
41307
|
i.from,
|
|
41310
41308
|
i.to,
|
|
41311
41309
|
{
|
|
@@ -41316,7 +41314,7 @@ function AS(e, t) {
|
|
|
41316
41314
|
)
|
|
41317
41315
|
);
|
|
41318
41316
|
}
|
|
41319
|
-
return
|
|
41317
|
+
return zt.create(t.doc, r);
|
|
41320
41318
|
}
|
|
41321
41319
|
const K0e = xt.create({
|
|
41322
41320
|
name: "commentDecoration",
|
|
@@ -41347,7 +41345,7 @@ const K0e = xt.create({
|
|
|
41347
41345
|
props: {
|
|
41348
41346
|
decorations(t) {
|
|
41349
41347
|
var n;
|
|
41350
|
-
return ((n = rf.getState(t)) == null ? void 0 : n.decorations) ??
|
|
41348
|
+
return ((n = rf.getState(t)) == null ? void 0 : n.decorations) ?? zt.empty;
|
|
41351
41349
|
}
|
|
41352
41350
|
}
|
|
41353
41351
|
})
|
|
@@ -42056,7 +42054,7 @@ const yc = new jt(
|
|
|
42056
42054
|
"draftComment"
|
|
42057
42055
|
), xfe = (e, t) => {
|
|
42058
42056
|
const n = Array.from(t.values()).filter((r) => r.from < r.to).map(
|
|
42059
|
-
(r) =>
|
|
42057
|
+
(r) => En.inline(
|
|
42060
42058
|
r.from,
|
|
42061
42059
|
r.to,
|
|
42062
42060
|
{
|
|
@@ -42071,7 +42069,7 @@ const yc = new jt(
|
|
|
42071
42069
|
}
|
|
42072
42070
|
)
|
|
42073
42071
|
);
|
|
42074
|
-
return
|
|
42072
|
+
return zt.create(e, n);
|
|
42075
42073
|
}, vfe = (e, t) => {
|
|
42076
42074
|
const n = t.map(e.from, 1), r = t.map(e.to, -1);
|
|
42077
42075
|
return n >= r ? null : {
|
|
@@ -42147,7 +42145,7 @@ const yc = new jt(
|
|
|
42147
42145
|
key: yc,
|
|
42148
42146
|
state: {
|
|
42149
42147
|
init: () => ({
|
|
42150
|
-
decorations:
|
|
42148
|
+
decorations: zt.empty,
|
|
42151
42149
|
drafts: /* @__PURE__ */ new Map()
|
|
42152
42150
|
}),
|
|
42153
42151
|
apply: (e, t) => {
|
|
@@ -43077,40 +43075,42 @@ const Afe = () => nfe((e, t) => ({
|
|
|
43077
43075
|
o == null || o(n, a);
|
|
43078
43076
|
}
|
|
43079
43077
|
},
|
|
43080
|
-
deleteComment: (n) => {
|
|
43078
|
+
deleteComment: (n, r) => {
|
|
43081
43079
|
const {
|
|
43082
|
-
editor:
|
|
43083
|
-
onDeleteComment:
|
|
43084
|
-
setActiveCommentId:
|
|
43085
|
-
commentAnchorsRef:
|
|
43086
|
-
setInitialComments:
|
|
43080
|
+
editor: o,
|
|
43081
|
+
onDeleteComment: i,
|
|
43082
|
+
setActiveCommentId: s,
|
|
43083
|
+
commentAnchorsRef: a,
|
|
43084
|
+
setInitialComments: l
|
|
43087
43085
|
} = In(t);
|
|
43088
|
-
if (!
|
|
43089
|
-
if ((
|
|
43090
|
-
(
|
|
43091
|
-
)) &&
|
|
43092
|
-
const
|
|
43093
|
-
(
|
|
43094
|
-
)
|
|
43095
|
-
|
|
43096
|
-
|
|
43097
|
-
|
|
43086
|
+
if (!o) return;
|
|
43087
|
+
if ((a == null ? void 0 : a.current.some(
|
|
43088
|
+
(c) => c.id === n
|
|
43089
|
+
)) && a) {
|
|
43090
|
+
const c = t().initialComments.map(
|
|
43091
|
+
(p) => p.id === n ? { ...p, deleted: !0 } : p
|
|
43092
|
+
), d = {
|
|
43093
|
+
type: "delete"
|
|
43094
|
+
};
|
|
43095
|
+
t().setInitialComments(c), l == null || l(
|
|
43096
|
+
(p) => p.map(
|
|
43097
|
+
(h) => h.id === n ? { ...h, deleted: !0 } : h
|
|
43098
43098
|
)
|
|
43099
|
-
),
|
|
43100
|
-
(
|
|
43101
|
-
),
|
|
43099
|
+
), a.current = a.current.filter(
|
|
43100
|
+
(p) => p.id !== n
|
|
43101
|
+
), r != null && r.skipExternalCallback || i == null || i(n, d), xp(o);
|
|
43102
43102
|
} else {
|
|
43103
|
-
const
|
|
43103
|
+
const c = t().createMutationMeta(
|
|
43104
43104
|
"delete",
|
|
43105
|
-
() =>
|
|
43105
|
+
() => o.commands.unsetComment(n)
|
|
43106
43106
|
);
|
|
43107
|
-
|
|
43107
|
+
r != null && r.skipExternalCallback || i == null || i(n, c);
|
|
43108
43108
|
}
|
|
43109
|
-
e((
|
|
43110
|
-
floatingCards:
|
|
43111
|
-
(
|
|
43109
|
+
e((c) => ({
|
|
43110
|
+
floatingCards: c.floatingCards.filter(
|
|
43111
|
+
(d) => !(d.type === "thread" && d.commentId === n)
|
|
43112
43112
|
)
|
|
43113
|
-
})), t().activeCommentId === n &&
|
|
43113
|
+
})), t().activeCommentId === n && s(null);
|
|
43114
43114
|
},
|
|
43115
43115
|
deleteReply: (n, r) => {
|
|
43116
43116
|
var o, i;
|
|
@@ -43514,7 +43514,15 @@ const Sfe = ({
|
|
|
43514
43514
|
});
|
|
43515
43515
|
}
|
|
43516
43516
|
G.forEach((ie) => {
|
|
43517
|
-
|
|
43517
|
+
var he, pe;
|
|
43518
|
+
const xe = {
|
|
43519
|
+
type: "delete"
|
|
43520
|
+
};
|
|
43521
|
+
(pe = (he = I.current).onDeleteComment) == null || pe.call(
|
|
43522
|
+
he,
|
|
43523
|
+
ie.id,
|
|
43524
|
+
xe
|
|
43525
|
+
), T.getState().deleteComment(ie.id, { skipExternalCallback: !0 });
|
|
43518
43526
|
});
|
|
43519
43527
|
}
|
|
43520
43528
|
}
|
|
@@ -46899,14 +46907,14 @@ function O$() {
|
|
|
46899
46907
|
F === void 0 && (F = Ome(h, o)), F !== null && typeof D == "string" && (D = F.createHTML(""));
|
|
46900
46908
|
No && No(De), ft = De;
|
|
46901
46909
|
}
|
|
46902
|
-
}, Zt = Xt({}, [...p4, ...h4, ...kme]),
|
|
46910
|
+
}, Zt = Xt({}, [...p4, ...h4, ...kme]), Dn = Xt({}, [...f4, ...Eme]), qn = function(De) {
|
|
46903
46911
|
let Le = x(De);
|
|
46904
46912
|
(!Le || !Le.tagName) && (Le = {
|
|
46905
46913
|
namespaceURI: Se,
|
|
46906
46914
|
tagName: "template"
|
|
46907
46915
|
});
|
|
46908
46916
|
const at = d2(De.tagName), en = d2(Le.tagName);
|
|
46909
|
-
return Ue[De.namespaceURI] ? De.namespaceURI === me ? Le.namespaceURI === Te ? at === "svg" : Le.namespaceURI === Ce ? at === "svg" && (en === "annotation-xml" || dt[en]) : !!Zt[at] : De.namespaceURI === Ce ? Le.namespaceURI === Te ? at === "math" : Le.namespaceURI === me ? at === "math" && kt[en] : !!
|
|
46917
|
+
return Ue[De.namespaceURI] ? De.namespaceURI === me ? Le.namespaceURI === Te ? at === "svg" : Le.namespaceURI === Ce ? at === "svg" && (en === "annotation-xml" || dt[en]) : !!Zt[at] : De.namespaceURI === Ce ? Le.namespaceURI === Te ? at === "math" : Le.namespaceURI === me ? at === "math" && kt[en] : !!Dn[at] : De.namespaceURI === Te ? Le.namespaceURI === me && !kt[en] || Le.namespaceURI === Ce && !dt[en] ? !1 : !Dn[at] && (Xe[at] || !Zt[at]) : !!(et === "application/xhtml+xml" && Ue[De.namespaceURI]) : !1;
|
|
46910
46918
|
}, dn = function(De) {
|
|
46911
46919
|
l0(t.removed, {
|
|
46912
46920
|
element: De
|
|
@@ -47985,7 +47993,7 @@ const Y8 = new jt("inline-ui"), l1 = [], h2e = () => new Dt({
|
|
|
47985
47993
|
key: Y8,
|
|
47986
47994
|
state: {
|
|
47987
47995
|
init() {
|
|
47988
|
-
return
|
|
47996
|
+
return zt.empty;
|
|
47989
47997
|
},
|
|
47990
47998
|
apply(e, t) {
|
|
47991
47999
|
t = t.map(e.mapping, e.doc);
|
|
@@ -47993,7 +48001,7 @@ const Y8 = new jt("inline-ui"), l1 = [], h2e = () => new Dt({
|
|
|
47993
48001
|
if (n && n.add) {
|
|
47994
48002
|
const { id: r, pos: o, content: i } = n.add, s = document.createElement("div");
|
|
47995
48003
|
s.setAttribute("class", "img-placeholder"), s.textContent = i;
|
|
47996
|
-
const a =
|
|
48004
|
+
const a = En.widget(o + 1, s, {
|
|
47997
48005
|
id: r
|
|
47998
48006
|
});
|
|
47999
48007
|
t = t.add(e.doc, [a]);
|
|
@@ -56884,7 +56892,7 @@ function exe(e) {
|
|
|
56884
56892
|
if (!(e.selection instanceof Jn))
|
|
56885
56893
|
return null;
|
|
56886
56894
|
let t = document.createElement("div");
|
|
56887
|
-
return t.className = "ProseMirror-gapcursor",
|
|
56895
|
+
return t.className = "ProseMirror-gapcursor", zt.create(e.doc, [En.widget(e.selection.head, t, { key: "gapcursor" })]);
|
|
56888
56896
|
}
|
|
56889
56897
|
var Gb = 200, Or = function() {
|
|
56890
56898
|
};
|
|
@@ -57320,7 +57328,7 @@ xt.create({
|
|
|
57320
57328
|
decorations: ({ doc: e, selection: t }) => {
|
|
57321
57329
|
const { isEditable: n, isFocused: r } = this.editor, { anchor: o } = t, i = [];
|
|
57322
57330
|
if (!n || !r)
|
|
57323
|
-
return
|
|
57331
|
+
return zt.create(e, []);
|
|
57324
57332
|
let s = 0;
|
|
57325
57333
|
this.options.mode === "deepest" && e.descendants((l, u) => {
|
|
57326
57334
|
if (l.isText)
|
|
@@ -57336,11 +57344,11 @@ xt.create({
|
|
|
57336
57344
|
if (a += 1, this.options.mode === "deepest" && s - a > 0 || this.options.mode === "shallowest" && a > 1)
|
|
57337
57345
|
return this.options.mode === "deepest";
|
|
57338
57346
|
i.push(
|
|
57339
|
-
|
|
57347
|
+
En.node(u, u + l.nodeSize, {
|
|
57340
57348
|
class: this.options.className
|
|
57341
57349
|
})
|
|
57342
57350
|
);
|
|
57343
|
-
}),
|
|
57351
|
+
}), zt.create(e, i);
|
|
57344
57352
|
}
|
|
57345
57353
|
}
|
|
57346
57354
|
})
|
|
@@ -57390,7 +57398,7 @@ var QH = xt.create({
|
|
|
57390
57398
|
if ((l || !this.options.showOnlyCurrent) && u) {
|
|
57391
57399
|
const c = [this.options.emptyNodeClass];
|
|
57392
57400
|
i && c.push(this.options.emptyEditorClass);
|
|
57393
|
-
const d =
|
|
57401
|
+
const d = En.node(a, a + s.nodeSize, {
|
|
57394
57402
|
class: c.join(" "),
|
|
57395
57403
|
"data-placeholder": typeof this.options.placeholder == "function" ? this.options.placeholder({
|
|
57396
57404
|
editor: this.editor,
|
|
@@ -57402,7 +57410,7 @@ var QH = xt.create({
|
|
|
57402
57410
|
o.push(d);
|
|
57403
57411
|
}
|
|
57404
57412
|
return this.options.includeChildren;
|
|
57405
|
-
}),
|
|
57413
|
+
}), zt.create(e, o);
|
|
57406
57414
|
}
|
|
57407
57415
|
}
|
|
57408
57416
|
})
|
|
@@ -57423,8 +57431,8 @@ xt.create({
|
|
|
57423
57431
|
key: new jt("selection"),
|
|
57424
57432
|
props: {
|
|
57425
57433
|
decorations(n) {
|
|
57426
|
-
return n.selection.empty || e.isFocused || !e.isEditable || dL(n.selection) || e.view.dragging ? null :
|
|
57427
|
-
|
|
57434
|
+
return n.selection.empty || e.isFocused || !e.isEditable || dL(n.selection) || e.view.dragging ? null : zt.create(n.doc, [
|
|
57435
|
+
En.inline(n.selection.from, n.selection.to, {
|
|
57428
57436
|
class: t.className
|
|
57429
57437
|
})
|
|
57430
57438
|
]);
|
|
@@ -63699,9 +63707,9 @@ function kW(...e) {
|
|
|
63699
63707
|
};
|
|
63700
63708
|
}
|
|
63701
63709
|
function X4e(...e) {
|
|
63702
|
-
return
|
|
63710
|
+
return kn.useCallback(kW(...e), e);
|
|
63703
63711
|
}
|
|
63704
|
-
var Y4e = Symbol.for("react.lazy"), Kb =
|
|
63712
|
+
var Y4e = Symbol.for("react.lazy"), Kb = kn[" use ".trim().toString()];
|
|
63705
63713
|
function Z4e(e) {
|
|
63706
63714
|
return typeof e == "object" && e !== null && "then" in e;
|
|
63707
63715
|
}
|
|
@@ -63710,13 +63718,13 @@ function EW(e) {
|
|
|
63710
63718
|
}
|
|
63711
63719
|
// @__NO_SIDE_EFFECTS__
|
|
63712
63720
|
function J4e(e) {
|
|
63713
|
-
const t = /* @__PURE__ */ Q4e(e), n =
|
|
63721
|
+
const t = /* @__PURE__ */ Q4e(e), n = kn.forwardRef((r, o) => {
|
|
63714
63722
|
let { children: i, ...s } = r;
|
|
63715
63723
|
EW(i) && typeof Kb == "function" && (i = Kb(i._payload));
|
|
63716
|
-
const a =
|
|
63724
|
+
const a = kn.Children.toArray(i), l = a.find(tFe);
|
|
63717
63725
|
if (l) {
|
|
63718
|
-
const u = l.props.children, c = a.map((d) => d === l ?
|
|
63719
|
-
return /* @__PURE__ */ v.jsx(t, { ...s, ref: o, children:
|
|
63726
|
+
const u = l.props.children, c = a.map((d) => d === l ? kn.Children.count(u) > 1 ? kn.Children.only(null) : kn.isValidElement(u) ? u.props.children : null : d);
|
|
63727
|
+
return /* @__PURE__ */ v.jsx(t, { ...s, ref: o, children: kn.isValidElement(u) ? kn.cloneElement(u, void 0, c) : null });
|
|
63720
63728
|
}
|
|
63721
63729
|
return /* @__PURE__ */ v.jsx(t, { ...s, ref: o, children: i });
|
|
63722
63730
|
});
|
|
@@ -63724,19 +63732,19 @@ function J4e(e) {
|
|
|
63724
63732
|
}
|
|
63725
63733
|
// @__NO_SIDE_EFFECTS__
|
|
63726
63734
|
function Q4e(e) {
|
|
63727
|
-
const t =
|
|
63735
|
+
const t = kn.forwardRef((n, r) => {
|
|
63728
63736
|
let { children: o, ...i } = n;
|
|
63729
|
-
if (EW(o) && typeof Kb == "function" && (o = Kb(o._payload)),
|
|
63737
|
+
if (EW(o) && typeof Kb == "function" && (o = Kb(o._payload)), kn.isValidElement(o)) {
|
|
63730
63738
|
const s = rFe(o), a = nFe(i, o.props);
|
|
63731
|
-
return o.type !==
|
|
63739
|
+
return o.type !== kn.Fragment && (a.ref = r ? kW(r, s) : s), kn.cloneElement(o, a);
|
|
63732
63740
|
}
|
|
63733
|
-
return
|
|
63741
|
+
return kn.Children.count(o) > 1 ? kn.Children.only(null) : null;
|
|
63734
63742
|
});
|
|
63735
63743
|
return t.displayName = `${e}.SlotClone`, t;
|
|
63736
63744
|
}
|
|
63737
63745
|
var eFe = Symbol("radix.slottable");
|
|
63738
63746
|
function tFe(e) {
|
|
63739
|
-
return
|
|
63747
|
+
return kn.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === eFe;
|
|
63740
63748
|
}
|
|
63741
63749
|
function nFe(e, t) {
|
|
63742
63750
|
const n = { ...t };
|
|
@@ -63773,29 +63781,29 @@ var oFe = [
|
|
|
63773
63781
|
"svg",
|
|
63774
63782
|
"ul"
|
|
63775
63783
|
], iFe = oFe.reduce((e, t) => {
|
|
63776
|
-
const n = /* @__PURE__ */ J4e(`Primitive.${t}`), r =
|
|
63784
|
+
const n = /* @__PURE__ */ J4e(`Primitive.${t}`), r = kn.forwardRef((o, i) => {
|
|
63777
63785
|
const { asChild: s, ...a } = o, l = s ? n : t;
|
|
63778
63786
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v.jsx(l, { ...a, ref: i });
|
|
63779
63787
|
});
|
|
63780
63788
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
63781
63789
|
}, {});
|
|
63782
63790
|
function JT(e) {
|
|
63783
|
-
const t =
|
|
63784
|
-
return
|
|
63791
|
+
const t = kn.useRef(e);
|
|
63792
|
+
return kn.useEffect(() => {
|
|
63785
63793
|
t.current = e;
|
|
63786
|
-
}),
|
|
63794
|
+
}), kn.useMemo(() => (...n) => {
|
|
63787
63795
|
var r;
|
|
63788
63796
|
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
63789
63797
|
}, []);
|
|
63790
63798
|
}
|
|
63791
|
-
var H4 = "focusScope.autoFocusOnMount", W4 = "focusScope.autoFocusOnUnmount", QT = { bubbles: !1, cancelable: !0 }, sFe = "FocusScope", CW =
|
|
63799
|
+
var H4 = "focusScope.autoFocusOnMount", W4 = "focusScope.autoFocusOnUnmount", QT = { bubbles: !1, cancelable: !0 }, sFe = "FocusScope", CW = kn.forwardRef((e, t) => {
|
|
63792
63800
|
const {
|
|
63793
63801
|
loop: n = !1,
|
|
63794
63802
|
trapped: r = !1,
|
|
63795
63803
|
onMountAutoFocus: o,
|
|
63796
63804
|
onUnmountAutoFocus: i,
|
|
63797
63805
|
...s
|
|
63798
|
-
} = e, [a, l] =
|
|
63806
|
+
} = e, [a, l] = kn.useState(null), u = JT(o), c = JT(i), d = kn.useRef(null), p = X4e(t, (g) => l(g)), h = kn.useRef({
|
|
63799
63807
|
paused: !1,
|
|
63800
63808
|
pause() {
|
|
63801
63809
|
this.paused = !0;
|
|
@@ -63804,7 +63812,7 @@ var H4 = "focusScope.autoFocusOnMount", W4 = "focusScope.autoFocusOnUnmount", QT
|
|
|
63804
63812
|
this.paused = !1;
|
|
63805
63813
|
}
|
|
63806
63814
|
}).current;
|
|
63807
|
-
|
|
63815
|
+
kn.useEffect(() => {
|
|
63808
63816
|
if (r) {
|
|
63809
63817
|
let g = function(x) {
|
|
63810
63818
|
if (h.paused || !a) return;
|
|
@@ -63825,7 +63833,7 @@ var H4 = "focusScope.autoFocusOnMount", W4 = "focusScope.autoFocusOnUnmount", QT
|
|
|
63825
63833
|
document.removeEventListener("focusin", g), document.removeEventListener("focusout", m), y.disconnect();
|
|
63826
63834
|
};
|
|
63827
63835
|
}
|
|
63828
|
-
}, [r, a, h.paused]),
|
|
63836
|
+
}, [r, a, h.paused]), kn.useEffect(() => {
|
|
63829
63837
|
if (a) {
|
|
63830
63838
|
tj.add(h);
|
|
63831
63839
|
const g = document.activeElement;
|
|
@@ -63841,7 +63849,7 @@ var H4 = "focusScope.autoFocusOnMount", W4 = "focusScope.autoFocusOnUnmount", QT
|
|
|
63841
63849
|
};
|
|
63842
63850
|
}
|
|
63843
63851
|
}, [a, u, c, h]);
|
|
63844
|
-
const f =
|
|
63852
|
+
const f = kn.useCallback(
|
|
63845
63853
|
(g) => {
|
|
63846
63854
|
if (!n && !r || h.paused) return;
|
|
63847
63855
|
const m = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, b = document.activeElement;
|
|
@@ -93489,14 +93497,14 @@ function lO({
|
|
|
93489
93497
|
SY(c).forEach((d) => {
|
|
93490
93498
|
const p = a + d.text.length;
|
|
93491
93499
|
if (d.classes.length) {
|
|
93492
|
-
const h =
|
|
93500
|
+
const h = En.inline(a, p, {
|
|
93493
93501
|
class: d.classes.join(" ")
|
|
93494
93502
|
});
|
|
93495
93503
|
o.push(h);
|
|
93496
93504
|
}
|
|
93497
93505
|
a = p;
|
|
93498
93506
|
});
|
|
93499
|
-
}),
|
|
93507
|
+
}), zt.create(e, o);
|
|
93500
93508
|
}
|
|
93501
93509
|
function KMe(e) {
|
|
93502
93510
|
return typeof e == "function";
|
|
@@ -107057,8 +107065,8 @@ function SIe({
|
|
|
107057
107065
|
if (!k)
|
|
107058
107066
|
return null;
|
|
107059
107067
|
const B = !(O != null && O.length), _ = [l];
|
|
107060
|
-
return B && _.push(c),
|
|
107061
|
-
|
|
107068
|
+
return B && _.push(c), zt.create(w.doc, [
|
|
107069
|
+
En.inline(C.from, C.to, {
|
|
107062
107070
|
nodeName: a,
|
|
107063
107071
|
class: _.join(" "),
|
|
107064
107072
|
"data-decoration-id": A,
|
|
@@ -169046,7 +169054,7 @@ ${x}`, O = await l(A);
|
|
|
169046
169054
|
try {
|
|
169047
169055
|
const _ = h.state.selection.from;
|
|
169048
169056
|
if (_ > h.state.doc.content.size) return;
|
|
169049
|
-
const T =
|
|
169057
|
+
const T = En.widget(
|
|
169050
169058
|
_,
|
|
169051
169059
|
() => {
|
|
169052
169060
|
const j = document.createElement("span");
|
|
@@ -169057,7 +169065,7 @@ ${x}`, O = await l(A);
|
|
|
169057
169065
|
return I.className = "autocomplete-tab-button", I.textContent = "Tab", j.appendChild(z), j.appendChild(I), j;
|
|
169058
169066
|
},
|
|
169059
169067
|
{ side: 1 }
|
|
169060
|
-
), E =
|
|
169068
|
+
), E = zt.create(h.state.doc, [
|
|
169061
169069
|
T
|
|
169062
169070
|
]);
|
|
169063
169071
|
if (h.isDestroyed || _ > h.state.doc.content.size) return;
|
|
@@ -169066,11 +169074,11 @@ ${x}`, O = await l(A);
|
|
|
169066
169074
|
} catch (_) {
|
|
169067
169075
|
console.warn("Error applying autocomplete suggestion:", _);
|
|
169068
169076
|
const T = h.state.tr;
|
|
169069
|
-
T.setMeta("addToHistory", !1), T.setMeta(e, { decorations:
|
|
169077
|
+
T.setMeta("addToHistory", !1), T.setMeta(e, { decorations: zt.empty }), h.dispatch(T);
|
|
169070
169078
|
}
|
|
169071
169079
|
}, c = (h) => {
|
|
169072
169080
|
const f = h.state.tr;
|
|
169073
|
-
f.setMeta(e, { decorations:
|
|
169081
|
+
f.setMeta(e, { decorations: zt.empty }), h.dispatch(f), t = null;
|
|
169074
169082
|
}, d = (h) => {
|
|
169075
169083
|
a.storage.isTyping = !0, c(h), o && clearTimeout(o), o = setTimeout(() => {
|
|
169076
169084
|
a.storage.isTyping = !1, u(h);
|
|
@@ -169081,7 +169089,7 @@ ${x}`, O = await l(A);
|
|
|
169081
169089
|
key: e,
|
|
169082
169090
|
state: {
|
|
169083
169091
|
init() {
|
|
169084
|
-
return
|
|
169092
|
+
return zt.empty;
|
|
169085
169093
|
},
|
|
169086
169094
|
apply(h, f) {
|
|
169087
169095
|
if (h.getMeta(e)) {
|
|
@@ -169107,7 +169115,7 @@ ${x}`, O = await l(A);
|
|
|
169107
169115
|
if (f.preventDefault(), D || !k) return !1;
|
|
169108
169116
|
if (t) {
|
|
169109
169117
|
const A = g.tr.insertText(t, m, m);
|
|
169110
|
-
return A.setMeta(e, { decorations:
|
|
169118
|
+
return A.setMeta(e, { decorations: zt.empty }), h.dispatch(A), t = null, !0;
|
|
169111
169119
|
}
|
|
169112
169120
|
return u(h), !0;
|
|
169113
169121
|
}
|
|
@@ -170067,9 +170075,9 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
170067
170075
|
editorRoot: he.view.dom
|
|
170068
170076
|
});
|
|
170069
170077
|
nt && requestAnimationFrame(() => {
|
|
170070
|
-
const Yt = nt.getBoundingClientRect(), Zt = mt.getBoundingClientRect(),
|
|
170078
|
+
const Yt = nt.getBoundingClientRect(), Zt = mt.getBoundingClientRect(), Dn = Zt.top - Yt.top - Yt.height / (Me ? 5 : 7) + Zt.height / (Me ? 5 : 7);
|
|
170071
170079
|
nt.scrollBy({
|
|
170072
|
-
top:
|
|
170080
|
+
top: Dn,
|
|
170073
170081
|
behavior: "smooth"
|
|
170074
170082
|
});
|
|
170075
170083
|
});
|
|
@@ -174309,8 +174317,8 @@ var PZ = {};
|
|
|
174309
174317
|
J[S] = K[S] - Z[S];
|
|
174310
174318
|
}
|
|
174311
174319
|
function k(J, K, Z) {
|
|
174312
|
-
let S, X, Q = 0, ce = 0, N = 0, ne = 0, ae = 0, Y = 0, G = 0, ie = 0, xe = 0, he = 0, pe = 0, se = 0, de = 0, ge = 0, R = 0, V = 0, oe = 0, fe = 0, Fe = 0, be = 0, Ee = 0, Ce = 0, me = 0, Te = 0, Se = 0, Me = 0, Ue = 0, Ke = 0, dt = 0, kt = 0, Xe = 0, et = Z[0], mt = Z[1], Et = Z[2], Ve = Z[3], ft = Z[4], At = Z[5], nt = Z[6], Yt = Z[7], Zt = Z[8],
|
|
174313
|
-
S = K[0], Q += S * et, ce += S * mt, N += S * Et, ne += S * Ve, ae += S * ft, Y += S * At, G += S * nt, ie += S * Yt, xe += S * Zt, he += S *
|
|
174320
|
+
let S, X, Q = 0, ce = 0, N = 0, ne = 0, ae = 0, Y = 0, G = 0, ie = 0, xe = 0, he = 0, pe = 0, se = 0, de = 0, ge = 0, R = 0, V = 0, oe = 0, fe = 0, Fe = 0, be = 0, Ee = 0, Ce = 0, me = 0, Te = 0, Se = 0, Me = 0, Ue = 0, Ke = 0, dt = 0, kt = 0, Xe = 0, et = Z[0], mt = Z[1], Et = Z[2], Ve = Z[3], ft = Z[4], At = Z[5], nt = Z[6], Yt = Z[7], Zt = Z[8], Dn = Z[9], qn = Z[10], dn = Z[11], an = Z[12], Vn = Z[13], ve = Z[14], Oe = Z[15];
|
|
174321
|
+
S = K[0], Q += S * et, ce += S * mt, N += S * Et, ne += S * Ve, ae += S * ft, Y += S * At, G += S * nt, ie += S * Yt, xe += S * Zt, he += S * Dn, pe += S * qn, se += S * dn, de += S * an, ge += S * Vn, R += S * ve, V += S * Oe, S = K[1], ce += S * et, N += S * mt, ne += S * Et, ae += S * Ve, Y += S * ft, G += S * At, ie += S * nt, xe += S * Yt, he += S * Zt, pe += S * Dn, se += S * qn, de += S * dn, ge += S * an, R += S * Vn, V += S * ve, oe += S * Oe, S = K[2], N += S * et, ne += S * mt, ae += S * Et, Y += S * Ve, G += S * ft, ie += S * At, xe += S * nt, he += S * Yt, pe += S * Zt, se += S * Dn, de += S * qn, ge += S * dn, R += S * an, V += S * Vn, oe += S * ve, fe += S * Oe, S = K[3], ne += S * et, ae += S * mt, Y += S * Et, G += S * Ve, ie += S * ft, xe += S * At, he += S * nt, pe += S * Yt, se += S * Zt, de += S * Dn, ge += S * qn, R += S * dn, V += S * an, oe += S * Vn, fe += S * ve, Fe += S * Oe, S = K[4], ae += S * et, Y += S * mt, G += S * Et, ie += S * Ve, xe += S * ft, he += S * At, pe += S * nt, se += S * Yt, de += S * Zt, ge += S * Dn, R += S * qn, V += S * dn, oe += S * an, fe += S * Vn, Fe += S * ve, be += S * Oe, S = K[5], Y += S * et, G += S * mt, ie += S * Et, xe += S * Ve, he += S * ft, pe += S * At, se += S * nt, de += S * Yt, ge += S * Zt, R += S * Dn, V += S * qn, oe += S * dn, fe += S * an, Fe += S * Vn, be += S * ve, Ee += S * Oe, S = K[6], G += S * et, ie += S * mt, xe += S * Et, he += S * Ve, pe += S * ft, se += S * At, de += S * nt, ge += S * Yt, R += S * Zt, V += S * Dn, oe += S * qn, fe += S * dn, Fe += S * an, be += S * Vn, Ee += S * ve, Ce += S * Oe, S = K[7], ie += S * et, xe += S * mt, he += S * Et, pe += S * Ve, se += S * ft, de += S * At, ge += S * nt, R += S * Yt, V += S * Zt, oe += S * Dn, fe += S * qn, Fe += S * dn, be += S * an, Ee += S * Vn, Ce += S * ve, me += S * Oe, S = K[8], xe += S * et, he += S * mt, pe += S * Et, se += S * Ve, de += S * ft, ge += S * At, R += S * nt, V += S * Yt, oe += S * Zt, fe += S * Dn, Fe += S * qn, be += S * dn, Ee += S * an, Ce += S * Vn, me += S * ve, Te += S * Oe, S = K[9], he += S * et, pe += S * mt, se += S * Et, de += S * Ve, ge += S * ft, R += S * At, V += S * nt, oe += S * Yt, fe += S * Zt, Fe += S * Dn, be += S * qn, Ee += S * dn, Ce += S * an, me += S * Vn, Te += S * ve, Se += S * Oe, S = K[10], pe += S * et, se += S * mt, de += S * Et, ge += S * Ve, R += S * ft, V += S * At, oe += S * nt, fe += S * Yt, Fe += S * Zt, be += S * Dn, Ee += S * qn, Ce += S * dn, me += S * an, Te += S * Vn, Se += S * ve, Me += S * Oe, S = K[11], se += S * et, de += S * mt, ge += S * Et, R += S * Ve, V += S * ft, oe += S * At, fe += S * nt, Fe += S * Yt, be += S * Zt, Ee += S * Dn, Ce += S * qn, me += S * dn, Te += S * an, Se += S * Vn, Me += S * ve, Ue += S * Oe, S = K[12], de += S * et, ge += S * mt, R += S * Et, V += S * Ve, oe += S * ft, fe += S * At, Fe += S * nt, be += S * Yt, Ee += S * Zt, Ce += S * Dn, me += S * qn, Te += S * dn, Se += S * an, Me += S * Vn, Ue += S * ve, Ke += S * Oe, S = K[13], ge += S * et, R += S * mt, V += S * Et, oe += S * Ve, fe += S * ft, Fe += S * At, be += S * nt, Ee += S * Yt, Ce += S * Zt, me += S * Dn, Te += S * qn, Se += S * dn, Me += S * an, Ue += S * Vn, Ke += S * ve, dt += S * Oe, S = K[14], R += S * et, V += S * mt, oe += S * Et, fe += S * Ve, Fe += S * ft, be += S * At, Ee += S * nt, Ce += S * Yt, me += S * Zt, Te += S * Dn, Se += S * qn, Me += S * dn, Ue += S * an, Ke += S * Vn, dt += S * ve, kt += S * Oe, S = K[15], V += S * et, oe += S * mt, fe += S * Et, Fe += S * Ve, be += S * ft, Ee += S * At, Ce += S * nt, me += S * Yt, Te += S * Zt, Se += S * Dn, Me += S * qn, Ue += S * dn, Ke += S * an, dt += S * Vn, kt += S * ve, Xe += S * Oe, Q += 38 * oe, ce += 38 * fe, N += 38 * Fe, ne += 38 * be, ae += 38 * Ee, Y += 38 * Ce, G += 38 * me, ie += 38 * Te, xe += 38 * Se, he += 38 * Me, pe += 38 * Ue, se += 38 * Ke, de += 38 * dt, ge += 38 * kt, R += 38 * Xe, X = 1, S = Q + X + 65535, X = Math.floor(S / 65536), Q = S - X * 65536, S = ce + X + 65535, X = Math.floor(S / 65536), ce = S - X * 65536, S = N + X + 65535, X = Math.floor(S / 65536), N = S - X * 65536, S = ne + X + 65535, X = Math.floor(S / 65536), ne = S - X * 65536, S = ae + X + 65535, X = Math.floor(S / 65536), ae = S - X * 65536, S = Y + X + 65535, X = Math.floor(S / 65536), Y = S - X * 65536, S = G + X + 65535, X = Math.floor(S / 65536), G = S - X * 65536, S = ie + X + 65535, X = Math.floor(S / 65536), ie = S - X * 65536, S = xe + X + 65535, X = Math.floor(S / 65536), xe = S - X * 65536, S = he + X + 65535, X = Math.floor(S / 65536), he = S - X * 65536, S = pe + X + 65535, X = Math.floor(S / 65536), pe = S - X * 65536, S = se + X + 65535, X = Math.floor(S / 65536), se = S - X * 65536, S = de + X + 65535, X = Math.floor(S / 65536), de = S - X * 65536, S = ge + X + 65535, X = Math.floor(S / 65536), ge = S - X * 65536, S = R + X + 65535, X = Math.floor(S / 65536), R = S - X * 65536, S = V + X + 65535, X = Math.floor(S / 65536), V = S - X * 65536, Q += X - 1 + 37 * (X - 1), X = 1, S = Q + X + 65535, X = Math.floor(S / 65536), Q = S - X * 65536, S = ce + X + 65535, X = Math.floor(S / 65536), ce = S - X * 65536, S = N + X + 65535, X = Math.floor(S / 65536), N = S - X * 65536, S = ne + X + 65535, X = Math.floor(S / 65536), ne = S - X * 65536, S = ae + X + 65535, X = Math.floor(S / 65536), ae = S - X * 65536, S = Y + X + 65535, X = Math.floor(S / 65536), Y = S - X * 65536, S = G + X + 65535, X = Math.floor(S / 65536), G = S - X * 65536, S = ie + X + 65535, X = Math.floor(S / 65536), ie = S - X * 65536, S = xe + X + 65535, X = Math.floor(S / 65536), xe = S - X * 65536, S = he + X + 65535, X = Math.floor(S / 65536), he = S - X * 65536, S = pe + X + 65535, X = Math.floor(S / 65536), pe = S - X * 65536, S = se + X + 65535, X = Math.floor(S / 65536), se = S - X * 65536, S = de + X + 65535, X = Math.floor(S / 65536), de = S - X * 65536, S = ge + X + 65535, X = Math.floor(S / 65536), ge = S - X * 65536, S = R + X + 65535, X = Math.floor(S / 65536), R = S - X * 65536, S = V + X + 65535, X = Math.floor(S / 65536), V = S - X * 65536, Q += X - 1 + 37 * (X - 1), J[0] = Q, J[1] = ce, J[2] = N, J[3] = ne, J[4] = ae, J[5] = Y, J[6] = G, J[7] = ie, J[8] = xe, J[9] = he, J[10] = pe, J[11] = se, J[12] = de, J[13] = ge, J[14] = R, J[15] = V;
|
|
174314
174322
|
}
|
|
174315
174323
|
function C(J, K) {
|
|
174316
174324
|
k(J, K, K);
|
|
@@ -185709,7 +185717,7 @@ const wWe = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
185709
185717
|
onFocusMode: (st) => {
|
|
185710
185718
|
ce && (N == null || N(!1)), P == null || P(st);
|
|
185711
185719
|
}
|
|
185712
|
-
}), [Zt,
|
|
185720
|
+
}), [Zt, Dn] = Be(!1), [qn, dn] = Be(!1), an = Ne(null), ve = (() => {
|
|
185713
185721
|
if (!Ve)
|
|
185714
185722
|
return { canvas: void 0, background: void 0 };
|
|
185715
185723
|
const st = {}, Mt = {}, pn = ge ?? "light";
|
|
@@ -185893,9 +185901,9 @@ const wWe = "space-xsm gap-xsm hover:color-bg-default-hover cursor-pointer h-[30
|
|
|
185893
185901
|
Ae(() => {
|
|
185894
185902
|
if (pt && Nt) {
|
|
185895
185903
|
const { selection: st } = pt.state, Mt = qy(st), pn = () => {
|
|
185896
|
-
|
|
185904
|
+
Dn(!0);
|
|
185897
185905
|
}, On = () => {
|
|
185898
|
-
|
|
185906
|
+
Dn(!1);
|
|
185899
185907
|
};
|
|
185900
185908
|
return !Mt && pt.on("focus", pn), Mt && pt.on("blur", On), () => {
|
|
185901
185909
|
pt.off("focus", pn), pt.off("blur", On);
|
|
@@ -138,7 +138,9 @@ export interface CommentStoreState {
|
|
|
138
138
|
}>) => void;
|
|
139
139
|
resolveComment: (commentId: string) => void;
|
|
140
140
|
unresolveComment: (commentId: string) => void;
|
|
141
|
-
deleteComment: (commentId: string
|
|
141
|
+
deleteComment: (commentId: string, options?: {
|
|
142
|
+
skipExternalCallback?: boolean;
|
|
143
|
+
}) => void;
|
|
142
144
|
deleteReply: (commentId: string, replyId: string) => void;
|
|
143
145
|
handleAddReply: (activeCommentId: string, replyContent: string, replyCallback?: (activeCommentId: string, reply: IComment) => void) => void;
|
|
144
146
|
focusCommentInEditor: (commentId: string) => void;
|