@uva-glass/component-library 3.26.1 → 3.26.3

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 (62) hide show
  1. package/dist/{Lexical.prod-DOV_uwol.js → Lexical.prod-m3GJsAAT.js} +4 -4
  2. package/dist/Lexical.prod-m3GJsAAT.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-DZgXdt_H.js → LexicalClipboard.prod-HyvHKdDm.js} +4 -4
  4. package/dist/{LexicalClipboard.prod-DZgXdt_H.js.map → LexicalClipboard.prod-HyvHKdDm.js.map} +1 -1
  5. package/dist/LexicalLink.prod-D0qasaVP.js +285 -0
  6. package/dist/LexicalLink.prod-D0qasaVP.js.map +1 -0
  7. package/dist/{LexicalList.prod-Dv48Tn54.js → LexicalList.prod-CQz14k_F.js} +193 -194
  8. package/dist/LexicalList.prod-CQz14k_F.js.map +1 -0
  9. package/dist/LexicalSelection.prod-Bh25dAig.js +101 -0
  10. package/dist/LexicalSelection.prod-Bh25dAig.js.map +1 -0
  11. package/dist/{LexicalTable.prod-M0HiIwBZ.js → LexicalTable.prod-BHKhA4PF.js} +5 -5
  12. package/dist/LexicalTable.prod-BHKhA4PF.js.map +1 -0
  13. package/dist/{LexicalUtils.prod-FOA8v2nU.js → LexicalUtils.prod-Vqqof-U-.js} +2 -2
  14. package/dist/{LexicalUtils.prod-FOA8v2nU.js.map → LexicalUtils.prod-Vqqof-U-.js.map} +1 -1
  15. package/dist/{TablePlugin-Bj5FObQ_.js → TablePlugin-CykqKW6X.js} +4 -4
  16. package/dist/{TablePlugin-Bj5FObQ_.js.map → TablePlugin-CykqKW6X.js.map} +1 -1
  17. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.d.ts +3 -2
  18. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js +36 -33
  19. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
  20. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.d.ts +1 -0
  21. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +43 -4
  22. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js.map +1 -1
  23. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  24. package/dist/components/FormInput/FormInput.js +1 -1
  25. package/dist/components/InputField/InputField.stories.js +1 -1
  26. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  27. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  28. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  29. package/dist/components/MultiSelect/index.js +1 -1
  30. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  31. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  32. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  33. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  34. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
  35. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  36. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  37. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  38. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +4 -4
  39. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  40. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +18 -18
  41. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
  42. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  43. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
  44. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +10 -10
  45. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  46. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +3 -3
  47. package/dist/components/RteEditor/Plugins/index.js +1 -1
  48. package/dist/components/RteEditor/RteEditor.js +73 -73
  49. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  50. package/dist/components/RteEditor/helpers.js +4 -4
  51. package/dist/components/index.js +1 -1
  52. package/dist/{helpers-DxxBlpKs.js → helpers-5AryUrYu.js} +4 -4
  53. package/dist/{helpers-DxxBlpKs.js.map → helpers-5AryUrYu.js.map} +1 -1
  54. package/dist/index.js +1 -1
  55. package/package.json +12 -12
  56. package/dist/Lexical.prod-DOV_uwol.js.map +0 -1
  57. package/dist/LexicalLink.prod-XYC56-_H.js +0 -275
  58. package/dist/LexicalLink.prod-XYC56-_H.js.map +0 -1
  59. package/dist/LexicalList.prod-Dv48Tn54.js.map +0 -1
  60. package/dist/LexicalSelection.prod-DaoDqTxU.js +0 -97
  61. package/dist/LexicalSelection.prod-DaoDqTxU.js.map +0 -1
  62. package/dist/LexicalTable.prod-M0HiIwBZ.js.map +0 -1
@@ -1,22 +1,22 @@
1
1
  import { jsx as h, jsxs as K, Fragment as Re } from "react/jsx-runtime";
