@uva-glass/component-library 3.53.12 → 3.53.14

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.
Files changed (125) hide show
  1. package/dist/{Lexical.prod-Dgzi-S1E.js → Lexical.prod-YJ1n9pVJ.js} +1334 -1305
  2. package/dist/Lexical.prod-YJ1n9pVJ.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-Dxc8c2F_.js → LexicalClipboard.prod-CDPAGlNs.js} +52 -52
  4. package/dist/{LexicalClipboard.prod-Dxc8c2F_.js.map → LexicalClipboard.prod-CDPAGlNs.js.map} +1 -1
  5. package/dist/{LexicalExtension.prod-CNBWjmfs.js → LexicalExtension.prod-2-giLTv9.js} +87 -88
  6. package/dist/LexicalExtension.prod-2-giLTv9.js.map +1 -0
  7. package/dist/LexicalLink.prod-u8L4ioQd.js +528 -0
  8. package/dist/LexicalLink.prod-u8L4ioQd.js.map +1 -0
  9. package/dist/LexicalList.prod-DMU0XSLO.js +630 -0
  10. package/dist/LexicalList.prod-DMU0XSLO.js.map +1 -0
  11. package/dist/{LexicalSelection.prod-B0uiXGSS.js → LexicalSelection.prod-CpZE7Sey.js} +41 -41
  12. package/dist/{LexicalSelection.prod-B0uiXGSS.js.map → LexicalSelection.prod-CpZE7Sey.js.map} +1 -1
  13. package/dist/LexicalTable.prod-BOlKc5zf.js +1846 -0
  14. package/dist/LexicalTable.prod-BOlKc5zf.js.map +1 -0
  15. package/dist/LexicalUtils.prod-BQnuAaA9.js +92 -0
  16. package/dist/LexicalUtils.prod-BQnuAaA9.js.map +1 -0
  17. package/dist/{TableCellResizerPlugin-9kvw_LpH.js → TableCellResizerPlugin-BTfuE_kM.js} +53 -53
  18. package/dist/{TableCellResizerPlugin-9kvw_LpH.js.map → TableCellResizerPlugin-BTfuE_kM.js.map} +1 -1
  19. package/dist/{TablePlugin-BlXaQ0U6.js → TablePlugin-bFqq2Yd9.js} +75 -75
  20. package/dist/{TablePlugin-BlXaQ0U6.js.map → TablePlugin-bFqq2Yd9.js.map} +1 -1
  21. package/dist/{chunk-MDLQUVZN-Dk02kWJ8.js → chunk-2N4WE3KZ-DQvXvHLf.js} +534 -530
  22. package/dist/chunk-2N4WE3KZ-DQvXvHLf.js.map +1 -0
  23. package/dist/{client-3XNwBsl7.js → client-D5eE1v54.js} +90 -90
  24. package/dist/{client-3XNwBsl7.js.map → client-D5eE1v54.js.map} +1 -1
  25. package/dist/components/Accordion/Accordion.test.js +2 -2
  26. package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
  27. package/dist/components/ActionList/ActionList.test.js +2 -2
  28. package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
  29. package/dist/components/Attention/Attention.test.js +1 -1
  30. package/dist/components/Backdrop/Backdrop.test.js +1 -1
  31. package/dist/components/Buttons/Button.stories.js +1 -1
  32. package/dist/components/Buttons/Button.test.js +1 -1
  33. package/dist/components/Buttons/LinkButton.stories.js +1 -1
  34. package/dist/components/Buttons/LinkButton.test.js +1 -1
  35. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  36. package/dist/components/Buttons/MenuButton.test.js +1 -1
  37. package/dist/components/Card/Card.test.js +1 -1
  38. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  39. package/dist/components/Checkbox/Checkbox.test.js +2 -2
  40. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  41. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
  42. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  43. package/dist/components/CheckboxTree/CheckboxTree.stories.js +2 -2
  44. package/dist/components/Chip/Chip.stories.js +1 -1
  45. package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
  46. package/dist/components/Drawer/Drawer.stories.js +1 -1
  47. package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
  48. package/dist/components/FormInput/FormInput.js +1 -1
  49. package/dist/components/FormInput/FormInput.stories.js +1 -1
  50. package/dist/components/IconButton/IconButton.stories.js +1 -1
  51. package/dist/components/InputField/InputField.stories.js +2 -2
  52. package/dist/components/Label/Label.test.js +1 -1
  53. package/dist/components/MetaDataBar/MetaDataBar.test.js +1 -1
  54. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  55. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  56. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  57. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  58. package/dist/components/MultiSelect/index.js +1 -1
  59. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
  60. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +1 -1
  61. package/dist/components/Notification/Notification.stories.js +1 -1
  62. package/dist/components/Notification/Notification.test.js +1 -1
  63. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  64. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  65. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  66. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  67. package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
  68. package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
  69. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  70. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
  71. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  72. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +8 -8
  73. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +58 -58
  74. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
  75. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  76. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +61 -61
  77. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  78. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
  79. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +13 -13
  80. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
  81. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  82. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  83. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  84. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +24 -24
  85. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  86. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +29 -29
  87. package/dist/components/RteEditor/Plugins/index.js +2 -2
  88. package/dist/components/RteEditor/RteEditor.js +252 -252
  89. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  90. package/dist/components/RteEditor/helpers.js +18 -18
  91. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +19 -19
  92. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +12 -12
  93. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  94. package/dist/components/Sortable/Sortable.stories.js +1 -1
  95. package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
  96. package/dist/components/TextArea/TextArea.stories.js +1 -1
  97. package/dist/components/TextArea/TextArea.test.js +2 -2
  98. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
  99. package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
  100. package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
  101. package/dist/components/index.js +1 -1
  102. package/dist/{index-CdPMY4ux.js → index-1WwGCyua.js} +8847 -7067
  103. package/dist/index-1WwGCyua.js.map +1 -0
  104. package/dist/{index-CLNHDZVV.js → index-YdDr6J97.js} +2 -2
  105. package/dist/{index-CLNHDZVV.js.map → index-YdDr6J97.js.map} +1 -1
  106. package/dist/index.js +1 -1
  107. package/dist/{react-18-D3e2aqkg.js → react-18-CxCoNkIN.js} +2 -2
  108. package/dist/{react-18-D3e2aqkg.js.map → react-18-CxCoNkIN.js.map} +1 -1
  109. package/dist/{react.esm-QW7uOFDD.js → react.esm-C68fQMAi.js} +2 -2
  110. package/dist/{react.esm-QW7uOFDD.js.map → react.esm-C68fQMAi.js.map} +1 -1
  111. package/dist/storybook__react.d.js +281 -278
  112. package/dist/storybook__react.d.js.map +1 -1
  113. package/package.json +31 -31
  114. package/dist/Lexical.prod-Dgzi-S1E.js.map +0 -1
  115. package/dist/LexicalExtension.prod-CNBWjmfs.js.map +0 -1
  116. package/dist/LexicalLink.prod-EEOzXxej.js +0 -502
  117. package/dist/LexicalLink.prod-EEOzXxej.js.map +0 -1
  118. package/dist/LexicalList.prod-DADZlhem.js +0 -627
  119. package/dist/LexicalList.prod-DADZlhem.js.map +0 -1
  120. package/dist/LexicalTable.prod-QpQxZNNH.js +0 -1814
  121. package/dist/LexicalTable.prod-QpQxZNNH.js.map +0 -1
  122. package/dist/LexicalUtils.prod-D1mwAww-.js +0 -114
  123. package/dist/LexicalUtils.prod-D1mwAww-.js.map +0 -1
  124. package/dist/chunk-MDLQUVZN-Dk02kWJ8.js.map +0 -1
  125. package/dist/index-CdPMY4ux.js.map +0 -1
