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.
Files changed (32) hide show
  1. package/dist/{AIChatPlugin-2pIKhzIw.js → AIChatPlugin-DsUPycjT.js} +41 -40
  2. package/dist/CombinedAutocompletGrammarPlugin-BXOz6IRb.js +1778 -0
  3. package/dist/{CommentBubblePlugin-J3r4kNGK.js → CommentBubblePlugin-kiMehQkL.js} +5 -5
  4. package/dist/{CommentPlugin-BbuE8_Aj.js → CommentPlugin-DIuM-Jao.js} +24 -24
  5. package/dist/{LazySignatureCanvas-D1t8oQDK.js → LazySignatureCanvas-BtcxlSTW.js} +1 -1
  6. package/dist/{NotePanelPlugin-C16G36Jd.js → NotePanelPlugin-FirMseLu.js} +3 -3
  7. package/dist/{TextEnhancePlugin-BShY1r5J.js → TextEnhancePlugin-oXbL_F1i.js} +10 -9
  8. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  9. package/dist/assets/style.css +1 -1
  10. package/dist/components/CommentToggle/CommentToggle.d.ts +1 -0
  11. package/dist/components/ConfigurableEditorWithAuth.d.ts +2 -0
  12. package/dist/editor/components/FloatingToolbarManager.d.ts +2 -1
  13. package/dist/editor/components/ToolbarMount.d.ts +2 -1
  14. package/dist/{generateDocxThumbnail-Ve0zlObJ.js → generateDocxThumbnail-RE7yNAXP.js} +7 -6
  15. package/dist/{generatePdfThumbnail-EuSjdwzm.js → generatePdfThumbnail-CnldK2yE.js} +4 -4
  16. package/dist/{generateXlsxThumbnail-C10kl6qh.js → generateXlsxThumbnail-BpBB4ePK.js} +1 -1
  17. package/dist/{html2pdf.bundle.min-BQaO0VTp.js → html2pdf.bundle.min-u-o_L5zA.js} +1 -1
  18. package/dist/{index-gPq4n7_a.js → index-B4W_mfNI.js} +15 -15
  19. package/dist/{index-BSgLtgyt.js → index-C8ZUqYRj.js} +23 -23
  20. package/dist/{index-B8zPtmsK.js → index-CKRp6axU.js} +9 -9
  21. package/dist/{index-ClsuXAKJ.js → index-CL0adQ5R.js} +1 -1
  22. package/dist/{index-CxOOJD40.js → index-CXyZgoBl.js} +12941 -14705
  23. package/dist/{index-D25uusM-.js → index-DZAvLKar.js} +27 -26
  24. package/dist/{index-CoLO4gm_.js → index-F2-F96Nx.js} +11 -10
  25. package/dist/index.js +1 -1
  26. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +1 -0
  27. package/dist/plugins/WordCountPlugin.d.ts +1 -0
  28. package/dist/sparkles-CTAYmQOE.js +17 -0
  29. package/dist/{square-DrMKkLmP.js → square-CupR-YWR.js} +1 -1
  30. package/dist/types.d.ts +1 -0
  31. package/dist/{useVoiceToText-DCddJzYF.js → useVoiceToText-U0yKgS5Q.js} +14 -14
  32. package/package.json +1 -1
@@ -3,6 +3,7 @@ interface CommentToggleProps {
3
3
  isOpen: boolean;
4
4
  onClick: () => void;
5
5
  commentCount?: number;
6
+ fitToPage?: boolean;
6
7
  }
7
8
  declare const _default: React.NamedExoticComponent<CommentToggleProps>;
8
9
  export default _default;
