@arkitektbedriftene/fe-lib 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,15 @@
1
1
  /// <reference types="react" />
2
- export declare const LinkToolbarButton: ({ getDocs, uploadFile }: {
3
- getDocs: any;
4
- uploadFile: any;
2
+ type UploadFile = {
3
+ uploadFile: ({ file }: {
4
+ file: File;
5
+ }) => Promise<string>;
6
+ isLoading: boolean;
7
+ };
8
+ export declare const LinkToolbarButton: ({ getDocs, uploadFile, }: {
9
+ getDocs?: (() => {
10
+ label: string;
11
+ value: string;
12
+ }[]) | undefined;
13
+ uploadFile?: UploadFile | undefined;
5
14
  }) => JSX.Element;
15
+ export {};
@@ -1,25 +1,25 @@
1
1
  var Jt = Object.defineProperty;
2
2
  var Xt = (t, e, r) => e in t ? Jt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var ut = (t, e, r) => (Xt(t, typeof e != "symbol" ? e + "" : e, r), r);
3
+ var ht = (t, e, r) => (Xt(t, typeof e != "symbol" ? e + "" : e, r), r);
4
4
  import { createHeadlessEditor as Qt } from "@lexical/headless";
5
5
  import { $generateHtmlFromNodes as Vt } from "@lexical/html";
6
- import { $getRoot as q, ParagraphNode as Zt, $createParagraphNode as Y, $createTextNode as D, $setSelection as Ct, SELECTION_CHANGE_COMMAND as P, $getSelection as L, COMMAND_PRIORITY_CRITICAL as Z, $isRangeSelection as T, $isRootOrShadowRoot as te, FORMAT_TEXT_COMMAND as B, COMMAND_PRIORITY_LOW as _, KEY_ARROW_DOWN_COMMAND as ee, KEY_ARROW_UP_COMMAND as re, KEY_ESCAPE_COMMAND as Mt, KEY_SPACE_COMMAND as ne, $getNearestNodeFromDOMNode as tt, KEY_ARROW_LEFT_COMMAND as oe, $isElementNode as ie, COMMAND_PRIORITY_NORMAL as ae, $isParagraphNode as Lt, COMMAND_PRIORITY_HIGH as le } from "lexical";
7
- import { trimTextContentFromAnchor as se, $setBlocksType as X, $isAtNodeEnd as ht } from "@lexical/selection";
8
- import { LinkNode as O, AutoLinkNode as Tt, $isLinkNode as W, TOGGLE_LINK_COMMAND as G } from "@lexical/link";
9
- import { ListNode as et, ListItemNode as yt, $isListNode as rt, INSERT_UNORDERED_LIST_COMMAND as ce, INSERT_ORDERED_LIST_COMMAND as de, INSERT_CHECK_LIST_COMMAND as xt, insertList as ue, $isListItemNode as $ } from "@lexical/list";
6
+ import { $getRoot as q, ParagraphNode as Zt, $createParagraphNode as Y, $createTextNode as I, $setSelection as G, SELECTION_CHANGE_COMMAND as F, $getSelection as T, COMMAND_PRIORITY_CRITICAL as tt, $isRangeSelection as L, $isRootOrShadowRoot as te, FORMAT_TEXT_COMMAND as D, COMMAND_PRIORITY_LOW as _, KEY_ARROW_DOWN_COMMAND as ee, KEY_ARROW_UP_COMMAND as re, KEY_ESCAPE_COMMAND as Mt, KEY_SPACE_COMMAND as ne, $getNearestNodeFromDOMNode as et, KEY_ARROW_LEFT_COMMAND as oe, $isElementNode as ie, COMMAND_PRIORITY_NORMAL as ae, $createRangeSelection as Tt, COMMAND_PRIORITY_HIGH as le } from "lexical";
7
+ import { trimTextContentFromAnchor as se, $setBlocksType as Q, $isAtNodeEnd as pt } from "@lexical/selection";
8
+ import { LinkNode as $, AutoLinkNode as Lt, $isLinkNode as W, TOGGLE_LINK_COMMAND as J } from "@lexical/link";
9
+ import { ListNode as rt, ListItemNode as yt, $isListNode as nt, INSERT_UNORDERED_LIST_COMMAND as ce, INSERT_ORDERED_LIST_COMMAND as de, INSERT_CHECK_LIST_COMMAND as xt, insertList as ue, $isListItemNode as A } from "@lexical/list";
10
10
  import { HeadingNode as Nt, QuoteNode as St, $isHeadingNode as he, $createHeadingNode as pe, $createQuoteNode as ge } from "@lexical/rich-text";
11
- import { TableNode as wt, TableRowNode as Et, TableCellNode as _t, INSERT_TABLE_COMMAND as fe, $getTableCellNodeFromLexicalNode as me, $deleteTableColumn__EXPERIMENTAL as ke, $deleteTableRow__EXPERIMENTAL as be, $insertTableColumn__EXPERIMENTAL as pt, $insertTableRow__EXPERIMENTAL as gt } from "@lexical/table";
11
+ import { TableNode as wt, TableRowNode as Et, TableCellNode as _t, INSERT_TABLE_COMMAND as fe, $getTableCellNodeFromLexicalNode as me, $deleteTableColumn__EXPERIMENTAL as ke, $deleteTableRow__EXPERIMENTAL as be, $insertTableColumn__EXPERIMENTAL as gt, $insertTableRow__EXPERIMENTAL as ft } from "@lexical/table";
12
12
  import { jsx as n, jsxs as p, Fragment as H } from "react/jsx-runtime";
13
- import { createContext as ve, useState as k, useRef as nt, useCallback as v, useContext as Ce, useEffect as x, useMemo as Rt, useLayoutEffect as Me } from "react";
14
- import { DropdownMenu as ot, ToolbarButton as It, DropdownMenuIconItem as M, Box as F, ToolbarToggleGroup as zt, ToolbarToggleItem as z, OverlayCard as Ot, Toolbar as Le, ToolbarSeparator as Te, styled as ye, Spinner as $t, Button as w, DropdownMenuItem as I, DropdownMenuSeparator as ft, Dialog as xe, NavBar as Ne, NavBarItem as Q, TextInput as Se, DialogActions as it, Combobox as we } from "./ui.es.js";
13
+ import { createContext as ve, useState as k, useRef as ot, useCallback as v, useContext as Ce, useEffect as x, useMemo as Rt, useLayoutEffect as Me } from "react";
14
+ import { DropdownMenu as it, ToolbarButton as It, DropdownMenuIconItem as M, Box as P, ToolbarToggleGroup as zt, ToolbarToggleItem as O, OverlayCard as Ot, Toolbar as Te, ToolbarSeparator as Le, styled as ye, Spinner as $t, Button as w, DropdownMenuItem as z, DropdownMenuSeparator as mt, Dialog as xe, NavBar as Ne, NavBarItem as V, TextInput as Se, DialogActions as at, Combobox as we } from "./ui.es.js";
15
15
  import { LexicalComposer as Ee } from "@lexical/react/LexicalComposer.js";
16
16
  import { RichTextPlugin as _e } from "@lexical/react/LexicalRichTextPlugin.js";
17
17
  import Re from "@lexical/react/LexicalErrorBoundary.js";
18
- import { useFloating as at, autoUpdate as At, size as Ie, flip as ze, offset as Bt, shift as Oe, useInteractions as Dt, useRole as Ft, FloatingPortal as Pt, inline as $e, useDismiss as Ae } from "@floating-ui/react";
18
+ import { useFloating as lt, autoUpdate as At, size as Ie, flip as ze, offset as Bt, shift as Oe, useInteractions as Dt, useRole as Pt, FloatingPortal as Ft, inline as $e, useDismiss as Ae } from "@floating-ui/react";
19
19
  import { useLexicalComposerContext as y } from "@lexical/react/LexicalComposerContext.js";
20
- import { $getNearestNodeOfType as Be, $findMatchingParent as Ht, mergeRegister as lt, isHTMLElement as mt } from "@lexical/utils";
20
+ import { $getNearestNodeOfType as Be, $findMatchingParent as Ht, mergeRegister as st, isHTMLElement as kt } from "@lexical/utils";
21
21
  import { G as g, e as De } from "./index.esm-67eba761.js";
22
- import { s as Fe, c as Pe } from "./stitches.config-00c23cdb.js";
22
+ import { s as Pe, c as Fe } from "./stitches.config-00c23cdb.js";
23
23
  import { ListPlugin as He } from "@lexical/react/LexicalListPlugin.js";
24
24
  import { HistoryPlugin as Ue } from "@lexical/react/LexicalHistoryPlugin.js";
25
25
  import { TablePlugin as We } from "@lexical/react/LexicalTablePlugin.js";
@@ -67,7 +67,7 @@ const Ke = ({
67
67
  const r = q();
68
68
  r.clear();
69
69
  const o = Y();
70
- o.append(D("")), r.append(o), Ct(null);
70
+ o.append(I("")), r.append(o), G(null);
71
71
  },
72
72
  {
73
73
  tag: e
@@ -79,7 +79,7 @@ const Ke = ({
79
79
  const o = q();
80
80
  o.clear();
81
81
  const i = Y();
82
- i.append(D(t.trim())), o.append(i), Ct(null);
82
+ i.append(I(t.trim())), o.append(i), G(null);
83
83
  },
84
84
  {
85
85
  tag: r
@@ -97,7 +97,7 @@ const Ke = ({
97
97
  if (typeof t == "string" && !Wt(t))
98
98
  i.update(() => {
99
99
  const a = q(), s = Y();
100
- s.append(D(t.trim())), a.append(s);
100
+ s.append(I(t.trim())), a.append(s);
101
101
  });
102
102
  else {
103
103
  const a = i.parseEditorState(t, () => {
@@ -117,7 +117,7 @@ const Ke = ({
117
117
  r != null && r.updateFn && ((a = r.updateFn) == null || a.call(r)), l = Vt(i);
118
118
  }), { html: l, trimCount: o };
119
119
  };
120
- class j extends O {
120
+ class j extends $ {
121
121
  static getType() {
122
122
  return "target-link";
123
123
  }
@@ -142,39 +142,39 @@ class j extends O {
142
142
  return super.exportJSON();
143
143
  }
144
144
  static importJSON(e) {
145
- return O.importJSON(e);
145
+ return $.importJSON(e);
146
146
  }
147
147
  }
148
148
  const cn = [
149
149
  Nt,
150
150
  St,
151
- et,
151
+ rt,
152
152
  yt,
153
- Tt,
154
- O,
153
+ Lt,
154
+ $,
155
155
  wt,
156
156
  Et,
157
157
  _t
158
158
  ], dn = [
159
159
  Nt,
160
160
  St,
161
- et,
161
+ rt,
162
162
  yt,
163
- Tt,
164
- O,
163
+ Lt,
164
+ $,
165
165
  wt,
166
166
  Et,
167
167
  _t,
168
168
  j,
169
169
  {
170
- replace: O,
170
+ replace: $,
171
171
  with: (t) => new j(
172
172
  t.getURL(),
173
173
  { rel: t.__rel, target: t.__target, title: t.__title }
174
174
  )
175
175
  }
176
176
  ], jt = ve({ hasFocus: !1, editorRef: { current: null } }), Xe = ({ onBlur: t }) => {
177
- const [e, r] = k(!1), o = nt(null), i = v(() => {
177
+ const [e, r] = k(!1), o = ot(null), i = v(() => {
178
178
  r(!0), o.current && window.clearTimeout(o.current);
179
179
  }, []), l = v(() => {
180
180
  o.current = window.setTimeout(() => {
@@ -188,7 +188,7 @@ const cn = [
188
188
  onBlur: l
189
189
  }
190
190
  };
191
- }, st = () => Ce(jt);
191
+ }, ct = () => Ce(jt);
192
192
  function Qe(t) {
193
193
  return g({ 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);
194
194
  }
@@ -243,7 +243,7 @@ function pr(t) {
243
243
  function gr(t) {
244
244
  return g({ 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);
245
245
  }
246
- const fr = Fe("div", {
246
+ const fr = Pe("div", {
247
247
  width: "10rem",
248
248
  display: "flex"
249
249
  }), Kt = {
@@ -273,9 +273,9 @@ const fr = Fe("div", {
273
273
  }, C = ({
274
274
  blockType: t
275
275
  }) => /* @__PURE__ */ p(H, { children: [
276
- /* @__PURE__ */ n(F, { css: { display: "flex", flex: "0 0 auto" }, children: mr[t] }),
276
+ /* @__PURE__ */ n(P, { css: { display: "flex", flex: "0 0 auto" }, children: mr[t] }),
277
277
  /* @__PURE__ */ n(
278
- F,
278
+ P,
279
279
  {
280
280
  css: {
281
281
  flex: "1 1 auto",
@@ -287,7 +287,7 @@ const fr = Fe("div", {
287
287
  }
288
288
  )
289
289
  ] }), kr = (t) => {
290
- if (!T(t))
290
+ if (!L(t))
291
291
  return null;
292
292
  const e = t.anchor.getNode();
293
293
  let r = e.getKey() === "root" ? e : Ht(e, (o) => {
@@ -301,17 +301,17 @@ const fr = Fe("div", {
301
301
  }, br = () => {
302
302
  const [t] = y(), [e, r] = k("paragraph");
303
303
  x(() => t.registerCommand(
304
- P,
304
+ F,
305
305
  () => {
306
- const c = L(), u = kr(c);
306
+ const c = T(), u = kr(c);
307
307
  if (!u)
308
308
  return !1;
309
309
  const { element: h, anchorNode: m } = u, E = h.getKey();
310
310
  if (t.getElementByKey(E) !== null)
311
- if (rt(h)) {
311
+ if (nt(h)) {
312
312
  const b = Be(
313
313
  m,
314
- et
314
+ rt
315
315
  ), S = b ? b.getListType() : h.getListType();
316
316
  r(S);
317
317
  } else {
@@ -320,16 +320,16 @@ const fr = Fe("div", {
320
320
  }
321
321
  return !1;
322
322
  },
323
- Z
323
+ tt
324
324
  ), [t]);
325
325
  const o = (c) => {
326
326
  e !== c && t.update(() => {
327
- const u = L();
328
- T(u) && (X(u, () => pe(c)), r(c));
327
+ const u = T();
328
+ L(u) && (Q(u, () => pe(c)), r(c));
329
329
  });
330
330
  };
331
331
  return /* @__PURE__ */ n(fr, { children: /* @__PURE__ */ p(
332
- ot,
332
+ it,
333
333
  {
334
334
  trigger: /* @__PURE__ */ n(
335
335
  It,
@@ -344,8 +344,8 @@ const fr = Fe("div", {
344
344
  children: [
345
345
  /* @__PURE__ */ n(M, { onClick: () => {
346
346
  e !== "paragraph" && t.update(() => {
347
- const c = L();
348
- T(c) && (X(c, () => Y()), r("paragraph"));
347
+ const c = T();
348
+ L(c) && (Q(c, () => Y()), r("paragraph"));
349
349
  });
350
350
  }, children: /* @__PURE__ */ n(C, { blockType: "paragraph" }) }),
351
351
  /* @__PURE__ */ n(M, { onClick: () => o("h1"), children: /* @__PURE__ */ n(C, { blockType: "h1" }) }),
@@ -365,8 +365,8 @@ const fr = Fe("div", {
365
365
  }, children: /* @__PURE__ */ n(C, { blockType: "check" }) }),
366
366
  /* @__PURE__ */ n(M, { onClick: () => {
367
367
  e !== "quote" && t.update(() => {
368
- const c = L();
369
- T(c) && (X(c, () => ge()), r("quote"));
368
+ const c = T();
369
+ L(c) && (Q(c, () => ge()), r("quote"));
370
370
  });
371
371
  }, children: /* @__PURE__ */ n(C, { blockType: "quote" }) })
372
372
  ]
@@ -374,14 +374,14 @@ const fr = Fe("div", {
374
374
  ) });
375
375
  }, vr = () => {
376
376
  const [t] = y(), [e, r] = k(!1), [o, i] = k(!1), [l, a] = k(!1), [s, d] = k(!1), [c, u] = k(!1), h = v(() => {
377
- const f = L();
378
- T(f) && (r(f.hasFormat("bold")), i(f.hasFormat("italic")), a(f.hasFormat("underline")), d(f.hasFormat("code")), u(f.hasFormat("superscript")));
377
+ const f = T();
378
+ L(f) && (r(f.hasFormat("bold")), i(f.hasFormat("italic")), a(f.hasFormat("underline")), d(f.hasFormat("code")), u(f.hasFormat("superscript")));
379
379
  }, []);
380
- x(() => lt(
380
+ x(() => st(
381
381
  t.registerCommand(
382
- P,
382
+ F,
383
383
  () => (h(), !1),
384
- Z
384
+ tt
385
385
  ),
386
386
  t.registerUpdateListener(({ editorState: f }) => {
387
387
  f.read(() => {
@@ -390,21 +390,21 @@ const fr = Fe("div", {
390
390
  })
391
391
  ), [t, h]);
392
392
  const m = v(
393
- () => t.dispatchCommand(B, "bold"),
393
+ () => t.dispatchCommand(D, "bold"),
394
394
  [t]
395
395
  ), E = v(
396
- () => t.dispatchCommand(B, "italic"),
396
+ () => t.dispatchCommand(D, "italic"),
397
397
  [t]
398
398
  ), N = v(
399
- () => t.dispatchCommand(B, "underline"),
399
+ () => t.dispatchCommand(D, "underline"),
400
400
  [t]
401
401
  ), b = v(
402
- () => t.dispatchCommand(B, "code"),
402
+ () => t.dispatchCommand(D, "code"),
403
403
  [t]
404
404
  ), S = v(
405
- () => t.dispatchCommand(B, "superscript"),
405
+ () => t.dispatchCommand(D, "superscript"),
406
406
  [t]
407
- ), A = Rt(() => {
407
+ ), B = Rt(() => {
408
408
  const f = [];
409
409
  return e && f.push("bold"), o && f.push("italic"), l && f.push("underline"), s && f.push("code"), c && f.push("superscript"), f;
410
410
  }, [e, o, l, s, c]);
@@ -413,11 +413,11 @@ const fr = Fe("div", {
413
413
  {
414
414
  type: "multiple",
415
415
  "aria-label": "Tekstformattering",
416
- value: A,
416
+ value: B,
417
417
  children: [
418
- /* @__PURE__ */ n(z, { onClick: m, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ n(Qe, { size: "1.25rem" }) }),
418
+ /* @__PURE__ */ n(O, { onClick: m, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ n(Qe, { size: "1.25rem" }) }),
419
419
  /* @__PURE__ */ n(
420
- z,
420
+ O,
421
421
  {
422
422
  onClick: E,
423
423
  title: "Kursiv tekst",
@@ -426,7 +426,7 @@ const fr = Fe("div", {
426
426
  }
427
427
  ),
428
428
  /* @__PURE__ */ n(
429
- z,
429
+ O,
430
430
  {
431
431
  onClick: N,
432
432
  title: "Understreket tekst",
@@ -434,9 +434,9 @@ const fr = Fe("div", {
434
434
  children: /* @__PURE__ */ n(gr, { size: "1.25rem" })
435
435
  }
436
436
  ),
437
- /* @__PURE__ */ n(z, { onClick: b, title: "Kode", value: "code", children: /* @__PURE__ */ n(Ve, { size: "1.25rem" }) }),
437
+ /* @__PURE__ */ n(O, { onClick: b, title: "Kode", value: "code", children: /* @__PURE__ */ n(Ve, { size: "1.25rem" }) }),
438
438
  /* @__PURE__ */ n(
439
- z,
439
+ O,
440
440
  {
441
441
  onClick: S,
442
442
  title: "Superscript",
@@ -448,11 +448,11 @@ const fr = Fe("div", {
448
448
  }
449
449
  );
450
450
  }, Cr = ({ children: t }) => {
451
- const { hasFocus: e, editorRef: r } = st(), o = e, [i, l] = k(o);
451
+ const { hasFocus: e, editorRef: r } = ct(), o = e, [i, l] = k(o);
452
452
  Me(() => {
453
453
  l(o);
454
454
  }, [o]);
455
- const { context: a, refs: s, floatingStyles: d } = at({
455
+ const { context: a, refs: s, floatingStyles: d } = lt({
456
456
  placement: "top",
457
457
  whileElementsMounted: At,
458
458
  middleware: [
@@ -475,11 +475,11 @@ const fr = Fe("div", {
475
475
  reference: r.current
476
476
  }
477
477
  }), { getFloatingProps: c } = Dt([
478
- Ft(a, {
478
+ Pt(a, {
479
479
  role: "dialog"
480
480
  })
481
481
  ]);
482
- return i ? /* @__PURE__ */ n(Pt, { children: /* @__PURE__ */ n(
482
+ return i ? /* @__PURE__ */ n(Ft, { children: /* @__PURE__ */ n(
483
483
  Ot,
484
484
  {
485
485
  ref: s.setFloating,
@@ -497,15 +497,15 @@ const fr = Fe("div", {
497
497
  }, Mr = ({
498
498
  children: t,
499
499
  ...e
500
- }) => /* @__PURE__ */ p(Le, { "aria-label": "Formattering", ...e, children: [
500
+ }) => /* @__PURE__ */ p(Te, { "aria-label": "Formattering", ...e, children: [
501
501
  /* @__PURE__ */ n(br, {}),
502
- /* @__PURE__ */ n(Te, {}),
502
+ /* @__PURE__ */ n(Le, {}),
503
503
  /* @__PURE__ */ n(vr, {}),
504
504
  t
505
505
  ] });
506
- function Lr() {
506
+ function Tr() {
507
507
  const [t] = y();
508
- return x(() => lt(
508
+ return x(() => st(
509
509
  t.registerCommand(
510
510
  xt,
511
511
  () => (ue(t, "check"), !0),
@@ -513,18 +513,18 @@ function Lr() {
513
513
  ),
514
514
  t.registerCommand(
515
515
  ee,
516
- (e) => vt(e, t, !1),
516
+ (e) => Ct(e, t, !1),
517
517
  _
518
518
  ),
519
519
  t.registerCommand(
520
520
  re,
521
- (e) => vt(e, t, !0),
521
+ (e) => Ct(e, t, !0),
522
522
  _
523
523
  ),
524
524
  t.registerCommand(
525
525
  Mt,
526
526
  (e) => {
527
- if (V() != null) {
527
+ if (Z() != null) {
528
528
  const o = t.getRootElement();
529
529
  return o != null && o.focus(), !0;
530
530
  }
@@ -535,10 +535,10 @@ function Lr() {
535
535
  t.registerCommand(
536
536
  ne,
537
537
  (e) => {
538
- const r = V();
538
+ const r = Z();
539
539
  return r != null && t.isEditable() ? (t.update(() => {
540
- const o = tt(r);
541
- $(o) && (e.preventDefault(), o.toggleChecked());
540
+ const o = et(r);
541
+ A(o) && (e.preventDefault(), o.toggleChecked());
542
542
  }), !0) : !1;
543
543
  },
544
544
  _
@@ -546,17 +546,17 @@ function Lr() {
546
546
  t.registerCommand(
547
547
  oe,
548
548
  (e) => t.getEditorState().read(() => {
549
- const r = L();
550
- if (T(r) && r.isCollapsed()) {
549
+ const r = T();
550
+ if (L(r) && r.isCollapsed()) {
551
551
  const { anchor: o } = r, i = o.type === "element";
552
552
  if (i || o.offset === 0) {
553
553
  const l = o.getNode(), a = Ht(
554
554
  l,
555
555
  (s) => ie(s) && !s.isInline()
556
556
  );
557
- if ($(a)) {
557
+ if (A(a)) {
558
558
  const s = a.getParent();
559
- if (rt(s) && s.getListType() === "check" && (i || a.getFirstDescendant() === l)) {
559
+ if (nt(s) && s.getListType() === "check" && (i || a.getFirstDescendant() === l)) {
560
560
  const d = t.getElementByKey(a.__key);
561
561
  if (d != null && document.activeElement !== d)
562
562
  return d.focus(), e.preventDefault(), !0;
@@ -569,16 +569,16 @@ function Lr() {
569
569
  _
570
570
  ),
571
571
  t.registerRootListener((e, r) => {
572
- e !== null && (e.addEventListener("click", kt), e.addEventListener("pointerdown", bt)), r !== null && (r.removeEventListener("click", kt), r.removeEventListener("pointerdown", bt));
572
+ e !== null && (e.addEventListener("click", bt), e.addEventListener("pointerdown", vt)), r !== null && (r.removeEventListener("click", bt), r.removeEventListener("pointerdown", vt));
573
573
  })
574
574
  ), [t]), null;
575
575
  }
576
576
  function qt(t, e) {
577
577
  const r = t.target;
578
- if (r === null || !mt(r))
578
+ if (r === null || !kt(r))
579
579
  return;
580
580
  const o = r.firstChild;
581
- if (o != null && mt(o) && (o.tagName === "UL" || o.tagName === "OL"))
581
+ if (o != null && kt(o) && (o.tagName === "UL" || o.tagName === "OL"))
582
582
  return;
583
583
  const i = r.parentNode;
584
584
  if (!i || i.__lexicalListType !== "check")
@@ -586,23 +586,23 @@ function qt(t, e) {
586
586
  const l = t.pageX, a = r.getBoundingClientRect();
587
587
  (r.dir === "rtl" ? l < a.right && l > a.right - 20 : l > a.left && l < a.left + 20) && e();
588
588
  }
589
- function kt(t) {
589
+ function bt(t) {
590
590
  qt(t, () => {
591
- const e = t.target, r = Tr(e);
591
+ const e = t.target, r = Lr(e);
592
592
  r != null && r.isEditable() && r.update(() => {
593
593
  if (t.target) {
594
- const o = tt(e);
595
- $(o) && (e.focus(), o.toggleChecked());
594
+ const o = et(e);
595
+ A(o) && (e.focus(), o.toggleChecked());
596
596
  }
597
597
  });
598
598
  });
599
599
  }
600
- function bt(t) {
600
+ function vt(t) {
601
601
  qt(t, () => {
602
602
  t.preventDefault();
603
603
  });
604
604
  }
605
- function Tr(t) {
605
+ function Lr(t) {
606
606
  let e = t;
607
607
  for (; e; ) {
608
608
  if (e.__lexicalEditor)
@@ -611,28 +611,28 @@ function Tr(t) {
611
611
  }
612
612
  return null;
613
613
  }
614
- function V() {
614
+ function Z() {
615
615
  const t = document.activeElement;
616
616
  return t != null && t.tagName === "LI" && t.parentNode != null && // @ts-ignore internal field
617
617
  t.parentNode.__lexicalListType === "check" ? t : null;
618
618
  }
619
619
  function yr(t, e) {
620
620
  let r = e ? t.getPreviousSibling() : t.getNextSibling(), o = t;
621
- for (; r == null && $(o); )
621
+ for (; r == null && A(o); )
622
622
  o = o.getParentOrThrow().getParent(), o != null && (r = e ? o.getPreviousSibling() : o.getNextSibling());
623
- for (; $(r); ) {
623
+ for (; A(r); ) {
624
624
  const i = e ? r.getLastChild() : r.getFirstChild();
625
- if (!rt(i))
625
+ if (!nt(i))
626
626
  return r;
627
627
  r = e ? i.getLastChild() : i.getFirstChild();
628
628
  }
629
629
  return null;
630
630
  }
631
- function vt(t, e, r) {
632
- const o = V();
631
+ function Ct(t, e, r) {
632
+ const o = Z();
633
633
  return o != null && e.update(() => {
634
- const i = tt(o);
635
- if (!$(i))
634
+ const i = et(o);
635
+ if (!A(i))
636
636
  return;
637
637
  const l = yr(i, r);
638
638
  if (l != null) {
@@ -648,7 +648,7 @@ const xr = () => /* @__PURE__ */ p(H, { children: [
648
648
  /* @__PURE__ */ n(He, {}),
649
649
  /* @__PURE__ */ n(We, {}),
650
650
  /* @__PURE__ */ n(Ue, {}),
651
- /* @__PURE__ */ n(Lr, {}),
651
+ /* @__PURE__ */ n(Tr, {}),
652
652
  /* @__PURE__ */ n(je, {})
653
653
  ] }), Nr = ({
654
654
  state: t
@@ -711,7 +711,7 @@ const xr = () => /* @__PURE__ */ p(H, { children: [
711
711
  }), wr = ({
712
712
  isLoading: t
713
713
  }) => /* @__PURE__ */ n(
714
- F,
714
+ P,
715
715
  {
716
716
  css: {
717
717
  visibility: t ? "visible" : "hidden",
@@ -736,7 +736,7 @@ const xr = () => /* @__PURE__ */ p(H, { children: [
736
736
  defaultState: u,
737
737
  css: h
738
738
  }) => {
739
- const { hasFocus: m, attributes: E } = Xe({ onBlur: c }), N = nt(null), b = Rt(() => ({ hasFocus: m, editorRef: N }), [m]);
739
+ const { hasFocus: m, attributes: E } = Xe({ onBlur: c }), N = ot(null), b = Rt(() => ({ hasFocus: m, editorRef: N }), [m]);
740
740
  return /* @__PURE__ */ n(jt.Provider, { value: b, children: /* @__PURE__ */ p(
741
741
  Ee,
742
742
  {
@@ -765,7 +765,7 @@ const xr = () => /* @__PURE__ */ p(H, { children: [
765
765
  {
766
766
  contentEditable: s,
767
767
  placeholder: r ? /* @__PURE__ */ n(
768
- F,
768
+ P,
769
769
  {
770
770
  css: {
771
771
  position: "absolute",
@@ -983,7 +983,7 @@ const xr = () => /* @__PURE__ */ p(H, { children: [
983
983
  defaultVariants: {
984
984
  size: "md"
985
985
  }
986
- }, hn = Pe(Er), pn = () => {
986
+ }, hn = Fe(Er), pn = () => {
987
987
  const [t] = y(), e = v(() => {
988
988
  t.dispatchCommand(fe, {
989
989
  rows: "3",
@@ -992,7 +992,7 @@ const xr = () => /* @__PURE__ */ p(H, { children: [
992
992
  });
993
993
  }, [t]);
994
994
  return /* @__PURE__ */ n(
995
- ot,
995
+ it,
996
996
  {
997
997
  trigger: /* @__PURE__ */ n(It, { dropdown: !0, children: "Sett inn" }),
998
998
  side: "bottom",
@@ -1008,11 +1008,11 @@ function _r(t) {
1008
1008
  return g({ 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);
1009
1009
  }
1010
1010
  const gn = () => {
1011
- const [t] = y(), [e, r] = k(null), { hasFocus: o } = st();
1011
+ const [t] = y(), [e, r] = k(null), { hasFocus: o } = ct();
1012
1012
  x(() => {
1013
1013
  !o && e && r(null);
1014
1014
  }, [o, e]);
1015
- const { refs: i, floatingStyles: l } = at({
1015
+ const { refs: i, floatingStyles: l } = lt({
1016
1016
  placement: "top-end",
1017
1017
  open: !!e,
1018
1018
  elements: {
@@ -1021,10 +1021,10 @@ const gn = () => {
1021
1021
  middleware: [Bt({ mainAxis: -20, crossAxis: -2 })]
1022
1022
  });
1023
1023
  x(() => t.registerCommand(
1024
- P,
1024
+ F,
1025
1025
  () => {
1026
- const s = L();
1027
- if (T(s)) {
1026
+ const s = T();
1027
+ if (L(s)) {
1028
1028
  const d = s.anchor.getNode(), c = me(d);
1029
1029
  r(c ? t.getElementByKey(c.getKey()) : null);
1030
1030
  }
@@ -1036,16 +1036,16 @@ const gn = () => {
1036
1036
  t.update(() => {
1037
1037
  switch (s) {
1038
1038
  case "add-row-over":
1039
- gt(!1);
1039
+ ft(!1);
1040
1040
  break;
1041
1041
  case "add-row-under":
1042
- gt(!0);
1042
+ ft(!0);
1043
1043
  break;
1044
1044
  case "add-column-left":
1045
- pt(!1);
1045
+ gt(!1);
1046
1046
  break;
1047
1047
  case "add-column-right":
1048
- pt(!0);
1048
+ gt(!0);
1049
1049
  break;
1050
1050
  case "delete-row":
1051
1051
  be();
@@ -1057,7 +1057,7 @@ const gn = () => {
1057
1057
  });
1058
1058
  };
1059
1059
  return e ? /* @__PURE__ */ p(
1060
- ot,
1060
+ it,
1061
1061
  {
1062
1062
  trigger: /* @__PURE__ */ n(
1063
1063
  w,
@@ -1072,28 +1072,28 @@ const gn = () => {
1072
1072
  }
1073
1073
  ),
1074
1074
  children: [
1075
- /* @__PURE__ */ n(I, { onClick: a("add-row-over"), children: "Legg til rad over" }),
1076
- /* @__PURE__ */ n(I, { onClick: a("add-row-under"), children: "Legg til rad under" }),
1077
- /* @__PURE__ */ n(ft, {}),
1078
- /* @__PURE__ */ n(I, { onClick: a("add-column-left"), children: "Legg til kolonne venstre" }),
1079
- /* @__PURE__ */ n(I, { onClick: a("add-column-right"), children: "Legg til kolonne høyre" }),
1080
- /* @__PURE__ */ n(ft, {}),
1081
- /* @__PURE__ */ n(I, { onClick: a("delete-row"), children: "Fjern rad" }),
1082
- /* @__PURE__ */ n(I, { onClick: a("delete-column"), children: "Fjern kolonne" })
1075
+ /* @__PURE__ */ n(z, { onClick: a("add-row-over"), children: "Legg til rad over" }),
1076
+ /* @__PURE__ */ n(z, { onClick: a("add-row-under"), children: "Legg til rad under" }),
1077
+ /* @__PURE__ */ n(mt, {}),
1078
+ /* @__PURE__ */ n(z, { onClick: a("add-column-left"), children: "Legg til kolonne venstre" }),
1079
+ /* @__PURE__ */ n(z, { onClick: a("add-column-right"), children: "Legg til kolonne høyre" }),
1080
+ /* @__PURE__ */ n(mt, {}),
1081
+ /* @__PURE__ */ n(z, { onClick: a("delete-row"), children: "Fjern rad" }),
1082
+ /* @__PURE__ */ n(z, { onClick: a("delete-column"), children: "Fjern kolonne" })
1083
1083
  ]
1084
1084
  }
1085
1085
  ) : null;
1086
1086
  };
1087
- function ct(t) {
1087
+ function dt(t) {
1088
1088
  let e = t;
1089
1089
  const r = /^(?:(?: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;
1090
1090
  return e = String(e).trim(), e.match(r) || e.match(o) ? e : "https://";
1091
1091
  }
1092
1092
  function Yt(t) {
1093
1093
  const e = t.anchor, r = t.focus, o = t.anchor.getNode(), i = t.focus.getNode();
1094
- return o === i ? o : t.isBackward() ? ht(r) ? o : i : ht(e) ? o : i;
1094
+ return o === i ? o : t.isBackward() ? pt(r) ? o : i : pt(e) ? o : i;
1095
1095
  }
1096
- const fn = (t) => (R.baseURL = t, R), K = class extends O {
1096
+ const fn = (t) => (R.baseURL = t, R), K = class extends $ {
1097
1097
  static getType() {
1098
1098
  return "rutine_link";
1099
1099
  }
@@ -1124,7 +1124,7 @@ const fn = (t) => (R.baseURL = t, R), K = class extends O {
1124
1124
  }
1125
1125
  };
1126
1126
  let R = K;
1127
- ut(R, "baseURL", "");
1127
+ ht(R, "baseURL", "");
1128
1128
  function Gt(t) {
1129
1129
  return new R(t);
1130
1130
  }
@@ -1135,37 +1135,40 @@ const Ir = ({ onClose: t }) => {
1135
1135
  const [e] = y(), r = v(
1136
1136
  (i) => {
1137
1137
  e.update(() => {
1138
- const l = L();
1139
- if (T(l) && l.isCollapsed()) {
1140
- const a = l.getNodes();
1141
- if (a.length === 1) {
1142
- const s = a[0];
1143
- Lt(s) && s.getChildren().length === 0 && l.insertText(i);
1144
- }
1138
+ const l = T();
1139
+ if (L(l) && l.isCollapsed()) {
1140
+ const a = I(i);
1141
+ l.insertNodes([a]);
1142
+ const s = Tt();
1143
+ s.setTextNodeRange(a, 0, a, i.length), G(s);
1145
1144
  }
1146
- }), e.dispatchCommand(G, ct(i));
1145
+ e.dispatchCommand(J, dt(i));
1146
+ });
1147
1147
  },
1148
1148
  [e]
1149
1149
  );
1150
1150
  return /* @__PURE__ */ p("form", { onSubmit: (i) => {
1151
- r(i.target.url.value), t();
1151
+ r(i.currentTarget.url.value), t();
1152
1152
  }, children: [
1153
1153
  /* @__PURE__ */ n(Se, { name: "url", label: "URL", type: "url", required: !0 }),
1154
- /* @__PURE__ */ p(it, { children: [
1154
+ /* @__PURE__ */ p(at, { children: [
1155
1155
  /* @__PURE__ */ n(w, { onClick: t, children: "Avbryt" }),
1156
- /* @__PURE__ */ n(w, { type: "submit", variant: "primary", children: "Lagre" })
1156
+ /* @__PURE__ */ n(w, { type: "submit", variant: "primary", children: "Sett inn" })
1157
1157
  ] })
1158
1158
  ] });
1159
- }, zr = ({ onClose: t, getDocs: e }) => {
1159
+ }, zr = ({
1160
+ onClose: t,
1161
+ getDocs: e
1162
+ }) => {
1160
1163
  const [r] = y(), [o, i] = k([]), l = e(), a = v(
1161
1164
  (s) => {
1162
1165
  r.update(() => {
1163
- const d = L();
1164
- if (T(d)) {
1166
+ const d = T();
1167
+ if (L(d)) {
1165
1168
  const c = [];
1166
1169
  for (const [u, h] of s.entries()) {
1167
1170
  const m = Gt(h.value);
1168
- m.append(D(h.label)), c.push(m), u !== s.length - 1 && c.push(D(" "));
1171
+ m.append(I(h.label)), c.push(m), u !== s.length - 1 && c.push(I(" "));
1169
1172
  }
1170
1173
  d.insertNodes(c);
1171
1174
  }
@@ -1174,8 +1177,15 @@ const Ir = ({ onClose: t }) => {
1174
1177
  [r]
1175
1178
  );
1176
1179
  return /* @__PURE__ */ p(H, { children: [
1177
- /* @__PURE__ */ n(we, { isMulti: !0, options: l, onChange: i }),
1178
- /* @__PURE__ */ p(it, { children: [
1180
+ /* @__PURE__ */ n(
1181
+ we,
1182
+ {
1183
+ isMulti: !0,
1184
+ options: l,
1185
+ onChange: (s) => i(s)
1186
+ }
1187
+ ),
1188
+ /* @__PURE__ */ p(at, { children: [
1179
1189
  /* @__PURE__ */ n(w, { onClick: t, children: "Avbryt" }),
1180
1190
  /* @__PURE__ */ n(
1181
1191
  w,
@@ -1184,12 +1194,15 @@ const Ir = ({ onClose: t }) => {
1184
1194
  onClick: () => {
1185
1195
  a(o), t();
1186
1196
  },
1187
- children: "Lagre"
1197
+ children: "Sett inn"
1188
1198
  }
1189
1199
  )
1190
1200
  ] })
1191
1201
  ] });
1192
- }, Or = ({ onClose: t, uploadFile: e }) => {
1202
+ }, Or = ({
1203
+ onClose: t,
1204
+ uploadFile: e
1205
+ }) => {
1193
1206
  const [r] = y(), [o, i] = k(null), l = async (s) => {
1194
1207
  var c;
1195
1208
  const d = (c = s.target.files) == null ? void 0 : c[0];
@@ -1202,15 +1215,17 @@ const Ir = ({ onClose: t }) => {
1202
1215
  }
1203
1216
  }, a = v(() => {
1204
1217
  r.update(() => {
1205
- const s = L();
1206
- if (T(s) && s.isCollapsed()) {
1207
- const d = s.getNodes();
1208
- if (d.length === 1) {
1209
- const c = d[0];
1210
- Lt(c) && c.getChildren().length === 0 && s.insertText(o.name);
1211
- }
1218
+ if (!o)
1219
+ return;
1220
+ const s = T();
1221
+ if (L(s) && s.isCollapsed()) {
1222
+ const d = I(o.name);
1223
+ s.insertNodes([d]);
1224
+ const c = Tt();
1225
+ c.setTextNodeRange(d, 0, d, o.name.length), G(c);
1212
1226
  }
1213
- }), r.dispatchCommand(G, ct(o.url));
1227
+ r.dispatchCommand(J, dt(o.url));
1228
+ });
1214
1229
  }, [r, o]);
1215
1230
  return /* @__PURE__ */ p(H, { children: [
1216
1231
  e.isLoading && /* @__PURE__ */ n($t, {}),
@@ -1222,7 +1237,7 @@ const Ir = ({ onClose: t }) => {
1222
1237
  disabled: e.isLoading
1223
1238
  }
1224
1239
  ),
1225
- /* @__PURE__ */ p(it, { children: [
1240
+ /* @__PURE__ */ p(at, { children: [
1226
1241
  /* @__PURE__ */ n(w, { onClick: t, children: "Avbryt" }),
1227
1242
  /* @__PURE__ */ n(
1228
1243
  w,
@@ -1232,7 +1247,7 @@ const Ir = ({ onClose: t }) => {
1232
1247
  a(), t();
1233
1248
  },
1234
1249
  disabled: !o,
1235
- children: "Lagre"
1250
+ children: "Sett inn"
1236
1251
  }
1237
1252
  )
1238
1253
  ] })
@@ -1248,32 +1263,42 @@ const Ir = ({ onClose: t }) => {
1248
1263
  };
1249
1264
  return /* @__PURE__ */ p(xe, { open: t, onOpenChange: e, css: { width: "600px" }, children: [
1250
1265
  /* @__PURE__ */ p(Ne, { css: { marginBottom: "$8" }, children: [
1251
- /* @__PURE__ */ n(Q, { active: i === "url", onClick: () => l("url"), children: "URL" }),
1252
- /* @__PURE__ */ n(Q, { active: i === "rutine", onClick: () => l("rutine"), children: "Rutine" }),
1253
- /* @__PURE__ */ n(Q, { active: i === "file", onClick: () => l("file"), children: "Fil" })
1266
+ /* @__PURE__ */ n(V, { active: i === "url", onClick: () => l("url"), children: "URL" }),
1267
+ r && /* @__PURE__ */ n(
1268
+ V,
1269
+ {
1270
+ active: i === "rutine",
1271
+ onClick: () => l("rutine"),
1272
+ children: "Rutine"
1273
+ }
1274
+ ),
1275
+ o && /* @__PURE__ */ n(V, { active: i === "file", onClick: () => l("file"), children: "Fil" })
1254
1276
  ] }),
1255
1277
  i === "url" && /* @__PURE__ */ n(Ir, { onClose: a }),
1256
- i === "rutine" && /* @__PURE__ */ n(zr, { onClose: a, getDocs: r }),
1257
- i === "file" && /* @__PURE__ */ n(Or, { onClose: a, uploadFile: o })
1278
+ i === "rutine" && r && /* @__PURE__ */ n(zr, { onClose: a, getDocs: r }),
1279
+ i === "file" && o && /* @__PURE__ */ n(Or, { onClose: a, uploadFile: o })
1258
1280
  ] });
1259
- }, mn = ({ getDocs: t, uploadFile: e }) => {
1281
+ }, mn = ({
1282
+ getDocs: t,
1283
+ uploadFile: e
1284
+ }) => {
1260
1285
  const [r] = y(), [o, i] = k(!1), [l, a] = k(!1), s = v(() => {
1261
- const d = L();
1262
- if (T(d)) {
1286
+ const d = T();
1287
+ if (L(d)) {
1263
1288
  const c = Yt(d), u = c.getParent();
1264
1289
  i(W(u) || W(c));
1265
1290
  }
1266
1291
  }, []);
1267
1292
  return x(() => r.registerCommand(
1268
- P,
1293
+ F,
1269
1294
  () => (s(), !1),
1270
- Z
1295
+ tt
1271
1296
  ), [r, s]), /* @__PURE__ */ p(zt, { type: "single", value: o ? "link" : "", children: [
1272
1297
  /* @__PURE__ */ n(
1273
- z,
1298
+ O,
1274
1299
  {
1275
1300
  onClick: () => {
1276
- o ? r.dispatchCommand(G, null) : a(!0);
1301
+ o ? r.dispatchCommand(J, null) : a(!0);
1277
1302
  },
1278
1303
  title: "Lenke",
1279
1304
  value: "link",
@@ -1291,13 +1316,13 @@ const Ir = ({ onClose: t }) => {
1291
1316
  )
1292
1317
  ] });
1293
1318
  }, kn = () => {
1294
- const [t] = y(), e = nt(null), [r, o] = k(null), [i, l] = k(""), { hasFocus: a } = st();
1319
+ const [t] = y(), e = ot(null), [r, o] = k(null), [i, l] = k(""), { hasFocus: a } = ct();
1295
1320
  x(() => {
1296
1321
  r ? t.update(() => {
1297
1322
  l(r.getURL());
1298
1323
  }) : l("");
1299
1324
  }, [t, r]);
1300
- const s = !!(r && i && a), { refs: d, floatingStyles: c, context: u } = at({
1325
+ const s = !!(r && i && a), { refs: d, floatingStyles: c, context: u } = lt({
1301
1326
  placement: "top",
1302
1327
  strategy: "fixed",
1303
1328
  open: s,
@@ -1307,37 +1332,37 @@ const Ir = ({ onClose: t }) => {
1307
1332
  },
1308
1333
  middleware: [$e()]
1309
1334
  }), { getFloatingProps: h } = Dt([
1310
- Ft(u),
1335
+ Pt(u),
1311
1336
  Ae(u)
1312
1337
  ]), m = v(() => {
1313
1338
  var S;
1314
- const b = L();
1315
- if (T(b)) {
1316
- const A = Yt(b), f = A.getParent();
1339
+ const b = T();
1340
+ if (L(b)) {
1341
+ const B = Yt(b), f = B.getParent();
1317
1342
  let U = null;
1318
- if (W(f) ? U = f : W(A) && (U = A), U) {
1319
- const J = window.getSelection(), dt = t.getRootElement();
1320
- b !== null && J !== null && dt !== null && dt.contains(J.anchorNode) && t.isEditable() && (e.current = ((S = J.focusNode) == null ? void 0 : S.parentElement) ?? null);
1343
+ if (W(f) ? U = f : W(B) && (U = B), U) {
1344
+ const X = window.getSelection(), ut = t.getRootElement();
1345
+ b !== null && X !== null && ut !== null && ut.contains(X.anchorNode) && t.isEditable() && (e.current = ((S = X.focusNode) == null ? void 0 : S.parentElement) ?? null);
1321
1346
  }
1322
1347
  o(U);
1323
1348
  }
1324
1349
  }, [t]), E = v(() => {
1325
1350
  r && Rr(r) && t.update(() => {
1326
1351
  r.remove();
1327
- }), t.dispatchCommand(G, null);
1352
+ }), t.dispatchCommand(J, null);
1328
1353
  }, [t, r]);
1329
1354
  if (x(() => {
1330
1355
  t.getEditorState().read(() => {
1331
1356
  m();
1332
1357
  });
1333
- }, [t, m]), x(() => lt(
1358
+ }, [t, m]), x(() => st(
1334
1359
  t.registerUpdateListener(({ editorState: b }) => {
1335
1360
  b.read(() => {
1336
1361
  m();
1337
1362
  });
1338
1363
  }),
1339
1364
  t.registerCommand(
1340
- P,
1365
+ F,
1341
1366
  () => (m(), !0),
1342
1367
  _
1343
1368
  ),
@@ -1348,8 +1373,8 @@ const Ir = ({ onClose: t }) => {
1348
1373
  )
1349
1374
  ), [t, m, r]), !s)
1350
1375
  return null;
1351
- const N = ct(i);
1352
- return /* @__PURE__ */ n(Pt, { children: /* @__PURE__ */ p(
1376
+ const N = dt(i);
1377
+ return /* @__PURE__ */ n(Ft, { children: /* @__PURE__ */ p(
1353
1378
  Ot,
1354
1379
  {
1355
1380
  ref: d.setFloating,
@@ -1364,7 +1389,7 @@ const Ir = ({ onClose: t }) => {
1364
1389
  ...h(),
1365
1390
  children: [
1366
1391
  /* @__PURE__ */ n(
1367
- F,
1392
+ P,
1368
1393
  {
1369
1394
  as: "a",
1370
1395
  css: {
@@ -1410,5 +1435,5 @@ export {
1410
1435
  Je as setStateFromPlainText,
1411
1436
  sn as stateToHTML,
1412
1437
  Xe as useHasFocusWithin,
1413
- st as useRichTextContext
1438
+ ct as useRichTextContext
1414
1439
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkitektbedriftene/fe-lib",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {