@arkitektbedriftene/fe-lib 5.1.0 → 5.1.2

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.
@@ -1,6 +1,8 @@
1
1
  export declare const richTextStyleObj: {
2
2
  fontSize: string;
3
3
  lineHeight: string;
4
+ whiteSpace: string;
5
+ wordBreak: string;
4
6
  "h1, h2, h3, h4, h5, h6": {
5
7
  fontWeight: string;
6
8
  lineHeight: string;
@@ -64,6 +66,12 @@ export declare const richTextStyleObj: {
64
66
  };
65
67
  ol: {
66
68
  listStyleType: string;
69
+ "&[type='a']": {
70
+ listStyleType: string;
71
+ };
72
+ "&[type='i']": {
73
+ listStyleType: string;
74
+ };
67
75
  };
68
76
  ".ain-rich-text-nested-list-item": {
69
77
  listStyleType: string;
@@ -3,8 +3,8 @@ var Me = (t, r, e) => r in t ? Ce(t, r, { enumerable: !0, configurable: !0, writ
3
3
  var $ = (t, r, e) => Me(t, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { createHeadlessEditor as Bt } from "@lexical/headless";
5
5
  import { $generateHtmlFromNodes as Pt } from "@lexical/html";
6
- import { $getRoot as V, ParagraphNode as Te, $createParagraphNode as G, $createTextNode as z, $setSelection as nt, $getNodeByKey as dt, DecoratorNode as xe, $applyNodeReplacement as Le, SELECTION_CHANGE_COMMAND as Q, $getSelection as y, COMMAND_PRIORITY_EDITOR as q, $isRangeSelection as R, $isRootOrShadowRoot as Ht, FORMAT_TEXT_COMMAND as A, COMMAND_PRIORITY_LOW as D, KEY_ARROW_DOWN_COMMAND as _e, KEY_ARROW_UP_COMMAND as we, KEY_ESCAPE_COMMAND as Ft, KEY_SPACE_COMMAND as ye, $getNearestNodeFromDOMNode as mt, KEY_ARROW_LEFT_COMMAND as Se, $isElementNode as Ne, createCommand as Ee, $insertNodes as Re, $createRangeSelection as Ut, COMMAND_PRIORITY_HIGH as Ie, FORMAT_ELEMENT_COMMAND as ht } from "lexical";
7
- import { trimTextContentFromAnchor as Oe, $setBlocksType as ut, $getSelectionStyleValueForProperty as ze, $patchStyleText as $e, $isAtNodeEnd as yt } from "@lexical/selection";
6
+ import { $getRoot as V, ParagraphNode as Te, $createParagraphNode as G, $createTextNode as z, $setSelection as nt, $getNodeByKey as dt, DecoratorNode as xe, $applyNodeReplacement as Le, SELECTION_CHANGE_COMMAND as Q, $getSelection as _, COMMAND_PRIORITY_EDITOR as q, $isRangeSelection as R, $isRootOrShadowRoot as Ht, FORMAT_TEXT_COMMAND as A, COMMAND_PRIORITY_LOW as D, KEY_ARROW_DOWN_COMMAND as we, KEY_ARROW_UP_COMMAND as ye, KEY_ESCAPE_COMMAND as Ft, KEY_SPACE_COMMAND as _e, $getNearestNodeFromDOMNode as mt, KEY_ARROW_LEFT_COMMAND as Se, $isElementNode as Ne, createCommand as Ee, $insertNodes as Re, $createRangeSelection as Ut, COMMAND_PRIORITY_HIGH as Ie, FORMAT_ELEMENT_COMMAND as ht } from "lexical";
7
+ import { trimTextContentFromAnchor as Oe, $setBlocksType as ut, $getSelectionStyleValueForProperty as ze, $patchStyleText as $e, $isAtNodeEnd as _t } from "@lexical/selection";
8
8
  import { $dfs as Ae, $getNearestNodeOfType as De, $findMatchingParent as Wt, mergeRegister as ot, isHTMLElement as St, $wrapNodeInElement as Be, mediaFileReader as Pe, isMimeType as He } from "@lexical/utils";
9
9
  import { LinkNode as W, AutoLinkNode as jt, $isLinkNode as tt, TOGGLE_LINK_COMMAND as it } from "@lexical/link";
10
10
  import { ListNode as ft, ListItemNode as Kt, $isListNode as kt, INSERT_UNORDERED_LIST_COMMAND as Fe, INSERT_ORDERED_LIST_COMMAND as Ue, INSERT_CHECK_LIST_COMMAND as Gt, insertList as We, $isListItemNode as j } from "@lexical/list";
@@ -14,16 +14,16 @@ import { jsx as n, jsxs as h, Fragment as P } from "react/jsx-runtime";
14
14
  import { createContext as Qe, useState as p, useRef as J, useCallback as M, useContext as Ze, useEffect as L, useMemo as Qt, useLayoutEffect as tr } from "react";
15
15
  import { Box as B, Stack as er, Button as S, DropdownMenu as at, ToolbarButton as lt, DropdownMenuIconItem as T, ToolbarToggleGroup as et, ToolbarToggleItem as O, Popover as Zt, PopoverTrigger as te, PopoverContent as ee, OverlayCard as re, Toolbar as rr, ToolbarSeparator as Rt, styled as nr, Spinner as st, Dialog as ne, DialogHeader as or, TextInput as bt, DialogActions as ct, DropdownMenuItem as U, DropdownMenuSeparator as It, NavBar as ir, NavBarItem as gt, Combobox as ar } from "./ui.es.js";
16
16
  import { f as lr, g as sr, h as cr, G as f, i as dr, j as hr, k as ur, l as gr } from "./index.esm-Dzt91gSZ.js";
17
- import { useLexicalComposerContext as _ } from "@lexical/react/LexicalComposerContext.js";
17
+ import { useLexicalComposerContext as w } from "@lexical/react/LexicalComposerContext.js";
18
18
  import { HorizontalRuleNode as pr } from "@lexical/react/LexicalHorizontalRuleNode.js";
19
19
  import { LexicalComposer as mr } from "@lexical/react/LexicalComposer.js";
20
20
  import { RichTextPlugin as fr } from "@lexical/react/LexicalRichTextPlugin.js";
21
21
  import { LexicalErrorBoundary as kr } from "@lexical/react/LexicalErrorBoundary.js";
22
22
  import { useFloating as vt, autoUpdate as oe, size as br, flip as vr, offset as ie, shift as Cr, useInteractions as ae, useRole as le, FloatingPortal as se, inline as Mr, useDismiss as Tr } from "@floating-ui/react";
23
23
  import { s as xr, c as Lr } from "./stitches.config-CEYOm13b.js";
24
- import { ListPlugin as _r } from "@lexical/react/LexicalListPlugin.js";
25
- import { HistoryPlugin as wr } from "@lexical/react/LexicalHistoryPlugin.js";
26
- import { TablePlugin as yr } from "@lexical/react/LexicalTablePlugin.js";
24
+ import { ListPlugin as wr } from "@lexical/react/LexicalListPlugin.js";
25
+ import { HistoryPlugin as yr } from "@lexical/react/LexicalHistoryPlugin.js";
26
+ import { TablePlugin as _r } from "@lexical/react/LexicalTablePlugin.js";
27
27
  import { HorizontalRulePlugin as Sr } from "@lexical/react/LexicalHorizontalRulePlugin.js";
28
28
  import { TabIndentationPlugin as Nr } from "@lexical/react/LexicalTabIndentationPlugin.js";
29
29
  import { useLexicalComposerContext as Ct } from "@lexical/react/LexicalComposerContext";
@@ -211,7 +211,7 @@ function $r({
211
211
  height: o,
212
212
  nodeKey: i
213
213
  }) {
214
- const { signUrl: a } = H(), [l, s] = p(a ? "" : t), [d, c] = p(!1), u = J(!1), [g] = _();
214
+ const { signUrl: a } = H(), [l, s] = p(a ? "" : t), [d, c] = p(!1), u = J(!1), [g] = w();
215
215
  L(() => {
216
216
  const m = async () => {
217
217
  s(await (a == null ? void 0 : a(t)) || t);
@@ -225,7 +225,7 @@ function $r({
225
225
  const m = dt(i);
226
226
  m && m.remove();
227
227
  });
228
- }, w = () => {
228
+ }, y = () => {
229
229
  g.update(() => {
230
230
  var N;
231
231
  const m = dt(i);
@@ -277,7 +277,7 @@ function $r({
277
277
  icon: !0,
278
278
  size: "sm",
279
279
  css: { width: "20px", height: "20px" },
280
- onClick: w,
280
+ onClick: y,
281
281
  children: /* @__PURE__ */ n(sr, {})
282
282
  }
283
283
  ),
@@ -583,11 +583,11 @@ const ln = xr("div", {
583
583
  element: e
584
584
  };
585
585
  }, dn = () => {
586
- const [t] = _(), [r, e] = p("paragraph");
586
+ const [t] = w(), [r, e] = p("paragraph");
587
587
  L(() => t.registerCommand(
588
588
  Q,
589
589
  () => {
590
- const c = y(), u = cn(c);
590
+ const c = _(), u = cn(c);
591
591
  if (!u)
592
592
  return !1;
593
593
  const { element: g, anchorNode: v } = u, x = g.getKey();
@@ -608,7 +608,7 @@ const ln = xr("div", {
608
608
  ), [t]);
609
609
  const o = (c) => {
610
610
  r !== c && t.update(() => {
611
- const u = y();
611
+ const u = _();
612
612
  R(u) && (ut(u, () => Ke(c)), e(c));
613
613
  });
614
614
  };
@@ -628,7 +628,7 @@ const ln = xr("div", {
628
628
  children: [
629
629
  /* @__PURE__ */ n(T, { onClick: () => {
630
630
  r !== "paragraph" && t.update(() => {
631
- const c = y();
631
+ const c = _();
632
632
  R(c) && (ut(c, () => G()), e("paragraph"));
633
633
  });
634
634
  }, children: /* @__PURE__ */ n(E, { blockType: "paragraph" }) }),
@@ -649,7 +649,7 @@ const ln = xr("div", {
649
649
  }, children: /* @__PURE__ */ n(E, { blockType: "check" }) }),
650
650
  /* @__PURE__ */ n(T, { onClick: () => {
651
651
  r !== "quote" && t.update(() => {
652
- const c = y();
652
+ const c = _();
653
653
  R(c) && (ut(c, () => Ge()), e("quote"));
654
654
  });
655
655
  }, children: /* @__PURE__ */ n(E, { blockType: "quote" }) })
@@ -657,9 +657,9 @@ const ln = xr("div", {
657
657
  }
658
658
  ) });
659
659
  }, hn = () => {
660
- const [t] = _(), [r, e] = p(!1), [o, i] = p(!1), [a, l] = p(!1), [s, d] = p(!1), [c, u] = p(!1), [g, v] = p(!1), [x, w] = p(!1), [k, m] = p(""), [C, N] = p(!1), I = M(() => {
661
- const b = y();
662
- R(b) && (e(b.hasFormat("bold")), i(b.hasFormat("italic")), l(b.hasFormat("underline")), d(b.hasFormat("strikethrough")), u(b.hasFormat("code")), v(b.hasFormat("superscript")), w(b.hasFormat("subscript")), m(ze(b, "color", "")));
660
+ const [t] = w(), [r, e] = p(!1), [o, i] = p(!1), [a, l] = p(!1), [s, d] = p(!1), [c, u] = p(!1), [g, v] = p(!1), [x, y] = p(!1), [k, m] = p(""), [C, N] = p(!1), I = M(() => {
661
+ const b = _();
662
+ R(b) && (e(b.hasFormat("bold")), i(b.hasFormat("italic")), l(b.hasFormat("underline")), d(b.hasFormat("strikethrough")), u(b.hasFormat("code")), v(b.hasFormat("superscript")), y(b.hasFormat("subscript")), m(ze(b, "color", "")));
663
663
  }, []);
664
664
  L(() => ot(
665
665
  t.registerCommand(
@@ -694,7 +694,7 @@ const ln = xr("div", {
694
694
  ), ve = M(
695
695
  () => t.dispatchCommand(A, "subscript"),
696
696
  [t]
697
- ), wt = Qt(() => {
697
+ ), yt = Qt(() => {
698
698
  const b = [];
699
699
  return r && b.push("bold"), o && b.push("italic"), a && b.push("underline"), s && b.push("strikethrough"), c && b.push("code"), g && b.push("superscript"), x && b.push("subscript"), k && b.push("color"), b;
700
700
  }, [
@@ -713,7 +713,7 @@ const ln = xr("div", {
713
713
  {
714
714
  type: "multiple",
715
715
  "aria-label": "Tekstformattering",
716
- value: wt,
716
+ value: yt,
717
717
  children: [
718
718
  /* @__PURE__ */ n(O, { onClick: Y, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ n(Pr, { size: "1.25rem" }) }),
719
719
  /* @__PURE__ */ n(
@@ -744,7 +744,7 @@ const ln = xr("div", {
744
744
  {
745
745
  type: "multiple",
746
746
  "aria-label": "Tekstformattering",
747
- value: wt,
747
+ value: yt,
748
748
  css: { margin: "$1" },
749
749
  children: [
750
750
  /* @__PURE__ */ n(
@@ -788,9 +788,9 @@ const ln = xr("div", {
788
788
  { name: "Blå", value: "#2044b8" },
789
789
  { name: "Lilla", value: "#9c31de" }
790
790
  ], gn = ({ activeColor: t }) => {
791
- const [r] = _(), [e, o] = p(!1), i = (a) => {
791
+ const [r] = w(), [e, o] = p(!1), i = (a) => {
792
792
  r.update(() => {
793
- const l = y();
793
+ const l = _();
794
794
  l && $e(l, { color: a });
795
795
  });
796
796
  };
@@ -892,7 +892,7 @@ const ln = xr("div", {
892
892
  t
893
893
  ] });
894
894
  function fn() {
895
- const [t] = _();
895
+ const [t] = w();
896
896
  return L(() => ot(
897
897
  t.registerCommand(
898
898
  Gt,
@@ -900,12 +900,12 @@ function fn() {
900
900
  D
901
901
  ),
902
902
  t.registerCommand(
903
- _e,
903
+ we,
904
904
  (r) => At(r, t, !1),
905
905
  D
906
906
  ),
907
907
  t.registerCommand(
908
- we,
908
+ ye,
909
909
  (r) => At(r, t, !0),
910
910
  D
911
911
  ),
@@ -921,7 +921,7 @@ function fn() {
921
921
  D
922
922
  ),
923
923
  t.registerCommand(
924
- ye,
924
+ _e,
925
925
  (r) => {
926
926
  const e = pt();
927
927
  return e != null && t.isEditable() ? (t.update(() => {
@@ -934,7 +934,7 @@ function fn() {
934
934
  t.registerCommand(
935
935
  Se,
936
936
  (r) => t.getEditorState().read(() => {
937
- const e = y();
937
+ const e = _();
938
938
  if (R(e) && e.isCollapsed()) {
939
939
  const { anchor: o } = e, i = o.type === "element";
940
940
  if (i || o.offset === 0) {
@@ -1051,9 +1051,9 @@ function vn() {
1051
1051
  }, [t]), null;
1052
1052
  }
1053
1053
  const Cn = () => /* @__PURE__ */ h(P, { children: [
1054
+ /* @__PURE__ */ n(wr, {}),
1054
1055
  /* @__PURE__ */ n(_r, {}),
1055
1056
  /* @__PURE__ */ n(yr, {}),
1056
- /* @__PURE__ */ n(wr, {}),
1057
1057
  /* @__PURE__ */ n(fn, {}),
1058
1058
  /* @__PURE__ */ n(Nr, {}),
1059
1059
  /* @__PURE__ */ n(vn, {}),
@@ -1061,7 +1061,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1061
1061
  ] }), Mn = ({
1062
1062
  state: t
1063
1063
  }) => {
1064
- const [r] = _(), e = J(!1);
1064
+ const [r] = w(), e = J(!1);
1065
1065
  return L(() => {
1066
1066
  !t || e.current || (e.current = !0, window.queueMicrotask(() => {
1067
1067
  try {
@@ -1146,7 +1146,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1146
1146
  css: g,
1147
1147
  signUrl: v,
1148
1148
  fileUpload: x,
1149
- editable: w = !0
1149
+ editable: y = !0
1150
1150
  }) => {
1151
1151
  const { hasFocus: k, attributes: m } = zr({ onBlur: c }), C = J(null), N = Qt(
1152
1152
  () => ({ hasFocus: k, editorRef: C, signUrl: v, fileUpload: x }),
@@ -1162,7 +1162,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1162
1162
  },
1163
1163
  theme: Mt,
1164
1164
  nodes: o,
1165
- editable: w
1165
+ editable: y
1166
1166
  },
1167
1167
  children: [
1168
1168
  /* @__PURE__ */ h(
@@ -1199,7 +1199,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1199
1199
  /* @__PURE__ */ n(Cn, {}),
1200
1200
  i,
1201
1201
  /* @__PURE__ */ n(xn, { isLoading: t }),
1202
- w && !a && /* @__PURE__ */ n(pn, { children: l })
1202
+ y && !a && /* @__PURE__ */ n(pn, { children: l })
1203
1203
  ]
1204
1204
  }
1205
1205
  ),
@@ -1211,6 +1211,8 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1211
1211
  }, Ln = {
1212
1212
  fontSize: "1rem",
1213
1213
  lineHeight: "1.5",
1214
+ whiteSpace: "pre-wrap",
1215
+ wordBreak: "break-word",
1214
1216
  "h1, h2, h3, h4, h5, h6": {
1215
1217
  fontWeight: "700",
1216
1218
  lineHeight: "1.2",
@@ -1273,7 +1275,13 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1273
1275
  listStyleType: "square"
1274
1276
  },
1275
1277
  ol: {
1276
- listStyleType: "decimal"
1278
+ listStyleType: "decimal",
1279
+ "&[type='a']": {
1280
+ listStyleType: "lower-alpha"
1281
+ },
1282
+ "&[type='i']": {
1283
+ listStyleType: "lower-roman"
1284
+ }
1277
1285
  },
1278
1286
  ".ain-rich-text-nested-list-item": {
1279
1287
  listStyleType: "none"
@@ -1411,11 +1419,11 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1411
1419
  defaultVariants: {
1412
1420
  size: "md"
1413
1421
  }
1414
- }, go = Lr(Ln), _n = ({
1422
+ }, go = Lr(Ln), wn = ({
1415
1423
  fileUpload: t,
1416
1424
  ...r
1417
1425
  }) => {
1418
- const [e] = _(), [o, i] = p(null), a = (s) => {
1426
+ const [e] = w(), [o, i] = p(null), a = (s) => {
1419
1427
  var c;
1420
1428
  const d = (c = s.target.files) == null ? void 0 : c[0];
1421
1429
  if (d) {
@@ -1458,7 +1466,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1458
1466
  ] })
1459
1467
  ] });
1460
1468
  }, po = () => {
1461
- const [t] = _(), { fileUpload: r } = H(), [e, o] = p(!1), i = M(() => {
1469
+ const [t] = w(), { fileUpload: r } = H(), [e, o] = p(!1), i = M(() => {
1462
1470
  t.dispatchCommand(Je, {
1463
1471
  rows: "3",
1464
1472
  columns: "3",
@@ -1485,7 +1493,7 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1485
1493
  }
1486
1494
  ),
1487
1495
  r && /* @__PURE__ */ n(
1488
- _n,
1496
+ wn,
1489
1497
  {
1490
1498
  open: e,
1491
1499
  onOpenChange: o,
@@ -1494,11 +1502,11 @@ const Cn = () => /* @__PURE__ */ h(P, { children: [
1494
1502
  )
1495
1503
  ] });
1496
1504
  };
1497
- function wn(t) {
1505
+ function yn(t) {
1498
1506
  return f({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "circle", attr: { cx: "256", cy: "256", r: "48" } }, { tag: "circle", attr: { cx: "416", cy: "256", r: "48" } }, { tag: "circle", attr: { cx: "96", cy: "256", r: "48" } }] })(t);
1499
1507
  }
1500
1508
  const mo = () => {
1501
- const [t] = _(), [r, e] = p(null), { hasFocus: o } = H();
1509
+ const [t] = w(), [r, e] = p(null), { hasFocus: o } = H();
1502
1510
  L(() => {
1503
1511
  !o && r && e(null);
1504
1512
  }, [o, r]);
@@ -1513,7 +1521,7 @@ const mo = () => {
1513
1521
  L(() => t.registerCommand(
1514
1522
  Q,
1515
1523
  () => {
1516
- const s = y();
1524
+ const s = _();
1517
1525
  if (R(s)) {
1518
1526
  const d = s.anchor.getNode(), c = Ye(d);
1519
1527
  e(c ? t.getElementByKey(c.getKey()) : null);
@@ -1558,7 +1566,7 @@ const mo = () => {
1558
1566
  ref: i.setFloating,
1559
1567
  style: a,
1560
1568
  css: { padding: "2px", width: "18px", height: "18px" },
1561
- children: /* @__PURE__ */ n(wn, {})
1569
+ children: /* @__PURE__ */ n(yn, {})
1562
1570
  }
1563
1571
  ),
1564
1572
  children: [
@@ -1574,14 +1582,14 @@ const mo = () => {
1574
1582
  }
1575
1583
  ) : null;
1576
1584
  };
1577
- function _t(t) {
1585
+ function wt(t) {
1578
1586
  let r = t;
1579
1587
  const e = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi, o = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
1580
1588
  return r = String(r).trim(), r.match(e) || r.match(o) ? r : "https://";
1581
1589
  }
1582
1590
  function ge(t) {
1583
1591
  const r = t.anchor, e = t.focus, o = t.anchor.getNode(), i = t.focus.getNode();
1584
- return o === i ? o : t.isBackward() ? yt(e) ? o : i : yt(r) ? o : i;
1592
+ return o === i ? o : t.isBackward() ? _t(e) ? o : i : _t(r) ? o : i;
1585
1593
  }
1586
1594
  const fo = (t) => (K.baseURL = t, K), X = class X extends W {
1587
1595
  static getType() {
@@ -1618,21 +1626,21 @@ let K = X;
1618
1626
  function pe(t) {
1619
1627
  return new K(t);
1620
1628
  }
1621
- function yn(t) {
1629
+ function _n(t) {
1622
1630
  return t instanceof K;
1623
1631
  }
1624
1632
  const Sn = ({ onClose: t }) => {
1625
- const [r] = _(), e = M(
1633
+ const [r] = w(), e = M(
1626
1634
  (i) => {
1627
1635
  r.update(() => {
1628
- const a = y();
1636
+ const a = _();
1629
1637
  if (R(a) && a.isCollapsed()) {
1630
1638
  const l = z(i);
1631
1639
  a.insertNodes([l]);
1632
1640
  const s = Ut();
1633
1641
  s.setTextNodeRange(l, 0, l, i.length), nt(s);
1634
1642
  }
1635
- r.dispatchCommand(it, _t(i));
1643
+ r.dispatchCommand(it, wt(i));
1636
1644
  });
1637
1645
  },
1638
1646
  [r]
@@ -1650,7 +1658,7 @@ const Sn = ({ onClose: t }) => {
1650
1658
  onClose: t,
1651
1659
  getDocs: r
1652
1660
  }) => {
1653
- const [e] = _(), o = J(!1), [i, a] = p(null), [l, s] = p([]);
1661
+ const [e] = w(), o = J(!1), [i, a] = p(null), [l, s] = p([]);
1654
1662
  L(() => {
1655
1663
  o.current || (async () => {
1656
1664
  o.current = !0;
@@ -1664,12 +1672,12 @@ const Sn = ({ onClose: t }) => {
1664
1672
  const d = M(
1665
1673
  (c) => {
1666
1674
  e.update(() => {
1667
- const u = y();
1675
+ const u = _();
1668
1676
  if (R(u)) {
1669
1677
  const g = [];
1670
1678
  for (const [v, x] of c.entries()) {
1671
- const w = pe(x.value);
1672
- w.append(z(x.label)), g.push(w), v !== c.length - 1 && g.push(z(" "));
1679
+ const y = pe(x.value);
1680
+ y.append(z(x.label)), g.push(y), v !== c.length - 1 && g.push(z(" "));
1673
1681
  }
1674
1682
  u.insertNodes(g);
1675
1683
  }
@@ -1706,7 +1714,7 @@ const Sn = ({ onClose: t }) => {
1706
1714
  fileUpload: r,
1707
1715
  filePrefix: e
1708
1716
  }) => {
1709
- const [o] = _(), [i, a] = p(null), l = async (d) => {
1717
+ const [o] = w(), [i, a] = p(null), l = async (d) => {
1710
1718
  var u;
1711
1719
  const c = (u = d.target.files) == null ? void 0 : u[0];
1712
1720
  if (c) {
@@ -1720,14 +1728,14 @@ const Sn = ({ onClose: t }) => {
1720
1728
  o.update(() => {
1721
1729
  if (!i)
1722
1730
  return;
1723
- const d = y();
1731
+ const d = _();
1724
1732
  if (R(d) && d.isCollapsed()) {
1725
1733
  const c = z(i.name);
1726
1734
  d.insertNodes([c]);
1727
1735
  const u = Ut();
1728
1736
  u.setTextNodeRange(c, 0, c, i.name.length), nt(u);
1729
1737
  }
1730
- o.dispatchCommand(it, _t(i.url));
1738
+ o.dispatchCommand(it, wt(i.url));
1731
1739
  });
1732
1740
  }, [o, i]);
1733
1741
  return /* @__PURE__ */ h(P, { children: [
@@ -1792,8 +1800,8 @@ const Sn = ({ onClose: t }) => {
1792
1800
  getDocs: t,
1793
1801
  filePrefix: r
1794
1802
  }) => {
1795
- const [e] = _(), [o, i] = p(!1), [a, l] = p(!1), s = M(() => {
1796
- const d = y();
1803
+ const [e] = w(), [o, i] = p(!1), [a, l] = p(!1), s = M(() => {
1804
+ const d = _();
1797
1805
  if (R(d)) {
1798
1806
  const c = ge(d), u = c.getParent();
1799
1807
  i(tt(u) || tt(c));
@@ -1826,7 +1834,7 @@ const Sn = ({ onClose: t }) => {
1826
1834
  )
1827
1835
  ] });
1828
1836
  }, bo = () => {
1829
- const [t] = _(), r = J(null), [e, o] = p(null), [i, a] = p(""), { hasFocus: l } = H();
1837
+ const [t] = w(), r = J(null), [e, o] = p(null), [i, a] = p(""), { hasFocus: l } = H();
1830
1838
  L(() => {
1831
1839
  e ? t.update(() => {
1832
1840
  a(e.getURL());
@@ -1846,7 +1854,7 @@ const Sn = ({ onClose: t }) => {
1846
1854
  Tr(u)
1847
1855
  ]), v = M(() => {
1848
1856
  var m;
1849
- const k = y();
1857
+ const k = _();
1850
1858
  if (R(k)) {
1851
1859
  const C = ge(k), N = C.getParent();
1852
1860
  let I = null;
@@ -1857,7 +1865,7 @@ const Sn = ({ onClose: t }) => {
1857
1865
  o(I);
1858
1866
  }
1859
1867
  }, [t]), x = M(() => {
1860
- e && yn(e) && t.update(() => {
1868
+ e && _n(e) && t.update(() => {
1861
1869
  e.remove();
1862
1870
  }), t.dispatchCommand(it, null);
1863
1871
  }, [t, e]);
@@ -1882,7 +1890,7 @@ const Sn = ({ onClose: t }) => {
1882
1890
  Ie
1883
1891
  )
1884
1892
  ), [t, v, e]), !s) return null;
1885
- const w = _t(i);
1893
+ const y = wt(i);
1886
1894
  return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ h(
1887
1895
  re,
1888
1896
  {
@@ -1908,8 +1916,8 @@ const Sn = ({ onClose: t }) => {
1908
1916
  textOverflow: "ellipsis",
1909
1917
  marginRight: "$4"
1910
1918
  },
1911
- href: w,
1912
- title: w,
1919
+ href: y,
1920
+ title: y,
1913
1921
  target: "_blank",
1914
1922
  rel: "noreferrer",
1915
1923
  children: i
@@ -1990,7 +1998,7 @@ export {
1990
1998
  pe as $createRutineLinkNode,
1991
1999
  lo as $getNodesOfTypes,
1992
2000
  so as $isImageNode,
1993
- yn as $isRutineLinkNode,
2001
+ _n as $isRutineLinkNode,
1994
2002
  vo as AlignToolbarDropdown,
1995
2003
  Co as DragDropPastePlugin,
1996
2004
  pn as FloatingToolbar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkitektbedriftene/fe-lib",
3
- "version": "5.1.0",
3
+ "version": "5.1.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./oidc": {