@dialpad/dialtone-vue 3.75.0 → 3.75.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 +7 -0
- package/dist/DtEmojiPicker-4136084e.cjs +25 -0
- package/dist/{index-0e54de41.js → DtEmojiPicker-454f372c.js} +7835 -6939
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.cjs +6 -6
- package/dist/dialtone-vue.js +3924 -2097
- package/dist/emoji.cjs +1 -1
- package/dist/emoji.js +23 -24
- package/dist/{emoji_text_wrapper-6b288de8.js → emoji_text_wrapper-b0a34f33.js} +5 -5
- package/dist/emoji_text_wrapper-f9cfe78d.cjs +1 -0
- package/dist/message_input.cjs +11 -11
- package/dist/message_input.js +98 -99
- package/dist/{popover-f84c7e57.cjs → popover-891f001a.cjs} +2 -2
- package/dist/{popover-2b504324.js → popover-d0be98d5.js} +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/emoji_picker-9f66b4e9.cjs +0 -1
- package/dist/emoji_picker-a30198f5.js +0 -901
- package/dist/emoji_text_wrapper-776256cc.cjs +0 -1
- package/dist/index-52006ddd.cjs +0 -25
package/dist/message_input.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineComponent as xt, ref as $n, onMounted as bi, onBeforeUnmount as Wn, h as Ie, reactive as
|
|
3
|
-
import {
|
|
4
|
-
import { D as fo } from "./popover-2b504324.js";
|
|
1
|
+
import { S as gi, U as Us, W as Gs, _ as yi, b as Ys, Q as Xs, D as Qs, o as Zs } from "./DtEmojiPicker-454f372c.js";
|
|
2
|
+
import { defineComponent as xt, ref as $n, onMounted as bi, onBeforeUnmount as Wn, h as Ie, reactive as eo, markRaw as to, getCurrentInstance as no, watchEffect as ro, nextTick as io, unref as so, Teleport as oo, customRef as lo, resolveComponent as Ee, openBlock as Mn, createBlock as ao, createElementBlock as ar, createElementVNode as pe, normalizeClass as cr, createVNode as re, mergeProps as co, renderSlot as Zt, withCtx as it, toDisplayString as uo, createCommentVNode as ho } from "vue";
|
|
3
|
+
import { D as fo } from "./popover-d0be98d5.js";
|
|
5
4
|
function z(r) {
|
|
6
5
|
this.content = r;
|
|
7
6
|
}
|
|
@@ -3622,12 +3621,12 @@ function qn(r, e, t = e, n = k.empty) {
|
|
|
3622
3621
|
if (e == t && !n.size)
|
|
3623
3622
|
return null;
|
|
3624
3623
|
let i = r.resolve(e), s = r.resolve(t);
|
|
3625
|
-
return Wi(i, s, n) ? new j(e, t, n) : new
|
|
3624
|
+
return Wi(i, s, n) ? new j(e, t, n) : new Qo(i, s, n).fit();
|
|
3626
3625
|
}
|
|
3627
3626
|
function Wi(r, e, t) {
|
|
3628
3627
|
return !t.openStart && !t.openEnd && r.start() == e.start() && r.parent.canReplace(r.index(), e.index(), t.content);
|
|
3629
3628
|
}
|
|
3630
|
-
class
|
|
3629
|
+
class Qo {
|
|
3631
3630
|
constructor(e, t, n) {
|
|
3632
3631
|
this.$from = e, this.$to = t, this.unplaced = n, this.frontier = [], this.placed = y.empty;
|
|
3633
3632
|
for (let i = 0; i <= e.depth; i++) {
|
|
@@ -3797,9 +3796,9 @@ function ln(r, e, t, n, i) {
|
|
|
3797
3796
|
if (o == s.childCount && !t.compatibleContent(s.type))
|
|
3798
3797
|
return null;
|
|
3799
3798
|
let l = n.fillBefore(s.content, !0, o);
|
|
3800
|
-
return l && !
|
|
3799
|
+
return l && !Zo(t, s.content, o) ? l : null;
|
|
3801
3800
|
}
|
|
3802
|
-
function
|
|
3801
|
+
function Zo(r, e, t) {
|
|
3803
3802
|
for (let n = t; n < e.childCount; n++)
|
|
3804
3803
|
if (!r.allowsMarks(e.child(n).marks))
|
|
3805
3804
|
return !0;
|
|
@@ -3935,15 +3934,15 @@ class Ue extends K {
|
|
|
3935
3934
|
}
|
|
3936
3935
|
}
|
|
3937
3936
|
K.jsonID("attr", Ue);
|
|
3938
|
-
let
|
|
3937
|
+
let Qe = class extends Error {
|
|
3939
3938
|
};
|
|
3940
|
-
|
|
3939
|
+
Qe = function r(e) {
|
|
3941
3940
|
let t = Error.call(this, e);
|
|
3942
3941
|
return t.__proto__ = r.prototype, t;
|
|
3943
3942
|
};
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3943
|
+
Qe.prototype = Object.create(Error.prototype);
|
|
3944
|
+
Qe.prototype.constructor = Qe;
|
|
3945
|
+
Qe.prototype.name = "TransformError";
|
|
3947
3946
|
class _i {
|
|
3948
3947
|
/**
|
|
3949
3948
|
Create a transform that starts with the given document.
|
|
@@ -3964,7 +3963,7 @@ class _i {
|
|
|
3964
3963
|
step(e) {
|
|
3965
3964
|
let t = this.maybeStep(e);
|
|
3966
3965
|
if (t.failed)
|
|
3967
|
-
throw new
|
|
3966
|
+
throw new Qe(t.failed);
|
|
3968
3967
|
return this;
|
|
3969
3968
|
}
|
|
3970
3969
|
/**
|
|
@@ -4926,7 +4925,7 @@ function Ui(r, e, t) {
|
|
|
4926
4925
|
}
|
|
4927
4926
|
return t;
|
|
4928
4927
|
}
|
|
4929
|
-
class
|
|
4928
|
+
class Z {
|
|
4930
4929
|
/**
|
|
4931
4930
|
Create a plugin.
|
|
4932
4931
|
*/
|
|
@@ -5045,7 +5044,7 @@ function hl(r, e, t) {
|
|
|
5045
5044
|
}
|
|
5046
5045
|
const le = typeof navigator < "u" ? navigator : null, Nr = typeof document < "u" ? document : null, Oe = le && le.userAgent || "", Nn = /Edge\/(\d+)/.exec(Oe), Yi = /MSIE \d/.exec(Oe), Dn = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Oe), q = !!(Yi || Dn || Nn), xe = Yi ? document.documentMode : Dn ? +Dn[1] : Nn ? +Nn[1] : 0, ne = !q && /gecko\/(\d+)/i.test(Oe);
|
|
5047
5046
|
ne && +(/Firefox\/(\d+)/.exec(Oe) || [0, 0])[1];
|
|
5048
|
-
const An = !q && /Chrome\/(\d+)/.exec(Oe), H = !!An, fl = An ? +An[1] : 0, $ = !q && !!le && /Apple Computer/.test(le.vendor),
|
|
5047
|
+
const An = !q && /Chrome\/(\d+)/.exec(Oe), H = !!An, fl = An ? +An[1] : 0, $ = !q && !!le && /Apple Computer/.test(le.vendor), Ze = $ && (/Mobile\/\w+/.test(Oe) || !!le && le.maxTouchPoints > 2), U = Ze || (le ? /Mac/.test(le.platform) : !1), pl = le ? /Win/.test(le.platform) : !1, ee = /Android \d/.test(Oe), qt = !!Nr && "webkitFontSmoothing" in Nr.documentElement.style, ml = qt ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5049
5048
|
function gl(r) {
|
|
5050
5049
|
return {
|
|
5051
5050
|
left: 0,
|
|
@@ -5107,9 +5106,9 @@ function Xi(r) {
|
|
|
5107
5106
|
}
|
|
5108
5107
|
function kl({ refDOM: r, refTop: e, stack: t }) {
|
|
5109
5108
|
let n = r ? r.getBoundingClientRect().top : 0;
|
|
5110
|
-
|
|
5109
|
+
Qi(t, n == 0 ? 0 : n - e);
|
|
5111
5110
|
}
|
|
5112
|
-
function
|
|
5111
|
+
function Qi(r, e) {
|
|
5113
5112
|
for (let t = 0; t < r.length; t++) {
|
|
5114
5113
|
let { dom: n, top: i, left: s } = r[t];
|
|
5115
5114
|
n.scrollTop != i + e && (n.scrollTop = i + e), n.scrollLeft != s && (n.scrollLeft = s);
|
|
@@ -5126,9 +5125,9 @@ function Sl(r) {
|
|
|
5126
5125
|
get preventScroll() {
|
|
5127
5126
|
return $e = { preventScroll: !0 }, !0;
|
|
5128
5127
|
}
|
|
5129
|
-
} : void 0), $e || ($e = !1,
|
|
5128
|
+
} : void 0), $e || ($e = !1, Qi(e, 0));
|
|
5130
5129
|
}
|
|
5131
|
-
function
|
|
5130
|
+
function Zi(r, e) {
|
|
5132
5131
|
let t, n = 2e8, i, s = 0, o = e.top, l = e.top, a, c;
|
|
5133
5132
|
for (let d = r.firstChild, u = 0; d; d = d.nextSibling, u++) {
|
|
5134
5133
|
let h;
|
|
@@ -5155,7 +5154,7 @@ function Qi(r, e) {
|
|
|
5155
5154
|
!t && (e.left >= p.right && e.top >= p.top || e.left >= p.left && e.top >= p.bottom) && (s = u + 1);
|
|
5156
5155
|
}
|
|
5157
5156
|
}
|
|
5158
|
-
return !t && a && (t = a, i = c, n = 0), t && t.nodeType == 3 ? xl(t, i) : !t || n && t.nodeType == 1 ? { node: r, offset: s } :
|
|
5157
|
+
return !t && a && (t = a, i = c, n = 0), t && t.nodeType == 3 ? xl(t, i) : !t || n && t.nodeType == 1 ? { node: r, offset: s } : Zi(t, i);
|
|
5159
5158
|
}
|
|
5160
5159
|
function xl(r, e) {
|
|
5161
5160
|
let t = r.nodeValue.length, n = document.createRange();
|
|
@@ -5175,7 +5174,7 @@ function Ml(r, e) {
|
|
|
5175
5174
|
return t && /^li$/i.test(t.nodeName) && e.left < r.getBoundingClientRect().left ? t : r;
|
|
5176
5175
|
}
|
|
5177
5176
|
function Cl(r, e, t) {
|
|
5178
|
-
let { node: n, offset: i } =
|
|
5177
|
+
let { node: n, offset: i } = Zi(e, t), s = -1;
|
|
5179
5178
|
if (n.nodeType == 1 && !n.firstChild) {
|
|
5180
5179
|
let o = n.getBoundingClientRect();
|
|
5181
5180
|
s = o.left != o.right && t.left > (o.left + o.right) / 2 ? 1 : -1;
|
|
@@ -5863,7 +5862,7 @@ class Me extends Mt {
|
|
|
5863
5862
|
a.syncToMarks(c.marks, n, e);
|
|
5864
5863
|
let f;
|
|
5865
5864
|
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;
|
|
5866
|
-
}), a.syncToMarks([], n, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == Ae) && (o && this.protectLocalComposition(e, o), ss(this.contentDOM, this.children, e),
|
|
5865
|
+
}), a.syncToMarks([], n, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == Ae) && (o && this.protectLocalComposition(e, o), ss(this.contentDOM, this.children, e), Ze && Ll(this.dom));
|
|
5867
5866
|
}
|
|
5868
5867
|
localCompositionInfo(e, t) {
|
|
5869
5868
|
let { from: n, to: i } = e.state.selection;
|
|
@@ -6778,7 +6777,7 @@ function ms(r, e, t, n, i) {
|
|
|
6778
6777
|
return h.nodeName == "BR" && !h.nextSibling && h.parentNode && !Ul.test(h.parentNode.nodeName) ? { ignore: !0 } : null;
|
|
6779
6778
|
}
|
|
6780
6779
|
})), d)
|
|
6781
|
-
l =
|
|
6780
|
+
l = Ql(_r(l, +d[1], +d[2]), d[4]);
|
|
6782
6781
|
else if (l = k.maxOpen(Gl(l.content, i), !0), l.openStart || l.openEnd) {
|
|
6783
6782
|
let u = 0, h = 0;
|
|
6784
6783
|
for (let f = l.content.firstChild; u < l.openStart && !f.type.spec.isolating; u++, f = f.firstChild)
|
|
@@ -6873,7 +6872,7 @@ function Xl(r) {
|
|
|
6873
6872
|
n.childNodes.length == 1 && n.textContent == " " && n.parentNode && n.parentNode.replaceChild(r.ownerDocument.createTextNode(" "), n);
|
|
6874
6873
|
}
|
|
6875
6874
|
}
|
|
6876
|
-
function
|
|
6875
|
+
function Ql(r, e) {
|
|
6877
6876
|
if (!r.size)
|
|
6878
6877
|
return r;
|
|
6879
6878
|
let t = r.content.firstChild.type.schema, n;
|
|
@@ -6891,7 +6890,7 @@ function Zl(r, e) {
|
|
|
6891
6890
|
}
|
|
6892
6891
|
return new k(i, s, o);
|
|
6893
6892
|
}
|
|
6894
|
-
const W = {}, J = {},
|
|
6893
|
+
const W = {}, J = {}, Zl = { touchstart: !0, touchmove: !0 };
|
|
6895
6894
|
class ea {
|
|
6896
6895
|
constructor() {
|
|
6897
6896
|
this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastAndroidDelete = 0, this.composing = !1, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
|
|
@@ -6902,7 +6901,7 @@ function ta(r) {
|
|
|
6902
6901
|
let t = W[e];
|
|
6903
6902
|
r.dom.addEventListener(e, r.input.eventHandlers[e] = (n) => {
|
|
6904
6903
|
ra(r, n) && !Yn(r, n) && (r.editable || !(n.type in J)) && t(r, n);
|
|
6905
|
-
},
|
|
6904
|
+
}, Zl[e] ? { passive: !0 } : void 0);
|
|
6906
6905
|
}
|
|
6907
6906
|
$ && r.dom.addEventListener("input", () => null), Fn(r);
|
|
6908
6907
|
}
|
|
@@ -6943,7 +6942,7 @@ function ia(r, e) {
|
|
|
6943
6942
|
J.keydown = (r, e) => {
|
|
6944
6943
|
let t = e;
|
|
6945
6944
|
if (r.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Ms(r, t) && (r.input.lastKeyCode = t.keyCode, r.input.lastKeyCodeTime = Date.now(), !(ee && H && t.keyCode == 13)))
|
|
6946
|
-
if (t.keyCode != 229 && r.domObserver.forceFlush(),
|
|
6945
|
+
if (t.keyCode != 229 && r.domObserver.forceFlush(), Ze && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
6947
6946
|
let n = Date.now();
|
|
6948
6947
|
r.input.lastIOSEnter = n, r.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
6949
6948
|
r.input.lastIOSEnter == n && (r.someProp("handleKeyDown", (i) => i(r, Ne(13, "Enter"))), r.input.lastIOSEnter = 0);
|
|
@@ -7037,14 +7036,14 @@ function ua(r, e, t) {
|
|
|
7037
7036
|
return !0;
|
|
7038
7037
|
}
|
|
7039
7038
|
}
|
|
7040
|
-
function
|
|
7039
|
+
function Qn(r) {
|
|
7041
7040
|
return Ft(r);
|
|
7042
7041
|
}
|
|
7043
7042
|
const xs = U ? "metaKey" : "ctrlKey";
|
|
7044
7043
|
W.mousedown = (r, e) => {
|
|
7045
7044
|
let t = e;
|
|
7046
7045
|
r.input.shiftKey = t.shiftKey;
|
|
7047
|
-
let n =
|
|
7046
|
+
let n = Qn(r), i = Date.now(), s = "singleClick";
|
|
7048
7047
|
i - r.input.lastClick.time < 500 && sa(t, r.input.lastClick) && !t[xs] && (r.input.lastClick.type == "singleClick" ? s = "doubleClick" : r.input.lastClick.type == "doubleClick" && (s = "tripleClick")), r.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s };
|
|
7049
7048
|
let o = r.posAtCoords(_t(t));
|
|
7050
7049
|
o && (s == "singleClick" ? (r.input.mouseDown && r.input.mouseDown.done(), r.input.mouseDown = new ha(r, o, t, !!n)) : (s == "doubleClick" ? ca : da)(r, o.pos, o.inside, t) ? t.preventDefault() : Se(r, "pointer"));
|
|
@@ -7096,12 +7095,12 @@ class ha {
|
|
|
7096
7095
|
}
|
|
7097
7096
|
}
|
|
7098
7097
|
W.touchstart = (r) => {
|
|
7099
|
-
r.input.lastTouch = Date.now(),
|
|
7098
|
+
r.input.lastTouch = Date.now(), Qn(r), Se(r, "pointer");
|
|
7100
7099
|
};
|
|
7101
7100
|
W.touchmove = (r) => {
|
|
7102
7101
|
r.input.lastTouch = Date.now(), Se(r, "pointer");
|
|
7103
7102
|
};
|
|
7104
|
-
W.contextmenu = (r) =>
|
|
7103
|
+
W.contextmenu = (r) => Qn(r);
|
|
7105
7104
|
function Ms(r, e) {
|
|
7106
7105
|
return r.composing ? !0 : $ && Math.abs(e.timeStamp - r.input.compositionEndedAt) < 500 ? (r.input.compositionEndedAt = -2e8, !0) : !1;
|
|
7107
7106
|
}
|
|
@@ -7162,7 +7161,7 @@ function ma(r, e) {
|
|
|
7162
7161
|
t.parentNode && t.parentNode.removeChild(t), r.focus();
|
|
7163
7162
|
}, 50);
|
|
7164
7163
|
}
|
|
7165
|
-
const et = q && xe < 15 ||
|
|
7164
|
+
const et = q && xe < 15 || Ze && ml < 604;
|
|
7166
7165
|
W.copy = J.cut = (r, e) => {
|
|
7167
7166
|
let t = e, n = r.state.selection, i = t.type == "cut";
|
|
7168
7167
|
if (n.empty)
|
|
@@ -7295,7 +7294,7 @@ function bt(r, e) {
|
|
|
7295
7294
|
return !1;
|
|
7296
7295
|
return !0;
|
|
7297
7296
|
}
|
|
7298
|
-
class
|
|
7297
|
+
class Zn {
|
|
7299
7298
|
constructor(e, t) {
|
|
7300
7299
|
this.toDOM = e, this.spec = t || ze, this.side = this.spec.side || 0;
|
|
7301
7300
|
}
|
|
@@ -7307,7 +7306,7 @@ class Qn {
|
|
|
7307
7306
|
return !0;
|
|
7308
7307
|
}
|
|
7309
7308
|
eq(e) {
|
|
7310
|
-
return this == e || e instanceof
|
|
7309
|
+
return this == e || e instanceof Zn && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && bt(this.spec, e.spec));
|
|
7311
7310
|
}
|
|
7312
7311
|
destroy(e) {
|
|
7313
7312
|
this.spec.destroy && this.spec.destroy(e);
|
|
@@ -7388,7 +7387,7 @@ class Y {
|
|
|
7388
7387
|
widget's current document position.
|
|
7389
7388
|
*/
|
|
7390
7389
|
static widget(e, t, n) {
|
|
7391
|
-
return new Y(e, e, new
|
|
7390
|
+
return new Y(e, e, new Zn(t, n));
|
|
7392
7391
|
}
|
|
7393
7392
|
/**
|
|
7394
7393
|
Creates an inline decoration, which adds the given attributes to
|
|
@@ -8008,7 +8007,7 @@ function Aa(r, e, t, n, i) {
|
|
|
8008
8007
|
let l = r.state.selection, a = Ea(r, e, t), c = r.state.doc, d = c.slice(a.from, a.to), u, h;
|
|
8009
8008
|
r.input.lastKeyCode === 8 && Date.now() - 100 < r.input.lastKeyCodeTime ? (u = r.state.selection.to, h = "end") : (u = r.state.selection.from, h = "start"), r.input.lastKeyCode = null;
|
|
8010
8009
|
let f = Ra(d.content, a.doc.content, a.from, u, h);
|
|
8011
|
-
if ((
|
|
8010
|
+
if ((Ze && r.input.lastIOSEnter > Date.now() - 225 || ee) && i.some((C) => C.nodeType == 1 && !Da.test(C.nodeName)) && (!f || f.endA >= f.endB) && r.someProp("handleKeyDown", (C) => C(r, Ne(13, "Enter")))) {
|
|
8012
8011
|
r.input.lastIOSEnter = 0;
|
|
8013
8012
|
return;
|
|
8014
8013
|
}
|
|
@@ -8017,7 +8016,7 @@ function Aa(r, e, t, n, i) {
|
|
|
8017
8016
|
f = { start: l.from, endA: l.to, endB: l.to };
|
|
8018
8017
|
else {
|
|
8019
8018
|
if (a.sel) {
|
|
8020
|
-
let C =
|
|
8019
|
+
let C = Qr(r, r.state.doc, a.sel);
|
|
8021
8020
|
if (C && !C.eq(r.state.selection)) {
|
|
8022
8021
|
let fe = r.state.tr.setSelection(C);
|
|
8023
8022
|
r.composing && fe.setMeta("composition", r.input.compositionID), r.dispatch(fe);
|
|
@@ -8031,7 +8030,7 @@ function Aa(r, e, t, n, i) {
|
|
|
8031
8030
|
}
|
|
8032
8031
|
r.input.domChangeCount++, r.state.selection.from < r.state.selection.to && f.start == f.endB && r.state.selection instanceof E && (f.start > r.state.selection.from && f.start <= r.state.selection.from + 2 && r.state.selection.from >= a.from ? f.start = r.state.selection.from : f.endA < r.state.selection.to && f.endA >= r.state.selection.to - 2 && r.state.selection.to <= a.to && (f.endB += r.state.selection.to - f.endA, f.endA = r.state.selection.to)), q && xe <= 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--);
|
|
8033
8032
|
let p = a.doc.resolveNoCache(f.start - a.from), m = a.doc.resolveNoCache(f.endB - a.from), g = c.resolve(f.start), b = p.sameParent(m) && p.parent.inlineContent && g.end() >= f.endA, M;
|
|
8034
|
-
if ((
|
|
8033
|
+
if ((Ze && r.input.lastIOSEnter > Date.now() - 225 && (!b || i.some((C) => C.nodeName == "DIV" || C.nodeName == "P")) || !b && p.pos < a.doc.content.size && (M = O.findFrom(a.doc.resolve(p.pos + 1), 1, !0)) && M.head == m.pos) && r.someProp("handleKeyDown", (C) => C(r, Ne(13, "Enter")))) {
|
|
8035
8034
|
r.input.lastIOSEnter = 0;
|
|
8036
8035
|
return;
|
|
8037
8036
|
}
|
|
@@ -8061,12 +8060,12 @@ function Aa(r, e, t, n, i) {
|
|
|
8061
8060
|
}
|
|
8062
8061
|
}
|
|
8063
8062
|
if (N || (N = r.state.tr.replace(w, v, a.doc.slice(f.start - a.from, f.endB - a.from))), a.sel) {
|
|
8064
|
-
let C =
|
|
8063
|
+
let C = Qr(r, N.doc, a.sel);
|
|
8065
8064
|
C && !(H && ee && r.composing && C.empty && (f.start != f.endB || r.input.lastAndroidDelete < Date.now() - 100) && (C.head == w || C.head == N.mapping.map(v) - 1) || q && C.empty && C.head == w) && N.setSelection(C);
|
|
8066
8065
|
}
|
|
8067
8066
|
A && N.ensureMarks(A), r.composing && N.setMeta("composition", r.input.compositionID), r.dispatch(N.scrollIntoView());
|
|
8068
8067
|
}
|
|
8069
|
-
function
|
|
8068
|
+
function Qr(r, e, t) {
|
|
8070
8069
|
return Math.max(t.anchor, t.head) > e.content.size ? null : Gn(r, e.resolve(t.anchor), e.resolve(t.head));
|
|
8071
8070
|
}
|
|
8072
8071
|
function va(r, e) {
|
|
@@ -8136,7 +8135,7 @@ class Pa {
|
|
|
8136
8135
|
added to the document.
|
|
8137
8136
|
*/
|
|
8138
8137
|
constructor(e, t) {
|
|
8139
|
-
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 ea(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(ri), 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 = ti(this), ei(this), this.nodeViews = ni(this), this.docView = Br(this.state.doc,
|
|
8138
|
+
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 ea(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(ri), 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 = ti(this), ei(this), this.nodeViews = ni(this), this.docView = Br(this.state.doc, Zr(this), fn(this), this.dom, this), this.domObserver = new wa(this, (n, i, s, o) => Aa(this, n, i, s, o)), this.domObserver.start(), ta(this), this.updatePluginViews();
|
|
8140
8139
|
}
|
|
8141
8140
|
/**
|
|
8142
8141
|
Holds `true` when a
|
|
@@ -8198,7 +8197,7 @@ class Pa {
|
|
|
8198
8197
|
za(h, this.nodeViews) && (this.nodeViews = h, i = !0);
|
|
8199
8198
|
}
|
|
8200
8199
|
(o || t.handleDOMEvents != this._props.handleDOMEvents) && Fn(this), this.editable = ti(this), ei(this);
|
|
8201
|
-
let l = fn(this), a =
|
|
8200
|
+
let l = fn(this), a = Zr(this), c = n.plugins != e.plugins && !n.doc.eq(e.doc) ? "reset" : e.scrollToSelection > n.scrollToSelection ? "to selection" : "preserve", d = i || !this.docView.matchesNode(e.doc, a, l);
|
|
8202
8201
|
(d || !e.selection.eq(n.selection)) && (s = !0);
|
|
8203
8202
|
let u = c == "preserve" && s && this.dom.style.overflowAnchor == null && bl(this);
|
|
8204
8203
|
if (s) {
|
|
@@ -8441,7 +8440,7 @@ class Pa {
|
|
|
8441
8440
|
return this.root.getSelection();
|
|
8442
8441
|
}
|
|
8443
8442
|
}
|
|
8444
|
-
function
|
|
8443
|
+
function Zr(r) {
|
|
8445
8444
|
let e = /* @__PURE__ */ Object.create(null);
|
|
8446
8445
|
return e.class = "ProseMirror", e.contenteditable = String(r.editable), e.translate = "no", r.someProp("attributes", (t) => {
|
|
8447
8446
|
if (typeof t == "function" && (t = t(r.state)), t)
|
|
@@ -8609,7 +8608,7 @@ function gn(r, e, t = !0) {
|
|
|
8609
8608
|
return e.altKey && (r = "Alt-" + r), e.ctrlKey && (r = "Ctrl-" + r), e.metaKey && (r = "Meta-" + r), t && e.shiftKey && (r = "Shift-" + r), r;
|
|
8610
8609
|
}
|
|
8611
8610
|
function Ja(r) {
|
|
8612
|
-
return new
|
|
8611
|
+
return new Z({ props: { handleKeyDown: qa(r) } });
|
|
8613
8612
|
}
|
|
8614
8613
|
function qa(r) {
|
|
8615
8614
|
let e = Wa(r);
|
|
@@ -8717,7 +8716,7 @@ const Xa = (r, e, t) => {
|
|
|
8717
8716
|
}
|
|
8718
8717
|
}
|
|
8719
8718
|
return s.isAtom && i.depth == n.depth - 1 ? (e && e(r.tr.delete(i.pos, i.pos + s.nodeSize).scrollIntoView()), !0) : !1;
|
|
8720
|
-
},
|
|
8719
|
+
}, Qa = (r, e, t) => {
|
|
8721
8720
|
let { $head: n, empty: i } = r.selection, s = n;
|
|
8722
8721
|
if (!i)
|
|
8723
8722
|
return !1;
|
|
@@ -8740,7 +8739,7 @@ function As(r) {
|
|
|
8740
8739
|
}
|
|
8741
8740
|
return null;
|
|
8742
8741
|
}
|
|
8743
|
-
const
|
|
8742
|
+
const Za = (r, e) => {
|
|
8744
8743
|
let t = r.selection, n = t instanceof x, i;
|
|
8745
8744
|
if (n) {
|
|
8746
8745
|
if (t.node.isTextblock || !He(r.doc, t.from))
|
|
@@ -9374,7 +9373,7 @@ function bn(r) {
|
|
|
9374
9373
|
}), d;
|
|
9375
9374
|
}
|
|
9376
9375
|
function Cc(r) {
|
|
9377
|
-
const { editor: e, rules: t } = r, n = new
|
|
9376
|
+
const { editor: e, rules: t } = r, n = new Z({
|
|
9378
9377
|
state: {
|
|
9379
9378
|
init() {
|
|
9380
9379
|
return null;
|
|
@@ -9472,7 +9471,7 @@ function Tc(r) {
|
|
|
9472
9471
|
function Ec(r) {
|
|
9473
9472
|
const { editor: e, rules: t } = r;
|
|
9474
9473
|
let n = null, i = !1, s = !1;
|
|
9475
|
-
return t.map((l) => new
|
|
9474
|
+
return t.map((l) => new Z({
|
|
9476
9475
|
// we register a global drag handler to track the current drag source element
|
|
9477
9476
|
view(a) {
|
|
9478
9477
|
const c = (d) => {
|
|
@@ -9668,7 +9667,7 @@ function Xt(r, e) {
|
|
|
9668
9667
|
kn(e[n]) ? n in r ? t[n] = Xt(r[n], e[n]) : Object.assign(t, { [n]: e[n] }) : Object.assign(t, { [n]: e[n] });
|
|
9669
9668
|
}), t;
|
|
9670
9669
|
}
|
|
9671
|
-
class
|
|
9670
|
+
class Q {
|
|
9672
9671
|
constructor(e = {}) {
|
|
9673
9672
|
this.type = "extension", this.name = "extension", this.parent = null, this.child = null, this.config = {
|
|
9674
9673
|
name: this.name,
|
|
@@ -9684,7 +9683,7 @@ class Z {
|
|
|
9684
9683
|
})) || {};
|
|
9685
9684
|
}
|
|
9686
9685
|
static create(e = {}) {
|
|
9687
|
-
return new
|
|
9686
|
+
return new Q(e);
|
|
9688
9687
|
}
|
|
9689
9688
|
configure(e = {}) {
|
|
9690
9689
|
const t = this.extend();
|
|
@@ -9694,7 +9693,7 @@ class Z {
|
|
|
9694
9693
|
})), t;
|
|
9695
9694
|
}
|
|
9696
9695
|
extend(e = {}) {
|
|
9697
|
-
const t = new
|
|
9696
|
+
const t = new Q(e);
|
|
9698
9697
|
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 = T(S(t, "addOptions", {
|
|
9699
9698
|
name: t.name
|
|
9700
9699
|
})), t.storage = T(S(t, "addStorage", {
|
|
@@ -9723,11 +9722,11 @@ function zs(r, e, t) {
|
|
|
9723
9722
|
function Fs(r) {
|
|
9724
9723
|
return Object.fromEntries(Object.entries(r.nodes).filter(([, e]) => e.spec.toText).map(([e, t]) => [e, t.spec.toText]));
|
|
9725
9724
|
}
|
|
9726
|
-
const Ac =
|
|
9725
|
+
const Ac = Q.create({
|
|
9727
9726
|
name: "clipboardTextSerializer",
|
|
9728
9727
|
addProseMirrorPlugins() {
|
|
9729
9728
|
return [
|
|
9730
|
-
new
|
|
9729
|
+
new Z({
|
|
9731
9730
|
key: new he("clipboardTextSerializer"),
|
|
9732
9731
|
props: {
|
|
9733
9732
|
clipboardTextSerializer: () => {
|
|
@@ -9946,7 +9945,7 @@ const Gc = (r) => r.toString().startsWith("<"), Yc = (r, e, t) => ({ tr: n, disp
|
|
|
9946
9945
|
c ? Array.isArray(e) ? n.insertText(e.map((h) => h.text || "").join(""), l, a) : typeof e == "object" && e && e.text ? n.insertText(e.text, l, a) : n.insertText(e, l, a) : n.replaceWith(l, a, o), t.updateSelection && Uc(n, n.steps.length - 1, -1);
|
|
9947
9946
|
}
|
|
9948
9947
|
return !0;
|
|
9949
|
-
}, Xc = () => ({ state: r, dispatch: e }) =>
|
|
9948
|
+
}, Xc = () => ({ state: r, dispatch: e }) => Za(r, e), Qc = () => ({ state: r, dispatch: e }) => ec(r, e), Zc = () => ({ state: r, dispatch: e }) => Ua(r, e), ed = () => ({ state: r, dispatch: e }) => Xa(r, e);
|
|
9950
9949
|
function Vs() {
|
|
9951
9950
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
9952
9951
|
}
|
|
@@ -10011,7 +10010,7 @@ const rd = (r, e = {}) => ({ state: t, dispatch: n }) => {
|
|
|
10011
10010
|
const n = B(r, e.schema);
|
|
10012
10011
|
return fc(n)(e, t);
|
|
10013
10012
|
}, od = () => ({ state: r, dispatch: e }) => nc(r, e);
|
|
10014
|
-
function
|
|
10013
|
+
function Qt(r, e) {
|
|
10015
10014
|
return e.nodes[r] ? "node" : e.marks[r] ? "mark" : null;
|
|
10016
10015
|
}
|
|
10017
10016
|
function di(r, e) {
|
|
@@ -10020,7 +10019,7 @@ function di(r, e) {
|
|
|
10020
10019
|
}
|
|
10021
10020
|
const ld = (r, e) => ({ tr: t, state: n, dispatch: i }) => {
|
|
10022
10021
|
let s = null, o = null;
|
|
10023
|
-
const l =
|
|
10022
|
+
const l = Qt(typeof r == "string" ? r : r.name, n.schema);
|
|
10024
10023
|
return l ? (l === "node" && (s = B(r, n.schema)), l === "mark" && (o = Te(r, n.schema)), i && t.selection.ranges.forEach((a) => {
|
|
10025
10024
|
n.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, d) => {
|
|
10026
10025
|
s && s === c.type && t.setNodeMarkup(d, void 0, di(c.attrs, e)), o && c.marks.length && c.marks.forEach((u) => {
|
|
@@ -10031,7 +10030,7 @@ const ld = (r, e) => ({ tr: t, state: n, dispatch: i }) => {
|
|
|
10031
10030
|
}, ad = () => ({ tr: r, dispatch: e }) => (e && r.scrollIntoView(), !0), cd = () => ({ tr: r, commands: e }) => e.setTextSelection({
|
|
10032
10031
|
from: 0,
|
|
10033
10032
|
to: r.doc.content.size
|
|
10034
|
-
}), dd = () => ({ state: r, dispatch: e }) => Ga(r, e), ud = () => ({ state: r, dispatch: e }) =>
|
|
10033
|
+
}), dd = () => ({ state: r, dispatch: e }) => Ga(r, e), ud = () => ({ state: r, dispatch: e }) => Qa(r, e), hd = () => ({ state: r, dispatch: e }) => oc(r, e), fd = () => ({ state: r, dispatch: e }) => cc(r, e), pd = () => ({ state: r, dispatch: e }) => ac(r, e);
|
|
10035
10034
|
function js(r, e, t = {}) {
|
|
10036
10035
|
return Ht(r, e, { slice: !1, parseOptions: t });
|
|
10037
10036
|
}
|
|
@@ -10107,7 +10106,7 @@ function Md(r, e) {
|
|
|
10107
10106
|
return o ? { ...o.attrs } : {};
|
|
10108
10107
|
}
|
|
10109
10108
|
function Cd(r, e) {
|
|
10110
|
-
const t =
|
|
10109
|
+
const t = Qt(typeof e == "string" ? e : e.name, r.schema);
|
|
10111
10110
|
return t === "node" ? Md(r, e) : t === "mark" ? Hs(r, e) : {};
|
|
10112
10111
|
}
|
|
10113
10112
|
function wd(r, e = JSON.stringify) {
|
|
@@ -10198,7 +10197,7 @@ function jn(r, e, t = {}) {
|
|
|
10198
10197
|
function Nd(r, e, t = {}) {
|
|
10199
10198
|
if (!e)
|
|
10200
10199
|
return kt(r, null, t) || jn(r, null, t);
|
|
10201
|
-
const n =
|
|
10200
|
+
const n = Qt(e, r.schema);
|
|
10202
10201
|
return n === "node" ? kt(r, e, t) : n === "mark" ? jn(r, e, t) : !1;
|
|
10203
10202
|
}
|
|
10204
10203
|
function ui(r, e) {
|
|
@@ -10464,7 +10463,7 @@ const Ld = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
|
|
|
10464
10463
|
return t.removeStoredMark(a), !0;
|
|
10465
10464
|
}, _d = (r, e = {}) => ({ tr: t, state: n, dispatch: i }) => {
|
|
10466
10465
|
let s = null, o = null;
|
|
10467
|
-
const l =
|
|
10466
|
+
const l = Qt(typeof r == "string" ? r : r.name, n.schema);
|
|
10468
10467
|
return l ? (l === "node" && (s = B(r, n.schema)), l === "mark" && (o = Te(r, n.schema)), i && t.selection.ranges.forEach((a) => {
|
|
10469
10468
|
const c = a.$from.pos, d = a.$to.pos;
|
|
10470
10469
|
n.doc.nodesBetween(c, d, (u, h) => {
|
|
@@ -10509,8 +10508,8 @@ var Yd = /* @__PURE__ */ Object.freeze({
|
|
|
10509
10508
|
insertContent: _c,
|
|
10510
10509
|
insertContentAt: Yc,
|
|
10511
10510
|
joinUp: Xc,
|
|
10512
|
-
joinDown:
|
|
10513
|
-
joinBackward:
|
|
10511
|
+
joinDown: Qc,
|
|
10512
|
+
joinBackward: Zc,
|
|
10514
10513
|
joinForward: ed,
|
|
10515
10514
|
keyboardShortcut: nd,
|
|
10516
10515
|
lift: rd,
|
|
@@ -10545,18 +10544,18 @@ var Yd = /* @__PURE__ */ Object.freeze({
|
|
|
10545
10544
|
wrapIn: Ud,
|
|
10546
10545
|
wrapInList: Gd
|
|
10547
10546
|
});
|
|
10548
|
-
const Xd =
|
|
10547
|
+
const Xd = Q.create({
|
|
10549
10548
|
name: "commands",
|
|
10550
10549
|
addCommands() {
|
|
10551
10550
|
return {
|
|
10552
10551
|
...Yd
|
|
10553
10552
|
};
|
|
10554
10553
|
}
|
|
10555
|
-
}),
|
|
10554
|
+
}), Qd = Q.create({
|
|
10556
10555
|
name: "editable",
|
|
10557
10556
|
addProseMirrorPlugins() {
|
|
10558
10557
|
return [
|
|
10559
|
-
new
|
|
10558
|
+
new Z({
|
|
10560
10559
|
key: new he("editable"),
|
|
10561
10560
|
props: {
|
|
10562
10561
|
editable: () => this.editor.options.editable
|
|
@@ -10564,12 +10563,12 @@ const Xd = Z.create({
|
|
|
10564
10563
|
})
|
|
10565
10564
|
];
|
|
10566
10565
|
}
|
|
10567
|
-
}),
|
|
10566
|
+
}), Zd = Q.create({
|
|
10568
10567
|
name: "focusEvents",
|
|
10569
10568
|
addProseMirrorPlugins() {
|
|
10570
10569
|
const { editor: r } = this;
|
|
10571
10570
|
return [
|
|
10572
|
-
new
|
|
10571
|
+
new Z({
|
|
10573
10572
|
key: new he("focusEvents"),
|
|
10574
10573
|
props: {
|
|
10575
10574
|
handleDOMEvents: {
|
|
@@ -10588,7 +10587,7 @@ const Xd = Z.create({
|
|
|
10588
10587
|
})
|
|
10589
10588
|
];
|
|
10590
10589
|
}
|
|
10591
|
-
}), eu =
|
|
10590
|
+
}), eu = Q.create({
|
|
10592
10591
|
name: "keymap",
|
|
10593
10592
|
addKeyboardShortcuts() {
|
|
10594
10593
|
const r = () => this.editor.commands.first(({ commands: o }) => [
|
|
@@ -10642,7 +10641,7 @@ const Xd = Z.create({
|
|
|
10642
10641
|
// to a paragraph if necessary.
|
|
10643
10642
|
// This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well
|
|
10644
10643
|
// with many other commands.
|
|
10645
|
-
new
|
|
10644
|
+
new Z({
|
|
10646
10645
|
key: new he("clearDocument"),
|
|
10647
10646
|
appendTransaction: (r, e, t) => {
|
|
10648
10647
|
if (!(r.some((p) => p.docChanged) && !e.doc.eq(t.doc)))
|
|
@@ -10663,11 +10662,11 @@ const Xd = Z.create({
|
|
|
10663
10662
|
})
|
|
10664
10663
|
];
|
|
10665
10664
|
}
|
|
10666
|
-
}), tu =
|
|
10665
|
+
}), tu = Q.create({
|
|
10667
10666
|
name: "tabindex",
|
|
10668
10667
|
addProseMirrorPlugins() {
|
|
10669
10668
|
return [
|
|
10670
|
-
new
|
|
10669
|
+
new Z({
|
|
10671
10670
|
key: new he("tabindex"),
|
|
10672
10671
|
props: {
|
|
10673
10672
|
attributes: this.editor.isEditable ? { tabindex: "0" } : {}
|
|
@@ -10680,8 +10679,8 @@ var nu = /* @__PURE__ */ Object.freeze({
|
|
|
10680
10679
|
__proto__: null,
|
|
10681
10680
|
ClipboardTextSerializer: Ac,
|
|
10682
10681
|
Commands: Xd,
|
|
10683
|
-
Editable:
|
|
10684
|
-
FocusEvents:
|
|
10682
|
+
Editable: Qd,
|
|
10683
|
+
FocusEvents: Zd,
|
|
10685
10684
|
Keymap: eu,
|
|
10686
10685
|
Tabindex: tu
|
|
10687
10686
|
});
|
|
@@ -11209,11 +11208,11 @@ class ou {
|
|
|
11209
11208
|
!((e = this.tippy) === null || e === void 0) && e.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (t = this.tippy) === null || t === void 0 || t.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
|
|
11210
11209
|
}
|
|
11211
11210
|
}
|
|
11212
|
-
const Ws = (r) => new
|
|
11211
|
+
const Ws = (r) => new Z({
|
|
11213
11212
|
key: typeof r.pluginKey == "string" ? new he(r.pluginKey) : r.pluginKey,
|
|
11214
11213
|
view: (e) => new ou({ view: e, ...r })
|
|
11215
11214
|
});
|
|
11216
|
-
|
|
11215
|
+
Q.create({
|
|
11217
11216
|
name: "bubbleMenu",
|
|
11218
11217
|
addOptions() {
|
|
11219
11218
|
return {
|
|
@@ -11301,11 +11300,11 @@ class lu {
|
|
|
11301
11300
|
!((e = this.tippy) === null || e === void 0) && e.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (t = this.tippy) === null || t === void 0 || t.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
|
|
11302
11301
|
}
|
|
11303
11302
|
}
|
|
11304
|
-
const Js = (r) => new
|
|
11303
|
+
const Js = (r) => new Z({
|
|
11305
11304
|
key: typeof r.pluginKey == "string" ? new he(r.pluginKey) : r.pluginKey,
|
|
11306
11305
|
view: (e) => new lu({ view: e, ...r })
|
|
11307
11306
|
});
|
|
11308
|
-
|
|
11307
|
+
Q.create({
|
|
11309
11308
|
name: "floatingMenu",
|
|
11310
11309
|
addOptions() {
|
|
11311
11310
|
return {
|
|
@@ -11373,7 +11372,7 @@ xt({
|
|
|
11373
11372
|
}
|
|
11374
11373
|
});
|
|
11375
11374
|
function fi(r) {
|
|
11376
|
-
return
|
|
11375
|
+
return lo((e, t) => ({
|
|
11377
11376
|
get() {
|
|
11378
11377
|
return e(), r;
|
|
11379
11378
|
},
|
|
@@ -11388,9 +11387,9 @@ function fi(r) {
|
|
|
11388
11387
|
}
|
|
11389
11388
|
class au extends su {
|
|
11390
11389
|
constructor(e = {}) {
|
|
11391
|
-
return super(e), this.vueRenderers =
|
|
11390
|
+
return super(e), this.vueRenderers = eo(/* @__PURE__ */ new Map()), this.contentComponent = null, this.reactiveState = fi(this.view.state), this.reactiveExtensionStorage = fi(this.extensionStorage), this.on("transaction", () => {
|
|
11392
11391
|
this.reactiveState.value = this.view.state, this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
11393
|
-
}),
|
|
11392
|
+
}), to(this);
|
|
11394
11393
|
}
|
|
11395
11394
|
get state() {
|
|
11396
11395
|
return this.reactiveState ? this.reactiveState.value : this.view.state;
|
|
@@ -11420,13 +11419,13 @@ const cu = xt({
|
|
|
11420
11419
|
}
|
|
11421
11420
|
},
|
|
11422
11421
|
setup(r) {
|
|
11423
|
-
const e = $n(), t =
|
|
11424
|
-
return
|
|
11422
|
+
const e = $n(), t = no();
|
|
11423
|
+
return ro(() => {
|
|
11425
11424
|
const n = r.editor;
|
|
11426
|
-
n && n.options.element && e.value &&
|
|
11425
|
+
n && n.options.element && e.value && io(() => {
|
|
11427
11426
|
if (!e.value || !n.options.element.firstChild)
|
|
11428
11427
|
return;
|
|
11429
|
-
const i =
|
|
11428
|
+
const i = so(e.value);
|
|
11430
11429
|
e.value.append(...n.options.element.childNodes), n.contentComponent = t.ctx._, n.setOptions({
|
|
11431
11430
|
element: i
|
|
11432
11431
|
}), n.createNodeViews();
|
|
@@ -11446,7 +11445,7 @@ const cu = xt({
|
|
|
11446
11445
|
render() {
|
|
11447
11446
|
const r = [];
|
|
11448
11447
|
return this.editor && this.editor.vueRenderers.forEach((e) => {
|
|
11449
|
-
const t = Ie(
|
|
11448
|
+
const t = Ie(oo, {
|
|
11450
11449
|
to: e.teleportElement,
|
|
11451
11450
|
key: e.id
|
|
11452
11451
|
}, Ie(e.component, {
|
|
@@ -11573,7 +11572,7 @@ const du = nt.create({
|
|
|
11573
11572
|
"Mod-Alt-0": () => this.editor.commands.setParagraph()
|
|
11574
11573
|
};
|
|
11575
11574
|
}
|
|
11576
|
-
}), hu =
|
|
11575
|
+
}), hu = Q.create({
|
|
11577
11576
|
name: "placeholder",
|
|
11578
11577
|
addOptions() {
|
|
11579
11578
|
return {
|
|
@@ -11587,7 +11586,7 @@ const du = nt.create({
|
|
|
11587
11586
|
},
|
|
11588
11587
|
addProseMirrorPlugins() {
|
|
11589
11588
|
return [
|
|
11590
|
-
new
|
|
11589
|
+
new Z({
|
|
11591
11590
|
key: new he("placeholder"),
|
|
11592
11591
|
props: {
|
|
11593
11592
|
decorations: ({ doc: r, selection: e }) => {
|
|
@@ -11695,7 +11694,7 @@ function mi(r, e, t, n, i, s) {
|
|
|
11695
11694
|
}
|
|
11696
11695
|
function ku(r) {
|
|
11697
11696
|
let e = !1;
|
|
11698
|
-
return new
|
|
11697
|
+
return new Z({
|
|
11699
11698
|
key: new he("autolink"),
|
|
11700
11699
|
appendTransaction: (t, n, i) => {
|
|
11701
11700
|
const s = t.some((d) => d.docChanged) && !n.doc.eq(i.doc);
|
|
@@ -11972,7 +11971,7 @@ const Mu = {
|
|
|
11972
11971
|
};
|
|
11973
11972
|
function Cu(r, e, t, n, i, s) {
|
|
11974
11973
|
const o = Ee("editor-content");
|
|
11975
|
-
return Mn(),
|
|
11974
|
+
return Mn(), ao(o, {
|
|
11976
11975
|
editor: i.editor,
|
|
11977
11976
|
"data-qa": "dt-rich-text-editor"
|
|
11978
11977
|
}, null, 8, ["editor"]);
|
|
@@ -11982,8 +11981,8 @@ const Ou = {
|
|
|
11982
11981
|
name: "DtRecipeMessageInput",
|
|
11983
11982
|
components: {
|
|
11984
11983
|
DtButton: Ys,
|
|
11985
|
-
DtEmojiPicker:
|
|
11986
|
-
DtIcon:
|
|
11984
|
+
DtEmojiPicker: Xs,
|
|
11985
|
+
DtIcon: Qs,
|
|
11987
11986
|
DtInput: Zs,
|
|
11988
11987
|
DtPopover: fo,
|
|
11989
11988
|
DtRichTextEditor: wu
|
|
@@ -12235,7 +12234,7 @@ function Iu(r, e, t, n, i, s) {
|
|
|
12235
12234
|
class: cr(["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 }])
|
|
12236
12235
|
}, [
|
|
12237
12236
|
pe("div", Tu, [
|
|
12238
|
-
re(o,
|
|
12237
|
+
re(o, co({
|
|
12239
12238
|
modelValue: i.inputValue,
|
|
12240
12239
|
"onUpdate:modelValue": e[0] || (e[0] = (h) => i.inputValue = h),
|
|
12241
12240
|
editable: t.editable,
|
|
@@ -12250,7 +12249,7 @@ function Iu(r, e, t, n, i, s) {
|
|
|
12250
12249
|
onBlur: e[2] || (e[2] = (h) => i.hasFocus = !1)
|
|
12251
12250
|
}), null, 16, ["modelValue", "editable", "input-aria-label", "input-class", "output-format", "auto-focus", "link", "placeholder"])
|
|
12252
12251
|
]),
|
|
12253
|
-
|
|
12252
|
+
Zt(r.$slots, "middle"),
|
|
12254
12253
|
pe("section", Eu, [
|
|
12255
12254
|
pe("div", Nu, [
|
|
12256
12255
|
re(a, {
|
|
@@ -12317,7 +12316,7 @@ function Iu(r, e, t, n, i, s) {
|
|
|
12317
12316
|
}, 8, ["open"])
|
|
12318
12317
|
]),
|
|
12319
12318
|
pe("div", Du, [
|
|
12320
|
-
s.displayCharacterLimitWarning ? (Mn(), ar("p", Au,
|
|
12319
|
+
s.displayCharacterLimitWarning ? (Mn(), ar("p", Au, uo(t.characterLimitCount - s.inputLength), 1)) : ho("", !0),
|
|
12321
12320
|
re(a, {
|
|
12322
12321
|
size: "sm",
|
|
12323
12322
|
circle: "",
|
|
@@ -12343,15 +12342,15 @@ function Iu(r, e, t, n, i, s) {
|
|
|
12343
12342
|
], 2),
|
|
12344
12343
|
pe("section", vu, [
|
|
12345
12344
|
pe("div", null, [
|
|
12346
|
-
|
|
12345
|
+
Zt(r.$slots, "footerLeft")
|
|
12347
12346
|
]),
|
|
12348
12347
|
pe("div", null, [
|
|
12349
|
-
|
|
12348
|
+
Zt(r.$slots, "footerRight")
|
|
12350
12349
|
])
|
|
12351
12350
|
])
|
|
12352
12351
|
], 32);
|
|
12353
12352
|
}
|
|
12354
|
-
const
|
|
12353
|
+
const Fu = /* @__PURE__ */ yi(Ou, [["render", Iu]]);
|
|
12355
12354
|
export {
|
|
12356
|
-
|
|
12355
|
+
Fu as DtRecipeMessageInput
|
|
12357
12356
|
};
|