@arkitektbedriftene/fe-lib 2.3.3 → 2.3.5
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.
- package/dist/rich-text.es.js +120 -120
- package/dist/ui.es.js +20 -18
- package/package.json +1 -1
package/dist/rich-text.es.js
CHANGED
|
@@ -86,7 +86,7 @@ const dr = ({
|
|
|
86
86
|
tag: e
|
|
87
87
|
}
|
|
88
88
|
), r.blur();
|
|
89
|
-
},
|
|
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
|
-
},
|
|
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)
|
|
200
|
-
function
|
|
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(
|
|
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
|
|
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:
|
|
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
|
-
|
|
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
|
|
400
|
+
function An(t) {
|
|
401
401
|
return t instanceof A;
|
|
402
402
|
}
|
|
403
|
-
const
|
|
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
|
-
],
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
},
|
|
513
|
-
bullet: /* @__PURE__ */ o(
|
|
514
|
-
h1: /* @__PURE__ */ o(
|
|
515
|
-
h2: /* @__PURE__ */ o(
|
|
516
|
-
h3: /* @__PURE__ */ o(
|
|
517
|
-
h4: /* @__PURE__ */ o(
|
|
518
|
-
h5: /* @__PURE__ */ o(
|
|
519
|
-
h6: /* @__PURE__ */ o(
|
|
520
|
-
number: /* @__PURE__ */ o(
|
|
521
|
-
check: /* @__PURE__ */ o(
|
|
522
|
-
paragraph: /* @__PURE__ */ o(
|
|
523
|
-
quote: /* @__PURE__ */ o(
|
|
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:
|
|
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
|
-
] }),
|
|
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
|
-
},
|
|
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 =
|
|
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(
|
|
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
|
-
},
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
695
|
+
children: /* @__PURE__ */ o(zr, { size: "1.25rem" })
|
|
696
696
|
}
|
|
697
697
|
)
|
|
698
698
|
]
|
|
699
699
|
}
|
|
700
700
|
);
|
|
701
|
-
},
|
|
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(
|
|
745
|
+
children: /* @__PURE__ */ o(Wr, { children: t })
|
|
746
746
|
}
|
|
747
747
|
) }) : null;
|
|
748
|
-
},
|
|
748
|
+
}, Wr = ({
|
|
749
749
|
children: t,
|
|
750
750
|
...r
|
|
751
751
|
}) => /* @__PURE__ */ u(Be, { "aria-label": "Formattering", ...r, children: [
|
|
752
|
-
/* @__PURE__ */ o(
|
|
752
|
+
/* @__PURE__ */ o(Hr, {}),
|
|
753
753
|
/* @__PURE__ */ o(Pe, {}),
|
|
754
|
-
/* @__PURE__ */ o(
|
|
754
|
+
/* @__PURE__ */ o(Fr, {}),
|
|
755
755
|
t
|
|
756
756
|
] });
|
|
757
|
-
function
|
|
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 =
|
|
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
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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(
|
|
920
|
+
/* @__PURE__ */ o(jr, {}),
|
|
921
921
|
/* @__PURE__ */ o(cr, {}),
|
|
922
|
-
/* @__PURE__ */ o(
|
|
923
|
-
] }),
|
|
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
|
-
},
|
|
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
|
-
}),
|
|
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
|
-
),
|
|
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
|
-
|
|
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(
|
|
1059
|
+
/* @__PURE__ */ o(Gr, {}),
|
|
1060
1060
|
i,
|
|
1061
|
-
/* @__PURE__ */ o(
|
|
1062
|
-
!l && /* @__PURE__ */ o(
|
|
1061
|
+
/* @__PURE__ */ o(Qr, { isLoading: t }),
|
|
1062
|
+
!l && /* @__PURE__ */ o(Ur, { children: a })
|
|
1063
1063
|
]
|
|
1064
1064
|
}
|
|
1065
1065
|
),
|
|
1066
|
-
/* @__PURE__ */ o(
|
|
1066
|
+
/* @__PURE__ */ o(Jr, { state: g }),
|
|
1067
1067
|
/* @__PURE__ */ o(U, { children: r })
|
|
1068
1068
|
]
|
|
1069
1069
|
}
|
|
1070
1070
|
) });
|
|
1071
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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(
|
|
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
|
-
|
|
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
|
|
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
|
|
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(
|
|
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
|
|
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
|
|
1472
|
+
function en(t) {
|
|
1473
1473
|
return t instanceof z;
|
|
1474
1474
|
}
|
|
1475
|
-
const
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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(
|
|
1619
|
-
i === "rutine" && e && /* @__PURE__ */ o(
|
|
1620
|
-
i === "file" && n && /* @__PURE__ */ o(
|
|
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
|
-
},
|
|
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(
|
|
1646
|
+
children: /* @__PURE__ */ o(Sr, { size: "1.25rem" })
|
|
1647
1647
|
}
|
|
1648
1648
|
),
|
|
1649
1649
|
/* @__PURE__ */ o(
|
|
1650
|
-
|
|
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
|
-
},
|
|
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 &&
|
|
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
|
-
},
|
|
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(
|
|
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(
|
|
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
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1799
|
+
An as $isImageNode,
|
|
1800
|
+
en as $isRutineLinkNode,
|
|
1801
|
+
Kn as AlignToolbarDropdown,
|
|
1802
|
+
Ur as FloatingToolbar,
|
|
1803
1803
|
A as ImageNode,
|
|
1804
|
-
|
|
1805
|
-
|
|
1804
|
+
Hn as InsertSelector,
|
|
1805
|
+
jn as LinkEditPlugin,
|
|
1806
1806
|
J as LinkTargetNode,
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1807
|
+
Wn as LinkToolbarButton,
|
|
1808
|
+
Bn as RichTextEditor,
|
|
1809
|
+
Wr as RichTextToolbar,
|
|
1810
1810
|
z as RutineLinkNode,
|
|
1811
|
-
|
|
1812
|
-
|
|
1811
|
+
Un as RutineLinkNodeInit,
|
|
1812
|
+
Fn as TableEditPlugin,
|
|
1813
1813
|
ur as clearEditorState,
|
|
1814
|
-
|
|
1815
|
-
|
|
1814
|
+
$n as defaultNodes,
|
|
1815
|
+
Dn as defaultViewNodes,
|
|
1816
1816
|
hr as isEditorState,
|
|
1817
1817
|
kt as isJSON,
|
|
1818
1818
|
re as richTextContext,
|
|
1819
|
-
|
|
1820
|
-
|
|
1819
|
+
Pn as richTextCss,
|
|
1820
|
+
Vr as richTextStyleObj,
|
|
1821
1821
|
gr as setStateFromPlainText,
|
|
1822
|
-
|
|
1823
|
-
|
|
1822
|
+
On as stateToHTML,
|
|
1823
|
+
zn as syncStateToHTML,
|
|
1824
1824
|
pr as useHasFocusWithin,
|
|
1825
1825
|
rt as useRichTextContext
|
|
1826
1826
|
};
|
package/dist/ui.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { k as p, s as n, c as f } from "./stitches.config-00c23cdb.js";
|
|
2
2
|
import { a as Ae, g as We } from "./stitches.config-00c23cdb.js";
|
|
3
3
|
import { jsx as t, jsxs as c, Fragment as K } from "react/jsx-runtime";
|
|
4
|
-
import { forwardRef as g, createContext as U, useMemo as
|
|
4
|
+
import { forwardRef as g, createContext as U, useMemo as k, useContext as B, isValidElement as q, cloneElement as J, useState as Q, useId as w } from "react";
|
|
5
5
|
import { useFloating as Z, autoUpdate as _, offset as oo, flip as eo, shift as ro, useTransitionStyles as to, useClick as no, useHover as ao, safePolygon as io, useDismiss as so, useRole as lo, useInteractions as co, FloatingPortal as $o } from "@floating-ui/react";
|
|
6
6
|
import * as y from "@radix-ui/react-toolbar";
|
|
7
7
|
import { j as mo, k as go, l as H, m as uo, n as po } from "./index.esm-da01383a.js";
|
|
@@ -74,7 +74,7 @@ const bo = p({
|
|
|
74
74
|
size: "sm",
|
|
75
75
|
color: "dark"
|
|
76
76
|
}
|
|
77
|
-
}),
|
|
77
|
+
}), ko = g(
|
|
78
78
|
(o, e) => /* @__PURE__ */ t(
|
|
79
79
|
vo,
|
|
80
80
|
{
|
|
@@ -98,7 +98,7 @@ const bo = p({
|
|
|
98
98
|
)
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
|
-
),
|
|
101
|
+
), wo = n("button", {
|
|
102
102
|
appearance: "none",
|
|
103
103
|
margin: 0,
|
|
104
104
|
padding: 0,
|
|
@@ -258,7 +258,7 @@ const bo = p({
|
|
|
258
258
|
}
|
|
259
259
|
}), P = g(
|
|
260
260
|
({ children: o, disabled: e, isLoading: r, variant: a, color: i, ...s }, l) => (!i && a === "primary" && (i = "primary"), /* @__PURE__ */ c(
|
|
261
|
-
|
|
261
|
+
wo,
|
|
262
262
|
{
|
|
263
263
|
ref: l,
|
|
264
264
|
type: "button",
|
|
@@ -269,7 +269,7 @@ const bo = p({
|
|
|
269
269
|
...s,
|
|
270
270
|
children: [
|
|
271
271
|
o,
|
|
272
|
-
r && /* @__PURE__ */ t(
|
|
272
|
+
r && /* @__PURE__ */ t(ko, { color: "inherit" })
|
|
273
273
|
]
|
|
274
274
|
}
|
|
275
275
|
))
|
|
@@ -395,7 +395,7 @@ const bo = p({
|
|
|
395
395
|
L,
|
|
396
396
|
N,
|
|
397
397
|
Y
|
|
398
|
-
]), E =
|
|
398
|
+
]), E = k(
|
|
399
399
|
() => ({
|
|
400
400
|
getFloatingProps: R,
|
|
401
401
|
getReferenceProps: T,
|
|
@@ -744,12 +744,12 @@ const bo = p({
|
|
|
744
744
|
defaultVariants: {
|
|
745
745
|
size: "md"
|
|
746
746
|
}
|
|
747
|
-
}),
|
|
747
|
+
}), ke = ({
|
|
748
748
|
css: o,
|
|
749
749
|
colorString: e,
|
|
750
750
|
...r
|
|
751
751
|
}) => {
|
|
752
|
-
const a =
|
|
752
|
+
const a = k(
|
|
753
753
|
() => e ? Vo(e) : "$gray200",
|
|
754
754
|
[e]
|
|
755
755
|
);
|
|
@@ -780,7 +780,7 @@ const bo = p({
|
|
|
780
780
|
backgroundColor: "transparent"
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
|
-
}),
|
|
783
|
+
}), we = ({
|
|
784
784
|
side: o = "bottom",
|
|
785
785
|
align: e = "center",
|
|
786
786
|
trigger: r,
|
|
@@ -900,14 +900,14 @@ const bo = p({
|
|
|
900
900
|
error: r,
|
|
901
901
|
...a
|
|
902
902
|
}) => {
|
|
903
|
-
const i =
|
|
903
|
+
const i = k(
|
|
904
904
|
() => ({
|
|
905
905
|
...v,
|
|
906
906
|
...o,
|
|
907
907
|
...r ? No : void 0
|
|
908
908
|
}),
|
|
909
909
|
[o, r]
|
|
910
|
-
), s =
|
|
910
|
+
), s = k(
|
|
911
911
|
() => ({
|
|
912
912
|
...Yo,
|
|
913
913
|
...e
|
|
@@ -986,7 +986,7 @@ const bo = p({
|
|
|
986
986
|
width: "100%"
|
|
987
987
|
}), De = g(
|
|
988
988
|
({ type: o = "text", label: e, error: r, style: a, css: i, suffix: s, id: l, ...$ }, u) => {
|
|
989
|
-
const x =
|
|
989
|
+
const x = w();
|
|
990
990
|
return l = l || x, /* @__PURE__ */ c(d, { css: i, children: [
|
|
991
991
|
e && /* @__PURE__ */ t(
|
|
992
992
|
d,
|
|
@@ -1042,7 +1042,7 @@ const bo = p({
|
|
|
1042
1042
|
width: "100%"
|
|
1043
1043
|
}), Be = g(
|
|
1044
1044
|
({ label: o, error: e, style: r, css: a, suffix: i, id: s, ...l }, $) => {
|
|
1045
|
-
const u =
|
|
1045
|
+
const u = w();
|
|
1046
1046
|
return s = s || u, /* @__PURE__ */ c(d, { css: a, children: [
|
|
1047
1047
|
o && /* @__PURE__ */ t(
|
|
1048
1048
|
d,
|
|
@@ -1095,6 +1095,7 @@ const bo = p({
|
|
|
1095
1095
|
alignItems: "center",
|
|
1096
1096
|
justifyContent: "center",
|
|
1097
1097
|
gap: "$2",
|
|
1098
|
+
flexShrink: 0,
|
|
1098
1099
|
color: "#fff",
|
|
1099
1100
|
border: "2px solid $blue600",
|
|
1100
1101
|
backgroundColor: "transparent",
|
|
@@ -1135,6 +1136,7 @@ const bo = p({
|
|
|
1135
1136
|
}
|
|
1136
1137
|
}), Qo = n("label", {
|
|
1137
1138
|
flex: "0 1 auto",
|
|
1139
|
+
paddingLeft: "$2",
|
|
1138
1140
|
variants: {
|
|
1139
1141
|
size: {
|
|
1140
1142
|
sm: {
|
|
@@ -1157,8 +1159,8 @@ const bo = p({
|
|
|
1157
1159
|
label: r,
|
|
1158
1160
|
...a
|
|
1159
1161
|
}) => {
|
|
1160
|
-
const i =
|
|
1161
|
-
return o = o || i, /* @__PURE__ */ c(d, { css: { display: "flex", alignItems: "center"
|
|
1162
|
+
const i = w();
|
|
1163
|
+
return o = o || i, /* @__PURE__ */ c(d, { css: { display: "flex", alignItems: "center" }, children: [
|
|
1162
1164
|
/* @__PURE__ */ t(qo, { id: o, size: e, ...a, children: /* @__PURE__ */ c(Jo, { children: [
|
|
1163
1165
|
/* @__PURE__ */ t(uo, { "data-icon": "indeterminate" }),
|
|
1164
1166
|
/* @__PURE__ */ t(po, { "data-icon": "checked" })
|
|
@@ -1222,7 +1224,7 @@ const bo = p({
|
|
|
1222
1224
|
] });
|
|
1223
1225
|
export {
|
|
1224
1226
|
le as Alert,
|
|
1225
|
-
|
|
1227
|
+
ke as Avatar,
|
|
1226
1228
|
ce as Badge,
|
|
1227
1229
|
d as Box,
|
|
1228
1230
|
P as Button,
|
|
@@ -1233,7 +1235,7 @@ export {
|
|
|
1233
1235
|
ye as Dialog,
|
|
1234
1236
|
ve as DialogActions,
|
|
1235
1237
|
xe as DialogHeader,
|
|
1236
|
-
|
|
1238
|
+
we as DropdownMenu,
|
|
1237
1239
|
Ie as DropdownMenuCheckboxItem,
|
|
1238
1240
|
ze as DropdownMenuIconItem,
|
|
1239
1241
|
Se as DropdownMenuItem,
|
|
@@ -1246,7 +1248,7 @@ export {
|
|
|
1246
1248
|
Fo as PopoverContent,
|
|
1247
1249
|
Ho as PopoverTrigger,
|
|
1248
1250
|
Te as Select,
|
|
1249
|
-
|
|
1251
|
+
ko as Spinner,
|
|
1250
1252
|
Wo as Stack,
|
|
1251
1253
|
Fe as Switch,
|
|
1252
1254
|
Be as TextArea,
|