eddyter 1.4.17 → 1.4.18
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/{AIChatPlugin-2pIKhzIw.js → AIChatPlugin-DsUPycjT.js} +41 -40
- package/dist/CombinedAutocompletGrammarPlugin-BXOz6IRb.js +1778 -0
- package/dist/{CommentBubblePlugin-J3r4kNGK.js → CommentBubblePlugin-kiMehQkL.js} +5 -5
- package/dist/{CommentPlugin-BbuE8_Aj.js → CommentPlugin-DIuM-Jao.js} +24 -24
- package/dist/{LazySignatureCanvas-D1t8oQDK.js → LazySignatureCanvas-BtcxlSTW.js} +1 -1
- package/dist/{NotePanelPlugin-C16G36Jd.js → NotePanelPlugin-FirMseLu.js} +3 -3
- package/dist/{TextEnhancePlugin-BShY1r5J.js → TextEnhancePlugin-oXbL_F1i.js} +10 -9
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/assets/style.css +1 -1
- package/dist/components/CommentToggle/CommentToggle.d.ts +1 -0
- package/dist/components/ConfigurableEditorWithAuth.d.ts +2 -0
- package/dist/editor/components/FloatingToolbarManager.d.ts +2 -1
- package/dist/editor/components/ToolbarMount.d.ts +2 -1
- package/dist/{generateDocxThumbnail-Ve0zlObJ.js → generateDocxThumbnail-RE7yNAXP.js} +7 -6
- package/dist/{generatePdfThumbnail-EuSjdwzm.js → generatePdfThumbnail-CnldK2yE.js} +4 -4
- package/dist/{generateXlsxThumbnail-C10kl6qh.js → generateXlsxThumbnail-BpBB4ePK.js} +1 -1
- package/dist/{html2pdf.bundle.min-BQaO0VTp.js → html2pdf.bundle.min-u-o_L5zA.js} +1 -1
- package/dist/{index-gPq4n7_a.js → index-B4W_mfNI.js} +15 -15
- package/dist/{index-BSgLtgyt.js → index-C8ZUqYRj.js} +23 -23
- package/dist/{index-B8zPtmsK.js → index-CKRp6axU.js} +9 -9
- package/dist/{index-ClsuXAKJ.js → index-CL0adQ5R.js} +1 -1
- package/dist/{index-CxOOJD40.js → index-CXyZgoBl.js} +12941 -14705
- package/dist/{index-D25uusM-.js → index-DZAvLKar.js} +27 -26
- package/dist/{index-CoLO4gm_.js → index-F2-F96Nx.js} +11 -10
- package/dist/index.js +1 -1
- package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +1 -0
- package/dist/plugins/WordCountPlugin.d.ts +1 -0
- package/dist/sparkles-CTAYmQOE.js +17 -0
- package/dist/{square-DrMKkLmP.js → square-CupR-YWR.js} +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/{useVoiceToText-DCddJzYF.js → useVoiceToText-U0yKgS5Q.js} +14 -14
- package/package.json +1 -1
|
@@ -52,6 +52,8 @@ interface ConfigurableEditorWithAuthProps {
|
|
|
52
52
|
toolbar?: ToolbarConfig;
|
|
53
53
|
/** Additional class name for floating elements and portal container */
|
|
54
54
|
floatingToolbarClassName?: string;
|
|
55
|
+
/** Whether to constrain the editor width and center it like a document page */
|
|
56
|
+
fitToPage?: boolean;
|
|
55
57
|
}
|
|
56
58
|
declare const ConfigurableEditorWithAuth: React.FC<ConfigurableEditorWithAuthProps>;
|
|
57
59
|
export default ConfigurableEditorWithAuth;
|
|
@@ -6,6 +6,7 @@ interface FloatingToolbarManagerProps {
|
|
|
6
6
|
topOffset?: number;
|
|
7
7
|
zIndex?: number;
|
|
8
8
|
floatingToolbarClassName?: string;
|
|
9
|
+
className?: string;
|
|
9
10
|
}
|
|
10
|
-
export default function FloatingToolbarManager({ editorRef, children, mode, topOffset, zIndex, floatingToolbarClassName, }: FloatingToolbarManagerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default function FloatingToolbarManager({ editorRef, children, mode, topOffset, zIndex, floatingToolbarClassName, className, }: FloatingToolbarManagerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -4,6 +4,7 @@ interface ToolbarMountProps {
|
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
isFloating?: boolean;
|
|
6
6
|
placeholderHeight?: number;
|
|
7
|
+
className?: string;
|
|
7
8
|
}
|
|
8
|
-
export default function ToolbarMount({ mountRef, children, isFloating, placeholderHeight, }: ToolbarMountProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default function ToolbarMount({ mountRef, children, isFloating, placeholderHeight, className, }: ToolbarMountProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h as
|
|
1
|
+
import { c as Tt, g as Se } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
2
|
+
import { h as Ce } from "./html2canvas.esm-BD_Vwvv8.js";
|
|
3
|
+
import { a0 as xe, aC as Ee } from "./index-CXyZgoBl.js";
|
|
3
4
|
function Ft(c) {
|
|
4
5
|
throw new Error('Could not dynamically require "' + c + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
5
6
|
}
|
|
@@ -5446,12 +5447,12 @@ async function Jr(c) {
|
|
|
5446
5447
|
for (let i = 0; i < n.length; i++) o[i] = n.charCodeAt(i);
|
|
5447
5448
|
return o;
|
|
5448
5449
|
}
|
|
5449
|
-
const e = `${
|
|
5450
|
+
const e = `${xe}${Ee.project.proxyPdf}?url=${encodeURIComponent(c)}`, t = await fetch(e);
|
|
5450
5451
|
if (!t.ok) throw new Error(`File fetch failed: ${t.status}`);
|
|
5451
5452
|
const r = await t.arrayBuffer();
|
|
5452
5453
|
return new Uint8Array(r);
|
|
5453
5454
|
}
|
|
5454
|
-
async function
|
|
5455
|
+
async function rn(c) {
|
|
5455
5456
|
const e = await Jr(c), t = document.createElement("div");
|
|
5456
5457
|
t.style.position = "fixed", t.style.left = "-9999px", t.style.top = "0", t.style.width = "624px", t.style.minHeight = "900px", t.style.overflow = "hidden", t.style.background = "#fff", t.style.zIndex = "99999", document.body.appendChild(t);
|
|
5457
5458
|
const r = document.createElement("style");
|
|
@@ -5489,7 +5490,7 @@ async function en(c) {
|
|
|
5489
5490
|
const k = d.getContext("2d");
|
|
5490
5491
|
return k && (k.fillStyle = "#fff", k.fillRect(0, 0, Ct, xt)), d.toDataURL("image/png");
|
|
5491
5492
|
}
|
|
5492
|
-
const o = await
|
|
5493
|
+
const o = await Ce(n, {
|
|
5493
5494
|
scale: 1,
|
|
5494
5495
|
useCORS: !0,
|
|
5495
5496
|
logging: !1,
|
|
@@ -5516,5 +5517,5 @@ async function en(c) {
|
|
|
5516
5517
|
}
|
|
5517
5518
|
}
|
|
5518
5519
|
export {
|
|
5519
|
-
|
|
5520
|
+
rn as generateDocxThumbnail
|
|
5520
5521
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a0 as u, aC as C } from "./index-CXyZgoBl.js";
|
|
2
2
|
const m = "https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174";
|
|
3
3
|
let w = null;
|
|
4
|
-
async function
|
|
4
|
+
async function b() {
|
|
5
5
|
if (w) return w;
|
|
6
6
|
await new Promise((n, o) => {
|
|
7
7
|
if (window.pdfjsLib) {
|
|
@@ -21,7 +21,7 @@ async function j(t) {
|
|
|
21
21
|
for (let e = 0; e < i.length; e++) c[e] = i.charCodeAt(e);
|
|
22
22
|
return c;
|
|
23
23
|
}
|
|
24
|
-
const n = `${u}${
|
|
24
|
+
const n = `${u}${C.project.proxyPdf}?url=${encodeURIComponent(t)}`, o = await fetch(n);
|
|
25
25
|
if (!o.ok) throw new Error(`PDF fetch failed: ${o.status}`);
|
|
26
26
|
const a = await o.arrayBuffer();
|
|
27
27
|
return new Uint8Array(a);
|
|
@@ -29,7 +29,7 @@ async function j(t) {
|
|
|
29
29
|
const p = 240, h = 176;
|
|
30
30
|
async function D(t) {
|
|
31
31
|
try {
|
|
32
|
-
const n = await
|
|
32
|
+
const n = await b(), o = await j(t), r = await (await n.getDocument({ data: o }).promise).getPage(1), i = r.getViewport({ scale: 1 }), c = p / i.width, e = r.getViewport({ scale: c }), s = document.createElement("canvas");
|
|
33
33
|
s.width = e.width, s.height = e.height;
|
|
34
34
|
const l = s.getContext("2d");
|
|
35
35
|
if (!l) throw new Error("Could not get 2d context");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as Ci } from "./html2canvas.esm-BD_Vwvv8.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a0 as yi, aC as Di } from "./index-CXyZgoBl.js";
|
|
3
3
|
var In = 1252, Oi = [874, 932, 936, 949, 950, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1e4], Zt = {
|
|
4
4
|
/*::[*/
|
|
5
5
|
0: 1252,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as F, Fragment as re } from "react/jsx-runtime";
|
|
2
2
|
import { $insertDataTransferForRichText as se } from "@lexical/clipboard";
|
|
3
3
|
import { useLexicalComposerContext as ee } from "@lexical/react/LexicalComposerContext";
|
|
4
4
|
import { mergeRegister as ce, $wrapNodeInElement as J } from "@lexical/utils";
|
|
5
5
|
import { $isTableCellNode as ae } from "@lexical/table";
|
|
6
6
|
import { $getNodeByKey as T, $createNodeSelection as G, $setSelection as H, $getSelection as S, $isNodeSelection as te, SELECTION_CHANGE_COMMAND as de, COMMAND_PRIORITY_LOW as ne, KEY_ENTER_COMMAND as le, $createParagraphNode as W, $isRootOrShadowRoot as V, PASTE_COMMAND as ue, $isRangeSelection as U, COMMAND_PRIORITY_CRITICAL as me } from "lexical";
|
|
7
7
|
import { useState as M, useEffect as E, useCallback as _, useRef as Q } from "react";
|
|
8
|
-
import { c as fe,
|
|
8
|
+
import { c as fe, aa as k, ab as pe, _ as N, ac as ge, ad as he, ae as be, af as ye, ag as xe, ah as Ee, ai as Ce, aj as ve, ak as Ne, al as ke, am as Z } from "./index-CXyZgoBl.js";
|
|
9
9
|
import { createPortal as Ae } from "react-dom";
|
|
10
10
|
const Pe = fe("Copy", [
|
|
11
11
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
@@ -30,8 +30,8 @@ function we({
|
|
|
30
30
|
);
|
|
31
31
|
if (R) {
|
|
32
32
|
const v = R.getBoundingClientRect(), I = e.getBoundingClientRect(), X = y.getBoundingClientRect(), oe = v.left + v.width / 2, ie = I.width / 2;
|
|
33
|
-
let
|
|
34
|
-
O < 10 && (O = 10), O + I.width > window.innerWidth - 10 && (O = window.innerWidth - I.width - 10),
|
|
33
|
+
let q = v.top - I.height - 15, O = oe - ie;
|
|
34
|
+
O < 10 && (O = 10), O + I.width > window.innerWidth - 10 && (O = window.innerWidth - I.width - 10), q < 10 && (q = v.bottom + 15), q -= X.top, O -= X.left, e.style.opacity = "1", e.style.transform = `translate(${O}px, ${q}px)`, r || (e.style.display = "flex", e.style.visibility = "visible", e.style.zIndex = "9999", l(!0));
|
|
35
35
|
} else
|
|
36
36
|
e.style.opacity = "0", e.style.visibility = "hidden";
|
|
37
37
|
}, [c, n, y, r]), x = _(() => {
|
|
@@ -79,7 +79,7 @@ function we({
|
|
|
79
79
|
const s = T(n);
|
|
80
80
|
s instanceof k && typeof s.setAlignment == "function" && s.setAlignment(e);
|
|
81
81
|
});
|
|
82
|
-
},
|
|
82
|
+
}, j = (e) => {
|
|
83
83
|
m(e), c.update(() => {
|
|
84
84
|
const s = T(n);
|
|
85
85
|
s instanceof k && typeof s.setPosition == "function" && s.setPosition(e);
|
|
@@ -104,7 +104,7 @@ function we({
|
|
|
104
104
|
}, 100), () => {
|
|
105
105
|
document.removeEventListener("mousedown", e);
|
|
106
106
|
};
|
|
107
|
-
}, [u, r]), /* @__PURE__ */
|
|
107
|
+
}, [u, r]), /* @__PURE__ */ F(
|
|
108
108
|
"div",
|
|
109
109
|
{
|
|
110
110
|
className: "floating-embed-menu cteditor-flex cteditor-gap-1 cteditor-z-10",
|
|
@@ -122,7 +122,7 @@ function we({
|
|
|
122
122
|
transition: "opacity 0.15s ease-in-out"
|
|
123
123
|
},
|
|
124
124
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ F("div", { className: K, children: [
|
|
126
126
|
/* @__PURE__ */ o(
|
|
127
127
|
"button",
|
|
128
128
|
{
|
|
@@ -170,7 +170,7 @@ function we({
|
|
|
170
170
|
)
|
|
171
171
|
] }),
|
|
172
172
|
/* @__PURE__ */ o("div", { className: "cteditor-w-px cteditor-h-6 cteditor-bg-border cteditor-flex-shrink-0" }),
|
|
173
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ F("div", { className: K, children: [
|
|
174
174
|
/* @__PURE__ */ o(
|
|
175
175
|
"button",
|
|
176
176
|
{
|
|
@@ -180,7 +180,7 @@ function we({
|
|
|
180
180
|
p === "left" && w
|
|
181
181
|
),
|
|
182
182
|
onClick: (e) => {
|
|
183
|
-
e.stopPropagation(),
|
|
183
|
+
e.stopPropagation(), j(p === "left" ? "none" : "left");
|
|
184
184
|
},
|
|
185
185
|
title: "Wrap text left (text beside card)",
|
|
186
186
|
children: /* @__PURE__ */ o(be, {})
|
|
@@ -195,7 +195,7 @@ function we({
|
|
|
195
195
|
p === "right" && w
|
|
196
196
|
),
|
|
197
197
|
onClick: (e) => {
|
|
198
|
-
e.stopPropagation(),
|
|
198
|
+
e.stopPropagation(), j(p === "right" ? "none" : "right");
|
|
199
199
|
},
|
|
200
200
|
title: "Wrap text right (text beside card)",
|
|
201
201
|
children: /* @__PURE__ */ o(ye, {})
|
|
@@ -203,7 +203,7 @@ function we({
|
|
|
203
203
|
)
|
|
204
204
|
] }),
|
|
205
205
|
/* @__PURE__ */ o("div", { className: "cteditor-w-px cteditor-h-6 cteditor-bg-border cteditor-flex-shrink-0" }),
|
|
206
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ F("div", { className: K, children: [
|
|
207
207
|
/* @__PURE__ */ o(
|
|
208
208
|
"button",
|
|
209
209
|
{
|
|
@@ -412,7 +412,7 @@ function Le(c, y) {
|
|
|
412
412
|
return !1;
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
const
|
|
415
|
+
const qe = ({
|
|
416
416
|
floatingAnchorElem: c
|
|
417
417
|
}) => {
|
|
418
418
|
const y = c ?? (typeof document < "u" ? document.body : void 0), [n] = ee();
|
|
@@ -494,10 +494,10 @@ const Fe = ({
|
|
|
494
494
|
x.forEach((z) => {
|
|
495
495
|
C += z.textContent || "";
|
|
496
496
|
});
|
|
497
|
-
const $ = L.replace(C, "").trim(),
|
|
497
|
+
const $ = L.replace(C, "").trim(), j = !!h.body.querySelector(
|
|
498
498
|
"p,h1,h2,h3,h4,h5,h6,ul,ol,li,blockquote,table,pre"
|
|
499
499
|
);
|
|
500
|
-
if ($.length === 0 && !
|
|
500
|
+
if ($.length === 0 && !j)
|
|
501
501
|
return f.preventDefault(), n.update(
|
|
502
502
|
() => {
|
|
503
503
|
const z = S();
|
|
@@ -549,5 +549,5 @@ const Fe = ({
|
|
|
549
549
|
), [n]), /* @__PURE__ */ o(re, { children: /* @__PURE__ */ o(Re, { anchorElem: y }) });
|
|
550
550
|
};
|
|
551
551
|
export {
|
|
552
|
-
|
|
552
|
+
qe as default
|
|
553
553
|
};
|
|
@@ -13,14 +13,14 @@ import { RichTextPlugin as gt } from "@lexical/react/LexicalRichTextPlugin";
|
|
|
13
13
|
import { useLexicalEditable as mt } from "@lexical/react/useLexicalEditable";
|
|
14
14
|
import { useLexicalNodeSelection as pt } from "@lexical/react/useLexicalNodeSelection";
|
|
15
15
|
import { mergeRegister as ht } from "@lexical/utils";
|
|
16
|
-
import { $getSelection as
|
|
17
|
-
import { useRef as
|
|
18
|
-
import {
|
|
16
|
+
import { $getSelection as L, $isNodeSelection as p, $setSelection as W, SELECTION_CHANGE_COMMAND as bt, COMMAND_PRIORITY_LOW as f, CLICK_COMMAND as Ct, DRAGSTART_COMMAND as Nt, KEY_DELETE_COMMAND as xt, KEY_BACKSPACE_COMMAND as vt, KEY_ENTER_COMMAND as Et, KEY_ESCAPE_COMMAND as yt, RootNode as Rt, TextNode as kt, LineBreakNode as At, ParagraphNode as St, $getNodeByKey as k, $isParagraphNode as T } from "lexical";
|
|
17
|
+
import { useRef as P, useState as w, useCallback as x, useEffect as Dt } from "react";
|
|
18
|
+
import { aL as v, ae as Lt, af as Pt, ag as Mt, ah as _t, ai as $t, aE as It, ak as zt, aH as Ot, aI as Wt } from "./index-CXyZgoBl.js";
|
|
19
19
|
function ie({
|
|
20
20
|
src: j,
|
|
21
21
|
nodeKey: g,
|
|
22
22
|
width: h,
|
|
23
|
-
height:
|
|
23
|
+
height: A,
|
|
24
24
|
maxWidth: B,
|
|
25
25
|
resizable: Y,
|
|
26
26
|
showCaption: E,
|
|
@@ -29,9 +29,9 @@ function ie({
|
|
|
29
29
|
controls: V = !0,
|
|
30
30
|
position: n = "none"
|
|
31
31
|
}) {
|
|
32
|
-
const l =
|
|
32
|
+
const l = P(null), S = P(null), [a, d, C] = pt(g), [s, M] = w(!1), [o] = at(), [y, H] = w(null), _ = P(null), K = mt(), D = x(
|
|
33
33
|
(t) => {
|
|
34
|
-
const r =
|
|
34
|
+
const r = L();
|
|
35
35
|
return a && p(r) && (t.preventDefault(), o.update(() => {
|
|
36
36
|
r.getNodes().forEach((c) => {
|
|
37
37
|
v(c) && c.remove();
|
|
@@ -41,7 +41,7 @@ function ie({
|
|
|
41
41
|
[o, a]
|
|
42
42
|
), $ = x(
|
|
43
43
|
(t) => {
|
|
44
|
-
const r =
|
|
44
|
+
const r = L(), e = S.current;
|
|
45
45
|
if (a && p(r) && r.getNodes().length === 1) {
|
|
46
46
|
if (E)
|
|
47
47
|
return W(null), t.preventDefault(), b.focus(), !0;
|
|
@@ -51,14 +51,14 @@ function ie({
|
|
|
51
51
|
return !1;
|
|
52
52
|
},
|
|
53
53
|
[b, a, E]
|
|
54
|
-
),
|
|
54
|
+
), I = x(
|
|
55
55
|
(t) => _.current === b || S.current === t.target ? (W(null), o.update(() => {
|
|
56
56
|
d(!0);
|
|
57
57
|
const r = o.getRootElement();
|
|
58
58
|
r !== null && r.focus();
|
|
59
59
|
}), !0) : !1,
|
|
60
60
|
[b, o, d]
|
|
61
|
-
),
|
|
61
|
+
), z = x(
|
|
62
62
|
(t) => {
|
|
63
63
|
const r = t;
|
|
64
64
|
if (s)
|
|
@@ -80,7 +80,7 @@ function ie({
|
|
|
80
80
|
let t = !0;
|
|
81
81
|
const r = ht(
|
|
82
82
|
o.registerUpdateListener(({ editorState: e }) => {
|
|
83
|
-
t && H(e.read(() =>
|
|
83
|
+
t && H(e.read(() => L()));
|
|
84
84
|
}),
|
|
85
85
|
o.registerCommand(
|
|
86
86
|
bt,
|
|
@@ -89,7 +89,7 @@ function ie({
|
|
|
89
89
|
),
|
|
90
90
|
o.registerCommand(
|
|
91
91
|
Ct,
|
|
92
|
-
|
|
92
|
+
z,
|
|
93
93
|
f
|
|
94
94
|
),
|
|
95
95
|
o.registerCommand(
|
|
@@ -110,7 +110,7 @@ function ie({
|
|
|
110
110
|
o.registerCommand(Et, $, f),
|
|
111
111
|
o.registerCommand(
|
|
112
112
|
yt,
|
|
113
|
-
|
|
113
|
+
I,
|
|
114
114
|
f
|
|
115
115
|
)
|
|
116
116
|
);
|
|
@@ -125,27 +125,27 @@ function ie({
|
|
|
125
125
|
g,
|
|
126
126
|
D,
|
|
127
127
|
$,
|
|
128
|
-
z,
|
|
129
128
|
I,
|
|
129
|
+
z,
|
|
130
130
|
d
|
|
131
131
|
]);
|
|
132
132
|
const X = () => {
|
|
133
133
|
o.update(() => {
|
|
134
|
-
const t =
|
|
134
|
+
const t = k(g);
|
|
135
135
|
v(t) && t.setShowCaption(!0);
|
|
136
136
|
});
|
|
137
137
|
}, G = (t, r) => {
|
|
138
138
|
setTimeout(() => {
|
|
139
139
|
M(!1);
|
|
140
140
|
}, 200), o.update(() => {
|
|
141
|
-
const e =
|
|
141
|
+
const e = k(g);
|
|
142
142
|
v(e) && e.setWidthAndHeight(t, r);
|
|
143
143
|
});
|
|
144
144
|
}, U = () => {
|
|
145
145
|
M(!0);
|
|
146
146
|
}, q = (t) => {
|
|
147
147
|
t.preventDefault(), t.stopPropagation(), o.update(() => {
|
|
148
|
-
const r =
|
|
148
|
+
const r = k(g);
|
|
149
149
|
if (v(r)) {
|
|
150
150
|
const e = r.getParent();
|
|
151
151
|
r.remove(), e && T(e) && e.getChildrenSize() === 0 && e.setFormat("left");
|
|
@@ -153,7 +153,7 @@ function ie({
|
|
|
153
153
|
});
|
|
154
154
|
}, m = (t, r) => {
|
|
155
155
|
t.preventDefault(), t.stopPropagation(), o.update(() => {
|
|
156
|
-
const e =
|
|
156
|
+
const e = k(g);
|
|
157
157
|
if (v(e)) {
|
|
158
158
|
e.setPosition(r);
|
|
159
159
|
const c = e.getParent();
|
|
@@ -173,7 +173,7 @@ function ie({
|
|
|
173
173
|
!e && !c || (t.stopPropagation(), t.shiftKey ? d(!a) : (C(), d(!0)));
|
|
174
174
|
},
|
|
175
175
|
[s, a, d, C]
|
|
176
|
-
), Q = a && p(y) && !s, O = (a || s) && K, Z = typeof h == "number" && typeof
|
|
176
|
+
), Q = a && p(y) && !s, O = (a || s) && K, Z = typeof h == "number" && typeof A == "number", tt = typeof h == "number" ? h : "auto", et = typeof A == "number" ? A : "auto";
|
|
177
177
|
return /* @__PURE__ */ N(rt, { children: [
|
|
178
178
|
/* @__PURE__ */ N(
|
|
179
179
|
"div",
|
|
@@ -238,7 +238,7 @@ function ie({
|
|
|
238
238
|
className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${n === "left" ? "cteditor-bg-accent" : ""}`,
|
|
239
239
|
"aria-label": "Wrap text left",
|
|
240
240
|
title: "Wrap text left",
|
|
241
|
-
children: /* @__PURE__ */ i(
|
|
241
|
+
children: /* @__PURE__ */ i(Lt, {})
|
|
242
242
|
}
|
|
243
243
|
),
|
|
244
244
|
/* @__PURE__ */ i(
|
|
@@ -249,7 +249,7 @@ function ie({
|
|
|
249
249
|
className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${n === "right" ? "cteditor-bg-accent" : ""}`,
|
|
250
250
|
"aria-label": "Wrap text right",
|
|
251
251
|
title: "Wrap text right",
|
|
252
|
-
children: /* @__PURE__ */ i(
|
|
252
|
+
children: /* @__PURE__ */ i(Pt, {})
|
|
253
253
|
}
|
|
254
254
|
),
|
|
255
255
|
/* @__PURE__ */ i("div", { className: "cteditor-w-px cteditor-h-5 cteditor-bg-border cteditor-mx-0.5" }),
|
|
@@ -295,7 +295,7 @@ function ie({
|
|
|
295
295
|
className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${n === "none" ? "cteditor-bg-accent" : ""}`,
|
|
296
296
|
"aria-label": "Inline",
|
|
297
297
|
title: "Inline with text",
|
|
298
|
-
children: /* @__PURE__ */ i(
|
|
298
|
+
children: /* @__PURE__ */ i(It, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
|
|
299
299
|
}
|
|
300
300
|
)
|
|
301
301
|
] }),
|
|
@@ -309,7 +309,7 @@ function ie({
|
|
|
309
309
|
className: "cteditor-size-8 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-background/80 hover:cteditor-bg-destructive hover:cteditor-text-destructive-foreground cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-border",
|
|
310
310
|
"aria-label": "Delete video",
|
|
311
311
|
title: "Delete video",
|
|
312
|
-
children: /* @__PURE__ */ i(
|
|
312
|
+
children: /* @__PURE__ */ i(zt, { className: "cteditor-w-4 cteditor-h-4" })
|
|
313
313
|
}
|
|
314
314
|
)
|
|
315
315
|
] }),
|
|
@@ -345,8 +345,8 @@ function ie({
|
|
|
345
345
|
initialEditor: b,
|
|
346
346
|
initialNodes: [
|
|
347
347
|
Rt,
|
|
348
|
-
At,
|
|
349
348
|
kt,
|
|
349
|
+
At,
|
|
350
350
|
St,
|
|
351
351
|
nt,
|
|
352
352
|
ot
|
|
@@ -2,7 +2,7 @@ import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
|
2
2
|
import { useLexicalComposerContext as B } from "@lexical/react/LexicalComposerContext";
|
|
3
3
|
import { $getNodeByKey as g } from "lexical";
|
|
4
4
|
import { useState as E, useEffect as N } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { au as k, av as y, ak as I, aw as h, ax as T, ay as W } from "./index-CXyZgoBl.js";
|
|
6
6
|
function $(e, t) {
|
|
7
7
|
const d = e.split(".").pop()?.toLowerCase();
|
|
8
8
|
return d === "pdf" || t.startsWith("data:application/pdf") ? "pdf" : d === "docx" || t.startsWith("data:application/vnd.openxmlformats") && e.toLowerCase().endsWith(".docx") ? "docx" : d === "xlsx" || d === "xls" || t.startsWith("data:application/vnd.openxmlformats-officedocument.spreadsheetml") || t.startsWith("data:application/vnd.ms-excel") ? "xlsx" : null;
|
|
@@ -16,15 +16,15 @@ function z(e, t) {
|
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
let l = !1;
|
|
19
|
-
return c === "pdf" ? import("./generatePdfThumbnail-
|
|
19
|
+
return c === "pdf" ? import("./generatePdfThumbnail-CnldK2yE.js").then(({ generatePdfThumbnail: o }) => o(e)).then((o) => {
|
|
20
20
|
l || n(o);
|
|
21
21
|
}).catch(() => {
|
|
22
22
|
l || n(null);
|
|
23
|
-
}) : c === "docx" ? import("./generateDocxThumbnail-
|
|
23
|
+
}) : c === "docx" ? import("./generateDocxThumbnail-RE7yNAXP.js").then(({ generateDocxThumbnail: o }) => o(e)).then((o) => {
|
|
24
24
|
l || n(o);
|
|
25
25
|
}).catch(() => {
|
|
26
26
|
l || n(null);
|
|
27
|
-
}) : c === "xlsx" && import("./generateXlsxThumbnail-
|
|
27
|
+
}) : c === "xlsx" && import("./generateXlsxThumbnail-BpBB4ePK.js").then(({ generateXlsxThumbnail: o }) => o(e)).then((o) => {
|
|
28
28
|
l || n(o);
|
|
29
29
|
}).catch(() => {
|
|
30
30
|
l || n(null);
|
|
@@ -61,12 +61,12 @@ const R = (e) => e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFix
|
|
|
61
61
|
a.preventDefault(), a.stopPropagation();
|
|
62
62
|
try {
|
|
63
63
|
if (e.startsWith("data:")) {
|
|
64
|
-
const i = e.split(","), f = i[0].match(/:(.*?);/), L = f ? f[1] : "application/octet-stream",
|
|
65
|
-
let x =
|
|
66
|
-
const
|
|
64
|
+
const i = e.split(","), f = i[0].match(/:(.*?);/), L = f ? f[1] : "application/octet-stream", w = atob(i[1]);
|
|
65
|
+
let x = w.length;
|
|
66
|
+
const b = new Uint8Array(x);
|
|
67
67
|
for (; x--; )
|
|
68
|
-
|
|
69
|
-
const j = new Blob([
|
|
68
|
+
b[x] = w.charCodeAt(x);
|
|
69
|
+
const j = new Blob([b], { type: L }), v = URL.createObjectURL(j), s = document.createElement("a");
|
|
70
70
|
s.href = v, s.download = t, s.style.display = "none", document.body.appendChild(s), s.click(), document.body.removeChild(s), setTimeout(() => URL.revokeObjectURL(v), 100);
|
|
71
71
|
} else {
|
|
72
72
|
const i = document.createElement("a");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as i, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import { useLexicalComposerContext as k } from "@lexical/react/LexicalComposerContext";
|
|
3
|
-
import { c as L,
|
|
3
|
+
import { c as L, an as I, ao as w } from "./index-CXyZgoBl.js";
|
|
4
4
|
import { useBasicTypeaheadTriggerMatch as C, LexicalTypeaheadMenuPlugin as S, MenuOption as R } from "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
5
5
|
import { useState as y, useMemo as v, useCallback as g, useEffect as O } from "react";
|
|
6
6
|
import * as E from "react-dom";
|