@dialpad/dialtone-vue 3.93.0 → 3.93.1
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/CHANGELOG.json +1 -1
- package/CHANGELOG.md +13 -0
- package/dist/dialtone-vue.cjs +5 -5
- package/dist/dialtone-vue.js +1173 -1172
- package/dist/{message_input-ab3be145.cjs → message_input-2f040a4e.cjs} +15 -15
- package/dist/{message_input-08860f81.js → message_input-97a05856.js} +179 -161
- package/dist/message_input.cjs +1 -1
- package/dist/message_input.js +1 -1
- package/dist/types/common/dates.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +15 -0
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/package.json +6 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as q, q as nl, g as tr, r as rl, h as hn, u as il, t as sl, d as ol, v as ll, w as al, x as cl, y as pn, z as dl, A as ul, D as fl } from "./tooltip-02b802bc.js";
|
|
2
|
-
import { openBlock as w, createElementBlock as B, toDisplayString as Se, createCommentVNode as
|
|
2
|
+
import { openBlock as w, createElementBlock as B, toDisplayString as Se, createCommentVNode as z, createElementVNode as G, normalizeClass as $, resolveComponent as N, createBlock as F, resolveDynamicComponent as Xe, withCtx as D, mergeProps as St, renderSlot as L, createVNode as _, createTextVNode as $t, withKeys as Ve, withModifiers as dt, toHandlers as as, createSlots as hl, renderList as cs, Teleport as ds, defineComponent as xt, ref as mn, onMounted as us, onBeforeUnmount as xr, h as Ke, getCurrentInstance as pl, watchEffect as ml, nextTick as gl, unref as yl, markRaw as gn, reactive as fs, provide as qr, customRef as bl, withDirectives as kl, Fragment as hs, vShow as Sl } from "vue";
|
|
3
3
|
import { a5 as xl, D as nt, y as Cl, b as yn, L as wl, j as vl, g as ps, a6 as El, a0 as Ml, a3 as ms, _ as Ol, f as Tl } from "./emoji-ee056efb.js";
|
|
4
4
|
const Ot = {
|
|
5
5
|
BUSY: "busy",
|
|
@@ -46,9 +46,9 @@ function Pl(n, e, t, r, i, s) {
|
|
|
46
46
|
role: "status",
|
|
47
47
|
"aria-live": n.$attrs.ariaLive || "off"
|
|
48
48
|
}, [
|
|
49
|
-
t.srText ? (w(), B("span", Il, Se(t.srText), 1)) :
|
|
49
|
+
t.srText ? (w(), B("span", Il, Se(t.srText), 1)) : z("", !0),
|
|
50
50
|
G("div", {
|
|
51
|
-
class:
|
|
51
|
+
class: $(["d-presence__inner", {
|
|
52
52
|
"d-presence__inner--active": t.presence === "active",
|
|
53
53
|
"d-presence__inner--away": t.presence === "away",
|
|
54
54
|
"d-presence__inner--busy": t.presence === "busy",
|
|
@@ -111,7 +111,7 @@ const Vl = (n) => {
|
|
|
111
111
|
const e = n.trim().split(/\s+/g);
|
|
112
112
|
return e.length === 1 ? e.join("").substring(0, 2) : e.filter((t, r) => r === 0 || r === e.length - 1).map((t) => t.slice(0, 1).toUpperCase()).join("");
|
|
113
113
|
};
|
|
114
|
-
const jl = zl(),
|
|
114
|
+
const jl = zl(), Hl = {
|
|
115
115
|
name: "DtAvatar",
|
|
116
116
|
components: { DtPresence: Rl, DtIcon: nt },
|
|
117
117
|
inheritAttrs: !1,
|
|
@@ -368,7 +368,7 @@ const jl = zl(), $l = {
|
|
|
368
368
|
this.clickable && this.$emit("click", n);
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
},
|
|
371
|
+
}, $l = ["src", "alt"], ql = {
|
|
372
372
|
key: 1,
|
|
373
373
|
class: "d-avatar__overlay-text"
|
|
374
374
|
}, Kl = {
|
|
@@ -380,7 +380,7 @@ function Wl(n, e, t, r, i, s) {
|
|
|
380
380
|
const o = N("dt-icon"), l = N("dt-presence");
|
|
381
381
|
return w(), F(Xe(t.clickable ? "button" : "div"), {
|
|
382
382
|
id: t.id,
|
|
383
|
-
class:
|
|
383
|
+
class: $(s.avatarClasses),
|
|
384
384
|
"data-qa": "dt-avatar",
|
|
385
385
|
"aria-label": s.buttonAriaLabel,
|
|
386
386
|
onClick: s.handleClick
|
|
@@ -388,7 +388,7 @@ function Wl(n, e, t, r, i, s) {
|
|
|
388
388
|
default: D(() => [
|
|
389
389
|
G("div", {
|
|
390
390
|
ref: "canvas",
|
|
391
|
-
class:
|
|
391
|
+
class: $([
|
|
392
392
|
t.canvasClass,
|
|
393
393
|
"d-avatar__canvas",
|
|
394
394
|
{ "d-avatar--image-loaded": i.imageLoadedSuccessfully }
|
|
@@ -401,28 +401,28 @@ function Wl(n, e, t, r, i, s) {
|
|
|
401
401
|
"data-qa": "dt-avatar-image",
|
|
402
402
|
src: t.imageSrc,
|
|
403
403
|
alt: t.imageAlt || t.fullName
|
|
404
|
-
}, null, 8,
|
|
404
|
+
}, null, 8, $l)) : t.iconName ? (w(), F(o, {
|
|
405
405
|
key: 1,
|
|
406
406
|
name: t.iconName,
|
|
407
407
|
size: t.iconSize || i.AVATAR_ICON_SIZES[t.size],
|
|
408
|
-
class:
|
|
408
|
+
class: $([t.iconClass, i.AVATAR_KIND_MODIFIERS.icon]),
|
|
409
409
|
"data-qa": "dt-avatar-icon"
|
|
410
410
|
}, null, 8, ["name", "size", "class"])) : (w(), B("span", {
|
|
411
411
|
key: 2,
|
|
412
|
-
class:
|
|
412
|
+
class: $([i.AVATAR_KIND_MODIFIERS.initials, "d-ps-absolute d-zi-base d-us-none"])
|
|
413
413
|
}, Se(i.formattedInitials), 3))
|
|
414
414
|
], 2),
|
|
415
415
|
t.overlayIcon || t.overlayText ? (w(), B("div", {
|
|
416
416
|
key: 0,
|
|
417
|
-
class:
|
|
417
|
+
class: $(s.overlayClasses)
|
|
418
418
|
}, [
|
|
419
419
|
t.overlayIcon ? (w(), F(o, {
|
|
420
420
|
key: 0,
|
|
421
421
|
class: "d-avatar__overlay-icon",
|
|
422
422
|
name: t.overlayIcon
|
|
423
|
-
}, null, 8, ["name"])) : t.overlayText ? (w(), B("p", ql, Se(t.overlayText), 1)) :
|
|
424
|
-
], 2)) :
|
|
425
|
-
s.showGroup ? (w(), B("span", Kl, Se(s.formattedGroup), 1)) :
|
|
423
|
+
}, null, 8, ["name"])) : t.overlayText ? (w(), B("p", ql, Se(t.overlayText), 1)) : z("", !0)
|
|
424
|
+
], 2)) : z("", !0),
|
|
425
|
+
s.showGroup ? (w(), B("span", Kl, Se(s.formattedGroup), 1)) : z("", !0),
|
|
426
426
|
t.presence && !s.showGroup ? (w(), F(l, St({
|
|
427
427
|
key: 2,
|
|
428
428
|
presence: t.presence,
|
|
@@ -430,12 +430,12 @@ function Wl(n, e, t, r, i, s) {
|
|
|
430
430
|
"d-avatar__presence",
|
|
431
431
|
i.AVATAR_PRESENCE_SIZE_MODIFIERS[t.size]
|
|
432
432
|
]
|
|
433
|
-
}, t.presenceProps, { "data-qa": "dt-presence" }), null, 16, ["presence", "class"])) :
|
|
433
|
+
}, t.presenceProps, { "data-qa": "dt-presence" }), null, 16, ["presence", "class"])) : z("", !0)
|
|
434
434
|
]),
|
|
435
435
|
_: 1
|
|
436
436
|
}, 8, ["id", "class", "aria-label", "onClick"]);
|
|
437
437
|
}
|
|
438
|
-
const Jl = /* @__PURE__ */ q(
|
|
438
|
+
const Jl = /* @__PURE__ */ q(Hl, [["render", Wl]]), Cr = ["base", "error", "info", "success", "warning"], Ul = ["alert", "alertdialog", "status"], Gl = /* @__PURE__ */ new Map([
|
|
439
439
|
["info", "info"],
|
|
440
440
|
["success", "check-circle"],
|
|
441
441
|
["warning", "alert-triangle"],
|
|
@@ -483,7 +483,7 @@ function Zl(n, e, t, r, i, s) {
|
|
|
483
483
|
size: "400"
|
|
484
484
|
}, null, 8, ["name"])
|
|
485
485
|
])
|
|
486
|
-
])) :
|
|
486
|
+
])) : z("", !0);
|
|
487
487
|
}
|
|
488
488
|
const Ql = /* @__PURE__ */ q(Yl, [["render", Zl]]), ea = {
|
|
489
489
|
name: "DtNoticeContent",
|
|
@@ -530,9 +530,9 @@ function ia(n, e, t, r, i, s) {
|
|
|
530
530
|
"data-qa": "notice-content-title"
|
|
531
531
|
}, [
|
|
532
532
|
L(n.$slots, "titleOverride", {}, () => [
|
|
533
|
-
|
|
533
|
+
$t(Se(t.title), 1)
|
|
534
534
|
])
|
|
535
|
-
], 8, na)) :
|
|
535
|
+
], 8, na)) : z("", !0),
|
|
536
536
|
G("p", {
|
|
537
537
|
id: t.contentId,
|
|
538
538
|
class: "d-notice__message",
|
|
@@ -676,7 +676,7 @@ function da(n, e, t, r, i, s) {
|
|
|
676
676
|
const o = N("dt-icon"), l = N("dt-button"), a = N("sr-only-close-button");
|
|
677
677
|
return w(), B("div", ca, [
|
|
678
678
|
L(n.$slots, "default"),
|
|
679
|
-
t.hideClose ?
|
|
679
|
+
t.hideClose ? z("", !0) : (w(), F(l, St({
|
|
680
680
|
key: 0,
|
|
681
681
|
ref: "closeButton",
|
|
682
682
|
"data-qa": "dt-notice-action-close-button",
|
|
@@ -697,7 +697,7 @@ function da(n, e, t, r, i, s) {
|
|
|
697
697
|
key: 1,
|
|
698
698
|
"visually-hidden-close-label": n.visuallyHiddenCloseLabel,
|
|
699
699
|
onClose: s.close
|
|
700
|
-
}, null, 8, ["visually-hidden-close-label", "onClose"])) :
|
|
700
|
+
}, null, 8, ["visually-hidden-close-label", "onClose"])) : z("", !0)
|
|
701
701
|
]);
|
|
702
702
|
}
|
|
703
703
|
const ua = /* @__PURE__ */ q(aa, [["render", da]]), ys = ':not(:disabled):not([aria-disabled="true"]):not([role="presentation"])', fa = `${ys}:not([tabindex="-1"])`, ha = "button,[href],input,select,textarea,details,[tabindex]", pa = {
|
|
@@ -790,7 +790,7 @@ const ua = /* @__PURE__ */ q(aa, [["render", da]]), ys = ':not(:disabled):not([a
|
|
|
790
790
|
}, ga = ["href"];
|
|
791
791
|
function ya(n, e, t, r, i, s) {
|
|
792
792
|
return w(), B("a", {
|
|
793
|
-
class:
|
|
793
|
+
class: $([
|
|
794
794
|
"d-link",
|
|
795
795
|
i.LINK_KIND_MODIFIERS[t.kind]
|
|
796
796
|
]),
|
|
@@ -848,28 +848,28 @@ function Ma(n, e, t, r, i, s) {
|
|
|
848
848
|
default: D(() => [
|
|
849
849
|
n.$slots.left ? (w(), B("section", Sa, [
|
|
850
850
|
L(n.$slots, "left", {}, void 0, !0)
|
|
851
|
-
])) :
|
|
851
|
+
])) : z("", !0),
|
|
852
852
|
G("section", xa, [
|
|
853
853
|
n.$slots.default ? (w(), B("div", Ca, [
|
|
854
854
|
L(n.$slots, "default", {}, void 0, !0)
|
|
855
|
-
])) :
|
|
855
|
+
])) : z("", !0),
|
|
856
856
|
n.$slots.subtitle ? (w(), B("div", {
|
|
857
857
|
key: 1,
|
|
858
858
|
"data-qa": "dt-item-layout-subtitle-wrapper",
|
|
859
|
-
class:
|
|
859
|
+
class: $(["dt-item-layout--subtitle", { "d-mtn2": n.$slots.default }])
|
|
860
860
|
}, [
|
|
861
861
|
L(n.$slots, "subtitle", {}, void 0, !0)
|
|
862
|
-
], 2)) :
|
|
862
|
+
], 2)) : z("", !0),
|
|
863
863
|
n.$slots.bottom ? (w(), B("div", wa, [
|
|
864
864
|
L(n.$slots, "bottom", {}, void 0, !0)
|
|
865
|
-
])) :
|
|
865
|
+
])) : z("", !0)
|
|
866
866
|
]),
|
|
867
867
|
n.$slots.right ? (w(), B("section", va, [
|
|
868
868
|
L(n.$slots, "right", {}, void 0, !0)
|
|
869
|
-
])) :
|
|
869
|
+
])) : z("", !0),
|
|
870
870
|
n.$slots.selected ? (w(), B("section", Ea, [
|
|
871
871
|
L(n.$slots, "selected", {}, void 0, !0)
|
|
872
|
-
])) :
|
|
872
|
+
])) : z("", !0)
|
|
873
873
|
]),
|
|
874
874
|
_: 3
|
|
875
875
|
});
|
|
@@ -1140,7 +1140,7 @@ function La(n, e, t, r, i, s) {
|
|
|
1140
1140
|
const o = N("dt-icon"), l = N("dt-button");
|
|
1141
1141
|
return w(), B("div", {
|
|
1142
1142
|
"data-qa": "dt-popover-header-footer",
|
|
1143
|
-
class:
|
|
1143
|
+
class: $({
|
|
1144
1144
|
"d-popover__header": t.type === "header",
|
|
1145
1145
|
"d-popover__footer": t.type === "footer"
|
|
1146
1146
|
})
|
|
@@ -1148,10 +1148,10 @@ function La(n, e, t, r, i, s) {
|
|
|
1148
1148
|
i.hasSlotContent(n.$slots.content) ? (w(), B("div", {
|
|
1149
1149
|
key: 0,
|
|
1150
1150
|
"data-qa": "dt-popover-header-footer-content",
|
|
1151
|
-
class:
|
|
1151
|
+
class: $(["d-to-ellipsis", "d-w100p", t.contentClass])
|
|
1152
1152
|
}, [
|
|
1153
1153
|
L(n.$slots, "content")
|
|
1154
|
-
], 2)) :
|
|
1154
|
+
], 2)) : z("", !0),
|
|
1155
1155
|
t.showCloseButton ? (w(), F(l, St({
|
|
1156
1156
|
key: 1,
|
|
1157
1157
|
ref: "popover__close-button",
|
|
@@ -1170,7 +1170,7 @@ function La(n, e, t, r, i, s) {
|
|
|
1170
1170
|
})
|
|
1171
1171
|
]),
|
|
1172
1172
|
_: 1
|
|
1173
|
-
}, 16)) :
|
|
1173
|
+
}, 16)) : z("", !0)
|
|
1174
1174
|
], 2);
|
|
1175
1175
|
}
|
|
1176
1176
|
const Fa = /* @__PURE__ */ q(Ba, [["render", La]]);
|
|
@@ -1763,7 +1763,7 @@ const za = {
|
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
1765
|
}, Va = ["aria-hidden"], ja = ["id", "tabindex"];
|
|
1766
|
-
function
|
|
1766
|
+
function Ha(n, e, t, r, i, s) {
|
|
1767
1767
|
const o = N("popover-header-footer"), l = N("sr-only-close-button"), a = N("dt-lazy-show");
|
|
1768
1768
|
return w(), B("div", null, [
|
|
1769
1769
|
t.modal && i.isOpen ? (w(), F(ds, {
|
|
@@ -1776,10 +1776,10 @@ function $a(n, e, t, r, i, s) {
|
|
|
1776
1776
|
onClick: e[0] || (e[0] = dt(() => {
|
|
1777
1777
|
}, ["prevent", "stop"]))
|
|
1778
1778
|
}, null, 8, Va)
|
|
1779
|
-
])) :
|
|
1779
|
+
])) : z("", !0),
|
|
1780
1780
|
(w(), F(Xe(t.elementType), {
|
|
1781
1781
|
ref: "popover",
|
|
1782
|
-
class:
|
|
1782
|
+
class: $(["d-popover", { "d-popover__anchor--opened": i.isOpen }]),
|
|
1783
1783
|
"data-qa": "dt-popover-container"
|
|
1784
1784
|
}, {
|
|
1785
1785
|
default: D(() => [
|
|
@@ -1830,7 +1830,7 @@ function $a(n, e, t, r, i, s) {
|
|
|
1830
1830
|
i.hasSlotContent(n.$slots.headerContent) || t.showCloseButton ? (w(), F(o, {
|
|
1831
1831
|
key: 0,
|
|
1832
1832
|
ref: "popover__header",
|
|
1833
|
-
class:
|
|
1833
|
+
class: $(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),
|
|
1834
1834
|
"content-class": t.headerClass,
|
|
1835
1835
|
type: "header",
|
|
1836
1836
|
"show-close-button": t.showCloseButton,
|
|
@@ -1841,11 +1841,11 @@ function $a(n, e, t, r, i, s) {
|
|
|
1841
1841
|
L(n.$slots, "headerContent", { close: s.closePopover })
|
|
1842
1842
|
]),
|
|
1843
1843
|
_: 3
|
|
1844
|
-
}, 8, ["class", "content-class", "show-close-button", "close-button-props", "onClose"])) :
|
|
1844
|
+
}, 8, ["class", "content-class", "show-close-button", "close-button-props", "onClose"])) : z("", !0),
|
|
1845
1845
|
G("div", {
|
|
1846
1846
|
ref: "popover__content",
|
|
1847
1847
|
"data-qa": "dt-popover-content",
|
|
1848
|
-
class:
|
|
1848
|
+
class: $([
|
|
1849
1849
|
"d-popover__content",
|
|
1850
1850
|
i.POPOVER_PADDING_CLASSES[t.padding],
|
|
1851
1851
|
t.contentClass
|
|
@@ -1857,19 +1857,19 @@ function $a(n, e, t, r, i, s) {
|
|
|
1857
1857
|
key: 1,
|
|
1858
1858
|
ref: "popover__footer",
|
|
1859
1859
|
type: "footer",
|
|
1860
|
-
class:
|
|
1860
|
+
class: $(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),
|
|
1861
1861
|
"content-class": t.footerClass
|
|
1862
1862
|
}, {
|
|
1863
1863
|
content: D(() => [
|
|
1864
1864
|
L(n.$slots, "footerContent", { close: s.closePopover })
|
|
1865
1865
|
]),
|
|
1866
1866
|
_: 3
|
|
1867
|
-
}, 8, ["class", "content-class"])) :
|
|
1867
|
+
}, 8, ["class", "content-class"])) : z("", !0),
|
|
1868
1868
|
n.showVisuallyHiddenClose ? (w(), F(l, {
|
|
1869
1869
|
key: 2,
|
|
1870
1870
|
"visually-hidden-close-label": n.visuallyHiddenCloseLabel,
|
|
1871
1871
|
onClose: s.closePopover
|
|
1872
|
-
}, null, 8, ["visually-hidden-close-label", "onClose"])) :
|
|
1872
|
+
}, null, 8, ["visually-hidden-close-label", "onClose"])) : z("", !0)
|
|
1873
1873
|
]),
|
|
1874
1874
|
_: 3
|
|
1875
1875
|
}, 16, ["id", "role", "aria-hidden", "aria-labelledby", "aria-label", "aria-modal", "transition", "show", "appear", "class", "style", "css", "tabindex"])
|
|
@@ -1878,7 +1878,7 @@ function $a(n, e, t, r, i, s) {
|
|
|
1878
1878
|
}, 8, ["class"]))
|
|
1879
1879
|
]);
|
|
1880
1880
|
}
|
|
1881
|
-
const
|
|
1881
|
+
const $a = /* @__PURE__ */ q(za, [["render", Ha]]), qa = {
|
|
1882
1882
|
name: "DtNotice",
|
|
1883
1883
|
components: {
|
|
1884
1884
|
DtNoticeIcon: Ql,
|
|
@@ -1993,7 +1993,7 @@ const Ha = /* @__PURE__ */ q(za, [["render", $a]]), qa = {
|
|
|
1993
1993
|
function Ka(n, e, t, r, i, s) {
|
|
1994
1994
|
const o = N("dt-notice-icon"), l = N("dt-notice-content"), a = N("dt-notice-action");
|
|
1995
1995
|
return w(), B("aside", {
|
|
1996
|
-
class:
|
|
1996
|
+
class: $(s.noticeClass),
|
|
1997
1997
|
"data-qa": "notice"
|
|
1998
1998
|
}, [
|
|
1999
1999
|
_(o, { kind: t.kind }, {
|
|
@@ -2129,7 +2129,7 @@ const Za = {
|
|
|
2129
2129
|
};
|
|
2130
2130
|
function Qa(n, e, t, r, i, s) {
|
|
2131
2131
|
return w(), F(Xe(t.as), {
|
|
2132
|
-
class:
|
|
2132
|
+
class: $([
|
|
2133
2133
|
"d-stack",
|
|
2134
2134
|
s.defaultDirection,
|
|
2135
2135
|
s.stackResponsive,
|
|
@@ -5696,16 +5696,16 @@ function Rc(n, e, t = 1, r) {
|
|
|
5696
5696
|
}
|
|
5697
5697
|
function rt(n, e) {
|
|
5698
5698
|
let t = n.resolve(e), r = t.index();
|
|
5699
|
-
return
|
|
5699
|
+
return Hs(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
|
|
5700
5700
|
}
|
|
5701
|
-
function
|
|
5701
|
+
function Hs(n, e) {
|
|
5702
5702
|
return !!(n && e && !n.isLeaf && n.canAppend(e));
|
|
5703
5703
|
}
|
|
5704
|
-
function
|
|
5704
|
+
function $s(n, e, t = -1) {
|
|
5705
5705
|
let r = n.resolve(e);
|
|
5706
5706
|
for (let i = r.depth; ; i--) {
|
|
5707
5707
|
let s, o, l = r.index(i);
|
|
5708
|
-
if (i == r.depth ? (s = r.nodeBefore, o = r.nodeAfter) : t > 0 ? (s = r.node(i + 1), l++, o = r.node(i).maybeChild(l)) : (s = r.node(i).maybeChild(l - 1), o = r.node(i + 1)), s && !s.isTextblock &&
|
|
5708
|
+
if (i == r.depth ? (s = r.nodeBefore, o = r.nodeAfter) : t > 0 ? (s = r.node(i + 1), l++, o = r.node(i).maybeChild(l)) : (s = r.node(i).maybeChild(l - 1), o = r.node(i + 1)), s && !s.isTextblock && Hs(s, o) && r.node(i).canReplace(l, l + 1))
|
|
5709
5709
|
return e;
|
|
5710
5710
|
if (i == 0)
|
|
5711
5711
|
break;
|
|
@@ -6007,14 +6007,14 @@ function Ws(n, e, t, r, i) {
|
|
|
6007
6007
|
}
|
|
6008
6008
|
return n;
|
|
6009
6009
|
}
|
|
6010
|
-
function
|
|
6010
|
+
function Hc(n, e, t, r) {
|
|
6011
6011
|
if (!r.isInline && e == t && n.doc.resolve(e).parent.content.size) {
|
|
6012
6012
|
let i = Bc(n.doc, e, r.type);
|
|
6013
6013
|
i != null && (e = t = i);
|
|
6014
6014
|
}
|
|
6015
6015
|
n.replaceRange(e, t, new k(b.from(r), 0, 0));
|
|
6016
6016
|
}
|
|
6017
|
-
function
|
|
6017
|
+
function $c(n, e, t) {
|
|
6018
6018
|
let r = n.doc.resolve(e), i = n.doc.resolve(t), s = Js(r, i);
|
|
6019
6019
|
for (let o = 0; o < s.length; o++) {
|
|
6020
6020
|
let l = s[o], a = o == s.length - 1;
|
|
@@ -6188,14 +6188,14 @@ class Us {
|
|
|
6188
6188
|
that parent node.
|
|
6189
6189
|
*/
|
|
6190
6190
|
replaceRangeWith(e, t, r) {
|
|
6191
|
-
return
|
|
6191
|
+
return Hc(this, e, t, r), this;
|
|
6192
6192
|
}
|
|
6193
6193
|
/**
|
|
6194
6194
|
Delete the given range, expanding it to cover fully covered
|
|
6195
6195
|
parent nodes until a valid replace is found.
|
|
6196
6196
|
*/
|
|
6197
6197
|
deleteRange(e, t) {
|
|
6198
|
-
return
|
|
6198
|
+
return $c(this, e, t), this;
|
|
6199
6199
|
}
|
|
6200
6200
|
/**
|
|
6201
6201
|
Split the content in the given range off from its parent, if there
|
|
@@ -6886,7 +6886,7 @@ const Jc = [
|
|
|
6886
6886
|
}
|
|
6887
6887
|
})
|
|
6888
6888
|
];
|
|
6889
|
-
class
|
|
6889
|
+
class Hn {
|
|
6890
6890
|
constructor(e, t) {
|
|
6891
6891
|
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Jc.slice(), t && t.forEach((r) => {
|
|
6892
6892
|
if (this.pluginsByKey[r.key])
|
|
@@ -6987,7 +6987,7 @@ class at {
|
|
|
6987
6987
|
Create a new state.
|
|
6988
6988
|
*/
|
|
6989
6989
|
static create(e) {
|
|
6990
|
-
let t = new
|
|
6990
|
+
let t = new Hn(e.doc ? e.doc.type.schema : e.schema, e.plugins), r = new at(t);
|
|
6991
6991
|
for (let i = 0; i < t.fields.length; i++)
|
|
6992
6992
|
r[t.fields[i].name] = t.fields[i].init(e, r);
|
|
6993
6993
|
return r;
|
|
@@ -7001,7 +7001,7 @@ class at {
|
|
|
7001
7001
|
configuration object..
|
|
7002
7002
|
*/
|
|
7003
7003
|
reconfigure(e) {
|
|
7004
|
-
let t = new
|
|
7004
|
+
let t = new Hn(this.schema, e.plugins), r = t.fields, i = new at(t);
|
|
7005
7005
|
for (let s = 0; s < r.length; s++) {
|
|
7006
7006
|
let o = r[s].name;
|
|
7007
7007
|
i[o] = this.hasOwnProperty(o) ? this[o] : r[s].init(e, i);
|
|
@@ -7038,7 +7038,7 @@ class at {
|
|
|
7038
7038
|
throw new RangeError("Invalid input for EditorState.fromJSON");
|
|
7039
7039
|
if (!e.schema)
|
|
7040
7040
|
throw new RangeError("Required config field 'schema' missing");
|
|
7041
|
-
let i = new
|
|
7041
|
+
let i = new Hn(e.schema, e.plugins), s = new at(i);
|
|
7042
7042
|
return i.fields.forEach((o) => {
|
|
7043
7043
|
if (o.name == "doc")
|
|
7044
7044
|
s.doc = Ue.fromJSON(e.schema, t.doc);
|
|
@@ -7081,9 +7081,9 @@ class se {
|
|
|
7081
7081
|
return e[this.key];
|
|
7082
7082
|
}
|
|
7083
7083
|
}
|
|
7084
|
-
const
|
|
7084
|
+
const $n = /* @__PURE__ */ Object.create(null);
|
|
7085
7085
|
function Ys(n) {
|
|
7086
|
-
return n in
|
|
7086
|
+
return n in $n ? n + "$" + ++$n[n] : ($n[n] = 0, n + "$");
|
|
7087
7087
|
}
|
|
7088
7088
|
class ae {
|
|
7089
7089
|
/**
|
|
@@ -7512,7 +7512,7 @@ let bi = null, ki = null, Si = !1;
|
|
|
7512
7512
|
function gd(n, e, t) {
|
|
7513
7513
|
return bi == e && ki == t ? Si : (bi = e, ki = t, Si = t == "up" || t == "down" ? hd(n, e, t) : md(n, e, t));
|
|
7514
7514
|
}
|
|
7515
|
-
const ue = 0, xi = 1,
|
|
7515
|
+
const ue = 0, xi = 1, $e = 2, Ce = 3;
|
|
7516
7516
|
class qt {
|
|
7517
7517
|
constructor(e, t, r, i) {
|
|
7518
7518
|
this.parent = e, this.children = t, this.dom = r, this.contentDOM = i, this.dirty = ue, r.pmViewDesc = this;
|
|
@@ -7822,19 +7822,19 @@ class qt {
|
|
|
7822
7822
|
if (r == o ? e <= o && t >= r : e < o && t > r) {
|
|
7823
7823
|
let l = r + s.border, a = o - s.border;
|
|
7824
7824
|
if (e >= l && t <= a) {
|
|
7825
|
-
this.dirty = e == r || t == o ?
|
|
7825
|
+
this.dirty = e == r || t == o ? $e : xi, e == l && t == a && (s.contentLost || s.dom.parentNode != this.contentDOM) ? s.dirty = Ce : s.markDirty(e - l, t - l);
|
|
7826
7826
|
return;
|
|
7827
7827
|
} else
|
|
7828
|
-
s.dirty = s.dom == s.contentDOM && s.dom.parentNode == this.contentDOM && !s.children.length ?
|
|
7828
|
+
s.dirty = s.dom == s.contentDOM && s.dom.parentNode == this.contentDOM && !s.children.length ? $e : Ce;
|
|
7829
7829
|
}
|
|
7830
7830
|
r = o;
|
|
7831
7831
|
}
|
|
7832
|
-
this.dirty =
|
|
7832
|
+
this.dirty = $e;
|
|
7833
7833
|
}
|
|
7834
7834
|
markParentsDirty() {
|
|
7835
7835
|
let e = 1;
|
|
7836
7836
|
for (let t = this.parent; t; t = t.parent, e++) {
|
|
7837
|
-
let r = e == 1 ?
|
|
7837
|
+
let r = e == 1 ? $e : xi;
|
|
7838
7838
|
t.dirty < r && (t.dirty = r);
|
|
7839
7839
|
}
|
|
7840
7840
|
}
|
|
@@ -8004,7 +8004,7 @@ class Re extends qt {
|
|
|
8004
8004
|
a.syncToMarks(c.marks, r, e);
|
|
8005
8005
|
let h;
|
|
8006
8006
|
a.findNodeMatch(c, d, u, f) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (h = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, u, h, e) || a.updateNextNode(c, d, u, e, f, i) || a.addNode(c, d, u, e, i), i += c.nodeSize;
|
|
8007
|
-
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty ==
|
|
8007
|
+
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == $e) && (o && this.protectLocalComposition(e, o), oo(this.contentDOM, this.children, e), yt && vd(this.dom));
|
|
8008
8008
|
}
|
|
8009
8009
|
localCompositionInfo(e, t) {
|
|
8010
8010
|
let { from: r, to: i } = e.state.selection;
|
|
@@ -8306,7 +8306,7 @@ class Sd {
|
|
|
8306
8306
|
}
|
|
8307
8307
|
updateNodeAt(e, t, r, i, s) {
|
|
8308
8308
|
let o = this.top.children[i];
|
|
8309
|
-
return o.dirty == Ce && o.dom == o.contentDOM && (o.dirty =
|
|
8309
|
+
return o.dirty == Ce && o.dom == o.contentDOM && (o.dirty = $e), o.update(e, t, r, s) ? (this.destroyBetween(this.index, i), this.index++, !0) : !1;
|
|
8310
8310
|
}
|
|
8311
8311
|
findIndexWithChild(e) {
|
|
8312
8312
|
for (; ; ) {
|
|
@@ -8338,7 +8338,7 @@ class Sd {
|
|
|
8338
8338
|
if (!f && a.update(e, t, r, i))
|
|
8339
8339
|
return this.destroyBetween(this.index, l), a.dom != d && (this.changed = !0), this.index++, !0;
|
|
8340
8340
|
if (!f && (u = this.recreateWrapper(a, e, t, r, i, o)))
|
|
8341
|
-
return this.top.children[this.index] = u, u.dirty =
|
|
8341
|
+
return this.top.children[this.index] = u, u.dirty = $e, u.updateChildren(i, o + 1), u.dirty = ue, this.changed = !0, this.index++, !0;
|
|
8342
8342
|
break;
|
|
8343
8343
|
}
|
|
8344
8344
|
}
|
|
@@ -8636,7 +8636,7 @@ function hr(n, e) {
|
|
|
8636
8636
|
let { $anchor: t, $head: r } = n.selection, i = e > 0 ? t.max(r) : t.min(r), s = i.parent.inlineContent ? i.depth ? n.doc.resolve(e > 0 ? i.after() : i.before()) : null : i;
|
|
8637
8637
|
return s && O.findFrom(s, e);
|
|
8638
8638
|
}
|
|
8639
|
-
function
|
|
8639
|
+
function He(n, e) {
|
|
8640
8640
|
return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
8641
8641
|
}
|
|
8642
8642
|
function Ni(n, e, t) {
|
|
@@ -8646,20 +8646,20 @@ function Ni(n, e, t) {
|
|
|
8646
8646
|
return !1;
|
|
8647
8647
|
if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
8648
8648
|
let i = hr(n.state, e);
|
|
8649
|
-
return i && i instanceof v ?
|
|
8649
|
+
return i && i instanceof v ? He(n, i) : !1;
|
|
8650
8650
|
} else if (!(ce && t.indexOf("m") > -1)) {
|
|
8651
8651
|
let i = r.$head, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter, o;
|
|
8652
8652
|
if (!s || s.isText)
|
|
8653
8653
|
return !1;
|
|
8654
8654
|
let l = e < 0 ? i.pos - s.nodeSize : i.pos;
|
|
8655
|
-
return s.isAtom || (o = n.docView.descAt(l)) && !o.contentDOM ? v.isSelectable(s) ?
|
|
8655
|
+
return s.isAtom || (o = n.docView.descAt(l)) && !o.contentDOM ? v.isSelectable(s) ? He(n, new v(e < 0 ? n.state.doc.resolve(i.pos - s.nodeSize) : i)) : xn ? He(n, new A(n.state.doc.resolve(e < 0 ? l : l + s.nodeSize))) : !1 : !1;
|
|
8656
8656
|
}
|
|
8657
8657
|
} else {
|
|
8658
8658
|
if (r instanceof v && r.node.isInline)
|
|
8659
|
-
return
|
|
8659
|
+
return He(n, new A(e > 0 ? r.$to : r.$from));
|
|
8660
8660
|
{
|
|
8661
8661
|
let i = hr(n.state, e);
|
|
8662
|
-
return i ?
|
|
8662
|
+
return i ? He(n, i) : !1;
|
|
8663
8663
|
}
|
|
8664
8664
|
}
|
|
8665
8665
|
}
|
|
@@ -8783,11 +8783,11 @@ function Di(n, e, t) {
|
|
|
8783
8783
|
if (!i.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
8784
8784
|
let o = hr(n.state, e);
|
|
8785
8785
|
if (o && o instanceof v)
|
|
8786
|
-
return
|
|
8786
|
+
return He(n, o);
|
|
8787
8787
|
}
|
|
8788
8788
|
if (!i.parent.inlineContent) {
|
|
8789
8789
|
let o = e < 0 ? i : s, l = r instanceof pe ? O.near(o, e) : O.findFrom(o, e);
|
|
8790
|
-
return l ?
|
|
8790
|
+
return l ? He(n, l) : !1;
|
|
8791
8791
|
}
|
|
8792
8792
|
return !1;
|
|
8793
8793
|
}
|
|
@@ -9042,7 +9042,7 @@ function jd(n) {
|
|
|
9042
9042
|
for (let e in te) {
|
|
9043
9043
|
let t = te[e];
|
|
9044
9044
|
n.dom.addEventListener(e, n.input.eventHandlers[e] = (r) => {
|
|
9045
|
-
|
|
9045
|
+
$d(n, r) && !Dr(n, r) && (n.editable || !(r.type in ne)) && t(n, r);
|
|
9046
9046
|
}, zd[e] ? { passive: !0 } : void 0);
|
|
9047
9047
|
}
|
|
9048
9048
|
ee && n.dom.addEventListener("input", () => null), gr(n);
|
|
@@ -9050,7 +9050,7 @@ function jd(n) {
|
|
|
9050
9050
|
function Ie(n, e) {
|
|
9051
9051
|
n.input.lastSelectionOrigin = e, n.input.lastSelectionTime = Date.now();
|
|
9052
9052
|
}
|
|
9053
|
-
function
|
|
9053
|
+
function Hd(n) {
|
|
9054
9054
|
n.domObserver.stop();
|
|
9055
9055
|
for (let e in n.input.eventHandlers)
|
|
9056
9056
|
n.dom.removeEventListener(e, n.input.eventHandlers[e]);
|
|
@@ -9068,7 +9068,7 @@ function Dr(n, e) {
|
|
|
9068
9068
|
return r ? r(n, e) || e.defaultPrevented : !1;
|
|
9069
9069
|
});
|
|
9070
9070
|
}
|
|
9071
|
-
function
|
|
9071
|
+
function $d(n, e) {
|
|
9072
9072
|
if (!e.bubbles)
|
|
9073
9073
|
return !0;
|
|
9074
9074
|
if (e.defaultPrevented)
|
|
@@ -9561,7 +9561,7 @@ class le {
|
|
|
9561
9561
|
}
|
|
9562
9562
|
}
|
|
9563
9563
|
const lt = [], Ge = {};
|
|
9564
|
-
class
|
|
9564
|
+
class H {
|
|
9565
9565
|
/**
|
|
9566
9566
|
@internal
|
|
9567
9567
|
*/
|
|
@@ -9614,7 +9614,7 @@ class $ {
|
|
|
9614
9614
|
let a = this.local[l].map(e, r, i);
|
|
9615
9615
|
a && a.type.valid(t, a) ? (o || (o = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
|
|
9616
9616
|
}
|
|
9617
|
-
return this.children.length ? su(this.children, o || [], e, t, r, i, s) : o ? new
|
|
9617
|
+
return this.children.length ? su(this.children, o || [], e, t, r, i, s) : o ? new H(o.sort(Ye), lt) : X;
|
|
9618
9618
|
}
|
|
9619
9619
|
/**
|
|
9620
9620
|
Add the given array of decorations to the ones in the set,
|
|
@@ -9622,7 +9622,7 @@ class $ {
|
|
|
9622
9622
|
create the appropriate tree structure.
|
|
9623
9623
|
*/
|
|
9624
9624
|
add(e, t) {
|
|
9625
|
-
return t.length ? this == X ?
|
|
9625
|
+
return t.length ? this == X ? H.create(e, t) : this.addInner(e, t, 0) : this;
|
|
9626
9626
|
}
|
|
9627
9627
|
addInner(e, t, r) {
|
|
9628
9628
|
let i, s = 0;
|
|
@@ -9637,7 +9637,7 @@ class $ {
|
|
|
9637
9637
|
let o = Oo(s ? No(t) : t, -r);
|
|
9638
9638
|
for (let l = 0; l < o.length; l++)
|
|
9639
9639
|
o[l].type.valid(e, o[l]) || o.splice(l--, 1);
|
|
9640
|
-
return new
|
|
9640
|
+
return new H(o.length ? this.local.concat(o).sort(Ye) : this.local, i || this.children);
|
|
9641
9641
|
}
|
|
9642
9642
|
/**
|
|
9643
9643
|
Create a new set that contains the decorations in this set, minus
|
|
@@ -9664,7 +9664,7 @@ class $ {
|
|
|
9664
9664
|
for (let l = 0; l < i.length; l++)
|
|
9665
9665
|
i[l].eq(o, t) && (i == this.local && (i = this.local.slice()), i.splice(l--, 1));
|
|
9666
9666
|
}
|
|
9667
|
-
return r == this.children && i == this.local ? this : i.length || r.length ? new
|
|
9667
|
+
return r == this.children && i == this.local ? this : i.length || r.length ? new H(i, r) : X;
|
|
9668
9668
|
}
|
|
9669
9669
|
/**
|
|
9670
9670
|
@internal
|
|
@@ -9673,7 +9673,7 @@ class $ {
|
|
|
9673
9673
|
if (this == X)
|
|
9674
9674
|
return this;
|
|
9675
9675
|
if (t.isLeaf)
|
|
9676
|
-
return
|
|
9676
|
+
return H.empty;
|
|
9677
9677
|
let r, i;
|
|
9678
9678
|
for (let l = 0; l < this.children.length; l += 3)
|
|
9679
9679
|
if (this.children[l] >= e) {
|
|
@@ -9689,7 +9689,7 @@ class $ {
|
|
|
9689
9689
|
}
|
|
9690
9690
|
}
|
|
9691
9691
|
if (i) {
|
|
9692
|
-
let l = new
|
|
9692
|
+
let l = new H(i.sort(Ye), lt);
|
|
9693
9693
|
return r ? new Ne([l, r]) : l;
|
|
9694
9694
|
}
|
|
9695
9695
|
return r || X;
|
|
@@ -9700,7 +9700,7 @@ class $ {
|
|
|
9700
9700
|
eq(e) {
|
|
9701
9701
|
if (this == e)
|
|
9702
9702
|
return !0;
|
|
9703
|
-
if (!(e instanceof
|
|
9703
|
+
if (!(e instanceof H) || this.local.length != e.local.length || this.children.length != e.children.length)
|
|
9704
9704
|
return !1;
|
|
9705
9705
|
for (let t = 0; t < this.local.length; t++)
|
|
9706
9706
|
if (!this.local[t].eq(e.local[t]))
|
|
@@ -9730,9 +9730,9 @@ class $ {
|
|
|
9730
9730
|
return t;
|
|
9731
9731
|
}
|
|
9732
9732
|
}
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
const X =
|
|
9733
|
+
H.empty = new H([], []);
|
|
9734
|
+
H.removeOverlap = Br;
|
|
9735
|
+
const X = H.empty;
|
|
9736
9736
|
class Ne {
|
|
9737
9737
|
constructor(e) {
|
|
9738
9738
|
this.members = e;
|
|
@@ -9743,7 +9743,7 @@ class Ne {
|
|
|
9743
9743
|
}
|
|
9744
9744
|
forChild(e, t) {
|
|
9745
9745
|
if (t.isLeaf)
|
|
9746
|
-
return
|
|
9746
|
+
return H.empty;
|
|
9747
9747
|
let r = [];
|
|
9748
9748
|
for (let i = 0; i < this.members.length; i++) {
|
|
9749
9749
|
let s = this.members[i].forChild(e, t);
|
|
@@ -9783,7 +9783,7 @@ class Ne {
|
|
|
9783
9783
|
case 1:
|
|
9784
9784
|
return e[0];
|
|
9785
9785
|
default:
|
|
9786
|
-
return new Ne(e.every((t) => t instanceof
|
|
9786
|
+
return new Ne(e.every((t) => t instanceof H) ? e : e.reduce((t, r) => t.concat(r instanceof H ? r : r.members), []));
|
|
9787
9787
|
}
|
|
9788
9788
|
}
|
|
9789
9789
|
}
|
|
@@ -9834,7 +9834,7 @@ function su(n, e, t, r, i, s, o) {
|
|
|
9834
9834
|
l.splice(f, 0, d.children[u], d.children[u + 1], d.children[u + 2]);
|
|
9835
9835
|
}
|
|
9836
9836
|
}
|
|
9837
|
-
return new
|
|
9837
|
+
return new H(e.sort(Ye), l);
|
|
9838
9838
|
}
|
|
9839
9839
|
function Oo(n, e) {
|
|
9840
9840
|
if (!e || !n.length)
|
|
@@ -9886,7 +9886,7 @@ function cn(n, e, t, r) {
|
|
|
9886
9886
|
let o = Oo(s ? No(n) : n, -t).sort(Ye);
|
|
9887
9887
|
for (let l = 0; l < o.length; l++)
|
|
9888
9888
|
o[l].type.valid(e, o[l]) || (r.onRemove && r.onRemove(o[l].spec), o.splice(l--, 1));
|
|
9889
|
-
return o.length || i.length ? new
|
|
9889
|
+
return o.length || i.length ? new H(o, i) : X;
|
|
9890
9890
|
}
|
|
9891
9891
|
function Ye(n, e) {
|
|
9892
9892
|
return n.from - e.from || n.to - e.to;
|
|
@@ -9919,7 +9919,7 @@ function Wn(n) {
|
|
|
9919
9919
|
return n.someProp("decorations", (t) => {
|
|
9920
9920
|
let r = t(n.state);
|
|
9921
9921
|
r && r != X && e.push(r);
|
|
9922
|
-
}), n.cursorWrapper && e.push(
|
|
9922
|
+
}), n.cursorWrapper && e.push(H.create(n.state.doc, [n.cursorWrapper.deco])), Ne.from(e);
|
|
9923
9923
|
}
|
|
9924
9924
|
const lu = {
|
|
9925
9925
|
childList: !0,
|
|
@@ -10185,15 +10185,15 @@ function gu(n, e, t, r, i) {
|
|
|
10185
10185
|
return S(n, je(13, "Enter"));
|
|
10186
10186
|
});
|
|
10187
10187
|
}, 20));
|
|
10188
|
-
let E = h.start, P = h.endA, T, I,
|
|
10188
|
+
let E = h.start, P = h.endA, T, I, V;
|
|
10189
10189
|
if (y) {
|
|
10190
10190
|
if (p.pos == m.pos)
|
|
10191
10191
|
re && Pe <= 11 && p.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Me(n), 20)), T = n.state.tr.delete(E, P), I = c.resolve(h.start).marksAcross(c.resolve(h.endA));
|
|
10192
10192
|
else if (
|
|
10193
10193
|
// Adding or removing a mark
|
|
10194
|
-
h.endA == h.endB && (
|
|
10194
|
+
h.endA == h.endB && (V = yu(p.parent.content.cut(p.parentOffset, m.parentOffset), g.parent.content.cut(g.parentOffset, h.endA - g.start())))
|
|
10195
10195
|
)
|
|
10196
|
-
T = n.state.tr,
|
|
10196
|
+
T = n.state.tr, V.type == "add" ? T.addMark(E, P, V.mark) : T.removeMark(E, P, V.mark);
|
|
10197
10197
|
else if (p.parent.child(p.index()).isText && p.index() == m.index() - (m.textOffset ? 0 : 1)) {
|
|
10198
10198
|
let S = p.parent.textBetween(p.parentOffset, m.parentOffset);
|
|
10199
10199
|
if (n.someProp("handleTextInput", (j) => j(n, E, P, S)))
|
|
@@ -10277,7 +10277,7 @@ class Su {
|
|
|
10277
10277
|
added to the document.
|
|
10278
10278
|
*/
|
|
10279
10279
|
constructor(e, t) {
|
|
10280
|
-
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new Vd(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(qi), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable =
|
|
10280
|
+
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new Vd(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(qi), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Hi(this), ji(this), this.nodeViews = $i(this), this.docView = Ci(this.state.doc, Vi(this), Wn(this), this.dom, this), this.domObserver = new du(this, (r, i, s, o) => gu(this, r, i, s, o)), this.domObserver.start(), jd(this), this.updatePluginViews();
|
|
10281
10281
|
}
|
|
10282
10282
|
/**
|
|
10283
10283
|
Holds `true` when a
|
|
@@ -10335,10 +10335,10 @@ class Su {
|
|
|
10335
10335
|
e.storedMarks && this.composing && (Eo(this), s = !0), this.state = e;
|
|
10336
10336
|
let o = r.plugins != e.plugins || this._props.plugins != t.plugins;
|
|
10337
10337
|
if (o || this._props.plugins != t.plugins || this._props.nodeViews != t.nodeViews) {
|
|
10338
|
-
let f =
|
|
10338
|
+
let f = $i(this);
|
|
10339
10339
|
Cu(f, this.nodeViews) && (this.nodeViews = f, i = !0);
|
|
10340
10340
|
}
|
|
10341
|
-
(o || t.handleDOMEvents != this._props.handleDOMEvents) && gr(this), this.editable =
|
|
10341
|
+
(o || t.handleDOMEvents != this._props.handleDOMEvents) && gr(this), this.editable = Hi(this), ji(this);
|
|
10342
10342
|
let l = Wn(this), a = Vi(this), c = r.plugins != e.plugins && !r.doc.eq(e.doc) ? "reset" : e.scrollToSelection > r.scrollToSelection ? "to selection" : "preserve", d = i || !this.docView.matchesNode(e.doc, a, l);
|
|
10343
10343
|
(d || !e.selection.eq(r.selection)) && (s = !0);
|
|
10344
10344
|
let u = c == "preserve" && s && this.dom.style.overflowAnchor == null && id(this);
|
|
@@ -10540,7 +10540,7 @@ class Su {
|
|
|
10540
10540
|
views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
10541
10541
|
*/
|
|
10542
10542
|
destroy() {
|
|
10543
|
-
this.docView && (
|
|
10543
|
+
this.docView && (Hd(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], Wn(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null);
|
|
10544
10544
|
}
|
|
10545
10545
|
/**
|
|
10546
10546
|
This is true when the view has been
|
|
@@ -10597,14 +10597,14 @@ function ji(n) {
|
|
|
10597
10597
|
} else
|
|
10598
10598
|
n.cursorWrapper = null;
|
|
10599
10599
|
}
|
|
10600
|
-
function
|
|
10600
|
+
function Hi(n) {
|
|
10601
10601
|
return !n.someProp("editable", (e) => e(n.state) === !1);
|
|
10602
10602
|
}
|
|
10603
10603
|
function xu(n, e) {
|
|
10604
10604
|
let t = Math.min(n.$anchor.sharedDepth(n.head), e.$anchor.sharedDepth(e.head));
|
|
10605
10605
|
return n.$anchor.start(t) != e.$anchor.start(t);
|
|
10606
10606
|
}
|
|
10607
|
-
function
|
|
10607
|
+
function $i(n) {
|
|
10608
10608
|
let e = /* @__PURE__ */ Object.create(null);
|
|
10609
10609
|
function t(r) {
|
|
10610
10610
|
for (let i in r)
|
|
@@ -10887,7 +10887,7 @@ const zu = (n, e) => {
|
|
|
10887
10887
|
if (t.node.isTextblock || !rt(n.doc, t.from))
|
|
10888
10888
|
return !1;
|
|
10889
10889
|
i = t.from;
|
|
10890
|
-
} else if (i =
|
|
10890
|
+
} else if (i = $s(n.doc, t.from, -1), i == null)
|
|
10891
10891
|
return !1;
|
|
10892
10892
|
if (e) {
|
|
10893
10893
|
let s = n.tr.join(i);
|
|
@@ -10900,13 +10900,13 @@ const zu = (n, e) => {
|
|
|
10900
10900
|
if (t.node.isTextblock || !rt(n.doc, t.to))
|
|
10901
10901
|
return !1;
|
|
10902
10902
|
r = t.to;
|
|
10903
|
-
} else if (r =
|
|
10903
|
+
} else if (r = $s(n.doc, t.to, 1), r == null)
|
|
10904
10904
|
return !1;
|
|
10905
10905
|
return e && e(n.tr.join(r).scrollIntoView()), !0;
|
|
10906
10906
|
}, ju = (n, e) => {
|
|
10907
10907
|
let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && Ct(i);
|
|
10908
10908
|
return s == null ? !1 : (e && e(n.tr.lift(i, s).scrollIntoView()), !0);
|
|
10909
|
-
},
|
|
10909
|
+
}, Hu = (n, e) => {
|
|
10910
10910
|
let { $head: t, $anchor: r } = n.selection;
|
|
10911
10911
|
return !t.parent.type.spec.code || !t.sameParent(r) ? !1 : (e && e(n.tr.insertText(`
|
|
10912
10912
|
`).scrollIntoView()), !0);
|
|
@@ -10919,7 +10919,7 @@ function Io(n) {
|
|
|
10919
10919
|
}
|
|
10920
10920
|
return null;
|
|
10921
10921
|
}
|
|
10922
|
-
const
|
|
10922
|
+
const $u = (n, e) => {
|
|
10923
10923
|
let { $head: t, $anchor: r } = n.selection;
|
|
10924
10924
|
if (!t.parent.type.spec.code || !t.sameParent(r))
|
|
10925
10925
|
return !1;
|
|
@@ -11748,7 +11748,7 @@ class ct {
|
|
|
11748
11748
|
type: Yn(o.name, this.schema)
|
|
11749
11749
|
}, a = [], c = x(o, "addKeyboardShortcuts", l);
|
|
11750
11750
|
let d = {};
|
|
11751
|
-
if (o.type === "mark" && o.config.exitable && (d.ArrowRight = () =>
|
|
11751
|
+
if (o.type === "mark" && o.config.exitable && (d.ArrowRight = () => Ht.handleExit({ editor: e, mark: o })), c) {
|
|
11752
11752
|
const m = Object.fromEntries(Object.entries(c()).map(([g, y]) => [g, () => y({ editor: e })]));
|
|
11753
11753
|
d = { ...d, ...m };
|
|
11754
11754
|
}
|
|
@@ -11939,7 +11939,7 @@ const bf = fe.create({
|
|
|
11939
11939
|
}, Mf = (n) => ({ tr: e, dispatch: t }) => {
|
|
11940
11940
|
const { from: r, to: i } = n;
|
|
11941
11941
|
return t && e.delete(r, i), !0;
|
|
11942
|
-
}, Of = () => ({ state: n, dispatch: e }) => Iu(n, e), Tf = () => ({ commands: n }) => n.keyboardShortcut("Enter"), Nf = () => ({ state: n, dispatch: e }) =>
|
|
11942
|
+
}, Of = () => ({ state: n, dispatch: e }) => Iu(n, e), Tf = () => ({ commands: n }) => n.keyboardShortcut("Enter"), Nf = () => ({ state: n, dispatch: e }) => $u(n, e);
|
|
11943
11943
|
function un(n, e, t = { strict: !0 }) {
|
|
11944
11944
|
const r = Object.keys(e);
|
|
11945
11945
|
return r.length ? r.every((i) => t.strict ? e[i] === n[i] : Lr(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
|
|
@@ -12097,11 +12097,11 @@ const Lf = (n) => n.toString().startsWith("<"), Ff = (n, e, t) => ({ tr: r, disp
|
|
|
12097
12097
|
c ? Array.isArray(e) ? r.insertText(e.map((f) => f.text || "").join(""), l, a) : typeof e == "object" && e && e.text ? r.insertText(e.text, l, a) : r.insertText(e, l, a) : r.replaceWith(l, a, o), t.updateSelection && Bf(r, r.steps.length - 1, -1);
|
|
12098
12098
|
}
|
|
12099
12099
|
return !0;
|
|
12100
|
-
}, zf = () => ({ state: n, dispatch: e }) => zu(n, e), Vf = () => ({ state: n, dispatch: e }) => Vu(n, e), jf = () => ({ state: n, dispatch: e }) => Ru(n, e),
|
|
12100
|
+
}, zf = () => ({ state: n, dispatch: e }) => zu(n, e), Vf = () => ({ state: n, dispatch: e }) => Vu(n, e), jf = () => ({ state: n, dispatch: e }) => Ru(n, e), Hf = () => ({ state: n, dispatch: e }) => Lu(n, e);
|
|
12101
12101
|
function jo() {
|
|
12102
12102
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
12103
12103
|
}
|
|
12104
|
-
function
|
|
12104
|
+
function $f(n) {
|
|
12105
12105
|
const e = n.split(/-(?!$)/);
|
|
12106
12106
|
let t = e[e.length - 1];
|
|
12107
12107
|
t === "Space" && (t = " ");
|
|
@@ -12124,7 +12124,7 @@ function Hf(n) {
|
|
|
12124
12124
|
return r && (t = `Alt-${t}`), i && (t = `Ctrl-${t}`), o && (t = `Meta-${t}`), s && (t = `Shift-${t}`), t;
|
|
12125
12125
|
}
|
|
12126
12126
|
const qf = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
|
|
12127
|
-
const s =
|
|
12127
|
+
const s = $f(n).split(/-(?!$)/), o = s.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), l = new KeyboardEvent("keydown", {
|
|
12128
12128
|
key: o === "Space" ? " " : o,
|
|
12129
12129
|
altKey: s.includes("Alt"),
|
|
12130
12130
|
ctrlKey: s.includes("Ctrl"),
|
|
@@ -12161,7 +12161,7 @@ const Kf = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
|
12161
12161
|
}, Wf = () => ({ state: n, dispatch: e }) => Ku(n, e), Jf = (n) => ({ state: e, dispatch: t }) => {
|
|
12162
12162
|
const r = J(n, e.schema);
|
|
12163
12163
|
return Qu(r)(e, t);
|
|
12164
|
-
}, Uf = () => ({ state: n, dispatch: e }) =>
|
|
12164
|
+
}, Uf = () => ({ state: n, dispatch: e }) => Hu(n, e);
|
|
12165
12165
|
function Nn(n, e) {
|
|
12166
12166
|
return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
|
|
12167
12167
|
}
|
|
@@ -12183,11 +12183,11 @@ const Gf = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
12183
12183
|
from: 0,
|
|
12184
12184
|
to: n.doc.content.size
|
|
12185
12185
|
}), Zf = () => ({ state: n, dispatch: e }) => _u(n, e), Qf = () => ({ state: n, dispatch: e }) => Fu(n, e), eh = () => ({ state: n, dispatch: e }) => Wu(n, e), th = () => ({ state: n, dispatch: e }) => Gu(n, e), nh = () => ({ state: n, dispatch: e }) => Uu(n, e);
|
|
12186
|
-
function
|
|
12186
|
+
function Ho(n, e, t = {}) {
|
|
12187
12187
|
return fn(n, e, { slice: !1, parseOptions: t });
|
|
12188
12188
|
}
|
|
12189
12189
|
const rh = (n, e = !1, t = {}) => ({ tr: r, editor: i, dispatch: s }) => {
|
|
12190
|
-
const { doc: o } = r, l =
|
|
12190
|
+
const { doc: o } = r, l = Ho(n, i.schema, t);
|
|
12191
12191
|
return s && r.replaceWith(0, o.content.size, l).setMeta("preventUpdate", !e), !0;
|
|
12192
12192
|
};
|
|
12193
12193
|
function ih(n, e) {
|
|
@@ -12241,7 +12241,7 @@ function ch(n, e) {
|
|
|
12241
12241
|
};
|
|
12242
12242
|
return Fo(n, t, e);
|
|
12243
12243
|
}
|
|
12244
|
-
function
|
|
12244
|
+
function $o(n, e) {
|
|
12245
12245
|
const t = ze(e, n.schema), { from: r, to: i, empty: s } = n.selection, o = [];
|
|
12246
12246
|
s ? (n.storedMarks && o.push(...n.storedMarks), o.push(...n.selection.$head.marks())) : n.doc.nodesBetween(r, i, (a) => {
|
|
12247
12247
|
o.push(...a.marks);
|
|
@@ -12259,7 +12259,7 @@ function dh(n, e) {
|
|
|
12259
12259
|
}
|
|
12260
12260
|
function uh(n, e) {
|
|
12261
12261
|
const t = Nn(typeof e == "string" ? e : e.name, n.schema);
|
|
12262
|
-
return t === "node" ? dh(n, e) : t === "mark" ?
|
|
12262
|
+
return t === "node" ? dh(n, e) : t === "mark" ? $o(n, e) : {};
|
|
12263
12263
|
}
|
|
12264
12264
|
function fh(n, e = JSON.stringify) {
|
|
12265
12265
|
const t = {};
|
|
@@ -12413,7 +12413,7 @@ const Sh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
12413
12413
|
const { selection: s } = t, { empty: o, ranges: l } = s, a = ze(n, r.schema);
|
|
12414
12414
|
if (i)
|
|
12415
12415
|
if (o) {
|
|
12416
|
-
const c =
|
|
12416
|
+
const c = $o(r, a);
|
|
12417
12417
|
t.addStoredMark(a.create({
|
|
12418
12418
|
...c,
|
|
12419
12419
|
...e
|
|
@@ -12501,17 +12501,17 @@ const Mh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12501
12501
|
if (r) {
|
|
12502
12502
|
let g = b.empty;
|
|
12503
12503
|
const y = l.index(-1) ? 1 : l.index(-2) ? 2 : 3;
|
|
12504
|
-
for (let
|
|
12505
|
-
g = b.from(l.node(
|
|
12504
|
+
for (let V = l.depth - y; V >= l.depth - 3; V -= 1)
|
|
12505
|
+
g = b.from(l.node(V).copy(g));
|
|
12506
12506
|
const C = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, E = Zt(u, l.node().type.name, l.node().attrs), P = ((s = o.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(E)) || void 0;
|
|
12507
12507
|
g = g.append(b.from(o.createAndFill(null, P) || void 0));
|
|
12508
12508
|
const T = l.before(l.depth - (y - 1));
|
|
12509
12509
|
e.replace(T, l.after(-C), new k(g, 4 - y, 0));
|
|
12510
12510
|
let I = -1;
|
|
12511
|
-
e.doc.nodesBetween(T, e.doc.content.size, (
|
|
12511
|
+
e.doc.nodesBetween(T, e.doc.content.size, (V, S) => {
|
|
12512
12512
|
if (I > -1)
|
|
12513
12513
|
return !1;
|
|
12514
|
-
|
|
12514
|
+
V.isTextblock && V.content.size === 0 && (I = S + 1);
|
|
12515
12515
|
}), I > -1 && e.setSelection(A.near(e.doc.resolve(I))), e.scrollIntoView();
|
|
12516
12516
|
}
|
|
12517
12517
|
return !0;
|
|
@@ -12562,8 +12562,8 @@ const Mh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12562
12562
|
return a().command(() => (s.setNodeMarkup(T.pos, h), !0)).command(() => Qn(s, h)).command(() => er(s, h)).run();
|
|
12563
12563
|
}
|
|
12564
12564
|
return !t || !P || !l ? a().command(() => d().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => Qn(s, h)).command(() => er(s, h)).run() : a().command(() => {
|
|
12565
|
-
const I = d().wrapInList(h, r),
|
|
12566
|
-
return s.ensureMarks(
|
|
12565
|
+
const I = d().wrapInList(h, r), V = P.filter((S) => f.includes(S.type.name));
|
|
12566
|
+
return s.ensureMarks(V), I ? !0 : c.clearNodes();
|
|
12567
12567
|
}).wrapInList(h, r).command(() => Qn(s, h)).command(() => er(s, h)).run();
|
|
12568
12568
|
}, Nh = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
|
|
12569
12569
|
const { extendEmptyMarkRange: s = !1 } = t, o = ze(n, r.schema);
|
|
@@ -12662,7 +12662,7 @@ var Fh = /* @__PURE__ */ Object.freeze({
|
|
|
12662
12662
|
joinUp: zf,
|
|
12663
12663
|
joinDown: Vf,
|
|
12664
12664
|
joinBackward: jf,
|
|
12665
|
-
joinForward:
|
|
12665
|
+
joinForward: Hf,
|
|
12666
12666
|
keyboardShortcut: qf,
|
|
12667
12667
|
lift: Kf,
|
|
12668
12668
|
liftEmptyBlock: Wf,
|
|
@@ -12739,7 +12739,7 @@ const zh = fe.create({
|
|
|
12739
12739
|
})
|
|
12740
12740
|
];
|
|
12741
12741
|
}
|
|
12742
|
-
}),
|
|
12742
|
+
}), Hh = fe.create({
|
|
12743
12743
|
name: "keymap",
|
|
12744
12744
|
addKeyboardShortcuts() {
|
|
12745
12745
|
const n = () => this.editor.commands.first(({ commands: o }) => [
|
|
@@ -12814,7 +12814,7 @@ const zh = fe.create({
|
|
|
12814
12814
|
})
|
|
12815
12815
|
];
|
|
12816
12816
|
}
|
|
12817
|
-
}),
|
|
12817
|
+
}), $h = fe.create({
|
|
12818
12818
|
name: "tabindex",
|
|
12819
12819
|
addProseMirrorPlugins() {
|
|
12820
12820
|
return [
|
|
@@ -12833,8 +12833,8 @@ var qh = /* @__PURE__ */ Object.freeze({
|
|
|
12833
12833
|
Commands: zh,
|
|
12834
12834
|
Editable: Vh,
|
|
12835
12835
|
FocusEvents: jh,
|
|
12836
|
-
Keymap:
|
|
12837
|
-
Tabindex:
|
|
12836
|
+
Keymap: Hh,
|
|
12837
|
+
Tabindex: $h
|
|
12838
12838
|
});
|
|
12839
12839
|
const Kh = `.ProseMirror {
|
|
12840
12840
|
position: relative;
|
|
@@ -13053,7 +13053,7 @@ let Jh = class extends rf {
|
|
|
13053
13053
|
* Creates a ProseMirror view.
|
|
13054
13054
|
*/
|
|
13055
13055
|
createView() {
|
|
13056
|
-
const e =
|
|
13056
|
+
const e = Ho(this.options.content, this.schema, this.options.parseOptions), t = Vo(e, this.options.autofocus);
|
|
13057
13057
|
this.view = new Su(this.options.element, {
|
|
13058
13058
|
...this.options.editorProps,
|
|
13059
13059
|
dispatchTransaction: this.dispatchTransaction.bind(this),
|
|
@@ -13216,7 +13216,7 @@ function ts(n) {
|
|
|
13216
13216
|
}
|
|
13217
13217
|
});
|
|
13218
13218
|
}
|
|
13219
|
-
class
|
|
13219
|
+
class Ht {
|
|
13220
13220
|
constructor(e = {}) {
|
|
13221
13221
|
this.type = "mark", this.name = "mark", this.parent = null, this.child = null, this.config = {
|
|
13222
13222
|
name: this.name,
|
|
@@ -13232,7 +13232,7 @@ class $t {
|
|
|
13232
13232
|
})) || {};
|
|
13233
13233
|
}
|
|
13234
13234
|
static create(e = {}) {
|
|
13235
|
-
return new
|
|
13235
|
+
return new Ht(e);
|
|
13236
13236
|
}
|
|
13237
13237
|
configure(e = {}) {
|
|
13238
13238
|
const t = this.extend();
|
|
@@ -13242,7 +13242,7 @@ class $t {
|
|
|
13242
13242
|
})), t;
|
|
13243
13243
|
}
|
|
13244
13244
|
extend(e = {}) {
|
|
13245
|
-
const t = new
|
|
13245
|
+
const t = new Ht(e);
|
|
13246
13246
|
return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = M(x(t, "addOptions", {
|
|
13247
13247
|
name: t.name
|
|
13248
13248
|
})), t.storage = M(x(t, "addStorage", {
|
|
@@ -13438,8 +13438,8 @@ class Yh {
|
|
|
13438
13438
|
getReferenceClientRect: ((h = this.tippyOptions) === null || h === void 0 ? void 0 : h.getReferenceClientRect) || (() => {
|
|
13439
13439
|
if (bh(p.selection)) {
|
|
13440
13440
|
let I = l.nodeDOM(E);
|
|
13441
|
-
const
|
|
13442
|
-
if (
|
|
13441
|
+
const V = I.dataset.nodeViewWrapper ? I : I.querySelector("[data-node-view-wrapper]");
|
|
13442
|
+
if (V && (I = V.firstChild), I)
|
|
13443
13443
|
return I.getBoundingClientRect();
|
|
13444
13444
|
}
|
|
13445
13445
|
return qo(l, E, P);
|
|
@@ -14197,7 +14197,7 @@ const tp = /^```([a-z]+)?[\s\n]$/, np = /^~~~([a-z]+)?[\s\n]$/, rp = we.create({
|
|
|
14197
14197
|
i.push(f);
|
|
14198
14198
|
}
|
|
14199
14199
|
return this.options.includeChildren;
|
|
14200
|
-
}),
|
|
14200
|
+
}), H.create(n, i);
|
|
14201
14201
|
}
|
|
14202
14202
|
}
|
|
14203
14203
|
})
|
|
@@ -14257,11 +14257,11 @@ function Yo({ pluginKey: n = hp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14257
14257
|
view() {
|
|
14258
14258
|
return {
|
|
14259
14259
|
update: async (m, g) => {
|
|
14260
|
-
var y, C, E, P, T, I,
|
|
14261
|
-
const S = (y = this.key) === null || y === void 0 ? void 0 : y.getState(g), j = (C = this.key) === null || C === void 0 ? void 0 : C.getState(m.state), ge = S.active && j.active && S.range.from !== j.range.from, Kt = !S.active && j.active,
|
|
14260
|
+
var y, C, E, P, T, I, V;
|
|
14261
|
+
const S = (y = this.key) === null || y === void 0 ? void 0 : y.getState(g), j = (C = this.key) === null || C === void 0 ? void 0 : C.getState(m.state), ge = S.active && j.active && S.range.from !== j.range.from, Kt = !S.active && j.active, Hr = S.active && !j.active, el = !Kt && !Hr && S.query !== j.query, wt = Kt || ge, Wt = el && !ge, An = Hr || ge;
|
|
14262
14262
|
if (!wt && !Wt && !An)
|
|
14263
14263
|
return;
|
|
14264
|
-
const it = An && !wt ? S : j,
|
|
14264
|
+
const it = An && !wt ? S : j, $r = m.dom.querySelector(`[data-decoration-id="${it.decorationId}"]`);
|
|
14265
14265
|
f = {
|
|
14266
14266
|
editor: e,
|
|
14267
14267
|
range: it.range,
|
|
@@ -14275,10 +14275,10 @@ function Yo({ pluginKey: n = hp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14275
14275
|
props: vt
|
|
14276
14276
|
});
|
|
14277
14277
|
},
|
|
14278
|
-
decorationNode:
|
|
14278
|
+
decorationNode: $r,
|
|
14279
14279
|
// virtual node for popper.js or tippy.js
|
|
14280
14280
|
// this can be used for building popups without a DOM node
|
|
14281
|
-
clientRect:
|
|
14281
|
+
clientRect: $r ? () => {
|
|
14282
14282
|
var vt;
|
|
14283
14283
|
const { decorationId: tl } = (vt = this.key) === null || vt === void 0 ? void 0 : vt.getState(e.state), Dn = m.dom.querySelector(`[data-decoration-id="${tl}"]`);
|
|
14284
14284
|
return (Dn == null ? void 0 : Dn.getBoundingClientRect()) || null;
|
|
@@ -14286,7 +14286,7 @@ function Yo({ pluginKey: n = hp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14286
14286
|
}, wt && ((E = h == null ? void 0 : h.onBeforeStart) === null || E === void 0 || E.call(h, f)), Wt && ((P = h == null ? void 0 : h.onBeforeUpdate) === null || P === void 0 || P.call(h, f)), (Wt || wt) && (f.items = await c({
|
|
14287
14287
|
editor: e,
|
|
14288
14288
|
query: it.query
|
|
14289
|
-
})), An && ((T = h == null ? void 0 : h.onExit) === null || T === void 0 || T.call(h, f)), Wt && ((I = h == null ? void 0 : h.onUpdate) === null || I === void 0 || I.call(h, f)), wt && ((
|
|
14289
|
+
})), An && ((T = h == null ? void 0 : h.onExit) === null || T === void 0 || T.call(h, f)), Wt && ((I = h == null ? void 0 : h.onUpdate) === null || I === void 0 || I.call(h, f)), wt && ((V = h == null ? void 0 : h.onStart) === null || V === void 0 || V.call(h, f));
|
|
14290
14290
|
},
|
|
14291
14291
|
destroy: () => {
|
|
14292
14292
|
var m;
|
|
@@ -14310,9 +14310,9 @@ function Yo({ pluginKey: n = hp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14310
14310
|
},
|
|
14311
14311
|
// Apply changes to the plugin state from a view transaction.
|
|
14312
14312
|
apply(m, g, y, C) {
|
|
14313
|
-
const { isEditable: E } = e, { composing: P } = e.view, { selection: T } = m, { empty: I, from:
|
|
14313
|
+
const { isEditable: E } = e, { composing: P } = e.view, { selection: T } = m, { empty: I, from: V } = T, S = { ...g };
|
|
14314
14314
|
if (S.composing = P, E && (I || e.view.composing)) {
|
|
14315
|
-
(
|
|
14315
|
+
(V < g.range.from || V > g.range.to) && !P && !g.composing && (S.active = !1);
|
|
14316
14316
|
const j = fp({
|
|
14317
14317
|
char: t,
|
|
14318
14318
|
allowSpaces: r,
|
|
@@ -14336,7 +14336,7 @@ function Yo({ pluginKey: n = hp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14336
14336
|
// Setup decorator on the currently active suggestion.
|
|
14337
14337
|
decorations(m) {
|
|
14338
14338
|
const { active: g, range: y, decorationId: C } = p.getState(m);
|
|
14339
|
-
return g ?
|
|
14339
|
+
return g ? H.create(m.doc, [
|
|
14340
14340
|
le.inline(y.from, y.to, {
|
|
14341
14341
|
nodeName: o,
|
|
14342
14342
|
class: l,
|
|
@@ -14423,7 +14423,7 @@ function yp(n, e, t, r, i, s) {
|
|
|
14423
14423
|
kl(G("ul", gp, [
|
|
14424
14424
|
(w(!0), B(hs, null, cs(t.items, (l, a) => (w(), F(o, {
|
|
14425
14425
|
key: l.id,
|
|
14426
|
-
class:
|
|
14426
|
+
class: $([
|
|
14427
14427
|
"dt-suggestion-list--item",
|
|
14428
14428
|
{ "dt-list-item--highlighted": a === i.selectedIndex }
|
|
14429
14429
|
]),
|
|
@@ -14465,7 +14465,7 @@ function kp(n, e, t, r, i, s) {
|
|
|
14465
14465
|
size: "200",
|
|
14466
14466
|
code: t.item.code
|
|
14467
14467
|
}, null, 8, ["code"]),
|
|
14468
|
-
|
|
14468
|
+
$t(" " + Se(t.item.code), 1)
|
|
14469
14469
|
]),
|
|
14470
14470
|
_: 1
|
|
14471
14471
|
});
|
|
@@ -14746,7 +14746,7 @@ function Rp(n) {
|
|
|
14746
14746
|
const _p = {
|
|
14747
14747
|
class: "d-link d-c-text d-d-inline-block",
|
|
14748
14748
|
rel: "noopener noreferrer nofollow"
|
|
14749
|
-
}, Bp =
|
|
14749
|
+
}, Bp = Ht.create({
|
|
14750
14750
|
name: "Link",
|
|
14751
14751
|
renderHTML({ HTMLAttributes: n }) {
|
|
14752
14752
|
return [
|
|
@@ -14889,7 +14889,7 @@ function Vp(n, e, t, r, i, s) {
|
|
|
14889
14889
|
href: null
|
|
14890
14890
|
}, {
|
|
14891
14891
|
default: D(() => [
|
|
14892
|
-
|
|
14892
|
+
$t(Se(s.text), 1)
|
|
14893
14893
|
]),
|
|
14894
14894
|
_: 1
|
|
14895
14895
|
})
|
|
@@ -14897,7 +14897,7 @@ function Vp(n, e, t, r, i, s) {
|
|
|
14897
14897
|
_: 1
|
|
14898
14898
|
});
|
|
14899
14899
|
}
|
|
14900
|
-
const jp = /* @__PURE__ */ q(zp, [["render", Vp]]),
|
|
14900
|
+
const jp = /* @__PURE__ */ q(zp, [["render", Vp]]), Hp = Fp.extend({
|
|
14901
14901
|
addNodeView() {
|
|
14902
14902
|
return Go(jp);
|
|
14903
14903
|
},
|
|
@@ -14935,7 +14935,7 @@ const jp = /* @__PURE__ */ q(zp, [["render", Vp]]), $p = Fp.extend({
|
|
|
14935
14935
|
"start",
|
|
14936
14936
|
"end",
|
|
14937
14937
|
"all"
|
|
14938
|
-
],
|
|
14938
|
+
], $p = {
|
|
14939
14939
|
name: "MentionSuggestion",
|
|
14940
14940
|
components: {
|
|
14941
14941
|
DtAvatar: Jl,
|
|
@@ -14968,12 +14968,12 @@ function qp(n, e, t, r, i, s) {
|
|
|
14968
14968
|
"image-src": s.avatarSrc,
|
|
14969
14969
|
size: "xs"
|
|
14970
14970
|
}, null, 8, ["full-name", "image-src"]),
|
|
14971
|
-
|
|
14971
|
+
$t(" " + Se(s.name), 1)
|
|
14972
14972
|
]),
|
|
14973
14973
|
_: 1
|
|
14974
14974
|
});
|
|
14975
14975
|
}
|
|
14976
|
-
const Kp = /* @__PURE__ */ q(
|
|
14976
|
+
const Kp = /* @__PURE__ */ q($p, [["render", qp]]), Wp = {
|
|
14977
14977
|
// This function comes from the user and passed to the editor directly.
|
|
14978
14978
|
// This will also activate the mention plugin on the editor
|
|
14979
14979
|
// items: ({ query }) => { return [] },
|
|
@@ -15168,7 +15168,7 @@ const Jp = {
|
|
|
15168
15168
|
})
|
|
15169
15169
|
), this.mentionSuggestion) {
|
|
15170
15170
|
const e = { ...this.mentionSuggestion, ...Wp };
|
|
15171
|
-
n.push(
|
|
15171
|
+
n.push(Hp.configure({ suggestion: e }));
|
|
15172
15172
|
}
|
|
15173
15173
|
return n.push(Tp), n;
|
|
15174
15174
|
},
|
|
@@ -15281,7 +15281,7 @@ const Yp = {
|
|
|
15281
15281
|
DtIcon: nt,
|
|
15282
15282
|
DtInput: Tl,
|
|
15283
15283
|
DtNotice: Wa,
|
|
15284
|
-
DtPopover:
|
|
15284
|
+
DtPopover: $a,
|
|
15285
15285
|
DtRichTextEditor: Gp,
|
|
15286
15286
|
DtTooltip: fl
|
|
15287
15287
|
},
|
|
@@ -15394,6 +15394,13 @@ const Yp = {
|
|
|
15394
15394
|
type: Number,
|
|
15395
15395
|
default: 500
|
|
15396
15396
|
},
|
|
15397
|
+
/**
|
|
15398
|
+
* Character limit warning message
|
|
15399
|
+
*/
|
|
15400
|
+
characterLimitWarningMessage: {
|
|
15401
|
+
type: String,
|
|
15402
|
+
default: ""
|
|
15403
|
+
},
|
|
15397
15404
|
// Error related props
|
|
15398
15405
|
/**
|
|
15399
15406
|
* Show error notice
|
|
@@ -15626,7 +15633,7 @@ function om(n, e, t, r, i, s) {
|
|
|
15626
15633
|
t.showNotice ? (w(), F(l, {
|
|
15627
15634
|
key: 0,
|
|
15628
15635
|
"data-qa": "dt-message-input-error-notice",
|
|
15629
|
-
class:
|
|
15636
|
+
class: $(s.noticeClasses),
|
|
15630
15637
|
kind: t.noticeKind,
|
|
15631
15638
|
"close-button-props": s.computedCloseButtonProps,
|
|
15632
15639
|
onClose: s.noticeClose
|
|
@@ -15638,15 +15645,15 @@ function om(n, e, t, r, i, s) {
|
|
|
15638
15645
|
})
|
|
15639
15646
|
]),
|
|
15640
15647
|
default: D(() => [
|
|
15641
|
-
|
|
15648
|
+
$t(Se(t.noticeMessage) + " ", 1)
|
|
15642
15649
|
]),
|
|
15643
15650
|
_: 1
|
|
15644
|
-
}, 8, ["class", "kind", "close-button-props", "onClose"])) :
|
|
15651
|
+
}, 8, ["class", "kind", "close-button-props", "onClose"])) : z("", !0),
|
|
15645
15652
|
G("div", Xp, [
|
|
15646
15653
|
G("div", {
|
|
15647
15654
|
"data-qa": "dt-message-input",
|
|
15648
15655
|
role: "presentation",
|
|
15649
|
-
class:
|
|
15656
|
+
class: $(["d-d-flex d-fd-column d-bar8 d-baw1 d-ba d-c-text", { "d-bc-black-500 d-bs-sm": i.hasFocus, "d-bc-default": !i.hasFocus }]),
|
|
15650
15657
|
onClick: e[17] || (e[17] = (p) => n.$refs.richTextEditor.focusEditor()),
|
|
15651
15658
|
onDragEnter: e[18] || (e[18] = (...p) => s.onDrag && s.onDrag(...p)),
|
|
15652
15659
|
onDragOver: e[19] || (e[19] = (...p) => s.onDrag && s.onDrag(...p)),
|
|
@@ -15771,7 +15778,18 @@ function om(n, e, t, r, i, s) {
|
|
|
15771
15778
|
}, 8, ["open"])
|
|
15772
15779
|
]),
|
|
15773
15780
|
G("div", tm, [
|
|
15774
|
-
s.displayCharacterLimitWarning ? (w(),
|
|
15781
|
+
s.displayCharacterLimitWarning ? (w(), F(u, {
|
|
15782
|
+
key: 0,
|
|
15783
|
+
enabled: t.characterLimitWarningMessage && t.characterLimitCount - s.inputLength < 0,
|
|
15784
|
+
placement: "top-end",
|
|
15785
|
+
message: t.characterLimitWarningMessage,
|
|
15786
|
+
offset: [10, -8]
|
|
15787
|
+
}, {
|
|
15788
|
+
anchor: D(() => [
|
|
15789
|
+
s.displayCharacterLimitWarning ? (w(), B("p", nm, Se(t.characterLimitCount - s.inputLength), 1)) : z("", !0)
|
|
15790
|
+
]),
|
|
15791
|
+
_: 1
|
|
15792
|
+
}, 8, ["enabled", "message"])) : z("", !0),
|
|
15775
15793
|
_(u, {
|
|
15776
15794
|
placement: "top-end",
|
|
15777
15795
|
message: t.sendTooltipLabel,
|
|
@@ -15785,7 +15803,7 @@ function om(n, e, t, r, i, s) {
|
|
|
15785
15803
|
kind: s.isSendDisabled ? "muted" : "default",
|
|
15786
15804
|
circle: "",
|
|
15787
15805
|
importance: "primary",
|
|
15788
|
-
class:
|
|
15806
|
+
class: $({
|
|
15789
15807
|
"message-input-button__disabled d-fc-muted": s.isSendDisabled
|
|
15790
15808
|
}),
|
|
15791
15809
|
"aria-label": t.sendButtonAriaLabel,
|
|
@@ -15834,7 +15852,7 @@ export {
|
|
|
15834
15852
|
ua as b,
|
|
15835
15853
|
ba as c,
|
|
15836
15854
|
Na as d,
|
|
15837
|
-
|
|
15855
|
+
$a as e,
|
|
15838
15856
|
gs as f,
|
|
15839
15857
|
Ia as g,
|
|
15840
15858
|
Jl as h,
|