@uva-glass/component-library 3.10.0 → 3.11.0
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/{Lexical.prod-CWyHQUEM.js → Lexical.prod-D8x7Ii0F.js} +469 -469
- package/dist/{Lexical.prod-CWyHQUEM.js.map → Lexical.prod-D8x7Ii0F.js.map} +1 -1
- package/dist/{LexicalClipboard.prod-DbqSWANZ.js → LexicalClipboard.prod-D5GjiArS.js} +16 -16
- package/dist/{LexicalClipboard.prod-DbqSWANZ.js.map → LexicalClipboard.prod-D5GjiArS.js.map} +1 -1
- package/dist/{LexicalLink.prod-DbxnRszt.js → LexicalLink.prod-CkldFE8u.js} +60 -60
- package/dist/{LexicalLink.prod-DbxnRszt.js.map → LexicalLink.prod-CkldFE8u.js.map} +1 -1
- package/dist/{LexicalList.prod-pZmYrwOC.js → LexicalList.prod-CsVDXdmw.js} +215 -215
- package/dist/LexicalList.prod-CsVDXdmw.js.map +1 -0
- package/dist/LexicalSelection.prod-JQDTaUpX.js +90 -0
- package/dist/{LexicalSelection.prod-DkvWlcln.js.map → LexicalSelection.prod-JQDTaUpX.js.map} +1 -1
- package/dist/{LexicalTable.prod-C6duSS2P.js → LexicalTable.prod-rZbTmo9K.js} +125 -125
- package/dist/{LexicalTable.prod-C6duSS2P.js.map → LexicalTable.prod-rZbTmo9K.js.map} +1 -1
- package/dist/{LexicalUtils.prod-Dny9Fu94.js → LexicalUtils.prod-CpMJ4I9h.js} +6 -6
- package/dist/{LexicalUtils.prod-Dny9Fu94.js.map → LexicalUtils.prod-CpMJ4I9h.js.map} +1 -1
- package/dist/{SelectListbox.module-BD2qbcmZ.js → SelectListbox.module-ignbxWNU.js} +21 -21
- package/dist/SelectListbox.module-ignbxWNU.js.map +1 -0
- package/dist/{SortableProvider-Ck_XnBVq.js → SortableProvider-DZggDO3M.js} +20 -20
- package/dist/{SortableProvider-Ck_XnBVq.js.map → SortableProvider-DZggDO3M.js.map} +1 -1
- package/dist/{TablePlugin-Ba6PaBhf.js → TablePlugin-WOgWan8s.js} +36 -36
- package/dist/{TablePlugin-Ba6PaBhf.js.map → TablePlugin-WOgWan8s.js.map} +1 -1
- package/dist/assets/MultiSelectBox.css +1 -0
- package/dist/assets/SelectListbox.css +1 -1
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +2 -2
- package/dist/components/Card/Card.test.js +2 -2
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +2 -2
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.test.js +2 -2
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js +3 -3
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
- package/dist/components/FormInput/FormInput.js +3 -3
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.js +17 -17
- package/dist/components/InputField/InputField.stories.js +17 -17
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +3 -3
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.d.ts +16 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.js +191 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.js.map +1 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.d.ts +5 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +31 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js.map +1 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.test.d.ts +0 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +26 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -0
- package/dist/components/MultiSelectBox/index.d.ts +1 -0
- package/dist/components/MultiSelectBox/index.js +5 -0
- package/dist/components/MultiSelectBox/index.js.map +1 -0
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.js +3 -3
- package/dist/components/PeriodSelector/PeriodSelector.js +3 -3
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +3 -3
- package/dist/components/RadioButton/RadioButton.js +3 -3
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +3 -3
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +14 -14
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +4 -4
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +23 -23
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +40 -40
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/Providers/LanguageProvider.js +7 -7
- package/dist/components/RteEditor/RteEditor.js +327 -327
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectProvider.js +10 -10
- package/dist/components/SelectListbox/components/SelectButton.js +1 -1
- package/dist/components/SelectListbox/components/SelectContainer.js +1 -1
- package/dist/components/SelectListbox/components/SelectOption.js +1 -1
- package/dist/components/SelectListbox/components/SelectOptionBox.js +1 -1
- package/dist/components/Sortable/Sortable.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/SortableProvider.js +1 -1
- package/dist/components/Sortable/components/SortableContainer.js +1 -1
- package/dist/components/Sortable/components/SortableItem.js +15 -15
- package/dist/components/Sortable/sortableReducer.js +21 -21
- package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
- package/dist/components/TextArea/TextArea.js +2 -2
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +3 -3
- package/dist/components/Timeline/Timeline.test.js +5 -5
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +22 -22
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
- package/dist/components/hooks/useDebounce.js +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +53 -51
- package/dist/components/index.js.map +1 -1
- package/dist/{helpers-BUwfVZhW.js → helpers-E_SsILnP.js} +10 -10
- package/dist/{helpers-BUwfVZhW.js.map → helpers-E_SsILnP.js.map} +1 -1
- package/dist/{index-DXR-TB1d.js → index-BCvy9BiK.js} +1886 -1886
- package/dist/{index-DXR-TB1d.js.map → index-BCvy9BiK.js.map} +1 -1
- package/dist/{index-dmBn99rF.js → index-BqLi4tOb.js} +908 -908
- package/dist/{index-dmBn99rF.js.map → index-BqLi4tOb.js.map} +1 -1
- package/dist/{index-B3c5pcHk.js → index-DllfJcv4.js} +32 -32
- package/dist/{index-B3c5pcHk.js.map → index-DllfJcv4.js.map} +1 -1
- package/dist/{index-Ck15_vKo.js → index-xaEX581l.js} +481 -481
- package/dist/{index-Ck15_vKo.js.map → index-xaEX581l.js.map} +1 -1
- package/dist/index.js +53 -51
- package/dist/index.js.map +1 -1
- package/dist/{react.esm-CMg7bmSn.js → react.esm-PmLHNn73.js} +3 -3
- package/dist/{react.esm-CMg7bmSn.js.map → react.esm-PmLHNn73.js.map} +1 -1
- package/dist/setupTests.js +1 -1
- package/dist/storybook__react.d.js +2 -2
- package/dist/{test-utils-B2AIdiiO.js → test-utils-grX3FDss.js} +157 -157
- package/dist/{test-utils-B2AIdiiO.js.map → test-utils-grX3FDss.js.map} +1 -1
- package/package.json +6 -6
- package/dist/LexicalList.prod-pZmYrwOC.js.map +0 -1
- package/dist/LexicalSelection.prod-DkvWlcln.js +0 -90
- package/dist/SelectListbox.module-BD2qbcmZ.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { i as X, r as Y, j as
|
|
2
|
-
import { f as Z, n as G, X as ie, d as
|
|
3
|
-
import { I as W } from "./LexicalSelection.prod-
|
|
4
|
-
function p(
|
|
5
|
-
const t = new URL("https://lexical.dev/docs/error"),
|
|
6
|
-
|
|
7
|
-
for (const s of e)
|
|
8
|
-
throw t.search =
|
|
9
|
-
}
|
|
10
|
-
function L(
|
|
11
|
-
let e = 1, t =
|
|
1
|
+
import { i as X, r as Y, j as re, w as ne, v as se } from "./LexicalUtils.prod-CpMJ4I9h.js";
|
|
2
|
+
import { f as Z, n as G, X as ie, d as v, T as P, w as oe, c as S, q as H, o as w, J as le, Y as ce, a as N, b as ae, E as k, U as b, G as Q, Z as J, l as M, z as D } from "./Lexical.prod-D8x7Ii0F.js";
|
|
3
|
+
import { I as W } from "./LexicalSelection.prod-JQDTaUpX.js";
|
|
4
|
+
function p(n, ...e) {
|
|
5
|
+
const t = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
|
|
6
|
+
r.append("code", n);
|
|
7
|
+
for (const s of e) r.append("v", s);
|
|
8
|
+
throw t.search = r.toString(), Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
9
|
+
}
|
|
10
|
+
function L(n) {
|
|
11
|
+
let e = 1, t = n.getParent();
|
|
12
12
|
for (; t != null; ) {
|
|
13
13
|
if (g(t)) {
|
|
14
|
-
const
|
|
15
|
-
if (c(
|
|
16
|
-
e++, t =
|
|
14
|
+
const r = t.getParent();
|
|
15
|
+
if (c(r)) {
|
|
16
|
+
e++, t = r.getParent();
|
|
17
17
|
continue;
|
|
18
18
|
}
|
|
19
19
|
p(40);
|
|
@@ -22,40 +22,40 @@ function L(r) {
|
|
|
22
22
|
}
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
25
|
-
function O(
|
|
26
|
-
let e =
|
|
25
|
+
function O(n) {
|
|
26
|
+
let e = n.getParent();
|
|
27
27
|
c(e) || p(40);
|
|
28
28
|
let t = e;
|
|
29
29
|
for (; t !== null; ) t = t.getParent(), c(t) && (e = t);
|
|
30
30
|
return e;
|
|
31
31
|
}
|
|
32
|
-
function ee(
|
|
32
|
+
function ee(n) {
|
|
33
33
|
let e = [];
|
|
34
|
-
const t =
|
|
35
|
-
for (let
|
|
36
|
-
const s = t[
|
|
34
|
+
const t = n.getChildren().filter(g);
|
|
35
|
+
for (let r = 0; r < t.length; r++) {
|
|
36
|
+
const s = t[r], i = s.getFirstChild();
|
|
37
37
|
c(i) ? e = e.concat(ee(i)) : e.push(s);
|
|
38
38
|
}
|
|
39
39
|
return e;
|
|
40
40
|
}
|
|
41
|
-
function m(
|
|
42
|
-
return g(
|
|
41
|
+
function m(n) {
|
|
42
|
+
return g(n) && c(n.getFirstChild());
|
|
43
43
|
}
|
|
44
|
-
function B(
|
|
45
|
-
return f().append(
|
|
44
|
+
function B(n) {
|
|
45
|
+
return f().append(n);
|
|
46
46
|
}
|
|
47
|
-
function te(
|
|
48
|
-
return g(
|
|
47
|
+
function te(n, e) {
|
|
48
|
+
return g(n) && (e.length === 0 || e.length === 1 && n.is(e[0]) && n.getChildrenSize() === 0);
|
|
49
49
|
}
|
|
50
|
-
function $(
|
|
50
|
+
function $(n) {
|
|
51
51
|
const e = N();
|
|
52
52
|
if (e !== null) {
|
|
53
53
|
let t = e.getNodes();
|
|
54
|
-
if (
|
|
54
|
+
if (S(e)) {
|
|
55
55
|
const s = e.getStartEndPoints();
|
|
56
56
|
s === null && p(143);
|
|
57
57
|
const [i] = s, o = i.getNode(), a = o.getParent();
|
|
58
|
-
if (
|
|
58
|
+
if (b(o)) {
|
|
59
59
|
const l = o.getFirstChild();
|
|
60
60
|
if (l) t = l.selectStart().getNodes();
|
|
61
61
|
else {
|
|
@@ -63,11 +63,11 @@ function $(r) {
|
|
|
63
63
|
o.append(u), t = u.select().getNodes();
|
|
64
64
|
}
|
|
65
65
|
} else if (te(o, t)) {
|
|
66
|
-
const l = h(
|
|
67
|
-
if (
|
|
66
|
+
const l = h(n);
|
|
67
|
+
if (b(a)) {
|
|
68
68
|
o.replace(l);
|
|
69
69
|
const u = f();
|
|
70
|
-
|
|
70
|
+
v(o) && (u.setFormat(o.getFormatType()), u.setIndent(o.getIndent())), l.append(u);
|
|
71
71
|
} else if (g(o)) {
|
|
72
72
|
const u = o.getParentOrThrow();
|
|
73
73
|
y(l, u.getChildren()), u.replace(l);
|
|
@@ -75,27 +75,27 @@ function $(r) {
|
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
const
|
|
78
|
+
const r = /* @__PURE__ */ new Set();
|
|
79
79
|
for (let s = 0; s < t.length; s++) {
|
|
80
80
|
const i = t[s];
|
|
81
|
-
if (
|
|
82
|
-
z(i,
|
|
81
|
+
if (v(i) && i.isEmpty() && !g(i) && !r.has(i.getKey())) {
|
|
82
|
+
z(i, n);
|
|
83
83
|
continue;
|
|
84
84
|
}
|
|
85
85
|
let o = Q(i) ? i.getParent() : g(i) && i.isEmpty() ? i : null;
|
|
86
86
|
for (; o != null; ) {
|
|
87
87
|
const a = o.getKey();
|
|
88
88
|
if (c(o)) {
|
|
89
|
-
if (!
|
|
90
|
-
const l = h(
|
|
91
|
-
y(l, o.getChildren()), o.replace(l),
|
|
89
|
+
if (!r.has(a)) {
|
|
90
|
+
const l = h(n);
|
|
91
|
+
y(l, o.getChildren()), o.replace(l), r.add(a);
|
|
92
92
|
}
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
95
95
|
{
|
|
96
96
|
const l = o.getParent();
|
|
97
|
-
if (
|
|
98
|
-
|
|
97
|
+
if (b(l) && !r.has(a)) {
|
|
98
|
+
r.add(a), z(o, n);
|
|
99
99
|
break;
|
|
100
100
|
}
|
|
101
101
|
o = l;
|
|
@@ -104,32 +104,32 @@ function $(r) {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function y(
|
|
108
|
-
|
|
107
|
+
function y(n, e) {
|
|
108
|
+
n.splice(n.getChildrenSize(), 0, e);
|
|
109
109
|
}
|
|
110
|
-
function z(
|
|
111
|
-
if (c(
|
|
112
|
-
const t =
|
|
110
|
+
function z(n, e) {
|
|
111
|
+
if (c(n)) return n;
|
|
112
|
+
const t = n.getPreviousSibling(), r = n.getNextSibling(), s = f();
|
|
113
113
|
let i;
|
|
114
|
-
if (y(s,
|
|
115
|
-
else if (c(
|
|
114
|
+
if (y(s, n.getChildren()), c(t) && e === t.getListType()) t.append(s), c(r) && e === r.getListType() && (y(t, r.getChildren()), r.remove()), i = t;
|
|
115
|
+
else if (c(r) && e === r.getListType()) r.getFirstChildOrThrow().insertBefore(s), i = r;
|
|
116
116
|
else {
|
|
117
117
|
const o = h(e);
|
|
118
|
-
o.append(s),
|
|
118
|
+
o.append(s), n.replace(o), i = o;
|
|
119
119
|
}
|
|
120
|
-
return s.setFormat(
|
|
120
|
+
return s.setFormat(n.getFormatType()), s.setIndent(n.getIndent()), n.remove(), i;
|
|
121
121
|
}
|
|
122
|
-
function I(
|
|
123
|
-
const t =
|
|
124
|
-
t &&
|
|
122
|
+
function I(n, e) {
|
|
123
|
+
const t = n.getLastChild(), r = e.getFirstChild();
|
|
124
|
+
t && r && m(t) && m(r) && (I(t.getFirstChild(), r.getFirstChild()), r.remove());
|
|
125
125
|
const s = e.getChildren();
|
|
126
|
-
s.length > 0 &&
|
|
126
|
+
s.length > 0 && n.append(...s), e.remove();
|
|
127
127
|
}
|
|
128
128
|
function ue() {
|
|
129
|
-
const
|
|
130
|
-
if (
|
|
131
|
-
const e = /* @__PURE__ */ new Set(), t =
|
|
132
|
-
if (te(
|
|
129
|
+
const n = N();
|
|
130
|
+
if (S(n)) {
|
|
131
|
+
const e = /* @__PURE__ */ new Set(), t = n.getNodes(), r = n.anchor.getNode();
|
|
132
|
+
if (te(r, t)) e.add(O(r));
|
|
133
133
|
else for (let s = 0; s < t.length; s++) {
|
|
134
134
|
const i = t[s];
|
|
135
135
|
if (Q(i)) {
|
|
@@ -141,71 +141,71 @@ function ue() {
|
|
|
141
141
|
let i = s;
|
|
142
142
|
const o = ee(s);
|
|
143
143
|
for (const a of o) {
|
|
144
|
-
const l = P().setTextStyle(
|
|
145
|
-
y(l, a.getChildren()), i.insertAfter(l), i = l, a.__key ===
|
|
144
|
+
const l = P().setTextStyle(n.style).setTextFormat(n.format);
|
|
145
|
+
y(l, a.getChildren()), i.insertAfter(l), i = l, a.__key === n.anchor.key && J(n.anchor, M(D(l, "next"))), a.__key === n.focus.key && J(n.focus, M(D(l, "next"))), a.remove();
|
|
146
146
|
}
|
|
147
147
|
s.remove();
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
function ge(
|
|
151
|
+
function ge(n) {
|
|
152
152
|
const e = /* @__PURE__ */ new Set();
|
|
153
|
-
if (m(
|
|
154
|
-
const t =
|
|
155
|
-
if (m(
|
|
153
|
+
if (m(n) || e.has(n.getKey())) return;
|
|
154
|
+
const t = n.getParent(), r = n.getNextSibling(), s = n.getPreviousSibling();
|
|
155
|
+
if (m(r) && m(s)) {
|
|
156
156
|
const i = s.getFirstChild();
|
|
157
157
|
if (c(i)) {
|
|
158
|
-
i.append(
|
|
159
|
-
const o =
|
|
160
|
-
c(o) && (y(i, o.getChildren()),
|
|
158
|
+
i.append(n);
|
|
159
|
+
const o = r.getFirstChild();
|
|
160
|
+
c(o) && (y(i, o.getChildren()), r.remove(), e.add(r.getKey()));
|
|
161
161
|
}
|
|
162
|
-
} else if (m(
|
|
163
|
-
const i =
|
|
162
|
+
} else if (m(r)) {
|
|
163
|
+
const i = r.getFirstChild();
|
|
164
164
|
if (c(i)) {
|
|
165
165
|
const o = i.getFirstChild();
|
|
166
|
-
o !== null && o.insertBefore(
|
|
166
|
+
o !== null && o.insertBefore(n);
|
|
167
167
|
}
|
|
168
168
|
} else if (m(s)) {
|
|
169
169
|
const i = s.getFirstChild();
|
|
170
|
-
c(i) && i.append(
|
|
170
|
+
c(i) && i.append(n);
|
|
171
171
|
} else if (c(t)) {
|
|
172
172
|
const i = f().setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle()), o = h(t.getListType()).setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle());
|
|
173
|
-
i.append(o), o.append(
|
|
173
|
+
i.append(o), o.append(n), s ? s.insertAfter(i) : r ? r.insertBefore(i) : t.append(i);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
function he(
|
|
177
|
-
if (m(
|
|
178
|
-
const e =
|
|
176
|
+
function he(n) {
|
|
177
|
+
if (m(n)) return;
|
|
178
|
+
const e = n.getParent(), t = e ? e.getParent() : void 0;
|
|
179
179
|
if (c(t ? t.getParent() : void 0) && g(t) && c(e)) {
|
|
180
|
-
const
|
|
181
|
-
if (
|
|
182
|
-
else if (
|
|
180
|
+
const r = e ? e.getFirstChild() : void 0, s = e ? e.getLastChild() : void 0;
|
|
181
|
+
if (n.is(r)) t.insertBefore(n), e.isEmpty() && t.remove();
|
|
182
|
+
else if (n.is(s)) t.insertAfter(n), e.isEmpty() && t.remove();
|
|
183
183
|
else {
|
|
184
184
|
const i = e.getListType(), o = f(), a = h(i);
|
|
185
|
-
o.append(a),
|
|
185
|
+
o.append(a), n.getPreviousSiblings().forEach((d) => a.append(d));
|
|
186
186
|
const l = f(), u = h(i);
|
|
187
|
-
l.append(u), y(u,
|
|
187
|
+
l.append(u), y(u, n.getNextSiblings()), t.insertBefore(o), t.insertAfter(l), t.replace(n);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
function fe() {
|
|
192
|
-
const
|
|
193
|
-
if (!
|
|
194
|
-
const e =
|
|
192
|
+
const n = N();
|
|
193
|
+
if (!S(n) || !n.isCollapsed()) return !1;
|
|
194
|
+
const e = n.anchor.getNode();
|
|
195
195
|
if (!g(e) || e.getChildrenSize() !== 0) return !1;
|
|
196
|
-
const t = O(e),
|
|
197
|
-
c(
|
|
198
|
-
const s =
|
|
196
|
+
const t = O(e), r = e.getParent();
|
|
197
|
+
c(r) || p(40);
|
|
198
|
+
const s = r.getParent();
|
|
199
199
|
let i;
|
|
200
|
-
if (
|
|
200
|
+
if (b(s)) i = P(), t.insertAfter(i);
|
|
201
201
|
else {
|
|
202
202
|
if (!g(s)) return !1;
|
|
203
203
|
i = f(), s.insertAfter(i);
|
|
204
204
|
}
|
|
205
|
-
i.setTextStyle(
|
|
205
|
+
i.setTextStyle(n.style).setTextFormat(n.format).select();
|
|
206
206
|
const o = e.getNextSiblings();
|
|
207
207
|
if (o.length > 0) {
|
|
208
|
-
const a = h(
|
|
208
|
+
const a = h(r.getListType());
|
|
209
209
|
if (g(i)) {
|
|
210
210
|
const l = f();
|
|
211
211
|
l.append(a), i.insertAfter(l);
|
|
@@ -222,15 +222,15 @@ function fe() {
|
|
|
222
222
|
l.remove();
|
|
223
223
|
}(e), !0;
|
|
224
224
|
}
|
|
225
|
-
function F(...
|
|
225
|
+
function F(...n) {
|
|
226
226
|
const e = [];
|
|
227
|
-
for (const t of
|
|
227
|
+
for (const t of n) if (t && typeof t == "string") for (const [r] of t.matchAll(/\S+/g)) e.push(r);
|
|
228
228
|
return e;
|
|
229
229
|
}
|
|
230
|
-
function K(
|
|
231
|
-
const
|
|
232
|
-
for (const s in
|
|
233
|
-
if (t) for (const s in W(t.__textStyle)) s in
|
|
230
|
+
function K(n, e, t) {
|
|
231
|
+
const r = W(e.__textStyle);
|
|
232
|
+
for (const s in r) n.style.setProperty(`--listitem-marker-${s}`, r[s]);
|
|
233
|
+
if (t) for (const s in W(t.__textStyle)) s in r || n.style.removeProperty(`--listitem-marker-${s}`);
|
|
234
234
|
}
|
|
235
235
|
class C extends Z {
|
|
236
236
|
static getType() {
|
|
@@ -239,18 +239,18 @@ class C extends Z {
|
|
|
239
239
|
static clone(e) {
|
|
240
240
|
return new C(e.__value, e.__checked, e.__key);
|
|
241
241
|
}
|
|
242
|
-
constructor(e, t,
|
|
243
|
-
super(
|
|
242
|
+
constructor(e, t, r) {
|
|
243
|
+
super(r), this.__value = e === void 0 ? 1 : e, this.__checked = t;
|
|
244
244
|
}
|
|
245
245
|
createDOM(e) {
|
|
246
|
-
const t = document.createElement("li"),
|
|
247
|
-
c(
|
|
246
|
+
const t = document.createElement("li"), r = this.getParent();
|
|
247
|
+
c(r) && r.getListType() === "check" && V(t, this, null), t.value = this.__value, U(t, e.theme, this);
|
|
248
248
|
const s = this.__style;
|
|
249
249
|
return s && (t.style.cssText = s), K(t, this, null), t;
|
|
250
250
|
}
|
|
251
|
-
updateDOM(e, t,
|
|
251
|
+
updateDOM(e, t, r) {
|
|
252
252
|
const s = this.getParent();
|
|
253
|
-
c(s) && s.getListType() === "check" && V(t, this, e), t.value = this.__value, U(t,
|
|
253
|
+
c(s) && s.getListType() === "check" && V(t, this, e), t.value = this.__value, U(t, r.theme, this);
|
|
254
254
|
const i = e.__style, o = this.__style;
|
|
255
255
|
return i !== o && (o === "" ? t.removeAttribute("style") : t.style.cssText = o), K(t, this, e), !1;
|
|
256
256
|
}
|
|
@@ -273,71 +273,71 @@ class C extends Z {
|
|
|
273
273
|
exportDOM(e) {
|
|
274
274
|
const t = this.createDOM(e._config);
|
|
275
275
|
t.style.textAlign = this.getFormatType();
|
|
276
|
-
const
|
|
277
|
-
return
|
|
276
|
+
const r = this.getDirection();
|
|
277
|
+
return r && (t.dir = r), { element: t };
|
|
278
278
|
}
|
|
279
279
|
exportJSON() {
|
|
280
280
|
return { ...super.exportJSON(), checked: this.getChecked(), value: this.getValue() };
|
|
281
281
|
}
|
|
282
282
|
append(...e) {
|
|
283
283
|
for (let t = 0; t < e.length; t++) {
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
286
|
-
const s =
|
|
287
|
-
this.append(...s),
|
|
288
|
-
} else super.append(
|
|
284
|
+
const r = e[t];
|
|
285
|
+
if (v(r) && this.canMergeWith(r)) {
|
|
286
|
+
const s = r.getChildren();
|
|
287
|
+
this.append(...s), r.remove();
|
|
288
|
+
} else super.append(r);
|
|
289
289
|
}
|
|
290
290
|
return this;
|
|
291
291
|
}
|
|
292
292
|
replace(e, t) {
|
|
293
293
|
if (g(e)) return super.replace(e);
|
|
294
294
|
this.setIndent(0);
|
|
295
|
-
const
|
|
296
|
-
if (!c(
|
|
297
|
-
if (
|
|
298
|
-
else if (
|
|
295
|
+
const r = this.getParentOrThrow();
|
|
296
|
+
if (!c(r)) return e;
|
|
297
|
+
if (r.__first === this.getKey()) r.insertBefore(e);
|
|
298
|
+
else if (r.__last === this.getKey()) r.insertAfter(e);
|
|
299
299
|
else {
|
|
300
|
-
const s = h(
|
|
300
|
+
const s = h(r.getListType());
|
|
301
301
|
let i = this.getNextSibling();
|
|
302
302
|
for (; i; ) {
|
|
303
303
|
const o = i;
|
|
304
304
|
i = i.getNextSibling(), s.append(o);
|
|
305
305
|
}
|
|
306
|
-
|
|
306
|
+
r.insertAfter(e), e.insertAfter(s);
|
|
307
307
|
}
|
|
308
|
-
return t && (
|
|
308
|
+
return t && (v(e) || p(139), this.getChildren().forEach((s) => {
|
|
309
309
|
e.append(s);
|
|
310
|
-
})), this.remove(),
|
|
310
|
+
})), this.remove(), r.getChildrenSize() === 0 && r.remove(), e;
|
|
311
311
|
}
|
|
312
312
|
insertAfter(e, t = !0) {
|
|
313
|
-
const
|
|
314
|
-
if (c(
|
|
313
|
+
const r = this.getParentOrThrow();
|
|
314
|
+
if (c(r) || p(39), g(e)) return super.insertAfter(e, t);
|
|
315
315
|
const s = this.getNextSiblings();
|
|
316
|
-
if (
|
|
317
|
-
const i = h(
|
|
316
|
+
if (r.insertAfter(e, t), s.length !== 0) {
|
|
317
|
+
const i = h(r.getListType());
|
|
318
318
|
s.forEach((o) => i.append(o)), e.insertAfter(i, t);
|
|
319
319
|
}
|
|
320
320
|
return e;
|
|
321
321
|
}
|
|
322
322
|
remove(e) {
|
|
323
|
-
const t = this.getPreviousSibling(),
|
|
324
|
-
super.remove(e), t &&
|
|
323
|
+
const t = this.getPreviousSibling(), r = this.getNextSibling();
|
|
324
|
+
super.remove(e), t && r && m(t) && m(r) && (I(t.getFirstChild(), r.getFirstChild()), r.remove());
|
|
325
325
|
}
|
|
326
326
|
insertNewAfter(e, t = !0) {
|
|
327
|
-
const
|
|
328
|
-
return this.insertAfter(
|
|
327
|
+
const r = f().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked() && void 0);
|
|
328
|
+
return this.insertAfter(r, t), r;
|
|
329
329
|
}
|
|
330
330
|
collapseAtStart(e) {
|
|
331
331
|
const t = P();
|
|
332
332
|
this.getChildren().forEach((o) => t.append(o));
|
|
333
|
-
const
|
|
334
|
-
if (
|
|
333
|
+
const r = this.getParentOrThrow(), s = r.getParentOrThrow(), i = g(s);
|
|
334
|
+
if (r.getChildrenSize() === 1) if (i) r.remove(), s.select();
|
|
335
335
|
else {
|
|
336
|
-
|
|
336
|
+
r.insertBefore(t), r.remove();
|
|
337
337
|
const o = e.anchor, a = e.focus, l = t.getKey();
|
|
338
338
|
o.type === "element" && o.getNode().is(this) && o.set(l, o.offset, "element"), a.type === "element" && a.getNode().is(this) && a.set(l, a.offset, "element");
|
|
339
339
|
}
|
|
340
|
-
else
|
|
340
|
+
else r.insertBefore(t), this.remove();
|
|
341
341
|
return !0;
|
|
342
342
|
}
|
|
343
343
|
getValue() {
|
|
@@ -350,8 +350,8 @@ class C extends Z {
|
|
|
350
350
|
getChecked() {
|
|
351
351
|
const e = this.getLatest();
|
|
352
352
|
let t;
|
|
353
|
-
const
|
|
354
|
-
return c(
|
|
353
|
+
const r = this.getParent();
|
|
354
|
+
return c(r) && (t = r.getListType()), t === "check" ? !!e.__checked : void 0;
|
|
355
355
|
}
|
|
356
356
|
setChecked(e) {
|
|
357
357
|
const t = this.getWritable();
|
|
@@ -364,9 +364,9 @@ class C extends Z {
|
|
|
364
364
|
getIndent() {
|
|
365
365
|
const e = this.getParent();
|
|
366
366
|
if (e === null || !this.isAttached()) return this.getLatest().__indent;
|
|
367
|
-
let t = e.getParentOrThrow(),
|
|
368
|
-
for (; g(t); ) t = t.getParentOrThrow().getParentOrThrow(),
|
|
369
|
-
return
|
|
367
|
+
let t = e.getParentOrThrow(), r = 0;
|
|
368
|
+
for (; g(t); ) t = t.getParentOrThrow().getParentOrThrow(), r++;
|
|
369
|
+
return r;
|
|
370
370
|
}
|
|
371
371
|
setIndent(e) {
|
|
372
372
|
typeof e != "number" && p(117), (e = Math.floor(e)) >= 0 || p(199);
|
|
@@ -384,9 +384,9 @@ class C extends Z {
|
|
|
384
384
|
return g(e) || oe(e);
|
|
385
385
|
}
|
|
386
386
|
extractWithChild(e, t) {
|
|
387
|
-
if (!
|
|
388
|
-
const
|
|
389
|
-
return this.isParentOf(
|
|
387
|
+
if (!S(t)) return !1;
|
|
388
|
+
const r = t.anchor.getNode(), s = t.focus.getNode();
|
|
389
|
+
return this.isParentOf(r) && this.isParentOf(s) && this.getTextContent().length === t.getTextContent().length;
|
|
390
390
|
}
|
|
391
391
|
isParentRequired() {
|
|
392
392
|
return !0;
|
|
@@ -398,48 +398,48 @@ class C extends Z {
|
|
|
398
398
|
return !0;
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
function U(
|
|
402
|
-
const
|
|
401
|
+
function U(n, e, t) {
|
|
402
|
+
const r = [], s = [], i = e.list, o = i ? i.listitem : void 0;
|
|
403
403
|
let a;
|
|
404
|
-
if (i && i.nested && (a = i.nested.listitem), o !== void 0 &&
|
|
404
|
+
if (i && i.nested && (a = i.nested.listitem), o !== void 0 && r.push(...F(o)), i) {
|
|
405
405
|
const l = t.getParent(), u = c(l) && l.getListType() === "check", d = t.getChecked();
|
|
406
|
-
u && !d || s.push(i.listitemUnchecked), u && d || s.push(i.listitemChecked), u &&
|
|
406
|
+
u && !d || s.push(i.listitemUnchecked), u && d || s.push(i.listitemChecked), u && r.push(d ? i.listitemChecked : i.listitemUnchecked);
|
|
407
407
|
}
|
|
408
408
|
if (a !== void 0) {
|
|
409
409
|
const l = F(a);
|
|
410
|
-
t.getChildren().some((u) => c(u)) ?
|
|
410
|
+
t.getChildren().some((u) => c(u)) ? r.push(...l) : s.push(...l);
|
|
411
411
|
}
|
|
412
|
-
s.length > 0 && X(
|
|
412
|
+
s.length > 0 && X(n, ...s), r.length > 0 && Y(n, ...r);
|
|
413
413
|
}
|
|
414
|
-
function V(
|
|
415
|
-
c(e.getFirstChild()) ? (
|
|
414
|
+
function V(n, e, t, r) {
|
|
415
|
+
c(e.getFirstChild()) ? (n.removeAttribute("role"), n.removeAttribute("tabIndex"), n.removeAttribute("aria-checked")) : (n.setAttribute("role", "checkbox"), n.setAttribute("tabIndex", "-1"), t && e.__checked === t.__checked || n.setAttribute("aria-checked", e.getChecked() ? "true" : "false"));
|
|
416
416
|
}
|
|
417
|
-
function de(
|
|
418
|
-
if (
|
|
419
|
-
for (const t of
|
|
417
|
+
function de(n) {
|
|
418
|
+
if (n.classList.contains("task-list-item")) {
|
|
419
|
+
for (const t of n.children) if (t.tagName === "INPUT") return pe(t);
|
|
420
420
|
}
|
|
421
|
-
const e =
|
|
421
|
+
const e = n.getAttribute("aria-checked");
|
|
422
422
|
return { node: f(e === "true" || e !== "false" && void 0) };
|
|
423
423
|
}
|
|
424
|
-
function pe(
|
|
425
|
-
return
|
|
424
|
+
function pe(n) {
|
|
425
|
+
return n.getAttribute("type") !== "checkbox" ? { node: null } : { node: f(n.hasAttribute("checked")) };
|
|
426
426
|
}
|
|
427
|
-
function f(
|
|
428
|
-
return H(new C(void 0,
|
|
427
|
+
function f(n) {
|
|
428
|
+
return H(new C(void 0, n));
|
|
429
429
|
}
|
|
430
|
-
function g(
|
|
431
|
-
return
|
|
430
|
+
function g(n) {
|
|
431
|
+
return n instanceof C;
|
|
432
432
|
}
|
|
433
|
-
class
|
|
433
|
+
class x extends Z {
|
|
434
434
|
static getType() {
|
|
435
435
|
return "list";
|
|
436
436
|
}
|
|
437
437
|
static clone(e) {
|
|
438
438
|
const t = e.__listType || j[e.__tag];
|
|
439
|
-
return new
|
|
439
|
+
return new x(t, e.__start, e.__key);
|
|
440
440
|
}
|
|
441
|
-
constructor(e = "number", t = 1,
|
|
442
|
-
super(
|
|
441
|
+
constructor(e = "number", t = 1, r) {
|
|
442
|
+
super(r);
|
|
443
443
|
const s = j[e] || e;
|
|
444
444
|
this.__listType = s, this.__tag = s === "number" ? "ol" : "ul", this.__start = t;
|
|
445
445
|
}
|
|
@@ -461,21 +461,21 @@ class k extends Z {
|
|
|
461
461
|
return t.__start = e, t;
|
|
462
462
|
}
|
|
463
463
|
createDOM(e, t) {
|
|
464
|
-
const
|
|
464
|
+
const r = this.__tag, s = document.createElement(r);
|
|
465
465
|
return this.__start !== 1 && s.setAttribute("start", String(this.__start)), s.__lexicalListType = this.__listType, R(s, e.theme, this), s;
|
|
466
466
|
}
|
|
467
|
-
updateDOM(e, t,
|
|
468
|
-
return e.__tag !== this.__tag || (R(t,
|
|
467
|
+
updateDOM(e, t, r) {
|
|
468
|
+
return e.__tag !== this.__tag || (R(t, r.theme, this), !1);
|
|
469
469
|
}
|
|
470
470
|
static transform() {
|
|
471
471
|
return (e) => {
|
|
472
472
|
c(e) || p(163), function(t) {
|
|
473
|
-
const
|
|
474
|
-
c(
|
|
473
|
+
const r = t.getNextSibling();
|
|
474
|
+
c(r) && t.getListType() === r.getListType() && I(t, r);
|
|
475
475
|
}(e), function(t) {
|
|
476
|
-
const
|
|
476
|
+
const r = t.getListType() !== "check";
|
|
477
477
|
let s = t.getStart();
|
|
478
|
-
for (const i of t.getChildren()) g(i) && (i.getValue() !== s && i.setValue(s),
|
|
478
|
+
for (const i of t.getChildren()) g(i) && (i.getValue() !== s && i.setValue(s), r && i.getLatest().__checked != null && i.setChecked(void 0), c(i.getFirstChild()) || s++);
|
|
479
479
|
}(e);
|
|
480
480
|
};
|
|
481
481
|
}
|
|
@@ -501,11 +501,11 @@ class k extends Z {
|
|
|
501
501
|
canIndent() {
|
|
502
502
|
return !1;
|
|
503
503
|
}
|
|
504
|
-
splice(e, t,
|
|
505
|
-
let s =
|
|
506
|
-
for (let i = 0; i <
|
|
507
|
-
const o =
|
|
508
|
-
g(o) || (s ===
|
|
504
|
+
splice(e, t, r) {
|
|
505
|
+
let s = r;
|
|
506
|
+
for (let i = 0; i < r.length; i++) {
|
|
507
|
+
const o = r[i];
|
|
508
|
+
g(o) || (s === r && (s = [...r]), s[i] = f().append(!v(o) || c(o) || o.isInline() ? o : ie(o.getTextContent())));
|
|
509
509
|
}
|
|
510
510
|
return super.splice(e, t, s);
|
|
511
511
|
}
|
|
@@ -513,79 +513,79 @@ class k extends Z {
|
|
|
513
513
|
return g(e);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function R(
|
|
517
|
-
const
|
|
516
|
+
function R(n, e, t) {
|
|
517
|
+
const r = [], s = [], i = e.list;
|
|
518
518
|
if (i !== void 0) {
|
|
519
519
|
const o = i[`${t.__tag}Depth`] || [], a = L(t) - 1, l = a % o.length, u = o[l], d = i[t.__tag];
|
|
520
520
|
let T;
|
|
521
521
|
const A = i.nested, E = i.checklist;
|
|
522
|
-
if (A !== void 0 && A.list && (T = A.list), d !== void 0 &&
|
|
523
|
-
|
|
522
|
+
if (A !== void 0 && A.list && (T = A.list), d !== void 0 && r.push(d), E !== void 0 && t.__listType === "check" && r.push(E), u !== void 0) {
|
|
523
|
+
r.push(...F(u));
|
|
524
524
|
for (let _ = 0; _ < o.length; _++) _ !== l && s.push(t.__tag + _);
|
|
525
525
|
}
|
|
526
526
|
if (T !== void 0) {
|
|
527
527
|
const _ = F(T);
|
|
528
|
-
a > 1 ?
|
|
528
|
+
a > 1 ? r.push(..._) : s.push(..._);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
s.length > 0 && X(
|
|
531
|
+
s.length > 0 && X(n, ...s), r.length > 0 && Y(n, ...r);
|
|
532
532
|
}
|
|
533
|
-
function me(
|
|
533
|
+
function me(n) {
|
|
534
534
|
const e = [];
|
|
535
|
-
for (let t = 0; t <
|
|
536
|
-
const
|
|
537
|
-
if (g(
|
|
538
|
-
e.push(
|
|
539
|
-
const s =
|
|
535
|
+
for (let t = 0; t < n.length; t++) {
|
|
536
|
+
const r = n[t];
|
|
537
|
+
if (g(r)) {
|
|
538
|
+
e.push(r);
|
|
539
|
+
const s = r.getChildren();
|
|
540
540
|
s.length > 1 && s.forEach((i) => {
|
|
541
541
|
c(i) && e.push(B(i));
|
|
542
542
|
});
|
|
543
|
-
} else e.push(B(
|
|
543
|
+
} else e.push(B(r));
|
|
544
544
|
}
|
|
545
545
|
return e;
|
|
546
546
|
}
|
|
547
|
-
function q(
|
|
548
|
-
const e =
|
|
547
|
+
function q(n) {
|
|
548
|
+
const e = n.nodeName.toLowerCase();
|
|
549
549
|
let t = null;
|
|
550
|
-
return e === "ol" ? t = h("number",
|
|
551
|
-
if (
|
|
552
|
-
for (const s of
|
|
550
|
+
return e === "ol" ? t = h("number", n.start) : e === "ul" && (t = function(r) {
|
|
551
|
+
if (r.getAttribute("__lexicallisttype") === "check" || r.classList.contains("contains-task-list")) return !0;
|
|
552
|
+
for (const s of r.childNodes) if (G(s) && s.hasAttribute("aria-checked")) return !0;
|
|
553
553
|
return !1;
|
|
554
|
-
}(
|
|
554
|
+
}(n) ? h("check") : h("bullet")), { after: me, node: t };
|
|
555
555
|
}
|
|
556
556
|
const j = { ol: "number", ul: "bullet" };
|
|
557
|
-
function h(
|
|
558
|
-
return H(new
|
|
557
|
+
function h(n = "number", e = 1) {
|
|
558
|
+
return H(new x(n, e));
|
|
559
559
|
}
|
|
560
|
-
function c(
|
|
561
|
-
return
|
|
560
|
+
function c(n) {
|
|
561
|
+
return n instanceof x;
|
|
562
562
|
}
|
|
563
563
|
const _e = w(), ye = w(), Te = w();
|
|
564
|
-
function
|
|
565
|
-
return
|
|
564
|
+
function xe(n) {
|
|
565
|
+
return re(n.registerCommand(ye, () => ($("number"), !0), k), n.registerCommand(_e, () => ($("bullet"), !0), k), n.registerCommand(Te, () => (ue(), !0), k), n.registerCommand(ae, () => fe(), k), n.registerNodeTransform(C, (e) => {
|
|
566
566
|
const t = e.getFirstChild();
|
|
567
567
|
if (t) {
|
|
568
568
|
if (ce(t)) {
|
|
569
|
-
const
|
|
570
|
-
e.getTextStyle() !==
|
|
569
|
+
const r = t.getStyle(), s = t.getFormat();
|
|
570
|
+
e.getTextStyle() !== r && e.setTextStyle(r), e.getTextFormat() !== s && e.setTextFormat(s);
|
|
571
571
|
}
|
|
572
572
|
} else {
|
|
573
|
-
const
|
|
574
|
-
|
|
573
|
+
const r = N();
|
|
574
|
+
S(r) && (r.style !== e.getTextStyle() || r.format !== e.getTextFormat()) && r.isCollapsed() && e.is(r.anchor.getNode()) && e.setTextStyle(r.style).setTextFormat(r.format);
|
|
575
575
|
}
|
|
576
|
-
}),
|
|
576
|
+
}), n.registerNodeTransform(le, (e) => {
|
|
577
577
|
const t = e.getParent();
|
|
578
578
|
if (g(t) && e.is(t.getFirstChild())) {
|
|
579
|
-
const
|
|
580
|
-
|
|
579
|
+
const r = e.getStyle(), s = e.getFormat();
|
|
580
|
+
r === t.getTextStyle() && s === t.getTextFormat() || t.setTextStyle(r).setTextFormat(s);
|
|
581
581
|
}
|
|
582
582
|
}));
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function ke(n) {
|
|
585
585
|
const e = (t) => {
|
|
586
|
-
const
|
|
587
|
-
if (c(t.getFirstChild()) || !c(
|
|
588
|
-
const s =
|
|
586
|
+
const r = t.getParent();
|
|
587
|
+
if (c(t.getFirstChild()) || !c(r)) return;
|
|
588
|
+
const s = ne(t, (i) => g(i) && c(i.getParent()) && g(i.getPreviousSibling()));
|
|
589
589
|
if (s === null && t.getIndent() > 0) t.setIndent(0);
|
|
590
590
|
else if (g(s)) {
|
|
591
591
|
const i = s.getPreviousSibling();
|
|
@@ -601,20 +601,20 @@ function be(r) {
|
|
|
601
601
|
}(i), a = o.getParent();
|
|
602
602
|
if (c(a)) {
|
|
603
603
|
const l = L(a);
|
|
604
|
-
l + 1 < L(
|
|
604
|
+
l + 1 < L(r) && t.setIndent(l);
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
};
|
|
609
|
-
return
|
|
610
|
-
const
|
|
611
|
-
for (;
|
|
612
|
-
const s =
|
|
609
|
+
return n.registerNodeTransform(x, (t) => {
|
|
610
|
+
const r = [t];
|
|
611
|
+
for (; r.length > 0; ) {
|
|
612
|
+
const s = r.shift();
|
|
613
613
|
if (c(s)) {
|
|
614
614
|
for (const i of s.getChildren()) if (g(i)) {
|
|
615
615
|
e(i);
|
|
616
616
|
const o = i.getFirstChild();
|
|
617
|
-
c(o) &&
|
|
617
|
+
c(o) && r.push(o);
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
}
|
|
@@ -623,13 +623,13 @@ function be(r) {
|
|
|
623
623
|
export {
|
|
624
624
|
Te as C,
|
|
625
625
|
C as G,
|
|
626
|
-
|
|
626
|
+
xe as T,
|
|
627
627
|
_e as _,
|
|
628
628
|
c as a,
|
|
629
629
|
h as c,
|
|
630
630
|
g as n,
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
x as r,
|
|
632
|
+
ke as v,
|
|
633
633
|
ye as y
|
|
634
634
|
};
|
|
635
|
-
//# sourceMappingURL=LexicalList.prod-
|
|
635
|
+
//# sourceMappingURL=LexicalList.prod-CsVDXdmw.js.map
|