@arkitektbedriftene/fe-lib 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { type EditorState, type CreateEditorArgs, type SerializedEditorState, type LexicalEditor } from "lexical";
1
+ import { type EditorState, type CreateEditorArgs, type SerializedEditorState, type LexicalEditor, type LexicalNode, type Klass } from "lexical";
2
2
  export declare const isJSON: (str: string) => boolean;
3
3
  export declare const isEditorState: (state: unknown) => state is EditorState;
4
4
  export declare const clearEditorState: (editor: LexicalEditor, tag?: string) => void;
@@ -18,3 +18,4 @@ export declare const syncStateToHTML: (state: SerializedEditorState | string | n
18
18
  html: string;
19
19
  trimCount: number;
20
20
  };
21
+ export declare const $getNodesOfTypes: <T extends LexicalNode>(klasses: Klass<T>[]) => T[];
@@ -5,28 +5,28 @@ import { createHeadlessEditor as At } from "@lexical/headless";
5
5
  import { $generateHtmlFromNodes as zt } from "@lexical/html";
6
6
  import { $getRoot as K, ParagraphNode as he, $createParagraphNode as U, $createTextNode as I, $setSelection as V, $getNodeByKey as ot, DecoratorNode as ue, $applyNodeReplacement as ge, SELECTION_CHANGE_COMMAND as G, $getSelection as y, COMMAND_PRIORITY_CRITICAL as ct, $isRangeSelection as N, $isRootOrShadowRoot as $t, FORMAT_TEXT_COMMAND as j, COMMAND_PRIORITY_LOW as R, KEY_ARROW_DOWN_COMMAND as pe, KEY_ARROW_UP_COMMAND as me, KEY_ESCAPE_COMMAND as Dt, KEY_SPACE_COMMAND as fe, $getNearestNodeFromDOMNode as dt, KEY_ARROW_LEFT_COMMAND as ke, $isElementNode as be, createCommand as Me, $insertNodes as Ce, COMMAND_PRIORITY_EDITOR as ve, COMMAND_PRIORITY_NORMAL as Te, $createRangeSelection as Bt, COMMAND_PRIORITY_HIGH as _e, FORMAT_ELEMENT_COMMAND as it } from "lexical";
7
7
  import { trimTextContentFromAnchor as Le, $setBlocksType as at, $isAtNodeEnd as Lt } from "@lexical/selection";
8
- import { LinkNode as P, AutoLinkNode as Pt, $isLinkNode as J, TOGGLE_LINK_COMMAND as Z } from "@lexical/link";
9
- import { ListNode as ht, ListItemNode as Ft, $isListNode as ut, INSERT_UNORDERED_LIST_COMMAND as xe, INSERT_ORDERED_LIST_COMMAND as we, INSERT_CHECK_LIST_COMMAND as Ht, insertList as ye, $isListItemNode as F } from "@lexical/list";
10
- import { HeadingNode as Ut, QuoteNode as Wt, $isHeadingNode as Ne, $createHeadingNode as Se, $createQuoteNode as Ee, DRAG_DROP_PASTE as Re } from "@lexical/rich-text";
11
- import { TableNode as jt, TableRowNode as Kt, TableCellNode as Gt, INSERT_TABLE_COMMAND as Ie, $getTableCellNodeFromLexicalNode as Oe, $deleteTableColumn__EXPERIMENTAL as Ae, $deleteTableRow__EXPERIMENTAL as ze, $insertTableColumn__EXPERIMENTAL as xt, $insertTableRow__EXPERIMENTAL as wt } from "@lexical/table";
8
+ import { $dfs as xe, $getNearestNodeOfType as we, $findMatchingParent as Pt, mergeRegister as Z, isHTMLElement as xt, $wrapNodeInElement as ye, mediaFileReader as Ne, isMimeType as Se } from "@lexical/utils";
9
+ import { LinkNode as P, AutoLinkNode as Ft, $isLinkNode as J, TOGGLE_LINK_COMMAND as tt } from "@lexical/link";
10
+ import { ListNode as ht, ListItemNode as Ht, $isListNode as ut, INSERT_UNORDERED_LIST_COMMAND as Ee, INSERT_ORDERED_LIST_COMMAND as Re, INSERT_CHECK_LIST_COMMAND as Ut, insertList as Ie, $isListItemNode as F } from "@lexical/list";
11
+ import { HeadingNode as Wt, QuoteNode as jt, $isHeadingNode as Oe, $createHeadingNode as Ae, $createQuoteNode as ze, DRAG_DROP_PASTE as $e } from "@lexical/rich-text";
12
+ import { TableNode as Kt, TableRowNode as Gt, TableCellNode as Yt, INSERT_TABLE_COMMAND as De, $getTableCellNodeFromLexicalNode as Be, $deleteTableColumn__EXPERIMENTAL as Pe, $deleteTableRow__EXPERIMENTAL as Fe, $insertTableColumn__EXPERIMENTAL as wt, $insertTableRow__EXPERIMENTAL as yt } from "@lexical/table";
12
13
  import { jsx as o, jsxs as u, Fragment as W } from "react/jsx-runtime";
13
- import { createContext as $e, useState as b, useRef as Y, useCallback as T, useContext as De, useEffect as _, useMemo as Yt, useLayoutEffect as Be } from "react";
14
- import { Box as H, Stack as Pe, Button as L, DropdownMenu as tt, ToolbarButton as gt, DropdownMenuIconItem as v, ToolbarToggleGroup as qt, ToolbarToggleItem as B, OverlayCard as Jt, Toolbar as Fe, ToolbarSeparator as He, styled as Ue, Spinner as pt, Dialog as Xt, DialogHeader as We, TextInput as mt, DialogActions as et, DropdownMenuItem as D, DropdownMenuSeparator as yt, NavBar as je, NavBarItem as lt, Combobox as Ke } from "./ui.es.js";
15
- import { f as Ge, g as Ye, h as qe, G as f, i as Je, j as Xe } from "./index.esm-787a7997.js";
14
+ import { createContext as He, useState as b, useRef as Y, useCallback as T, useContext as Ue, useEffect as _, useMemo as qt, useLayoutEffect as We } from "react";
15
+ import { Box as H, Stack as je, Button as L, DropdownMenu as et, ToolbarButton as gt, DropdownMenuIconItem as v, ToolbarToggleGroup as Jt, ToolbarToggleItem as B, OverlayCard as Xt, Toolbar as Ke, ToolbarSeparator as Ge, styled as Ye, Spinner as pt, Dialog as Qt, DialogHeader as qe, TextInput as mt, DialogActions as rt, DropdownMenuItem as D, DropdownMenuSeparator as Nt, NavBar as Je, NavBarItem as lt, Combobox as Xe } from "./ui.es.js";
16
+ import { f as Qe, g as Ve, h as Ze, G as f, i as tr, j as er } from "./index.esm-787a7997.js";
16
17
  import { useLexicalComposerContext as x } from "@lexical/react/LexicalComposerContext.js";
17
- import { LexicalComposer as Qe } from "@lexical/react/LexicalComposer.js";
18
- import { RichTextPlugin as Ve } from "@lexical/react/LexicalRichTextPlugin.js";
19
- import Ze from "@lexical/react/LexicalErrorBoundary.js";
20
- import { useFloating as ft, autoUpdate as Qt, size as tr, flip as er, offset as Vt, shift as rr, useInteractions as Zt, useRole as te, FloatingPortal as ee, inline as nr, useDismiss as or } from "@floating-ui/react";
21
- import { $getNearestNodeOfType as ir, $findMatchingParent as re, mergeRegister as rt, isHTMLElement as Nt, $wrapNodeInElement as ar, mediaFileReader as lr, isMimeType as sr } from "@lexical/utils";
22
- import { s as cr, c as dr } from "./stitches.config-00c23cdb.js";
23
- import { ListPlugin as hr } from "@lexical/react/LexicalListPlugin.js";
24
- import { HistoryPlugin as ur } from "@lexical/react/LexicalHistoryPlugin.js";
25
- import { TablePlugin as gr } from "@lexical/react/LexicalTablePlugin.js";
26
- import { TabIndentationPlugin as pr } from "@lexical/react/LexicalTabIndentationPlugin.js";
18
+ import { LexicalComposer as rr } from "@lexical/react/LexicalComposer.js";
19
+ import { RichTextPlugin as nr } from "@lexical/react/LexicalRichTextPlugin.js";
20
+ import or from "@lexical/react/LexicalErrorBoundary.js";
21
+ import { useFloating as ft, autoUpdate as Vt, size as ir, flip as ar, offset as Zt, shift as lr, useInteractions as te, useRole as ee, FloatingPortal as re, inline as sr, useDismiss as cr } from "@floating-ui/react";
22
+ import { s as dr, c as hr } from "./stitches.config-00c23cdb.js";
23
+ import { ListPlugin as ur } from "@lexical/react/LexicalListPlugin.js";
24
+ import { HistoryPlugin as gr } from "@lexical/react/LexicalHistoryPlugin.js";
25
+ import { TablePlugin as pr } from "@lexical/react/LexicalTablePlugin.js";
26
+ import { TabIndentationPlugin as mr } from "@lexical/react/LexicalTabIndentationPlugin.js";
27
27
  import { useLexicalComposerContext as kt } from "@lexical/react/LexicalComposerContext";
