@pie-element/extended-text-entry 15.1.2-next.6 → 15.1.2-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/author/index.js +1 -1
- package/dist/browser/controller/index.js +1 -1
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +2 -2
- package/dist/browser/{dist-BbUdUT_D.js → dist-BgIZCJg9.js} +349 -262
- package/dist/browser/dist-BgIZCJg9.js.map +1 -0
- package/dist/browser/{main-CXlds066.js → main-D2VwE_Cm.js} +2 -2
- package/dist/browser/{main-CXlds066.js.map → main-D2VwE_Cm.js.map} +1 -1
- package/dist/browser/print/index.js +2 -2
- package/dist/controller/index.js +1 -1
- package/dist/index.iife.js +49 -49
- package/package.json +6 -4
- package/dist/browser/dist-BbUdUT_D.js.map +0 -1
|
@@ -47695,8 +47695,8 @@ Mb.create({
|
|
|
47695
47695
|
})) ?? null };
|
|
47696
47696
|
}
|
|
47697
47697
|
});
|
|
47698
|
-
var R6 = "placeholder", z6 = new zu("tiptap__placeholder")
|
|
47699
|
-
function
|
|
47698
|
+
var R6 = "placeholder", z6 = new zu("tiptap__placeholder");
|
|
47699
|
+
function B6(e) {
|
|
47700
47700
|
let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: o, hasAnchor: s, classes: { emptyNode: c, emptyEditor: l } } = e, u = [c];
|
|
47701
47701
|
return o && u.push(l), Fg.node(i, i + a.nodeSize, {
|
|
47702
47702
|
class: u.join(" "),
|
|
@@ -47708,156 +47708,198 @@ function V6(e) {
|
|
|
47708
47708
|
}) : n
|
|
47709
47709
|
});
|
|
47710
47710
|
}
|
|
47711
|
-
function
|
|
47711
|
+
function V6(e, t) {
|
|
47712
|
+
return typeof e == "function" ? e(t) : e;
|
|
47713
|
+
}
|
|
47714
|
+
function H6({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
|
|
47715
|
+
let { anchor: s } = i, c = [], l = e.isEmpty;
|
|
47716
|
+
return r.nodesBetween(a, o, (r, i) => {
|
|
47717
|
+
let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && By(r);
|
|
47718
|
+
return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(B6({
|
|
47719
|
+
editor: e,
|
|
47720
|
+
isEmptyDoc: l,
|
|
47721
|
+
dataAttribute: n,
|
|
47722
|
+
hasAnchor: a,
|
|
47723
|
+
placeholder: t.placeholder,
|
|
47724
|
+
classes: {
|
|
47725
|
+
emptyEditor: t.emptyEditorClass,
|
|
47726
|
+
emptyNode: V6(t.emptyNodeClass, {
|
|
47727
|
+
editor: e,
|
|
47728
|
+
node: r,
|
|
47729
|
+
pos: i,
|
|
47730
|
+
hasAnchor: a
|
|
47731
|
+
})
|
|
47732
|
+
},
|
|
47733
|
+
node: r,
|
|
47734
|
+
pos: i
|
|
47735
|
+
})), t.includeChildren;
|
|
47736
|
+
}), c;
|
|
47737
|
+
}
|
|
47738
|
+
function U6({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
47712
47739
|
if (!(e.isEditable || !t.showOnlyWhenEditable)) return null;
|
|
47713
|
-
let { anchor: a } = i, o = [], s = e.isEmpty
|
|
47714
|
-
emptyEditor: t.emptyEditorClass,
|
|
47715
|
-
emptyNode: t.emptyNodeClass
|
|
47716
|
-
};
|
|
47740
|
+
let { anchor: a } = i, o = [], s = e.isEmpty;
|
|
47717
47741
|
if (t.showOnlyCurrent && !t.includeChildren) {
|
|
47718
|
-
let i = r.resolve(a),
|
|
47719
|
-
if (
|
|
47720
|
-
let r = a >=
|
|
47721
|
-
o.push(
|
|
47742
|
+
let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
|
|
47743
|
+
if (c && c.type.isTextblock && By(c)) {
|
|
47744
|
+
let r = a >= l && a <= l + c.nodeSize;
|
|
47745
|
+
o.push(B6({
|
|
47722
47746
|
editor: e,
|
|
47723
47747
|
isEmptyDoc: s,
|
|
47724
47748
|
dataAttribute: n,
|
|
47725
47749
|
hasAnchor: r,
|
|
47726
47750
|
placeholder: t.placeholder,
|
|
47727
|
-
classes:
|
|
47728
|
-
|
|
47729
|
-
|
|
47751
|
+
classes: {
|
|
47752
|
+
emptyEditor: t.emptyEditorClass,
|
|
47753
|
+
emptyNode: V6(t.emptyNodeClass, {
|
|
47754
|
+
editor: e,
|
|
47755
|
+
node: c,
|
|
47756
|
+
pos: l,
|
|
47757
|
+
hasAnchor: r
|
|
47758
|
+
})
|
|
47759
|
+
},
|
|
47760
|
+
node: c,
|
|
47761
|
+
pos: l
|
|
47730
47762
|
}));
|
|
47731
47763
|
}
|
|
47732
|
-
} else {
|
|
47733
|
-
|
|
47734
|
-
|
|
47735
|
-
|
|
47736
|
-
|
|
47737
|
-
|
|
47738
|
-
|
|
47739
|
-
|
|
47740
|
-
|
|
47741
|
-
placeholder: t.placeholder,
|
|
47742
|
-
classes: c,
|
|
47743
|
-
node: r,
|
|
47744
|
-
pos: i
|
|
47745
|
-
})), t.includeChildren;
|
|
47746
|
-
});
|
|
47747
|
-
}
|
|
47764
|
+
} else o.push(...H6({
|
|
47765
|
+
editor: e,
|
|
47766
|
+
options: t,
|
|
47767
|
+
dataAttribute: n,
|
|
47768
|
+
doc: r,
|
|
47769
|
+
selection: i,
|
|
47770
|
+
from: 0,
|
|
47771
|
+
to: r.content.size
|
|
47772
|
+
}));
|
|
47748
47773
|
return Rg.create(r, o);
|
|
47749
47774
|
}
|
|
47750
|
-
function
|
|
47751
|
-
|
|
47775
|
+
function W6(e, t) {
|
|
47776
|
+
let n = e.resolve(t);
|
|
47777
|
+
if (n.depth === 0) {
|
|
47778
|
+
let e = n.nodeAfter ?? n.nodeBefore;
|
|
47779
|
+
if (!e) return {
|
|
47780
|
+
from: t,
|
|
47781
|
+
to: t
|
|
47782
|
+
};
|
|
47783
|
+
let r = n.nodeAfter ? t : t - e.nodeSize;
|
|
47784
|
+
return {
|
|
47785
|
+
from: r,
|
|
47786
|
+
to: r + e.nodeSize
|
|
47787
|
+
};
|
|
47788
|
+
}
|
|
47789
|
+
let r = n.before(1);
|
|
47790
|
+
return {
|
|
47791
|
+
from: r,
|
|
47792
|
+
to: r + n.node(1).nodeSize
|
|
47793
|
+
};
|
|
47752
47794
|
}
|
|
47753
|
-
function
|
|
47754
|
-
|
|
47755
|
-
|
|
47795
|
+
function G6(e, t) {
|
|
47796
|
+
return {
|
|
47797
|
+
from: Math.max(0, t.from - 1),
|
|
47798
|
+
to: Math.min(e.content.size, t.to - 1)
|
|
47799
|
+
};
|
|
47756
47800
|
}
|
|
47757
|
-
function
|
|
47758
|
-
let
|
|
47759
|
-
|
|
47760
|
-
|
|
47761
|
-
|
|
47762
|
-
|
|
47763
|
-
|
|
47764
|
-
|
|
47765
|
-
|
|
47766
|
-
|
|
47767
|
-
|
|
47768
|
-
|
|
47769
|
-
|
|
47770
|
-
|
|
47801
|
+
function K6(e, t, n) {
|
|
47802
|
+
let r = [];
|
|
47803
|
+
return e.forEach((e, i) => {
|
|
47804
|
+
let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
|
|
47805
|
+
s < n && c > t && r.push({
|
|
47806
|
+
from: a,
|
|
47807
|
+
to: o
|
|
47808
|
+
});
|
|
47809
|
+
}), r;
|
|
47810
|
+
}
|
|
47811
|
+
function q6(e) {
|
|
47812
|
+
if (e.length === 0) return [];
|
|
47813
|
+
let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
|
|
47814
|
+
for (let e = 1; e < t.length; e += 1) {
|
|
47815
|
+
let r = n[n.length - 1], i = t[e];
|
|
47816
|
+
i.from <= r.to ? r.to = Math.max(r.to, i.to) : n.push({ ...i });
|
|
47771
47817
|
}
|
|
47772
|
-
return
|
|
47818
|
+
return n;
|
|
47773
47819
|
}
|
|
47774
|
-
function
|
|
47775
|
-
|
|
47776
|
-
|
|
47777
|
-
bottom: window.innerHeight
|
|
47778
|
-
} : e.getBoundingClientRect();
|
|
47820
|
+
function J6(e, t) {
|
|
47821
|
+
let n = K6(e, t.from, t.to);
|
|
47822
|
+
return n.push(G6(e, W6(e, t.from))), t.to > t.from ? n.push(G6(e, W6(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(G6(e, W6(e, Math.min(t.from + 1, e.content.size)))), n;
|
|
47779
47823
|
}
|
|
47780
|
-
function
|
|
47781
|
-
let r =
|
|
47782
|
-
|
|
47783
|
-
|
|
47784
|
-
|
|
47785
|
-
|
|
47786
|
-
|
|
47787
|
-
bottom: e.content.size
|
|
47788
|
-
};
|
|
47789
|
-
let s = getComputedStyle(t.dom).direction === "rtl" ? Math.max(r.right - 2, r.left + 2) : r.left + 2, c = t.posAtCoords({
|
|
47790
|
-
left: s,
|
|
47791
|
-
top: a + 2
|
|
47792
|
-
}), l = t.posAtCoords({
|
|
47793
|
-
left: s,
|
|
47794
|
-
top: o - 2
|
|
47795
|
-
});
|
|
47796
|
-
return {
|
|
47797
|
-
top: c ? c.pos : 0,
|
|
47798
|
-
bottom: l ? l.pos : e.content.size
|
|
47799
|
-
};
|
|
47824
|
+
function Y6(e, t, n) {
|
|
47825
|
+
let r = [];
|
|
47826
|
+
if (e.docChanged) {
|
|
47827
|
+
let t = ky(e);
|
|
47828
|
+
for (let e of t) r.push(...J6(n.doc, e.newRange));
|
|
47829
|
+
}
|
|
47830
|
+
return e.selectionSet && (r.push(G6(n.doc, W6(n.doc, e.mapping.map(t.selection.anchor)))), r.push(G6(n.doc, W6(n.doc, n.selection.anchor)))), q6(r);
|
|
47800
47831
|
}
|
|
47801
|
-
|
|
47802
|
-
|
|
47803
|
-
|
|
47804
|
-
|
|
47805
|
-
|
|
47806
|
-
|
|
47807
|
-
|
|
47808
|
-
|
|
47809
|
-
|
|
47810
|
-
|
|
47811
|
-
|
|
47812
|
-
|
|
47813
|
-
|
|
47814
|
-
|
|
47815
|
-
|
|
47816
|
-
|
|
47832
|
+
function X6(e, t, n) {
|
|
47833
|
+
let r = Math.max(0, Math.min(e, n.content.size));
|
|
47834
|
+
return {
|
|
47835
|
+
from: r,
|
|
47836
|
+
to: Math.max(r, Math.min(t, n.content.size))
|
|
47837
|
+
};
|
|
47838
|
+
}
|
|
47839
|
+
function Z6({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
|
|
47840
|
+
let s = e;
|
|
47841
|
+
for (let e of t) {
|
|
47842
|
+
let { from: t, to: c } = X6(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
|
|
47843
|
+
l.length && (s = s.remove(l));
|
|
47844
|
+
let u = H6({
|
|
47845
|
+
editor: n,
|
|
47846
|
+
options: r,
|
|
47847
|
+
dataAttribute: i,
|
|
47848
|
+
doc: a,
|
|
47849
|
+
selection: o,
|
|
47850
|
+
from: t,
|
|
47851
|
+
to: c
|
|
47852
|
+
});
|
|
47853
|
+
u.length && (s = s.add(a, u));
|
|
47817
47854
|
}
|
|
47818
|
-
|
|
47819
|
-
|
|
47820
|
-
|
|
47821
|
-
|
|
47822
|
-
|
|
47823
|
-
|
|
47824
|
-
|
|
47825
|
-
|
|
47826
|
-
|
|
47827
|
-
|
|
47828
|
-
|
|
47829
|
-
|
|
47830
|
-
|
|
47831
|
-
|
|
47832
|
-
|
|
47833
|
-
|
|
47834
|
-
|
|
47835
|
-
|
|
47836
|
-
|
|
47837
|
-
|
|
47838
|
-
|
|
47839
|
-
|
|
47840
|
-
|
|
47841
|
-
r !== null && cancelAnimationFrame(r), t.removeEventListener("scroll", a);
|
|
47855
|
+
return s;
|
|
47856
|
+
}
|
|
47857
|
+
function Q6({ editor: e, options: t, dataAttribute: n }) {
|
|
47858
|
+
return {
|
|
47859
|
+
init(r, i) {
|
|
47860
|
+
return U6({
|
|
47861
|
+
editor: e,
|
|
47862
|
+
options: t,
|
|
47863
|
+
dataAttribute: n,
|
|
47864
|
+
doc: i.doc,
|
|
47865
|
+
selection: i.selection
|
|
47866
|
+
}) ?? Rg.empty;
|
|
47867
|
+
},
|
|
47868
|
+
apply(r, i, a, o) {
|
|
47869
|
+
return !r.docChanged && !r.selectionSet ? i : Z6({
|
|
47870
|
+
decorations: i.map(r.mapping, r.doc),
|
|
47871
|
+
ranges: Y6(r, a, o),
|
|
47872
|
+
editor: e,
|
|
47873
|
+
options: t,
|
|
47874
|
+
dataAttribute: n,
|
|
47875
|
+
doc: o.doc,
|
|
47876
|
+
selection: o.selection
|
|
47877
|
+
});
|
|
47842
47878
|
}
|
|
47843
47879
|
};
|
|
47844
47880
|
}
|
|
47845
|
-
function
|
|
47846
|
-
|
|
47881
|
+
function $6(e) {
|
|
47882
|
+
return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
|
|
47883
|
+
}
|
|
47884
|
+
function e8({ editor: e, options: t }) {
|
|
47885
|
+
let n = t.dataAttribute ? `data-${$6(t.dataAttribute)}` : `data-${R6}`, r = t.showOnlyCurrent && !t.includeChildren;
|
|
47847
47886
|
return new Iu({
|
|
47848
47887
|
key: z6,
|
|
47849
|
-
state:
|
|
47850
|
-
|
|
47851
|
-
|
|
47888
|
+
...r ? {} : { state: Q6({
|
|
47889
|
+
editor: e,
|
|
47890
|
+
options: t,
|
|
47891
|
+
dataAttribute: n
|
|
47892
|
+
}) },
|
|
47893
|
+
props: { decorations: r ? ({ doc: r, selection: i }) => U6({
|
|
47852
47894
|
editor: e,
|
|
47853
47895
|
options: t,
|
|
47854
47896
|
dataAttribute: n,
|
|
47855
47897
|
doc: r,
|
|
47856
47898
|
selection: i
|
|
47857
|
-
}) }
|
|
47899
|
+
}) : (n) => t.showOnlyWhenEditable && !e.isEditable ? Rg.empty : z6.getState(n) ?? Rg.empty }
|
|
47858
47900
|
});
|
|
47859
47901
|
}
|
|
47860
|
-
var
|
|
47902
|
+
var t8 = Mb.create({
|
|
47861
47903
|
name: "placeholder",
|
|
47862
47904
|
addOptions() {
|
|
47863
47905
|
return {
|
|
@@ -47871,12 +47913,25 @@ var Z6 = Mb.create({
|
|
|
47871
47913
|
};
|
|
47872
47914
|
},
|
|
47873
47915
|
addProseMirrorPlugins() {
|
|
47874
|
-
return [
|
|
47916
|
+
return [e8({
|
|
47875
47917
|
editor: this.editor,
|
|
47876
47918
|
options: this.options
|
|
47877
47919
|
})];
|
|
47878
47920
|
}
|
|
47879
47921
|
});
|
|
47922
|
+
function n8(e, t) {
|
|
47923
|
+
return !e.selection.empty && !Vy(e.selection) && t.isEditable;
|
|
47924
|
+
}
|
|
47925
|
+
function r8(e, t) {
|
|
47926
|
+
return n8(e, t) && !t.isFocused && !t.view.dragging;
|
|
47927
|
+
}
|
|
47928
|
+
function i8() {
|
|
47929
|
+
var e;
|
|
47930
|
+
(e = window.getSelection()) == null || e.removeAllRanges();
|
|
47931
|
+
}
|
|
47932
|
+
function a8(e) {
|
|
47933
|
+
e.focus();
|
|
47934
|
+
}
|
|
47880
47935
|
Mb.create({
|
|
47881
47936
|
name: "selection",
|
|
47882
47937
|
addOptions() {
|
|
@@ -47886,13 +47941,25 @@ Mb.create({
|
|
|
47886
47941
|
let { editor: e, options: t } = this;
|
|
47887
47942
|
return [new Iu({
|
|
47888
47943
|
key: new zu("selection"),
|
|
47889
|
-
props: {
|
|
47890
|
-
|
|
47891
|
-
|
|
47944
|
+
props: {
|
|
47945
|
+
decorations(n) {
|
|
47946
|
+
return r8(n, e) ? Rg.create(n.doc, [Fg.inline(n.selection.from, n.selection.to, { class: t.className })]) : null;
|
|
47947
|
+
},
|
|
47948
|
+
handleDOMEvents: {
|
|
47949
|
+
blur(t) {
|
|
47950
|
+
return n8(t.state, e) && i8(), !1;
|
|
47951
|
+
},
|
|
47952
|
+
focus(t) {
|
|
47953
|
+
return n8(t.state, e) && requestAnimationFrame(() => {
|
|
47954
|
+
!e.isDestroyed && t.hasFocus() && a8(t);
|
|
47955
|
+
}), !1;
|
|
47956
|
+
}
|
|
47957
|
+
}
|
|
47958
|
+
}
|
|
47892
47959
|
})];
|
|
47893
47960
|
}
|
|
47894
47961
|
});
|
|
47895
|
-
function
|
|
47962
|
+
function o8({ types: e, node: t }) {
|
|
47896
47963
|
return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
|
|
47897
47964
|
}
|
|
47898
47965
|
Mb.create({
|
|
@@ -47914,7 +47981,7 @@ Mb.create({
|
|
|
47914
47981
|
state: {
|
|
47915
47982
|
init: (e, t) => {
|
|
47916
47983
|
let r = t.tr.doc.lastChild;
|
|
47917
|
-
return !
|
|
47984
|
+
return !o8({
|
|
47918
47985
|
node: r,
|
|
47919
47986
|
types: n
|
|
47920
47987
|
});
|
|
@@ -47922,7 +47989,7 @@ Mb.create({
|
|
|
47922
47989
|
apply: (e, t) => {
|
|
47923
47990
|
if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
|
|
47924
47991
|
let r = e.doc.lastChild;
|
|
47925
|
-
return !
|
|
47992
|
+
return !o8({
|
|
47926
47993
|
node: r,
|
|
47927
47994
|
types: n
|
|
47928
47995
|
});
|
|
@@ -47957,7 +48024,7 @@ Mb.create({
|
|
|
47957
48024
|
};
|
|
47958
48025
|
}
|
|
47959
48026
|
});
|
|
47960
|
-
var
|
|
48027
|
+
var s8 = wb.create({
|
|
47961
48028
|
name: "superscript",
|
|
47962
48029
|
addOptions() {
|
|
47963
48030
|
return { HTMLAttributes: {} };
|
|
@@ -47987,7 +48054,7 @@ var $6 = wb.create({
|
|
|
47987
48054
|
addKeyboardShortcuts() {
|
|
47988
48055
|
return { "Mod-.": () => this.editor.commands.toggleSuperscript() };
|
|
47989
48056
|
}
|
|
47990
|
-
}),
|
|
48057
|
+
}), c8 = wb.create({
|
|
47991
48058
|
name: "subscript",
|
|
47992
48059
|
addOptions() {
|
|
47993
48060
|
return { HTMLAttributes: {} };
|
|
@@ -48017,7 +48084,7 @@ var $6 = wb.create({
|
|
|
48017
48084
|
addKeyboardShortcuts() {
|
|
48018
48085
|
return { "Mod-,": () => this.editor.commands.toggleSubscript() };
|
|
48019
48086
|
}
|
|
48020
|
-
}),
|
|
48087
|
+
}), l8 = Mb.create({
|
|
48021
48088
|
name: "textAlign",
|
|
48022
48089
|
addOptions() {
|
|
48023
48090
|
return {
|
|
@@ -48059,7 +48126,7 @@ var $6 = wb.create({
|
|
|
48059
48126
|
"Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
|
|
48060
48127
|
};
|
|
48061
48128
|
}
|
|
48062
|
-
}),
|
|
48129
|
+
}), u8 = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, d8 = cx.create({
|
|
48063
48130
|
name: "image",
|
|
48064
48131
|
addOptions() {
|
|
48065
48132
|
return {
|
|
@@ -48152,7 +48219,7 @@ var $6 = wb.create({
|
|
|
48152
48219
|
},
|
|
48153
48220
|
addInputRules() {
|
|
48154
48221
|
return [Jb({
|
|
48155
|
-
find:
|
|
48222
|
+
find: u8,
|
|
48156
48223
|
type: this.type,
|
|
48157
48224
|
getAttributes: (e) => {
|
|
48158
48225
|
let [, , t, n, r] = e;
|
|
@@ -48164,17 +48231,17 @@ var $6 = wb.create({
|
|
|
48164
48231
|
}
|
|
48165
48232
|
})];
|
|
48166
48233
|
}
|
|
48167
|
-
}),
|
|
48234
|
+
}), f8 = t8, p8 = {
|
|
48168
48235
|
position: "bottom",
|
|
48169
48236
|
alignment: "left",
|
|
48170
48237
|
alwaysVisible: !1,
|
|
48171
48238
|
showDone: !0,
|
|
48172
48239
|
doneOn: "blur"
|
|
48173
|
-
},
|
|
48240
|
+
}, m8 = {
|
|
48174
48241
|
options: {},
|
|
48175
48242
|
respAreaToolbar: () => {},
|
|
48176
48243
|
onHandleAreaChange: () => {}
|
|
48177
|
-
},
|
|
48244
|
+
}, h8 = [
|
|
48178
48245
|
"bold",
|
|
48179
48246
|
"italic",
|
|
48180
48247
|
"underline",
|
|
@@ -48196,7 +48263,7 @@ var $6 = wb.create({
|
|
|
48196
48263
|
"h3",
|
|
48197
48264
|
"undo",
|
|
48198
48265
|
"redo"
|
|
48199
|
-
],
|
|
48266
|
+
], g8 = {
|
|
48200
48267
|
"--white": "#fff",
|
|
48201
48268
|
"--black": "#2e2b29",
|
|
48202
48269
|
"--black-contrast": "#110f0e",
|
|
@@ -48215,14 +48282,18 @@ var $6 = wb.create({
|
|
|
48215
48282
|
"--red": "#ff5c33",
|
|
48216
48283
|
"--red-light": "#ffebe5",
|
|
48217
48284
|
"--shadow": "0px 12px 33px 0px rgba(0, 0, 0, .06),\n 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)"
|
|
48218
|
-
},
|
|
48285
|
+
}, _8 = (e) => ({
|
|
48286
|
+
spellcheck: e ? "true" : "false",
|
|
48287
|
+
autocorrect: e ? "on" : "off",
|
|
48288
|
+
autocapitalize: e ? "on" : "off"
|
|
48289
|
+
}), v8 = (e) => {
|
|
48219
48290
|
let { showParagraphs: t, separateParagraphs: n } = e.pluginProps || {}, [r, i] = C([]), [a, o] = C(!1), { toolbarOpts: s } = e, c = g((e) => {
|
|
48220
48291
|
i((t) => {
|
|
48221
48292
|
let n = t.filter((t) => t.pos !== e);
|
|
48222
48293
|
return n.length === 0 && o(!1), n;
|
|
48223
48294
|
});
|
|
48224
48295
|
}, [i]), l = {
|
|
48225
|
-
...
|
|
48296
|
+
...p8,
|
|
48226
48297
|
...s
|
|
48227
48298
|
}, u = g((t) => {
|
|
48228
48299
|
let n = t.getHTML();
|
|
@@ -48233,13 +48304,13 @@ var $6 = wb.create({
|
|
|
48233
48304
|
e.onDone,
|
|
48234
48305
|
l.doneOn
|
|
48235
48306
|
]), d = x(() => ({
|
|
48236
|
-
...
|
|
48307
|
+
...m8,
|
|
48237
48308
|
...e.responseAreaProps,
|
|
48238
48309
|
onInlineDropdownToolbarClose: u
|
|
48239
48310
|
}), [e.responseAreaProps, u]), f = x(() => {
|
|
48240
48311
|
let { customPlugins: t, ...n } = e.pluginProps || {};
|
|
48241
48312
|
t ||= [];
|
|
48242
|
-
let r = (e.activePlugins ||
|
|
48313
|
+
let r = (e.activePlugins || h8)?.filter((e) => {
|
|
48243
48314
|
let t = ks[e] || e, r = n[t] || {};
|
|
48244
48315
|
return !r || !r.disabled;
|
|
48245
48316
|
});
|
|
@@ -48257,103 +48328,112 @@ var $6 = wb.create({
|
|
|
48257
48328
|
setKeypadInteraction: {},
|
|
48258
48329
|
media: {}
|
|
48259
48330
|
});
|
|
48260
|
-
}, [e, d.type]), p =
|
|
48261
|
-
|
|
48262
|
-
|
|
48263
|
-
|
|
48264
|
-
|
|
48265
|
-
|
|
48266
|
-
|
|
48267
|
-
|
|
48268
|
-
|
|
48269
|
-
|
|
48270
|
-
|
|
48271
|
-
|
|
48272
|
-
|
|
48273
|
-
|
|
48274
|
-
|
|
48275
|
-
|
|
48276
|
-
|
|
48277
|
-
|
|
48278
|
-
|
|
48279
|
-
|
|
48280
|
-
|
|
48281
|
-
|
|
48282
|
-
|
|
48283
|
-
|
|
48284
|
-
|
|
48285
|
-
|
|
48286
|
-
|
|
48331
|
+
}, [e, d.type]), p = [
|
|
48332
|
+
l8.configure({
|
|
48333
|
+
types: [
|
|
48334
|
+
"heading",
|
|
48335
|
+
"paragraph",
|
|
48336
|
+
"div",
|
|
48337
|
+
"headingParagraph",
|
|
48338
|
+
"h1",
|
|
48339
|
+
"h2",
|
|
48340
|
+
"h3",
|
|
48341
|
+
"h4",
|
|
48342
|
+
"h5",
|
|
48343
|
+
"h6",
|
|
48344
|
+
"td",
|
|
48345
|
+
"th"
|
|
48346
|
+
],
|
|
48347
|
+
alignments: [
|
|
48348
|
+
"left",
|
|
48349
|
+
"right",
|
|
48350
|
+
"center",
|
|
48351
|
+
"justify"
|
|
48352
|
+
]
|
|
48353
|
+
}),
|
|
48354
|
+
I6,
|
|
48355
|
+
L6.configure({ limit: e.charactersLimit || 1e6 }),
|
|
48356
|
+
E6.configure({
|
|
48357
|
+
trailingNode: {
|
|
48287
48358
|
node: "paragraph",
|
|
48288
48359
|
notAfter: ["paragraph", "div"]
|
|
48289
|
-
}
|
|
48290
|
-
|
|
48291
|
-
|
|
48292
|
-
|
|
48293
|
-
|
|
48294
|
-
|
|
48295
|
-
|
|
48296
|
-
|
|
48297
|
-
|
|
48298
|
-
|
|
48299
|
-
|
|
48300
|
-
|
|
48301
|
-
|
|
48302
|
-
|
|
48303
|
-
|
|
48304
|
-
|
|
48305
|
-
|
|
48306
|
-
|
|
48307
|
-
|
|
48308
|
-
|
|
48309
|
-
|
|
48310
|
-
|
|
48311
|
-
|
|
48312
|
-
|
|
48313
|
-
|
|
48314
|
-
|
|
48315
|
-
|
|
48316
|
-
|
|
48317
|
-
|
|
48318
|
-
|
|
48319
|
-
|
|
48320
|
-
|
|
48321
|
-
|
|
48322
|
-
|
|
48323
|
-
|
|
48324
|
-
|
|
48325
|
-
|
|
48326
|
-
|
|
48327
|
-
|
|
48328
|
-
|
|
48329
|
-
|
|
48330
|
-
|
|
48331
|
-
|
|
48332
|
-
|
|
48333
|
-
|
|
48334
|
-
|
|
48335
|
-
|
|
48336
|
-
|
|
48337
|
-
|
|
48338
|
-
|
|
48339
|
-
|
|
48340
|
-
|
|
48341
|
-
|
|
48342
|
-
|
|
48343
|
-
|
|
48344
|
-
|
|
48345
|
-
|
|
48346
|
-
|
|
48347
|
-
|
|
48348
|
-
|
|
48349
|
-
|
|
48350
|
-
|
|
48351
|
-
|
|
48352
|
-
|
|
48360
|
+
},
|
|
48361
|
+
link: {
|
|
48362
|
+
autolink: !1,
|
|
48363
|
+
linkOnPaste: !1
|
|
48364
|
+
}
|
|
48365
|
+
}),
|
|
48366
|
+
OJ,
|
|
48367
|
+
BD,
|
|
48368
|
+
kJ,
|
|
48369
|
+
VD,
|
|
48370
|
+
HD,
|
|
48371
|
+
f8.configure({
|
|
48372
|
+
placeholder: e.placeholder,
|
|
48373
|
+
showOnlyWhenEditable: !0,
|
|
48374
|
+
showOnlyCurrent: !1,
|
|
48375
|
+
includeChildren: !0
|
|
48376
|
+
}),
|
|
48377
|
+
ID,
|
|
48378
|
+
bD,
|
|
48379
|
+
zD,
|
|
48380
|
+
RD,
|
|
48381
|
+
rU.configure(d),
|
|
48382
|
+
iU.configure(d),
|
|
48383
|
+
oU.configure(d),
|
|
48384
|
+
sU.configure(d),
|
|
48385
|
+
aU.configure(d),
|
|
48386
|
+
hG.configure({
|
|
48387
|
+
toolbarOpts: l,
|
|
48388
|
+
math: e.pluginProps?.math || {}
|
|
48389
|
+
}),
|
|
48390
|
+
c8,
|
|
48391
|
+
s8,
|
|
48392
|
+
d8,
|
|
48393
|
+
DK.configure({
|
|
48394
|
+
toolbarOpts: l,
|
|
48395
|
+
imageHandling: {
|
|
48396
|
+
disableImageAlignmentButtons: e.disableImageAlignmentButtons,
|
|
48397
|
+
onDone: (t) => e.onDone?.(t.getHTML()),
|
|
48398
|
+
onDelete: e.imageSupport && e.imageSupport.delete && ((t) => {
|
|
48399
|
+
let { src: n } = t.attrs;
|
|
48400
|
+
e.imageSupport.delete(n, (e) => {
|
|
48401
|
+
c(t.pos);
|
|
48402
|
+
});
|
|
48403
|
+
}),
|
|
48404
|
+
insertImageRequested: e.imageSupport && ((t, n, r) => {
|
|
48405
|
+
let [o, s] = n, l = (n) => {
|
|
48406
|
+
let r;
|
|
48407
|
+
a && n && (r = e.onChange), c(s), r?.(t.getHTML());
|
|
48408
|
+
};
|
|
48409
|
+
t._insertingImage = !0, i((e) => [...e, o]), (() => {
|
|
48410
|
+
let n = r(l), i = ce(() => {
|
|
48411
|
+
let e = () => window.removeEventListener("focus", i);
|
|
48412
|
+
if (!t._insertingImage) {
|
|
48413
|
+
e();
|
|
48414
|
+
return;
|
|
48415
|
+
}
|
|
48416
|
+
c(s), t._insertingImage = !1, e();
|
|
48417
|
+
}, 500);
|
|
48418
|
+
window.addEventListener("focus", i), e.imageSupport.add(n);
|
|
48419
|
+
})();
|
|
48420
|
+
}),
|
|
48421
|
+
maxImageWidth: e.maxImageWidth,
|
|
48422
|
+
maxImageHeight: e.maxImageHeight
|
|
48423
|
+
},
|
|
48424
|
+
limit: 3
|
|
48425
|
+
}),
|
|
48426
|
+
Aq.configure({ uploadSoundSupport: e.uploadSoundSupport }),
|
|
48427
|
+
qq.configure({ extraCSSRules: e.extraCSSRules })
|
|
48428
|
+
], m = e.spellCheck !== !1, h = nj({
|
|
48429
|
+
extensions: p,
|
|
48353
48430
|
immediatelyRender: !1,
|
|
48354
|
-
editorProps: {
|
|
48355
|
-
|
|
48356
|
-
|
|
48431
|
+
editorProps: {
|
|
48432
|
+
attributes: _8(m),
|
|
48433
|
+
handleKeyDown(t, n) {
|
|
48434
|
+
return e.onKeyDown ? e.onKeyDown(n) : !1;
|
|
48435
|
+
}
|
|
48436
|
+
},
|
|
48357
48437
|
editable: !e.disabled,
|
|
48358
48438
|
content: Ps(e.markup),
|
|
48359
48439
|
onUpdate: ({ editor: t, transaction: n }) => {
|
|
@@ -48364,22 +48444,29 @@ var $6 = wb.create({
|
|
|
48364
48444
|
}
|
|
48365
48445
|
}, [e.charactersLimit]);
|
|
48366
48446
|
y(() => {
|
|
48367
|
-
e.editorRef && e.editorRef(
|
|
48368
|
-
}, [e.editorRef,
|
|
48369
|
-
|
|
48370
|
-
}, [e.disabled,
|
|
48371
|
-
if (!
|
|
48447
|
+
e.editorRef && e.editorRef(h);
|
|
48448
|
+
}, [e.editorRef, h]), y(() => {
|
|
48449
|
+
h?.setEditable(!e.disabled);
|
|
48450
|
+
}, [e.disabled, h]), y(() => {
|
|
48451
|
+
if (!h) return;
|
|
48452
|
+
let e = h.options?.editorProps, t = _8(m);
|
|
48453
|
+
e?.attributes?.spellcheck !== t.spellcheck && h.setOptions({ editorProps: {
|
|
48454
|
+
...e,
|
|
48455
|
+
attributes: t
|
|
48456
|
+
} });
|
|
48457
|
+
}, [m, h]), y(() => {
|
|
48458
|
+
if (!h) return;
|
|
48372
48459
|
let t = Ps(e.markup);
|
|
48373
|
-
t !==
|
|
48374
|
-
}, [e.markup,
|
|
48375
|
-
Object.entries(
|
|
48460
|
+
t !== h.getHTML() && h.commands.setContent(t, { emitUpdate: !1 });
|
|
48461
|
+
}, [e.markup, h]), y(() => {
|
|
48462
|
+
Object.entries(g8).forEach(([e, t]) => {
|
|
48376
48463
|
document.documentElement.style.setProperty(e, t);
|
|
48377
48464
|
});
|
|
48378
48465
|
}, []);
|
|
48379
|
-
let
|
|
48380
|
-
editor:
|
|
48466
|
+
let _ = QA({
|
|
48467
|
+
editor: h,
|
|
48381
48468
|
selector: (e) => ({ isFocused: e.editor?.isFocused })
|
|
48382
|
-
}),
|
|
48469
|
+
}), v = x(() => {
|
|
48383
48470
|
let { minWidth: t, width: n, maxWidth: r, minHeight: i, height: a, maxHeight: o } = e;
|
|
48384
48471
|
return {
|
|
48385
48472
|
width: AJ(n),
|
|
@@ -48394,20 +48481,20 @@ var $6 = wb.create({
|
|
|
48394
48481
|
...e,
|
|
48395
48482
|
activePlugins: f,
|
|
48396
48483
|
toolbarOpts: l,
|
|
48397
|
-
editorState:
|
|
48398
|
-
editor:
|
|
48399
|
-
children:
|
|
48484
|
+
editorState: _,
|
|
48485
|
+
editor: h,
|
|
48486
|
+
children: h && /* @__PURE__ */ E(y8, {
|
|
48400
48487
|
style: {
|
|
48401
|
-
minHeight:
|
|
48402
|
-
height:
|
|
48403
|
-
maxHeight:
|
|
48488
|
+
minHeight: v.minHeight,
|
|
48489
|
+
height: v.height,
|
|
48490
|
+
maxHeight: v.maxHeight
|
|
48404
48491
|
},
|
|
48405
48492
|
showParagraph: t && !t.disabled,
|
|
48406
48493
|
separateParagraph: n && !n.disabled,
|
|
48407
|
-
editor:
|
|
48494
|
+
editor: h
|
|
48408
48495
|
})
|
|
48409
48496
|
});
|
|
48410
|
-
},
|
|
48497
|
+
}, y8 = N(YA, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
|
|
48411
48498
|
display: "flex",
|
|
48412
48499
|
outline: "none !important",
|
|
48413
48500
|
"& .ProseMirror": {
|
|
@@ -48435,17 +48522,17 @@ var $6 = wb.create({
|
|
|
48435
48522
|
} },
|
|
48436
48523
|
...t && { "& > p:has(+ p)": { marginBottom: "1em" } }
|
|
48437
48524
|
}
|
|
48438
|
-
})),
|
|
48525
|
+
})), b8 = v8;
|
|
48439
48526
|
//#endregion
|
|
48440
48527
|
//#region ../../lib-react/config-ui/dist/index.js
|
|
48441
|
-
function
|
|
48528
|
+
function x8(e) {
|
|
48442
48529
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
48443
48530
|
}
|
|
48444
|
-
function
|
|
48445
|
-
return !e ||
|
|
48531
|
+
function S8(e, t) {
|
|
48532
|
+
return !e || x8(e) ? e : x8(e.default) ? e.default : t && x8(e[t]) ? e[t] : t && x8(e[t]?.default) ? e[t].default : e;
|
|
48446
48533
|
}
|
|
48447
|
-
var
|
|
48534
|
+
var C8 = S8(lL, "InputContainer") || S8(E8.InputContainer, "InputContainer"), w8 = GL, T8 = w8.default, E8 = T8 && typeof T8 == "object" ? T8 : w8;
|
|
48448
48535
|
//#endregion
|
|
48449
|
-
export { vs as A, yi as B, fk as C, WD as D, YD as E, N as F, me as G, be as H, rs as I, ue as J, ce as K, Zo as L, P as M, cs as N, Os as O, ss as P, Ua as R, XM as S, sO as T, j as U, Zr as V, ge as W, re as Y, hI as _, IG as a, dF as b, aW as c, lL as d, $I as f, LI as g, VI as h, ZK as i, ds as j, Ts as k, GL as l, HI as m,
|
|
48536
|
+
export { vs as A, yi as B, fk as C, WD as D, YD as E, N as F, me as G, be as H, rs as I, ue as J, ce as K, Zo as L, P as M, cs as N, Os as O, ss as P, Ua as R, XM as S, sO as T, j as U, Zr as V, ge as W, re as Y, hI as _, IG as a, dF as b, aW as c, lL as d, $I as f, LI as g, VI as h, ZK as i, ds as j, Ts as k, GL as l, HI as m, b8 as n, NW as o, UI as p, oe as q, nq as r, OW as s, C8 as t, mL as u, dI as v, pO as w, nP as x, VF as y, bi as z };
|
|
48450
48537
|
|
|
48451
|
-
//# sourceMappingURL=dist-
|
|
48538
|
+
//# sourceMappingURL=dist-BgIZCJg9.js.map
|