@uva-glass/component-library 3.6.0 → 3.6.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/dist/{Lexical.prod-CniF7zEE.js → Lexical.prod-CWyHQUEM.js} +738 -736
- package/dist/Lexical.prod-CWyHQUEM.js.map +1 -0
- package/dist/{LexicalClipboard.prod-BXVNkwwS.js → LexicalClipboard.prod-DbqSWANZ.js} +41 -41
- package/dist/{LexicalClipboard.prod-BXVNkwwS.js.map → LexicalClipboard.prod-DbqSWANZ.js.map} +1 -1
- package/dist/LexicalLink.prod-DbxnRszt.js +275 -0
- package/dist/LexicalLink.prod-DbxnRszt.js.map +1 -0
- package/dist/{LexicalList.prod-BUcoZhe4.js → LexicalList.prod-pZmYrwOC.js} +212 -172
- package/dist/LexicalList.prod-pZmYrwOC.js.map +1 -0
- package/dist/{LexicalSelection.prod-BfAlhGGm.js → LexicalSelection.prod-DkvWlcln.js} +14 -14
- package/dist/{LexicalSelection.prod-BfAlhGGm.js.map → LexicalSelection.prod-DkvWlcln.js.map} +1 -1
- package/dist/LexicalTable.prod-C6duSS2P.js +1720 -0
- package/dist/LexicalTable.prod-C6duSS2P.js.map +1 -0
- package/dist/{LexicalUtils.prod-DVr8VsHc.js → LexicalUtils.prod-Dny9Fu94.js} +43 -43
- package/dist/{LexicalUtils.prod-DVr8VsHc.js.map → LexicalUtils.prod-Dny9Fu94.js.map} +1 -1
- package/dist/{TablePlugin-MjKuocl4.js → TablePlugin-Ba6PaBhf.js} +28 -28
- package/dist/{TablePlugin-MjKuocl4.js.map → TablePlugin-Ba6PaBhf.js.map} +1 -1
- package/dist/components/Accordion/Accordion.test.js +2 -2
- package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
- package/dist/components/ActionList/ActionList.test.js +2 -2
- package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
- package/dist/components/Attention/Attention.test.js +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +1 -1
- package/dist/components/Buttons/Button.test.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +1 -1
- package/dist/components/Card/Card.test.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.test.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/Label/Label.test.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +35 -35
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +13 -13
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +11 -11
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +237 -235
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +1 -1
- package/dist/components/Timeline/Timeline.test.js +2 -2
- package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/{helpers-ChM6xtQG.js → helpers-BUwfVZhW.js} +15 -15
- package/dist/{helpers-ChM6xtQG.js.map → helpers-BUwfVZhW.js.map} +1 -1
- package/dist/{index-hwMTfLfH.js → index-Ck15_vKo.js} +2 -2
- package/dist/{index-hwMTfLfH.js.map → index-Ck15_vKo.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react.esm-DI5ilWeT.js → react.esm-CMg7bmSn.js} +372 -366
- package/dist/{react.esm-DI5ilWeT.js.map → react.esm-CMg7bmSn.js.map} +1 -1
- package/package.json +28 -28
- package/dist/Lexical.prod-CniF7zEE.js.map +0 -1
- package/dist/LexicalLink.prod-Du8ZoNsh.js +0 -259
- package/dist/LexicalLink.prod-Du8ZoNsh.js.map +0 -1
- package/dist/LexicalList.prod-BUcoZhe4.js.map +0 -1
- package/dist/LexicalTable.prod-CYafu_j9.js +0 -1555
- package/dist/LexicalTable.prod-CYafu_j9.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import {
|
|
3
|
-
import { I as
|
|
4
|
-
function
|
|
1
|
+
import { i as X, r as Y, j as ne, w as re, v as se } from "./LexicalUtils.prod-Dny9Fu94.js";
|
|
2
|
+
import { f as Z, n as G, X as ie, d as S, T as P, w as oe, c as x, q as H, o as w, J as le, Y as ce, a as N, b as ae, E as b, U as v, G as Q, Z as J, l as M, z as D } from "./Lexical.prod-CWyHQUEM.js";
|
|
3
|
+
import { I as W } from "./LexicalSelection.prod-DkvWlcln.js";
|
|
4
|
+
function p(r, ...e) {
|
|
5
5
|
const t = new URL("https://lexical.dev/docs/error"), n = new URLSearchParams();
|
|
6
6
|
n.append("code", r);
|
|
7
7
|
for (const s of e) n.append("v", s);
|
|
8
8
|
throw t.search = n.toString(), Error(`Minified Lexical error #${r}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function L(r) {
|
|
11
11
|
let e = 1, t = r.getParent();
|
|
12
12
|
for (; t != null; ) {
|
|
13
|
-
if (
|
|
13
|
+
if (g(t)) {
|
|
14
14
|
const n = t.getParent();
|
|
15
15
|
if (c(n)) {
|
|
16
16
|
e++, t = n.getParent();
|
|
17
17
|
continue;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
p(40);
|
|
20
20
|
}
|
|
21
21
|
return e;
|
|
22
22
|
}
|
|
@@ -24,51 +24,51 @@ function ce(r) {
|
|
|
24
24
|
}
|
|
25
25
|
function O(r) {
|
|
26
26
|
let e = r.getParent();
|
|
27
|
-
c(e) ||
|
|
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
|
|
32
|
+
function ee(r) {
|
|
33
33
|
let e = [];
|
|
34
|
-
const t = r.getChildren().filter(
|
|
34
|
+
const t = r.getChildren().filter(g);
|
|
35
35
|
for (let n = 0; n < t.length; n++) {
|
|
36
36
|
const s = t[n], i = s.getFirstChild();
|
|
37
|
-
c(i) ? e = e.concat(
|
|
37
|
+
c(i) ? e = e.concat(ee(i)) : e.push(s);
|
|
38
38
|
}
|
|
39
39
|
return e;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
41
|
+
function m(r) {
|
|
42
|
+
return g(r) && c(r.getFirstChild());
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function B(r) {
|
|
45
45
|
return f().append(r);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
47
|
+
function te(r, e) {
|
|
48
|
+
return g(r) && (e.length === 0 || e.length === 1 && r.is(e[0]) && r.getChildrenSize() === 0);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function $(r) {
|
|
51
51
|
const e = N();
|
|
52
52
|
if (e !== null) {
|
|
53
53
|
let t = e.getNodes();
|
|
54
|
-
if (
|
|
54
|
+
if (x(e)) {
|
|
55
55
|
const s = e.getStartEndPoints();
|
|
56
|
-
s === null &&
|
|
56
|
+
s === null && p(143);
|
|
57
57
|
const [i] = s, o = i.getNode(), a = o.getParent();
|
|
58
|
-
if (
|
|
58
|
+
if (v(o)) {
|
|
59
59
|
const l = o.getFirstChild();
|
|
60
60
|
if (l) t = l.selectStart().getNodes();
|
|
61
61
|
else {
|
|
62
|
-
const u =
|
|
62
|
+
const u = P();
|
|
63
63
|
o.append(u), t = u.select().getNodes();
|
|
64
64
|
}
|
|
65
|
-
} else if (
|
|
66
|
-
const l =
|
|
67
|
-
if (
|
|
65
|
+
} else if (te(o, t)) {
|
|
66
|
+
const l = h(r);
|
|
67
|
+
if (v(a)) {
|
|
68
68
|
o.replace(l);
|
|
69
69
|
const u = f();
|
|
70
|
-
|
|
71
|
-
} else if (
|
|
70
|
+
S(o) && (u.setFormat(o.getFormatType()), u.setIndent(o.getIndent())), l.append(u);
|
|
71
|
+
} else if (g(o)) {
|
|
72
72
|
const u = o.getParentOrThrow();
|
|
73
73
|
y(l, u.getChildren()), u.replace(l);
|
|
74
74
|
}
|
|
@@ -78,135 +78,135 @@ function W(r) {
|
|
|
78
78
|
const n = /* @__PURE__ */ new Set();
|
|
79
79
|
for (let s = 0; s < t.length; s++) {
|
|
80
80
|
const i = t[s];
|
|
81
|
-
if (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
81
|
+
if (S(i) && i.isEmpty() && !g(i) && !n.has(i.getKey())) {
|
|
82
|
+
z(i, r);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
let o = Q(i) ? i.getParent() : g(i) && i.isEmpty() ? i : null;
|
|
86
|
+
for (; o != null; ) {
|
|
87
|
+
const a = o.getKey();
|
|
88
|
+
if (c(o)) {
|
|
89
|
+
if (!n.has(a)) {
|
|
90
|
+
const l = h(r);
|
|
91
|
+
y(l, o.getChildren()), o.replace(l), n.add(a);
|
|
92
|
+
}
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
{
|
|
96
|
+
const l = o.getParent();
|
|
97
|
+
if (v(l) && !n.has(a)) {
|
|
98
|
+
n.add(a), z(o, r);
|
|
99
|
+
break;
|
|
101
100
|
}
|
|
101
|
+
o = l;
|
|
102
102
|
}
|
|
103
|
-
}
|
|
103
|
+
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
function y(r, e) {
|
|
108
108
|
r.splice(r.getChildrenSize(), 0, e);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function z(r, e) {
|
|
111
111
|
if (c(r)) return r;
|
|
112
112
|
const t = r.getPreviousSibling(), n = r.getNextSibling(), s = f();
|
|
113
113
|
let i;
|
|
114
114
|
if (y(s, r.getChildren()), c(t) && e === t.getListType()) t.append(s), c(n) && e === n.getListType() && (y(t, n.getChildren()), n.remove()), i = t;
|
|
115
115
|
else if (c(n) && e === n.getListType()) n.getFirstChildOrThrow().insertBefore(s), i = n;
|
|
116
116
|
else {
|
|
117
|
-
const o =
|
|
117
|
+
const o = h(e);
|
|
118
118
|
o.append(s), r.replace(o), i = o;
|
|
119
119
|
}
|
|
120
120
|
return s.setFormat(r.getFormatType()), s.setIndent(r.getIndent()), r.remove(), i;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function I(r, e) {
|
|
123
123
|
const t = r.getLastChild(), n = e.getFirstChild();
|
|
124
|
-
t && n &&
|
|
124
|
+
t && n && m(t) && m(n) && (I(t.getFirstChild(), n.getFirstChild()), n.remove());
|
|
125
125
|
const s = e.getChildren();
|
|
126
126
|
s.length > 0 && r.append(...s), e.remove();
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function ue() {
|
|
129
129
|
const r = N();
|
|
130
|
-
if (
|
|
130
|
+
if (x(r)) {
|
|
131
131
|
const e = /* @__PURE__ */ new Set(), t = r.getNodes(), n = r.anchor.getNode();
|
|
132
|
-
if (
|
|
132
|
+
if (te(n, t)) e.add(O(n));
|
|
133
133
|
else for (let s = 0; s < t.length; s++) {
|
|
134
134
|
const i = t[s];
|
|
135
|
-
if (
|
|
136
|
-
const o =
|
|
135
|
+
if (Q(i)) {
|
|
136
|
+
const o = se(i, C);
|
|
137
137
|
o != null && e.add(O(o));
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
for (const s of e) {
|
|
141
141
|
let i = s;
|
|
142
|
-
const o =
|
|
142
|
+
const o = ee(s);
|
|
143
143
|
for (const a of o) {
|
|
144
|
-
const l =
|
|
145
|
-
y(l, a.getChildren()), i.insertAfter(l), i = l, a.__key === r.anchor.key && J(r.anchor,
|
|
144
|
+
const l = P().setTextStyle(r.style).setTextFormat(r.format);
|
|
145
|
+
y(l, a.getChildren()), i.insertAfter(l), i = l, a.__key === r.anchor.key && J(r.anchor, M(D(l, "next"))), a.__key === r.focus.key && J(r.focus, M(D(l, "next"))), a.remove();
|
|
146
146
|
}
|
|
147
147
|
s.remove();
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function ge(r) {
|
|
152
152
|
const e = /* @__PURE__ */ new Set();
|
|
153
|
-
if (
|
|
153
|
+
if (m(r) || e.has(r.getKey())) return;
|
|
154
154
|
const t = r.getParent(), n = r.getNextSibling(), s = r.getPreviousSibling();
|
|
155
|
-
if (
|
|
155
|
+
if (m(n) && m(s)) {
|
|
156
156
|
const i = s.getFirstChild();
|
|
157
157
|
if (c(i)) {
|
|
158
158
|
i.append(r);
|
|
159
159
|
const o = n.getFirstChild();
|
|
160
160
|
c(o) && (y(i, o.getChildren()), n.remove(), e.add(n.getKey()));
|
|
161
161
|
}
|
|
162
|
-
} else if (
|
|
162
|
+
} else if (m(n)) {
|
|
163
163
|
const i = n.getFirstChild();
|
|
164
164
|
if (c(i)) {
|
|
165
165
|
const o = i.getFirstChild();
|
|
166
166
|
o !== null && o.insertBefore(r);
|
|
167
167
|
}
|
|
168
|
-
} else if (
|
|
168
|
+
} else if (m(s)) {
|
|
169
169
|
const i = s.getFirstChild();
|
|
170
170
|
c(i) && i.append(r);
|
|
171
171
|
} else if (c(t)) {
|
|
172
|
-
const i = f().setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle()), o =
|
|
172
|
+
const i = f().setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle()), o = h(t.getListType()).setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle());
|
|
173
173
|
i.append(o), o.append(r), s ? s.insertAfter(i) : n ? n.insertBefore(i) : t.append(i);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
function he(r) {
|
|
177
|
-
if (
|
|
177
|
+
if (m(r)) return;
|
|
178
178
|
const e = r.getParent(), t = e ? e.getParent() : void 0;
|
|
179
|
-
if (c(t ? t.getParent() : void 0) &&
|
|
179
|
+
if (c(t ? t.getParent() : void 0) && g(t) && c(e)) {
|
|
180
180
|
const n = e ? e.getFirstChild() : void 0, s = e ? e.getLastChild() : void 0;
|
|
181
181
|
if (r.is(n)) t.insertBefore(r), e.isEmpty() && t.remove();
|
|
182
182
|
else if (r.is(s)) t.insertAfter(r), e.isEmpty() && t.remove();
|
|
183
183
|
else {
|
|
184
|
-
const i = e.getListType(), o = f(), a =
|
|
185
|
-
o.append(a), r.getPreviousSiblings().forEach((
|
|
186
|
-
const l = f(), u =
|
|
184
|
+
const i = e.getListType(), o = f(), a = h(i);
|
|
185
|
+
o.append(a), r.getPreviousSiblings().forEach((d) => a.append(d));
|
|
186
|
+
const l = f(), u = h(i);
|
|
187
187
|
l.append(u), y(u, r.getNextSiblings()), t.insertBefore(o), t.insertAfter(l), t.replace(r);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function fe() {
|
|
192
192
|
const r = N();
|
|
193
|
-
if (!
|
|
193
|
+
if (!x(r) || !r.isCollapsed()) return !1;
|
|
194
194
|
const e = r.anchor.getNode();
|
|
195
|
-
if (!
|
|
195
|
+
if (!g(e) || e.getChildrenSize() !== 0) return !1;
|
|
196
196
|
const t = O(e), n = e.getParent();
|
|
197
|
-
c(n) ||
|
|
197
|
+
c(n) || p(40);
|
|
198
198
|
const s = n.getParent();
|
|
199
199
|
let i;
|
|
200
|
-
if (
|
|
200
|
+
if (v(s)) i = P(), t.insertAfter(i);
|
|
201
201
|
else {
|
|
202
|
-
if (!
|
|
202
|
+
if (!g(s)) return !1;
|
|
203
203
|
i = f(), s.insertAfter(i);
|
|
204
204
|
}
|
|
205
205
|
i.setTextStyle(r.style).setTextFormat(r.format).select();
|
|
206
206
|
const o = e.getNextSiblings();
|
|
207
207
|
if (o.length > 0) {
|
|
208
|
-
const a =
|
|
209
|
-
if (
|
|
208
|
+
const a = h(n.getListType());
|
|
209
|
+
if (g(i)) {
|
|
210
210
|
const l = f();
|
|
211
211
|
l.append(a), i.insertAfter(l);
|
|
212
212
|
} else i.insertAfter(a);
|
|
@@ -216,53 +216,53 @@ function ge() {
|
|
|
216
216
|
let l = a;
|
|
217
217
|
for (; l.getNextSibling() == null && l.getPreviousSibling() == null; ) {
|
|
218
218
|
const u = l.getParent();
|
|
219
|
-
if (u == null || !
|
|
219
|
+
if (u == null || !g(u) && !c(u)) break;
|
|
220
220
|
l = u;
|
|
221
221
|
}
|
|
222
222
|
l.remove();
|
|
223
223
|
}(e), !0;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function F(...r) {
|
|
226
226
|
const e = [];
|
|
227
227
|
for (const t of r) if (t && typeof t == "string") for (const [n] of t.matchAll(/\S+/g)) e.push(n);
|
|
228
228
|
return e;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
const n =
|
|
230
|
+
function K(r, e, t) {
|
|
231
|
+
const n = W(e.__textStyle);
|
|
232
232
|
for (const s in n) r.style.setProperty(`--listitem-marker-${s}`, n[s]);
|
|
233
|
-
if (t) for (const s in
|
|
233
|
+
if (t) for (const s in W(t.__textStyle)) s in n || r.style.removeProperty(`--listitem-marker-${s}`);
|
|
234
234
|
}
|
|
235
|
-
class
|
|
235
|
+
class C extends Z {
|
|
236
236
|
static getType() {
|
|
237
237
|
return "listitem";
|
|
238
238
|
}
|
|
239
239
|
static clone(e) {
|
|
240
|
-
return new
|
|
240
|
+
return new C(e.__value, e.__checked, e.__key);
|
|
241
241
|
}
|
|
242
242
|
constructor(e, t, n) {
|
|
243
243
|
super(n), this.__value = e === void 0 ? 1 : e, this.__checked = t;
|
|
244
244
|
}
|
|
245
245
|
createDOM(e) {
|
|
246
246
|
const t = document.createElement("li"), n = this.getParent();
|
|
247
|
-
c(n) && n.getListType() === "check" && V(t, this, null), t.value = this.__value,
|
|
247
|
+
c(n) && n.getListType() === "check" && V(t, this, null), t.value = this.__value, U(t, e.theme, this);
|
|
248
248
|
const s = this.__style;
|
|
249
|
-
return s && (t.style.cssText = s),
|
|
249
|
+
return s && (t.style.cssText = s), K(t, this, null), t;
|
|
250
250
|
}
|
|
251
251
|
updateDOM(e, t, n) {
|
|
252
252
|
const s = this.getParent();
|
|
253
|
-
c(s) && s.getListType() === "check" && V(t, this, e), t.value = this.__value,
|
|
253
|
+
c(s) && s.getListType() === "check" && V(t, this, e), t.value = this.__value, U(t, n.theme, this);
|
|
254
254
|
const i = e.__style, o = this.__style;
|
|
255
|
-
return i !== o && (o === "" ? t.removeAttribute("style") : t.style.cssText = o),
|
|
255
|
+
return i !== o && (o === "" ? t.removeAttribute("style") : t.style.cssText = o), K(t, this, e), !1;
|
|
256
256
|
}
|
|
257
257
|
static transform() {
|
|
258
258
|
return (e) => {
|
|
259
|
-
if (
|
|
259
|
+
if (g(e) || p(144), e.__checked == null) return;
|
|
260
260
|
const t = e.getParent();
|
|
261
261
|
c(t) && t.getListType() !== "check" && e.getChecked() != null && e.setChecked(void 0);
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
264
|
static importDOM() {
|
|
265
|
-
return { li: () => ({ conversion:
|
|
265
|
+
return { li: () => ({ conversion: de, priority: 0 }) };
|
|
266
266
|
}
|
|
267
267
|
static importJSON(e) {
|
|
268
268
|
return f().updateFromJSON(e);
|
|
@@ -282,7 +282,7 @@ class T extends Y {
|
|
|
282
282
|
append(...e) {
|
|
283
283
|
for (let t = 0; t < e.length; t++) {
|
|
284
284
|
const n = e[t];
|
|
285
|
-
if (
|
|
285
|
+
if (S(n) && this.canMergeWith(n)) {
|
|
286
286
|
const s = n.getChildren();
|
|
287
287
|
this.append(...s), n.remove();
|
|
288
288
|
} else super.append(n);
|
|
@@ -290,14 +290,14 @@ class T extends Y {
|
|
|
290
290
|
return this;
|
|
291
291
|
}
|
|
292
292
|
replace(e, t) {
|
|
293
|
-
if (
|
|
293
|
+
if (g(e)) return super.replace(e);
|
|
294
294
|
this.setIndent(0);
|
|
295
295
|
const n = this.getParentOrThrow();
|
|
296
296
|
if (!c(n)) return e;
|
|
297
297
|
if (n.__first === this.getKey()) n.insertBefore(e);
|
|
298
298
|
else if (n.__last === this.getKey()) n.insertAfter(e);
|
|
299
299
|
else {
|
|
300
|
-
const s =
|
|
300
|
+
const s = h(n.getListType());
|
|
301
301
|
let i = this.getNextSibling();
|
|
302
302
|
for (; i; ) {
|
|
303
303
|
const o = i;
|
|
@@ -305,32 +305,32 @@ class T extends Y {
|
|
|
305
305
|
}
|
|
306
306
|
n.insertAfter(e), e.insertAfter(s);
|
|
307
307
|
}
|
|
308
|
-
return t && (
|
|
308
|
+
return t && (S(e) || p(139), this.getChildren().forEach((s) => {
|
|
309
309
|
e.append(s);
|
|
310
310
|
})), this.remove(), n.getChildrenSize() === 0 && n.remove(), e;
|
|
311
311
|
}
|
|
312
312
|
insertAfter(e, t = !0) {
|
|
313
313
|
const n = this.getParentOrThrow();
|
|
314
|
-
if (c(n) ||
|
|
314
|
+
if (c(n) || p(39), g(e)) return super.insertAfter(e, t);
|
|
315
315
|
const s = this.getNextSiblings();
|
|
316
316
|
if (n.insertAfter(e, t), s.length !== 0) {
|
|
317
|
-
const i =
|
|
317
|
+
const i = h(n.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
323
|
const t = this.getPreviousSibling(), n = this.getNextSibling();
|
|
324
|
-
super.remove(e), t && n &&
|
|
324
|
+
super.remove(e), t && n && m(t) && m(n) && (I(t.getFirstChild(), n.getFirstChild()), n.remove());
|
|
325
325
|
}
|
|
326
326
|
insertNewAfter(e, t = !0) {
|
|
327
327
|
const n = f().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked() && void 0);
|
|
328
328
|
return this.insertAfter(n, t), n;
|
|
329
329
|
}
|
|
330
330
|
collapseAtStart(e) {
|
|
331
|
-
const t =
|
|
331
|
+
const t = P();
|
|
332
332
|
this.getChildren().forEach((o) => t.append(o));
|
|
333
|
-
const n = this.getParentOrThrow(), s = n.getParentOrThrow(), i =
|
|
333
|
+
const n = this.getParentOrThrow(), s = n.getParentOrThrow(), i = g(s);
|
|
334
334
|
if (n.getChildrenSize() === 1) if (i) n.remove(), s.select();
|
|
335
335
|
else {
|
|
336
336
|
n.insertBefore(t), n.remove();
|
|
@@ -365,26 +365,26 @@ class T extends Y {
|
|
|
365
365
|
const e = this.getParent();
|
|
366
366
|
if (e === null || !this.isAttached()) return this.getLatest().__indent;
|
|
367
367
|
let t = e.getParentOrThrow(), n = 0;
|
|
368
|
-
for (;
|
|
368
|
+
for (; g(t); ) t = t.getParentOrThrow().getParentOrThrow(), n++;
|
|
369
369
|
return n;
|
|
370
370
|
}
|
|
371
371
|
setIndent(e) {
|
|
372
|
-
typeof e != "number" &&
|
|
372
|
+
typeof e != "number" && p(117), (e = Math.floor(e)) >= 0 || p(199);
|
|
373
373
|
let t = this.getIndent();
|
|
374
|
-
for (; t !== e; ) t < e ? (
|
|
374
|
+
for (; t !== e; ) t < e ? (ge(this), t++) : (he(this), t--);
|
|
375
375
|
return this;
|
|
376
376
|
}
|
|
377
377
|
canInsertAfter(e) {
|
|
378
|
-
return
|
|
378
|
+
return g(e);
|
|
379
379
|
}
|
|
380
380
|
canReplaceWith(e) {
|
|
381
|
-
return
|
|
381
|
+
return g(e);
|
|
382
382
|
}
|
|
383
383
|
canMergeWith(e) {
|
|
384
|
-
return
|
|
384
|
+
return g(e) || oe(e);
|
|
385
385
|
}
|
|
386
386
|
extractWithChild(e, t) {
|
|
387
|
-
if (!
|
|
387
|
+
if (!x(t)) return !1;
|
|
388
388
|
const n = t.anchor.getNode(), s = t.focus.getNode();
|
|
389
389
|
return this.isParentOf(n) && this.isParentOf(s) && this.getTextContent().length === t.getTextContent().length;
|
|
390
390
|
}
|
|
@@ -392,55 +392,55 @@ class T extends Y {
|
|
|
392
392
|
return !0;
|
|
393
393
|
}
|
|
394
394
|
createParentElementNode() {
|
|
395
|
-
return
|
|
395
|
+
return h("bullet");
|
|
396
396
|
}
|
|
397
397
|
canMergeWhenEmpty() {
|
|
398
398
|
return !0;
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function U(r, e, t) {
|
|
402
402
|
const n = [], 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 && n.push(...
|
|
405
|
-
const l = t.getParent(), u = c(l) && l.getListType() === "check",
|
|
406
|
-
u && !
|
|
404
|
+
if (i && i.nested && (a = i.nested.listitem), o !== void 0 && n.push(...F(o)), i) {
|
|
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 && n.push(d ? i.listitemChecked : i.listitemUnchecked);
|
|
407
407
|
}
|
|
408
408
|
if (a !== void 0) {
|
|
409
|
-
const l =
|
|
409
|
+
const l = F(a);
|
|
410
410
|
t.getChildren().some((u) => c(u)) ? n.push(...l) : s.push(...l);
|
|
411
411
|
}
|
|
412
|
-
s.length > 0 &&
|
|
412
|
+
s.length > 0 && X(r, ...s), n.length > 0 && Y(r, ...n);
|
|
413
413
|
}
|
|
414
414
|
function V(r, e, t, n) {
|
|
415
415
|
c(e.getFirstChild()) ? (r.removeAttribute("role"), r.removeAttribute("tabIndex"), r.removeAttribute("aria-checked")) : (r.setAttribute("role", "checkbox"), r.setAttribute("tabIndex", "-1"), t && e.__checked === t.__checked || r.setAttribute("aria-checked", e.getChecked() ? "true" : "false"));
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function de(r) {
|
|
418
418
|
if (r.classList.contains("task-list-item")) {
|
|
419
|
-
for (const t of r.children) if (t.tagName === "INPUT") return
|
|
419
|
+
for (const t of r.children) if (t.tagName === "INPUT") return pe(t);
|
|
420
420
|
}
|
|
421
421
|
const e = r.getAttribute("aria-checked");
|
|
422
422
|
return { node: f(e === "true" || e !== "false" && void 0) };
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function pe(r) {
|
|
425
425
|
return r.getAttribute("type") !== "checkbox" ? { node: null } : { node: f(r.hasAttribute("checked")) };
|
|
426
426
|
}
|
|
427
427
|
function f(r) {
|
|
428
|
-
return
|
|
428
|
+
return H(new C(void 0, r));
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
return r instanceof
|
|
430
|
+
function g(r) {
|
|
431
|
+
return r instanceof C;
|
|
432
432
|
}
|
|
433
|
-
class
|
|
433
|
+
class k extends Z {
|
|
434
434
|
static getType() {
|
|
435
435
|
return "list";
|
|
436
436
|
}
|
|
437
437
|
static clone(e) {
|
|
438
|
-
const t = e.__listType ||
|
|
439
|
-
return new
|
|
438
|
+
const t = e.__listType || j[e.__tag];
|
|
439
|
+
return new k(t, e.__start, e.__key);
|
|
440
440
|
}
|
|
441
441
|
constructor(e = "number", t = 1, n) {
|
|
442
442
|
super(n);
|
|
443
|
-
const s =
|
|
443
|
+
const s = j[e] || e;
|
|
444
444
|
this.__listType = s, this.__tag = s === "number" ? "ol" : "ul", this.__start = t;
|
|
445
445
|
}
|
|
446
446
|
getTag() {
|
|
@@ -462,35 +462,35 @@ class P extends Y {
|
|
|
462
462
|
}
|
|
463
463
|
createDOM(e, t) {
|
|
464
464
|
const n = this.__tag, s = document.createElement(n);
|
|
465
|
-
return this.__start !== 1 && s.setAttribute("start", String(this.__start)), s.__lexicalListType = this.__listType,
|
|
465
|
+
return this.__start !== 1 && s.setAttribute("start", String(this.__start)), s.__lexicalListType = this.__listType, R(s, e.theme, this), s;
|
|
466
466
|
}
|
|
467
467
|
updateDOM(e, t, n) {
|
|
468
|
-
return e.__tag !== this.__tag || (
|
|
468
|
+
return e.__tag !== this.__tag || (R(t, n.theme, this), !1);
|
|
469
469
|
}
|
|
470
470
|
static transform() {
|
|
471
471
|
return (e) => {
|
|
472
|
-
c(e) ||
|
|
472
|
+
c(e) || p(163), function(t) {
|
|
473
473
|
const n = t.getNextSibling();
|
|
474
|
-
c(n) && t.getListType() === n.getListType() &&
|
|
474
|
+
c(n) && t.getListType() === n.getListType() && I(t, n);
|
|
475
475
|
}(e), function(t) {
|
|
476
476
|
const n = t.getListType() !== "check";
|
|
477
477
|
let s = t.getStart();
|
|
478
|
-
for (const i of t.getChildren())
|
|
478
|
+
for (const i of t.getChildren()) g(i) && (i.getValue() !== s && i.setValue(s), n && i.getLatest().__checked != null && i.setChecked(void 0), c(i.getFirstChild()) || s++);
|
|
479
479
|
}(e);
|
|
480
480
|
};
|
|
481
481
|
}
|
|
482
482
|
static importDOM() {
|
|
483
|
-
return { ol: () => ({ conversion:
|
|
483
|
+
return { ol: () => ({ conversion: q, priority: 0 }), ul: () => ({ conversion: q, priority: 0 }) };
|
|
484
484
|
}
|
|
485
485
|
static importJSON(e) {
|
|
486
|
-
return
|
|
486
|
+
return h().updateFromJSON(e);
|
|
487
487
|
}
|
|
488
488
|
updateFromJSON(e) {
|
|
489
489
|
return super.updateFromJSON(e).setListType(e.listType).setStart(e.start);
|
|
490
490
|
}
|
|
491
491
|
exportDOM(e) {
|
|
492
492
|
const t = this.createDOM(e._config, e);
|
|
493
|
-
return
|
|
493
|
+
return G(t) && (this.__start !== 1 && t.setAttribute("start", String(this.__start)), this.__listType === "check" && t.setAttribute("__lexicalListType", "check")), { element: t };
|
|
494
494
|
}
|
|
495
495
|
exportJSON() {
|
|
496
496
|
return { ...super.exportJSON(), listType: this.getListType(), start: this.getStart(), tag: this.getTag() };
|
|
@@ -505,91 +505,131 @@ class P extends Y {
|
|
|
505
505
|
let s = n;
|
|
506
506
|
for (let i = 0; i < n.length; i++) {
|
|
507
507
|
const o = n[i];
|
|
508
|
-
|
|
508
|
+
g(o) || (s === n && (s = [...n]), s[i] = f().append(!S(o) || c(o) || o.isInline() ? o : ie(o.getTextContent())));
|
|
509
509
|
}
|
|
510
510
|
return super.splice(e, t, s);
|
|
511
511
|
}
|
|
512
512
|
extractWithChild(e) {
|
|
513
|
-
return
|
|
513
|
+
return g(e);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function R(r, e, t) {
|
|
517
517
|
const n = [], s = [], i = e.list;
|
|
518
518
|
if (i !== void 0) {
|
|
519
|
-
const o = i[`${t.__tag}Depth`] || [], a =
|
|
520
|
-
let
|
|
521
|
-
const A = i.nested,
|
|
522
|
-
if (A !== void 0 && A.list && (
|
|
523
|
-
n.push(...
|
|
519
|
+
const o = i[`${t.__tag}Depth`] || [], a = L(t) - 1, l = a % o.length, u = o[l], d = i[t.__tag];
|
|
520
|
+
let T;
|
|
521
|
+
const A = i.nested, E = i.checklist;
|
|
522
|
+
if (A !== void 0 && A.list && (T = A.list), d !== void 0 && n.push(d), E !== void 0 && t.__listType === "check" && n.push(E), u !== void 0) {
|
|
523
|
+
n.push(...F(u));
|
|
524
524
|
for (let _ = 0; _ < o.length; _++) _ !== l && s.push(t.__tag + _);
|
|
525
525
|
}
|
|
526
|
-
if (
|
|
527
|
-
const _ =
|
|
526
|
+
if (T !== void 0) {
|
|
527
|
+
const _ = F(T);
|
|
528
528
|
a > 1 ? n.push(..._) : s.push(..._);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
s.length > 0 &&
|
|
531
|
+
s.length > 0 && X(r, ...s), n.length > 0 && Y(r, ...n);
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function me(r) {
|
|
534
534
|
const e = [];
|
|
535
535
|
for (let t = 0; t < r.length; t++) {
|
|
536
536
|
const n = r[t];
|
|
537
|
-
if (
|
|
537
|
+
if (g(n)) {
|
|
538
538
|
e.push(n);
|
|
539
539
|
const s = n.getChildren();
|
|
540
540
|
s.length > 1 && s.forEach((i) => {
|
|
541
|
-
c(i) && e.push(
|
|
541
|
+
c(i) && e.push(B(i));
|
|
542
542
|
});
|
|
543
|
-
} else e.push(
|
|
543
|
+
} else e.push(B(n));
|
|
544
544
|
}
|
|
545
545
|
return e;
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function q(r) {
|
|
548
548
|
const e = r.nodeName.toLowerCase();
|
|
549
549
|
let t = null;
|
|
550
|
-
return e === "ol" ? t =
|
|
550
|
+
return e === "ol" ? t = h("number", r.start) : e === "ul" && (t = function(n) {
|
|
551
551
|
if (n.getAttribute("__lexicallisttype") === "check" || n.classList.contains("contains-task-list")) return !0;
|
|
552
|
-
for (const s of n.childNodes) if (
|
|
552
|
+
for (const s of n.childNodes) if (G(s) && s.hasAttribute("aria-checked")) return !0;
|
|
553
553
|
return !1;
|
|
554
|
-
}(r) ?
|
|
554
|
+
}(r) ? h("check") : h("bullet")), { after: me, node: t };
|
|
555
555
|
}
|
|
556
|
-
const
|
|
557
|
-
function
|
|
558
|
-
return
|
|
556
|
+
const j = { ol: "number", ul: "bullet" };
|
|
557
|
+
function h(r = "number", e = 1) {
|
|
558
|
+
return H(new k(r, e));
|
|
559
559
|
}
|
|
560
560
|
function c(r) {
|
|
561
|
-
return r instanceof
|
|
561
|
+
return r instanceof k;
|
|
562
562
|
}
|
|
563
|
-
const
|
|
564
|
-
function
|
|
565
|
-
return
|
|
563
|
+
const _e = w(), ye = w(), Te = w();
|
|
564
|
+
function ke(r) {
|
|
565
|
+
return ne(r.registerCommand(ye, () => ($("number"), !0), b), r.registerCommand(_e, () => ($("bullet"), !0), b), r.registerCommand(Te, () => (ue(), !0), b), r.registerCommand(ae, () => fe(), b), r.registerNodeTransform(C, (e) => {
|
|
566
566
|
const t = e.getFirstChild();
|
|
567
567
|
if (t) {
|
|
568
|
-
if (
|
|
568
|
+
if (ce(t)) {
|
|
569
569
|
const n = t.getStyle(), s = t.getFormat();
|
|
570
570
|
e.getTextStyle() !== n && e.setTextStyle(n), e.getTextFormat() !== s && e.setTextFormat(s);
|
|
571
571
|
}
|
|
572
572
|
} else {
|
|
573
573
|
const n = N();
|
|
574
|
-
|
|
574
|
+
x(n) && (n.style !== e.getTextStyle() || n.format !== e.getTextFormat()) && n.isCollapsed() && e.is(n.anchor.getNode()) && e.setTextStyle(n.style).setTextFormat(n.format);
|
|
575
575
|
}
|
|
576
|
-
}), r.registerNodeTransform(
|
|
576
|
+
}), r.registerNodeTransform(le, (e) => {
|
|
577
577
|
const t = e.getParent();
|
|
578
|
-
if (
|
|
578
|
+
if (g(t) && e.is(t.getFirstChild())) {
|
|
579
579
|
const n = e.getStyle(), s = e.getFormat();
|
|
580
580
|
n === t.getTextStyle() && s === t.getTextFormat() || t.setTextStyle(n).setTextFormat(s);
|
|
581
581
|
}
|
|
582
582
|
}));
|
|
583
583
|
}
|
|
584
|
+
function be(r) {
|
|
585
|
+
const e = (t) => {
|
|
586
|
+
const n = t.getParent();
|
|
587
|
+
if (c(t.getFirstChild()) || !c(n)) return;
|
|
588
|
+
const s = re(t, (i) => g(i) && c(i.getParent()) && g(i.getPreviousSibling()));
|
|
589
|
+
if (s === null && t.getIndent() > 0) t.setIndent(0);
|
|
590
|
+
else if (g(s)) {
|
|
591
|
+
const i = s.getPreviousSibling();
|
|
592
|
+
if (g(i)) {
|
|
593
|
+
const o = function(l) {
|
|
594
|
+
let u = l, d = u.getFirstChild();
|
|
595
|
+
for (; c(d); ) {
|
|
596
|
+
const T = d.getLastChild();
|
|
597
|
+
if (!g(T)) break;
|
|
598
|
+
u = T, d = u.getFirstChild();
|
|
599
|
+
}
|
|
600
|
+
return u;
|
|
601
|
+
}(i), a = o.getParent();
|
|
602
|
+
if (c(a)) {
|
|
603
|
+
const l = L(a);
|
|
604
|
+
l + 1 < L(n) && t.setIndent(l);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
};
|
|
609
|
+
return r.registerNodeTransform(k, (t) => {
|
|
610
|
+
const n = [t];
|
|
611
|
+
for (; n.length > 0; ) {
|
|
612
|
+
const s = n.shift();
|
|
613
|
+
if (c(s)) {
|
|
614
|
+
for (const i of s.getChildren()) if (g(i)) {
|
|
615
|
+
e(i);
|
|
616
|
+
const o = i.getFirstChild();
|
|
617
|
+
c(o) && n.push(o);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
}
|
|
584
623
|
export {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
624
|
+
Te as C,
|
|
625
|
+
C as G,
|
|
626
|
+
ke as T,
|
|
627
|
+
_e as _,
|
|
628
|
+
c as a,
|
|
629
|
+
h as c,
|
|
630
|
+
g as n,
|
|
631
|
+
k as r,
|
|
632
|
+
be as v,
|
|
633
|
+
ye as y
|
|
594
634
|
};
|
|
595
|
-
//# sourceMappingURL=LexicalList.prod-
|
|
635
|
+
//# sourceMappingURL=LexicalList.prod-pZmYrwOC.js.map
|