@@ -0,0 +1,630 @@
1
+ import { v as st } from "./LexicalUtils.prod-BQnuAaA9.js";
2
+ import { E as F, L as Q, w as X, g as it, O as b, H as P, X as q, G as Y, j as A, $ as ot, N as v, m as Z, n as O, Q as lt, o as ct, _ as M, a as N, d as at, V as k, b as gt, U as ht, p as L, S as tt, c as R, e as W, f as J } from "./Lexical.prod-YJ1n9pVJ.js";
3
+ import { b as U } from "./LexicalSelection.prod-CpZE7Sey.js";
4
+ function y(n, ...t) {
5
+ const e = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
6
+ r.append("code", n);
7
+ for (const s of t) r.append("v", s);
8
+ throw e.search = r.toString(), Error(`Minified Lexical error #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
9
+ }
10
+ function w(n) {
11
+ let t = 1, e = n.getParent();
12
+ for (; e != null; ) {
13
+ if (h(e)) {
14
+ const r = e.getParent();
15
+ if (g(r)) {
16
+ t++, e = r.getParent();
17
+ continue;
18
+ }
19
+ y(40);
20
+ }
21
+ return t;
22
+ }
23
+ return t;
24
+ }
25
+ function D(n) {
26
+ let t = n.getParent();
27
+ g(t) || y(40);
28
+ let e = t;
29
+ for (; e !== null; ) e = e.getParent(), g(e) && (t = e);
30
+ return t;
31
+ }
32
+ function et(n) {
33
+ let t = [];
34
+ const e = n.getChildren().filter(h);
35
+ for (let r = 0; r < e.length; r++) {
36
+ const s = e[r], o = s.getFirstChild();
37
+ g(o) ? t = t.concat(et(o)) : t.push(s);
38
+ }
39
+ return t;
40
+ }
41
+ function m(n) {
42
+ return h(n) && g(n.getFirstChild());
43
+ }
44
+ function B(n) {
45
+ return _().append(n);
46
+ }
47
+ function rt(n, t) {
48
+ return h(n) && (t.length === 0 || t.length === 1 && n.is(t[0]) && n.getChildrenSize() === 0);
49
+ }
50
+ function V(n) {
51
+ const t = N();
52
+ if (t !== null) {
53
+ let e = t.getNodes();
54
+ if (v(t)) {
55
+ const s = t.getStartEndPoints();
56
+ s === null && y(143);
57
+ const [o] = s, i = o.getNode(), a = i.getParent();
58
+ if (L(i)) {
59
+ const l = i.getFirstChild();
60
+ if (l) e = l.selectStart().getNodes();
61
+ else {
62
+ const c = A();
63
+ i.append(c), e = c.select().getNodes();
64
+ }
65
+ } else if (rt(i, e)) {
66
+ const l = p(n);
67
+ if (L(a)) {
68
+ i.replace(l);
69
+ const c = _();
70
+ b(i) && (c.setFormat(i.getFormatType()), c.setIndent(i.getIndent())), l.append(c);
71
+ } else if (h(i)) {
72
+ const c = i.getParentOrThrow();
73
+ T(l, c.getChildren()), c.replace(l);
74
+ }
75
+ return;
76
+ }
77
+ }
78
+ const r = /* @__PURE__ */ new Set();
79
+ for (let s = 0; s < e.length; s++) {
80
+ const o = e[s];
81
+ if (b(o) && o.isEmpty() && !h(o) && !r.has(o.getKey())) {
82
+ z(o, n);
83
+ continue;
84
+ }
85
+ let i = tt(o) ? o.getParent() : h(o) && o.isEmpty() ? o : null;
86
+ for (; i != null; ) {
87
+ const a = i.getKey();
88
+ if (g(i)) {
89
+ if (!r.has(a)) {
90
+ const l = p(n);
91
+ T(l, i.getChildren()), i.replace(l), r.add(a);
92
+ }
93
+ break;
94
+ }
95
+ {
96
+ const l = i.getParent();
97
+ if (L(l) && !r.has(a)) {
98
+ r.add(a), z(i, n);
99
+ break;
100
+ }
101
+ i = l;
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ function T(n, t) {
108
+ n.splice(n.getChildrenSize(), 0, t);
109
+ }
110
+ function z(n, t) {
111
+ if (g(n)) return n;
112
+ const e = n.getPreviousSibling(), r = n.getNextSibling(), s = _();
113
+ let o;
114
+ if (T(s, n.getChildren()), g(e) && t === e.getListType()) e.append(s), g(r) && t === r.getListType() && (T(e, r.getChildren()), r.remove()), o = e;
115
+ else if (g(r) && t === r.getListType()) r.getFirstChildOrThrow().insertBefore(s), o = r;
116
+ else {
117
+ const a = p(t);
118
+ a.append(s), n.replace(a), o = a;
119
+ }
120
+ s.setFormat(n.getFormatType()), s.setIndent(n.getIndent());
121
+ const i = N();
122
+ return v(i) && (o.getKey() === i.anchor.key && i.anchor.set(s.getKey(), i.anchor.offset, "element"), o.getKey() === i.focus.key && i.focus.set(s.getKey(), i.focus.offset, "element")), n.remove(), o;
123
+ }
124
+ function $(n, t) {
125
+ const e = n.getLastChild(), r = t.getFirstChild();
126
+ e && r && m(e) && m(r) && ($(e.getFirstChild(), r.getFirstChild()), r.remove());
127
+ const s = t.getChildren();
128
+ s.length > 0 && n.append(...s), t.remove();
129
+ }
130
+ function ut() {
131
+ const n = N();
132
+ if (v(n)) {
133
+ const t = /* @__PURE__ */ new Set(), e = n.getNodes(), r = n.anchor.getNode();
134
+ if (rt(r, e)) t.add(D(r));
135
+ else for (let s = 0; s < e.length; s++) {
136
+ const o = e[s];
137
+ if (tt(o)) {
138
+ const i = st(o, E);
139
+ i != null && t.add(D(i));
140
+ }
141
+ }
142
+ for (const s of t) {
143
+ let o = s;
144
+ const i = et(s);
145
+ for (const a of i) {
146
+ const l = A().setTextStyle(n.style).setTextFormat(n.format);
147
+ T(l, a.getChildren()), o.insertAfter(l), o = l, a.__key === n.anchor.key && R(n.anchor, W(J(l, "next"))), a.__key === n.focus.key && R(n.focus, W(J(l, "next"))), a.remove();
148
+ }
149
+ s.remove();
150
+ }
151
+ }
152
+ }
153
+ function nt(n) {
154
+ const t = n.getListType() !== "check";
155
+ let e = n.getStart();
156
+ for (const r of n.getChildren()) h(r) && (r.getValue() !== e && r.setValue(e), t && r.getLatest().__checked != null && r.setChecked(void 0), g(r.getFirstChild()) || e++);
157
+ }
158
+ function ft(n) {
159
+ const t = /* @__PURE__ */ new Set();
160
+ if (m(n) || t.has(n.getKey())) return;
161
+ const e = n.getParent(), r = n.getNextSibling(), s = n.getPreviousSibling();
162
+ if (m(r) && m(s)) {
163
+ const o = s.getFirstChild();
164
+ if (g(o)) {
165
+ o.append(n);
166
+ const i = r.getFirstChild();
167
+ g(i) && (T(o, i.getChildren()), r.remove(), t.add(r.getKey()));
168
+ }
169
+ } else if (m(r)) {
170
+ const o = r.getFirstChild();
171
+ if (g(o)) {
172
+ const i = o.getFirstChild();
173
+ i !== null && i.insertBefore(n);
174
+ }
175
+ } else if (m(s)) {
176
+ const o = s.getFirstChild();
177
+ g(o) && o.append(n);
178
+ } else if (g(e)) {
179
+ const o = _().setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle()), i = p(e.getListType()).setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle());
180
+ o.append(i), i.append(n), s ? s.insertAfter(o) : r ? r.insertBefore(o) : e.append(o);
181
+ }
182
+ }
183
+ function dt(n) {
184
+ if (m(n)) return;
185
+ const t = n.getParent(), e = t ? t.getParent() : void 0;
186
+ if (g(e ? e.getParent() : void 0) && h(e) && g(t)) {
187
+ const r = t ? t.getFirstChild() : void 0, s = t ? t.getLastChild() : void 0;
188
+ if (n.is(r)) e.insertBefore(n), t.isEmpty() && e.remove();
189
+ else if (n.is(s)) e.insertAfter(n), t.isEmpty() && e.remove();
190
+ else {
191
+ const o = t.getListType(), i = _(), a = p(o);
192
+ i.append(a), n.getPreviousSiblings().forEach((u) => a.append(u));
193
+ const l = _(), c = p(o);
194
+ l.append(c), T(c, n.getNextSiblings()), e.insertBefore(i), e.insertAfter(l), e.replace(n);
195
+ }
196
+ }
197
+ }
198
+ function pt() {
199
+ const n = N();
200
+ if (!v(n) || !n.isCollapsed()) return !1;
201
+ const t = n.anchor.getNode();
202
+ let e = null;
203
+ if (h(t) && t.getChildrenSize() === 0) e = t;
204
+ else if (M(t)) {
205
+ const l = t.getParent();
206
+ h(l) && l.getChildren().every((c) => M(c) && c.getTextContent().trim() === "") && (e = l);
207
+ }
208
+ if (e === null) return !1;
209
+ const r = D(e), s = e.getParent();
210
+ g(s) || y(40);
211
+ const o = s.getParent();
212
+ let i;
213
+ if (L(o)) i = A(), r.insertAfter(i);
214
+ else {
215
+ if (!h(o)) return !1;
216
+ i = _(), o.insertAfter(i);
217
+ }
218
+ i.setTextStyle(n.style).setTextFormat(n.format).select();
219
+ const a = e.getNextSiblings();
220
+ if (a.length > 0) {
221
+ const l = p(s.getListType());
222
+ if (h(i)) {
223
+ const c = _();
224
+ c.append(l), i.insertAfter(c);
225
+ } else i.insertAfter(l);
226
+ l.append(...a);
227
+ }
228
+ return (function(l) {
229
+ let c = l;
230
+ for (; c.getNextSibling() == null && c.getPreviousSibling() == null; ) {
231
+ const u = c.getParent();
232
+ if (u == null || !h(u) && !g(u)) break;
233
+ c = u;
234
+ }
235
+ c.remove();
236
+ })(e), !0;
237
+ }
238
+ class E extends F {
239
+ __value;
240
+ __checked;
241
+ $config() {
242
+ return this.config("listitem", { $transform: (t) => {
243
+ if (t.__checked == null) return;
244
+ const e = t.getParent();
245
+ g(e) && e.getListType() !== "check" && t.getChecked() != null && t.setChecked(void 0);
246
+ }, extends: F, importDOM: Q({ li: () => ({ conversion: _t, priority: 0 }) }) });
247
+ }
248
+ constructor(t = 1, e = void 0, r) {
249
+ super(r), this.__value = t === void 0 ? 1 : t, this.__checked = e;
250
+ }
251
+ afterCloneFrom(t) {
252
+ super.afterCloneFrom(t), this.__value = t.__value, this.__checked = t.__checked;
253
+ }
254
+ createDOM(t) {
255
+ const e = document.createElement("li");
256
+ return this.updateListItemDOM(null, e, t), e;
257
+ }
258
+ updateListItemDOM(t, e, r) {
259
+ (function(i, a, l) {
260
+ const c = a.getParent();
261
+ !g(c) || c.getListType() !== "check" || g(a.getFirstChild()) ? (i.removeAttribute("role"), i.removeAttribute("tabIndex"), i.removeAttribute("aria-checked")) : (i.setAttribute("role", "checkbox"), i.setAttribute("tabIndex", "-1"), l && a.__checked === l.__checked || i.setAttribute("aria-checked", a.getChecked() ? "true" : "false"));
262
+ })(e, this, t), e.value = this.__value, (function(i, a, l) {
263
+ const c = [], u = [], f = a.list, C = f ? f.listitem : void 0;
264
+ let S;
265
+ if (f && f.nested && (S = f.nested.listitem), C !== void 0 && c.push(...P(C)), f) {
266
+ const d = l.getParent(), x = g(d) && d.getListType() === "check", I = l.getChecked();
267
+ x && !I || u.push(f.listitemUnchecked), x && I || u.push(f.listitemChecked), x && c.push(I ? f.listitemChecked : f.listitemUnchecked);
268
+ }
269
+ if (S !== void 0) {
270
+ const d = P(S);
271
+ l.getChildren().some((x) => g(x)) ? c.push(...d) : u.push(...d);
272
+ }
273
+ u.length > 0 && q(i, ...u), c.length > 0 && Y(i, ...c);
274
+ })(e, r.theme, this);
275
+ const s = t ? t.__style : "", o = this.__style;
276
+ s !== o && (o === "" ? e.removeAttribute("style") : e.style.cssText = o), (function(i, a, l) {
277
+ const c = U(a.__textStyle);
278
+ for (const u in c) i.style.setProperty(`--listitem-marker-${u}`, c[u]);
279
+ if (l) for (const u in U(l.__textStyle)) u in c || i.style.removeProperty(`--listitem-marker-${u}`);
280
+ })(e, this, t);
281
+ }
282
+ updateDOM(t, e, r) {
283
+ const s = e;
284
+ return this.updateListItemDOM(t, s, r), !1;
285
+ }
286
+ updateFromJSON(t) {
287
+ return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked);
288
+ }
289
+ exportDOM(t) {
290
+ const e = this.createDOM(t._config), r = this.getFormatType();
291
+ r && (e.style.textAlign = r);
292
+ const s = this.getDirection();
293
+ return s && (e.dir = s), { element: e };
294
+ }
295
+ exportJSON() {
296
+ return { ...super.exportJSON(), checked: this.getChecked(), value: this.getValue() };
297
+ }
298
+ append(...t) {
299
+ for (let e = 0; e < t.length; e++) {
300
+ const r = t[e];
301
+ if (b(r) && this.canMergeWith(r)) {
302
+ const s = r.getChildren();
303
+ this.append(...s), r.remove();
304
+ } else super.append(r);
305
+ }
306
+ return this;
307
+ }
308
+ replace(t, e) {
309
+ if (h(t)) return super.replace(t);
310
+ this.setIndent(0);
311
+ const r = this.getParentOrThrow();
312
+ if (!g(r)) return t;
313
+ if (r.__first === this.getKey()) r.insertBefore(t);
314
+ else if (r.__last === this.getKey()) r.insertAfter(t);
315
+ else {
316
+ const s = p(r.getListType());
317
+ let o = this.getNextSibling();
318
+ for (; o; ) {
319
+ const i = o;
320
+ o = o.getNextSibling(), s.append(i);
321
+ }
322
+ r.insertAfter(t), t.insertAfter(s);
323
+ }
324
+ return e && (b(t) || y(139), this.getChildren().forEach((s) => {
325
+ t.append(s);
326
+ })), this.remove(), r.getChildrenSize() === 0 && r.remove(), t;
327
+ }
328
+ insertAfter(t, e = !0) {
329
+ const r = this.getParentOrThrow();
330
+ if (g(r) || y(39), h(t)) return super.insertAfter(t, e);
331
+ const s = this.getNextSiblings();
332
+ if (r.insertAfter(t, e), s.length !== 0) {
333
+ const o = p(r.getListType());
334
+ s.forEach((i) => o.append(i)), t.insertAfter(o, e);
335
+ }
336
+ return t;
337
+ }
338
+ remove(t) {
339
+ const e = this.getPreviousSibling(), r = this.getNextSibling();
340
+ super.remove(t), e && r && m(e) && m(r) && ($(e.getFirstChild(), r.getFirstChild()), r.remove());
341
+ }
342
+ insertNewAfter(t, e = !0) {
343
+ const r = _().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked() && void 0);
344
+ return this.insertAfter(r, e), r;
345
+ }
346
+ collapseAtStart(t) {
347
+ const e = A();
348
+ this.getChildren().forEach((i) => e.append(i));
349
+ const r = this.getParentOrThrow(), s = r.getParentOrThrow(), o = h(s);
350
+ if (r.getChildrenSize() === 1) if (o) r.remove(), s.select();
351
+ else {
352
+ r.insertBefore(e), r.remove();
353
+ const i = t.anchor, a = t.focus, l = e.getKey();
354
+ i.type === "element" && i.getNode().is(this) && i.set(l, i.offset, "element"), a.type === "element" && a.getNode().is(this) && a.set(l, a.offset, "element");
355
+ }
356
+ else r.insertBefore(e), this.remove();
357
+ return !0;
358
+ }
359
+ getValue() {
360
+ return this.getLatest().__value;
361
+ }
362
+ setValue(t) {
363
+ const e = this.getWritable();
364
+ return e.__value = t, e;
365
+ }
366
+ getChecked() {
367
+ const t = this.getLatest();
368
+ let e;
369
+ const r = this.getParent();
370
+ return g(r) && (e = r.getListType()), e === "check" ? !!t.__checked : void 0;
371
+ }
372
+ setChecked(t) {
373
+ const e = this.getWritable();
374
+ return e.__checked = t, e;
375
+ }
376
+ toggleChecked() {
377
+ const t = this.getWritable();
378
+ return t.setChecked(!t.__checked);
379
+ }
380
+ getIndent() {
381
+ const t = this.getParent();
382
+ if (t === null || !this.isAttached()) return this.getLatest().__indent;
383
+ let e = t.getParentOrThrow(), r = 0;
384
+ for (; h(e); ) e = e.getParentOrThrow().getParentOrThrow(), r++;
385
+ return r;
386
+ }
387
+ setIndent(t) {
388
+ typeof t != "number" && y(117), (t = Math.floor(t)) >= 0 || y(199);
389
+ let e = this.getIndent();
390
+ for (; e !== t; ) e < t ? (ft(this), e++) : (dt(this), e--);
391
+ return this;
392
+ }
393
+ canInsertAfter(t) {
394
+ return h(t);
395
+ }
396
+ canReplaceWith(t) {
397
+ return h(t);
398
+ }
399
+ canMergeWith(t) {
400
+ return h(t) || ot(t);
401
+ }
402
+ extractWithChild(t, e) {
403
+ if (!v(e)) return !1;
404
+ const r = e.anchor.getNode(), s = e.focus.getNode();
405
+ return this.isParentOf(r) && this.isParentOf(s) && this.getTextContent().length === e.getTextContent().length;
406
+ }
407
+ isParentRequired() {
408
+ return !0;
409
+ }
410
+ createParentElementNode() {
411
+ return p("bullet");
412
+ }
413
+ canMergeWhenEmpty() {
414
+ return !0;
415
+ }
416
+ }
417
+ function _t(n) {
418
+ if (n.classList.contains("task-list-item")) {
419
+ for (const e of n.children) if (e.tagName === "INPUT") return j(e);
420
+ }
421
+ if (n.classList.contains("joplin-checkbox")) {
422
+ for (const e of n.children) if (e.classList.contains("checkbox-wrapper") && e.children.length > 0 && e.children[0].tagName === "INPUT") return j(e.children[0]);
423
+ }
424
+ const t = n.getAttribute("aria-checked");
425
+ return { node: _(t === "true" || t !== "false" && void 0) };
426
+ }
427
+ function j(n) {
428
+ return n.getAttribute("type") !== "checkbox" ? { node: null } : { node: _(n.hasAttribute("checked")) };
429
+ }
430
+ function _(n) {
431
+ return Z(new E(void 0, n));
432
+ }
433
+ function h(n) {
434
+ return n instanceof E;
435
+ }
436
+ class K extends F {
437
+ __tag;
438
+ __start;
439
+ __listType;
440
+ $config() {
441
+ return this.config("list", { $transform: (t) => {
442
+ (function(e) {
443
+ const r = e.getNextSibling();
444
+ g(r) && e.getListType() === r.getListType() && $(e, r);
445
+ })(t), nt(t);
446
+ }, extends: F, importDOM: Q({ ol: () => ({ conversion: H, priority: 0 }), ul: () => ({ conversion: H, priority: 0 }) }) });
447
+ }
448
+ constructor(t = "number", e = 1, r) {
449
+ super(r);
450
+ const s = yt[t] || t;
451
+ this.__listType = s, this.__tag = s === "number" ? "ol" : "ul", this.__start = e;
452
+ }
453
+ afterCloneFrom(t) {
454
+ super.afterCloneFrom(t), this.__listType = t.__listType, this.__tag = t.__tag, this.__start = t.__start;
455
+ }
456
+ getTag() {
457
+ return this.getLatest().__tag;
458
+ }
459
+ setListType(t) {
460
+ const e = this.getWritable();
461
+ return e.__listType = t, e.__tag = t === "number" ? "ol" : "ul", e;
462
+ }
463
+ getListType() {
464
+ return this.getLatest().__listType;
465
+ }
466
+ getStart() {
467
+ return this.getLatest().__start;
468
+ }
469
+ setStart(t) {
470
+ const e = this.getWritable();
471
+ return e.__start = t, e;
472
+ }
473
+ createDOM(t, e) {
474
+ const r = this.__tag, s = document.createElement(r);
475
+ return this.__start !== 1 && s.setAttribute("start", String(this.__start)), s.__lexicalListType = this.__listType, G(s, t.theme, this), s;
476
+ }
477
+ updateDOM(t, e, r) {
478
+ return t.__tag !== this.__tag || t.__listType !== this.__listType || (G(e, r.theme, this), !1);
479
+ }
480
+ updateFromJSON(t) {
481
+ return super.updateFromJSON(t).setListType(t.listType).setStart(t.start);
482
+ }
483
+ exportDOM(t) {
484
+ const e = this.createDOM(t._config, t);
485
+ return X(e) && (this.__start !== 1 && e.setAttribute("start", String(this.__start)), this.__listType === "check" && e.setAttribute("__lexicalListType", "check")), { element: e };
486
+ }
487
+ exportJSON() {
488
+ return { ...super.exportJSON(), listType: this.getListType(), start: this.getStart(), tag: this.getTag() };
489
+ }
490
+ canBeEmpty() {
491
+ return !1;
492
+ }
493
+ canIndent() {
494
+ return !1;
495
+ }
496
+ splice(t, e, r) {
497
+ let s = r;
498
+ for (let o = 0; o < r.length; o++) {
499
+ const i = r[o];
500
+ h(i) || (s === r && (s = [...r]), s[o] = _().append(!b(i) || g(i) || i.isInline() ? i : it(i.getTextContent())));
501
+ }
502
+ return super.splice(t, e, s);
503
+ }
504
+ extractWithChild(t) {
505
+ return h(t);
506
+ }
507
+ }
508
+ function G(n, t, e) {
509
+ const r = [], s = [], o = t.list;
510
+ if (o !== void 0) {
511
+ const i = o[`${e.__tag}Depth`] || [], a = w(e) - 1, l = a % i.length, c = i[l], u = o[e.__tag];
512
+ let f;
513
+ const C = o.nested, S = o.checklist;
514
+ if (C !== void 0 && C.list && (f = C.list), u !== void 0 && r.push(u), S !== void 0 && e.__listType === "check" && r.push(S), c !== void 0) {
515
+ r.push(...P(c));
516
+ for (let d = 0; d < i.length; d++) d !== l && s.push(e.__tag + d);
517
+ }
518
+ if (f !== void 0) {
519
+ const d = P(f);
520
+ a > 1 ? r.push(...d) : s.push(...d);
521
+ }
522
+ }
523
+ s.length > 0 && q(n, ...s), r.length > 0 && Y(n, ...r);
524
+ }
525
+ function mt(n) {
526
+ const t = [];
527
+ for (let e = 0; e < n.length; e++) {
528
+ const r = n[e];
529
+ if (h(r)) {
530
+ t.push(r);
531
+ const s = r.getChildren();
532
+ s.length > 1 && s.forEach((o) => {
533
+ g(o) && t.push(B(o));
534
+ });
535
+ } else t.push(B(r));
536
+ }
537
+ return t;
538
+ }
539
+ function H(n) {
540
+ const t = n.nodeName.toLowerCase();
541
+ let e = null;
542
+ return t === "ol" ? e = p("number", n.start) : t === "ul" && (e = (function(r) {
543
+ if (r.getAttribute("__lexicallisttype") === "check" || r.classList.contains("contains-task-list") || r.getAttribute("data-is-checklist") === "1") return !0;
544
+ for (const s of r.childNodes) if (X(s) && s.hasAttribute("aria-checked")) return !0;
545
+ return !1;
546
+ })(n) ? p("check") : p("bullet")), { after: mt, node: e };
547
+ }
548
+ const yt = { ol: "number", ul: "bullet" };
549
+ function p(n = "number", t = 1) {
550
+ return Z(new K(n, t));
551
+ }
552
+ function g(n) {
553
+ return n instanceof K;
554
+ }
555
+ const Tt = O("UPDATE_LIST_START_COMMAND"), Ct = O("INSERT_UNORDERED_LIST_COMMAND"), St = O("INSERT_ORDERED_LIST_COMMAND"), vt = O("REMOVE_LIST_COMMAND");
556
+ function Nt(n) {
557
+ return lt(n.registerCommand(St, () => (V("number"), !0), k), n.registerCommand(Tt, (t) => {
558
+ const { listNodeKey: e, newStart: r } = t, s = gt(e);
559
+ return !!g(s) && (s.getListType() === "number" && (s.setStart(r), nt(s)), !0);
560
+ }, k), n.registerCommand(Ct, () => (V("bullet"), !0), k), n.registerCommand(vt, () => (ut(), !0), k), n.registerCommand(at, () => pt(), k), n.registerNodeTransform(E, (t) => {
561
+ const e = t.getFirstChild();
562
+ if (e) {
563
+ if (M(e)) {
564
+ const r = e.getStyle(), s = e.getFormat();
565
+ t.getTextStyle() !== r && t.setTextStyle(r), t.getTextFormat() !== s && t.setTextFormat(s);
566
+ }
567
+ } else {
568
+ const r = N();
569
+ v(r) && (r.style !== t.getTextStyle() || r.format !== t.getTextFormat()) && r.isCollapsed() && t.is(r.anchor.getNode()) && t.setTextStyle(r.style).setTextFormat(r.format);
570
+ }
571
+ }), n.registerNodeTransform(ct, (t) => {
572
+ const e = t.getParent();
573
+ if (h(e) && t.is(e.getFirstChild())) {
574
+ const r = t.getStyle(), s = t.getFormat();
575
+ r === e.getTextStyle() && s === e.getTextFormat() || e.setTextStyle(r).setTextFormat(s);
576
+ }
577
+ }));
578
+ }
579
+ function Lt(n) {
580
+ const t = (e) => {
581
+ const r = e.getParent();
582
+ if (g(e.getFirstChild()) || !g(r)) return;
583
+ const s = ht(e, (o) => h(o) && g(o.getParent()) && h(o.getPreviousSibling()));
584
+ if (s === null && e.getIndent() > 0) e.setIndent(0);
585
+ else if (h(s)) {
586
+ const o = s.getPreviousSibling();
587
+ if (h(o)) {
588
+ const i = (function(l) {
589
+ let c = l, u = c.getFirstChild();
590
+ for (; g(u); ) {
591
+ const f = u.getLastChild();
592
+ if (!h(f)) break;
593
+ c = f, u = c.getFirstChild();
594
+ }
595
+ return c;
596
+ })(o), a = i.getParent();
597
+ if (g(a)) {
598
+ const l = w(a);
599
+ l + 1 < w(r) && e.setIndent(l);
600
+ }
601
+ }
602
+ }
603
+ };
604
+ return n.registerNodeTransform(K, (e) => {
605
+ const r = [e];
606
+ for (; r.length > 0; ) {
607
+ const s = r.shift();
608
+ if (g(s)) {
609
+ for (const o of s.getChildren()) if (h(o)) {
610
+ t(o);
611
+ const i = o.getFirstChild();
612
+ g(i) && r.push(i);
613
+ }
614
+ }
615
+ }
616
+ });
617
+ }
618
+ export {
619
+ Lt as L,
620
+ Ct as S,
621
+ Nt as b,
622
+ g as d,
623
+ p as h,
624
+ vt as k,
625
+ K as l,
626
+ E as n,
627
+ h as o,
628
+ St as x
629
+ };
630
+ //# sourceMappingURL=LexicalList.prod-DMU0XSLO.js.map