@dialpad/dialtone-vue 3.95.1 → 3.96.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 +24 -0
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.cjs +3 -3
- package/dist/dialtone-vue.js +57 -56
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +1 -1
- package/dist/emoji-5anz0QgY.cjs +1 -0
- package/dist/{emoji-bI5MJWZH.js → emoji-zsImd-qD.js} +24 -24
- package/dist/emoji.cjs +1 -1
- package/dist/emoji.js +3 -3
- package/dist/{message_input-r_-Jg43r.cjs → message_input-SgLogXZ3.cjs} +16 -16
- package/dist/{message_input-KktXM8gs.js → message_input-zOYCybPr.js} +202 -208
- package/dist/message_input.cjs +1 -1
- package/dist/message_input.js +3 -3
- package/dist/style.css +1 -1
- package/dist/{tooltip_constants-mcMQGvF_.cjs → tooltip-3LC0ejIh.cjs} +1 -1
- package/dist/{tooltip_constants-pAtd8bjI.js → tooltip-laZwfd56.js} +31 -31
- package/dist/types/components/collapsible/collapsible_lazy_show.vue.d.ts.map +1 -1
- package/dist/types/components/emoji_picker/composables/useKeyboardNavigation.d.ts.map +1 -1
- package/dist/types/components/notice/index.d.ts +1 -1
- package/dist/types/components/scroller/modules/core_scroller.vue.d.ts.map +1 -1
- package/dist/types/components/scroller/modules/scroller_item.vue.d.ts.map +1 -1
- package/dist/types/components/tooltip/index.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.vue.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/types/components/tooltip/tooltip_constants.d.ts +8 -0
- package/dist/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +1 -1
- package/dist/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +15 -47
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/callbox/callbox.vue.d.ts +2 -2
- package/dist/types/recipes/list_items/contact_info/contact_info.vue.d.ts +1 -1
- package/package.json +2 -2
- package/dist/emoji-ujF0T0kZ.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as q, g as tr, p as rl, h as fn, u as il, q as sl, a as ol, r as ll, t as al, v as cl, w as pn, x as dl, y as ul, D as hl } from "./
|
|
2
|
-
import { openBlock as w, createElementBlock as B, toDisplayString as ue, createCommentVNode as _, createElementVNode as G, normalizeClass as $, resolveComponent as A, createBlock as L, resolveDynamicComponent as Xe, withCtx as O, mergeProps as
|
|
3
|
-
import { D as
|
|
1
|
+
import { _ as q, g as tr, p as rl, h as fn, u as il, q as sl, a as ol, r as ll, t as al, v as cl, w as pn, x as dl, y as ul, D as hl } from "./tooltip-laZwfd56.js";
|
|
2
|
+
import { openBlock as w, createElementBlock as B, toDisplayString as ue, createCommentVNode as _, createElementVNode as G, normalizeClass as $, resolveComponent as A, createBlock as L, resolveDynamicComponent as Xe, withCtx as O, mergeProps as Ze, renderSlot as z, createVNode as F, createTextVNode as $t, withKeys as Ve, withModifiers as ut, toHandlers as as, createSlots as cs, renderList as ds, Teleport as us, defineComponent as xt, ref as mn, onMounted as hs, onBeforeUnmount as xr, h as Ke, getCurrentInstance as fl, watchEffect as pl, nextTick as ml, unref as gl, markRaw as gn, reactive as fs, provide as qr, customRef as yl, withDirectives as bl, Fragment as ps, vShow as kl, normalizeStyle as Sl } from "vue";
|
|
3
|
+
import { D as rt, y as xl, b as yn, L as wl, j as Cl, g as ms, a5 as vl, a0 as El, a3 as gs, _ as Ml, f as Ol } from "./emoji-zsImd-qD.js";
|
|
4
4
|
const Ot = {
|
|
5
5
|
BUSY: "busy",
|
|
6
6
|
AWAY: "away",
|
|
@@ -645,7 +645,7 @@ const Vl = (n) => {
|
|
|
645
645
|
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("");
|
|
646
646
|
}, jl = zl(), Hl = {
|
|
647
647
|
name: "DtAvatar",
|
|
648
|
-
components: { DtPresence: Pl, DtIcon:
|
|
648
|
+
components: { DtPresence: Pl, DtIcon: rt },
|
|
649
649
|
inheritAttrs: !1,
|
|
650
650
|
props: {
|
|
651
651
|
/**
|
|
@@ -955,7 +955,7 @@ function Wl(n, e, t, r, i, s) {
|
|
|
955
955
|
}, null, 8, ["name"])) : t.overlayText ? (w(), B("p", ql, ue(t.overlayText), 1)) : _("", !0)
|
|
956
956
|
], 2)) : _("", !0),
|
|
957
957
|
s.showGroup ? (w(), B("span", Kl, ue(s.formattedGroup), 1)) : _("", !0),
|
|
958
|
-
t.presence && !s.showGroup ? (w(), L(l,
|
|
958
|
+
t.presence && !s.showGroup ? (w(), L(l, Ze({
|
|
959
959
|
key: 2,
|
|
960
960
|
presence: t.presence,
|
|
961
961
|
class: [
|
|
@@ -976,7 +976,7 @@ const Jl = /* @__PURE__ */ q(Hl, [["render", Wl]]), wr = ["base", "error", "info
|
|
|
976
976
|
]), Yl = {
|
|
977
977
|
name: "DtNoticeIcon",
|
|
978
978
|
components: {
|
|
979
|
-
DtIcon:
|
|
979
|
+
DtIcon: rt
|
|
980
980
|
},
|
|
981
981
|
props: {
|
|
982
982
|
/**
|
|
@@ -1116,7 +1116,7 @@ const sa = /* @__PURE__ */ q(ea, [["render", ia]]), Cr = {
|
|
|
1116
1116
|
}, oa = {
|
|
1117
1117
|
name: "SrOnlyCloseButton",
|
|
1118
1118
|
components: {
|
|
1119
|
-
DtIcon:
|
|
1119
|
+
DtIcon: rt,
|
|
1120
1120
|
DtButton: yn
|
|
1121
1121
|
},
|
|
1122
1122
|
props: {
|
|
@@ -1144,7 +1144,7 @@ function la(n, e, t, r, i, s) {
|
|
|
1144
1144
|
class: "d-vi-visible-sr",
|
|
1145
1145
|
"aria-label": t.visuallyHiddenCloseLabel,
|
|
1146
1146
|
onClick: s.close,
|
|
1147
|
-
onKeydown: Ve(
|
|
1147
|
+
onKeydown: Ve(ut(s.close, ["prevent", "stop"]), ["space"])
|
|
1148
1148
|
}, {
|
|
1149
1149
|
default: O(() => [
|
|
1150
1150
|
F(o, { name: "close" })
|
|
@@ -1155,7 +1155,7 @@ function la(n, e, t, r, i, s) {
|
|
|
1155
1155
|
const ys = /* @__PURE__ */ q(oa, [["render", la]]), aa = {
|
|
1156
1156
|
name: "DtNoticeAction",
|
|
1157
1157
|
components: {
|
|
1158
|
-
DtIcon:
|
|
1158
|
+
DtIcon: rt,
|
|
1159
1159
|
DtButton: yn,
|
|
1160
1160
|
SrOnlyCloseButton: ys
|
|
1161
1161
|
},
|
|
@@ -1208,7 +1208,7 @@ function da(n, e, t, r, i, s) {
|
|
|
1208
1208
|
const o = A("dt-icon"), l = A("dt-button"), a = A("sr-only-close-button");
|
|
1209
1209
|
return w(), B("div", ca, [
|
|
1210
1210
|
z(n.$slots, "default"),
|
|
1211
|
-
t.hideClose ? _("", !0) : (w(), L(l,
|
|
1211
|
+
t.hideClose ? _("", !0) : (w(), L(l, Ze({
|
|
1212
1212
|
key: 0,
|
|
1213
1213
|
ref: "closeButton",
|
|
1214
1214
|
"data-qa": "dt-notice-action-close-button",
|
|
@@ -1561,7 +1561,7 @@ const Jr = /* @__PURE__ */ q(wa, [["render", Na], ["__scopeId", "data-v-9afad3c4
|
|
|
1561
1561
|
name: "DtListItem",
|
|
1562
1562
|
components: {
|
|
1563
1563
|
DtItemLayout: Jr,
|
|
1564
|
-
DtIcon:
|
|
1564
|
+
DtIcon: rt
|
|
1565
1565
|
},
|
|
1566
1566
|
/**
|
|
1567
1567
|
* Value provided from keyboard_list_navigation.js using id prop.
|
|
@@ -1710,7 +1710,7 @@ const Jr = /* @__PURE__ */ q(wa, [["render", Na], ["__scopeId", "data-v-9afad3c4
|
|
|
1710
1710
|
};
|
|
1711
1711
|
function Da(n, e, t, r, i, s) {
|
|
1712
1712
|
const o = A("dt-icon");
|
|
1713
|
-
return w(), L(Xe(t.elementType),
|
|
1713
|
+
return w(), L(Xe(t.elementType), Ze({
|
|
1714
1714
|
id: t.id,
|
|
1715
1715
|
class: ["dt-list-item", {
|
|
1716
1716
|
"dt-list-item--focusable": s.isFocusable,
|
|
@@ -1745,7 +1745,7 @@ function Da(n, e, t, r, i, s) {
|
|
|
1745
1745
|
_: 3
|
|
1746
1746
|
}, 16, ["id", "class", "tabindex", "role", "aria-selected"]);
|
|
1747
1747
|
}
|
|
1748
|
-
const Ia = /* @__PURE__ */ q(Aa, [["render", Da]]),
|
|
1748
|
+
const Ia = /* @__PURE__ */ q(Aa, [["render", Da]]), Qe = {
|
|
1749
1749
|
default: "column",
|
|
1750
1750
|
column: "column",
|
|
1751
1751
|
row: "row",
|
|
@@ -1767,7 +1767,7 @@ const Ia = /* @__PURE__ */ q(Aa, [["render", Da]]), Ze = {
|
|
|
1767
1767
|
name: "PopoverHeaderFooter",
|
|
1768
1768
|
components: {
|
|
1769
1769
|
DtButton: yn,
|
|
1770
|
-
DtIcon:
|
|
1770
|
+
DtIcon: rt
|
|
1771
1771
|
},
|
|
1772
1772
|
props: {
|
|
1773
1773
|
// eslint-disable-next-line vue/require-default-prop
|
|
@@ -1840,7 +1840,7 @@ function Va(n, e, t, r, i, s) {
|
|
|
1840
1840
|
}, [
|
|
1841
1841
|
z(n.$slots, "content")
|
|
1842
1842
|
], 2)) : _("", !0),
|
|
1843
|
-
t.showCloseButton ? (w(), L(l,
|
|
1843
|
+
t.showCloseButton ? (w(), L(l, Ze({
|
|
1844
1844
|
key: 1,
|
|
1845
1845
|
ref: "popover__close-button",
|
|
1846
1846
|
"data-qa": "dt-popover-close",
|
|
@@ -2460,7 +2460,7 @@ function Ka(n, e, t, r, i, s) {
|
|
|
2460
2460
|
G("div", {
|
|
2461
2461
|
class: "d-modal--transparent",
|
|
2462
2462
|
"aria-hidden": t.modal && i.isOpen ? "false" : "true",
|
|
2463
|
-
onClick: e[0] || (e[0] =
|
|
2463
|
+
onClick: e[0] || (e[0] = ut(() => {
|
|
2464
2464
|
}, ["prevent", "stop"]))
|
|
2465
2465
|
}, null, 8, $a)
|
|
2466
2466
|
])) : _("", !0),
|
|
@@ -2478,8 +2478,8 @@ function Ka(n, e, t, r, i, s) {
|
|
|
2478
2478
|
onClickCapture: e[1] || (e[1] = (...c) => s.defaultToggleOpen && s.defaultToggleOpen(...c)),
|
|
2479
2479
|
onContextmenu: e[2] || (e[2] = (...c) => s.onContext && s.onContext(...c)),
|
|
2480
2480
|
onKeydown: [
|
|
2481
|
-
e[3] || (e[3] = Ve(
|
|
2482
|
-
e[4] || (e[4] = Ve(
|
|
2481
|
+
e[3] || (e[3] = Ve(ut((...c) => s.onArrowKeyPress && s.onArrowKeyPress(...c), ["prevent"]), ["up"])),
|
|
2482
|
+
e[4] || (e[4] = Ve(ut((...c) => s.onArrowKeyPress && s.onArrowKeyPress(...c), ["prevent"]), ["down"])),
|
|
2483
2483
|
e[6] || (e[6] = Ve((c) => n.$emit("keydown", c), ["enter"])),
|
|
2484
2484
|
e[7] || (e[7] = Ve((c) => n.$emit("keydown", c), ["space"]))
|
|
2485
2485
|
],
|
|
@@ -2493,7 +2493,7 @@ function Ka(n, e, t, r, i, s) {
|
|
|
2493
2493
|
}
|
|
2494
2494
|
})
|
|
2495
2495
|
], 40, qa),
|
|
2496
|
-
F(a,
|
|
2496
|
+
F(a, Ze({
|
|
2497
2497
|
id: t.id,
|
|
2498
2498
|
ref: "content",
|
|
2499
2499
|
role: t.role,
|
|
@@ -2567,14 +2567,14 @@ function Ka(n, e, t, r, i, s) {
|
|
|
2567
2567
|
}
|
|
2568
2568
|
const Wa = /* @__PURE__ */ q(Ha, [["render", Ka]]);
|
|
2569
2569
|
function Gr(n) {
|
|
2570
|
-
return n ===
|
|
2570
|
+
return n === Qe.default;
|
|
2571
2571
|
}
|
|
2572
2572
|
function Yr(n) {
|
|
2573
2573
|
if (Bt(n) === "string")
|
|
2574
|
-
return Gr(n) ? null :
|
|
2574
|
+
return Gr(n) ? null : Qe[n];
|
|
2575
2575
|
if (Bt(n) === "object") {
|
|
2576
2576
|
const { default: e } = n;
|
|
2577
|
-
return Gr(e) ? null :
|
|
2577
|
+
return Gr(e) ? null : Qe[e];
|
|
2578
2578
|
} else
|
|
2579
2579
|
return null;
|
|
2580
2580
|
}
|
|
@@ -2582,7 +2582,7 @@ function Bt(n) {
|
|
|
2582
2582
|
return typeof n;
|
|
2583
2583
|
}
|
|
2584
2584
|
function Ja(n) {
|
|
2585
|
-
return Yr(n) ? `d-stack--${
|
|
2585
|
+
return Yr(n) ? `d-stack--${Qe[Yr(n)]}` : null;
|
|
2586
2586
|
}
|
|
2587
2587
|
function Ua(n) {
|
|
2588
2588
|
return Bt(n) === "object" ? [
|
|
@@ -2594,10 +2594,10 @@ function Ga(n) {
|
|
|
2594
2594
|
}
|
|
2595
2595
|
function Ya(n) {
|
|
2596
2596
|
if (Bt(n) === "string")
|
|
2597
|
-
return Object.keys(
|
|
2597
|
+
return Object.keys(Qe).includes(n);
|
|
2598
2598
|
if (Bt(n) === "object") {
|
|
2599
2599
|
const { default: e } = n;
|
|
2600
|
-
return Object.keys(
|
|
2600
|
+
return Object.keys(Qe).includes(e);
|
|
2601
2601
|
} else
|
|
2602
2602
|
return null;
|
|
2603
2603
|
}
|
|
@@ -2639,7 +2639,7 @@ const Za = {
|
|
|
2639
2639
|
},
|
|
2640
2640
|
data() {
|
|
2641
2641
|
return {
|
|
2642
|
-
DT_STACK_DIRECTION:
|
|
2642
|
+
DT_STACK_DIRECTION: Qe,
|
|
2643
2643
|
DT_STACK_GAP: vr,
|
|
2644
2644
|
DT_STACK_RESPONSIVE_BREAKPOINTS: ks
|
|
2645
2645
|
};
|
|
@@ -4067,7 +4067,7 @@ function Ts(n, e) {
|
|
|
4067
4067
|
e = n[t].type.name + "(" + e + ")";
|
|
4068
4068
|
return e;
|
|
4069
4069
|
}
|
|
4070
|
-
class
|
|
4070
|
+
class et {
|
|
4071
4071
|
/**
|
|
4072
4072
|
@internal
|
|
4073
4073
|
*/
|
|
@@ -4080,7 +4080,7 @@ class Qe {
|
|
|
4080
4080
|
static parse(e, t) {
|
|
4081
4081
|
let r = new ic(e, t);
|
|
4082
4082
|
if (r.next == null)
|
|
4083
|
-
return
|
|
4083
|
+
return et.empty;
|
|
4084
4084
|
let i = Ns(r);
|
|
4085
4085
|
r.next && r.err("Unexpected trailing text");
|
|
4086
4086
|
let s = uc(dc(i));
|
|
@@ -4229,7 +4229,7 @@ class Qe {
|
|
|
4229
4229
|
`);
|
|
4230
4230
|
}
|
|
4231
4231
|
}
|
|
4232
|
-
|
|
4232
|
+
et.empty = new et(!0);
|
|
4233
4233
|
class ic {
|
|
4234
4234
|
constructor(e, t) {
|
|
4235
4235
|
this.string = e, this.nodeTypes = t, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
|
|
@@ -4392,7 +4392,7 @@ function uc(n) {
|
|
|
4392
4392
|
});
|
|
4393
4393
|
});
|
|
4394
4394
|
});
|
|
4395
|
-
let s = e[r.join(",")] = new
|
|
4395
|
+
let s = e[r.join(",")] = new et(r.indexOf(n.length - 1) > -1);
|
|
4396
4396
|
for (let o = 0; o < i.length; o++) {
|
|
4397
4397
|
let l = i[o][1].sort(As);
|
|
4398
4398
|
s.next.push({ type: i[o][0], next: e[l.join(",")] || t(l) });
|
|
@@ -4466,7 +4466,7 @@ let Qr = class Rs {
|
|
|
4466
4466
|
True for node types that allow no content.
|
|
4467
4467
|
*/
|
|
4468
4468
|
get isLeaf() {
|
|
4469
|
-
return this.contentMatch ==
|
|
4469
|
+
return this.contentMatch == et.empty;
|
|
4470
4470
|
}
|
|
4471
4471
|
/**
|
|
4472
4472
|
True when this node is an atom, i.e. when it does not have
|
|
@@ -4680,7 +4680,7 @@ class pc {
|
|
|
4680
4680
|
if (i in this.marks)
|
|
4681
4681
|
throw new RangeError(i + " can not be both a node and a mark");
|
|
4682
4682
|
let s = this.nodes[i], o = s.spec.content || "", l = s.spec.marks;
|
|
4683
|
-
s.contentMatch = r[o] || (r[o] =
|
|
4683
|
+
s.contentMatch = r[o] || (r[o] = et.parse(o, this.nodes)), s.inlineContent = s.contentMatch.inlineContent, s.markSet = l == "_" ? null : l ? ei(this, l.split(" ")) : l == "" || !s.inlineContent ? [] : null;
|
|
4684
4684
|
}
|
|
4685
4685
|
for (let i in this.marks) {
|
|
4686
4686
|
let s = this.marks[i], o = s.spec.excludes;
|
|
@@ -4758,7 +4758,7 @@ function ei(n, e) {
|
|
|
4758
4758
|
}
|
|
4759
4759
|
return t;
|
|
4760
4760
|
}
|
|
4761
|
-
class
|
|
4761
|
+
class mt {
|
|
4762
4762
|
/**
|
|
4763
4763
|
Create a parser that targets the given schema, using the given
|
|
4764
4764
|
parsing rules.
|
|
@@ -4863,7 +4863,7 @@ class pt {
|
|
|
4863
4863
|
[priority](https://prosemirror.net/docs/ref/#model.ParseRule.priority).
|
|
4864
4864
|
*/
|
|
4865
4865
|
static fromSchema(e) {
|
|
4866
|
-
return e.cached.domParser || (e.cached.domParser = new
|
|
4866
|
+
return e.cached.domParser || (e.cached.domParser = new mt(e, mt.schemaRules(e)));
|
|
4867
4867
|
}
|
|
4868
4868
|
}
|
|
4869
4869
|
const _s = {
|
|
@@ -5874,7 +5874,7 @@ class De extends ie {
|
|
|
5874
5874
|
return new De(this.pos, this.mark);
|
|
5875
5875
|
}
|
|
5876
5876
|
}
|
|
5877
|
-
return new
|
|
5877
|
+
return new gt(this.pos, this.mark);
|
|
5878
5878
|
}
|
|
5879
5879
|
map(e) {
|
|
5880
5880
|
let t = e.mapResult(this.pos, 1);
|
|
@@ -5893,7 +5893,7 @@ class De extends ie {
|
|
|
5893
5893
|
}
|
|
5894
5894
|
}
|
|
5895
5895
|
ie.jsonID("addNodeMark", De);
|
|
5896
|
-
class
|
|
5896
|
+
class gt extends ie {
|
|
5897
5897
|
/**
|
|
5898
5898
|
Create a mark-removing step.
|
|
5899
5899
|
*/
|
|
@@ -5913,7 +5913,7 @@ class mt extends ie {
|
|
|
5913
5913
|
}
|
|
5914
5914
|
map(e) {
|
|
5915
5915
|
let t = e.mapResult(this.pos, 1);
|
|
5916
|
-
return t.deletedAfter ? null : new
|
|
5916
|
+
return t.deletedAfter ? null : new gt(t.pos, this.mark);
|
|
5917
5917
|
}
|
|
5918
5918
|
toJSON() {
|
|
5919
5919
|
return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
@@ -5924,10 +5924,10 @@ class mt extends ie {
|
|
|
5924
5924
|
static fromJSON(e, t) {
|
|
5925
5925
|
if (typeof t.pos != "number")
|
|
5926
5926
|
throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
|
|
5927
|
-
return new
|
|
5927
|
+
return new gt(t.pos, e.markFromJSON(t.mark));
|
|
5928
5928
|
}
|
|
5929
5929
|
}
|
|
5930
|
-
ie.jsonID("removeNodeMark",
|
|
5930
|
+
ie.jsonID("removeNodeMark", gt);
|
|
5931
5931
|
class Z extends ie {
|
|
5932
5932
|
/**
|
|
5933
5933
|
The given `slice` should fit the 'gap' between `from` and
|
|
@@ -6199,7 +6199,7 @@ function Pc(n, e, t, r, i) {
|
|
|
6199
6199
|
throw new RangeError("Invalid content for node type " + t.name);
|
|
6200
6200
|
n.step(new W(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new k(b.from(o), 0, 0), 1, !0));
|
|
6201
6201
|
}
|
|
6202
|
-
function
|
|
6202
|
+
function ht(n, e, t = 1, r) {
|
|
6203
6203
|
let i = n.resolve(e), s = i.depth - t, o = r && r[r.length - 1] || i.parent;
|
|
6204
6204
|
if (s < 0 || i.parent.type.spec.isolating || !i.parent.canReplace(i.index(), i.parent.childCount) || !o.type.validContent(i.parent.content.cutByIndex(i.index(), i.parent.childCount)))
|
|
6205
6205
|
return !1;
|
|
@@ -6223,7 +6223,7 @@ function Rc(n, e, t = 1, r) {
|
|
|
6223
6223
|
}
|
|
6224
6224
|
n.step(new Z(e, e, new k(s.append(o), t, t), !0));
|
|
6225
6225
|
}
|
|
6226
|
-
function
|
|
6226
|
+
function it(n, e) {
|
|
6227
6227
|
let t = n.resolve(e), r = t.index();
|
|
6228
6228
|
return $s(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
|
|
6229
6229
|
}
|
|
@@ -6567,7 +6567,7 @@ function Us(n, e) {
|
|
|
6567
6567
|
}
|
|
6568
6568
|
return t;
|
|
6569
6569
|
}
|
|
6570
|
-
class
|
|
6570
|
+
class ft extends ie {
|
|
6571
6571
|
/**
|
|
6572
6572
|
Construct an attribute step.
|
|
6573
6573
|
*/
|
|
@@ -6589,11 +6589,11 @@ class ht extends ie {
|
|
|
6589
6589
|
return de.empty;
|
|
6590
6590
|
}
|
|
6591
6591
|
invert(e) {
|
|
6592
|
-
return new
|
|
6592
|
+
return new ft(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
|
|
6593
6593
|
}
|
|
6594
6594
|
map(e) {
|
|
6595
6595
|
let t = e.mapResult(this.pos, 1);
|
|
6596
|
-
return t.deletedAfter ? null : new
|
|
6596
|
+
return t.deletedAfter ? null : new ft(t.pos, this.attr, this.value);
|
|
6597
6597
|
}
|
|
6598
6598
|
toJSON() {
|
|
6599
6599
|
return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
|
|
@@ -6601,19 +6601,19 @@ class ht extends ie {
|
|
|
6601
6601
|
static fromJSON(e, t) {
|
|
6602
6602
|
if (typeof t.pos != "number" || typeof t.attr != "string")
|
|
6603
6603
|
throw new RangeError("Invalid input for AttrStep.fromJSON");
|
|
6604
|
-
return new
|
|
6604
|
+
return new ft(t.pos, t.attr, t.value);
|
|
6605
6605
|
}
|
|
6606
6606
|
}
|
|
6607
|
-
ie.jsonID("attr",
|
|
6608
|
-
let
|
|
6607
|
+
ie.jsonID("attr", ft);
|
|
6608
|
+
let yt = class extends Error {
|
|
6609
6609
|
};
|
|
6610
|
-
|
|
6610
|
+
yt = function n(e) {
|
|
6611
6611
|
let t = Error.call(this, e);
|
|
6612
6612
|
return t.__proto__ = n.prototype, t;
|
|
6613
6613
|
};
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6614
|
+
yt.prototype = Object.create(Error.prototype);
|
|
6615
|
+
yt.prototype.constructor = yt;
|
|
6616
|
+
yt.prototype.name = "TransformError";
|
|
6617
6617
|
class Gs {
|
|
6618
6618
|
/**
|
|
6619
6619
|
Create a transform that starts with the given document.
|
|
@@ -6634,7 +6634,7 @@ class Gs {
|
|
|
6634
6634
|
step(e) {
|
|
6635
6635
|
let t = this.maybeStep(e);
|
|
6636
6636
|
if (t.failed)
|
|
6637
|
-
throw new
|
|
6637
|
+
throw new yt(t.failed);
|
|
6638
6638
|
return this;
|
|
6639
6639
|
}
|
|
6640
6640
|
/**
|
|
@@ -6769,7 +6769,7 @@ class Gs {
|
|
|
6769
6769
|
Set a single attribute on a given node to a new value.
|
|
6770
6770
|
*/
|
|
6771
6771
|
setNodeAttribute(e, t, r) {
|
|
6772
|
-
return this.step(new
|
|
6772
|
+
return this.step(new ft(e, t, r)), this;
|
|
6773
6773
|
}
|
|
6774
6774
|
/**
|
|
6775
6775
|
Add a mark to the node at position `pos`.
|
|
@@ -6789,7 +6789,7 @@ class Gs {
|
|
|
6789
6789
|
if (t = t.isInSet(r.marks), !t)
|
|
6790
6790
|
return this;
|
|
6791
6791
|
}
|
|
6792
|
-
return this.step(new
|
|
6792
|
+
return this.step(new gt(e, t)), this;
|
|
6793
6793
|
}
|
|
6794
6794
|
/**
|
|
6795
6795
|
Split the node at the given position, and optionally, if `depth` is
|
|
@@ -6921,11 +6921,11 @@ class T {
|
|
|
6921
6921
|
found.
|
|
6922
6922
|
*/
|
|
6923
6923
|
static findFrom(e, t, r = !1) {
|
|
6924
|
-
let i = e.parent.inlineContent ? new D(e) :
|
|
6924
|
+
let i = e.parent.inlineContent ? new D(e) : lt(e.node(0), e.parent, e.pos, e.index(), t, r);
|
|
6925
6925
|
if (i)
|
|
6926
6926
|
return i;
|
|
6927
6927
|
for (let s = e.depth - 1; s >= 0; s--) {
|
|
6928
|
-
let o = t < 0 ?
|
|
6928
|
+
let o = t < 0 ? lt(e.node(0), e.node(s), e.before(s + 1), e.index(s), t, r) : lt(e.node(0), e.node(s), e.after(s + 1), e.index(s) + 1, t, r);
|
|
6929
6929
|
if (o)
|
|
6930
6930
|
return o;
|
|
6931
6931
|
}
|
|
@@ -6946,14 +6946,14 @@ class T {
|
|
|
6946
6946
|
exists.
|
|
6947
6947
|
*/
|
|
6948
6948
|
static atStart(e) {
|
|
6949
|
-
return
|
|
6949
|
+
return lt(e, e, 0, 0, 1) || new me(e);
|
|
6950
6950
|
}
|
|
6951
6951
|
/**
|
|
6952
6952
|
Find the cursor or leaf node selection closest to the end of the
|
|
6953
6953
|
given document.
|
|
6954
6954
|
*/
|
|
6955
6955
|
static atEnd(e) {
|
|
6956
|
-
return
|
|
6956
|
+
return lt(e, e, e.content.size, e.childCount, -1) || new me(e);
|
|
6957
6957
|
}
|
|
6958
6958
|
/**
|
|
6959
6959
|
Deserialize the JSON representation of a selection. Must be
|
|
@@ -7192,7 +7192,7 @@ const Kc = {
|
|
|
7192
7192
|
return new me(n);
|
|
7193
7193
|
}
|
|
7194
7194
|
};
|
|
7195
|
-
function
|
|
7195
|
+
function lt(n, e, t, r, i, s = !1) {
|
|
7196
7196
|
if (e.inlineContent)
|
|
7197
7197
|
return D.create(n, t);
|
|
7198
7198
|
for (let o = r - (i > 0 ? 0 : 1); i > 0 ? o < e.childCount : o >= 0; o += i) {
|
|
@@ -7201,7 +7201,7 @@ function ot(n, e, t, r, i, s = !1) {
|
|
|
7201
7201
|
if (!s && v.isSelectable(l))
|
|
7202
7202
|
return v.create(n, t - (i < 0 ? l.nodeSize : 0));
|
|
7203
7203
|
} else {
|
|
7204
|
-
let a =
|
|
7204
|
+
let a = lt(n, l, t + i, i < 0 ? l.childCount : 0, i, s);
|
|
7205
7205
|
if (a)
|
|
7206
7206
|
return a;
|
|
7207
7207
|
}
|
|
@@ -7424,7 +7424,7 @@ class Hn {
|
|
|
7424
7424
|
});
|
|
7425
7425
|
}
|
|
7426
7426
|
}
|
|
7427
|
-
class
|
|
7427
|
+
class ct {
|
|
7428
7428
|
/**
|
|
7429
7429
|
@internal
|
|
7430
7430
|
*/
|
|
@@ -7499,7 +7499,7 @@ class at {
|
|
|
7499
7499
|
applyInner(e) {
|
|
7500
7500
|
if (!e.before.eq(this.doc))
|
|
7501
7501
|
throw new RangeError("Applying a mismatched transaction");
|
|
7502
|
-
let t = new
|
|
7502
|
+
let t = new ct(this.config), r = this.config.fields;
|
|
7503
7503
|
for (let i = 0; i < r.length; i++) {
|
|
7504
7504
|
let s = r[i];
|
|
7505
7505
|
t[s.name] = s.apply(e, this[s.name], this, t);
|
|
@@ -7516,7 +7516,7 @@ class at {
|
|
|
7516
7516
|
Create a new state.
|
|
7517
7517
|
*/
|
|
7518
7518
|
static create(e) {
|
|
7519
|
-
let t = new Hn(e.doc ? e.doc.type.schema : e.schema, e.plugins), r = new
|
|
7519
|
+
let t = new Hn(e.doc ? e.doc.type.schema : e.schema, e.plugins), r = new ct(t);
|
|
7520
7520
|
for (let i = 0; i < t.fields.length; i++)
|
|
7521
7521
|
r[t.fields[i].name] = t.fields[i].init(e, r);
|
|
7522
7522
|
return r;
|
|
@@ -7530,7 +7530,7 @@ class at {
|
|
|
7530
7530
|
configuration object..
|
|
7531
7531
|
*/
|
|
7532
7532
|
reconfigure(e) {
|
|
7533
|
-
let t = new Hn(this.schema, e.plugins), r = t.fields, i = new
|
|
7533
|
+
let t = new Hn(this.schema, e.plugins), r = t.fields, i = new ct(t);
|
|
7534
7534
|
for (let s = 0; s < r.length; s++) {
|
|
7535
7535
|
let o = r[s].name;
|
|
7536
7536
|
i[o] = this.hasOwnProperty(o) ? this[o] : r[s].init(e, i);
|
|
@@ -7567,7 +7567,7 @@ class at {
|
|
|
7567
7567
|
throw new RangeError("Invalid input for EditorState.fromJSON");
|
|
7568
7568
|
if (!e.schema)
|
|
7569
7569
|
throw new RangeError("Required config field 'schema' missing");
|
|
7570
|
-
let i = new Hn(e.schema, e.plugins), s = new
|
|
7570
|
+
let i = new Hn(e.schema, e.plugins), s = new ct(i);
|
|
7571
7571
|
return i.fields.forEach((o) => {
|
|
7572
7572
|
if (o.name == "doc")
|
|
7573
7573
|
s.doc = Ue.fromJSON(e.schema, t.doc);
|
|
@@ -7647,7 +7647,7 @@ let fi = null;
|
|
|
7647
7647
|
const ve = function(n, e, t) {
|
|
7648
7648
|
let r = fi || (fi = document.createRange());
|
|
7649
7649
|
return r.setEnd(n, t ?? n.nodeValue.length), r.setStart(n, e || 0), r;
|
|
7650
|
-
},
|
|
7650
|
+
}, tt = function(n, e, t, r) {
|
|
7651
7651
|
return t && (pi(n, e, t, r, -1) || pi(n, e, t, r, 1));
|
|
7652
7652
|
}, Uc = /^(img|br|input|textarea|hr)$/i;
|
|
7653
7653
|
function pi(n, e, t, r, i) {
|
|
@@ -7687,7 +7687,7 @@ function Yc(n) {
|
|
|
7687
7687
|
return e && e.node && e.node.isBlock && (e.dom == n || e.contentDOM == n);
|
|
7688
7688
|
}
|
|
7689
7689
|
const Sn = function(n) {
|
|
7690
|
-
return n.focusNode &&
|
|
7690
|
+
return n.focusNode && tt(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset);
|
|
7691
7691
|
};
|
|
7692
7692
|
function je(n, e) {
|
|
7693
7693
|
let t = document.createEvent("Event");
|
|
@@ -7715,7 +7715,7 @@ function Zc(n, e, t) {
|
|
|
7715
7715
|
}
|
|
7716
7716
|
const xe = typeof navigator < "u" ? navigator : null, mi = typeof document < "u" ? document : null, Le = xe && xe.userAgent || "", lr = /Edge\/(\d+)/.exec(Le), Zs = /MSIE \d/.exec(Le), ar = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Le), re = !!(Zs || ar || lr), Pe = Zs ? document.documentMode : ar ? +ar[1] : lr ? +lr[1] : 0, ge = !re && /gecko\/(\d+)/i.test(Le);
|
|
7717
7717
|
ge && +(/Firefox\/(\d+)/.exec(Le) || [0, 0])[1];
|
|
7718
|
-
const cr = !re && /Chrome\/(\d+)/.exec(Le), Q = !!cr, Qc = cr ? +cr[1] : 0, ee = !re && !!xe && /Apple Computer/.test(xe.vendor),
|
|
7718
|
+
const cr = !re && /Chrome\/(\d+)/.exec(Le), Q = !!cr, Qc = cr ? +cr[1] : 0, ee = !re && !!xe && /Apple Computer/.test(xe.vendor), bt = ee && (/Mobile\/\w+/.test(Le) || !!xe && xe.maxTouchPoints > 2), ce = bt || (xe ? /Mac/.test(xe.platform) : !1), ed = xe ? /Win/.test(xe.platform) : !1, pe = /Android \d/.test(Le), xn = !!mi && "webkitFontSmoothing" in mi.documentElement.style, td = xn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
7719
7719
|
function nd(n) {
|
|
7720
7720
|
return {
|
|
7721
7721
|
left: 0,
|
|
@@ -7785,18 +7785,18 @@ function eo(n, e) {
|
|
|
7785
7785
|
r.scrollTop != i + e && (r.scrollTop = i + e), r.scrollLeft != s && (r.scrollLeft = s);
|
|
7786
7786
|
}
|
|
7787
7787
|
}
|
|
7788
|
-
let
|
|
7788
|
+
let ot = null;
|
|
7789
7789
|
function od(n) {
|
|
7790
7790
|
if (n.setActive)
|
|
7791
7791
|
return n.setActive();
|
|
7792
|
-
if (
|
|
7793
|
-
return n.focus(
|
|
7792
|
+
if (ot)
|
|
7793
|
+
return n.focus(ot);
|
|
7794
7794
|
let e = Qs(n);
|
|
7795
|
-
n.focus(
|
|
7795
|
+
n.focus(ot == null ? {
|
|
7796
7796
|
get preventScroll() {
|
|
7797
|
-
return
|
|
7797
|
+
return ot = { preventScroll: !0 }, !0;
|
|
7798
7798
|
}
|
|
7799
|
-
} : void 0),
|
|
7799
|
+
} : void 0), ot || (ot = !1, eo(e, 0));
|
|
7800
7800
|
}
|
|
7801
7801
|
function to(n, e) {
|
|
7802
7802
|
let t, r = 2e8, i, s = 0, o = e.top, l = e.top, a, c;
|
|
@@ -8318,7 +8318,7 @@ class qt {
|
|
|
8318
8318
|
let h = c.focusNode.childNodes[c.focusOffset];
|
|
8319
8319
|
h && h.contentEditable == "false" && (i = !0);
|
|
8320
8320
|
}
|
|
8321
|
-
if (!(i || d && ee) &&
|
|
8321
|
+
if (!(i || d && ee) && tt(l.node, l.offset, c.anchorNode, c.anchorOffset) && tt(a.node, a.offset, c.focusNode, c.focusOffset))
|
|
8322
8322
|
return;
|
|
8323
8323
|
let u = !1;
|
|
8324
8324
|
if ((c.extend || e == t) && !d) {
|
|
@@ -8431,13 +8431,13 @@ class yd extends qt {
|
|
|
8431
8431
|
return e.type === "characterData" && e.target.nodeValue == e.oldValue;
|
|
8432
8432
|
}
|
|
8433
8433
|
}
|
|
8434
|
-
class
|
|
8434
|
+
class nt extends qt {
|
|
8435
8435
|
constructor(e, t, r, i) {
|
|
8436
8436
|
super(e, [], r, i), this.mark = t;
|
|
8437
8437
|
}
|
|
8438
8438
|
static create(e, t, r, i) {
|
|
8439
8439
|
let s = i.nodeViews[t.type.name], o = s && s(t, i, r);
|
|
8440
|
-
return (!o || !o.dom) && (o = ke.renderSpec(document, t.type.spec.toDOM(t, r))), new
|
|
8440
|
+
return (!o || !o.dom) && (o = ke.renderSpec(document, t.type.spec.toDOM(t, r))), new nt(e, t, o.dom, o.contentDOM || o.dom);
|
|
8441
8441
|
}
|
|
8442
8442
|
parseRule() {
|
|
8443
8443
|
return this.dirty & we || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM || void 0 };
|
|
@@ -8454,7 +8454,7 @@ class tt extends qt {
|
|
|
8454
8454
|
}
|
|
8455
8455
|
}
|
|
8456
8456
|
slice(e, t, r) {
|
|
8457
|
-
let i =
|
|
8457
|
+
let i = nt.create(this.parent, this.mark, !0, r), s = this.children, o = this.size;
|
|
8458
8458
|
t < o && (s = hr(s, t, o, r)), e > 0 && (s = hr(s, 0, e, r));
|
|
8459
8459
|
for (let l = 0; l < s.length; l++)
|
|
8460
8460
|
s[l].parent = i;
|
|
@@ -8533,7 +8533,7 @@ class Re extends qt {
|
|
|
8533
8533
|
a.syncToMarks(c.marks, r, e);
|
|
8534
8534
|
let f;
|
|
8535
8535
|
a.findNodeMatch(c, d, u, h) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (f = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, u, f, e) || a.updateNextNode(c, d, u, e, h, i) || a.addNode(c, d, u, e, i), i += c.nodeSize;
|
|
8536
|
-
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == $e) && (o && this.protectLocalComposition(e, o), lo(this.contentDOM, this.children, e),
|
|
8536
|
+
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == $e) && (o && this.protectLocalComposition(e, o), lo(this.contentDOM, this.children, e), bt && vd(this.dom));
|
|
8537
8537
|
}
|
|
8538
8538
|
localCompositionInfo(e, t) {
|
|
8539
8539
|
let { from: r, to: i } = e.state.selection;
|
|
@@ -8692,7 +8692,7 @@ function lo(n, e, t) {
|
|
|
8692
8692
|
r = r.nextSibling;
|
|
8693
8693
|
} else
|
|
8694
8694
|
i = !0, n.insertBefore(l, r);
|
|
8695
|
-
if (o instanceof
|
|
8695
|
+
if (o instanceof nt) {
|
|
8696
8696
|
let a = r ? r.previousSibling : n.lastChild;
|
|
8697
8697
|
lo(o.contentDOM, o.children, t), r = a ? a.nextSibling : n.firstChild;
|
|
8698
8698
|
}
|
|
@@ -8811,7 +8811,7 @@ class Sd {
|
|
|
8811
8811
|
if (l > -1)
|
|
8812
8812
|
l > this.index && (this.changed = !0, this.destroyBetween(this.index, l)), this.top = this.top.children[this.index];
|
|
8813
8813
|
else {
|
|
8814
|
-
let a =
|
|
8814
|
+
let a = nt.create(this.top, e[s], t, r);
|
|
8815
8815
|
this.top.children.splice(this.index, 0, a), this.top = a, this.changed = !0;
|
|
8816
8816
|
}
|
|
8817
8817
|
this.index = 0, s++;
|
|
@@ -8904,7 +8904,7 @@ class Sd {
|
|
|
8904
8904
|
// contentEditable.
|
|
8905
8905
|
addTextblockHacks() {
|
|
8906
8906
|
let e = this.top.children[this.index - 1], t = this.top;
|
|
8907
|
-
for (; e instanceof
|
|
8907
|
+
for (; e instanceof nt; )
|
|
8908
8908
|
t = e, e = t.children[t.children.length - 1];
|
|
8909
8909
|
(!e || // Empty textblock
|
|
8910
8910
|
!(e instanceof wn) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((ee || Q) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
|
|
@@ -8931,7 +8931,7 @@ function xd(n, e) {
|
|
|
8931
8931
|
for (; ; )
|
|
8932
8932
|
if (r) {
|
|
8933
8933
|
let c = t.children[r - 1];
|
|
8934
|
-
if (c instanceof
|
|
8934
|
+
if (c instanceof nt)
|
|
8935
8935
|
t = c, r = c.children.length;
|
|
8936
8936
|
else {
|
|
8937
8937
|
l = c, r--;
|
|
@@ -9085,7 +9085,7 @@ function Me(n, e = !1) {
|
|
|
9085
9085
|
if (ho(n, t), !!uo(n)) {
|
|
9086
9086
|
if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && Q) {
|
|
9087
9087
|
let r = n.domSelectionRange(), i = n.domObserver.currentSelection;
|
|
9088
|
-
if (r.anchorNode && i.anchorNode &&
|
|
9088
|
+
if (r.anchorNode && i.anchorNode && tt(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
|
|
9089
9089
|
n.input.mouseDown.delayedSelectionSync = !0, n.domObserver.setCurSelection();
|
|
9090
9090
|
return;
|
|
9091
9091
|
}
|
|
@@ -9159,7 +9159,7 @@ function fo(n) {
|
|
|
9159
9159
|
}
|
|
9160
9160
|
function Nd(n) {
|
|
9161
9161
|
let e = n.docView.domFromPos(n.state.selection.anchor, 0), t = n.domSelectionRange();
|
|
9162
|
-
return
|
|
9162
|
+
return tt(e.node, e.offset, t.anchorNode, t.anchorOffset);
|
|
9163
9163
|
}
|
|
9164
9164
|
function fr(n, e) {
|
|
9165
9165
|
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;
|
|
@@ -9441,7 +9441,7 @@ function yo(n, e, t, r, i) {
|
|
|
9441
9441
|
break;
|
|
9442
9442
|
o = h;
|
|
9443
9443
|
}
|
|
9444
|
-
if (l || (l = (n.someProp("clipboardParser") || n.someProp("domParser") ||
|
|
9444
|
+
if (l || (l = (n.someProp("clipboardParser") || n.someProp("domParser") || mt.fromSchema(n.state.schema)).parseSlice(o, {
|
|
9445
9445
|
preserveWhitespace: !!(a || d),
|
|
9446
9446
|
context: i,
|
|
9447
9447
|
ruleFromNode(h) {
|
|
@@ -9613,7 +9613,7 @@ function qd(n, e) {
|
|
|
9613
9613
|
ne.keydown = (n, e) => {
|
|
9614
9614
|
let t = e;
|
|
9615
9615
|
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !vo(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(pe && Q && t.keyCode == 13)))
|
|
9616
|
-
if (t.keyCode != 229 && n.domObserver.forceFlush(),
|
|
9616
|
+
if (t.keyCode != 229 && n.domObserver.forceFlush(), bt && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
9617
9617
|
let r = Date.now();
|
|
9618
9618
|
n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
9619
9619
|
n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, je(13, "Enter"))), n.input.lastIOSEnter = 0);
|
|
@@ -9654,7 +9654,7 @@ function Ir(n, e, t, r, i) {
|
|
|
9654
9654
|
return !0;
|
|
9655
9655
|
return !1;
|
|
9656
9656
|
}
|
|
9657
|
-
function
|
|
9657
|
+
function pt(n, e, t) {
|
|
9658
9658
|
n.focused || n.focus();
|
|
9659
9659
|
let r = n.state.tr.setSelection(e);
|
|
9660
9660
|
t == "pointer" && r.setMeta("pointer", !0), n.dispatch(r);
|
|
@@ -9663,7 +9663,7 @@ function Wd(n, e) {
|
|
|
9663
9663
|
if (e == -1)
|
|
9664
9664
|
return !1;
|
|
9665
9665
|
let t = n.state.doc.resolve(e), r = t.nodeAfter;
|
|
9666
|
-
return r && r.isAtom && v.isSelectable(r) ? (
|
|
9666
|
+
return r && r.isAtom && v.isSelectable(r) ? (pt(n, new v(t), "pointer"), !0) : !1;
|
|
9667
9667
|
}
|
|
9668
9668
|
function Jd(n, e) {
|
|
9669
9669
|
if (e == -1)
|
|
@@ -9678,7 +9678,7 @@ function Jd(n, e) {
|
|
|
9678
9678
|
break;
|
|
9679
9679
|
}
|
|
9680
9680
|
}
|
|
9681
|
-
return i != null ? (
|
|
9681
|
+
return i != null ? (pt(n, v.create(n.state.doc, i), "pointer"), !0) : !1;
|
|
9682
9682
|
}
|
|
9683
9683
|
function Ud(n, e, t, r, i) {
|
|
9684
9684
|
return Ir(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Jd(n, t) : Wd(n, t));
|
|
@@ -9694,14 +9694,14 @@ function Xd(n, e, t) {
|
|
|
9694
9694
|
return !1;
|
|
9695
9695
|
let r = n.state.doc;
|
|
9696
9696
|
if (e == -1)
|
|
9697
|
-
return r.inlineContent ? (
|
|
9697
|
+
return r.inlineContent ? (pt(n, D.create(r, 0, r.content.size), "pointer"), !0) : !1;
|
|
9698
9698
|
let i = r.resolve(e);
|
|
9699
9699
|
for (let s = i.depth + 1; s > 0; s--) {
|
|
9700
9700
|
let o = s > i.depth ? i.nodeAfter : i.node(s), l = i.before(s);
|
|
9701
9701
|
if (o.inlineContent)
|
|
9702
|
-
|
|
9702
|
+
pt(n, D.create(r, l + 1, l + 1 + o.content.size), "pointer");
|
|
9703
9703
|
else if (v.isSelectable(o))
|
|
9704
|
-
|
|
9704
|
+
pt(n, v.create(r, l), "pointer");
|
|
9705
9705
|
else
|
|
9706
9706
|
continue;
|
|
9707
9707
|
return !0;
|
|
@@ -9756,7 +9756,7 @@ class Zd {
|
|
|
9756
9756
|
// (hidden) cursor is doesn't change the selection, and
|
|
9757
9757
|
// thus doesn't get a reaction from ProseMirror. This
|
|
9758
9758
|
// works around that.
|
|
9759
|
-
Q && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (
|
|
9759
|
+
Q && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (pt(this.view, T.near(this.view.state.doc.resolve(t.pos)), "pointer"), e.preventDefault()) : Ie(this.view, "pointer");
|
|
9760
9760
|
}
|
|
9761
9761
|
move(e) {
|
|
9762
9762
|
this.updateAllowDefault(e), Ie(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
@@ -9832,12 +9832,12 @@ function tu(n, e) {
|
|
|
9832
9832
|
t.parentNode && t.parentNode.removeChild(t), n.focus();
|
|
9833
9833
|
}, 50);
|
|
9834
9834
|
}
|
|
9835
|
-
const
|
|
9835
|
+
const kt = re && Pe < 15 || bt && td < 604;
|
|
9836
9836
|
te.copy = ne.cut = (n, e) => {
|
|
9837
9837
|
let t = e, r = n.state.selection, i = t.type == "cut";
|
|
9838
9838
|
if (r.empty)
|
|
9839
9839
|
return;
|
|
9840
|
-
let s =
|
|
9840
|
+
let s = kt ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = go(n, o);
|
|
9841
9841
|
s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : tu(n, l), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
9842
9842
|
};
|
|
9843
9843
|
function nu(n) {
|
|
@@ -9864,7 +9864,7 @@ ne.paste = (n, e) => {
|
|
|
9864
9864
|
let t = e;
|
|
9865
9865
|
if (n.composing && !pe)
|
|
9866
9866
|
return;
|
|
9867
|
-
let r =
|
|
9867
|
+
let r = kt ? null : t.clipboardData;
|
|
9868
9868
|
r && zt(n, r.getData("text/plain"), r.getData("text/html"), n.input.shiftKey, t) ? t.preventDefault() : ru(n, t);
|
|
9869
9869
|
};
|
|
9870
9870
|
class iu {
|
|
@@ -9887,7 +9887,7 @@ te.dragstart = (n, e) => {
|
|
|
9887
9887
|
}
|
|
9888
9888
|
}
|
|
9889
9889
|
let o = n.state.selection.content(), { dom: l, text: a } = go(n, o);
|
|
9890
|
-
t.dataTransfer.clearData(), t.dataTransfer.setData(
|
|
9890
|
+
t.dataTransfer.clearData(), t.dataTransfer.setData(kt ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", kt || t.dataTransfer.setData("text/plain", a), n.dragging = new iu(o, !t[Oo]);
|
|
9891
9891
|
};
|
|
9892
9892
|
te.dragend = (n) => {
|
|
9893
9893
|
let e = n.dragging;
|
|
@@ -9906,7 +9906,7 @@ ne.drop = (n, e) => {
|
|
|
9906
9906
|
let s = n.state.doc.resolve(i.pos), o = r && r.slice;
|
|
9907
9907
|
o ? n.someProp("transformPasted", (p) => {
|
|
9908
9908
|
o = p(o, n);
|
|
9909
|
-
}) : o = yo(n, t.dataTransfer.getData(
|
|
9909
|
+
}) : o = yo(n, t.dataTransfer.getData(kt ? "Text" : "text/plain"), kt ? null : t.dataTransfer.getData("text/html"), !1, s);
|
|
9910
9910
|
let l = !!(r && !t[Oo]);
|
|
9911
9911
|
if (n.someProp("handleDrop", (p) => p(n, t, o || k.empty, l))) {
|
|
9912
9912
|
t.preventDefault();
|
|
@@ -10089,13 +10089,13 @@ class le {
|
|
|
10089
10089
|
return this.type instanceof _e;
|
|
10090
10090
|
}
|
|
10091
10091
|
}
|
|
10092
|
-
const
|
|
10092
|
+
const at = [], Ge = {};
|
|
10093
10093
|
class H {
|
|
10094
10094
|
/**
|
|
10095
10095
|
@internal
|
|
10096
10096
|
*/
|
|
10097
10097
|
constructor(e, t) {
|
|
10098
|
-
this.local = e.length ? e :
|
|
10098
|
+
this.local = e.length ? e : at, this.children = t.length ? t : at;
|
|
10099
10099
|
}
|
|
10100
10100
|
/**
|
|
10101
10101
|
Create a set of decorations, using the structure of the given
|
|
@@ -10143,7 +10143,7 @@ class H {
|
|
|
10143
10143
|
let a = this.local[l].map(e, r, i);
|
|
10144
10144
|
a && a.type.valid(t, a) ? (o || (o = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
|
|
10145
10145
|
}
|
|
10146
|
-
return this.children.length ? su(this.children, o || [], e, t, r, i, s) : o ? new H(o.sort(Ye),
|
|
10146
|
+
return this.children.length ? su(this.children, o || [], e, t, r, i, s) : o ? new H(o.sort(Ye), at) : X;
|
|
10147
10147
|
}
|
|
10148
10148
|
/**
|
|
10149
10149
|
Add the given array of decorations to the ones in the set,
|
|
@@ -10218,7 +10218,7 @@ class H {
|
|
|
10218
10218
|
}
|
|
10219
10219
|
}
|
|
10220
10220
|
if (i) {
|
|
10221
|
-
let l = new H(i.sort(Ye),
|
|
10221
|
+
let l = new H(i.sort(Ye), at);
|
|
10222
10222
|
return r ? new Ne([l, r]) : l;
|
|
10223
10223
|
}
|
|
10224
10224
|
return r || X;
|
|
@@ -10250,7 +10250,7 @@ class H {
|
|
|
10250
10250
|
*/
|
|
10251
10251
|
localsInner(e) {
|
|
10252
10252
|
if (this == X)
|
|
10253
|
-
return
|
|
10253
|
+
return at;
|
|
10254
10254
|
if (e.inlineContent || !this.local.some(_e.is))
|
|
10255
10255
|
return this.local;
|
|
10256
10256
|
let t = [];
|
|
@@ -10301,7 +10301,7 @@ class Ne {
|
|
|
10301
10301
|
t.push(s[o]);
|
|
10302
10302
|
}
|
|
10303
10303
|
}
|
|
10304
|
-
return t ? Br(r ? t : t.sort(Ye)) :
|
|
10304
|
+
return t ? Br(r ? t : t.sort(Ye)) : at;
|
|
10305
10305
|
}
|
|
10306
10306
|
// Create a group for the given array of decoration sets, or return
|
|
10307
10307
|
// a single set when possible.
|
|
@@ -10520,7 +10520,7 @@ class du {
|
|
|
10520
10520
|
return Me(this.view);
|
|
10521
10521
|
if (re && Pe <= 11 && !this.view.state.selection.empty) {
|
|
10522
10522
|
let e = this.view.domSelectionRange();
|
|
10523
|
-
if (e.focusNode &&
|
|
10523
|
+
if (e.focusNode && tt(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
|
|
10524
10524
|
return this.flushSoon();
|
|
10525
10525
|
}
|
|
10526
10526
|
this.flush();
|
|
@@ -10616,7 +10616,7 @@ function hu(n) {
|
|
|
10616
10616
|
}
|
|
10617
10617
|
n.dom.addEventListener("beforeinput", t, !0), document.execCommand("indent"), n.dom.removeEventListener("beforeinput", t, !0);
|
|
10618
10618
|
let r = e.startContainer, i = e.startOffset, s = e.endContainer, o = e.endOffset, l = n.domAtPos(n.state.selection.anchor);
|
|
10619
|
-
return
|
|
10619
|
+
return tt(l.node, l.offset, s, o) && ([r, i, s, o] = [s, o, r, i]), { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o };
|
|
10620
10620
|
}
|
|
10621
10621
|
function fu(n, e, t) {
|
|
10622
10622
|
let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
|
|
@@ -10630,7 +10630,7 @@ function fu(n, e, t) {
|
|
|
10630
10630
|
if (!C || C.size)
|
|
10631
10631
|
break;
|
|
10632
10632
|
}
|
|
10633
|
-
let u = n.state.doc, h = n.someProp("domParser") ||
|
|
10633
|
+
let u = n.state.doc, h = n.someProp("domParser") || mt.fromSchema(n.state.schema), f = u.resolve(o), p = null, m = h.parse(r, {
|
|
10634
10634
|
topNode: f.parent,
|
|
10635
10635
|
topMatch: f.parent.contentMatchAt(f.index()),
|
|
10636
10636
|
topOpen: !0,
|
|
@@ -10678,7 +10678,7 @@ function gu(n, e, t, r, i) {
|
|
|
10678
10678
|
let l = n.state.selection, a = fu(n, e, t), c = n.state.doc, d = c.slice(a.from, a.to), u, h;
|
|
10679
10679
|
n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (u = n.state.selection.to, h = "end") : (u = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
|
|
10680
10680
|
let f = ku(d.content, a.doc.content, a.from, u, h);
|
|
10681
|
-
if ((
|
|
10681
|
+
if ((bt && n.input.lastIOSEnter > Date.now() - 225 || pe) && i.some((S) => S.nodeType == 1 && !mu.test(S.nodeName)) && (!f || f.endA >= f.endB) && n.someProp("handleKeyDown", (S) => S(n, je(13, "Enter")))) {
|
|
10682
10682
|
n.input.lastIOSEnter = 0;
|
|
10683
10683
|
return;
|
|
10684
10684
|
}
|
|
@@ -10701,7 +10701,7 @@ function gu(n, e, t, r, i) {
|
|
|
10701
10701
|
}
|
|
10702
10702
|
n.input.domChangeCount++, n.state.selection.from < n.state.selection.to && f.start == f.endB && n.state.selection instanceof D && (f.start > n.state.selection.from && f.start <= n.state.selection.from + 2 && n.state.selection.from >= a.from ? f.start = n.state.selection.from : f.endA < n.state.selection.to && f.endA >= n.state.selection.to - 2 && n.state.selection.to <= a.to && (f.endB += n.state.selection.to - f.endA, f.endA = n.state.selection.to)), re && Pe <= 11 && f.endB == f.start + 1 && f.endA == f.start && f.start > a.from && a.doc.textBetween(f.start - a.from - 1, f.start - a.from + 1) == " " && (f.start--, f.endA--, f.endB--);
|
|
10703
10703
|
let p = a.doc.resolveNoCache(f.start - a.from), m = a.doc.resolveNoCache(f.endB - a.from), g = c.resolve(f.start), y = p.sameParent(m) && p.parent.inlineContent && g.end() >= f.endA, C;
|
|
10704
|
-
if ((
|
|
10704
|
+
if ((bt && n.input.lastIOSEnter > Date.now() - 225 && (!y || i.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !y && p.pos < a.doc.content.size && (C = T.findFrom(a.doc.resolve(p.pos + 1), 1, !0)) && C.head == m.pos) && n.someProp("handleKeyDown", (S) => S(n, je(13, "Enter")))) {
|
|
10705
10705
|
n.input.lastIOSEnter = 0;
|
|
10706
10706
|
return;
|
|
10707
10707
|
}
|
|
@@ -11319,19 +11319,19 @@ const Ru = (n, e, t) => {
|
|
|
11319
11319
|
let s = i.nodeBefore;
|
|
11320
11320
|
if (!s.type.spec.isolating && Ro(n, i, e))
|
|
11321
11321
|
return !0;
|
|
11322
|
-
if (r.parent.content.size == 0 && (
|
|
11322
|
+
if (r.parent.content.size == 0 && (St(s, "end") || v.isSelectable(s))) {
|
|
11323
11323
|
let o = Mr(n.doc, r.before(), r.after(), k.empty);
|
|
11324
11324
|
if (o && o.slice.size < o.to - o.from) {
|
|
11325
11325
|
if (e) {
|
|
11326
11326
|
let l = n.tr.step(o);
|
|
11327
|
-
l.setSelection(
|
|
11327
|
+
l.setSelection(St(s, "end") ? T.findFrom(l.doc.resolve(l.mapping.map(i.pos, -1)), -1) : v.create(l.doc, i.pos - s.nodeSize)), e(l.scrollIntoView());
|
|
11328
11328
|
}
|
|
11329
11329
|
return !0;
|
|
11330
11330
|
}
|
|
11331
11331
|
}
|
|
11332
11332
|
return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos - s.nodeSize, i.pos).scrollIntoView()), !0) : !1;
|
|
11333
11333
|
};
|
|
11334
|
-
function
|
|
11334
|
+
function St(n, e, t = !1) {
|
|
11335
11335
|
for (let r = n; r; r = e == "start" ? r.firstChild : r.lastChild) {
|
|
11336
11336
|
if (r.isTextblock)
|
|
11337
11337
|
return !0;
|
|
@@ -11376,12 +11376,12 @@ const Lu = (n, e, t) => {
|
|
|
11376
11376
|
let s = i.nodeAfter;
|
|
11377
11377
|
if (Ro(n, i, e))
|
|
11378
11378
|
return !0;
|
|
11379
|
-
if (r.parent.content.size == 0 && (
|
|
11379
|
+
if (r.parent.content.size == 0 && (St(s, "start") || v.isSelectable(s))) {
|
|
11380
11380
|
let o = Mr(n.doc, r.before(), r.after(), k.empty);
|
|
11381
11381
|
if (o && o.slice.size < o.to - o.from) {
|
|
11382
11382
|
if (e) {
|
|
11383
11383
|
let l = n.tr.step(o);
|
|
11384
|
-
l.setSelection(
|
|
11384
|
+
l.setSelection(St(s, "start") ? T.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : v.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
|
|
11385
11385
|
}
|
|
11386
11386
|
return !0;
|
|
11387
11387
|
}
|
|
@@ -11413,7 +11413,7 @@ function Io(n) {
|
|
|
11413
11413
|
const zu = (n, e) => {
|
|
11414
11414
|
let t = n.selection, r = t instanceof v, i;
|
|
11415
11415
|
if (r) {
|
|
11416
|
-
if (t.node.isTextblock || !
|
|
11416
|
+
if (t.node.isTextblock || !it(n.doc, t.from))
|
|
11417
11417
|
return !1;
|
|
11418
11418
|
i = t.from;
|
|
11419
11419
|
} else if (i = qs(n.doc, t.from, -1), i == null)
|
|
@@ -11426,7 +11426,7 @@ const zu = (n, e) => {
|
|
|
11426
11426
|
}, Vu = (n, e) => {
|
|
11427
11427
|
let t = n.selection, r;
|
|
11428
11428
|
if (t instanceof v) {
|
|
11429
|
-
if (t.node.isTextblock || !
|
|
11429
|
+
if (t.node.isTextblock || !it(n.doc, t.to))
|
|
11430
11430
|
return !1;
|
|
11431
11431
|
r = t.to;
|
|
11432
11432
|
} else if (r = qs(n.doc, t.to, 1), r == null)
|
|
@@ -11478,7 +11478,7 @@ const $u = (n, e) => {
|
|
|
11478
11478
|
return !1;
|
|
11479
11479
|
if (t.depth > 1 && t.after() != t.end(-1)) {
|
|
11480
11480
|
let s = t.before();
|
|
11481
|
-
if (
|
|
11481
|
+
if (ht(n.doc, s))
|
|
11482
11482
|
return e && e(n.tr.split(s).scrollIntoView()), !0;
|
|
11483
11483
|
}
|
|
11484
11484
|
let r = t.blockRange(), i = r && wt(r);
|
|
@@ -11489,7 +11489,7 @@ const $u = (n, e) => {
|
|
|
11489
11489
|
};
|
|
11490
11490
|
function Ju(n, e, t) {
|
|
11491
11491
|
let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
|
|
11492
|
-
return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(s - 1, s) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(s, s + 1) || !(i.isTextblock ||
|
|
11492
|
+
return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(s - 1, s) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(s, s + 1) || !(i.isTextblock || it(n.doc, e.pos)) ? !1 : (t && t(n.tr.clearIncompatible(e.pos, r.type, r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()), !0);
|
|
11493
11493
|
}
|
|
11494
11494
|
function Ro(n, e, t) {
|
|
11495
11495
|
let r = e.nodeBefore, i = e.nodeAfter, s, o;
|
|
@@ -11505,14 +11505,14 @@ function Ro(n, e, t) {
|
|
|
11505
11505
|
h = b.from(s[m].create(null, h));
|
|
11506
11506
|
h = b.from(r.copy(h));
|
|
11507
11507
|
let f = n.tr.step(new W(e.pos - 1, u, e.pos, u, new k(h, 1, 0), s.length, !0)), p = u + 2 * s.length;
|
|
11508
|
-
|
|
11508
|
+
it(f.doc, p) && f.join(p), t(f.scrollIntoView());
|
|
11509
11509
|
}
|
|
11510
11510
|
return !0;
|
|
11511
11511
|
}
|
|
11512
11512
|
let a = T.findFrom(e, 1), c = a && a.$from.blockRange(a.$to), d = c && wt(c);
|
|
11513
11513
|
if (d != null && d >= e.depth)
|
|
11514
11514
|
return t && t(n.tr.lift(c, d).scrollIntoView()), !0;
|
|
11515
|
-
if (l &&
|
|
11515
|
+
if (l && St(i, "start", !0) && St(r, "end")) {
|
|
11516
11516
|
let u = r, h = [];
|
|
11517
11517
|
for (; h.push(u), !u.isTextblock; )
|
|
11518
11518
|
u = u.lastChild;
|
|
@@ -11606,7 +11606,7 @@ function Zu(n, e, t, r, i) {
|
|
|
11606
11606
|
t[d].type == i && (o = d + 1);
|
|
11607
11607
|
let l = t.length - o, a = e.start + t.length - (r ? 2 : 0), c = e.parent;
|
|
11608
11608
|
for (let d = e.startIndex, u = e.endIndex, h = !0; d < u; d++, h = !1)
|
|
11609
|
-
!h &&
|
|
11609
|
+
!h && ht(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(d).nodeSize;
|
|
11610
11610
|
return n;
|
|
11611
11611
|
}
|
|
11612
11612
|
function Qu(n) {
|
|
@@ -11623,7 +11623,7 @@ function eh(n, e, t, r) {
|
|
|
11623
11623
|
return !1;
|
|
11624
11624
|
i.lift(r, l);
|
|
11625
11625
|
let a = i.mapping.map(s, -1) - 1;
|
|
11626
|
-
return
|
|
11626
|
+
return it(i.doc, a) && i.join(a), e(i.scrollIntoView()), !0;
|
|
11627
11627
|
}
|
|
11628
11628
|
function th(n, e, t) {
|
|
11629
11629
|
let r = n.tr, i = t.parent;
|
|
@@ -12201,9 +12201,9 @@ function mh(n) {
|
|
|
12201
12201
|
const e = n.filter((t, r) => n.indexOf(t) !== r);
|
|
12202
12202
|
return [...new Set(e)];
|
|
12203
12203
|
}
|
|
12204
|
-
class
|
|
12204
|
+
class dt {
|
|
12205
12205
|
constructor(e, t) {
|
|
12206
|
-
this.splittableMarks = [], this.editor = t, this.extensions =
|
|
12206
|
+
this.splittableMarks = [], this.editor = t, this.extensions = dt.resolve(e), this.schema = oh(this.extensions, t), this.extensions.forEach((r) => {
|
|
12207
12207
|
var i;
|
|
12208
12208
|
this.editor.extensionStorage[r.name] = r.storage;
|
|
12209
12209
|
const s = {
|
|
@@ -12233,7 +12233,7 @@ class ct {
|
|
|
12233
12233
|
});
|
|
12234
12234
|
}
|
|
12235
12235
|
static resolve(e) {
|
|
12236
|
-
const t =
|
|
12236
|
+
const t = dt.sort(dt.flatten(e)), r = mh(t.map((i) => i.name));
|
|
12237
12237
|
return r.length && console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map((i) => `'${i}'`).join(", ")}]. This can lead to issues.`), t;
|
|
12238
12238
|
}
|
|
12239
12239
|
static flatten(e) {
|
|
@@ -12268,7 +12268,7 @@ class ct {
|
|
|
12268
12268
|
}, {});
|
|
12269
12269
|
}
|
|
12270
12270
|
get plugins() {
|
|
12271
|
-
const { editor: e } = this, t =
|
|
12271
|
+
const { editor: e } = this, t = dt.sort([...this.extensions].reverse()), r = [], i = [], s = t.map((o) => {
|
|
12272
12272
|
const l = {
|
|
12273
12273
|
name: o.name,
|
|
12274
12274
|
options: o.options,
|
|
@@ -12583,7 +12583,7 @@ function hn(n, e, t) {
|
|
|
12583
12583
|
return console.warn("[tiptap warn]: Invalid content.", "Passed value:", n, "Error:", r), hn("", e, t);
|
|
12584
12584
|
}
|
|
12585
12585
|
if (typeof n == "string") {
|
|
12586
|
-
const r =
|
|
12586
|
+
const r = mt.fromSchema(e);
|
|
12587
12587
|
return t.slice ? r.parseSlice(Yi(n), t.parseOptions).content : r.parse(Yi(n), t.parseOptions);
|
|
12588
12588
|
}
|
|
12589
12589
|
return hn("", e, t);
|
|
@@ -12990,7 +12990,7 @@ function Qi(n, e) {
|
|
|
12990
12990
|
const Mf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
|
|
12991
12991
|
const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, d = Zt(c, l.node().type.name, l.node().attrs);
|
|
12992
12992
|
if (s instanceof v && s.node.isBlock)
|
|
12993
|
-
return !l.parentOffset || !
|
|
12993
|
+
return !l.parentOffset || !ht(o, l.pos) ? !1 : (r && (n && Qi(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
|
|
12994
12994
|
if (!l.parent.isBlock)
|
|
12995
12995
|
return !1;
|
|
12996
12996
|
if (r) {
|
|
@@ -13002,8 +13002,8 @@ const Mf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
13002
13002
|
type: h,
|
|
13003
13003
|
attrs: d
|
|
13004
13004
|
}
|
|
13005
|
-
] : void 0, p =
|
|
13006
|
-
if (!f && !p &&
|
|
13005
|
+
] : void 0, p = ht(e.doc, e.mapping.map(l.pos), 1, f);
|
|
13006
|
+
if (!f && !p && ht(e.doc, e.mapping.map(l.pos), 1, h ? [{ type: h }] : void 0) && (p = !0, f = h ? [
|
|
13007
13007
|
{
|
|
13008
13008
|
type: h,
|
|
13009
13009
|
attrs: d
|
|
@@ -13051,7 +13051,7 @@ const Mf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
13051
13051
|
{ type: o, attrs: f },
|
|
13052
13052
|
{ type: h, attrs: p }
|
|
13053
13053
|
] : [{ type: o, attrs: f }];
|
|
13054
|
-
if (!
|
|
13054
|
+
if (!ht(e.doc, l.pos, 2))
|
|
13055
13055
|
return !1;
|
|
13056
13056
|
if (r) {
|
|
13057
13057
|
const { selection: g, storedMarks: y } = t, { splittableMarks: C } = i.extensionManager, E = y || g.$to.parentOffset && g.$from.marks();
|
|
@@ -13069,7 +13069,7 @@ const Mf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
13069
13069
|
if (r === void 0)
|
|
13070
13070
|
return !0;
|
|
13071
13071
|
const i = n.doc.nodeAt(r);
|
|
13072
|
-
return t.node.type === (i == null ? void 0 : i.type) &&
|
|
13072
|
+
return t.node.type === (i == null ? void 0 : i.type) && it(n.doc, t.pos) && n.join(t.pos), !0;
|
|
13073
13073
|
}, er = (n, e) => {
|
|
13074
13074
|
const t = Vr((o) => o.type === e)(n.selection);
|
|
13075
13075
|
if (!t)
|
|
@@ -13078,7 +13078,7 @@ const Mf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
13078
13078
|
if (r === void 0)
|
|
13079
13079
|
return !0;
|
|
13080
13080
|
const i = n.doc.nodeAt(r);
|
|
13081
|
-
return t.node.type === (i == null ? void 0 : i.type) &&
|
|
13081
|
+
return t.node.type === (i == null ? void 0 : i.type) && it(n.doc, r) && n.join(r), !0;
|
|
13082
13082
|
}, Tf = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
|
|
13083
13083
|
const { extensions: u, splittableMarks: h } = i.extensionManager, f = J(n, o.schema), p = J(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: C } = m, E = y.blockRange(C), P = g || m.$to.parentOffset && m.$from.marks();
|
|
13084
13084
|
if (!E)
|
|
@@ -13562,7 +13562,7 @@ let Jf = class extends rh {
|
|
|
13562
13562
|
*/
|
|
13563
13563
|
createExtensionManager() {
|
|
13564
13564
|
const t = [...this.options.enableCoreExtensions ? Object.values(qf) : [], ...this.options.extensions].filter((r) => ["extension", "node", "mark"].includes(r == null ? void 0 : r.type));
|
|
13565
|
-
this.extensionManager = new
|
|
13565
|
+
this.extensionManager = new dt(t, this);
|
|
13566
13566
|
}
|
|
13567
13567
|
/**
|
|
13568
13568
|
* Creates an command manager.
|
|
@@ -13586,7 +13586,7 @@ let Jf = class extends rh {
|
|
|
13586
13586
|
this.view = new Su(this.options.element, {
|
|
13587
13587
|
...this.options.editorProps,
|
|
13588
13588
|
dispatchTransaction: this.dispatchTransaction.bind(this),
|
|
13589
|
-
state:
|
|
13589
|
+
state: ct.create({
|
|
13590
13590
|
doc: e,
|
|
13591
13591
|
selection: t || void 0
|
|
13592
13592
|
})
|
|
@@ -14790,17 +14790,17 @@ function Xo({ pluginKey: n = fp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14790
14790
|
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), ye = S.active && j.active && S.range.from !== j.range.from, Kt = !S.active && j.active, Hr = S.active && !j.active, tl = !Kt && !Hr && S.query !== j.query, Ct = Kt || ye, Wt = tl && !ye, An = Hr || ye;
|
|
14791
14791
|
if (!Ct && !Wt && !An)
|
|
14792
14792
|
return;
|
|
14793
|
-
const
|
|
14793
|
+
const st = An && !Ct ? S : j, $r = m.dom.querySelector(`[data-decoration-id="${st.decorationId}"]`);
|
|
14794
14794
|
h = {
|
|
14795
14795
|
editor: e,
|
|
14796
|
-
range:
|
|
14797
|
-
query:
|
|
14798
|
-
text:
|
|
14796
|
+
range: st.range,
|
|
14797
|
+
query: st.query,
|
|
14798
|
+
text: st.text,
|
|
14799
14799
|
items: [],
|
|
14800
14800
|
command: (vt) => {
|
|
14801
14801
|
a({
|
|
14802
14802
|
editor: e,
|
|
14803
|
-
range:
|
|
14803
|
+
range: st.range,
|
|
14804
14804
|
props: vt
|
|
14805
14805
|
});
|
|
14806
14806
|
},
|
|
@@ -14814,7 +14814,7 @@ function Xo({ pluginKey: n = fp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14814
14814
|
} : null
|
|
14815
14815
|
}, Ct && ((E = f == null ? void 0 : f.onBeforeStart) === null || E === void 0 || E.call(f, h)), Wt && ((P = f == null ? void 0 : f.onBeforeUpdate) === null || P === void 0 || P.call(f, h)), (Wt || Ct) && (h.items = await c({
|
|
14816
14816
|
editor: e,
|
|
14817
|
-
query:
|
|
14817
|
+
query: st.query
|
|
14818
14818
|
})), An && ((N = f == null ? void 0 : f.onExit) === null || N === void 0 || N.call(f, h)), Wt && ((I = f == null ? void 0 : f.onUpdate) === null || I === void 0 || I.call(f, h)), Ct && ((V = f == null ? void 0 : f.onStart) === null || V === void 0 || V.call(f, h));
|
|
14819
14819
|
},
|
|
14820
14820
|
destroy: () => {
|
|
@@ -14958,7 +14958,7 @@ function yp(n, e, t, r, i, s) {
|
|
|
14958
14958
|
]),
|
|
14959
14959
|
"navigation-type": "arrow-keys",
|
|
14960
14960
|
onClick: (c) => s.selectItem(a),
|
|
14961
|
-
onKeydown:
|
|
14961
|
+
onKeydown: ut(s.onKeyDown, ["prevent", "stop"])
|
|
14962
14962
|
}, {
|
|
14963
14963
|
default: O(() => [
|
|
14964
14964
|
(w(), L(Xe(t.itemComponent), { item: l }, null, 8, ["item"]))
|
|
@@ -15804,7 +15804,7 @@ const Gp = /* @__PURE__ */ q(Jp, [["render", Up]]), Yp = {
|
|
|
15804
15804
|
components: {
|
|
15805
15805
|
DtButton: yn,
|
|
15806
15806
|
DtEmojiPicker: Ml,
|
|
15807
|
-
DtIcon:
|
|
15807
|
+
DtIcon: rt,
|
|
15808
15808
|
DtInput: Ol,
|
|
15809
15809
|
DtNotice: pa,
|
|
15810
15810
|
DtPopover: Wa,
|
|
@@ -15964,37 +15964,20 @@ const Gp = /* @__PURE__ */ q(Jp, [["render", Up]]), Yp = {
|
|
|
15964
15964
|
},
|
|
15965
15965
|
// Emoji picker props
|
|
15966
15966
|
/**
|
|
15967
|
-
*
|
|
15967
|
+
* Props to pass into the emoji picker.
|
|
15968
15968
|
*/
|
|
15969
|
-
|
|
15970
|
-
type:
|
|
15971
|
-
default: () =>
|
|
15972
|
-
|
|
15973
|
-
|
|
15974
|
-
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
|
|
15981
|
-
]
|
|
15982
|
-
},
|
|
15983
|
-
emojiSkinSelectorButtonTooltipLabel: {
|
|
15984
|
-
type: String,
|
|
15985
|
-
default: "Change default skin tone"
|
|
15986
|
-
},
|
|
15987
|
-
emojiSearchNoResultsLabel: {
|
|
15988
|
-
type: String,
|
|
15989
|
-
default: "No results"
|
|
15990
|
-
},
|
|
15991
|
-
emojiSearchResultsLabel: {
|
|
15992
|
-
type: String,
|
|
15993
|
-
default: "Search results"
|
|
15994
|
-
},
|
|
15995
|
-
emojiSearchPlaceholderLabel: {
|
|
15996
|
-
type: String,
|
|
15997
|
-
default: "Search..."
|
|
15969
|
+
emojiPickerProps: {
|
|
15970
|
+
type: Object,
|
|
15971
|
+
default: () => ({}),
|
|
15972
|
+
validate(n) {
|
|
15973
|
+
return [
|
|
15974
|
+
"searchNoResultsLabel",
|
|
15975
|
+
"searchResultsLabel",
|
|
15976
|
+
"searchPlaceholderLabel",
|
|
15977
|
+
"skinSelectorButtonTooltipLabel",
|
|
15978
|
+
"tabSetLabels"
|
|
15979
|
+
].every((e) => n[e] != null);
|
|
15980
|
+
}
|
|
15998
15981
|
},
|
|
15999
15982
|
/**
|
|
16000
15983
|
* Emoji button tooltip label
|
|
@@ -16098,11 +16081,24 @@ const Gp = /* @__PURE__ */ q(Jp, [["render", Up]]), Yp = {
|
|
|
16098
16081
|
* @event cancel
|
|
16099
16082
|
* @type {Boolean}
|
|
16100
16083
|
*/
|
|
16101
|
-
"cancel"
|
|
16084
|
+
"cancel",
|
|
16085
|
+
/**
|
|
16086
|
+
* Fires when skin tone is selected from the emoji picker
|
|
16087
|
+
*
|
|
16088
|
+
* @event skin-tone
|
|
16089
|
+
* @type {String}
|
|
16090
|
+
*/
|
|
16091
|
+
"skin-tone",
|
|
16092
|
+
/**
|
|
16093
|
+
* Fires when emoji is selected from the emoji picker
|
|
16094
|
+
*
|
|
16095
|
+
* @event selected-emoji
|
|
16096
|
+
* @type {String}
|
|
16097
|
+
*/
|
|
16098
|
+
"selected-emoji"
|
|
16102
16099
|
],
|
|
16103
16100
|
data() {
|
|
16104
16101
|
return {
|
|
16105
|
-
skinTone: "Default",
|
|
16106
16102
|
internalInputValue: this.modelValue,
|
|
16107
16103
|
// internal input content
|
|
16108
16104
|
hasFocus: !1,
|
|
@@ -16163,6 +16159,9 @@ const Gp = /* @__PURE__ */ q(Jp, [["render", Up]]), Yp = {
|
|
|
16163
16159
|
const e = n.dataTransfer, r = Array.from(e.files).map((i) => i.name);
|
|
16164
16160
|
this.$emit("add-media", r);
|
|
16165
16161
|
},
|
|
16162
|
+
onSkinTone(n) {
|
|
16163
|
+
this.$emit("skin-tone", n);
|
|
16164
|
+
},
|
|
16166
16165
|
onSelectEmoji(n) {
|
|
16167
16166
|
if (!n) {
|
|
16168
16167
|
this.emojiPickerOpened = !1;
|
|
@@ -16173,7 +16172,7 @@ const Gp = /* @__PURE__ */ q(Jp, [["render", Up]]), Yp = {
|
|
|
16173
16172
|
attrs: {
|
|
16174
16173
|
code: n.shortname
|
|
16175
16174
|
}
|
|
16176
|
-
}), this.emojiPickerOpened = !1;
|
|
16175
|
+
}), this.emojiPickerOpened = !1, this.$emit("selected-emoji", n);
|
|
16177
16176
|
},
|
|
16178
16177
|
onSelectImage() {
|
|
16179
16178
|
this.$refs.messageInputImageUpload.$refs.input.click();
|
|
@@ -16232,19 +16231,19 @@ function om(n, e, t, r, i, s) {
|
|
|
16232
16231
|
"data-qa": "dt-message-input",
|
|
16233
16232
|
role: "presentation",
|
|
16234
16233
|
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 }]),
|
|
16235
|
-
onClick: e[
|
|
16236
|
-
onDragEnter: e[
|
|
16237
|
-
onDragOver: e[
|
|
16238
|
-
onDrop: e[
|
|
16239
|
-
onKeydown: e[
|
|
16240
|
-
onFocusin: e[
|
|
16241
|
-
onFocusout: e[
|
|
16234
|
+
onClick: e[16] || (e[16] = (p) => n.$refs.richTextEditor.focusEditor()),
|
|
16235
|
+
onDragEnter: e[17] || (e[17] = (...p) => s.onDrag && s.onDrag(...p)),
|
|
16236
|
+
onDragOver: e[18] || (e[18] = (...p) => s.onDrag && s.onDrag(...p)),
|
|
16237
|
+
onDrop: e[19] || (e[19] = (...p) => s.onDrop && s.onDrop(...p)),
|
|
16238
|
+
onKeydown: e[20] || (e[20] = Ve(ut((...p) => s.onSend && s.onSend(...p), ["exact"]), ["enter"])),
|
|
16239
|
+
onFocusin: e[21] || (e[21] = (p) => i.hasFocus = !0),
|
|
16240
|
+
onFocusout: e[22] || (e[22] = (p) => i.hasFocus = !1)
|
|
16242
16241
|
}, [
|
|
16243
16242
|
G("div", {
|
|
16244
16243
|
class: "d-of-auto d-mx16 d-mt8 d-mb4",
|
|
16245
16244
|
style: Sl({ "max-height": t.maxHeight })
|
|
16246
16245
|
}, [
|
|
16247
|
-
F(a,
|
|
16246
|
+
F(a, Ze({
|
|
16248
16247
|
ref: "richTextEditor",
|
|
16249
16248
|
modelValue: i.internalInputValue,
|
|
16250
16249
|
"onUpdate:modelValue": e[0] || (e[0] = (p) => i.internalInputValue = p),
|
|
@@ -16308,7 +16307,7 @@ function om(n, e, t, r, i, s) {
|
|
|
16308
16307
|
open: i.emojiPickerOpened,
|
|
16309
16308
|
"initial-focus-element": "#searchInput",
|
|
16310
16309
|
padding: "none",
|
|
16311
|
-
onOpened: e[
|
|
16310
|
+
onOpened: e[11] || (e[11] = (p) => {
|
|
16312
16311
|
i.emojiPickerOpened = p;
|
|
16313
16312
|
})
|
|
16314
16313
|
}, {
|
|
@@ -16345,16 +16344,10 @@ function om(n, e, t, r, i, s) {
|
|
|
16345
16344
|
}, 8, ["message"])
|
|
16346
16345
|
]),
|
|
16347
16346
|
content: O(() => [
|
|
16348
|
-
F(h, {
|
|
16349
|
-
|
|
16350
|
-
"skin-selector-button-tooltip-label": t.emojiSkinSelectorButtonTooltipLabel,
|
|
16351
|
-
"search-no-results-label": t.emojiSearchNoResultsLabel,
|
|
16352
|
-
"search-results-label": t.emojiSearchResultsLabel,
|
|
16353
|
-
"search-placeholder-label": t.emojiSearchPlaceholderLabel,
|
|
16354
|
-
"skin-tone": i.skinTone,
|
|
16355
|
-
onSkinTone: e[11] || (e[11] = (p) => i.skinTone = p),
|
|
16347
|
+
F(h, Ze(t.emojiPickerProps, {
|
|
16348
|
+
onSkinTone: s.onSkinTone,
|
|
16356
16349
|
onSelectedEmoji: s.onSelectEmoji
|
|
16357
|
-
}, null,
|
|
16350
|
+
}), null, 16, ["onSkinTone", "onSelectedEmoji"])
|
|
16358
16351
|
]),
|
|
16359
16352
|
_: 1
|
|
16360
16353
|
}, 8, ["open"])
|
|
@@ -16407,10 +16400,10 @@ function om(n, e, t, r, i, s) {
|
|
|
16407
16400
|
"aria-label": t.sendButtonAriaLabel,
|
|
16408
16401
|
"aria-disabled": s.isSendDisabled,
|
|
16409
16402
|
onClick: s.onSend,
|
|
16410
|
-
onMouseenter: e[
|
|
16411
|
-
onMouseleave: e[
|
|
16412
|
-
onFocusin: e[
|
|
16413
|
-
onFocusout: e[
|
|
16403
|
+
onMouseenter: e[12] || (e[12] = (p) => i.sendButtonFocus = !0),
|
|
16404
|
+
onMouseleave: e[13] || (e[13] = (p) => i.sendButtonFocus = !1),
|
|
16405
|
+
onFocusin: e[14] || (e[14] = (p) => i.sendButtonFocus = !0),
|
|
16406
|
+
onFocusout: e[15] || (e[15] = (p) => i.sendButtonFocus = !1)
|
|
16414
16407
|
}, cs({
|
|
16415
16408
|
default: O(() => [
|
|
16416
16409
|
t.isEdit ? (w(), B("p", nm, ue(t.saveChangesButtonText), 1)) : _("", !0)
|
|
@@ -16448,6 +16441,7 @@ function om(n, e, t, r, i, s) {
|
|
|
16448
16441
|
const um = /* @__PURE__ */ q(Yp, [["render", om]]);
|
|
16449
16442
|
export {
|
|
16450
16443
|
In as A,
|
|
16444
|
+
um as B,
|
|
16451
16445
|
Ql as D,
|
|
16452
16446
|
Jt as L,
|
|
16453
16447
|
ya as M,
|
|
@@ -16471,13 +16465,13 @@ export {
|
|
|
16471
16465
|
Ll as o,
|
|
16472
16466
|
Wr as p,
|
|
16473
16467
|
pa as q,
|
|
16474
|
-
|
|
16475
|
-
|
|
16476
|
-
|
|
16477
|
-
|
|
16478
|
-
|
|
16479
|
-
|
|
16480
|
-
|
|
16481
|
-
|
|
16482
|
-
|
|
16468
|
+
Ul as r,
|
|
16469
|
+
Ur as s,
|
|
16470
|
+
Pa as t,
|
|
16471
|
+
Ra as u,
|
|
16472
|
+
Ba as v,
|
|
16473
|
+
Pl as w,
|
|
16474
|
+
Ot as x,
|
|
16475
|
+
Tl as y,
|
|
16476
|
+
Ss as z
|
|
16483
16477
|
};
|