@arkitektbedriftene/fe-lib 2.0.4 → 2.0.6
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/styles.d.ts +12 -13
- package/dist/rich-text.es.js +144 -145
- package/package.json +1 -1
|
@@ -98,23 +98,22 @@ export declare const richTextStyleObj: {
|
|
|
98
98
|
border: string;
|
|
99
99
|
borderRadius: number;
|
|
100
100
|
};
|
|
101
|
-
"&::after": {
|
|
102
|
-
content: string;
|
|
103
|
-
width: number;
|
|
104
|
-
height: number;
|
|
105
|
-
top: number;
|
|
106
|
-
left: number;
|
|
107
|
-
display: string;
|
|
108
|
-
position: string;
|
|
109
|
-
borderLeft: string;
|
|
110
|
-
borderBottom: string;
|
|
111
|
-
transform: string;
|
|
112
|
-
};
|
|
113
101
|
"&[aria-checked=true]": {
|
|
114
102
|
"&::before": {
|
|
115
|
-
backgroundColor: string;
|
|
116
103
|
borderColor: string;
|
|
117
104
|
};
|
|
105
|
+
"&::after": {
|
|
106
|
+
content: string;
|
|
107
|
+
width: number;
|
|
108
|
+
height: number;
|
|
109
|
+
top: number;
|
|
110
|
+
left: number;
|
|
111
|
+
display: string;
|
|
112
|
+
position: string;
|
|
113
|
+
borderLeft: string;
|
|
114
|
+
borderBottom: string;
|
|
115
|
+
transform: string;
|
|
116
|
+
};
|
|
118
117
|
};
|
|
119
118
|
"&:focus": {
|
|
120
119
|
outline: string;
|
package/dist/rich-text.es.js
CHANGED
|
@@ -3,22 +3,22 @@ var ne = (t, r, e) => r in t ? re(t, r, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var I = (t, r, e) => (ne(t, typeof r != "symbol" ? r + "" : r, e), e);
|
|
4
4
|
import { createHeadlessEditor as oe } from "@lexical/headless";
|
|
5
5
|
import { $generateHtmlFromNodes as ie } from "@lexical/html";
|
|
6
|
-
import { $getRoot as X, ParagraphNode as ae, $createParagraphNode as W, $createTextNode as
|
|
7
|
-
import { trimTextContentFromAnchor as ve, $setBlocksType as nt, $isAtNodeEnd as
|
|
8
|
-
import { LinkNode as B, AutoLinkNode as
|
|
9
|
-
import { ListNode as st, ListItemNode as
|
|
10
|
-
import { HeadingNode as
|
|
11
|
-
import { TableNode as
|
|
6
|
+
import { $getRoot as X, ParagraphNode as ae, $createParagraphNode as W, $createTextNode as z, $setSelection as Q, $getNodeByKey as kt, DecoratorNode as le, $applyNodeReplacement as se, SELECTION_CHANGE_COMMAND as j, $getSelection as L, COMMAND_PRIORITY_CRITICAL as at, $isRangeSelection as w, $isRootOrShadowRoot as wt, FORMAT_TEXT_COMMAND as U, COMMAND_PRIORITY_LOW as R, KEY_ARROW_DOWN_COMMAND as ce, KEY_ARROW_UP_COMMAND as de, KEY_ESCAPE_COMMAND as yt, KEY_SPACE_COMMAND as he, $getNearestNodeFromDOMNode as lt, KEY_ARROW_LEFT_COMMAND as ue, $isElementNode as ge, createCommand as pe, $insertNodes as me, COMMAND_PRIORITY_EDITOR as fe, COMMAND_PRIORITY_NORMAL as ke, $createRangeSelection as Nt, COMMAND_PRIORITY_HIGH as be } from "lexical";
|
|
7
|
+
import { trimTextContentFromAnchor as ve, $setBlocksType as nt, $isAtNodeEnd as bt } from "@lexical/selection";
|
|
8
|
+
import { LinkNode as B, AutoLinkNode as St, $isLinkNode as Y, TOGGLE_LINK_COMMAND as V } from "@lexical/link";
|
|
9
|
+
import { ListNode as st, ListItemNode as Et, $isListNode as ct, INSERT_UNORDERED_LIST_COMMAND as Ce, INSERT_ORDERED_LIST_COMMAND as Me, INSERT_CHECK_LIST_COMMAND as It, insertList as _e, $isListItemNode as P } from "@lexical/list";
|
|
10
|
+
import { HeadingNode as Rt, QuoteNode as Ot, $isHeadingNode as Te, $createHeadingNode as xe, $createQuoteNode as Le } from "@lexical/rich-text";
|
|
11
|
+
import { TableNode as zt, TableRowNode as At, TableCellNode as $t, INSERT_TABLE_COMMAND as we, $getTableCellNodeFromLexicalNode as ye, $deleteTableColumn__EXPERIMENTAL as Ne, $deleteTableRow__EXPERIMENTAL as Se, $insertTableColumn__EXPERIMENTAL as vt, $insertTableRow__EXPERIMENTAL as Ct } from "@lexical/table";
|
|
12
12
|
import { jsx as o, jsxs as g, Fragment as F } from "react/jsx-runtime";
|
|
13
|
-
import { createContext as Ee, useState as f, useRef as K, useCallback as C, useContext as Ie, useEffect as y, useMemo as
|
|
14
|
-
import { Box as H, Stack as Oe, Button as N, DropdownMenu as dt, ToolbarButton as
|
|
13
|
+
import { createContext as Ee, useState as f, useRef as K, useCallback as C, useContext as Ie, useEffect as y, useMemo as Dt, useLayoutEffect as Re } from "react";
|
|
14
|
+
import { Box as H, Stack as Oe, Button as N, DropdownMenu as dt, ToolbarButton as Bt, DropdownMenuIconItem as _, ToolbarToggleGroup as Pt, ToolbarToggleItem as D, OverlayCard as Ht, Toolbar as ze, ToolbarSeparator as Ae, styled as $e, Spinner as ht, Dialog as Ft, DialogHeader as De, TextInput as ut, DialogActions as Z, DropdownMenuItem as $, DropdownMenuSeparator as Mt, NavBar as Be, NavBarItem as ot, Combobox as Pe } from "./ui.es.js";
|
|
15
15
|
import { f as He, g as Fe, G as k, h as Ue, i as We } from "./index.esm-da01383a.js";
|
|
16
16
|
import { useLexicalComposerContext as T } from "@lexical/react/LexicalComposerContext.js";
|
|
17
17
|
import { LexicalComposer as je } from "@lexical/react/LexicalComposer.js";
|
|
18
18
|
import { RichTextPlugin as Ke } from "@lexical/react/LexicalRichTextPlugin.js";
|
|
19
19
|
import qe from "@lexical/react/LexicalErrorBoundary.js";
|
|
20
|
-
import { useFloating as
|
|
21
|
-
import { $getNearestNodeOfType as Ve, $findMatchingParent as Yt, mergeRegister as tt, isHTMLElement as
|
|
20
|
+
import { useFloating as gt, autoUpdate as Ut, size as Ye, flip as Ge, offset as Wt, shift as Je, useInteractions as jt, useRole as Kt, FloatingPortal as qt, inline as Xe, useDismiss as Qe } from "@floating-ui/react";
|
|
21
|
+
import { $getNearestNodeOfType as Ve, $findMatchingParent as Yt, mergeRegister as tt, isHTMLElement as _t, $wrapNodeInElement as Ze } from "@lexical/utils";
|
|
22
22
|
import { s as tr, c as er } from "./stitches.config-00c23cdb.js";
|
|
23
23
|
import { ListPlugin as rr } from "@lexical/react/LexicalListPlugin.js";
|
|
24
24
|
import { HistoryPlugin as nr } from "@lexical/react/LexicalHistoryPlugin.js";
|
|
@@ -68,7 +68,7 @@ const lr = ({
|
|
|
68
68
|
const e = X();
|
|
69
69
|
e.clear();
|
|
70
70
|
const n = W();
|
|
71
|
-
n.append(
|
|
71
|
+
n.append(z("")), e.append(n), Q(null);
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
tag: r
|
|
@@ -80,7 +80,7 @@ const lr = ({
|
|
|
80
80
|
const n = X();
|
|
81
81
|
n.clear();
|
|
82
82
|
const i = W();
|
|
83
|
-
i.append(
|
|
83
|
+
i.append(z(t.trim())), n.append(i), Q(null);
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
tag: e
|
|
@@ -99,7 +99,7 @@ const lr = ({
|
|
|
99
99
|
if (typeof t == "string" && !Jt(t))
|
|
100
100
|
i.update(() => {
|
|
101
101
|
const s = X(), d = W();
|
|
102
|
-
d.append(
|
|
102
|
+
d.append(z(t.trim())), s.append(d);
|
|
103
103
|
});
|
|
104
104
|
else {
|
|
105
105
|
const s = i.parseEditorState(t, () => {
|
|
@@ -182,7 +182,7 @@ function pr({
|
|
|
182
182
|
}, S = () => {
|
|
183
183
|
p.update(() => {
|
|
184
184
|
var M;
|
|
185
|
-
const h =
|
|
185
|
+
const h = kt(i);
|
|
186
186
|
if (!h)
|
|
187
187
|
return;
|
|
188
188
|
const v = h.getPreviousSibling() || ((M = h.getParent()) == null ? void 0 : M.getPreviousSibling());
|
|
@@ -191,7 +191,7 @@ function pr({
|
|
|
191
191
|
}, E = () => {
|
|
192
192
|
p.update(() => {
|
|
193
193
|
var M;
|
|
194
|
-
const h =
|
|
194
|
+
const h = kt(i);
|
|
195
195
|
if (!h)
|
|
196
196
|
return;
|
|
197
197
|
const v = h.getNextSibling() || ((M = h.getParent()) == null ? void 0 : M.getNextSibling());
|
|
@@ -256,9 +256,9 @@ function pr({
|
|
|
256
256
|
}
|
|
257
257
|
function mr(t) {
|
|
258
258
|
const r = t, { alt: e, src: n, width: i, height: a } = r;
|
|
259
|
-
return { node:
|
|
259
|
+
return { node: pt({ altText: e, height: a, src: n, width: i }) };
|
|
260
260
|
}
|
|
261
|
-
class
|
|
261
|
+
class A extends le {
|
|
262
262
|
constructor(e, n, i, a, l, s) {
|
|
263
263
|
super(s);
|
|
264
264
|
I(this, "__src");
|
|
@@ -272,7 +272,7 @@ class z extends le {
|
|
|
272
272
|
return "image";
|
|
273
273
|
}
|
|
274
274
|
static clone(e) {
|
|
275
|
-
return new
|
|
275
|
+
return new A(
|
|
276
276
|
e.__src,
|
|
277
277
|
e.__altText,
|
|
278
278
|
e.__width,
|
|
@@ -283,7 +283,7 @@ class z extends le {
|
|
|
283
283
|
}
|
|
284
284
|
static importJSON(e) {
|
|
285
285
|
const { altText: n, height: i, width: a, src: l, meta: s } = e;
|
|
286
|
-
return
|
|
286
|
+
return pt({
|
|
287
287
|
altText: n,
|
|
288
288
|
height: i,
|
|
289
289
|
src: l,
|
|
@@ -351,7 +351,7 @@ class z extends le {
|
|
|
351
351
|
);
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function pt({
|
|
355
355
|
altText: t,
|
|
356
356
|
height: r,
|
|
357
357
|
src: e,
|
|
@@ -360,34 +360,34 @@ function gt({
|
|
|
360
360
|
key: a
|
|
361
361
|
}) {
|
|
362
362
|
return se(
|
|
363
|
-
new
|
|
363
|
+
new A(e, t, n, r, i, a)
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
366
|
function In(t) {
|
|
367
|
-
return t instanceof
|
|
367
|
+
return t instanceof A;
|
|
368
368
|
}
|
|
369
369
|
const Rn = [
|
|
370
|
-
It,
|
|
371
370
|
Rt,
|
|
371
|
+
Ot,
|
|
372
372
|
st,
|
|
373
|
+
Et,
|
|
373
374
|
St,
|
|
374
|
-
Nt,
|
|
375
375
|
B,
|
|
376
|
-
Ot,
|
|
377
|
-
$t,
|
|
378
376
|
zt,
|
|
379
|
-
|
|
377
|
+
At,
|
|
378
|
+
$t,
|
|
379
|
+
A
|
|
380
380
|
], On = [
|
|
381
|
-
It,
|
|
382
381
|
Rt,
|
|
382
|
+
Ot,
|
|
383
383
|
st,
|
|
384
|
+
Et,
|
|
384
385
|
St,
|
|
385
|
-
Nt,
|
|
386
386
|
B,
|
|
387
|
-
Ot,
|
|
388
|
-
$t,
|
|
389
387
|
zt,
|
|
390
|
-
|
|
388
|
+
At,
|
|
389
|
+
$t,
|
|
390
|
+
A,
|
|
391
391
|
G,
|
|
392
392
|
{
|
|
393
393
|
replace: B,
|
|
@@ -424,10 +424,10 @@ function Tr(t) {
|
|
|
424
424
|
function xr(t) {
|
|
425
425
|
return k({ 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);
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function Lr(t) {
|
|
428
428
|
return k({ 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);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function wr(t) {
|
|
431
431
|
return k({ 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);
|
|
432
432
|
}
|
|
433
433
|
function yr(t) {
|
|
@@ -451,7 +451,7 @@ function Rr(t) {
|
|
|
451
451
|
function Or(t) {
|
|
452
452
|
return k({ 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);
|
|
453
453
|
}
|
|
454
|
-
const
|
|
454
|
+
const zr = tr("div", {
|
|
455
455
|
width: "10rem",
|
|
456
456
|
display: "flex"
|
|
457
457
|
}), Qt = {
|
|
@@ -466,7 +466,7 @@ const $r = tr("div", {
|
|
|
466
466
|
paragraph: "Normal",
|
|
467
467
|
quote: "Sitat",
|
|
468
468
|
check: "Avkrysningsliste"
|
|
469
|
-
},
|
|
469
|
+
}, Ar = {
|
|
470
470
|
bullet: /* @__PURE__ */ o(Sr, { size: "1.25rem" }),
|
|
471
471
|
h1: /* @__PURE__ */ o(br, { size: "1.25rem" }),
|
|
472
472
|
h2: /* @__PURE__ */ o(vr, { size: "1.25rem" }),
|
|
@@ -476,12 +476,12 @@ const $r = tr("div", {
|
|
|
476
476
|
h6: /* @__PURE__ */ o(Tr, { size: "1.25rem" }),
|
|
477
477
|
number: /* @__PURE__ */ o(Nr, { size: "1.25rem" }),
|
|
478
478
|
check: /* @__PURE__ */ o(yr, { size: "1.25rem" }),
|
|
479
|
-
paragraph: /* @__PURE__ */ o(
|
|
479
|
+
paragraph: /* @__PURE__ */ o(Lr, { size: "1.25rem" }),
|
|
480
480
|
quote: /* @__PURE__ */ o(Er, { size: "1.25rem" })
|
|
481
481
|
}, x = ({
|
|
482
482
|
blockType: t
|
|
483
483
|
}) => /* @__PURE__ */ g(F, { children: [
|
|
484
|
-
/* @__PURE__ */ o(H, { css: { display: "flex", flex: "0 0 auto" }, children:
|
|
484
|
+
/* @__PURE__ */ o(H, { css: { display: "flex", flex: "0 0 auto" }, children: Ar[t] }),
|
|
485
485
|
/* @__PURE__ */ o(
|
|
486
486
|
H,
|
|
487
487
|
{
|
|
@@ -494,8 +494,8 @@ const $r = tr("div", {
|
|
|
494
494
|
children: Qt[t]
|
|
495
495
|
}
|
|
496
496
|
)
|
|
497
|
-
] }),
|
|
498
|
-
if (!
|
|
497
|
+
] }), $r = (t) => {
|
|
498
|
+
if (!w(t))
|
|
499
499
|
return null;
|
|
500
500
|
const r = t.anchor.getNode();
|
|
501
501
|
let e = r.getKey() === "root" ? r : Yt(r, (n) => {
|
|
@@ -511,7 +511,7 @@ const $r = tr("div", {
|
|
|
511
511
|
y(() => t.registerCommand(
|
|
512
512
|
j,
|
|
513
513
|
() => {
|
|
514
|
-
const c =
|
|
514
|
+
const c = L(), u = $r(c);
|
|
515
515
|
if (!u)
|
|
516
516
|
return !1;
|
|
517
517
|
const { element: p, anchorNode: m } = u, S = p.getKey();
|
|
@@ -532,15 +532,15 @@ const $r = tr("div", {
|
|
|
532
532
|
), [t]);
|
|
533
533
|
const n = (c) => {
|
|
534
534
|
r !== c && t.update(() => {
|
|
535
|
-
const u =
|
|
536
|
-
|
|
535
|
+
const u = L();
|
|
536
|
+
w(u) && (nt(u, () => xe(c)), e(c));
|
|
537
537
|
});
|
|
538
538
|
};
|
|
539
|
-
return /* @__PURE__ */ o(
|
|
539
|
+
return /* @__PURE__ */ o(zr, { children: /* @__PURE__ */ g(
|
|
540
540
|
dt,
|
|
541
541
|
{
|
|
542
542
|
trigger: /* @__PURE__ */ o(
|
|
543
|
-
|
|
543
|
+
Bt,
|
|
544
544
|
{
|
|
545
545
|
dropdown: !0,
|
|
546
546
|
css: { display: "flex", width: "100%", overflow: "hidden" },
|
|
@@ -552,8 +552,8 @@ const $r = tr("div", {
|
|
|
552
552
|
children: [
|
|
553
553
|
/* @__PURE__ */ o(_, { onClick: () => {
|
|
554
554
|
r !== "paragraph" && t.update(() => {
|
|
555
|
-
const c =
|
|
556
|
-
|
|
555
|
+
const c = L();
|
|
556
|
+
w(c) && (nt(c, () => W()), e("paragraph"));
|
|
557
557
|
});
|
|
558
558
|
}, children: /* @__PURE__ */ o(x, { blockType: "paragraph" }) }),
|
|
559
559
|
/* @__PURE__ */ o(_, { onClick: () => n("h1"), children: /* @__PURE__ */ o(x, { blockType: "h1" }) }),
|
|
@@ -569,12 +569,12 @@ const $r = tr("div", {
|
|
|
569
569
|
r !== "number" && (t.dispatchCommand(Me, void 0), e("number"));
|
|
570
570
|
}, children: /* @__PURE__ */ o(x, { blockType: "number" }) }),
|
|
571
571
|
/* @__PURE__ */ o(_, { onClick: () => {
|
|
572
|
-
r !== "check" && (t.dispatchCommand(
|
|
572
|
+
r !== "check" && (t.dispatchCommand(It, void 0), e("check"));
|
|
573
573
|
}, children: /* @__PURE__ */ o(x, { blockType: "check" }) }),
|
|
574
574
|
/* @__PURE__ */ o(_, { onClick: () => {
|
|
575
575
|
r !== "quote" && t.update(() => {
|
|
576
|
-
const c =
|
|
577
|
-
|
|
576
|
+
const c = L();
|
|
577
|
+
w(c) && (nt(c, () => Le()), e("quote"));
|
|
578
578
|
});
|
|
579
579
|
}, children: /* @__PURE__ */ o(x, { blockType: "quote" }) })
|
|
580
580
|
]
|
|
@@ -582,8 +582,8 @@ const $r = tr("div", {
|
|
|
582
582
|
) });
|
|
583
583
|
}, Br = () => {
|
|
584
584
|
const [t] = T(), [r, e] = f(!1), [n, i] = f(!1), [a, l] = f(!1), [s, d] = f(!1), [c, u] = f(!1), p = C(() => {
|
|
585
|
-
const b =
|
|
586
|
-
|
|
585
|
+
const b = L();
|
|
586
|
+
w(b) && (e(b.hasFormat("bold")), i(b.hasFormat("italic")), l(b.hasFormat("underline")), d(b.hasFormat("code")), u(b.hasFormat("superscript")));
|
|
587
587
|
}, []);
|
|
588
588
|
y(() => tt(
|
|
589
589
|
t.registerCommand(
|
|
@@ -612,12 +612,12 @@ const $r = tr("div", {
|
|
|
612
612
|
), v = C(
|
|
613
613
|
() => t.dispatchCommand(U, "superscript"),
|
|
614
614
|
[t]
|
|
615
|
-
), M =
|
|
615
|
+
), M = Dt(() => {
|
|
616
616
|
const b = [];
|
|
617
617
|
return r && b.push("bold"), n && b.push("italic"), a && b.push("underline"), s && b.push("code"), c && b.push("superscript"), b;
|
|
618
618
|
}, [r, n, a, s, c]);
|
|
619
619
|
return /* @__PURE__ */ g(
|
|
620
|
-
|
|
620
|
+
Pt,
|
|
621
621
|
{
|
|
622
622
|
type: "multiple",
|
|
623
623
|
"aria-label": "Tekstformattering",
|
|
@@ -660,7 +660,7 @@ const $r = tr("div", {
|
|
|
660
660
|
Re(() => {
|
|
661
661
|
a(n);
|
|
662
662
|
}, [n]);
|
|
663
|
-
const { context: l, refs: s, floatingStyles: d } =
|
|
663
|
+
const { context: l, refs: s, floatingStyles: d } = gt({
|
|
664
664
|
placement: "top",
|
|
665
665
|
whileElementsMounted: Ut,
|
|
666
666
|
middleware: [
|
|
@@ -688,7 +688,7 @@ const $r = tr("div", {
|
|
|
688
688
|
})
|
|
689
689
|
]);
|
|
690
690
|
return i ? /* @__PURE__ */ o(qt, { children: /* @__PURE__ */ o(
|
|
691
|
-
|
|
691
|
+
Ht,
|
|
692
692
|
{
|
|
693
693
|
ref: s.setFloating,
|
|
694
694
|
style: d,
|
|
@@ -705,9 +705,9 @@ const $r = tr("div", {
|
|
|
705
705
|
}, Hr = ({
|
|
706
706
|
children: t,
|
|
707
707
|
...r
|
|
708
|
-
}) => /* @__PURE__ */ g(
|
|
708
|
+
}) => /* @__PURE__ */ g(ze, { "aria-label": "Formattering", ...r, children: [
|
|
709
709
|
/* @__PURE__ */ o(Dr, {}),
|
|
710
|
-
/* @__PURE__ */ o(
|
|
710
|
+
/* @__PURE__ */ o(Ae, {}),
|
|
711
711
|
/* @__PURE__ */ o(Br, {}),
|
|
712
712
|
t
|
|
713
713
|
] });
|
|
@@ -715,22 +715,22 @@ function Fr() {
|
|
|
715
715
|
const [t] = T();
|
|
716
716
|
return y(() => tt(
|
|
717
717
|
t.registerCommand(
|
|
718
|
-
|
|
718
|
+
It,
|
|
719
719
|
() => (_e(t, "check"), !0),
|
|
720
720
|
R
|
|
721
721
|
),
|
|
722
722
|
t.registerCommand(
|
|
723
723
|
ce,
|
|
724
|
-
(r) =>
|
|
724
|
+
(r) => Lt(r, t, !1),
|
|
725
725
|
R
|
|
726
726
|
),
|
|
727
727
|
t.registerCommand(
|
|
728
728
|
de,
|
|
729
|
-
(r) =>
|
|
729
|
+
(r) => Lt(r, t, !0),
|
|
730
730
|
R
|
|
731
731
|
),
|
|
732
732
|
t.registerCommand(
|
|
733
|
-
|
|
733
|
+
yt,
|
|
734
734
|
(r) => {
|
|
735
735
|
if (it() != null) {
|
|
736
736
|
const n = t.getRootElement();
|
|
@@ -754,8 +754,8 @@ function Fr() {
|
|
|
754
754
|
t.registerCommand(
|
|
755
755
|
ue,
|
|
756
756
|
(r) => t.getEditorState().read(() => {
|
|
757
|
-
const e =
|
|
758
|
-
if (
|
|
757
|
+
const e = L();
|
|
758
|
+
if (w(e) && e.isCollapsed()) {
|
|
759
759
|
const { anchor: n } = e, i = n.type === "element";
|
|
760
760
|
if (i || n.offset === 0) {
|
|
761
761
|
const a = n.getNode(), l = Yt(
|
|
@@ -777,16 +777,16 @@ function Fr() {
|
|
|
777
777
|
R
|
|
778
778
|
),
|
|
779
779
|
t.registerRootListener((r, e) => {
|
|
780
|
-
r !== null && (r.addEventListener("click",
|
|
780
|
+
r !== null && (r.addEventListener("click", Tt), r.addEventListener("pointerdown", xt)), e !== null && (e.removeEventListener("click", Tt), e.removeEventListener("pointerdown", xt));
|
|
781
781
|
})
|
|
782
782
|
), [t]), null;
|
|
783
783
|
}
|
|
784
784
|
function Vt(t, r) {
|
|
785
785
|
const e = t.target;
|
|
786
|
-
if (e === null || !
|
|
786
|
+
if (e === null || !_t(e))
|
|
787
787
|
return;
|
|
788
788
|
const n = e.firstChild;
|
|
789
|
-
if (n != null &&
|
|
789
|
+
if (n != null && _t(n) && (n.tagName === "UL" || n.tagName === "OL"))
|
|
790
790
|
return;
|
|
791
791
|
const i = e.parentNode;
|
|
792
792
|
if (!i || i.__lexicalListType !== "check")
|
|
@@ -794,7 +794,7 @@ function Vt(t, r) {
|
|
|
794
794
|
const a = t.pageX, l = e.getBoundingClientRect();
|
|
795
795
|
(e.dir === "rtl" ? a < l.right && a > l.right - 20 : a > l.left && a < l.left + 20) && r();
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function Tt(t) {
|
|
798
798
|
Vt(t, () => {
|
|
799
799
|
const r = t.target, e = Ur(r);
|
|
800
800
|
e != null && e.isEditable() && e.update(() => {
|
|
@@ -805,7 +805,7 @@ function _t(t) {
|
|
|
805
805
|
});
|
|
806
806
|
});
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function xt(t) {
|
|
809
809
|
Vt(t, () => {
|
|
810
810
|
t.preventDefault();
|
|
811
811
|
});
|
|
@@ -836,7 +836,7 @@ function Wr(t, r) {
|
|
|
836
836
|
}
|
|
837
837
|
return null;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Lt(t, r, e) {
|
|
840
840
|
const n = it();
|
|
841
841
|
return n != null && r.update(() => {
|
|
842
842
|
const i = lt(n);
|
|
@@ -856,13 +856,13 @@ const Zt = pe("INSERT_IMAGE_COMMAND");
|
|
|
856
856
|
function jr() {
|
|
857
857
|
const [t] = ar();
|
|
858
858
|
return y(() => {
|
|
859
|
-
if (!t.hasNodes([
|
|
859
|
+
if (!t.hasNodes([A]))
|
|
860
860
|
throw new Error("ImagePlugin: ImageNode not registered on editor");
|
|
861
861
|
return tt(
|
|
862
862
|
t.registerCommand(
|
|
863
863
|
Zt,
|
|
864
864
|
(r) => {
|
|
865
|
-
const e =
|
|
865
|
+
const e = pt(r);
|
|
866
866
|
return me([e]), wt(e.getParentOrThrow()) && Ze(e, W).selectEnd(), !0;
|
|
867
867
|
},
|
|
868
868
|
fe
|
|
@@ -899,7 +899,7 @@ const Kr = () => /* @__PURE__ */ g(F, { children: [
|
|
|
899
899
|
}
|
|
900
900
|
}));
|
|
901
901
|
}, []), null;
|
|
902
|
-
}, Yr =
|
|
902
|
+
}, Yr = $e("div", {
|
|
903
903
|
border: "1px solid $borderDarker",
|
|
904
904
|
borderRadius: "$md",
|
|
905
905
|
position: "relative",
|
|
@@ -950,7 +950,7 @@ const Kr = () => /* @__PURE__ */ g(F, { children: [
|
|
|
950
950
|
},
|
|
951
951
|
children: /* @__PURE__ */ o(ht, {})
|
|
952
952
|
}
|
|
953
|
-
),
|
|
953
|
+
), zn = ({
|
|
954
954
|
isLoading: t,
|
|
955
955
|
children: r,
|
|
956
956
|
placeholderText: e,
|
|
@@ -965,7 +965,7 @@ const Kr = () => /* @__PURE__ */ g(F, { children: [
|
|
|
965
965
|
css: p,
|
|
966
966
|
signUrl: m
|
|
967
967
|
}) => {
|
|
968
|
-
const { hasFocus: S, attributes: E } = ur({ onBlur: c }), h = K(null), v =
|
|
968
|
+
const { hasFocus: S, attributes: E } = ur({ onBlur: c }), h = K(null), v = Dt(
|
|
969
969
|
() => ({ hasFocus: S, editorRef: h, signUrl: m }),
|
|
970
970
|
[S, m]
|
|
971
971
|
);
|
|
@@ -1125,22 +1125,21 @@ const Kr = () => /* @__PURE__ */ g(F, { children: [
|
|
|
1125
1125
|
border: "1px solid $gray500",
|
|
1126
1126
|
borderRadius: 2
|
|
1127
1127
|
},
|
|
1128
|
-
"&::after": {
|
|
1129
|
-
content: "",
|
|
1130
|
-
width: 8,
|
|
1131
|
-
height: 4,
|
|
1132
|
-
top: 6,
|
|
1133
|
-
left: 4,
|
|
1134
|
-
display: "block",
|
|
1135
|
-
position: "absolute",
|
|
1136
|
-
borderLeft: "2px solid white",
|
|
1137
|
-
borderBottom: "2px solid white",
|
|
1138
|
-
transform: "rotate(-45deg)"
|
|
1139
|
-
},
|
|
1140
1128
|
"&[aria-checked=true]": {
|
|
1141
1129
|
"&::before": {
|
|
1142
|
-
|
|
1143
|
-
|
|
1130
|
+
borderColor: "black"
|
|
1131
|
+
},
|
|
1132
|
+
"&::after": {
|
|
1133
|
+
content: "",
|
|
1134
|
+
width: 8,
|
|
1135
|
+
height: 4,
|
|
1136
|
+
top: 6,
|
|
1137
|
+
left: 4,
|
|
1138
|
+
display: "block",
|
|
1139
|
+
position: "absolute",
|
|
1140
|
+
borderLeft: "2px solid black",
|
|
1141
|
+
borderBottom: "2px solid black",
|
|
1142
|
+
transform: "rotate(-45deg)"
|
|
1144
1143
|
}
|
|
1145
1144
|
},
|
|
1146
1145
|
"&:focus": {
|
|
@@ -1220,7 +1219,7 @@ const Kr = () => /* @__PURE__ */ g(F, { children: [
|
|
|
1220
1219
|
defaultVariants: {
|
|
1221
1220
|
size: "md"
|
|
1222
1221
|
}
|
|
1223
|
-
},
|
|
1222
|
+
}, An = er(Jr), Xr = ({
|
|
1224
1223
|
uploadFile: t,
|
|
1225
1224
|
...r
|
|
1226
1225
|
}) => {
|
|
@@ -1241,11 +1240,11 @@ const Kr = () => /* @__PURE__ */ g(F, { children: [
|
|
|
1241
1240
|
meta: { width: n.width, height: n.height }
|
|
1242
1241
|
}), r.onOpenChange(!1));
|
|
1243
1242
|
};
|
|
1244
|
-
return /* @__PURE__ */ g(
|
|
1243
|
+
return /* @__PURE__ */ g(Ft, { ...r, children: [
|
|
1245
1244
|
/* @__PURE__ */ o(De, { children: "Sett inn bilde" }),
|
|
1246
1245
|
t.isLoading && /* @__PURE__ */ o(ht, {}),
|
|
1247
1246
|
/* @__PURE__ */ o(
|
|
1248
|
-
|
|
1247
|
+
ut,
|
|
1249
1248
|
{
|
|
1250
1249
|
type: "file",
|
|
1251
1250
|
accept: "image/png, image/jpeg",
|
|
@@ -1266,9 +1265,9 @@ const Kr = () => /* @__PURE__ */ g(F, { children: [
|
|
|
1266
1265
|
)
|
|
1267
1266
|
] })
|
|
1268
1267
|
] });
|
|
1269
|
-
},
|
|
1268
|
+
}, $n = ({ uploadFile: t }) => {
|
|
1270
1269
|
const [r] = T(), [e, n] = f(!1), i = C(() => {
|
|
1271
|
-
r.dispatchCommand(
|
|
1270
|
+
r.dispatchCommand(we, {
|
|
1272
1271
|
rows: "3",
|
|
1273
1272
|
columns: "3",
|
|
1274
1273
|
includeHeaders: !1
|
|
@@ -1278,7 +1277,7 @@ const Kr = () => /* @__PURE__ */ g(F, { children: [
|
|
|
1278
1277
|
/* @__PURE__ */ g(
|
|
1279
1278
|
dt,
|
|
1280
1279
|
{
|
|
1281
|
-
trigger: /* @__PURE__ */ o(
|
|
1280
|
+
trigger: /* @__PURE__ */ o(Bt, { dropdown: !0, children: "Sett inn" }),
|
|
1282
1281
|
side: "bottom",
|
|
1283
1282
|
align: "end",
|
|
1284
1283
|
children: [
|
|
@@ -1311,7 +1310,7 @@ const Dn = () => {
|
|
|
1311
1310
|
y(() => {
|
|
1312
1311
|
!n && r && e(null);
|
|
1313
1312
|
}, [n, r]);
|
|
1314
|
-
const { refs: i, floatingStyles: a } =
|
|
1313
|
+
const { refs: i, floatingStyles: a } = gt({
|
|
1315
1314
|
placement: "top-end",
|
|
1316
1315
|
open: !!r,
|
|
1317
1316
|
elements: {
|
|
@@ -1322,8 +1321,8 @@ const Dn = () => {
|
|
|
1322
1321
|
y(() => t.registerCommand(
|
|
1323
1322
|
j,
|
|
1324
1323
|
() => {
|
|
1325
|
-
const s =
|
|
1326
|
-
if (
|
|
1324
|
+
const s = L();
|
|
1325
|
+
if (w(s)) {
|
|
1327
1326
|
const d = s.anchor.getNode(), c = ye(d);
|
|
1328
1327
|
e(c ? t.getElementByKey(c.getKey()) : null);
|
|
1329
1328
|
}
|
|
@@ -1335,16 +1334,16 @@ const Dn = () => {
|
|
|
1335
1334
|
t.update(() => {
|
|
1336
1335
|
switch (s) {
|
|
1337
1336
|
case "add-row-over":
|
|
1338
|
-
|
|
1337
|
+
Ct(!1);
|
|
1339
1338
|
break;
|
|
1340
1339
|
case "add-row-under":
|
|
1341
|
-
|
|
1340
|
+
Ct(!0);
|
|
1342
1341
|
break;
|
|
1343
1342
|
case "add-column-left":
|
|
1344
|
-
|
|
1343
|
+
vt(!1);
|
|
1345
1344
|
break;
|
|
1346
1345
|
case "add-column-right":
|
|
1347
|
-
|
|
1346
|
+
vt(!0);
|
|
1348
1347
|
break;
|
|
1349
1348
|
case "delete-row":
|
|
1350
1349
|
Se();
|
|
@@ -1371,26 +1370,26 @@ const Dn = () => {
|
|
|
1371
1370
|
}
|
|
1372
1371
|
),
|
|
1373
1372
|
children: [
|
|
1374
|
-
/* @__PURE__ */ o(
|
|
1375
|
-
/* @__PURE__ */ o(
|
|
1376
|
-
/* @__PURE__ */ o(
|
|
1377
|
-
/* @__PURE__ */ o(
|
|
1378
|
-
/* @__PURE__ */ o(
|
|
1379
|
-
/* @__PURE__ */ o(
|
|
1380
|
-
/* @__PURE__ */ o(
|
|
1381
|
-
/* @__PURE__ */ o(
|
|
1373
|
+
/* @__PURE__ */ o($, { onClick: l("add-row-over"), children: "Legg til rad over" }),
|
|
1374
|
+
/* @__PURE__ */ o($, { onClick: l("add-row-under"), children: "Legg til rad under" }),
|
|
1375
|
+
/* @__PURE__ */ o(Mt, {}),
|
|
1376
|
+
/* @__PURE__ */ o($, { onClick: l("add-column-left"), children: "Legg til kolonne venstre" }),
|
|
1377
|
+
/* @__PURE__ */ o($, { onClick: l("add-column-right"), children: "Legg til kolonne høyre" }),
|
|
1378
|
+
/* @__PURE__ */ o(Mt, {}),
|
|
1379
|
+
/* @__PURE__ */ o($, { onClick: l("delete-row"), children: "Fjern rad" }),
|
|
1380
|
+
/* @__PURE__ */ o($, { onClick: l("delete-column"), children: "Fjern kolonne" })
|
|
1382
1381
|
]
|
|
1383
1382
|
}
|
|
1384
1383
|
) : null;
|
|
1385
1384
|
};
|
|
1386
|
-
function
|
|
1385
|
+
function mt(t) {
|
|
1387
1386
|
let r = t;
|
|
1388
1387
|
const e = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi, n = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
|
|
1389
1388
|
return r = String(r).trim(), r.match(e) || r.match(n) ? r : "https://";
|
|
1390
1389
|
}
|
|
1391
1390
|
function te(t) {
|
|
1392
1391
|
const r = t.anchor, e = t.focus, n = t.anchor.getNode(), i = t.focus.getNode();
|
|
1393
|
-
return n === i ? n : t.isBackward() ?
|
|
1392
|
+
return n === i ? n : t.isBackward() ? bt(e) ? n : i : bt(r) ? n : i;
|
|
1394
1393
|
}
|
|
1395
1394
|
const Bn = (t) => (O.baseURL = t, O), J = class extends B {
|
|
1396
1395
|
static getType() {
|
|
@@ -1434,14 +1433,14 @@ const Zr = ({ onClose: t }) => {
|
|
|
1434
1433
|
const [r] = T(), e = C(
|
|
1435
1434
|
(i) => {
|
|
1436
1435
|
r.update(() => {
|
|
1437
|
-
const a =
|
|
1438
|
-
if (
|
|
1439
|
-
const l =
|
|
1436
|
+
const a = L();
|
|
1437
|
+
if (w(a) && a.isCollapsed()) {
|
|
1438
|
+
const l = z(i);
|
|
1440
1439
|
a.insertNodes([l]);
|
|
1441
|
-
const s =
|
|
1440
|
+
const s = Nt();
|
|
1442
1441
|
s.setTextNodeRange(l, 0, l, i.length), Q(s);
|
|
1443
1442
|
}
|
|
1444
|
-
r.dispatchCommand(V,
|
|
1443
|
+
r.dispatchCommand(V, mt(i));
|
|
1445
1444
|
});
|
|
1446
1445
|
},
|
|
1447
1446
|
[r]
|
|
@@ -1449,7 +1448,7 @@ const Zr = ({ onClose: t }) => {
|
|
|
1449
1448
|
return /* @__PURE__ */ g("form", { onSubmit: (i) => {
|
|
1450
1449
|
e(i.currentTarget.url.value), t();
|
|
1451
1450
|
}, children: [
|
|
1452
|
-
/* @__PURE__ */ o(
|
|
1451
|
+
/* @__PURE__ */ o(ut, { name: "url", label: "URL", type: "url", required: !0 }),
|
|
1453
1452
|
/* @__PURE__ */ g(Z, { children: [
|
|
1454
1453
|
/* @__PURE__ */ o(N, { onClick: t, children: "Avbryt" }),
|
|
1455
1454
|
/* @__PURE__ */ o(N, { type: "submit", variant: "primary", children: "Sett inn" })
|
|
@@ -1462,12 +1461,12 @@ const Zr = ({ onClose: t }) => {
|
|
|
1462
1461
|
const [e] = T(), [n, i] = f([]), a = r(), l = C(
|
|
1463
1462
|
(s) => {
|
|
1464
1463
|
e.update(() => {
|
|
1465
|
-
const d =
|
|
1466
|
-
if (
|
|
1464
|
+
const d = L();
|
|
1465
|
+
if (w(d)) {
|
|
1467
1466
|
const c = [];
|
|
1468
1467
|
for (const [u, p] of s.entries()) {
|
|
1469
1468
|
const m = ee(p.value);
|
|
1470
|
-
m.append(
|
|
1469
|
+
m.append(z(p.label)), c.push(m), u !== s.length - 1 && c.push(z(" "));
|
|
1471
1470
|
}
|
|
1472
1471
|
d.insertNodes(c);
|
|
1473
1472
|
}
|
|
@@ -1516,20 +1515,20 @@ const Zr = ({ onClose: t }) => {
|
|
|
1516
1515
|
e.update(() => {
|
|
1517
1516
|
if (!n)
|
|
1518
1517
|
return;
|
|
1519
|
-
const s =
|
|
1520
|
-
if (
|
|
1521
|
-
const d =
|
|
1518
|
+
const s = L();
|
|
1519
|
+
if (w(s) && s.isCollapsed()) {
|
|
1520
|
+
const d = z(n.name);
|
|
1522
1521
|
s.insertNodes([d]);
|
|
1523
|
-
const c =
|
|
1522
|
+
const c = Nt();
|
|
1524
1523
|
c.setTextNodeRange(d, 0, d, n.name.length), Q(c);
|
|
1525
1524
|
}
|
|
1526
|
-
e.dispatchCommand(V,
|
|
1525
|
+
e.dispatchCommand(V, mt(n.url));
|
|
1527
1526
|
});
|
|
1528
1527
|
}, [e, n]);
|
|
1529
1528
|
return /* @__PURE__ */ g(F, { children: [
|
|
1530
1529
|
r.isLoading && /* @__PURE__ */ o(ht, {}),
|
|
1531
1530
|
/* @__PURE__ */ o(
|
|
1532
|
-
|
|
1531
|
+
ut,
|
|
1533
1532
|
{
|
|
1534
1533
|
type: "file",
|
|
1535
1534
|
onChange: a,
|
|
@@ -1560,7 +1559,7 @@ const Zr = ({ onClose: t }) => {
|
|
|
1560
1559
|
const [i, a] = f("url"), l = () => {
|
|
1561
1560
|
r(!1);
|
|
1562
1561
|
};
|
|
1563
|
-
return /* @__PURE__ */ g(
|
|
1562
|
+
return /* @__PURE__ */ g(Ft, { open: t, onOpenChange: r, css: { width: "600px" }, children: [
|
|
1564
1563
|
/* @__PURE__ */ g(Be, { css: { marginBottom: "$8" }, children: [
|
|
1565
1564
|
/* @__PURE__ */ o(ot, { active: i === "url", onClick: () => a("url"), children: "URL" }),
|
|
1566
1565
|
e && /* @__PURE__ */ o(
|
|
@@ -1582,8 +1581,8 @@ const Zr = ({ onClose: t }) => {
|
|
|
1582
1581
|
uploadFile: r
|
|
1583
1582
|
}) => {
|
|
1584
1583
|
const [e] = T(), [n, i] = f(!1), [a, l] = f(!1), s = C(() => {
|
|
1585
|
-
const d =
|
|
1586
|
-
if (
|
|
1584
|
+
const d = L();
|
|
1585
|
+
if (w(d)) {
|
|
1587
1586
|
const c = te(d), u = c.getParent();
|
|
1588
1587
|
i(Y(u) || Y(c));
|
|
1589
1588
|
}
|
|
@@ -1592,7 +1591,7 @@ const Zr = ({ onClose: t }) => {
|
|
|
1592
1591
|
j,
|
|
1593
1592
|
() => (s(), !1),
|
|
1594
1593
|
at
|
|
1595
|
-
), [e, s]), /* @__PURE__ */ g(
|
|
1594
|
+
), [e, s]), /* @__PURE__ */ g(Pt, { type: "single", value: n ? "link" : "", children: [
|
|
1596
1595
|
/* @__PURE__ */ o(
|
|
1597
1596
|
D,
|
|
1598
1597
|
{
|
|
@@ -1601,7 +1600,7 @@ const Zr = ({ onClose: t }) => {
|
|
|
1601
1600
|
},
|
|
1602
1601
|
title: "Lenke",
|
|
1603
1602
|
value: "link",
|
|
1604
|
-
children: /* @__PURE__ */ o(
|
|
1603
|
+
children: /* @__PURE__ */ o(wr, { size: "1.25rem" })
|
|
1605
1604
|
}
|
|
1606
1605
|
),
|
|
1607
1606
|
/* @__PURE__ */ o(
|
|
@@ -1621,7 +1620,7 @@ const Zr = ({ onClose: t }) => {
|
|
|
1621
1620
|
a(e.getURL());
|
|
1622
1621
|
}) : a("");
|
|
1623
1622
|
}, [t, e]);
|
|
1624
|
-
const s = !!(e && i && l), { refs: d, floatingStyles: c, context: u } =
|
|
1623
|
+
const s = !!(e && i && l), { refs: d, floatingStyles: c, context: u } = gt({
|
|
1625
1624
|
placement: "top",
|
|
1626
1625
|
strategy: "fixed",
|
|
1627
1626
|
open: s,
|
|
@@ -1635,13 +1634,13 @@ const Zr = ({ onClose: t }) => {
|
|
|
1635
1634
|
Qe(u)
|
|
1636
1635
|
]), m = C(() => {
|
|
1637
1636
|
var v;
|
|
1638
|
-
const h =
|
|
1639
|
-
if (
|
|
1637
|
+
const h = L();
|
|
1638
|
+
if (w(h)) {
|
|
1640
1639
|
const M = te(h), b = M.getParent();
|
|
1641
1640
|
let q = null;
|
|
1642
1641
|
if (Y(b) ? q = b : Y(M) && (q = M), q) {
|
|
1643
|
-
const rt = window.getSelection(),
|
|
1644
|
-
h !== null && rt !== null &&
|
|
1642
|
+
const rt = window.getSelection(), ft = t.getRootElement();
|
|
1643
|
+
h !== null && rt !== null && ft !== null && ft.contains(rt.anchorNode) && t.isEditable() && (r.current = ((v = rt.focusNode) == null ? void 0 : v.parentElement) ?? null);
|
|
1645
1644
|
}
|
|
1646
1645
|
n(q);
|
|
1647
1646
|
}
|
|
@@ -1666,15 +1665,15 @@ const Zr = ({ onClose: t }) => {
|
|
|
1666
1665
|
R
|
|
1667
1666
|
),
|
|
1668
1667
|
t.registerCommand(
|
|
1669
|
-
|
|
1668
|
+
yt,
|
|
1670
1669
|
() => e ? (n(null), !0) : !1,
|
|
1671
1670
|
be
|
|
1672
1671
|
)
|
|
1673
1672
|
), [t, m, e]), !s)
|
|
1674
1673
|
return null;
|
|
1675
|
-
const E =
|
|
1674
|
+
const E = mt(i);
|
|
1676
1675
|
return /* @__PURE__ */ o(qt, { children: /* @__PURE__ */ g(
|
|
1677
|
-
|
|
1676
|
+
Ht,
|
|
1678
1677
|
{
|
|
1679
1678
|
ref: d.setFloating,
|
|
1680
1679
|
css: {
|
|
@@ -1711,17 +1710,17 @@ const Zr = ({ onClose: t }) => {
|
|
|
1711
1710
|
) });
|
|
1712
1711
|
};
|
|
1713
1712
|
export {
|
|
1714
|
-
|
|
1713
|
+
pt as $createImageNode,
|
|
1715
1714
|
ee as $createRutineLinkNode,
|
|
1716
1715
|
In as $isImageNode,
|
|
1717
1716
|
Vr as $isRutineLinkNode,
|
|
1718
1717
|
Pr as FloatingToolbar,
|
|
1719
|
-
|
|
1720
|
-
|
|
1718
|
+
A as ImageNode,
|
|
1719
|
+
$n as InsertSelector,
|
|
1721
1720
|
Hn as LinkEditPlugin,
|
|
1722
1721
|
G as LinkTargetNode,
|
|
1723
1722
|
Pn as LinkToolbarButton,
|
|
1724
|
-
|
|
1723
|
+
zn as RichTextEditor,
|
|
1725
1724
|
Hr as RichTextToolbar,
|
|
1726
1725
|
O as RutineLinkNode,
|
|
1727
1726
|
Bn as RutineLinkNodeInit,
|
|
@@ -1732,7 +1731,7 @@ export {
|
|
|
1732
1731
|
cr as isEditorState,
|
|
1733
1732
|
Jt as isJSON,
|
|
1734
1733
|
Xt as richTextContext,
|
|
1735
|
-
|
|
1734
|
+
An as richTextCss,
|
|
1736
1735
|
Jr as richTextStyleObj,
|
|
1737
1736
|
hr as setStateFromPlainText,
|
|
1738
1737
|
En as stateToHTML,
|