28
28
  import "@stitches/react";
29
- const mr = ({
29
+ const fr = ({
30
30
  text: t,
31
31
  maxChars: r,
32
32
  maxLines: e
@@ -46,7 +46,7 @@ const mr = ({
46
46
  maxChars: r,
47
47
  maxLines: e
48
48
  }) => {
49
- const n = K(), i = n.getTextContent(), a = mr({ text: i, maxChars: r, maxLines: e }), l = i.length - a, d = n.select().anchor;
49
+ const n = K(), i = n.getTextContent(), a = fr({ text: i, maxChars: r, maxLines: e }), l = i.length - a, d = n.select().anchor;
50
50
  Le(t, d, l);
51
51
  const c = n.getLastChild();
52
52
  return c instanceof he && c.getChildrenSize() === 0 && c.remove(), l;
@@ -62,7 +62,7 @@ const mr = ({
62
62
  listitem: "ain-rich-text-nested-list-item"
63
63
  }
64
64
  }
65
- }, Mt = (t) => t[0] === "{", fr = (t) => t !== null && typeof t == "object" && "isEmpty" in t, kr = (t, r) => {
65
+ }, Mt = (t) => t[0] === "{", kr = (t) => t !== null && typeof t == "object" && "isEmpty" in t, br = (t, r) => {
66
66
  t.update(
67
67
  () => {
68
68
  const e = K();
@@ -74,7 +74,7 @@ const mr = ({
74
74
  tag: r
75
75
  }
76
76
  );
77
- }, br = (t, r, e) => {
77
+ }, Mr = (t, r, e) => {
78
78
  r.update(
79
79
  () => {
80
80
  const n = K();
@@ -86,7 +86,7 @@ const mr = ({
86
86
  tag: e
87
87
  }
88
88
  ), r.blur();
89
- }, Bn = async (t, r, e) => {
89
+ }, Pn = async (t, r, e) => {
90
90
  var l;
91
91
  let n = 0;
92
92
  const i = At({
@@ -118,7 +118,7 @@ const mr = ({
118
118
  return i.read(() => {
119
119
  a = zt(i);
120
120
  }), { html: a, trimCount: n };
121
- }, Pn = (t, r, e) => {
121
+ }, Fn = (t, r, e) => {
122
122
  let n = 0;
123
123
  const i = At({
124
124
  nodes: r,
@@ -152,7 +152,7 @@ const mr = ({
152
152
  } catch {
153
153
  }
154
154
  return { html: a, trimCount: n };
155
- };
155
+ }, Hn = (t) => xe().map(({ node: r }) => r).filter((r) => t.some((e) => r instanceof e));
156
156
  class X extends P {
157
157
  static getType() {
158
158
  return "target-link";
@@ -181,12 +181,12 @@ class X extends P {
181
181
  return P.importJSON(r);
182
182
  }
183
183
  }
184
- const oe = $e({
184
+ const oe = He({
185
185
  hasFocus: !1,
186
186
  editorRef: { current: null },
187
187
  signUrl: void 0,
188
188
  fileUpload: void 0
189
- }), Mr = ({ onBlur: t }) => {
189
+ }), Cr = ({ onBlur: t }) => {
190
190
  const [r, e] = b(!1), n = Y(null), i = T(() => {
191
191
  e(!0), n.current && window.clearTimeout(n.current);
192
192
  }, []), a = T(() => {
@@ -201,8 +201,8 @@ const oe = $e({
201
201
  onBlur: a
202
202
  }
203
203
  };
204
- }, z = () => De(oe);
205
- function Cr({
204
+ }, z = () => Ue(oe);
205
+ function vr({
206
206
  src: t,
207
207
  altText: r,
208
208
  width: e,
@@ -244,7 +244,7 @@ function Cr({
244
244
  };
245
245
  return l ? /* @__PURE__ */ u(H, { css: { position: "relative", display: "inline-block" }, children: [
246
246
  /* @__PURE__ */ u(
247
- Pe,
247
+ je,
248
248
  {
249
249
  css: {
250
250
  position: "absolute",
@@ -266,7 +266,7 @@ function Cr({
266
266
  css: { width: "20px", height: "20px" },
267
267
  onClick: E,
268
268
  color: "danger",
269
- children: /* @__PURE__ */ o(Ge, {})
269
+ children: /* @__PURE__ */ o(Qe, {})
270
270
  }
271
271
  ),
272
272
  /* @__PURE__ */ o(
@@ -276,7 +276,7 @@ function Cr({
276
276
  size: "sm",
277
277
  css: { width: "20px", height: "20px" },
278
278
  onClick: S,
279
- children: /* @__PURE__ */ o(Ye, {})
279
+ children: /* @__PURE__ */ o(Ve, {})
280
280
  }
281
281
  ),
282
282
  /* @__PURE__ */ o(
@@ -286,7 +286,7 @@ function Cr({
286
286
  size: "sm",
287
287
  css: { width: "20px", height: "20px" },
288
288
  onClick: M,
289
- children: /* @__PURE__ */ o(qe, {})
289
+ children: /* @__PURE__ */ o(Ze, {})
290
290
  }
291
291
  )
292
292
  ]
@@ -309,7 +309,7 @@ function Cr({
309
309
  )
310
310
  ] }) : /* @__PURE__ */ o("span", {});
311
311
  }
312
- function vr(t) {
312
+ function Tr(t) {
313
313
  const r = t, { alt: e, src: n, width: i, height: a } = r;
314
314
  return { node: Ct({ altText: e, height: a, src: n, width: i }) };
315
315
  }
@@ -353,7 +353,7 @@ class $ extends ue {
353
353
  static importDOM() {
354
354
  return {
355
355
  img: (e) => ({
356
- conversion: vr,
356
+ conversion: Tr,
357
357
  priority: 0
358
358
  })
359
359
  };
@@ -395,7 +395,7 @@ class $ extends ue {
395
395
  }
396
396
  decorate() {
397
397
  return /* @__PURE__ */ o(
398
- Cr,
398
+ vr,
399
399
  {
400
400
  src: this.__src,
401
401
  altText: this.__altText,
@@ -418,30 +418,30 @@ function Ct({
418
418
  new $(e, t, n, r, i, a)
419
419
  );
420
420
  }
421
- function Fn(t) {
421
+ function Un(t) {
422
422
  return t instanceof $;
423
423
  }
424
- const Hn = [
425
- Ut,
424
+ const Wn = [
426
425
  Wt,
426
+ jt,
427
427
  ht,
428
+ Ht,
428
429
  Ft,
429
- Pt,
430
430
  P,
431
- jt,
432
431
  Kt,
433
432
  Gt,
433
+ Yt,
434
434
  $
435
- ], Un = [
436
- Ut,
435
+ ], jn = [
437
436
  Wt,
437
+ jt,
438
438
  ht,
439
+ Ht,
439
440
  Ft,
440
- Pt,
441
441
  P,
442
- jt,
443
442
  Kt,
444
443
  Gt,
444
+ Yt,
445
445
  $,
446
446
  X,
447
447
  {
@@ -452,70 +452,70 @@ const Hn = [
452
452
  )
453
453
  }
454
454
  ];
455
- function Tr(t) {
455
+ function _r(t) {
456
456
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 6l16 0" } }, { tag: "path", attr: { d: "M8 12l8 0" } }, { tag: "path", attr: { d: "M6 18l12 0" } }] })(t);
457
457
  }
458
458
  function St(t) {
459
459
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 6l16 0" } }, { tag: "path", attr: { d: "M4 12l10 0" } }, { tag: "path", attr: { d: "M4 18l14 0" } }] })(t);
460
460
  }
461
- function _r(t) {
461
+ function Lr(t) {
462
462
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 6l16 0" } }, { tag: "path", attr: { d: "M10 12l10 0" } }, { tag: "path", attr: { d: "M6 18l14 0" } }] })(t);
463
463
  }
464
- function Lr(t) {
464
+ function xr(t) {
465
465
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 5h6a3.5 3.5 0 0 1 0 7h-6z" } }, { tag: "path", attr: { d: "M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7" } }] })(t);
466
466
  }
467
- function xr(t) {
467
+ function wr(t) {
468
468
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 8l-4 4l4 4" } }, { tag: "path", attr: { d: "M17 8l4 4l-4 4" } }, { tag: "path", attr: { d: "M14 4l-4 16" } }] })(t);
469
469
  }
470
- function wr(t) {
470
+ function yr(t) {
471
471
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 18v-8l-2 2" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
472
472
  }
473
- function yr(t) {
473
+ function Nr(t) {
474
474
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
475
475
  }
476
- function Nr(t) {
476
+ function Sr(t) {
477
477
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 14a2 2 0 1 0 -2 -2" } }, { tag: "path", attr: { d: "M17 16a2 2 0 1 0 2 -2" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
478
478
  }
479
- function Sr(t) {
479
+ function Er(t) {
480
480
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M20 18v-8l-4 6h5" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
481
481
  }
482
- function Er(t) {
482
+ function Rr(t) {
483
483
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17 18h2a2 2 0 1 0 0 -4h-2v-4h4" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
484
484
  }
485
- function Rr(t) {
485
+ function Ir(t) {
486
486
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z" } }, { tag: "path", attr: { d: "M21 12a2 2 0 1 0 -4 0v4" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
487
487
  }
488
- function Ir(t) {
488
+ function Or(t) {
489
489
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M11 5l6 0" } }, { tag: "path", attr: { d: "M7 19l6 0" } }, { tag: "path", attr: { d: "M14 5l-4 14" } }] })(t);
490
490
  }
491
- function Or(t) {
491
+ function Ar(t) {
492
492
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17.5 15.5m-3.5 0a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0" } }, { tag: "path", attr: { d: "M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5" } }, { tag: "path", attr: { d: "M3 13h7" } }, { tag: "path", attr: { d: "M21 12v7" } }] })(t);
493
493
  }
494
- function Ar(t) {
494
+ function zr(t) {
495
495
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" } }, { tag: "path", attr: { d: "M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" } }] })(t);
496
496
  }
497
- function zr(t) {
497
+ function $r(t) {
498
498
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M3.5 5.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M3.5 11.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M3.5 17.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M11 6l9 0" } }, { tag: "path", attr: { d: "M11 12l9 0" } }, { tag: "path", attr: { d: "M11 18l9 0" } }] })(t);
499
499
  }
500
- function $r(t) {
500
+ function Dr(t) {
501
501
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M11 6h9" } }, { tag: "path", attr: { d: "M11 12h9" } }, { tag: "path", attr: { d: "M12 18h8" } }, { tag: "path", attr: { d: "M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4" } }, { tag: "path", attr: { d: "M6 10v-6l-2 2" } }] })(t);
502
502
  }
503
- function Dr(t) {
503
+ function Br(t) {
504
504
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M9 6l11 0" } }, { tag: "path", attr: { d: "M9 12l11 0" } }, { tag: "path", attr: { d: "M9 18l11 0" } }, { tag: "path", attr: { d: "M5 6l0 .01" } }, { tag: "path", attr: { d: "M5 12l0 .01" } }, { tag: "path", attr: { d: "M5 18l0 .01" } }] })(t);
505
505
  }
506
- function Br(t) {
506
+ function Pr(t) {
507
507
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M10 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" } }, { tag: "path", attr: { d: "M19 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" } }] })(t);
508
508
  }
509
- function Pr(t) {
509
+ function Fr(t) {
510
510
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M5 7l8 10m-8 0l8 -10" } }, { tag: "path", attr: { d: "M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2" } }] })(t);
511
511
  }
512
- function Fr(t) {
512
+ function Hr(t) {
513
513
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" } }, { tag: "path", attr: { d: "M4 10l16 0" } }, { tag: "path", attr: { d: "M10 4l0 16" } }] })(t);
514
514
  }
515
- function Hr(t) {
515
+ function Ur(t) {
516
516
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 5v5a5 5 0 0 0 10 0v-5" } }, { tag: "path", attr: { d: "M5 19h14" } }] })(t);
517
517
  }
518
- const Ur = cr("div", {
518
+ const Wr = dr("div", {
519
519
  width: "10rem",
520
520
  display: "flex"
521
521
  }), ie = {
@@ -530,22 +530,22 @@ const Ur = cr("div", {
530
530
  paragraph: "Normal",
531
531
  quote: "Sitat",
532
532
  check: "Avkrysningsliste"
533
- }, Wr = {
534
- bullet: /* @__PURE__ */ o(Dr, { size: "1.25rem" }),
535
- h1: /* @__PURE__ */ o(wr, { size: "1.25rem" }),
536
- h2: /* @__PURE__ */ o(yr, { size: "1.25rem" }),
537
- h3: /* @__PURE__ */ o(Nr, { size: "1.25rem" }),
538
- h4: /* @__PURE__ */ o(Sr, { size: "1.25rem" }),
539
- h5: /* @__PURE__ */ o(Er, { size: "1.25rem" }),
540
- h6: /* @__PURE__ */ o(Rr, { size: "1.25rem" }),
541
- number: /* @__PURE__ */ o($r, { size: "1.25rem" }),
542
- check: /* @__PURE__ */ o(zr, { size: "1.25rem" }),
543
- paragraph: /* @__PURE__ */ o(Or, { size: "1.25rem" }),
544
- quote: /* @__PURE__ */ o(Br, { size: "1.25rem" })
533
+ }, jr = {
534
+ bullet: /* @__PURE__ */ o(Br, { size: "1.25rem" }),
535
+ h1: /* @__PURE__ */ o(yr, { size: "1.25rem" }),
536
+ h2: /* @__PURE__ */ o(Nr, { size: "1.25rem" }),
537
+ h3: /* @__PURE__ */ o(Sr, { size: "1.25rem" }),
538
+ h4: /* @__PURE__ */ o(Er, { size: "1.25rem" }),
539
+ h5: /* @__PURE__ */ o(Rr, { size: "1.25rem" }),
540
+ h6: /* @__PURE__ */ o(Ir, { size: "1.25rem" }),
541
+ number: /* @__PURE__ */ o(Dr, { size: "1.25rem" }),
542
+ check: /* @__PURE__ */ o($r, { size: "1.25rem" }),
543
+ paragraph: /* @__PURE__ */ o(Ar, { size: "1.25rem" }),
544
+ quote: /* @__PURE__ */ o(Pr, { size: "1.25rem" })
545
545
  }, w = ({
546
546
  blockType: t
547
547
  }) => /* @__PURE__ */ u(W, { children: [
548
- /* @__PURE__ */ o(H, { css: { display: "flex", flex: "0 0 auto" }, children: Wr[t] }),
548
+ /* @__PURE__ */ o(H, { css: { display: "flex", flex: "0 0 auto" }, children: jr[t] }),
549
549
  /* @__PURE__ */ o(
550
550
  H,
551
551
  {
@@ -558,11 +558,11 @@ const Ur = cr("div", {
558
558
  children: ie[t]
559
559
  }
560
560
  )
561
- ] }), jr = (t) => {
561
+ ] }), Kr = (t) => {
562
562
  if (!N(t))
563
563
  return null;
564
564
  const r = t.anchor.getNode();
565
- let e = r.getKey() === "root" ? r : re(r, (n) => {
565
+ let e = r.getKey() === "root" ? r : Pt(r, (n) => {
566
566
  const i = n.getParent();
567
567
  return i !== null && $t(i);
568
568
  });
@@ -570,24 +570,24 @@ const Ur = cr("div", {
570
570
  anchorNode: r,
571
571
  element: e
572
572
  };
573
- }, Kr = () => {
573
+ }, Gr = () => {
574
574
  const [t] = x(), [r, e] = b("paragraph");
575
575
  _(() => t.registerCommand(
576
576
  G,
577
577
  () => {
578
- const c = y(), h = jr(c);
578
+ const c = y(), h = Kr(c);
579
579
  if (!h)
580
580
  return !1;
581
581
  const { element: g, anchorNode: k } = h, E = g.getKey();
582
582
  if (t.getElementByKey(E) !== null)
583
583
  if (ut(g)) {
584
- const M = ir(
584
+ const M = we(
585
585
  k,
586
586
  ht
587
587
  ), p = M ? M.getListType() : g.getListType();
588
588
  e(p);
589
589
  } else {
590
- const M = Ne(g) ? g.getTag() : g.getType();
590
+ const M = Oe(g) ? g.getTag() : g.getType();
591
591
  M in ie && e(M);
592
592
  }
593
593
  return !1;
@@ -597,11 +597,11 @@ const Ur = cr("div", {
597
597
  const n = (c) => {
598
598
  r !== c && t.update(() => {
599
599
  const h = y();
600
- N(h) && (at(h, () => Se(c)), e(c));
600
+ N(h) && (at(h, () => Ae(c)), e(c));
601
601
  });
602
602
  };
603
- return /* @__PURE__ */ o(Ur, { children: /* @__PURE__ */ u(
604
- tt,
603
+ return /* @__PURE__ */ o(Wr, { children: /* @__PURE__ */ u(
604
+ et,
605
605
  {
606
606
  trigger: /* @__PURE__ */ o(
607
607
  gt,
@@ -627,29 +627,29 @@ const Ur = cr("div", {
627
627
  /* @__PURE__ */ o(v, { onClick: () => n("h5"), children: /* @__PURE__ */ o(w, { blockType: "h5" }) }),
628
628
  /* @__PURE__ */ o(v, { onClick: () => n("h6"), children: /* @__PURE__ */ o(w, { blockType: "h6" }) }),
629
629
  /* @__PURE__ */ o(v, { onClick: () => {
630
- r !== "bullet" && (t.dispatchCommand(xe, void 0), e("bullet"));
630
+ r !== "bullet" && (t.dispatchCommand(Ee, void 0), e("bullet"));
631
631
  }, children: /* @__PURE__ */ o(w, { blockType: "bullet" }) }),
632
632
  /* @__PURE__ */ o(v, { onClick: () => {
633
- r !== "number" && (t.dispatchCommand(we, void 0), e("number"));
633
+ r !== "number" && (t.dispatchCommand(Re, void 0), e("number"));
634
634
  }, children: /* @__PURE__ */ o(w, { blockType: "number" }) }),
635
635
  /* @__PURE__ */ o(v, { onClick: () => {
636
- r !== "check" && (t.dispatchCommand(Ht, void 0), e("check"));
636
+ r !== "check" && (t.dispatchCommand(Ut, void 0), e("check"));
637
637
  }, children: /* @__PURE__ */ o(w, { blockType: "check" }) }),
638
638
  /* @__PURE__ */ o(v, { onClick: () => {
639
639
  r !== "quote" && t.update(() => {
640
640
  const c = y();
641
- N(c) && (at(c, () => Ee()), e("quote"));
641
+ N(c) && (at(c, () => ze()), e("quote"));
642
642
  });
643
643
  }, children: /* @__PURE__ */ o(w, { blockType: "quote" }) })
644
644
  ]
645
645
  }
646
646
  ) });
647
- }, Gr = () => {
647
+ }, Yr = () => {
648
648
  const [t] = x(), [r, e] = b(!1), [n, i] = b(!1), [a, l] = b(!1), [s, d] = b(!1), [c, h] = b(!1), g = T(() => {
649
649
  const m = y();
650
650
  N(m) && (e(m.hasFormat("bold")), i(m.hasFormat("italic")), l(m.hasFormat("underline")), d(m.hasFormat("code")), h(m.hasFormat("superscript")));
651
651
  }, []);
652
- _(() => rt(
652
+ _(() => Z(
653
653
  t.registerCommand(
654
654
  G,
655
655
  () => (g(), !1),
@@ -676,25 +676,25 @@ const Ur = cr("div", {
676
676
  ), p = T(
677
677
  () => t.dispatchCommand(j, "superscript"),
678
678
  [t]
679
- ), C = Yt(() => {
679
+ ), C = qt(() => {
680
680
  const m = [];
681
681
  return r && m.push("bold"), n && m.push("italic"), a && m.push("underline"), s && m.push("code"), c && m.push("superscript"), m;
682
682
  }, [r, n, a, s, c]);
683
683
  return /* @__PURE__ */ u(
684
- qt,
684
+ Jt,
685
685
  {
686
686
  type: "multiple",
687
687
  "aria-label": "Tekstformattering",
688
688
  value: C,
689
689
  children: [
690
- /* @__PURE__ */ o(B, { onClick: k, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ o(Lr, { size: "1.25rem" }) }),
690
+ /* @__PURE__ */ o(B, { onClick: k, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ o(xr, { size: "1.25rem" }) }),
691
691
  /* @__PURE__ */ o(
692
692
  B,
693
693
  {
694
694
  onClick: E,
695
695
  title: "Kursiv tekst",
696
696
  value: "italic",
697
- children: /* @__PURE__ */ o(Ir, { size: "1.25rem" })
697
+ children: /* @__PURE__ */ o(Or, { size: "1.25rem" })
698
698
  }
699
699
  ),
700
700
  /* @__PURE__ */ o(
@@ -703,41 +703,41 @@ const Ur = cr("div", {
703
703
  onClick: S,
704
704
  title: "Understreket tekst",
705
705
  value: "underline",
706
- children: /* @__PURE__ */ o(Hr, { size: "1.25rem" })
706
+ children: /* @__PURE__ */ o(Ur, { size: "1.25rem" })
707
707
  }
708
708
  ),
709
- /* @__PURE__ */ o(B, { onClick: M, title: "Kode", value: "code", children: /* @__PURE__ */ o(xr, { size: "1.25rem" }) }),
709
+ /* @__PURE__ */ o(B, { onClick: M, title: "Kode", value: "code", children: /* @__PURE__ */ o(wr, { size: "1.25rem" }) }),
710
710
  /* @__PURE__ */ o(
711
711
  B,
712
712
  {
713
713
  onClick: p,
714
714
  title: "Superscript",
715
715
  value: "superscript",
716
- children: /* @__PURE__ */ o(Pr, { size: "1.25rem" })
716
+ children: /* @__PURE__ */ o(Fr, { size: "1.25rem" })
717
717
  }
718
718
  )
719
719
  ]
720
720
  }
721
721
  );
722
- }, Yr = ({ children: t }) => {
722
+ }, qr = ({ children: t }) => {
723
723
  const { hasFocus: r, editorRef: e } = z(), n = r, [i, a] = b(n);
724
- Be(() => {
724
+ We(() => {
725
725
  a(n);
726
726
  }, [n]);
727
727
  const { context: l, refs: s, floatingStyles: d } = ft({
728
728
  placement: "top",
729
- whileElementsMounted: Qt,
729
+ whileElementsMounted: Vt,
730
730
  middleware: [
731
- tr({
731
+ ir({
732
732
  apply: ({ rects: h, elements: g }) => {
733
733
  g.floating.style.minWidth = `${h.reference.width}px`;
734
734
  }
735
735
  }),
736
- er(),
737
- Vt({
736
+ ar(),
737
+ Zt({
738
738
  mainAxis: 8
739
739
  }),
740
- rr({
740
+ lr({
741
741
  padding: 8
742
742
  })
743
743
  ],
@@ -746,13 +746,13 @@ const Ur = cr("div", {
746
746
  elements: {
747
747
  reference: e.current
748
748
  }
749
- }), { getFloatingProps: c } = Zt([
750
- te(l, {
749
+ }), { getFloatingProps: c } = te([
750
+ ee(l, {
751
751
  role: "dialog"
752
752
  })
753
753
  ]);
754
- return i ? /* @__PURE__ */ o(ee, { children: /* @__PURE__ */ o(
755
- Jt,
754
+ return i ? /* @__PURE__ */ o(re, { children: /* @__PURE__ */ o(
755
+ Xt,
756
756
  {
757
757
  ref: s.setFloating,
758
758
  style: d,
@@ -763,24 +763,24 @@ const Ur = cr("div", {
763
763
  overflow: "hidden",
764
764
  boxShadow: "$md"
765
765
  },
766
- children: /* @__PURE__ */ o(qr, { children: t })
766
+ children: /* @__PURE__ */ o(Jr, { children: t })
767
767
  }
768
768
  ) }) : null;
769
- }, qr = ({
769
+ }, Jr = ({
770
770
  children: t,
771
771
  ...r
772
- }) => /* @__PURE__ */ u(Fe, { "aria-label": "Formattering", ...r, children: [
773
- /* @__PURE__ */ o(Kr, {}),
774
- /* @__PURE__ */ o(He, {}),
772
+ }) => /* @__PURE__ */ u(Ke, { "aria-label": "Formattering", ...r, children: [
775
773
  /* @__PURE__ */ o(Gr, {}),
774
+ /* @__PURE__ */ o(Ge, {}),
775
+ /* @__PURE__ */ o(Yr, {}),
776
776
  t
777
777
  ] });
778
- function Jr() {
778
+ function Xr() {
779
779
  const [t] = x();
780
- return _(() => rt(
780
+ return _(() => Z(
781
781
  t.registerCommand(
782
- Ht,
783
- () => (ye(t, "check"), !0),
782
+ Ut,
783
+ () => (Ie(t, "check"), !0),
784
784
  R
785
785
  ),
786
786
  t.registerCommand(
@@ -822,7 +822,7 @@ function Jr() {
822
822
  if (N(e) && e.isCollapsed()) {
823
823
  const { anchor: n } = e, i = n.type === "element";
824
824
  if (i || n.offset === 0) {
825
- const a = n.getNode(), l = re(
825
+ const a = n.getNode(), l = Pt(
826
826
  a,
827
827
  (s) => be(s) && !s.isInline()
828
828
  );
@@ -847,10 +847,10 @@ function Jr() {
847
847
  }
848
848
  function ae(t, r) {
849
849
  const e = t.target;
850
- if (e === null || !Nt(e))
850
+ if (e === null || !xt(e))
851
851
  return;
852
852
  const n = e.firstChild;
853
- if (n != null && Nt(n) && (n.tagName === "UL" || n.tagName === "OL"))
853
+ if (n != null && xt(n) && (n.tagName === "UL" || n.tagName === "OL"))
854
854
  return;
855
855
  const i = e.parentNode;
856
856
  if (!i || i.__lexicalListType !== "check")
@@ -860,7 +860,7 @@ function ae(t, r) {
860
860
  }
861
861
  function Et(t) {
862
862
  ae(t, () => {
863
- const r = t.target, e = Xr(r);
863
+ const r = t.target, e = Qr(r);
864
864
  e != null && e.isEditable() && e.update(() => {
865
865
  if (t.target) {
866
866
  const n = dt(r);
@@ -874,7 +874,7 @@ function Rt(t) {
874
874
  t.preventDefault();
875
875
  });
876
876
  }
877
- function Xr(t) {
877
+ function Qr(t) {
878
878
  let r = t;
879
879
  for (; r; ) {
880
880
  if (r.__lexicalEditor)
@@ -888,7 +888,7 @@ function st() {
888
888
  return t != null && t.tagName === "LI" && t.parentNode != null && // @ts-ignore internal field
889
889
  t.parentNode.__lexicalListType === "check" ? t : null;
890
890
  }
891
- function Qr(t, r) {
891
+ function Vr(t, r) {
892
892
  let e = r ? t.getPreviousSibling() : t.getNextSibling(), n = t;
893
893
  for (; e == null && F(n); )
894
894
  n = n.getParentOrThrow().getParent(), n != null && (e = r ? n.getPreviousSibling() : n.getNextSibling());
@@ -906,7 +906,7 @@ function It(t, r, e) {
906
906
  const i = dt(n);
907
907
  if (!F(i))
908
908
  return;
909
- const a = Qr(i, e);
909
+ const a = Vr(i, e);
910
910
  if (a != null) {
911
911
  a.selectStart();
912
912
  const l = r.getElementByKey(a.__key);
@@ -917,43 +917,43 @@ function It(t, r, e) {
917
917
  }), !1;
918
918
  }
919
919
  const vt = Me("INSERT_IMAGE_COMMAND");
920
- function Vr() {
920
+ function Zr() {
921
921
  const [t] = kt();
922
922
  return _(() => {
923
923
  if (!t.hasNodes([$]))
924
924
  throw new Error("ImagePlugin: ImageNode not registered on editor");
925
- return rt(
925
+ return Z(
926
926
  t.registerCommand(
927
927
  vt,
928
928
  (r) => {
929
929
  const e = Ct(r);
930
- return Ce([e]), $t(e.getParentOrThrow()) && ar(e, U).selectEnd(), !0;
930
+ return Ce([e]), $t(e.getParentOrThrow()) && ye(e, U).selectEnd(), !0;
931
931
  },
932
932
  ve
933
933
  )
934
934
  );
935
935
  }, [t]), null;
936
936
  }
937
- const Zr = () => /* @__PURE__ */ u(W, { children: [
938
- /* @__PURE__ */ o(hr, {}),
939
- /* @__PURE__ */ o(gr, {}),
937
+ const tn = () => /* @__PURE__ */ u(W, { children: [
940
938
  /* @__PURE__ */ o(ur, {}),
941
- /* @__PURE__ */ o(Jr, {}),
942
939
  /* @__PURE__ */ o(pr, {}),
943
- /* @__PURE__ */ o(Vr, {})
944
- ] }), tn = ({
940
+ /* @__PURE__ */ o(gr, {}),
941
+ /* @__PURE__ */ o(Xr, {}),
942
+ /* @__PURE__ */ o(mr, {}),
943
+ /* @__PURE__ */ o(Zr, {})
944
+ ] }), en = ({
945
945
  state: t
946
946
  }) => {
947
947
  const [r] = x(), e = Y(!1);
948
948
  return _(() => {
949
949
  !t || e.current || (e.current = !0, window.queueMicrotask(() => {
950
950
  try {
951
- if (fr(t)) {
952
- t.isEmpty() ? kr(r) : r.setEditorState(t);
951
+ if (kr(t)) {
952
+ t.isEmpty() ? br(r) : r.setEditorState(t);
953
953
  return;
954
954
  }
955
955
  if (typeof t == "string" && !Mt(t)) {
956
- br(t, r);
956
+ Mr(t, r);
957
957
  return;
958
958
  }
959
959
  const n = r.parseEditorState(t);
@@ -963,7 +963,7 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
963
963
  }
964
964
  }));
965
965
  }, []), null;
966
- }, en = Ue("div", {
966
+ }, rn = Ye("div", {
967
967
  border: "1px solid $borderDarker",
968
968
  borderRadius: "$md",
969
969
  position: "relative",
@@ -1000,7 +1000,7 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1000
1000
  }
1001
1001
  }
1002
1002
  ]
1003
- }), rn = ({
1003
+ }), nn = ({
1004
1004
  isLoading: t
1005
1005
  }) => /* @__PURE__ */ o(
1006
1006
  H,
@@ -1014,7 +1014,7 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1014
1014
  },
1015
1015
  children: /* @__PURE__ */ o(pt, {})
1016
1016
  }
1017
- ), Wn = ({
1017
+ ), Kn = ({
1018
1018
  isLoading: t,
1019
1019
  children: r,
1020
1020
  placeholderText: e,
@@ -1030,12 +1030,12 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1030
1030
  signUrl: k,
1031
1031
  fileUpload: E
1032
1032
  }) => {
1033
- const { hasFocus: S, attributes: M } = Mr({ onBlur: c }), p = Y(null), C = Yt(
1033
+ const { hasFocus: S, attributes: M } = Cr({ onBlur: c }), p = Y(null), C = qt(
1034
1034
  () => ({ hasFocus: S, editorRef: p, signUrl: k, fileUpload: E }),
1035
1035
  [S, k, E]
1036
1036
  );
1037
1037
  return /* @__PURE__ */ o(oe.Provider, { value: C, children: /* @__PURE__ */ u(
1038
- Qe,
1038
+ rr,
1039
1039
  {
1040
1040
  initialConfig: {
1041
1041
  namespace: "ain-rich-text",
@@ -1048,7 +1048,7 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1048
1048
  },
1049
1049
  children: [
1050
1050
  /* @__PURE__ */ u(
1051
- en,
1051
+ rn,
1052
1052
  {
1053
1053
  ref: p,
1054
1054
  hasFocus: S,
@@ -1058,7 +1058,7 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1058
1058
  children: [
1059
1059
  a,
1060
1060
  /* @__PURE__ */ o(
1061
- Ve,
1061
+ nr,
1062
1062
  {
1063
1063
  contentEditable: s,
1064
1064
  placeholder: e ? /* @__PURE__ */ o(
@@ -1075,22 +1075,22 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1075
1075
  children: e
1076
1076
  }
1077
1077
  ) : null,
1078
- ErrorBoundary: Ze
1078
+ ErrorBoundary: or
1079
1079
  }
1080
1080
  ),
1081
- /* @__PURE__ */ o(Zr, {}),
1081
+ /* @__PURE__ */ o(tn, {}),
1082
1082
  i,
1083
- /* @__PURE__ */ o(rn, { isLoading: t }),
1084
- !a && /* @__PURE__ */ o(Yr, { children: l })
1083
+ /* @__PURE__ */ o(nn, { isLoading: t }),
1084
+ !a && /* @__PURE__ */ o(qr, { children: l })
1085
1085
  ]
1086
1086
  }
1087
1087
  ),
1088
- /* @__PURE__ */ o(tn, { state: h }),
1088
+ /* @__PURE__ */ o(en, { state: h }),
1089
1089
  /* @__PURE__ */ o(W, { children: r })
1090
1090
  ]
1091
1091
  }
1092
1092
  ) });
1093
- }, nn = {
1093
+ }, on = {
1094
1094
  fontSize: "1rem",
1095
1095
  lineHeight: "1.5",
1096
1096
  "h1, h2, h3, h4, h5, h6": {
@@ -1284,7 +1284,7 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1284
1284
  defaultVariants: {
1285
1285
  size: "md"
1286
1286
  }
1287
- }, jn = dr(nn), on = ({
1287
+ }, Gn = hr(on), an = ({
1288
1288
  fileUpload: t,
1289
1289
  ...r
1290
1290
  }) => {
@@ -1305,8 +1305,8 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1305
1305
  meta: { width: n.width, height: n.height }
1306
1306
  }), r.onOpenChange(!1));
1307
1307
  };
1308
- return /* @__PURE__ */ u(Xt, { ...r, children: [
1309
- /* @__PURE__ */ o(We, { children: "Sett inn bilde" }),
1308
+ return /* @__PURE__ */ u(Qt, { ...r, children: [
1309
+ /* @__PURE__ */ o(qe, { children: "Sett inn bilde" }),
1310
1310
  t.isLoading && /* @__PURE__ */ o(pt, {}),
1311
1311
  /* @__PURE__ */ o(
1312
1312
  mt,
@@ -1317,7 +1317,7 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1317
1317
  disabled: t.isLoading
1318
1318
  }
1319
1319
  ),
1320
- /* @__PURE__ */ u(et, { children: [
1320
+ /* @__PURE__ */ u(rt, { children: [
1321
1321
  /* @__PURE__ */ o(L, { onClick: () => r.onOpenChange(!1), children: "Avbryt" }),
1322
1322
  /* @__PURE__ */ o(
1323
1323
  L,
@@ -1330,9 +1330,9 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1330
1330
  )
1331
1331
  ] })
1332
1332
  ] });
1333
- }, Kn = () => {
1333
+ }, Yn = () => {
1334
1334
  const [t] = x(), { fileUpload: r } = z(), [e, n] = b(!1), i = T(() => {
1335
- t.dispatchCommand(Ie, {
1335
+ t.dispatchCommand(De, {
1336
1336
  rows: "3",
1337
1337
  columns: "3",
1338
1338
  includeHeaders: !1
@@ -1340,25 +1340,25 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1340
1340
  }, [t]);
1341
1341
  return /* @__PURE__ */ u(W, { children: [
1342
1342
  /* @__PURE__ */ u(
1343
- tt,
1343
+ et,
1344
1344
  {
1345
1345
  trigger: /* @__PURE__ */ o(gt, { dropdown: !0, children: "Sett inn" }),
1346
1346
  side: "bottom",
1347
1347
  align: "end",
1348
1348
  children: [
1349
1349
  /* @__PURE__ */ u(v, { onClick: i, children: [
1350
- /* @__PURE__ */ o(Fr, { size: "1.25rem" }),
1350
+ /* @__PURE__ */ o(Hr, { size: "1.25rem" }),
1351
1351
  " Tabell"
1352
1352
  ] }),
1353
1353
  r && /* @__PURE__ */ u(v, { onClick: () => n(!0), children: [
1354
- /* @__PURE__ */ o(Je, { size: "1.25rem" }),
1354
+ /* @__PURE__ */ o(tr, { size: "1.25rem" }),
1355
1355
  " Bilde"
1356
1356
  ] })
1357
1357
  ]
1358
1358
  }
1359
1359
  ),
1360
1360
  r && /* @__PURE__ */ o(
1361
- on,
1361
+ an,
1362
1362
  {
1363
1363
  open: e,
1364
1364
  onOpenChange: n,
@@ -1367,10 +1367,10 @@ const Zr = () => /* @__PURE__ */ u(W, { children: [
1367
1367
  )
1368
1368
  ] });
1369
1369
  };
1370
- function an(t) {
1370
+ function ln(t) {
1371
1371
  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);
1372
1372
  }
1373
- const Gn = () => {
1373
+ const qn = () => {
1374
1374
  const [t] = x(), [r, e] = b(null), { hasFocus: n } = z();
1375
1375
  _(() => {
1376
1376
  !n && r && e(null);
@@ -1381,14 +1381,14 @@ const Gn = () => {
1381
1381
  elements: {
1382
1382
  reference: r
1383
1383
  },
1384
- middleware: [Vt({ mainAxis: -20, crossAxis: -2 })]
1384
+ middleware: [Zt({ mainAxis: -20, crossAxis: -2 })]
1385
1385
  });
1386
1386
  _(() => t.registerCommand(
1387
1387
  G,
1388
1388
  () => {
1389
1389
  const s = y();
1390
1390
  if (N(s)) {
1391
- const d = s.anchor.getNode(), c = Oe(d);
1391
+ const d = s.anchor.getNode(), c = Be(d);
1392
1392
  e(c ? t.getElementByKey(c.getKey()) : null);
1393
1393
  }
1394
1394
  return !1;
@@ -1399,28 +1399,28 @@ const Gn = () => {
1399
1399
  t.update(() => {
1400
1400
  switch (s) {
1401
1401
  case "add-row-over":
1402
- wt(!1);
1402
+ yt(!1);
1403
1403
  break;
1404
1404
  case "add-row-under":
1405
- wt(!0);
1405
+ yt(!0);
1406
1406
  break;
1407
1407
  case "add-column-left":
1408
- xt(!1);
1408
+ wt(!1);
1409
1409
  break;
1410
1410
  case "add-column-right":
1411
- xt(!0);
1411
+ wt(!0);
1412
1412
  break;
1413
1413
  case "delete-row":
1414
- ze();
1414
+ Fe();
1415
1415
  break;
1416
1416
  case "delete-column":
1417
- Ae();
1417
+ Pe();
1418
1418
  break;
1419
1419
  }
1420
1420
  });
1421
1421
  };
1422
1422
  return r ? /* @__PURE__ */ u(
1423
- tt,
1423
+ et,
1424
1424
  {
1425
1425
  trigger: /* @__PURE__ */ o(
1426
1426
  L,
@@ -1431,16 +1431,16 @@ const Gn = () => {
1431
1431
  ref: i.setFloating,
1432
1432
  style: a,
1433
1433
  css: { padding: "2px", width: "18px", height: "18px" },
1434
- children: /* @__PURE__ */ o(an, {})
1434
+ children: /* @__PURE__ */ o(ln, {})
1435
1435
  }
1436
1436
  ),
1437
1437
  children: [
1438
1438
  /* @__PURE__ */ o(D, { onClick: l("add-row-over"), children: "Legg til rad over" }),
1439
1439
  /* @__PURE__ */ o(D, { onClick: l("add-row-under"), children: "Legg til rad under" }),
1440
- /* @__PURE__ */ o(yt, {}),
1440
+ /* @__PURE__ */ o(Nt, {}),
1441
1441
  /* @__PURE__ */ o(D, { onClick: l("add-column-left"), children: "Legg til kolonne venstre" }),
1442
1442
  /* @__PURE__ */ o(D, { onClick: l("add-column-right"), children: "Legg til kolonne høyre" }),
1443
- /* @__PURE__ */ o(yt, {}),
1443
+ /* @__PURE__ */ o(Nt, {}),
1444
1444
  /* @__PURE__ */ o(D, { onClick: l("delete-row"), children: "Fjern rad" }),
1445
1445
  /* @__PURE__ */ o(D, { onClick: l("delete-column"), children: "Fjern kolonne" })
1446
1446
  ]
@@ -1456,7 +1456,7 @@ function le(t) {
1456
1456
  const r = t.anchor, e = t.focus, n = t.anchor.getNode(), i = t.focus.getNode();
1457
1457
  return n === i ? n : t.isBackward() ? Lt(e) ? n : i : Lt(r) ? n : i;
1458
1458
  }
1459
- const Yn = (t) => (A.baseURL = t, A), Q = class extends P {
1459
+ const Jn = (t) => (A.baseURL = t, A), Q = class extends P {
1460
1460
  static getType() {
1461
1461
  return "rutine_link";
1462
1462
  }
@@ -1491,10 +1491,10 @@ O(A, "baseURL", "");
1491
1491
  function se(t) {
1492
1492
  return new A(t);
1493
1493
  }
1494
- function ln(t) {
1494
+ function sn(t) {
1495
1495
  return t instanceof A;
1496
1496
  }
1497
- const sn = ({ onClose: t }) => {
1497
+ const cn = ({ onClose: t }) => {
1498
1498
  const [r] = x(), e = T(
1499
1499
  (i) => {
1500
1500
  r.update(() => {
@@ -1505,7 +1505,7 @@ const sn = ({ onClose: t }) => {
1505
1505
  const s = Bt();
1506
1506
  s.setTextNodeRange(l, 0, l, i.length), V(s);
1507
1507
  }
1508
- r.dispatchCommand(Z, Tt(i));
1508
+ r.dispatchCommand(tt, Tt(i));
1509
1509
  });
1510
1510
  },
1511
1511
  [r]
@@ -1514,12 +1514,12 @@ const sn = ({ onClose: t }) => {
1514
1514
  e(i.currentTarget.url.value), t();
1515
1515
  }, children: [
1516
1516
  /* @__PURE__ */ o(mt, { name: "url", label: "URL", type: "url", required: !0 }),
1517
- /* @__PURE__ */ u(et, { children: [
1517
+ /* @__PURE__ */ u(rt, { children: [
1518
1518
  /* @__PURE__ */ o(L, { onClick: t, children: "Avbryt" }),
1519
1519
  /* @__PURE__ */ o(L, { type: "submit", variant: "primary", children: "Sett inn" })
1520
1520
  ] })
1521
1521
  ] });
1522
- }, cn = ({
1522
+ }, dn = ({
1523
1523
  onClose: t,
1524
1524
  getDocs: r
1525
1525
  }) => {
@@ -1541,14 +1541,14 @@ const sn = ({ onClose: t }) => {
1541
1541
  );
1542
1542
  return /* @__PURE__ */ u(W, { children: [
1543
1543
  /* @__PURE__ */ o(
1544
- Ke,
1544
+ Xe,
1545
1545
  {
1546
1546
  isMulti: !0,
1547
1547
  options: a,
1548
1548
  onChange: (s) => i(s)
1549
1549
  }
1550
1550
  ),
1551
- /* @__PURE__ */ u(et, { children: [
1551
+ /* @__PURE__ */ u(rt, { children: [
1552
1552
  /* @__PURE__ */ o(L, { onClick: t, children: "Avbryt" }),
1553
1553
  /* @__PURE__ */ o(
1554
1554
  L,
@@ -1562,7 +1562,7 @@ const sn = ({ onClose: t }) => {
1562
1562
  )
1563
1563
  ] })
1564
1564
  ] });
1565
- }, dn = ({
1565
+ }, hn = ({
1566
1566
  onClose: t,
1567
1567
  fileUpload: r,
1568
1568
  filePrefix: e
@@ -1588,7 +1588,7 @@ const sn = ({ onClose: t }) => {
1588
1588
  const h = Bt();
1589
1589
  h.setTextNodeRange(c, 0, c, i.name.length), V(h);
1590
1590
  }
1591
- n.dispatchCommand(Z, Tt(i.url));
1591
+ n.dispatchCommand(tt, Tt(i.url));
1592
1592
  });
1593
1593
  }, [n, i]);
1594
1594
  return /* @__PURE__ */ u(W, { children: [
@@ -1601,7 +1601,7 @@ const sn = ({ onClose: t }) => {
1601
1601
  disabled: r.isLoading
1602
1602
  }
1603
1603
  ),
1604
- /* @__PURE__ */ u(et, { children: [
1604
+ /* @__PURE__ */ u(rt, { children: [
1605
1605
  /* @__PURE__ */ o(L, { onClick: t, children: "Avbryt" }),
1606
1606
  /* @__PURE__ */ o(
1607
1607
  L,
@@ -1616,7 +1616,7 @@ const sn = ({ onClose: t }) => {
1616
1616
  )
1617
1617
  ] })
1618
1618
  ] });
1619
- }, hn = ({
1619
+ }, un = ({
1620
1620
  open: t,
1621
1621
  onOpenChange: r,
1622
1622
  getDocs: e,
@@ -1625,8 +1625,8 @@ const sn = ({ onClose: t }) => {
1625
1625
  const { fileUpload: i } = z(), [a, l] = b("url"), s = () => {
1626
1626
  r(!1);
1627
1627
  };
1628
- return /* @__PURE__ */ u(Xt, { open: t, onOpenChange: r, css: { width: "600px" }, children: [
1629
- /* @__PURE__ */ u(je, { css: { marginBottom: "$8" }, children: [
1628
+ return /* @__PURE__ */ u(Qt, { open: t, onOpenChange: r, css: { width: "600px" }, children: [
1629
+ /* @__PURE__ */ u(Je, { css: { marginBottom: "$8" }, children: [
1630
1630
  /* @__PURE__ */ o(lt, { active: a === "url", onClick: () => l("url"), children: "URL" }),
1631
1631
  e && /* @__PURE__ */ o(
1632
1632
  lt,
@@ -1638,10 +1638,10 @@ const sn = ({ onClose: t }) => {
1638
1638
  ),
1639
1639
  i && /* @__PURE__ */ o(lt, { active: a === "file", onClick: () => l("file"), children: "Fil" })
1640
1640
  ] }),
1641
- a === "url" && /* @__PURE__ */ o(sn, { onClose: s }),
1642
- a === "rutine" && e && /* @__PURE__ */ o(cn, { onClose: s, getDocs: e }),
1641
+ a === "url" && /* @__PURE__ */ o(cn, { onClose: s }),
1642
+ a === "rutine" && e && /* @__PURE__ */ o(dn, { onClose: s, getDocs: e }),
1643
1643
  a === "file" && i && /* @__PURE__ */ o(
1644
- dn,
1644
+ hn,
1645
1645
  {
1646
1646
  onClose: s,
1647
1647
  fileUpload: i,
@@ -1649,7 +1649,7 @@ const sn = ({ onClose: t }) => {
1649
1649
  }
1650
1650
  )
1651
1651
  ] });
1652
- }, qn = ({
1652
+ }, Xn = ({
1653
1653
  getDocs: t,
1654
1654
  filePrefix: r
1655
1655
  }) => {
@@ -1664,20 +1664,20 @@ const sn = ({ onClose: t }) => {
1664
1664
  G,
1665
1665
  () => (s(), !1),
1666
1666
  ct
1667
- ), [e, s]), /* @__PURE__ */ u(qt, { type: "single", value: n ? "link" : "", children: [
1667
+ ), [e, s]), /* @__PURE__ */ u(Jt, { type: "single", value: n ? "link" : "", children: [
1668
1668
  /* @__PURE__ */ o(
1669
1669
  B,
1670
1670
  {
1671
1671
  onClick: () => {
1672
- n ? e.dispatchCommand(Z, null) : l(!0);
1672
+ n ? e.dispatchCommand(tt, null) : l(!0);
1673
1673
  },
1674
1674
  title: "Lenke",
1675
1675
  value: "link",
1676
- children: /* @__PURE__ */ o(Ar, { size: "1.25rem" })
1676
+ children: /* @__PURE__ */ o(zr, { size: "1.25rem" })
1677
1677
  }
1678
1678
  ),
1679
1679
  /* @__PURE__ */ o(
1680
- hn,
1680
+ un,
1681
1681
  {
1682
1682
  open: a,
1683
1683
  onOpenChange: l,
@@ -1686,7 +1686,7 @@ const sn = ({ onClose: t }) => {
1686
1686
  }
1687
1687
  )
1688
1688
  ] });
1689
- }, Jn = () => {
1689
+ }, Qn = () => {
1690
1690
  const [t] = x(), r = Y(null), [e, n] = b(null), [i, a] = b(""), { hasFocus: l } = z();
1691
1691
  _(() => {
1692
1692
  e ? t.update(() => {
@@ -1697,14 +1697,14 @@ const sn = ({ onClose: t }) => {
1697
1697
  placement: "top",
1698
1698
  strategy: "fixed",
1699
1699
  open: s,
1700
- whileElementsMounted: Qt,
1700
+ whileElementsMounted: Vt,
1701
1701
  elements: {
1702
1702
  reference: r.current
1703
1703
  },
1704
- middleware: [nr()]
1705
- }), { getFloatingProps: g } = Zt([
1706
- te(h),
1707
- or(h)
1704
+ middleware: [sr()]
1705
+ }), { getFloatingProps: g } = te([
1706
+ ee(h),
1707
+ cr(h)
1708
1708
  ]), k = T(() => {
1709
1709
  var p;
1710
1710
  const M = y();
@@ -1718,15 +1718,15 @@ const sn = ({ onClose: t }) => {
1718
1718
  n(q);
1719
1719
  }
1720
1720
  }, [t]), E = T(() => {
1721
- e && ln(e) && t.update(() => {
1721
+ e && sn(e) && t.update(() => {
1722
1722
  e.remove();
1723
- }), t.dispatchCommand(Z, null);
1723
+ }), t.dispatchCommand(tt, null);
1724
1724
  }, [t, e]);
1725
1725
  if (_(() => {
1726
1726
  t.getEditorState().read(() => {
1727
1727
  k();
1728
1728
  });
1729
- }, [t, k]), _(() => rt(
1729
+ }, [t, k]), _(() => Z(
1730
1730
  t.registerUpdateListener(({ editorState: M }) => {
1731
1731
  M.read(() => {
1732
1732
  k();
@@ -1745,8 +1745,8 @@ const sn = ({ onClose: t }) => {
1745
1745
  ), [t, k, e]), !s)
1746
1746
  return null;
1747
1747
  const S = Tt(i);
1748
- return /* @__PURE__ */ o(ee, { children: /* @__PURE__ */ u(
1749
- Jt,
1748
+ return /* @__PURE__ */ o(re, { children: /* @__PURE__ */ u(
1749
+ Xt,
1750
1750
  {
1751
1751
  ref: d.setFloating,
1752
1752
  css: {
@@ -1777,14 +1777,14 @@ const sn = ({ onClose: t }) => {
1777
1777
  children: i
1778
1778
  }
1779
1779
  ),
1780
- /* @__PURE__ */ o(L, { color: "danger", icon: !0, size: "sm", onClick: E, children: /* @__PURE__ */ o(Xe, { size: 24 }) })
1780
+ /* @__PURE__ */ o(L, { color: "danger", icon: !0, size: "sm", onClick: E, children: /* @__PURE__ */ o(er, { size: 24 }) })
1781
1781
  ]
1782
1782
  }
1783
1783
  ) });
1784
- }, Xn = () => {
1784
+ }, Vn = () => {
1785
1785
  const [t] = kt();
1786
1786
  return /* @__PURE__ */ u(
1787
- tt,
1787
+ et,
1788
1788
  {
1789
1789
  align: "end",
1790
1790
  trigger: /* @__PURE__ */ o(gt, { dropdown: !0, children: /* @__PURE__ */ o(St, { size: "1.25rem" }) }),
@@ -1804,7 +1804,7 @@ const sn = ({ onClose: t }) => {
1804
1804
  {
1805
1805
  onClick: () => t.dispatchCommand(it, "center"),
1806
1806
  children: [
1807
- /* @__PURE__ */ o(Tr, { size: "1.25rem" }),
1807
+ /* @__PURE__ */ o(_r, { size: "1.25rem" }),
1808
1808
  "Midt"
1809
1809
  ]
1810
1810
  }
@@ -1814,7 +1814,7 @@ const sn = ({ onClose: t }) => {
1814
1814
  {
1815
1815
  onClick: () => t.dispatchCommand(it, "right"),
1816
1816
  children: [
1817
- /* @__PURE__ */ o(_r, { size: "1.25rem" }),
1817
+ /* @__PURE__ */ o(Lr, { size: "1.25rem" }),
1818
1818
  "Høyre"
1819
1819
  ]
1820
1820
  }
@@ -1822,17 +1822,17 @@ const sn = ({ onClose: t }) => {
1822
1822
  ]
1823
1823
  }
1824
1824
  );
1825
- }, Ot = ["image/"], Qn = () => {
1825
+ }, Ot = ["image/"], Zn = () => {
1826
1826
  const [t] = kt(), { fileUpload: r } = z();
1827
1827
  return _(() => t.registerCommand(
1828
- Re,
1828
+ $e,
1829
1829
  (e) => ((async () => {
1830
- const n = await lr(
1830
+ const n = await Ne(
1831
1831
  e,
1832
1832
  [Ot].flatMap((i) => i)
1833
1833
  );
1834
1834
  for (const { file: i, result: a } of n)
1835
- if (sr(i, Ot)) {
1835
+ if (Se(i, Ot)) {
1836
1836
  let l = a;
1837
1837
  const s = new Image(), d = window.URL.createObjectURL(i);
1838
1838
  s.onload = async () => {
@@ -1850,32 +1850,33 @@ const sn = ({ onClose: t }) => {
1850
1850
  export {
1851
1851
  Ct as $createImageNode,
1852
1852
  se as $createRutineLinkNode,
1853
- Fn as $isImageNode,
1854
- ln as $isRutineLinkNode,
1855
- Xn as AlignToolbarDropdown,
1856
- Qn as DragDropPastePlugin,
1857
- Yr as FloatingToolbar,
1853
+ Hn as $getNodesOfTypes,
1854
+ Un as $isImageNode,
1855
+ sn as $isRutineLinkNode,
1856
+ Vn as AlignToolbarDropdown,
1857
+ Zn as DragDropPastePlugin,
1858
+ qr as FloatingToolbar,
1858
1859
  $ as ImageNode,
1859
- Kn as InsertSelector,
1860
- Jn as LinkEditPlugin,
1860
+ Yn as InsertSelector,
1861
+ Qn as LinkEditPlugin,
1861
1862
  X as LinkTargetNode,
1862
- qn as LinkToolbarButton,
1863
- Wn as RichTextEditor,
1864
- qr as RichTextToolbar,
1863
+ Xn as LinkToolbarButton,
1864
+ Kn as RichTextEditor,
1865
+ Jr as RichTextToolbar,
1865
1866
  A as RutineLinkNode,
1866
- Yn as RutineLinkNodeInit,
1867
- Gn as TableEditPlugin,
1868
- kr as clearEditorState,
1869
- Hn as defaultNodes,
1870
- Un as defaultViewNodes,
1871
- fr as isEditorState,
1867
+ Jn as RutineLinkNodeInit,
1868
+ qn as TableEditPlugin,
1869
+ br as clearEditorState,
1870
+ Wn as defaultNodes,
1871
+ jn as defaultViewNodes,
1872
+ kr as isEditorState,
1872
1873
  Mt as isJSON,
1873
1874
  oe as richTextContext,
1874
- jn as richTextCss,
1875
- nn as richTextStyleObj,
1876
- br as setStateFromPlainText,
1877
- Bn as stateToHTML,
1878
- Pn as syncStateToHTML,
1879
- Mr as useHasFocusWithin,
1875
+ Gn as richTextCss,
1876
+ on as richTextStyleObj,
1877
+ Mr as setStateFromPlainText,
1878
+ Pn as stateToHTML,
1879
+ Fn as syncStateToHTML,
1880
+ Cr as useHasFocusWithin,
1880
1881
  z as useRichTextContext
1881
1882
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkitektbedriftene/fe-lib",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {