@remarkablejames/editor 0.0.1 → 0.0.2
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/lib/{ActionMenuButton-B0EHT9CC.js → ActionMenuButton-Bmn3RME4.js} +10 -9
- package/lib/ActionMenuButton-C5P0Kzrb.cjs +1 -0
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.js +33 -31
- package/lib/Blockquote.cjs +2 -2
- package/lib/Blockquote.js +12 -13
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +10 -11
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +8 -9
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +45 -41
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +14 -13
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +5 -6
- package/lib/CodeBlock.cjs +1 -44
- package/lib/CodeBlock.js +183 -3858
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +8 -9
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +19 -18
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +8 -9
- package/lib/{Drawer-BCWVN-4l.js → Drawer-DvGh9aXG.js} +52 -46
- package/lib/Drawer-gz9U5ArC.cjs +2 -0
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +15 -14
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +20 -16
- package/lib/ExportPdf.cjs +3 -3
- package/lib/ExportPdf.js +13 -14
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +6 -6
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +6 -7
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +14 -15
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +26 -26
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +23 -22
- package/lib/History.cjs +1 -1
- package/lib/History.js +11 -11
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +9 -10
- package/lib/Icon-CKM0tYbW.js +15 -0
- package/lib/Icon-CQyFgXeo.cjs +1 -0
- package/lib/{Iframe-BdgiWGml.js → Iframe-CnnvV6cK.js} +21 -19
- package/lib/Iframe-Ds6gG2YO.cjs +1 -0
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +2 -2
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +5 -4
- package/lib/ImageCropper-BKhXlnXN.cjs +1 -0
- package/lib/ImageCropper-DUzu_9-6.js +896 -0
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +94 -91
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +26 -25
- package/lib/{Indent-BpMcZKok.js → Indent-Bsj8gKvT.js} +30 -31
- package/lib/Indent-D_7HOYYd.cjs +1 -0
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +11 -12
- package/lib/{Katex-B8_uprkO.js → Katex-CilGTz7u.js} +22 -19
- package/lib/Katex-lL3bHXJd.cjs +4 -0
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +20 -19
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/{LinkEditBlock-BX0fXXpF.js → LinkEditBlock-BD_WvA3r.js} +24 -19
- package/lib/LinkEditBlock-D3HSHmsU.cjs +5 -0
- package/lib/Mention.js +3 -3
- package/lib/Mermaid-BfeLPzoS.cjs +2 -0
- package/lib/{Mermaid-D8bbIgAl.js → Mermaid-BrjU75Bs.js} +48 -45
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +28 -26
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +10 -11
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +42 -37
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +5 -5
- package/lib/{SlashCommandNodeView-BcmtKbEE.js → SlashCommandNodeView-COx5qZ2y.js} +41 -39
- package/lib/SlashCommandNodeView-DD-nlhM-.cjs +1 -0
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +11 -12
- package/lib/{Table-DbxuP5xh.js → Table-BlM8yMhr.js} +46 -46
- package/lib/Table-C21AlUrh.cjs +5 -0
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +11 -12
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +27 -26
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +19 -18
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +8 -9
- package/lib/{Twitter-9I6BLNmg.js → Twitter-BP8sYXX7.js} +22 -18
- package/lib/Twitter-D46MnvPr.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video-Bpd8W8l6.js +231 -0
- package/lib/Video-BwrHx6B1.cjs +1 -0
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +5 -4
- package/lib/bubble.cjs +3 -3
- package/lib/bubble.js +171 -162
- package/lib/button-BmTP96NR.cjs +1 -0
- package/lib/button-CDIxPURh.js +35 -0
- package/lib/checkbox-7sfSdzy9.js +29 -0
- package/lib/checkbox-DyVlLWHv.cjs +1 -0
- package/lib/{clsx-CDyrfCnw.js → clsx-m_C5j3RU.js} +24 -24
- package/lib/dialog-B-jOQ5i3.cjs +1 -0
- package/lib/dialog-QWWUWOGP.js +95 -0
- package/lib/{dropdown-menu-Bs69ZBbO.js → dropdown-menu-C1hdPLCZ.js} +1 -1
- package/lib/{dropdown-menu-DjWlG2-J.cjs → dropdown-menu-CkHN04Mx.cjs} +1 -1
- package/lib/events.constant-Bh2uzJud.js +71 -0
- package/lib/events.constant-ELn21EzG.cjs +1 -0
- package/lib/extensions/CodeBlock/CodeBlock.d.ts +1 -1
- package/lib/file-BLas99n7.js +43 -0
- package/lib/file-i7e4nQY2.cjs +1 -0
- package/lib/{index-C-tDsIKJ.js → index-B3Ijnbxs.js} +1 -1
- package/lib/{index-C1WCZhyA.js → index-C1KQsOcg.js} +1 -1
- package/lib/{index-CsSfYR30.js → index-C8FjP66D.js} +1 -1
- package/lib/index-CAiZY1nx.js +2741 -0
- package/lib/index-DWSAk_9a.cjs +1 -0
- package/lib/{index-DjDf4BK8.js → index-s3l5RdyW.js} +1 -1
- package/lib/index.cjs +4 -4
- package/lib/index.js +392 -147
- package/lib/input-qvpuOf-3.js +21 -0
- package/lib/input-s0JD5kf2.cjs +1 -0
- package/lib/isNumber-BTYSVlKo.cjs +1 -0
- package/lib/isNumber-WaBzl_0s.js +15 -0
- package/lib/label-CFax-gzo.cjs +1 -0
- package/lib/label-DC37f2RQ.js +11 -0
- package/lib/{popover-D-hUKDYu.cjs → popover-B05Fd8lC.cjs} +1 -1
- package/lib/{popover-CPr9bHYn.js → popover-CsSXh7w6.js} +1 -1
- package/lib/{renderNodeView-BJSrgyGj.js → renderNodeView-C_hPIdEs.js} +2 -2
- package/lib/{select-C2KF4RNg.cjs → select-7ubC1NF0.cjs} +1 -1
- package/lib/{select-CuE_HaQJ.js → select-B3-5wTqn.js} +1 -1
- package/lib/{separator-CHzYNMVt.js → separator-CYCA8tSn.js} +13 -12
- package/lib/separator-ncbdw4oq.cjs +1 -0
- package/lib/style.css +1 -1
- package/lib/tabs-BeHxylKH.js +46 -0
- package/lib/tabs-DBqNpGAq.cjs +1 -0
- package/lib/{textarea-gEoNp9CA.js → textarea-1FhpmBkP.js} +1 -1
- package/lib/{textarea-DZj6EY-N.cjs → textarea-Bjhcpp76.cjs} +1 -1
- package/lib/throttle-CRNq0z-O.js +249 -0
- package/lib/throttle-gTTvqDTW.cjs +1 -0
- package/lib/toggle-DoJTBdvy.js +89 -0
- package/lib/toggle-oFwBZC4x.cjs +1 -0
- package/lib/{updatePosition-e90ZrFWW.js → updatePosition-DvfTZHcH.js} +2 -2
- package/lib/useButtonProps-BE10eHkG.js +165 -0
- package/lib/useButtonProps-CFu0GHzW.cjs +1 -0
- package/package.json +1 -1
- package/lib/ActionMenuButton-J1el_e6Z.cjs +0 -1
- package/lib/Drawer-BTouEroZ.cjs +0 -2
- package/lib/Iframe-BfBLILDA.cjs +0 -1
- package/lib/Indent-Dvqz_WEn.cjs +0 -1
- package/lib/Katex-BQyeCeQ0.cjs +0 -4
- package/lib/LinkEditBlock-CIshn_8F.cjs +0 -5
- package/lib/Mermaid-0GiGVxn0.cjs +0 -2
- package/lib/SlashCommandNodeView-rDJ7OjRd.cjs +0 -1
- package/lib/Table-BEhNBeuA.cjs +0 -5
- package/lib/Twitter-BuEBgpi9.cjs +0 -1
- package/lib/index-D9oM__YW.cjs +0 -1
- package/lib/index-lj3VWExo.js +0 -4883
- package/lib/separator-_gvUNba_.cjs +0 -1
package/lib/bubble.js
CHANGED
|
@@ -1,46 +1,55 @@
|
|
|
1
1
|
import { jsx as f, Fragment as I, jsxs as x } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { f as ys, s as Ss, o as ks, a as vs, b as Cs, d as _s, h as Es, e as Ts, c as ni } from "./index-
|
|
2
|
+
import { a3 as Gr, d as ws, E as Ce, a4 as Jr, a5 as qr, $ as bs, a6 as _e, a7 as Xr, O as ti, L as xs, v as Me, F as Re, T as ei, A as Zr, u as Qr, a8 as to, a9 as eo } from "./clsx-m_C5j3RU.js";
|
|
3
|
+
import { f as ys, s as Ss, o as ks, a as vs, b as Cs, d as _s, h as Es, e as Ts, c as ni } from "./index-C8FjP66D.js";
|
|
4
4
|
import { Plugin as Ee, PluginKey as ne, NodeSelection as no, TextSelection as io, SelectionRange as so, Selection as ro } from "@tiptap/pm/state";
|
|
5
|
-
import { C as oo, T as lo } from "./Table-
|
|
5
|
+
import { C as oo, T as lo } from "./Table-BlM8yMhr.js";
|
|
6
6
|
import Ds, { useRef as Xt, useEffect as pt, useState as F, useCallback as M, useMemo as yt, Fragment as ii } from "react";
|
|
7
7
|
import { createPortal as As } from "react-dom";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { A as y } from "./toggle-DoJTBdvy.js";
|
|
9
|
+
import { D as ln, a as cn, b as an, c as hn, d as dn, e as co } from "./dialog-QWWUWOGP.js";
|
|
10
|
+
import { S as ao, a as ho, b as uo, c as fo, d as po } from "./select-B3-5wTqn.js";
|
|
10
11
|
import { Callout as Ne } from "./Callout.js";
|
|
11
|
-
import { u as ie, K as Un, s as
|
|
12
|
+
import { u as ie, K as Un, s as go } from "./Katex-CilGTz7u.js";
|
|
12
13
|
import { u as Y, n as Ye, V as Ei } from "./index-4Q5IhypJ.js";
|
|
14
|
+
import { l as Z, f as W, i as mo } from "./useButtonProps-BE10eHkG.js";
|
|
13
15
|
import { d as se } from "./delete-node-eQHsyyhR.js";
|
|
16
|
+
import { L as Tt } from "./label-DC37f2RQ.js";
|
|
17
|
+
import { I as jt } from "./input-qvpuOf-3.js";
|
|
18
|
+
import { B as Bt } from "./button-CDIxPURh.js";
|
|
14
19
|
import { MultipleColumnNode as Ti } from "./Column.js";
|
|
15
|
-
import "./
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { S as Dt } from "./separator-
|
|
19
|
-
import {
|
|
20
|
+
import { C as wo, s as bo, i as xo, D as vn } from "./Drawer-DvGh9aXG.js";
|
|
21
|
+
import { Editor as yo, makeDropdownToolbar as So } from "easydrawer";
|
|
22
|
+
import { d as ko } from "./file-BLas99n7.js";
|
|
23
|
+
import { S as Dt } from "./separator-CYCA8tSn.js";
|
|
24
|
+
import { E as vo, e as Co } from "./events.constant-Bh2uzJud.js";
|
|
25
|
+
import { P as Is, a as Os, b as Ms } from "./popover-CsSXh7w6.js";
|
|
20
26
|
import { Excalidraw as ce } from "./Excalidraw.js";
|
|
21
|
-
import { I as ae, g as
|
|
22
|
-
import
|
|
23
|
-
import { Pencil as
|
|
24
|
-
import { T as Ai } from "./textarea-
|
|
25
|
-
import { L as Ii, a as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
27
|
+
import { I as ae, g as _o } from "./Iframe-CnnvV6cK.js";
|
|
28
|
+
import Eo from "katex";
|
|
29
|
+
import { Pencil as To, Trash2 as Do, Check as Di } from "lucide-react";
|
|
30
|
+
import { T as Ai } from "./textarea-1FhpmBkP.js";
|
|
31
|
+
import { L as Ii, a as Ao, R as Io } from "./LinkEditBlock-BD_WvA3r.js";
|
|
32
|
+
import { I as Oo } from "./ImageCropper-DUzu_9-6.js";
|
|
33
|
+
import { ImageGif as Mo } from "./ImageGif.js";
|
|
34
|
+
import { V as Ro } from "./Video-Bpd8W8l6.js";
|
|
35
|
+
import { M as Rs, E as No } from "./Mermaid-BrjU75Bs.js";
|
|
28
36
|
import { RichTextBold as Uo } from "./Bold.js";
|
|
29
37
|
import { RichTextCode as Lo } from "./Code.js";
|
|
30
|
-
import "./index-
|
|
38
|
+
import "./index-C1KQsOcg.js";
|
|
31
39
|
import { RichTextColor as Po } from "./Color.js";
|
|
32
40
|
import { RichTextHighlight as Bo } from "./Highlight.js";
|
|
33
41
|
import { RichTextItalic as Vo } from "./Italic.js";
|
|
34
|
-
import { r as Ho } from "./SlashCommandNodeView-
|
|
42
|
+
import { r as Ho } from "./SlashCommandNodeView-COx5qZ2y.js";
|
|
35
43
|
import { RichTextStrike as $o } from "./Strike.js";
|
|
36
44
|
import { RichTextAlign as Fo, TextAlign as zo } from "./TextAlign.js";
|
|
37
45
|
import { RichTextUnderline as Wo } from "./TextUnderline.js";
|
|
38
|
-
import {
|
|
46
|
+
import { I as tt } from "./Icon-CKM0tYbW.js";
|
|
47
|
+
import { T as Oi, F as Ko } from "./Twitter-BP8sYXX7.js";
|
|
39
48
|
import { DecorationSet as Mi, Decoration as jo } from "@tiptap/pm/view";
|
|
40
49
|
import { NodeRange as Yo } from "@tiptap/pm/model";
|
|
41
|
-
import { Clear as
|
|
42
|
-
import { I as
|
|
43
|
-
import { D as qo, a as Xo, b as Zo, f as mt, d as Qo, g as Ui, h as Li, i as Pi, j as Bi } from "./dropdown-menu-
|
|
50
|
+
import { Clear as Go } from "./Clear.js";
|
|
51
|
+
import { I as Jo, a as Ri, s as Ni } from "./Indent-Bsj8gKvT.js";
|
|
52
|
+
import { D as qo, a as Xo, b as Zo, f as mt, d as Qo, g as Ui, h as Li, i as Pi, j as Bi } from "./dropdown-menu-C1hdPLCZ.js";
|
|
44
53
|
function tl(e, t) {
|
|
45
54
|
const n = Math.min(e.top, t.top), i = Math.max(e.bottom, t.bottom), s = Math.min(e.left, t.left), o = Math.max(e.right, t.right) - s, l = i - n, c = s, a = n;
|
|
46
55
|
return new DOMRect(c, a, o, l);
|
|
@@ -73,7 +82,7 @@ var el = class {
|
|
|
73
82
|
onUpdate: void 0,
|
|
74
83
|
onDestroy: void 0
|
|
75
84
|
}, this.shouldShow = ({ view: h, state: d, from: u, to: p }) => {
|
|
76
|
-
const { doc: g, selection: m } = d, { empty: w } = m, b = !g.textBetween(u, p).length &&
|
|
85
|
+
const { doc: g, selection: m } = d, { empty: w } = m, b = !g.textBetween(u, p).length && Gr(d.selection), _ = this.element.contains(document.activeElement);
|
|
77
86
|
return !(!(h.hasFocus() || _) || w || b || !this.editor.isEditable);
|
|
78
87
|
}, this.mousedownHandler = () => {
|
|
79
88
|
this.preventHide = !0;
|
|
@@ -284,7 +293,7 @@ var nl = class {
|
|
|
284
293
|
}, this.element.tabIndex = 0, r && (this.shouldShow = r), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.update(n, n.state), this.getShouldShow() && (this.show(), this.updatePosition());
|
|
285
294
|
}
|
|
286
295
|
getTextContent(e) {
|
|
287
|
-
return
|
|
296
|
+
return Jr(e, { textSerializers: qr(this.editor.schema) });
|
|
288
297
|
}
|
|
289
298
|
get middlewares() {
|
|
290
299
|
const e = [];
|
|
@@ -458,7 +467,7 @@ const il = [
|
|
|
458
467
|
{ value: "warning", label: "Warning", icon: "TriangleAlert" },
|
|
459
468
|
{ value: "caution", label: "Caution", icon: "OctagonAlert" }
|
|
460
469
|
];
|
|
461
|
-
function
|
|
470
|
+
function su() {
|
|
462
471
|
const e = Z(), t = W(), { t: n } = Y(), { type: i, title: s, body: r } = ie(t, Ne.name, {
|
|
463
472
|
type: "note",
|
|
464
473
|
title: "",
|
|
@@ -493,15 +502,15 @@ function Gd() {
|
|
|
493
502
|
/* @__PURE__ */ x("div", { className: "richtext-space-y-4 richtext-py-4", children: [
|
|
494
503
|
/* @__PURE__ */ x("div", { className: "richtext-space-y-2", children: [
|
|
495
504
|
/* @__PURE__ */ f(Tt, { children: n("editor.callout.dialog.type") }),
|
|
496
|
-
/* @__PURE__ */ x(
|
|
497
|
-
/* @__PURE__ */ f(
|
|
498
|
-
|
|
505
|
+
/* @__PURE__ */ x(ao, { onValueChange: a, value: c, children: [
|
|
506
|
+
/* @__PURE__ */ f(ho, { children: /* @__PURE__ */ f(
|
|
507
|
+
uo,
|
|
499
508
|
{
|
|
500
509
|
className: "richtext-text-accent",
|
|
501
510
|
placeholder: n("editor.callout.dialog.type.placeholder")
|
|
502
511
|
}
|
|
503
512
|
) }),
|
|
504
|
-
/* @__PURE__ */ f(
|
|
513
|
+
/* @__PURE__ */ f(fo, { children: il.map((_) => /* @__PURE__ */ f(po, { value: _.value, children: n(`editor.callout.type.${_.value}`) }, _.value)) })
|
|
505
514
|
] })
|
|
506
515
|
] }),
|
|
507
516
|
/* @__PURE__ */ x("div", { className: "richtext-space-y-2", children: [
|
|
@@ -540,7 +549,7 @@ function Gd() {
|
|
|
540
549
|
}
|
|
541
550
|
) : /* @__PURE__ */ f(I, {});
|
|
542
551
|
}
|
|
543
|
-
function
|
|
552
|
+
function ru() {
|
|
544
553
|
const e = Z(), t = W(), { t: n } = Y(), i = M(() => t.isActive(Ti.name), [t]), s = M(() => se(Ti.name, t), [t]), r = M(() => t.chain().focus().addColBefore().run(), [t]), o = M(() => t.chain().focus().addColAfter().run(), [t]), l = M(() => t.chain().focus().deleteCol().run(), [t]);
|
|
545
554
|
return e ? /* @__PURE__ */ f(
|
|
546
555
|
Q,
|
|
@@ -887,10 +896,10 @@ function wl({ editor: e, attrs: t, extension: n }) {
|
|
|
887
896
|
const [i, s] = F(!1), r = Xt(null), o = Xt(null), { alt: l, align: c } = t, a = n == null ? void 0 : n.options.upload, h = () => {
|
|
888
897
|
(async () => {
|
|
889
898
|
const S = document.querySelector("#easydrawer");
|
|
890
|
-
S && (r.current = new
|
|
899
|
+
S && (r.current = new yo(S, {
|
|
891
900
|
wheelEventsEnabled: !1,
|
|
892
901
|
disableZoom: !0
|
|
893
|
-
}), o.current =
|
|
902
|
+
}), o.current = So(r.current), o.current.addDefaultToolWidgets(), r.current.loadFromSVG(decodeURIComponent(l)));
|
|
894
903
|
})();
|
|
895
904
|
};
|
|
896
905
|
pt(() => {
|
|
@@ -900,10 +909,10 @@ function wl({ editor: e, attrs: t, extension: n }) {
|
|
|
900
909
|
}, [i]);
|
|
901
910
|
const d = async () => {
|
|
902
911
|
if (r.current) {
|
|
903
|
-
const D = r.current.toSVG(), S = D.outerHTML, k = `drawer-${
|
|
904
|
-
let N =
|
|
912
|
+
const D = r.current.toSVG(), S = D.outerHTML, k = `drawer-${bo()}.svg`;
|
|
913
|
+
let N = xo(D.outerHTML);
|
|
905
914
|
if (a) {
|
|
906
|
-
const H =
|
|
915
|
+
const H = ko(N, k);
|
|
907
916
|
N = await a(H);
|
|
908
917
|
}
|
|
909
918
|
e == null || e.chain().focus().setDrawer(
|
|
@@ -964,7 +973,7 @@ function wl({ editor: e, attrs: t, extension: n }) {
|
|
|
964
973
|
children: [
|
|
965
974
|
/* @__PURE__ */ f("div", { className: "richtext-size-full", id: "easydrawer" }),
|
|
966
975
|
/* @__PURE__ */ f(
|
|
967
|
-
|
|
976
|
+
wo,
|
|
968
977
|
{
|
|
969
978
|
changeBorderColorShape: _,
|
|
970
979
|
changeColorShape: w,
|
|
@@ -1012,8 +1021,8 @@ function bl({ item: e, disabled: t, editor: n }) {
|
|
|
1012
1021
|
}
|
|
1013
1022
|
) }) : /* @__PURE__ */ f(I, {});
|
|
1014
1023
|
}
|
|
1015
|
-
function
|
|
1016
|
-
const { lang: e, t } = Y(), n = Z(), i = W(), s = ie(i, vn.name), r =
|
|
1024
|
+
function ou() {
|
|
1025
|
+
const { lang: e, t } = Y(), n = Z(), i = W(), s = ie(i, vn.name), r = mo(vn.name), o = ({ editor: c }) => {
|
|
1017
1026
|
const { selection: a } = c.view.state, { $from: h, to: d } = a;
|
|
1018
1027
|
let u = !1;
|
|
1019
1028
|
return c.view.state.doc.nodesBetween(h.pos, d, (p) => {
|
|
@@ -1103,7 +1112,7 @@ function xl(e) {
|
|
|
1103
1112
|
s.disconnect();
|
|
1104
1113
|
}), { width: Ut.get("width") };
|
|
1105
1114
|
}
|
|
1106
|
-
function
|
|
1115
|
+
function lu() {
|
|
1107
1116
|
const e = Z(), t = W(), { t: n } = Y(), { width: i } = xl(t), s = ie(t, ce.name, {
|
|
1108
1117
|
defaultShowPicker: !1,
|
|
1109
1118
|
createUser: "",
|
|
@@ -1115,8 +1124,8 @@ function Zd() {
|
|
|
1115
1124
|
},
|
|
1116
1125
|
[t]
|
|
1117
1126
|
), h = M(() => {
|
|
1118
|
-
const p =
|
|
1119
|
-
|
|
1127
|
+
const p = vo.EXCALIDRAW(t.id);
|
|
1128
|
+
Co(p, s);
|
|
1120
1129
|
}, [t, s]), d = M(() => t.isActive(ce.name), [t]), u = M(() => se(ce.name, t), [t]);
|
|
1121
1130
|
return pt(() => {
|
|
1122
1131
|
r && (h(), t.chain().updateAttributes(ce.name, { defaultShowPicker: !1 }).focus().run());
|
|
@@ -1135,7 +1144,7 @@ function Zd() {
|
|
|
1135
1144
|
}
|
|
1136
1145
|
) : /* @__PURE__ */ f(I, {});
|
|
1137
1146
|
}
|
|
1138
|
-
function
|
|
1147
|
+
function cu() {
|
|
1139
1148
|
const e = Z(), t = W(), { t: n } = Y(), { width: i, height: s, src: r } = ie(t, ae.name, {
|
|
1140
1149
|
width: 0,
|
|
1141
1150
|
height: 0,
|
|
@@ -1155,7 +1164,7 @@ function Qd() {
|
|
|
1155
1164
|
(w) => {
|
|
1156
1165
|
var _;
|
|
1157
1166
|
(_ = w == null ? void 0 : w.preventDefault) == null || _.call(w);
|
|
1158
|
-
const b =
|
|
1167
|
+
const b = _o(c);
|
|
1159
1168
|
t.chain().updateAttributes(ae.name, {
|
|
1160
1169
|
src: (b == null ? void 0 : b.src) || c
|
|
1161
1170
|
}).setNodeSelection(t.state.selection.from).focus().run(), l(!1);
|
|
@@ -1181,7 +1190,7 @@ function Qd() {
|
|
|
1181
1190
|
/* @__PURE__ */ x(ln, { onOpenChange: l, open: o, children: [
|
|
1182
1191
|
/* @__PURE__ */ f(cn, { asChild: !0, children: /* @__PURE__ */ f(y, { icon: "Pencil", tooltip: "Open Edit Link" }) }),
|
|
1183
1192
|
/* @__PURE__ */ x(an, { children: [
|
|
1184
|
-
/* @__PURE__ */ f(
|
|
1193
|
+
/* @__PURE__ */ f(co, { children: /* @__PURE__ */ f(hn, { children: "Edit Link Iframe" }) }),
|
|
1185
1194
|
/* @__PURE__ */ f(
|
|
1186
1195
|
jt,
|
|
1187
1196
|
{
|
|
@@ -1219,8 +1228,8 @@ function yl({ children: e, visible: t, toggleVisible: n }) {
|
|
|
1219
1228
|
}).run(), a(""), d(""), n(!1);
|
|
1220
1229
|
}, [s, c, h, n]), p = yt(() => {
|
|
1221
1230
|
try {
|
|
1222
|
-
return
|
|
1223
|
-
macros:
|
|
1231
|
+
return Eo.renderToString(c, {
|
|
1232
|
+
macros: go(h || "")
|
|
1224
1233
|
});
|
|
1225
1234
|
} catch {
|
|
1226
1235
|
return c;
|
|
@@ -1280,7 +1289,7 @@ function yl({ children: e, visible: t, toggleVisible: n }) {
|
|
|
1280
1289
|
] })
|
|
1281
1290
|
] });
|
|
1282
1291
|
}
|
|
1283
|
-
function
|
|
1292
|
+
function au() {
|
|
1284
1293
|
const e = Z(), t = W(), [n, i] = F(!1), s = M(() => t.isActive(Un.name), [t]), r = M(() => se(Un.name, t), [t]);
|
|
1285
1294
|
return e ? /* @__PURE__ */ f(
|
|
1286
1295
|
Q,
|
|
@@ -1290,8 +1299,8 @@ function tu() {
|
|
|
1290
1299
|
pluginKey: "RichTextBubbleKatex",
|
|
1291
1300
|
shouldShow: s,
|
|
1292
1301
|
children: /* @__PURE__ */ x("div", { className: "richtext-flex richtext-items-center richtext-gap-2 richtext-rounded-md !richtext-border !richtext-border-solid !richtext-border-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none", children: [
|
|
1293
|
-
/* @__PURE__ */ f(yl, { toggleVisible: i, visible: n, children: /* @__PURE__ */ f(y, { action: () => i(!n), tooltip: "Edit", children: /* @__PURE__ */ f(
|
|
1294
|
-
/* @__PURE__ */ f(y, { action: r, tooltip: "Delete", children: /* @__PURE__ */ f(
|
|
1302
|
+
/* @__PURE__ */ f(yl, { toggleVisible: i, visible: n, children: /* @__PURE__ */ f(y, { action: () => i(!n), tooltip: "Edit", children: /* @__PURE__ */ f(To, { size: 16 }) }) }),
|
|
1303
|
+
/* @__PURE__ */ f(y, { action: r, tooltip: "Delete", children: /* @__PURE__ */ f(Do, { size: 16 }) })
|
|
1295
1304
|
] })
|
|
1296
1305
|
}
|
|
1297
1306
|
) : /* @__PURE__ */ f(I, {});
|
|
@@ -1335,7 +1344,7 @@ function Sl(e) {
|
|
|
1335
1344
|
)
|
|
1336
1345
|
] });
|
|
1337
1346
|
}
|
|
1338
|
-
function
|
|
1347
|
+
function hu() {
|
|
1339
1348
|
const e = Z(), t = W(), [n, i] = F(!1), s = ie(t, Ii.name), r = s == null ? void 0 : s.href, o = M(({ editor: h }) => h.isActive(Ii.name), []), l = (h, d, u) => {
|
|
1340
1349
|
const p = t.state.selection, { from: g } = p, m = (d == null ? void 0 : d.length) ?? 0, w = g + m;
|
|
1341
1350
|
t.chain().extendMarkRange("link").insertContent({
|
|
@@ -1363,7 +1372,7 @@ function eu() {
|
|
|
1363
1372
|
options: { placement: "bottom", offset: 8, flip: !0 },
|
|
1364
1373
|
pluginKey: "RichTextBubbleLink",
|
|
1365
1374
|
shouldShow: o,
|
|
1366
|
-
children: /* @__PURE__ */ f(I, { children: n ? /* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-gap-2 richtext-rounded-md !richtext-border !richtext-border-solid !richtext-border-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none", children: /* @__PURE__ */ f(
|
|
1375
|
+
children: /* @__PURE__ */ f(I, { children: n ? /* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-gap-2 richtext-rounded-md !richtext-border !richtext-border-solid !richtext-border-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none", children: /* @__PURE__ */ f(Ao, { editor: t, onClose: a, onSetLink: l }) }) : /* @__PURE__ */ f("div", { className: "richtext-flex richtext-items-center richtext-gap-2 richtext-rounded-md !richtext-border !richtext-border-solid !richtext-border-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none", children: /* @__PURE__ */ f(
|
|
1367
1376
|
Sl,
|
|
1368
1377
|
{
|
|
1369
1378
|
editor: t,
|
|
@@ -1395,15 +1404,15 @@ function si({ item: e, disabled: t, editor: n }) {
|
|
|
1395
1404
|
) }) : /* @__PURE__ */ f(I, {});
|
|
1396
1405
|
}
|
|
1397
1406
|
function kl(e) {
|
|
1398
|
-
return e.type.name ===
|
|
1407
|
+
return e.type.name === Oo.name;
|
|
1399
1408
|
}
|
|
1400
1409
|
function vl(e) {
|
|
1401
|
-
return e.type.name ===
|
|
1410
|
+
return e.type.name === Mo.name;
|
|
1402
1411
|
}
|
|
1403
1412
|
function Cl(e) {
|
|
1404
|
-
return e.type.name ===
|
|
1413
|
+
return e.type.name === Ro.name;
|
|
1405
1414
|
}
|
|
1406
|
-
function
|
|
1415
|
+
function du() {
|
|
1407
1416
|
const { lang: e, t } = Y(), n = Z(), i = W(), s = ({ editor: o }) => {
|
|
1408
1417
|
const { selection: l } = o.view.state, { $from: c, to: a } = l;
|
|
1409
1418
|
let h = !1;
|
|
@@ -1423,7 +1432,7 @@ function nu() {
|
|
|
1423
1432
|
}
|
|
1424
1433
|
) : /* @__PURE__ */ f(I, {});
|
|
1425
1434
|
}
|
|
1426
|
-
function
|
|
1435
|
+
function uu() {
|
|
1427
1436
|
const { lang: e, t } = Y(), n = Z(), i = W(), s = ({ editor: o }) => {
|
|
1428
1437
|
const { selection: l } = o.view.state, { $from: c, to: a } = l;
|
|
1429
1438
|
let h = !1;
|
|
@@ -1443,7 +1452,7 @@ function iu() {
|
|
|
1443
1452
|
}
|
|
1444
1453
|
) : /* @__PURE__ */ f(I, {});
|
|
1445
1454
|
}
|
|
1446
|
-
function
|
|
1455
|
+
function fu() {
|
|
1447
1456
|
const { t: e } = Y(), t = Z(), n = W(), i = ({ editor: r }) => {
|
|
1448
1457
|
const { selection: o } = r.view.state, { $from: l, to: c } = o;
|
|
1449
1458
|
let a = !1;
|
|
@@ -1492,7 +1501,7 @@ function El(e) {
|
|
|
1492
1501
|
return r = { node: o, pos: l }, !1;
|
|
1493
1502
|
}), r;
|
|
1494
1503
|
}
|
|
1495
|
-
function
|
|
1504
|
+
function pu() {
|
|
1496
1505
|
const { lang: e, t } = Y(), n = W(), i = ({ editor: r }) => {
|
|
1497
1506
|
if (!r.isEditable)
|
|
1498
1507
|
return !1;
|
|
@@ -1536,7 +1545,7 @@ function ru() {
|
|
|
1536
1545
|
}
|
|
1537
1546
|
) : /* @__PURE__ */ f(I, {});
|
|
1538
1547
|
}
|
|
1539
|
-
function
|
|
1548
|
+
function gu({ hiddenActions: e = [] }) {
|
|
1540
1549
|
var m, w, b, _, V, E, P, D, S, k, N, H, nt, Rt, Nt, v, gt, Oe;
|
|
1541
1550
|
const { t } = Y(), n = Z(), i = W(), s = ({ editor: Kt }) => Xr(Kt.view.state, lo.name), r = (Kt) => e.includes(Kt);
|
|
1542
1551
|
function o() {
|
|
@@ -1777,7 +1786,7 @@ function Dl() {
|
|
|
1777
1786
|
/* @__PURE__ */ f(Wo, {}),
|
|
1778
1787
|
/* @__PURE__ */ f($o, {}),
|
|
1779
1788
|
/* @__PURE__ */ f(Lo, {}),
|
|
1780
|
-
/* @__PURE__ */ f(
|
|
1789
|
+
/* @__PURE__ */ f(Io, {}),
|
|
1781
1790
|
/* @__PURE__ */ f(
|
|
1782
1791
|
Dt,
|
|
1783
1792
|
{
|
|
@@ -1790,7 +1799,7 @@ function Dl() {
|
|
|
1790
1799
|
/* @__PURE__ */ f(Fo, {})
|
|
1791
1800
|
] });
|
|
1792
1801
|
}
|
|
1793
|
-
function
|
|
1802
|
+
function mu({ buttonBubble: e }) {
|
|
1794
1803
|
const t = W(), n = Z(), i = ({ editor: s }) => {
|
|
1795
1804
|
const { selection: r } = s.view.state, { $from: o, to: l } = r;
|
|
1796
1805
|
return o.pos === l ? !1 : r instanceof io;
|
|
@@ -1806,7 +1815,7 @@ function lu({ buttonBubble: e }) {
|
|
|
1806
1815
|
}
|
|
1807
1816
|
) : /* @__PURE__ */ f(I, {});
|
|
1808
1817
|
}
|
|
1809
|
-
function
|
|
1818
|
+
function wu() {
|
|
1810
1819
|
const { t: e } = Y(), t = Z(), n = W(), [i, s] = F(!1), r = M(({ editor: c }) => c.isActive(Oi.name), []), o = (c) => {
|
|
1811
1820
|
n.commands.updateTweet({ src: c }), s(!1);
|
|
1812
1821
|
}, l = M(() => se(Oi.name, n), [n]);
|
|
@@ -1931,7 +1940,7 @@ class Bs {
|
|
|
1931
1940
|
this._observers = lt();
|
|
1932
1941
|
}
|
|
1933
1942
|
}
|
|
1934
|
-
const St = Math.floor, $e = Math.abs, Zt = (e, t) => e < t ? e : t, At = (e, t) => e > t ? e : t, Vs = (e) => e !== 0 ? e < 0 : 1 / e < 0, Vi = 1, Hi = 2, _n = 4, En = 8, pe = 32, bt = 64,
|
|
1943
|
+
const St = Math.floor, $e = Math.abs, Zt = (e, t) => e < t ? e : t, At = (e, t) => e > t ? e : t, Vs = (e) => e !== 0 ? e < 0 : 1 / e < 0, Vi = 1, Hi = 2, _n = 4, En = 8, pe = 32, bt = 64, G = 128, Rl = 1 << 29, un = 31, Bn = 63, Pt = 127, Nl = 2147483647, Hs = Number.MAX_SAFE_INTEGER, Ul = Number.isInteger || ((e) => typeof e == "number" && isFinite(e) && St(e) === e), Ll = String.fromCharCode, Pl = (e) => e.toLowerCase(), Bl = /^\s*/g, Vl = (e) => e.replace(Bl, ""), Hl = /([A-Z])/g, $i = (e, t) => Vl(e.replace(Hl, (n) => `${t}${Pl(n)}`)), $l = (e) => {
|
|
1935
1944
|
const t = unescape(encodeURIComponent(e)), n = t.length, i = new Uint8Array(n);
|
|
1936
1945
|
for (let s = 0; s < n; s++)
|
|
1937
1946
|
i[s] = /** @type {number} */
|
|
@@ -1972,13 +1981,13 @@ const De = () => new Te(), Wl = (e) => {
|
|
|
1972
1981
|
e.cpos === n && (e.bufs.push(e.cbuf), e.cbuf = new Uint8Array(n * 2), e.cpos = 0), e.cbuf[e.cpos++] = t;
|
|
1973
1982
|
}, Vn = $, T = (e, t) => {
|
|
1974
1983
|
for (; t > Pt; )
|
|
1975
|
-
$(e,
|
|
1984
|
+
$(e, G | Pt & t), t = St(t / 128);
|
|
1976
1985
|
$(e, Pt & t);
|
|
1977
1986
|
}, ri = (e, t) => {
|
|
1978
1987
|
const n = Vs(t);
|
|
1979
|
-
for (n && (t = -t), $(e, (t > Bn ?
|
|
1980
|
-
$(e, (t > Pt ?
|
|
1981
|
-
}, Hn = new Uint8Array(3e4), Yl = Hn.length / 3,
|
|
1988
|
+
for (n && (t = -t), $(e, (t > Bn ? G : 0) | (n ? bt : 0) | Bn & t), t = St(t / 64); t > 0; )
|
|
1989
|
+
$(e, (t > Pt ? G : 0) | Pt & t), t = St(t / 128);
|
|
1990
|
+
}, Hn = new Uint8Array(3e4), Yl = Hn.length / 3, Gl = (e, t) => {
|
|
1982
1991
|
if (t.length < Yl) {
|
|
1983
1992
|
const n = ge.encodeInto(t, Hn).written || 0;
|
|
1984
1993
|
T(e, n);
|
|
@@ -1986,7 +1995,7 @@ const De = () => new Te(), Wl = (e) => {
|
|
|
1986
1995
|
$(e, Hn[i]);
|
|
1987
1996
|
} else
|
|
1988
1997
|
et(e, zl(t));
|
|
1989
|
-
},
|
|
1998
|
+
}, Jl = (e, t) => {
|
|
1990
1999
|
const n = unescape(encodeURIComponent(t)), i = n.length;
|
|
1991
2000
|
T(e, i);
|
|
1992
2001
|
for (let s = 0; s < i; s++)
|
|
@@ -1996,7 +2005,7 @@ const De = () => new Te(), Wl = (e) => {
|
|
|
1996
2005
|
n.codePointAt(s)
|
|
1997
2006
|
);
|
|
1998
2007
|
}, Yt = ge && /** @type {any} */
|
|
1999
|
-
ge.encodeInto ?
|
|
2008
|
+
ge.encodeInto ? Gl : Jl, fn = (e, t) => {
|
|
2000
2009
|
const n = e.cbuf.length, i = e.cpos, s = Zt(n - i, t.length), r = t.length - s;
|
|
2001
2010
|
e.cbuf.set(t.subarray(0, s), i), e.cpos += s, r > 0 && (e.bufs.push(e.cbuf), e.cbuf = new Uint8Array(At(n * 2, r)), e.cbuf.set(t.subarray(s)), e.cpos = r);
|
|
2002
2011
|
}, et = (e, t) => {
|
|
@@ -2142,7 +2151,7 @@ const li = (e) => new pn(e), ec = (e) => e.pos !== e.arr.length, nc = (e, t) =>
|
|
|
2142
2151
|
const i = e.arr.length;
|
|
2143
2152
|
for (; e.pos < i; ) {
|
|
2144
2153
|
const s = e.arr[e.pos++];
|
|
2145
|
-
if (t = t + (s & Pt) * n, n *= 128, s <
|
|
2154
|
+
if (t = t + (s & Pt) * n, n *= 128, s < G)
|
|
2146
2155
|
return t;
|
|
2147
2156
|
if (t > Hs)
|
|
2148
2157
|
throw Fs;
|
|
@@ -2151,11 +2160,11 @@ const li = (e) => new pn(e), ec = (e) => e.pos !== e.arr.length, nc = (e, t) =>
|
|
|
2151
2160
|
}, ci = (e) => {
|
|
2152
2161
|
let t = e.arr[e.pos++], n = t & Bn, i = 64;
|
|
2153
2162
|
const s = (t & bt) > 0 ? -1 : 1;
|
|
2154
|
-
if ((t &
|
|
2163
|
+
if ((t & G) === 0)
|
|
2155
2164
|
return s * n;
|
|
2156
2165
|
const r = e.arr.length;
|
|
2157
2166
|
for (; e.pos < r; ) {
|
|
2158
|
-
if (t = e.arr[e.pos++], n = n + (t & Pt) * i, i *= 128, t <
|
|
2167
|
+
if (t = e.arr[e.pos++], n = n + (t & Pt) * i, i *= 128, t < G)
|
|
2159
2168
|
return s * n;
|
|
2160
2169
|
if (n > Hs)
|
|
2161
2170
|
throw Fs;
|
|
@@ -2214,19 +2223,19 @@ const li = (e) => new pn(e), ec = (e) => e.pos !== e.arr.length, nc = (e, t) =>
|
|
|
2214
2223
|
const t = R(e), n = {};
|
|
2215
2224
|
for (let i = 0; i < t; i++) {
|
|
2216
2225
|
const s = $n(e);
|
|
2217
|
-
n[s] =
|
|
2226
|
+
n[s] = Ge(e);
|
|
2218
2227
|
}
|
|
2219
2228
|
return n;
|
|
2220
2229
|
},
|
|
2221
2230
|
(e) => {
|
|
2222
2231
|
const t = R(e), n = [];
|
|
2223
2232
|
for (let i = 0; i < t; i++)
|
|
2224
|
-
n.push(
|
|
2233
|
+
n.push(Ge(e));
|
|
2225
2234
|
return n;
|
|
2226
2235
|
},
|
|
2227
2236
|
it
|
|
2228
2237
|
// CASE 116: Uint8Array
|
|
2229
|
-
],
|
|
2238
|
+
], Ge = (e) => cc[127 - me(e)](e);
|
|
2230
2239
|
class ji extends pn {
|
|
2231
2240
|
/**
|
|
2232
2241
|
* @param {Uint8Array} uint8Array
|
|
@@ -2299,7 +2308,7 @@ const hc = crypto.getRandomValues.bind(crypto), dc = Math.random, zs = () => hc(
|
|
|
2299
2308
|
new Promise(e)
|
|
2300
2309
|
);
|
|
2301
2310
|
Promise.all.bind(Promise);
|
|
2302
|
-
const
|
|
2311
|
+
const Gi = (e) => e === void 0 ? null : e;
|
|
2303
2312
|
class mc {
|
|
2304
2313
|
constructor() {
|
|
2305
2314
|
this.map = /* @__PURE__ */ new Map();
|
|
@@ -2326,7 +2335,7 @@ try {
|
|
|
2326
2335
|
const bc = Ws, xc = Object.assign, Ks = Object.keys, yc = (e, t) => {
|
|
2327
2336
|
for (const n in e)
|
|
2328
2337
|
t(e[n], n);
|
|
2329
|
-
},
|
|
2338
|
+
}, Ji = (e) => Ks(e).length, Sc = (e) => {
|
|
2330
2339
|
for (const t in e)
|
|
2331
2340
|
return !1;
|
|
2332
2341
|
return !0;
|
|
@@ -2335,7 +2344,7 @@ const bc = Ws, xc = Object.assign, Ks = Object.keys, yc = (e, t) => {
|
|
|
2335
2344
|
if (!t(e[n], n))
|
|
2336
2345
|
return !1;
|
|
2337
2346
|
return !0;
|
|
2338
|
-
}, kc = (e, t) => Object.prototype.hasOwnProperty.call(e, t), vc = (e, t) => e === t ||
|
|
2347
|
+
}, kc = (e, t) => Object.prototype.hasOwnProperty.call(e, t), vc = (e, t) => e === t || Ji(e) === Ji(t) && js(e, (n, i) => (n !== void 0 || kc(t, i)) && t[i] === n), Cc = Object.freeze, Ys = (e) => {
|
|
2339
2348
|
for (const t in e) {
|
|
2340
2349
|
const n = e[t];
|
|
2341
2350
|
(typeof n == "object" || typeof n == "function") && Ys(e[t]);
|
|
@@ -2348,7 +2357,7 @@ const bc = Ws, xc = Object.assign, Ks = Object.keys, yc = (e, t) => {
|
|
|
2348
2357
|
} finally {
|
|
2349
2358
|
n < e.length && hi(e, t, n + 1);
|
|
2350
2359
|
}
|
|
2351
|
-
}, _c = (e, t) => t.includes(e), te = typeof process < "u" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]",
|
|
2360
|
+
}, _c = (e, t) => t.includes(e), te = typeof process < "u" && process.release && /node|io\.js/.test(process.release.name) && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]", Gs = typeof window < "u" && typeof document < "u" && !te;
|
|
2352
2361
|
let ut;
|
|
2353
2362
|
const Ec = () => {
|
|
2354
2363
|
if (ut === void 0)
|
|
@@ -2368,15 +2377,15 @@ const Ec = () => {
|
|
|
2368
2377
|
}
|
|
2369
2378
|
})) : ut = lt();
|
|
2370
2379
|
return ut;
|
|
2371
|
-
}, Fn = (e) => Ec().has(e),
|
|
2372
|
-
|
|
2380
|
+
}, Fn = (e) => Ec().has(e), Je = (e) => Gi(te ? process.env[e.toUpperCase().replaceAll("-", "_")] : bc.getItem(e)), Js = (e) => Fn("--" + e) || Je(e) !== null;
|
|
2381
|
+
Js("production");
|
|
2373
2382
|
const Tc = te && _c(process.env.FORCE_COLOR, ["true", "1", "2"]), Dc = Tc || !Fn("--no-colors") && // @todo deprecate --no-colors
|
|
2374
|
-
!
|
|
2383
|
+
!Js("no-color") && (!te || process.stdout.isTTY) && (!te || Fn("--color") || Je("COLORTERM") !== null || (Je("TERM") || "").includes("color")), Ac = (e) => {
|
|
2375
2384
|
let t = "";
|
|
2376
2385
|
for (let n = 0; n < e.byteLength; n++)
|
|
2377
2386
|
t += Ll(e[n]);
|
|
2378
2387
|
return btoa(t);
|
|
2379
|
-
}, Ic = (e) => Buffer.from(e.buffer, e.byteOffset, e.byteLength).toString("base64"), Oc =
|
|
2388
|
+
}, Ic = (e) => Buffer.from(e.buffer, e.byteOffset, e.byteLength).toString("base64"), Oc = Gs ? Ac : Ic, Mc = (e) => Wl((t) => Qt(t, e));
|
|
2380
2389
|
class Rc {
|
|
2381
2390
|
/**
|
|
2382
2391
|
* @param {L} left
|
|
@@ -2506,7 +2515,7 @@ const Ot = (e, t, n) => t.clients.forEach((i, s) => {
|
|
|
2506
2515
|
for (let c = 0, a = i[c]; c < i.length && a.clock < l; a = i[++c])
|
|
2507
2516
|
dr(e, r, a.clock, a.len, n);
|
|
2508
2517
|
}
|
|
2509
|
-
}),
|
|
2518
|
+
}), Gc = (e, t) => {
|
|
2510
2519
|
let n = 0, i = e.length - 1;
|
|
2511
2520
|
for (; n <= i; ) {
|
|
2512
2521
|
const s = St((n + i) / 2), r = e[s], o = r.clock;
|
|
@@ -2520,7 +2529,7 @@ const Ot = (e, t, n) => t.clients.forEach((i, s) => {
|
|
|
2520
2529
|
return null;
|
|
2521
2530
|
}, oe = (e, t) => {
|
|
2522
2531
|
const n = e.clients.get(t.client);
|
|
2523
|
-
return n !== void 0 &&
|
|
2532
|
+
return n !== void 0 && Gc(n, t.clock) !== null;
|
|
2524
2533
|
}, fi = (e) => {
|
|
2525
2534
|
e.clients.forEach((t) => {
|
|
2526
2535
|
t.sort((s, r) => s.clock - r.clock);
|
|
@@ -2548,7 +2557,7 @@ const Ot = (e, t, n) => t.clients.forEach((i, s) => {
|
|
|
2548
2557
|
/** @type {Array<DeleteItem>} */
|
|
2549
2558
|
[]
|
|
2550
2559
|
)).push(new ui(n, i));
|
|
2551
|
-
}, sr = () => new re(),
|
|
2560
|
+
}, sr = () => new re(), Jc = (e) => {
|
|
2552
2561
|
const t = sr();
|
|
2553
2562
|
return e.clients.forEach((n, i) => {
|
|
2554
2563
|
const s = [];
|
|
@@ -2860,13 +2869,13 @@ class qe extends Xc {
|
|
|
2860
2869
|
* @return {ID}
|
|
2861
2870
|
*/
|
|
2862
2871
|
readLeftID() {
|
|
2863
|
-
return new
|
|
2872
|
+
return new Gt(this.clientDecoder.read(), this.leftClockDecoder.read());
|
|
2864
2873
|
}
|
|
2865
2874
|
/**
|
|
2866
2875
|
* @return {ID}
|
|
2867
2876
|
*/
|
|
2868
2877
|
readRightID() {
|
|
2869
|
-
return new
|
|
2878
|
+
return new Gt(this.clientDecoder.read(), this.rightClockDecoder.read());
|
|
2870
2879
|
}
|
|
2871
2880
|
/**
|
|
2872
2881
|
* Read the next client id.
|
|
@@ -2914,7 +2923,7 @@ class qe extends Xc {
|
|
|
2914
2923
|
* @return {any}
|
|
2915
2924
|
*/
|
|
2916
2925
|
readAny() {
|
|
2917
|
-
return
|
|
2926
|
+
return Ge(this.restDecoder);
|
|
2918
2927
|
}
|
|
2919
2928
|
/**
|
|
2920
2929
|
* @return {Uint8Array}
|
|
@@ -2930,7 +2939,7 @@ class qe extends Xc {
|
|
|
2930
2939
|
* @return {any}
|
|
2931
2940
|
*/
|
|
2932
2941
|
readJSON() {
|
|
2933
|
-
return
|
|
2942
|
+
return Ge(this.restDecoder);
|
|
2934
2943
|
}
|
|
2935
2944
|
/**
|
|
2936
2945
|
* @return {string}
|
|
@@ -3204,11 +3213,11 @@ const ea = (e, t, n, i) => {
|
|
|
3204
3213
|
break;
|
|
3205
3214
|
}
|
|
3206
3215
|
default: {
|
|
3207
|
-
const d = (h & (bt |
|
|
3216
|
+
const d = (h & (bt | G)) === 0, u = new A(
|
|
3208
3217
|
C(l, c),
|
|
3209
3218
|
null,
|
|
3210
3219
|
// left
|
|
3211
|
-
(h &
|
|
3220
|
+
(h & G) === G ? e.readLeftID() : null,
|
|
3212
3221
|
// origin
|
|
3213
3222
|
null,
|
|
3214
3223
|
// right
|
|
@@ -3359,7 +3368,7 @@ const Xi = () => new oa(), Zi = (e, t) => e.l.push(t), Qi = (e, t) => {
|
|
|
3359
3368
|
const n = e.l, i = n.length;
|
|
3360
3369
|
e.l = n.filter((s) => t !== s), i === e.l.length && console.error("[yjs] Tried to remove event handler that doesn't exist.");
|
|
3361
3370
|
}, lr = (e, t, n) => hi(e.l, [t, n]);
|
|
3362
|
-
class
|
|
3371
|
+
class Gt {
|
|
3363
3372
|
/**
|
|
3364
3373
|
* @param {number} client client id
|
|
3365
3374
|
* @param {number} clock unique per client id, continuous number
|
|
@@ -3368,7 +3377,7 @@ class Jt {
|
|
|
3368
3377
|
this.client = t, this.clock = n;
|
|
3369
3378
|
}
|
|
3370
3379
|
}
|
|
3371
|
-
const Ue = (e, t) => e === t || e !== null && t !== null && e.client === t.client && e.clock === t.clock, C = (e, t) => new
|
|
3380
|
+
const Ue = (e, t) => e === t || e !== null && t !== null && e.client === t.client && e.clock === t.clock, C = (e, t) => new Gt(e, t), be = (e) => {
|
|
3372
3381
|
for (const [t, n] of e.doc.share.entries())
|
|
3373
3382
|
if (n === e)
|
|
3374
3383
|
return t;
|
|
@@ -3425,7 +3434,7 @@ const ca = (e, t, n = 0) => new la(e, t, n), Le = (e, t, n) => {
|
|
|
3425
3434
|
}
|
|
3426
3435
|
return Le(e, null, n);
|
|
3427
3436
|
}, aa = (e, t) => {
|
|
3428
|
-
const n =
|
|
3437
|
+
const n = Jt(e, t), i = t.clock - n.id.clock;
|
|
3429
3438
|
return {
|
|
3430
3439
|
item: n,
|
|
3431
3440
|
diff: i
|
|
@@ -3436,7 +3445,7 @@ const ca = (e, t, n = 0) => new la(e, t, n), Le = (e, t, n) => {
|
|
|
3436
3445
|
if (s !== null) {
|
|
3437
3446
|
if (L(i, s.client) <= s.clock)
|
|
3438
3447
|
return null;
|
|
3439
|
-
const h = n ?
|
|
3448
|
+
const h = n ? Gn(i, s) : aa(i, s), d = h.item;
|
|
3440
3449
|
if (!(d instanceof A))
|
|
3441
3450
|
return null;
|
|
3442
3451
|
if (c = /** @type {AbstractType<any>} */
|
|
@@ -3452,7 +3461,7 @@ const ca = (e, t, n = 0) => new la(e, t, n), Le = (e, t, n) => {
|
|
|
3452
3461
|
else if (r !== null) {
|
|
3453
3462
|
if (L(i, r.client) <= r.clock)
|
|
3454
3463
|
return null;
|
|
3455
|
-
const { item: h } = n ?
|
|
3464
|
+
const { item: h } = n ? Gn(i, r) : { item: Jt(i, r) };
|
|
3456
3465
|
if (h instanceof A && h.content instanceof dt)
|
|
3457
3466
|
c = h.content.type;
|
|
3458
3467
|
else
|
|
@@ -3472,10 +3481,10 @@ class gi {
|
|
|
3472
3481
|
this.ds = t, this.sv = n;
|
|
3473
3482
|
}
|
|
3474
3483
|
}
|
|
3475
|
-
const cr = (e, t) => new gi(e, t), On = (e) => cr(
|
|
3484
|
+
const cr = (e, t) => new gi(e, t), On = (e) => cr(Jc(e.store), mn(e.store)), Lt = (e, t) => t === void 0 ? !e.deleted : t.sv.has(e.id.client) && (t.sv.get(e.id.client) || 0) > e.id.clock && !oe(t.ds, e.id), Kn = (e, t) => {
|
|
3476
3485
|
const n = kt(e.meta, Kn, Vt), i = e.doc.store;
|
|
3477
3486
|
n.has(t) || (t.sv.forEach((s, r) => {
|
|
3478
|
-
s < L(i, r) &&
|
|
3487
|
+
s < L(i, r) && J(e, C(r, s));
|
|
3479
3488
|
}), Ot(e, t.ds, (s) => {
|
|
3480
3489
|
}), n.add(t));
|
|
3481
3490
|
};
|
|
@@ -3524,13 +3533,13 @@ const mn = (e) => {
|
|
|
3524
3533
|
}, da = (e, t) => {
|
|
3525
3534
|
const n = e.clients.get(t.client);
|
|
3526
3535
|
return n[at(n, t.clock)];
|
|
3527
|
-
},
|
|
3536
|
+
}, Jt = (
|
|
3528
3537
|
/** @type {function(StructStore,ID):Item} */
|
|
3529
3538
|
da
|
|
3530
3539
|
), jn = (e, t, n) => {
|
|
3531
3540
|
const i = at(t, n), s = t[i];
|
|
3532
3541
|
return s.id.clock < n && s instanceof A ? (t.splice(i + 1, 0, nn(e, s, n - s.id.clock)), i + 1) : i;
|
|
3533
|
-
},
|
|
3542
|
+
}, J = (e, t) => {
|
|
3534
3543
|
const n = (
|
|
3535
3544
|
/** @type {Array<Item>} */
|
|
3536
3545
|
e.doc.store.clients.get(t.client)
|
|
@@ -3707,8 +3716,8 @@ const is = (e, t, n) => {
|
|
|
3707
3716
|
Ot(l, a.insertions, (p) => {
|
|
3708
3717
|
if (p instanceof A) {
|
|
3709
3718
|
if (p.redone !== null) {
|
|
3710
|
-
let { item: g, diff: m } =
|
|
3711
|
-
m > 0 && (g =
|
|
3719
|
+
let { item: g, diff: m } = Gn(c, p.id);
|
|
3720
|
+
m > 0 && (g = J(l, C(g.id.client, g.id.clock + m))), p = g;
|
|
3712
3721
|
}
|
|
3713
3722
|
!p.deleted && r.some((g) => g === l.doc || xe(
|
|
3714
3723
|
/** @type {AbstractType<any>} */
|
|
@@ -3910,11 +3919,11 @@ function* wa(e) {
|
|
|
3910
3919
|
const c = R(e.restDecoder);
|
|
3911
3920
|
yield new rt(C(s, r), c), r += c;
|
|
3912
3921
|
} else if ((un & l) !== 0) {
|
|
3913
|
-
const c = (l & (bt |
|
|
3922
|
+
const c = (l & (bt | G)) === 0, a = new A(
|
|
3914
3923
|
C(s, r),
|
|
3915
3924
|
null,
|
|
3916
3925
|
// left
|
|
3917
|
-
(l &
|
|
3926
|
+
(l & G) === G ? e.readLeftID() : null,
|
|
3918
3927
|
// origin
|
|
3919
3928
|
null,
|
|
3920
3929
|
// right
|
|
@@ -4525,7 +4534,7 @@ const wr = (e, t, n) => {
|
|
|
4525
4534
|
for (r !== null && (o = r.p, n -= r.index, n === 0 && (o = o.prev, n += o && o.countable && !o.deleted ? o.length : 0)); o !== null; o = o.right)
|
|
4526
4535
|
if (!o.deleted && o.countable) {
|
|
4527
4536
|
if (n <= o.length) {
|
|
4528
|
-
n < o.length &&
|
|
4537
|
+
n < o.length && J(e, C(o.id.client, o.id.clock + n));
|
|
4529
4538
|
break;
|
|
4530
4539
|
}
|
|
4531
4540
|
n -= o.length;
|
|
@@ -4543,9 +4552,9 @@ const wr = (e, t, n) => {
|
|
|
4543
4552
|
const s = n, r = i, o = bn(t, n);
|
|
4544
4553
|
let l = t._start;
|
|
4545
4554
|
for (o !== null && (l = o.p, n -= o.index); l !== null && n > 0; l = l.right)
|
|
4546
|
-
!l.deleted && l.countable && (n < l.length &&
|
|
4555
|
+
!l.deleted && l.countable && (n < l.length && J(e, C(l.id.client, l.id.clock + n)), n -= l.length);
|
|
4547
4556
|
for (; i > 0 && l !== null; )
|
|
4548
|
-
l.deleted || (i < l.length &&
|
|
4557
|
+
l.deleted || (i < l.length && J(e, C(l.id.client, l.id.clock + i)), l.delete(e), i -= l.length), l = l.right;
|
|
4549
4558
|
if (i > 0)
|
|
4550
4559
|
throw kr();
|
|
4551
4560
|
t._searchMarker && ye(
|
|
@@ -5074,7 +5083,7 @@ const ls = (e, t, n) => {
|
|
|
5074
5083
|
);
|
|
5075
5084
|
break;
|
|
5076
5085
|
default:
|
|
5077
|
-
t.right.deleted || (n < t.right.length &&
|
|
5086
|
+
t.right.deleted || (n < t.right.length && J(e, C(t.right.id.client, t.right.id.clock + n)), t.index += t.right.length, n -= t.right.length);
|
|
5078
5087
|
break;
|
|
5079
5088
|
}
|
|
5080
5089
|
t.left = t.right, t.right = t.right.right;
|
|
@@ -5171,7 +5180,7 @@ const ls = (e, t, n) => {
|
|
|
5171
5180
|
break;
|
|
5172
5181
|
}
|
|
5173
5182
|
default:
|
|
5174
|
-
i < n.right.length &&
|
|
5183
|
+
i < n.right.length && J(e, C(n.right.id.client, n.right.id.clock + i)), i -= n.right.length;
|
|
5175
5184
|
break;
|
|
5176
5185
|
}
|
|
5177
5186
|
n.forward();
|
|
@@ -5307,7 +5316,7 @@ const ls = (e, t, n) => {
|
|
|
5307
5316
|
case dt:
|
|
5308
5317
|
case Wt:
|
|
5309
5318
|
case ht:
|
|
5310
|
-
n < t.right.length &&
|
|
5319
|
+
n < t.right.length && J(e, C(t.right.id.client, t.right.id.clock + n)), n -= t.right.length, t.right.delete(e);
|
|
5311
5320
|
break;
|
|
5312
5321
|
}
|
|
5313
5322
|
t.forward();
|
|
@@ -6892,7 +6901,7 @@ class B {
|
|
|
6892
6901
|
return 6;
|
|
6893
6902
|
}
|
|
6894
6903
|
}
|
|
6895
|
-
const
|
|
6904
|
+
const Ga = (e) => new B(e.readKey(), e.readJSON());
|
|
6896
6905
|
class en {
|
|
6897
6906
|
/**
|
|
6898
6907
|
* @param {Array<any>} arr
|
|
@@ -6974,14 +6983,14 @@ class en {
|
|
|
6974
6983
|
return 2;
|
|
6975
6984
|
}
|
|
6976
6985
|
}
|
|
6977
|
-
const
|
|
6986
|
+
const Ja = (e) => {
|
|
6978
6987
|
const t = e.readLen(), n = [];
|
|
6979
6988
|
for (let i = 0; i < t; i++) {
|
|
6980
6989
|
const s = e.readString();
|
|
6981
6990
|
s === "undefined" ? n.push(void 0) : n.push(JSON.parse(s));
|
|
6982
6991
|
}
|
|
6983
6992
|
return new en(n);
|
|
6984
|
-
}, qa =
|
|
6993
|
+
}, qa = Je("node_env") === "development";
|
|
6985
6994
|
class Ft {
|
|
6986
6995
|
/**
|
|
6987
6996
|
* @param {Array<any>} arr
|
|
@@ -7248,10 +7257,10 @@ class dt {
|
|
|
7248
7257
|
return 7;
|
|
7249
7258
|
}
|
|
7250
7259
|
}
|
|
7251
|
-
const lh = (e) => new dt(Qa[e.readTypeRef()](e)),
|
|
7260
|
+
const lh = (e) => new dt(Qa[e.readTypeRef()](e)), Gn = (e, t) => {
|
|
7252
7261
|
let n = t, i = 0, s;
|
|
7253
7262
|
do
|
|
7254
|
-
i > 0 && (n = C(n.client, n.clock + i)), s =
|
|
7263
|
+
i > 0 && (n = C(n.client, n.clock + i)), s = Jt(e, n), i = n.clock - s.id.clock, n = s.redone;
|
|
7255
7264
|
while (n !== null && s instanceof A);
|
|
7256
7265
|
return {
|
|
7257
7266
|
item: s,
|
|
@@ -7280,7 +7289,7 @@ const lh = (e) => new dt(Qa[e.readTypeRef()](e)), Jn = (e, t) => {
|
|
|
7280
7289
|
), Mr = (e, t, n, i, s, r) => {
|
|
7281
7290
|
const o = e.doc, l = o.store, c = o.clientID, a = t.redone;
|
|
7282
7291
|
if (a !== null)
|
|
7283
|
-
return
|
|
7292
|
+
return J(e, a);
|
|
7284
7293
|
let h = (
|
|
7285
7294
|
/** @type {AbstractType<any>} */
|
|
7286
7295
|
t.parent._item
|
|
@@ -7289,7 +7298,7 @@ const lh = (e) => new dt(Qa[e.readTypeRef()](e)), Jn = (e, t) => {
|
|
|
7289
7298
|
if (h.redone === null && (!n.has(h) || Mr(e, h, n, i, s, r) === null))
|
|
7290
7299
|
return null;
|
|
7291
7300
|
for (; h.redone !== null; )
|
|
7292
|
-
h =
|
|
7301
|
+
h = J(e, h.redone);
|
|
7293
7302
|
}
|
|
7294
7303
|
const p = h === null ? (
|
|
7295
7304
|
/** @type {AbstractType<any>} */
|
|
@@ -7303,7 +7312,7 @@ const lh = (e) => new dt(Qa[e.readTypeRef()](e)), Jn = (e, t) => {
|
|
|
7303
7312
|
let b = d;
|
|
7304
7313
|
for (; b !== null && /** @type {AbstractType<any>} */
|
|
7305
7314
|
b.parent._item !== h; )
|
|
7306
|
-
b = b.redone === null ? null :
|
|
7315
|
+
b = b.redone === null ? null : J(e, b.redone);
|
|
7307
7316
|
if (b !== null && /** @type {AbstractType<any>} */
|
|
7308
7317
|
b.parent._item === h) {
|
|
7309
7318
|
d = b;
|
|
@@ -7315,7 +7324,7 @@ const lh = (e) => new dt(Qa[e.readTypeRef()](e)), Jn = (e, t) => {
|
|
|
7315
7324
|
let b = u;
|
|
7316
7325
|
for (; b !== null && /** @type {AbstractType<any>} */
|
|
7317
7326
|
b.parent._item !== h; )
|
|
7318
|
-
b = b.redone === null ? null :
|
|
7327
|
+
b = b.redone === null ? null : J(e, b.redone);
|
|
7319
7328
|
if (b !== null && /** @type {AbstractType<any>} */
|
|
7320
7329
|
b.parent._item === h) {
|
|
7321
7330
|
u = b;
|
|
@@ -7325,7 +7334,7 @@ const lh = (e) => new dt(Qa[e.readTypeRef()](e)), Jn = (e, t) => {
|
|
|
7325
7334
|
}
|
|
7326
7335
|
} else if (u = null, t.right && !s) {
|
|
7327
7336
|
for (d = t; d !== null && d.right !== null && (d.right.redone || oe(i, d.right.id) || hs(r.undoStack, d.right.id) || hs(r.redoStack, d.right.id)); )
|
|
7328
|
-
for (d = d.right; d.redone; ) d =
|
|
7337
|
+
for (d = d.right; d.redone; ) d = J(e, d.redone);
|
|
7329
7338
|
if (d && d.right !== null)
|
|
7330
7339
|
return null;
|
|
7331
7340
|
} else
|
|
@@ -7404,14 +7413,14 @@ class A extends xi {
|
|
|
7404
7413
|
return this.origin.client;
|
|
7405
7414
|
if (this.rightOrigin && this.rightOrigin.client !== this.id.client && this.rightOrigin.clock >= L(n, this.rightOrigin.client))
|
|
7406
7415
|
return this.rightOrigin.client;
|
|
7407
|
-
if (this.parent && this.parent.constructor ===
|
|
7416
|
+
if (this.parent && this.parent.constructor === Gt && this.id.client !== this.parent.client && this.parent.clock >= L(n, this.parent.client))
|
|
7408
7417
|
return this.parent.client;
|
|
7409
|
-
if (this.origin && (this.left = ts(t, n, this.origin), this.origin = this.left.lastId), this.rightOrigin && (this.right =
|
|
7418
|
+
if (this.origin && (this.left = ts(t, n, this.origin), this.origin = this.left.lastId), this.rightOrigin && (this.right = J(t, this.rightOrigin), this.rightOrigin = this.right.id), this.left && this.left.constructor === st || this.right && this.right.constructor === st)
|
|
7410
7419
|
this.parent = null;
|
|
7411
7420
|
else if (!this.parent)
|
|
7412
7421
|
this.left && this.left.constructor === A ? (this.parent = this.left.parent, this.parentSub = this.left.parentSub) : this.right && this.right.constructor === A && (this.parent = this.right.parent, this.parentSub = this.right.parentSub);
|
|
7413
|
-
else if (this.parent.constructor ===
|
|
7414
|
-
const i =
|
|
7422
|
+
else if (this.parent.constructor === Gt) {
|
|
7423
|
+
const i = Jt(n, this.parent);
|
|
7415
7424
|
i.constructor === st ? this.parent = null : this.parent = /** @type {ContentType} */
|
|
7416
7425
|
i.content.type;
|
|
7417
7426
|
}
|
|
@@ -7441,8 +7450,8 @@ class A extends xi {
|
|
|
7441
7450
|
i = s, r.clear();
|
|
7442
7451
|
else if (Ue(this.rightOrigin, s.rightOrigin))
|
|
7443
7452
|
break;
|
|
7444
|
-
} else if (s.origin !== null && o.has(
|
|
7445
|
-
r.has(
|
|
7453
|
+
} else if (s.origin !== null && o.has(Jt(t.doc.store, s.origin)))
|
|
7454
|
+
r.has(Jt(t.doc.store, s.origin)) || (i = s, r.clear());
|
|
7446
7455
|
else
|
|
7447
7456
|
break;
|
|
7448
7457
|
s = s.right;
|
|
@@ -7549,7 +7558,7 @@ class A extends xi {
|
|
|
7549
7558
|
* @param {number} offset
|
|
7550
7559
|
*/
|
|
7551
7560
|
write(t, n) {
|
|
7552
|
-
const i = n > 0 ? C(this.id.client, this.id.clock + n - 1) : this.origin, s = this.rightOrigin, r = this.parentSub, o = this.content.getRef() & un | (i === null ? 0 :
|
|
7561
|
+
const i = n > 0 ? C(this.id.client, this.id.clock + n - 1) : this.origin, s = this.rightOrigin, r = this.parentSub, o = this.content.getRef() & un | (i === null ? 0 : G) | // origin is defined
|
|
7553
7562
|
(s === null ? 0 : bt) | // right origin is defined
|
|
7554
7563
|
(r === null ? 0 : pe);
|
|
7555
7564
|
if (t.writeInfo(o), i !== null && t.writeLeftID(i), s !== null && t.writeRightID(s), i === null && s === null) {
|
|
@@ -7564,7 +7573,7 @@ class A extends xi {
|
|
|
7564
7573
|
t.writeParentInfo(!0), t.writeString(a);
|
|
7565
7574
|
} else
|
|
7566
7575
|
t.writeParentInfo(!1), t.writeLeftID(c.id);
|
|
7567
|
-
} else l.constructor === String ? (t.writeParentInfo(!0), t.writeString(l)) : l.constructor ===
|
|
7576
|
+
} else l.constructor === String ? (t.writeParentInfo(!0), t.writeString(l)) : l.constructor === Gt ? (t.writeParentInfo(!1), t.writeLeftID(l)) : X();
|
|
7568
7577
|
r !== null && t.writeString(r);
|
|
7569
7578
|
}
|
|
7570
7579
|
this.content.write(t, n);
|
|
@@ -7577,7 +7586,7 @@ const Rr = (e, t) => ch[t & un](e), ch = [
|
|
|
7577
7586
|
// GC is not ItemContent
|
|
7578
7587
|
Ka,
|
|
7579
7588
|
// 1
|
|
7580
|
-
|
|
7589
|
+
Ja,
|
|
7581
7590
|
// 2
|
|
7582
7591
|
Wa,
|
|
7583
7592
|
// 3
|
|
@@ -7585,7 +7594,7 @@ const Rr = (e, t) => ch[t & un](e), ch = [
|
|
|
7585
7594
|
// 4
|
|
7586
7595
|
Ya,
|
|
7587
7596
|
// 5
|
|
7588
|
-
|
|
7597
|
+
Ga,
|
|
7589
7598
|
// 6
|
|
7590
7599
|
lh,
|
|
7591
7600
|
// 7
|
|
@@ -7766,7 +7775,7 @@ class Sh {
|
|
|
7766
7775
|
if (n % 64 !== 0) {
|
|
7767
7776
|
for (this._W.fill(0, o, 16); n < t.length; )
|
|
7768
7777
|
this._W[o] |= t[n] << (3 - n % 4) * 8, n++;
|
|
7769
|
-
this._W[o] |=
|
|
7778
|
+
this._W[o] |= G << (3 - n % 4) * 8;
|
|
7770
7779
|
}
|
|
7771
7780
|
this._updateHash();
|
|
7772
7781
|
}
|
|
@@ -7776,7 +7785,7 @@ class Sh {
|
|
|
7776
7785
|
for (; n < t.length; s++)
|
|
7777
7786
|
for (let o = 3; o >= 0 && n < t.length; o--)
|
|
7778
7787
|
this._W[s] |= t[n++] << o * 8;
|
|
7779
|
-
i || (this._W[s - (n % 4 === 0 ? 0 : 1)] |=
|
|
7788
|
+
i || (this._W[s - (n % 4 === 0 ? 0 : 1)] |= G << (3 - n % 4) * 8), this._W[14] = t.byteLength / Rl, this._W[15] = t.byteLength * 8, this._updateHash();
|
|
7780
7789
|
const r = new Uint8Array(32);
|
|
7781
7790
|
for (let o = 0; o < this._H.length; o++)
|
|
7782
7791
|
for (let l = 0; l < 4; l++)
|
|
@@ -7916,7 +7925,7 @@ t.sv.get(e.id.client) > e.id.clock && !oe(t.ds, e.id), _h = [{ light: "#ecd44433
|
|
|
7916
7925
|
}, Ah = (e, t) => {
|
|
7917
7926
|
const n = e.doc.resolve(t);
|
|
7918
7927
|
return n.nodeAfter ? Qr.create(e.doc, t) : ei.near(n);
|
|
7919
|
-
},
|
|
7928
|
+
}, Jn = (e, t) => ({
|
|
7920
7929
|
type: (
|
|
7921
7930
|
/** @type {any} */
|
|
7922
7931
|
t.selection.jsonID
|
|
@@ -7939,7 +7948,7 @@ class Ih {
|
|
|
7939
7948
|
*/
|
|
7940
7949
|
constructor(t, n = /* @__PURE__ */ new Map()) {
|
|
7941
7950
|
this.type = t, this.prosemirrorView = null, this.mux = hh(), this.mapping = n, this.isOMark = /* @__PURE__ */ new Map(), this._observeFunction = this._typeChanged.bind(this), this.doc = t.doc, this.beforeTransactionSelection = null, this.beforeAllTransactions = () => {
|
|
7942
|
-
this.beforeTransactionSelection === null && this.prosemirrorView != null && (this.beforeTransactionSelection =
|
|
7951
|
+
this.beforeTransactionSelection === null && this.prosemirrorView != null && (this.beforeTransactionSelection = Jn(
|
|
7943
7952
|
this,
|
|
7944
7953
|
this.prosemirrorView.state
|
|
7945
7954
|
));
|
|
@@ -7956,7 +7965,7 @@ class Ih {
|
|
|
7956
7965
|
return this.prosemirrorView.state.tr.setMeta("addToHistory", !1);
|
|
7957
7966
|
}
|
|
7958
7967
|
_isLocalCursorInView() {
|
|
7959
|
-
return this.prosemirrorView.hasFocus() ? (
|
|
7968
|
+
return this.prosemirrorView.hasFocus() ? (Gs && this._domSelectionInView === null && (qs(0, () => {
|
|
7960
7969
|
this._domSelectionInView = null;
|
|
7961
7970
|
}), this._domSelectionInView = this._isDomSelectionInView()), this._domSelectionInView) : !1;
|
|
7962
7971
|
}
|
|
@@ -8127,7 +8136,7 @@ class Ih {
|
|
|
8127
8136
|
*/
|
|
8128
8137
|
_prosemirrorChanged(t) {
|
|
8129
8138
|
this.doc.transact(() => {
|
|
8130
|
-
Xn(this.doc, this.type, t, this), this.beforeTransactionSelection =
|
|
8139
|
+
Xn(this.doc, this.type, t, this), this.beforeTransactionSelection = Jn(
|
|
8131
8140
|
this,
|
|
8132
8141
|
this.prosemirrorView.state
|
|
8133
8142
|
);
|
|
@@ -8621,7 +8630,7 @@ const Hh = (e) => {
|
|
|
8621
8630
|
const l = U.getState(o).binding, c = s.undoManager, a = c.undoStack.length > 0, h = c.redoStack.length > 0;
|
|
8622
8631
|
return l ? {
|
|
8623
8632
|
undoManager: c,
|
|
8624
|
-
prevSel:
|
|
8633
|
+
prevSel: Jn(l, r),
|
|
8625
8634
|
hasUndoOps: a,
|
|
8626
8635
|
hasRedoOps: h
|
|
8627
8636
|
} : a !== s.hasUndoOps || h !== s.hasRedoOps ? Object.assign({}, s, {
|
|
@@ -8811,7 +8820,7 @@ function Sn(e, t, n) {
|
|
|
8811
8820
|
i.push(d);
|
|
8812
8821
|
}), i;
|
|
8813
8822
|
}
|
|
8814
|
-
var
|
|
8823
|
+
var Gh = class Fr {
|
|
8815
8824
|
constructor(t, n) {
|
|
8816
8825
|
this.anchor = t, this.head = n;
|
|
8817
8826
|
}
|
|
@@ -8877,7 +8886,7 @@ var Jh = class Fr {
|
|
|
8877
8886
|
return new this(t.resolve(n), t.resolve(i), s, r);
|
|
8878
8887
|
}
|
|
8879
8888
|
getBookmark() {
|
|
8880
|
-
return new
|
|
8889
|
+
return new Gh(this.anchor, this.head);
|
|
8881
8890
|
}
|
|
8882
8891
|
};
|
|
8883
8892
|
Et.prototype.visible = !1;
|
|
@@ -8968,7 +8977,7 @@ Ce.create({
|
|
|
8968
8977
|
];
|
|
8969
8978
|
}
|
|
8970
8979
|
});
|
|
8971
|
-
function
|
|
8980
|
+
function Jh(e) {
|
|
8972
8981
|
let t = "";
|
|
8973
8982
|
const n = getComputedStyle(e);
|
|
8974
8983
|
for (let i = 0; i < n.length; i += 1)
|
|
@@ -8978,7 +8987,7 @@ function Gh(e) {
|
|
|
8978
8987
|
function qh(e) {
|
|
8979
8988
|
const t = e.cloneNode(!0), n = [e, ...Array.from(e.getElementsByTagName("*"))], i = [t, ...Array.from(t.getElementsByTagName("*"))];
|
|
8980
8989
|
return n.forEach((s, r) => {
|
|
8981
|
-
i[r].style.cssText =
|
|
8990
|
+
i[r].style.cssText = Jh(s);
|
|
8982
8991
|
}), t;
|
|
8983
8992
|
}
|
|
8984
8993
|
function Xh(e, t) {
|
|
@@ -9306,14 +9315,14 @@ var sd = (e) => {
|
|
|
9306
9315
|
}
|
|
9307
9316
|
);
|
|
9308
9317
|
}, rd = sd;
|
|
9309
|
-
function
|
|
9318
|
+
function xu() {
|
|
9310
9319
|
var D, S, k, N, H, nt, Rt, Nt;
|
|
9311
9320
|
const e = W(), t = Z(), { t: n } = Y(), [i, s] = F(null), [r, o] = F(-1), [l, c] = F(!1), a = (S = (D = e == null ? void 0 : e.extensionManager) == null ? void 0 : D.extensions) == null ? void 0 : S.some(
|
|
9312
9321
|
(v) => (v == null ? void 0 : v.name) === zo.name
|
|
9313
9322
|
), h = (N = (k = e == null ? void 0 : e.extensionManager) == null ? void 0 : k.extensions) == null ? void 0 : N.some(
|
|
9314
|
-
(v) => (v == null ? void 0 : v.name) === Go.name
|
|
9315
|
-
), d = (nt = (H = e == null ? void 0 : e.extensionManager) == null ? void 0 : H.extensions) == null ? void 0 : nt.some(
|
|
9316
9323
|
(v) => (v == null ? void 0 : v.name) === Jo.name
|
|
9324
|
+
), d = (nt = (H = e == null ? void 0 : e.extensionManager) == null ? void 0 : H.extensions) == null ? void 0 : nt.some(
|
|
9325
|
+
(v) => (v == null ? void 0 : v.name) === Go.name
|
|
9317
9326
|
);
|
|
9318
9327
|
function u() {
|
|
9319
9328
|
const v = e.chain();
|
|
@@ -9515,19 +9524,19 @@ function hu() {
|
|
|
9515
9524
|
);
|
|
9516
9525
|
}
|
|
9517
9526
|
export {
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9527
|
+
su as RichTextBubbleCallout,
|
|
9528
|
+
ru as RichTextBubbleColumns,
|
|
9529
|
+
ou as RichTextBubbleDrawer,
|
|
9530
|
+
lu as RichTextBubbleExcalidraw,
|
|
9531
|
+
cu as RichTextBubbleIframe,
|
|
9532
|
+
du as RichTextBubbleImage,
|
|
9533
|
+
uu as RichTextBubbleImageGif,
|
|
9534
|
+
au as RichTextBubbleKatex,
|
|
9535
|
+
hu as RichTextBubbleLink,
|
|
9536
|
+
xu as RichTextBubbleMenuDragHandle,
|
|
9537
|
+
pu as RichTextBubbleMermaid,
|
|
9538
|
+
gu as RichTextBubbleTable,
|
|
9539
|
+
mu as RichTextBubbleText,
|
|
9540
|
+
wu as RichTextBubbleTwitter,
|
|
9541
|
+
fu as RichTextBubbleVideo
|
|
9533
9542
|
};
|