@arkitektbedriftene/fe-lib 2.3.2 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/rich-text.es.js +120 -120
  2. package/package.json +3 -3
@@ -86,7 +86,7 @@ const dr = ({
86
86
  tag: e
87
87
  }
88
88
  ), r.blur();
89
- }, zn = async (t, r, e) => {
89
+ }, On = async (t, r, e) => {
90
90
  var a;
91
91
  let n = 0;
92
92
  const i = It({
@@ -118,7 +118,7 @@ const dr = ({
118
118
  return i.read(() => {
119
119
  l = Rt(i);
120
120
  }), { html: l, trimCount: n };
121
- }, An = (t, r, e) => {
121
+ }, zn = (t, r, e) => {
122
122
  let n = 0;
123
123
  const i = It({
124
124
  nodes: r,
@@ -196,15 +196,15 @@ const re = ze({ hasFocus: !1, editorRef: { current: null }, signUrl: void 0 }),
196
196
  onBlur: l
197
197
  }
198
198
  };
199
- }, rt = () => Ae(re), mr = (t) => t.startsWith("https://devfilesab.blob.core.windows.net") || t.startsWith("https://filesab.blob.core.windows.net");
200
- function fr({
199
+ }, rt = () => Ae(re);
200
+ function mr({
201
201
  src: t,
202
202
  altText: r,
203
203
  width: e,
204
204
  height: n,
205
205
  nodeKey: i
206
206
  }) {
207
- const { signUrl: l } = rt(), [a, s] = k(mr(t) ? "" : t), [d, c] = k(!1), g = q(!1), [p] = _();
207
+ const { signUrl: l } = rt(), [a, s] = k(l ? "" : t), [d, c] = k(!1), g = q(!1), [p] = _();
208
208
  y(() => {
209
209
  const h = async () => {
210
210
  s(await (l == null ? void 0 : l(t)) ?? t);
@@ -288,7 +288,7 @@ function fr({
288
288
  )
289
289
  ] }) : /* @__PURE__ */ o("span", {});
290
290
  }
291
- function kr(t) {
291
+ function fr(t) {
292
292
  const r = t, { alt: e, src: n, width: i, height: l } = r;
293
293
  return { node: bt({ altText: e, height: l, src: n, width: i }) };
294
294
  }
@@ -332,7 +332,7 @@ class A extends he {
332
332
  static importDOM() {
333
333
  return {
334
334
  img: (e) => ({
335
- conversion: kr,
335
+ conversion: fr,
336
336
  priority: 0
337
337
  })
338
338
  };
@@ -374,7 +374,7 @@ class A extends he {
374
374
  }
375
375
  decorate() {
376
376
  return /* @__PURE__ */ o(
377
- fr,
377
+ mr,
378
378
  {
379
379
  src: this.__src,
380
380
  altText: this.__altText,
@@ -397,10 +397,10 @@ function bt({
397
397
  new A(e, t, n, r, i, l)
398
398
  );
399
399
  }
400
- function $n(t) {
400
+ function An(t) {
401
401
  return t instanceof A;
402
402
  }
403
- const Dn = [
403
+ const $n = [
404
404
  Pt,
405
405
  Ht,
406
406
  dt,
@@ -411,7 +411,7 @@ const Dn = [
411
411
  Ut,
412
412
  Wt,
413
413
  A
414
- ], Bn = [
414
+ ], Dn = [
415
415
  Pt,
416
416
  Ht,
417
417
  dt,
@@ -431,70 +431,70 @@ const Dn = [
431
431
  )
432
432
  }
433
433
  ];
434
- function br(t) {
434
+ function kr(t) {
435
435
  return m({ 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);
436
436
  }
437
437
  function yt(t) {
438
438
  return m({ 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);
439
439
  }
440
- function Mr(t) {
440
+ function br(t) {
441
441
  return m({ 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);
442
442
  }
443
- function vr(t) {
443
+ function Mr(t) {
444
444
  return m({ 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);
445
445
  }
446
- function Cr(t) {
446
+ function vr(t) {
447
447
  return m({ 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);
448
448
  }
449
- function Tr(t) {
449
+ function Cr(t) {
450
450
  return m({ 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);
451
451
  }
452
- function _r(t) {
452
+ function Tr(t) {
453
453
  return m({ 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);
454
454
  }
455
- function xr(t) {
455
+ function _r(t) {
456
456
  return m({ 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);
457
457
  }
458
- function Lr(t) {
458
+ function xr(t) {
459
459
  return m({ 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);
460
460
  }
461
- function wr(t) {
461
+ function Lr(t) {
462
462
  return m({ 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);
463
463
  }
464
- function yr(t) {
464
+ function wr(t) {
465
465
  return m({ 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);
466
466
  }
467
- function Nr(t) {
467
+ function yr(t) {
468
468
  return m({ 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);
469
469
  }
470
- function Sr(t) {
470
+ function Nr(t) {
471
471
  return m({ 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);
472
472
  }
473
- function Er(t) {
473
+ function Sr(t) {
474
474
  return m({ 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);
475
475
  }
476
- function Ir(t) {
476
+ function Er(t) {
477
477
  return m({ 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);
478
478
  }
479
- function Rr(t) {
479
+ function Ir(t) {
480
480
  return m({ 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);
481
481
  }
482
- function Or(t) {
482
+ function Rr(t) {
483
483
  return m({ 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);
484
484
  }
485
- function zr(t) {
485
+ function Or(t) {
486
486
  return m({ 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);
487
487
  }
488
- function Ar(t) {
488
+ function zr(t) {
489
489
  return m({ 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);
490
490
  }
491
- function $r(t) {
491
+ function Ar(t) {
492
492
  return m({ 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);
493
493
  }
494
- function Dr(t) {
494
+ function $r(t) {
495
495
  return m({ 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);
496
496
  }
497
- const Br = or("div", {
497
+ const Dr = or("div", {
498
498
  width: "10rem",
499
499
  display: "flex"
500
500
  }), ne = {
@@ -509,22 +509,22 @@ const Br = or("div", {
509
509
  paragraph: "Normal",
510
510
  quote: "Sitat",
511
511
  check: "Avkrysningsliste"
512
- }, Pr = {
513
- bullet: /* @__PURE__ */ o(Or, { size: "1.25rem" }),
514
- h1: /* @__PURE__ */ o(Tr, { size: "1.25rem" }),
515
- h2: /* @__PURE__ */ o(_r, { size: "1.25rem" }),
516
- h3: /* @__PURE__ */ o(xr, { size: "1.25rem" }),
517
- h4: /* @__PURE__ */ o(Lr, { size: "1.25rem" }),
518
- h5: /* @__PURE__ */ o(wr, { size: "1.25rem" }),
519
- h6: /* @__PURE__ */ o(yr, { size: "1.25rem" }),
520
- number: /* @__PURE__ */ o(Rr, { size: "1.25rem" }),
521
- check: /* @__PURE__ */ o(Ir, { size: "1.25rem" }),
522
- paragraph: /* @__PURE__ */ o(Sr, { size: "1.25rem" }),
523
- quote: /* @__PURE__ */ o(zr, { size: "1.25rem" })
512
+ }, Br = {
513
+ bullet: /* @__PURE__ */ o(Rr, { size: "1.25rem" }),
514
+ h1: /* @__PURE__ */ o(Cr, { size: "1.25rem" }),
515
+ h2: /* @__PURE__ */ o(Tr, { size: "1.25rem" }),
516
+ h3: /* @__PURE__ */ o(_r, { size: "1.25rem" }),
517
+ h4: /* @__PURE__ */ o(xr, { size: "1.25rem" }),
518
+ h5: /* @__PURE__ */ o(Lr, { size: "1.25rem" }),
519
+ h6: /* @__PURE__ */ o(wr, { size: "1.25rem" }),
520
+ number: /* @__PURE__ */ o(Ir, { size: "1.25rem" }),
521
+ check: /* @__PURE__ */ o(Er, { size: "1.25rem" }),
522
+ paragraph: /* @__PURE__ */ o(Nr, { size: "1.25rem" }),
523
+ quote: /* @__PURE__ */ o(Or, { size: "1.25rem" })
524
524
  }, x = ({
525
525
  blockType: t
526
526
  }) => /* @__PURE__ */ u(U, { children: [
527
- /* @__PURE__ */ o(H, { css: { display: "flex", flex: "0 0 auto" }, children: Pr[t] }),
527
+ /* @__PURE__ */ o(H, { css: { display: "flex", flex: "0 0 auto" }, children: Br[t] }),
528
528
  /* @__PURE__ */ o(
529
529
  H,
530
530
  {
@@ -537,7 +537,7 @@ const Br = or("div", {
537
537
  children: ne[t]
538
538
  }
539
539
  )
540
- ] }), Hr = (t) => {
540
+ ] }), Pr = (t) => {
541
541
  if (!w(t))
542
542
  return null;
543
543
  const r = t.anchor.getNode();
@@ -549,12 +549,12 @@ const Br = or("div", {
549
549
  anchorNode: r,
550
550
  element: e
551
551
  };
552
- }, Fr = () => {
552
+ }, Hr = () => {
553
553
  const [t] = _(), [r, e] = k("paragraph");
554
554
  y(() => t.registerCommand(
555
555
  K,
556
556
  () => {
557
- const c = L(), g = Hr(c);
557
+ const c = L(), g = Pr(c);
558
558
  if (!g)
559
559
  return !1;
560
560
  const { element: p, anchorNode: f } = g, S = p.getKey();
@@ -579,7 +579,7 @@ const Br = or("div", {
579
579
  w(g) && (it(g, () => Ne(c)), e(c));
580
580
  });
581
581
  };
582
- return /* @__PURE__ */ o(Br, { children: /* @__PURE__ */ u(
582
+ return /* @__PURE__ */ o(Dr, { children: /* @__PURE__ */ u(
583
583
  Z,
584
584
  {
585
585
  trigger: /* @__PURE__ */ o(
@@ -623,7 +623,7 @@ const Br = or("div", {
623
623
  ]
624
624
  }
625
625
  ) });
626
- }, Ur = () => {
626
+ }, Fr = () => {
627
627
  const [t] = _(), [r, e] = k(!1), [n, i] = k(!1), [l, a] = k(!1), [s, d] = k(!1), [c, g] = k(!1), p = C(() => {
628
628
  const b = L();
629
629
  w(b) && (e(b.hasFormat("bold")), i(b.hasFormat("italic")), a(b.hasFormat("underline")), d(b.hasFormat("code")), g(b.hasFormat("superscript")));
@@ -666,14 +666,14 @@ const Br = or("div", {
666
666
  "aria-label": "Tekstformattering",
667
667
  value: T,
668
668
  children: [
669
- /* @__PURE__ */ o(D, { onClick: f, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ o(vr, { size: "1.25rem" }) }),
669
+ /* @__PURE__ */ o(D, { onClick: f, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ o(Mr, { size: "1.25rem" }) }),
670
670
  /* @__PURE__ */ o(
671
671
  D,
672
672
  {
673
673
  onClick: S,
674
674
  title: "Kursiv tekst",
675
675
  value: "italic",
676
- children: /* @__PURE__ */ o(Nr, { size: "1.25rem" })
676
+ children: /* @__PURE__ */ o(yr, { size: "1.25rem" })
677
677
  }
678
678
  ),
679
679
  /* @__PURE__ */ o(
@@ -682,23 +682,23 @@ const Br = or("div", {
682
682
  onClick: E,
683
683
  title: "Understreket tekst",
684
684
  value: "underline",
685
- children: /* @__PURE__ */ o(Dr, { size: "1.25rem" })
685
+ children: /* @__PURE__ */ o($r, { size: "1.25rem" })
686
686
  }
687
687
  ),
688
- /* @__PURE__ */ o(D, { onClick: h, title: "Kode", value: "code", children: /* @__PURE__ */ o(Cr, { size: "1.25rem" }) }),
688
+ /* @__PURE__ */ o(D, { onClick: h, title: "Kode", value: "code", children: /* @__PURE__ */ o(vr, { size: "1.25rem" }) }),
689
689
  /* @__PURE__ */ o(
690
690
  D,
691
691
  {
692
692
  onClick: M,
693
693
  title: "Superscript",
694
694
  value: "superscript",
695
- children: /* @__PURE__ */ o(Ar, { size: "1.25rem" })
695
+ children: /* @__PURE__ */ o(zr, { size: "1.25rem" })
696
696
  }
697
697
  )
698
698
  ]
699
699
  }
700
700
  );
701
- }, Wr = ({ children: t }) => {
701
+ }, Ur = ({ children: t }) => {
702
702
  const { hasFocus: r, editorRef: e } = rt(), n = r, [i, l] = k(n);
703
703
  $e(() => {
704
704
  l(n);
@@ -742,19 +742,19 @@ const Br = or("div", {
742
742
  overflow: "hidden",
743
743
  boxShadow: "$md"
744
744
  },
745
- children: /* @__PURE__ */ o(jr, { children: t })
745
+ children: /* @__PURE__ */ o(Wr, { children: t })
746
746
  }
747
747
  ) }) : null;
748
- }, jr = ({
748
+ }, Wr = ({
749
749
  children: t,
750
750
  ...r
751
751
  }) => /* @__PURE__ */ u(Be, { "aria-label": "Formattering", ...r, children: [
752
- /* @__PURE__ */ o(Fr, {}),
752
+ /* @__PURE__ */ o(Hr, {}),
753
753
  /* @__PURE__ */ o(Pe, {}),
754
- /* @__PURE__ */ o(Ur, {}),
754
+ /* @__PURE__ */ o(Fr, {}),
755
755
  t
756
756
  ] });
757
- function Kr() {
757
+ function jr() {
758
758
  const [t] = _();
759
759
  return y(() => et(
760
760
  t.registerCommand(
@@ -839,7 +839,7 @@ function oe(t, r) {
839
839
  }
840
840
  function Nt(t) {
841
841
  oe(t, () => {
842
- const r = t.target, e = qr(r);
842
+ const r = t.target, e = Kr(r);
843
843
  e != null && e.isEditable() && e.update(() => {
844
844
  if (t.target) {
845
845
  const n = ct(r);
@@ -853,7 +853,7 @@ function St(t) {
853
853
  t.preventDefault();
854
854
  });
855
855
  }
856
- function qr(t) {
856
+ function Kr(t) {
857
857
  let r = t;
858
858
  for (; r; ) {
859
859
  if (r.__lexicalEditor)
@@ -867,7 +867,7 @@ function lt() {
867
867
  return t != null && t.tagName === "LI" && t.parentNode != null && // @ts-ignore internal field
868
868
  t.parentNode.__lexicalListType === "check" ? t : null;
869
869
  }
870
- function Yr(t, r) {
870
+ function qr(t, r) {
871
871
  let e = r ? t.getPreviousSibling() : t.getNextSibling(), n = t;
872
872
  for (; e == null && P(n); )
873
873
  n = n.getParentOrThrow().getParent(), n != null && (e = r ? n.getPreviousSibling() : n.getNextSibling());
@@ -885,7 +885,7 @@ function Et(t, r, e) {
885
885
  const i = ct(n);
886
886
  if (!P(i))
887
887
  return;
888
- const l = Yr(i, e);
888
+ const l = qr(i, e);
889
889
  if (l != null) {
890
890
  l.selectStart();
891
891
  const a = r.getElementByKey(l.__key);
@@ -896,7 +896,7 @@ function Et(t, r, e) {
896
896
  }), !1;
897
897
  }
898
898
  const ie = be("INSERT_IMAGE_COMMAND");
899
- function Gr() {
899
+ function Yr() {
900
900
  const [t] = te();
901
901
  return y(() => {
902
902
  if (!t.hasNodes([A]))
@@ -913,14 +913,14 @@ function Gr() {
913
913
  );
914
914
  }, [t]), null;
915
915
  }
916
- const Jr = () => /* @__PURE__ */ u(U, { children: [
916
+ const Gr = () => /* @__PURE__ */ u(U, { children: [
917
917
  /* @__PURE__ */ o(ar, {}),
918
918
  /* @__PURE__ */ o(sr, {}),
919
919
  /* @__PURE__ */ o(lr, {}),
920
- /* @__PURE__ */ o(Kr, {}),
920
+ /* @__PURE__ */ o(jr, {}),
921
921
  /* @__PURE__ */ o(cr, {}),
922
- /* @__PURE__ */ o(Gr, {})
923
- ] }), Xr = ({
922
+ /* @__PURE__ */ o(Yr, {})
923
+ ] }), Jr = ({
924
924
  state: t
925
925
  }) => {
926
926
  const [r] = _(), e = q(!1);
@@ -942,7 +942,7 @@ const Jr = () => /* @__PURE__ */ u(U, { children: [
942
942
  }
943
943
  }));
944
944
  }, []), null;
945
- }, Qr = He("div", {
945
+ }, Xr = He("div", {
946
946
  border: "1px solid $borderDarker",
947
947
  borderRadius: "$md",
948
948
  position: "relative",
@@ -979,7 +979,7 @@ const Jr = () => /* @__PURE__ */ u(U, { children: [
979
979
  }
980
980
  }
981
981
  ]
982
- }), Vr = ({
982
+ }), Qr = ({
983
983
  isLoading: t
984
984
  }) => /* @__PURE__ */ o(
985
985
  H,
@@ -993,7 +993,7 @@ const Jr = () => /* @__PURE__ */ u(U, { children: [
993
993
  },
994
994
  children: /* @__PURE__ */ o(gt, {})
995
995
  }
996
- ), Pn = ({
996
+ ), Bn = ({
997
997
  isLoading: t,
998
998
  children: r,
999
999
  placeholderText: e,
@@ -1026,7 +1026,7 @@ const Jr = () => /* @__PURE__ */ u(U, { children: [
1026
1026
  },
1027
1027
  children: [
1028
1028
  /* @__PURE__ */ u(
1029
- Qr,
1029
+ Xr,
1030
1030
  {
1031
1031
  ref: h,
1032
1032
  hasFocus: S,
@@ -1056,19 +1056,19 @@ const Jr = () => /* @__PURE__ */ u(U, { children: [
1056
1056
  ErrorBoundary: Xe
1057
1057
  }
1058
1058
  ),
1059
- /* @__PURE__ */ o(Jr, {}),
1059
+ /* @__PURE__ */ o(Gr, {}),
1060
1060
  i,
1061
- /* @__PURE__ */ o(Vr, { isLoading: t }),
1062
- !l && /* @__PURE__ */ o(Wr, { children: a })
1061
+ /* @__PURE__ */ o(Qr, { isLoading: t }),
1062
+ !l && /* @__PURE__ */ o(Ur, { children: a })
1063
1063
  ]
1064
1064
  }
1065
1065
  ),
1066
- /* @__PURE__ */ o(Xr, { state: g }),
1066
+ /* @__PURE__ */ o(Jr, { state: g }),
1067
1067
  /* @__PURE__ */ o(U, { children: r })
1068
1068
  ]
1069
1069
  }
1070
1070
  ) });
1071
- }, Zr = {
1071
+ }, Vr = {
1072
1072
  fontSize: "1rem",
1073
1073
  lineHeight: "1.5",
1074
1074
  "h1, h2, h3, h4, h5, h6": {
@@ -1262,7 +1262,7 @@ const Jr = () => /* @__PURE__ */ u(U, { children: [
1262
1262
  defaultVariants: {
1263
1263
  size: "md"
1264
1264
  }
1265
- }, Hn = ir(Zr), tn = ({
1265
+ }, Pn = ir(Vr), Zr = ({
1266
1266
  uploadFile: t,
1267
1267
  ...r
1268
1268
  }) => {
@@ -1308,7 +1308,7 @@ const Jr = () => /* @__PURE__ */ u(U, { children: [
1308
1308
  )
1309
1309
  ] })
1310
1310
  ] });
1311
- }, Fn = ({ uploadFile: t }) => {
1311
+ }, Hn = ({ uploadFile: t }) => {
1312
1312
  const [r] = _(), [e, n] = k(!1), i = C(() => {
1313
1313
  r.dispatchCommand(Ee, {
1314
1314
  rows: "3",
@@ -1325,7 +1325,7 @@ const Jr = () => /* @__PURE__ */ u(U, { children: [
1325
1325
  align: "end",
1326
1326
  children: [
1327
1327
  /* @__PURE__ */ u(v, { onClick: i, children: [
1328
- /* @__PURE__ */ o($r, { size: "1.25rem" }),
1328
+ /* @__PURE__ */ o(Ar, { size: "1.25rem" }),
1329
1329
  " Tabell"
1330
1330
  ] }),
1331
1331
  t && /* @__PURE__ */ u(v, { onClick: () => n(!0), children: [
@@ -1336,7 +1336,7 @@ const Jr = () => /* @__PURE__ */ u(U, { children: [
1336
1336
  }
1337
1337
  ),
1338
1338
  t && /* @__PURE__ */ o(
1339
- tn,
1339
+ Zr,
1340
1340
  {
1341
1341
  open: e,
1342
1342
  onOpenChange: n,
@@ -1345,10 +1345,10 @@ const Jr = () => /* @__PURE__ */ u(U, { children: [
1345
1345
  )
1346
1346
  ] });
1347
1347
  };
1348
- function en(t) {
1348
+ function tn(t) {
1349
1349
  return m({ 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);
1350
1350
  }
1351
- const Un = () => {
1351
+ const Fn = () => {
1352
1352
  const [t] = _(), [r, e] = k(null), { hasFocus: n } = rt();
1353
1353
  y(() => {
1354
1354
  !n && r && e(null);
@@ -1409,7 +1409,7 @@ const Un = () => {
1409
1409
  ref: i.setFloating,
1410
1410
  style: l,
1411
1411
  css: { padding: "2px", width: "18px", height: "18px" },
1412
- children: /* @__PURE__ */ o(en, {})
1412
+ children: /* @__PURE__ */ o(tn, {})
1413
1413
  }
1414
1414
  ),
1415
1415
  children: [
@@ -1434,7 +1434,7 @@ function ae(t) {
1434
1434
  const r = t.anchor, e = t.focus, n = t.anchor.getNode(), i = t.focus.getNode();
1435
1435
  return n === i ? n : t.isBackward() ? Tt(e) ? n : i : Tt(r) ? n : i;
1436
1436
  }
1437
- const Wn = (t) => (z.baseURL = t, z), X = class extends B {
1437
+ const Un = (t) => (z.baseURL = t, z), X = class extends B {
1438
1438
  static getType() {
1439
1439
  return "rutine_link";
1440
1440
  }
@@ -1469,10 +1469,10 @@ R(z, "baseURL", "");
1469
1469
  function le(t) {
1470
1470
  return new z(t);
1471
1471
  }
1472
- function rn(t) {
1472
+ function en(t) {
1473
1473
  return t instanceof z;
1474
1474
  }
1475
- const nn = ({ onClose: t }) => {
1475
+ const rn = ({ onClose: t }) => {
1476
1476
  const [r] = _(), e = C(
1477
1477
  (i) => {
1478
1478
  r.update(() => {
@@ -1497,7 +1497,7 @@ const nn = ({ onClose: t }) => {
1497
1497
  /* @__PURE__ */ o(N, { type: "submit", variant: "primary", children: "Sett inn" })
1498
1498
  ] })
1499
1499
  ] });
1500
- }, on = ({
1500
+ }, nn = ({
1501
1501
  onClose: t,
1502
1502
  getDocs: r
1503
1503
  }) => {
@@ -1540,7 +1540,7 @@ const nn = ({ onClose: t }) => {
1540
1540
  )
1541
1541
  ] })
1542
1542
  ] });
1543
- }, an = ({
1543
+ }, on = ({
1544
1544
  onClose: t,
1545
1545
  uploadFile: r
1546
1546
  }) => {
@@ -1593,7 +1593,7 @@ const nn = ({ onClose: t }) => {
1593
1593
  )
1594
1594
  ] })
1595
1595
  ] });
1596
- }, ln = ({
1596
+ }, an = ({
1597
1597
  open: t,
1598
1598
  onOpenChange: r,
1599
1599
  getDocs: e,
@@ -1615,11 +1615,11 @@ const nn = ({ onClose: t }) => {
1615
1615
  ),
1616
1616
  n && /* @__PURE__ */ o(at, { active: i === "file", onClick: () => l("file"), children: "Fil" })
1617
1617
  ] }),
1618
- i === "url" && /* @__PURE__ */ o(nn, { onClose: a }),
1619
- i === "rutine" && e && /* @__PURE__ */ o(on, { onClose: a, getDocs: e }),
1620
- i === "file" && n && /* @__PURE__ */ o(an, { onClose: a, uploadFile: n })
1618
+ i === "url" && /* @__PURE__ */ o(rn, { onClose: a }),
1619
+ i === "rutine" && e && /* @__PURE__ */ o(nn, { onClose: a, getDocs: e }),
1620
+ i === "file" && n && /* @__PURE__ */ o(on, { onClose: a, uploadFile: n })
1621
1621
  ] });
1622
- }, jn = ({
1622
+ }, Wn = ({
1623
1623
  getDocs: t,
1624
1624
  uploadFile: r
1625
1625
  }) => {
@@ -1643,11 +1643,11 @@ const nn = ({ onClose: t }) => {
1643
1643
  },
1644
1644
  title: "Lenke",
1645
1645
  value: "link",
1646
- children: /* @__PURE__ */ o(Er, { size: "1.25rem" })
1646
+ children: /* @__PURE__ */ o(Sr, { size: "1.25rem" })
1647
1647
  }
1648
1648
  ),
1649
1649
  /* @__PURE__ */ o(
1650
- ln,
1650
+ an,
1651
1651
  {
1652
1652
  open: l,
1653
1653
  onOpenChange: a,
@@ -1656,7 +1656,7 @@ const nn = ({ onClose: t }) => {
1656
1656
  }
1657
1657
  )
1658
1658
  ] });
1659
- }, Kn = () => {
1659
+ }, jn = () => {
1660
1660
  const [t] = _(), r = q(null), [e, n] = k(null), [i, l] = k(""), { hasFocus: a } = rt();
1661
1661
  y(() => {
1662
1662
  e ? t.update(() => {
@@ -1688,7 +1688,7 @@ const nn = ({ onClose: t }) => {
1688
1688
  n(Y);
1689
1689
  }
1690
1690
  }, [t]), S = C(() => {
1691
- e && rn(e) && t.update(() => {
1691
+ e && en(e) && t.update(() => {
1692
1692
  e.remove();
1693
1693
  }), t.dispatchCommand(V, null);
1694
1694
  }, [t, e]);
@@ -1751,7 +1751,7 @@ const nn = ({ onClose: t }) => {
1751
1751
  ]
1752
1752
  }
1753
1753
  ) });
1754
- }, qn = () => {
1754
+ }, Kn = () => {
1755
1755
  const [t] = te();
1756
1756
  return /* @__PURE__ */ u(
1757
1757
  Z,
@@ -1774,7 +1774,7 @@ const nn = ({ onClose: t }) => {
1774
1774
  {
1775
1775
  onClick: () => t.dispatchCommand(ot, "center"),
1776
1776
  children: [
1777
- /* @__PURE__ */ o(br, { size: "1.25rem" }),
1777
+ /* @__PURE__ */ o(kr, { size: "1.25rem" }),
1778
1778
  "Midt"
1779
1779
  ]
1780
1780
  }
@@ -1784,7 +1784,7 @@ const nn = ({ onClose: t }) => {
1784
1784
  {
1785
1785
  onClick: () => t.dispatchCommand(ot, "right"),
1786
1786
  children: [
1787
- /* @__PURE__ */ o(Mr, { size: "1.25rem" }),
1787
+ /* @__PURE__ */ o(br, { size: "1.25rem" }),
1788
1788
  "Høyre"
1789
1789
  ]
1790
1790
  }
@@ -1796,31 +1796,31 @@ const nn = ({ onClose: t }) => {
1796
1796
  export {
1797
1797
  bt as $createImageNode,
1798
1798
  le as $createRutineLinkNode,
1799
- $n as $isImageNode,
1800
- rn as $isRutineLinkNode,
1801
- qn as AlignToolbarDropdown,
1802
- Wr as FloatingToolbar,
1799
+ An as $isImageNode,
1800
+ en as $isRutineLinkNode,
1801
+ Kn as AlignToolbarDropdown,
1802
+ Ur as FloatingToolbar,
1803
1803
  A as ImageNode,
1804
- Fn as InsertSelector,
1805
- Kn as LinkEditPlugin,
1804
+ Hn as InsertSelector,
1805
+ jn as LinkEditPlugin,
1806
1806
  J as LinkTargetNode,
1807
- jn as LinkToolbarButton,
1808
- Pn as RichTextEditor,
1809
- jr as RichTextToolbar,
1807
+ Wn as LinkToolbarButton,
1808
+ Bn as RichTextEditor,
1809
+ Wr as RichTextToolbar,
1810
1810
  z as RutineLinkNode,
1811
- Wn as RutineLinkNodeInit,
1812
- Un as TableEditPlugin,
1811
+ Un as RutineLinkNodeInit,
1812
+ Fn as TableEditPlugin,
1813
1813
  ur as clearEditorState,
1814
- Dn as defaultNodes,
1815
- Bn as defaultViewNodes,
1814
+ $n as defaultNodes,
1815
+ Dn as defaultViewNodes,
1816
1816
  hr as isEditorState,
1817
1817
  kt as isJSON,
1818
1818
  re as richTextContext,
1819
- Hn as richTextCss,
1820
- Zr as richTextStyleObj,
1819
+ Pn as richTextCss,
1820
+ Vr as richTextStyleObj,
1821
1821
  gr as setStateFromPlainText,
1822
- zn as stateToHTML,
1823
- An as syncStateToHTML,
1822
+ On as stateToHTML,
1823
+ zn as syncStateToHTML,
1824
1824
  pr as useHasFocusWithin,
1825
1825
  rt as useRichTextContext
1826
1826
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkitektbedriftene/fe-lib",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -63,8 +63,8 @@
63
63
  "peerDependencies": {
64
64
  "@types/react": "*",
65
65
  "@types/react-dom": "*",
66
- "react": "^18.2.0",
67
- "react-dom": "^18.2.0"
66
+ "react": "^18.2.0 || ^19.0.0",
67
+ "react-dom": "^18.2.0 || ^19.0.0"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@biomejs/biome": "^1.6.2",