2
- import { t as Xe, r as Ye, o as T } from "../../LexicalComposerContext.prod-DLlRM5wP.js";
3
- import { aF as Ie, af as A, P as Fe, N as p, aG as de, am as J, d as W, F as Qe, Q as F, c as g, V as Ze, L as m, aH as et, ae as Me, o as tt, q as Oe, aI as rt, aJ as nt, U as ot, g as P, aC as at, aK as st, aL as it, aM as lt, k as te, aN as ut, aO as ct, a1 as dt, v as ft, y as mt, O as pt, aP as gt, aQ as me, a as pe, H as ht, D as re, G as vt, a2 as Ke, aR as ge, A as Ct, z as yt, t as Et, aS as he, x as wt, aT as bt, aU as _t, aV as St, aB as kt, R as xt, M as Nt, aW as Lt, S as Dt, C as $t, B as Pt, n as Tt, I as ve, aX as Rt, b as It, ar as X, aq as Y, aY as Ft, aZ as Mt, at as Ot, a_ as se, as as Kt, a$ as zt } from "../../Lexical.prod-DOV_uwol.js";
2
+ import { t as Ye, r as Ge, o as T } from "../../LexicalComposerContext.prod-DLlRM5wP.js";
3
+ import { aF as Ie, af as A, P as Fe, N as p, aG as de, am as J, d as W, F as Qe, Q as F, c as g, V as Ze, L as m, aH as et, ae as Me, o as tt, q as Oe, aI as rt, aJ as nt, U as ot, g as P, aC as at, aK as st, aL as it, aM as lt, k as te, aN as ut, aO as ct, a1 as dt, v as ft, y as mt, O as pt, aP as gt, aQ as me, a as pe, H as ht, D as re, G as vt, a2 as Ke, aR as ge, A as Ct, z as yt, t as Et, aS as he, x as wt, aT as bt, aU as _t, aV as St, aB as kt, R as xt, M as Nt, aW as Lt, S as $t, C as Dt, B as Pt, n as Tt, I as ve, aX as Rt, b as It, ar as Y, aq as G, aY as Ft, aZ as Mt, at as Ot, a_ as se, as as Kt, a$ as zt } from "../../Lexical.prod-m3GJsAAT.js";
4
4
  import * as ne from "react";
5
5
  import { useMemo as q, useLayoutEffect as U, useEffect as S, useState as M, useRef as ze, Suspense as At, forwardRef as Ae, useCallback as Bt } from "react";
6
- import { j as H, L as z, y as Ut, w as fe } from "../../LexicalUtils.prod-FOA8v2nU.js";
7
- import { flushSync as Ht, createPortal as jt } from "react-dom";
8
- import { D as Ce, _ as ye, h as Jt, m as Wt } from "../../LexicalClipboard.prod-DZgXdt_H.js";
9
- import { X as Ee, J as we } from "../../LexicalSelection.prod-DaoDqTxU.js";
10
- import { r as Be, G as Ue, v as qt, T as Vt } from "../../LexicalList.prod-Dv48Tn54.js";
11
- import { g as He, k as be, N as oe, p as Gt, m as Xt } from "../../LexicalLink.prod-XYC56-_H.js";
12
- import { s as Yt, c as Qt, a as je, b as Zt, w as er, S as tr, y as Je, O as rr } from "../../LexicalTable.prod-M0HiIwBZ.js";
13
- import { a as nr, w as or, M as ar } from "../../helpers-DxxBlpKs.js";
6
+ import { j, L as z, y as Ut, w as fe } from "../../LexicalUtils.prod-Vqqof-U-.js";
7
+ import { flushSync as jt, createPortal as Ht } from "react-dom";
8
+ import { D as Ce, _ as ye, h as Jt, m as Wt } from "../../LexicalClipboard.prod-HyvHKdDm.js";
9
+ import { X as Ee, J as we } from "../../LexicalSelection.prod-Bh25dAig.js";
10
+ import { t as Be, j as Ue, y as qt, _ as Vt } from "../../LexicalList.prod-CQz14k_F.js";
11
+ import { g as je, k as be, v as oe, p as Xt, m as Yt } from "../../LexicalLink.prod-D0qasaVP.js";
12
+ import { s as Gt, c as Qt, a as He, b as Zt, w as er, S as tr, y as Je, O as rr } from "../../LexicalTable.prod-BHKhA4PF.js";
13
+ import { a as nr, w as or, M as ar } from "../../helpers-5AryUrYu.js";
14
14
  import { c as sr } from "../../clsx-OuTLNxxd.js";