@@ -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 { au as Tt, ao as Se, aI as Ce, ay as xe } from "./index-CxOOJD40.js";
2
- import { h as Ee } from "./html2canvas.esm-BD_Vwvv8.js";
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 = `${Ce}${xe.project.proxyPdf}?url=${encodeURIComponent(c)}`, t = await fetch(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 en(c) {
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 Ee(n, {
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
- en as generateDocxThumbnail
5520
+ rn as generateDocxThumbnail
5520
5521
  };
@@ -1,7 +1,7 @@
1
- import { aI as u, ay as b } from "./index-CxOOJD40.js";
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 C() {
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}${b.project.proxyPdf}?url=${encodeURIComponent(t)}`, o = await fetch(n);
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 C(), 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");
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 { aI as yi, ay as Di } from "./index-CxOOJD40.js";
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,4 +1,4 @@
1
- import { au as Ka, ao as $u } from "./index-CxOOJD40.js";
1
+ import { c as Ka, g as $u } from "./_commonjsHelpers-DaMA6jEr.js";
2
2
  function tl(Qa, iu) {
3
3
  for (var jo = 0; jo < iu.length; jo++) {
4
4
  const qs = iu[jo];
@@ -1,11 +1,11 @@
1
- import { jsx as o, jsxs as j, Fragment as re } from "react/jsx-runtime";
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, a3 as k, a4 as pe, a5 as N, a6 as ge, a7 as he, a8 as be, a9 as ye, aa as xe, ab as Ee, ac as Ce, ad as ve, ae as Ne, af as ke, ag as Z } from "./index-CxOOJD40.js";
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 F = 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), F < 10 && (F = v.bottom + 15), F -= X.top, O -= X.left, e.style.opacity = "1", e.style.transform = `translate(${O}px, ${F}px)`, r || (e.style.display = "flex", e.style.visibility = "visible", e.style.zIndex = "9999", l(!0));
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
- }, q = (e) => {
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__ */ j(
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__ */ j("div", { className: K, children: [
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__ */ j("div", { className: K, children: [
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(), q(p === "left" ? "none" : "left");
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(), q(p === "right" ? "none" : "right");
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__ */ j("div", { className: K, children: [
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 Fe = ({
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(), q = !!h.body.querySelector(
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 && !q)
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
- Fe as default
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 P, $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 At, LineBreakNode as kt, ParagraphNode as St, $getNodeByKey as A, $isParagraphNode as T } from "lexical";
17
- import { useRef as L, useState as w, useCallback as x, useEffect as Dt } from "react";
18
- import { aH as v, a8 as Pt, a9 as Lt, aa as Mt, ab as _t, ac as $t, aA as zt, ae as It, aD as Ot, aE as Wt } from "./index-CxOOJD40.js";
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: k,
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 = L(null), S = L(null), [a, d, C] = pt(g), [s, M] = w(!1), [o] = at(), [y, H] = w(null), _ = L(null), K = mt(), D = x(
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 = P();
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 = P(), e = S.current;
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
- ), z = x(
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
- ), I = x(
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(() => P()));
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
- I,
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
- z,
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 = A(g);
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 = A(g);
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 = A(g);
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 = A(g);
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 k == "number", tt = typeof h == "number" ? h : "auto", et = typeof k == "number" ? k : "auto";
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(Pt, {})
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(Lt, {})
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(zt, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
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(It, { className: "cteditor-w-4 cteditor-h-4" })
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 { ap as k, aq as y, ae as I, ar as h, as as T, at as W } from "./index-CxOOJD40.js";
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-EuSjdwzm.js").then(({ generatePdfThumbnail: o }) => o(e)).then((o) => {
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-Ve0zlObJ.js").then(({ generateDocxThumbnail: o }) => o(e)).then((o) => {
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-C10kl6qh.js").then(({ generateXlsxThumbnail: o }) => o(e)).then((o) => {
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", b = atob(i[1]);
65
- let x = b.length;
66
- const w = new Uint8Array(x);
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
- w[x] = b.charCodeAt(x);
69
- const j = new Blob([w], { type: L }), v = URL.createObjectURL(j), s = document.createElement("a");
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, ah as I, ai as w } from "./index-CxOOJD40.js";
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";