15
15
  import { exportMap as ir, isStartingWithHtmlTag as lr, mergeBoldStrongTags as ur } from "./helpers.js";
16
16
  import { s as I } from "../../RteEditor.module-B_3uFnFu.js";
17
17
  import { ToolBarPlugin as cr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
18
18
  import { useTranslation as dr } from "./hooks/useTranslation.js";
19
- import "../../TablePlugin-Bj5FObQ_.js";
19
+ import "../../TablePlugin-CykqKW6X.js";
20
20
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
21
21
  import "./hooks/components/Flyout.js";
22
22
  import "../Buttons/Button.js";
@@ -44,7 +44,7 @@ import { PasteHandlerPlugin as vr } from "./Plugins/PasteHandlerPlugin/PasteHand
44
44
  const We = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Cr = We ? U : S, Q = { tag: de };
45
45
  function yr({ initialConfig: r, children: e }) {
46
46
  const t = q(() => {
47
- const { theme: o, namespace: a, nodes: n, onError: s, editorState: i, html: l } = r, u = Xe(null, o), c = Ie({ editable: r.editable, html: l, namespace: a, nodes: n, onError: (d) => s(d, c), theme: o });
47
+ const { theme: o, namespace: a, nodes: n, onError: s, editorState: i, html: l } = r, u = Ye(null, o), c = Ie({ editable: r.editable, html: l, namespace: a, nodes: n, onError: (d) => s(d, c), theme: o });
48
48
  return function(d, f) {
49
49
  if (f !== null) {
50
50
  if (f === void 0) d.update(() => {
@@ -76,7 +76,7 @@ function yr({ initialConfig: r, children: e }) {
76
76
  return Cr(() => {
77
77
  const o = r.editable, [a] = t;
78
78
  a.setEditable(o === void 0 || o);
79
- }, []), h(Ye.Provider, { value: t, children: e });
79
+ }, []), h(Ge.Provider, { value: t, children: e });
80
80
  }
81
81
  const Er = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
82
82
  function wr(r) {
@@ -174,7 +174,7 @@ function _e(r, e) {
174
174
  }
175
175
  return null;
176
176
  }
177
- const j = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Nr = j && "documentMode" in document ? document.documentMode : null, Lr = !(!j || !("InputEvent" in window) || Nr) && "getTargetRanges" in new window.InputEvent("input"), Dr = j && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Se = j && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, $r = j && /^(?=.*Chrome).*/i.test(navigator.userAgent), Pr = j && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !$r, ke = tt("DRAG_DROP_PASTE_FILE");
177
+ const H = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Nr = H && "documentMode" in document ? document.documentMode : null, Lr = !(!H || !("InputEvent" in window) || Nr) && "getTargetRanges" in new window.InputEvent("input"), $r = H && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Se = H && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Dr = H && /^(?=.*Chrome).*/i.test(navigator.userAgent), Pr = H && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Dr, ke = tt("DRAG_DROP_PASTE_FILE");
178
178
  function Z(r) {
179
179
  let e = null;
180
180
  if (z(r, DragEvent) ? e = r.dataTransfer : z(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
@@ -203,19 +203,19 @@ function ae(r) {
203
203
  for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
204
204
  }
205
205
  function Tr(r) {
206
- return H(r.registerCommand(Tt, (e) => {
206
+ return j(r.registerCommand(Tt, (e) => {
207
207
  const t = p();
208
208
  return !!P(t) && (t.clear(), !0);
209
- }, 0), r.registerCommand(re, (e) => {
209
+ }, m), r.registerCommand(re, (e) => {
210
210
  const t = p();
211
211
  return g(t) ? (t.deleteCharacter(e), !0) : !!P(t) && (t.deleteNodes(), !0);
212
212
  }, m), r.registerCommand(Pt, (e) => {
213
213
  const t = p();
214
214
  return !!g(t) && (t.deleteWord(e), !0);
215
- }, m), r.registerCommand($t, (e) => {
215
+ }, m), r.registerCommand(Dt, (e) => {
216
216
  const t = p();
217
217
  return !!g(t) && (t.deleteLine(e), !0);
218
- }, m), r.registerCommand(Dt, (e) => {
218
+ }, m), r.registerCommand($t, (e) => {
219
219
  const t = p();
220
220
  if (typeof e == "string") t !== null && t.insertText(e);
221
221
  else {
@@ -324,7 +324,7 @@ function Tr(r) {
324
324
  const t = p();
325
325
  if (!g(t)) return !1;
326
326
  if (ae(t), e !== null) {
327
- if ((Se || Dr || Pr) && Lr) return !1;
327
+ if ((Se || $r || Pr) && Lr) return !1;
328
328
  if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(me, !1);
329
329
  }
330
330
  return r.dispatchCommand(pe, void 0);
@@ -394,7 +394,7 @@ function Rr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
394
394
  const [o] = T(), a = function(n, s) {
395
395
  const [i, l] = M(() => n.getDecorators());
396
396
  return ie(() => n.registerDecoratorListener((u) => {
397
- Ht(() => {
397
+ jt(() => {
398
398
  l(u);
399
399
  });
400
400
  }), [n]), S(() => {
@@ -403,13 +403,13 @@ function Rr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
403
403
  const u = [], c = Object.keys(i);
404
404
  for (let d = 0; d < c.length; d++) {
405
405
  const f = c[d], v = h(s, { onError: (w) => n._onError(w), children: h(At, { fallback: null, children: i[f] }) }), C = n.getElementByKey(f);
406
- C !== null && u.push(jt(v, C, f));
406
+ C !== null && u.push(Ht(v, C, f));
407
407
  }
408
408
  return u;
409
409
  }, [s, i, n]);
410
410
  }(o, t);
411
411
  return function(n) {
412
- ie(() => H(Tr(n), xr(n)), [n]);
412
+ ie(() => j(Tr(n), xr(n)), [n]);
413
413
  }(o), K(Re, { children: [r, h(Ir, { content: e }), a] });
414
414
  }
415
415
  function Ir({ content: r }) {
@@ -420,7 +420,7 @@ function Ir({ content: r }) {
420
420
  const l = Le(a);
421
421
  s(l);
422
422
  }
423
- return i(), H(a.registerUpdateListener(() => {
423
+ return i(), j(a.registerUpdateListener(() => {
424
424
  i();
425
425
  }), a.registerEditableListener(() => {
426
426
  i();
@@ -431,21 +431,21 @@ function Ir({ content: r }) {
431
431
  }
432
432
  const Ve = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
433
433
  function Fr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: o, ariaDescribedBy: a, ariaErrorMessage: n, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: v, className: C, id: w, role: x = "textbox", spellCheck: y = !0, style: E, tabIndex: _, "data-testid": N, ...b }, L) {
434
- const [k, R] = M(r.isEditable()), O = Bt((D) => {
435
- D && D.ownerDocument && D.ownerDocument.defaultView ? r.setRootElement(D) : r.setRootElement(null);
436
- }, [r]), B = q(() => /* @__PURE__ */ function(...D) {
434
+ const [k, R] = M(r.isEditable()), O = Bt(($) => {
435
+ $ && $.ownerDocument && $.ownerDocument.defaultView ? r.setRootElement($) : r.setRootElement(null);
436
+ }, [r]), B = q(() => /* @__PURE__ */ function(...$) {
437
437
  return (V) => {
438
- D.forEach((G) => {
439
- typeof G == "function" ? G(V) : G != null && (G.current = V);
438
+ $.forEach((X) => {
439
+ typeof X == "function" ? X(V) : X != null && (X.current = V);
440
440
  });
441
441
  };
442
442
  }(L, O), [O, L]);
443
- return Ve(() => (R(r.isEditable()), r.registerEditableListener((D) => {
444
- R(D);
443
+ return Ve(() => (R(r.isEditable()), r.registerEditableListener(($) => {
444
+ R($);
445
445
  })), [r]), h("div", { "aria-activedescendant": k ? e : void 0, "aria-autocomplete": k ? t : "none", "aria-controls": k ? o : void 0, "aria-describedby": a, ...n != null ? { "aria-errormessage": n } : {}, "aria-expanded": k && x === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": u, "aria-multiline": c, "aria-owns": k ? d : void 0, "aria-readonly": !k || void 0, "aria-required": f, autoCapitalize: v, className: C, contentEditable: k, "data-testid": N, id: w, ref: B, role: k ? x : void 0, spellCheck: y, style: E, tabIndex: _, ...b });
446
446
  }
447
447
  const Mr = Ae(Fr);
448
- function De(r) {
448
+ function $e(r) {
449
449
  return r.getEditorState().read(qe(r.isComposing()));
450
450
  }
451
451
  const Or = Ae(Kr);
@@ -455,13 +455,13 @@ function Kr(r, e) {
455
455
  }
456
456
  function zr({ content: r, editor: e }) {
457
457
  const t = function(s) {
458
- const [i, l] = M(() => De(s));
458
+ const [i, l] = M(() => $e(s));
459
459
  return Ve(() => {
460
460
  function u() {
461
- const c = De(s);
461
+ const c = $e(s);
462
462
  l(c);
463
463
  }
464
- return u(), H(s.registerUpdateListener(() => {
464
+ return u(), j(s.registerUpdateListener(() => {
465
465
  u();
466
466
  }), s.registerEditableListener(() => {
467
467
  u();
@@ -479,11 +479,11 @@ function le(r, e) {
479
479
  return t.__proto__ = o, t;
480
480
  }, le(r, e);
481
481
  }
482
- var $e = { error: null }, Ar = function(r) {
482
+ var De = { error: null }, Ar = function(r) {
483
483
  var e, t;
484
484
  function o() {
485
485
  for (var n, s = arguments.length, i = new Array(s), l = 0; l < s; l++) i[l] = arguments[l];
486
- return (n = r.call.apply(r, [this].concat(i)) || this).state = $e, n.resetErrorBoundary = function() {
486
+ return (n = r.call.apply(r, [this].concat(i)) || this).state = De, n.resetErrorBoundary = function() {
487
487
  for (var u, c = arguments.length, d = new Array(c), f = 0; f < c; f++) d[f] = arguments[f];
488
488
  n.props.onReset == null || (u = n.props).onReset.apply(u, d), n.reset();
489
489
  }, n;
@@ -493,7 +493,7 @@ var $e = { error: null }, Ar = function(r) {
493
493
  };
494
494
  var a = o.prototype;
495
495
  return a.reset = function() {
496
- this.setState($e);
496
+ this.setState(De);
497
497
  }, a.componentDidCatch = function(n, s) {
498
498
  var i, l;
499
499
  (i = (l = this.props).onError) == null || i.call(l, n, s);
@@ -518,7 +518,7 @@ function Br({ children: r, onError: e }) {
518
518
  return h(Ar, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
519
519
  }
520
520
  const Ur = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
521
- function Hr({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
521
+ function jr({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
522
522
  const [o] = T();
523
523
  return Ur(() => {
524
524
  if (t) return o.registerUpdateListener(({ editorState: a, dirtyElements: n, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
@@ -526,7 +526,7 @@ function Hr({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1
526
526
  });
527
527
  }, [o, r, e, t]), null;
528
528
  }
529
- function jr({ hasStrictIndent: r = !1 }) {
529
+ function Hr({ hasStrictIndent: r = !1 }) {
530
530
  const [e] = T();
531
531
  return S(() => {
532
532
  if (!e.hasNodes([Be, Ue])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
@@ -539,8 +539,8 @@ function jr({ hasStrictIndent: r = !1 }) {
539
539
  function Jr({ validateUrl: r, attributes: e }) {
540
540
  const [t] = T();
541
541
  return S(() => {
542
- if (!t.hasNodes([He])) throw new Error("LinkPlugin: LinkNode not registered on editor");
543
- return H(t.registerCommand(be, (o) => {
542
+ if (!t.hasNodes([je])) throw new Error("LinkPlugin: LinkNode not registered on editor");
543
+ return j(t.registerCommand(be, (o) => {
544
544
  if (o === null) return oe(o), !0;
545
545
  if (typeof o == "string") return !(r !== void 0 && !r(o)) && (oe(o, e), !0);
546
546
  {
@@ -569,7 +569,7 @@ function Wr({ newTab: r = !0, disabled: e = !1 }) {
569
569
  const f = te(s);
570
570
  if (f !== null) {
571
571
  const v = fe(f, W);
572
- if (!e) if (Gt(v)) l = v.sanitizeUrl(v.getURL()), u = v.getTarget();
572
+ if (!e) if (Xt(v)) l = v.sanitizeUrl(v.getURL()), u = v.getTarget();
573
573
  else {
574
574
  const C = function(w, x) {
575
575
  let y = w;
@@ -595,12 +595,12 @@ function Wr({ newTab: r = !0, disabled: e = !1 }) {
595
595
  });
596
596
  }, [t, r, e]), null;
597
597
  }
598
- const ee = 0, ue = 1, ce = 2, $ = 0, qr = 1, Pe = 2, Vr = 3, Gr = 4;
599
- function Xr(r, e, t, o, a) {
600
- if (r === null || t.size === 0 && o.size === 0 && !a) return $;
598
+ const ee = 0, ue = 1, ce = 2, D = 0, qr = 1, Pe = 2, Vr = 3, Xr = 4;
599
+ function Yr(r, e, t, o, a) {
600
+ if (r === null || t.size === 0 && o.size === 0 && !a) return D;
601
601
  const n = e._selection, s = r._selection;
602
602
  if (a) return qr;
603
- if (!(g(n) && g(s) && s.isCollapsed() && n.isCollapsed())) return $;
603
+ if (!(g(n) && g(s) && s.isCollapsed() && n.isCollapsed())) return D;
604
604
  const i = function(y, E, _) {
605
605
  const N = y._nodeMap, b = [];
606
606
  for (const L of E) {
@@ -614,31 +614,31 @@ function Xr(r, e, t, o, a) {
614
614
  }
615
615
  return b;
616
616
  }(e, t, o);
617
- if (i.length === 0) return $;
617
+ if (i.length === 0) return D;
618
618
  if (i.length > 1) {
619
619
  const y = e._nodeMap, E = y.get(n.anchor.key), _ = y.get(s.anchor.key);
620
- return E && _ && !r._nodeMap.has(E.__key) && F(E) && E.__text.length === 1 && n.anchor.offset === 1 ? Pe : $;
620
+ return E && _ && !r._nodeMap.has(E.__key) && F(E) && E.__text.length === 1 && n.anchor.offset === 1 ? Pe : D;
621
621
  }
622
622
  const l = i[0], u = r._nodeMap.get(l.__key);
623
- if (!F(u) || !F(l) || u.__mode !== l.__mode) return $;
623
+ if (!F(u) || !F(l) || u.__mode !== l.__mode) return D;
624
624
  const c = u.__text, d = l.__text;
625
- if (c === d) return $;
625
+ if (c === d) return D;
626
626
  const f = n.anchor, v = s.anchor;
627
- if (f.key !== v.key || f.type !== "text") return $;
627
+ if (f.key !== v.key || f.type !== "text") return D;
628
628
  const C = f.offset, w = v.offset, x = d.length - c.length;
629
- return x === 1 && w === C - 1 ? Pe : x === -1 && w === C + 1 ? Vr : x === -1 && w === C ? Gr : $;
629
+ return x === 1 && w === C - 1 ? Pe : x === -1 && w === C + 1 ? Vr : x === -1 && w === C ? Xr : D;
630
630
  }
631
- function Yr(r, e) {
632
- let t = Date.now(), o = $;
631
+ function Gr(r, e) {
632
+ let t = Date.now(), o = D;
633
633
  return (a, n, s, i, l, u) => {
634
634
  const c = Date.now();
635
- if (u.has(se)) return o = $, t = c, ce;
636
- const d = Xr(a, n, i, l, r.isComposing()), f = (() => {
635
+ if (u.has(se)) return o = D, t = c, ce;
636
+ const d = Yr(a, n, i, l, r.isComposing()), f = (() => {
637
637
  const v = s === null || s.editor === r, C = u.has(zt);
638
638
  if (!C && v && u.has(de)) return ee;
639
639
  if (a === null) return ue;
640
640
  const w = n._selection;
641
- return i.size > 0 || l.size > 0 ? C === !1 && d !== $ && d === o && c < t + e && v || i.size === 1 && function(x, y, E) {
641
+ return i.size > 0 || l.size > 0 ? C === !1 && d !== D && d === o && c < t + e && v || i.size === 1 && function(x, y, E) {
642
642
  const _ = y._nodeMap.get(x), N = E._nodeMap.get(x), b = y._selection, L = E._selection;
643
643
  return !(g(b) && g(L) && b.anchor.type === "element" && b.focus.type === "element" && L.anchor.type === "text" && L.focus.type === "text" || !F(_) || !F(N) || _.__parent !== N.__parent) && JSON.stringify(y.read(() => _.exportJSON())) === JSON.stringify(E.read(() => N.exportJSON()));
644
644
  }(Array.from(i)[0], a, n) ? ee : ue : w !== null ? ee : ce;
@@ -650,26 +650,26 @@ function Te(r) {
650
650
  r.undoStack = [], r.redoStack = [], r.current = null;
651
651
  }
652
652
  function Qr(r, e, t) {
653
- const o = Yr(r, t);
654
- return H(r.registerCommand(Kt, () => (function(n, s) {
653
+ const o = Gr(r, t);
654
+ return j(r.registerCommand(Kt, () => (function(n, s) {
655
655
  const i = s.redoStack, l = s.undoStack;
656
656
  if (l.length !== 0) {
657
657
  const u = s.current, c = l.pop();
658
- u !== null && (i.push(u), n.dispatchCommand(X, !0)), l.length === 0 && n.dispatchCommand(Y, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
658
+ u !== null && (i.push(u), n.dispatchCommand(Y, !0)), l.length === 0 && n.dispatchCommand(G, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
659
659
  }
660
660
  }(r, e), !0), m), r.registerCommand(Ot, () => (function(n, s) {
661
661
  const i = s.redoStack, l = s.undoStack;
662
662
  if (i.length !== 0) {
663
663
  const u = s.current;
664
- u !== null && (l.push(u), n.dispatchCommand(Y, !0));
664
+ u !== null && (l.push(u), n.dispatchCommand(G, !0));
665
665
  const c = i.pop();
666
- i.length === 0 && n.dispatchCommand(X, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
666
+ i.length === 0 && n.dispatchCommand(Y, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
667
667
  }
668
- }(r, e), !0), m), r.registerCommand(Mt, () => (Te(e), !1), m), r.registerCommand(Ft, () => (Te(e), r.dispatchCommand(X, !1), r.dispatchCommand(Y, !1), !0), m), r.registerUpdateListener(({ editorState: n, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: u }) => {
668
+ }(r, e), !0), m), r.registerCommand(Mt, () => (Te(e), !1), m), r.registerCommand(Ft, () => (Te(e), r.dispatchCommand(Y, !1), r.dispatchCommand(G, !1), !0), m), r.registerUpdateListener(({ editorState: n, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: u }) => {
669
669
  const c = e.current, d = e.redoStack, f = e.undoStack, v = c === null ? null : c.editorState;
670
670
  if (c !== null && n === v) return;
671
671
  const C = o(s, n, c, i, l, u);
672
- if (C === ue) d.length !== 0 && (e.redoStack = [], r.dispatchCommand(X, !1)), c !== null && (f.push({ ...c }), r.dispatchCommand(Y, !0));
672
+ if (C === ue) d.length !== 0 && (e.redoStack = [], r.dispatchCommand(Y, !1)), c !== null && (f.push({ ...c }), r.dispatchCommand(G, !0));
673
673
  else if (C === ce) return;
674
674
  e.current = { editor: r, editorState: n };
675
675
  }));
@@ -687,7 +687,7 @@ function en({ delay: r, externalHistoryState: e }) {
687
687
  function tn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: o = !1 }) {
688
688
  const [a] = T();
689
689
  return S(() => {
690
- Yt(a) !== o && (Qt(a, o), a.registerNodeTransform(je, () => {
690
+ Gt(a) !== o && (Qt(a, o), a.registerNodeTransform(He, () => {
691
691
  })());
692
692
  }, [a, o]), S(() => Zt(a), [a]), S(() => er(a, t), [a, t]), S(() => {
693
693
  if (!r) return tr(a);
@@ -697,7 +697,7 @@ function tn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandle
697
697
  });
698
698
  }, [a, e, r]), null;
699
699
  }
700
- const Ge = 200, rn = ({
700
+ const Xe = 200, rn = ({
701
701
  currentLanguage: r = "NL",
702
702
  initialValue: e = "",
703
703
  placeholder: t = "",
@@ -706,7 +706,7 @@ const Ge = 200, rn = ({
706
706
  required: n = !1,
707
707
  notValidatedText: s = "",
708
708
  maxHeightInRem: i = "20rem",
709
- maxWords: l = Ge,
709
+ maxWords: l = Xe,
710
710
  onChange: u
711
711
  }) => {
712
712
  const { switchLanguage: c } = hr(), d = dr(), [f] = M(() => Ie()), [v, C] = M(0), [w, x] = M(0), y = ze(null), E = {
@@ -719,7 +719,7 @@ const Ge = 200, rn = ({
719
719
  onError(b) {
720
720
  throw b;
721
721
  },
722
- nodes: [Be, Ue, He, Xt, Je, rr, je],
722
+ nodes: [Be, Ue, je, Yt, Je, rr, He],
723
723
  editorState: (b) => {
724
724
  const k = new DOMParser().parseFromString(e, "text/html"), R = Jt(b, k), O = A();
725
725
  if (O.clear(), lr(e))
@@ -728,8 +728,8 @@ const Ge = 200, rn = ({
728
728
  });
729
729
  else {
730
730
  const B = Fe();
731
- R.forEach((D, V) => {
732
- V === 0 ? (B.append(D), O.append(B)) : O.append(D);
731
+ R.forEach(($, V) => {
732
+ V === 0 ? (B.append($), O.append(B)) : O.append($);
733
733
  });
734
734
  }
735
735
  }
@@ -780,11 +780,11 @@ const Ge = 200, rn = ({
780
780
  ),
781
781
  /* @__PURE__ */ h(tn, {}),
782
782
  /* @__PURE__ */ h(en, {}),
783
- /* @__PURE__ */ h(jr, {}),
783
+ /* @__PURE__ */ h(Hr, {}),
784
784
  /* @__PURE__ */ h(Jr, { validateUrl: nr }),
785
785
  /* @__PURE__ */ h(or, { matchers: ar }),
786
786
  /* @__PURE__ */ h(Wr, {}),
787
- /* @__PURE__ */ h(Hr, { onChange: N }),
787
+ /* @__PURE__ */ h(jr, { onChange: N }),
788
788
  /* @__PURE__ */ h(vr, {})
789
789
  ] })
790
790
  ] }) }),
@@ -798,7 +798,7 @@ const Ge = 200, rn = ({
798
798
  info: a = "",
799
799
  required: n = !1,
800
800
  notValidatedText: s = "",
801
- maxWords: i = Ge,
801
+ maxWords: i = Xe,
802
802
  onChange: l
803
803
  }) => /* @__PURE__ */ h(gr, { children: /* @__PURE__ */ h(
804
804
  rn,