eddyter 1.4.16 → 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 (45) hide show
  1. package/dist/AIChatPlugin-DsUPycjT.js +872 -0
  2. package/dist/CombinedAutocompletGrammarPlugin-BXOz6IRb.js +1778 -0
  3. package/dist/{CommentBubblePlugin-DZQW1ibY.js → CommentBubblePlugin-kiMehQkL.js} +5 -5
  4. package/dist/CommentPlugin-DIuM-Jao.js +154 -0
  5. package/dist/LazyCodeMirror-DdCIk-83.js +21374 -0
  6. package/dist/{LazySignatureCanvas-FKl1mD-T.js → LazySignatureCanvas-BtcxlSTW.js} +1 -1
  7. package/dist/NotePanelPlugin-FirMseLu.js +31 -0
  8. package/dist/TextEnhancePlugin-oXbL_F1i.js +199 -0
  9. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  10. package/dist/assets/style.css +1 -1
  11. package/dist/components/AiPlugin/commands.d.ts +4 -0
  12. package/dist/components/AiPlugin/index.d.ts +0 -4
  13. package/dist/components/CommentToggle/CommentToggle.d.ts +1 -0
  14. package/dist/components/ConfigurableEditorWithAuth.d.ts +2 -0
  15. package/dist/editor/components/FloatingToolbarManager.d.ts +2 -1
  16. package/dist/editor/components/ToolbarMount.d.ts +2 -1
  17. package/dist/{generateDocxThumbnail-DJlPLsdY.js → generateDocxThumbnail-RE7yNAXP.js} +7 -6
  18. package/dist/{generatePdfThumbnail-CfDAh39b.js → generatePdfThumbnail-CnldK2yE.js} +4 -4
  19. package/dist/{generateXlsxThumbnail-cRIT4Jyf.js → generateXlsxThumbnail-BpBB4ePK.js} +1 -1
  20. package/dist/{html2pdf.bundle.min-BW3dolOS.js → html2pdf.bundle.min-u-o_L5zA.js} +1 -1
  21. package/dist/{index-BEepnYCf.js → index-B4W_mfNI.js} +15 -15
  22. package/dist/{index-gjz4wieB.js → index-C8ZUqYRj.js} +56 -56
  23. package/dist/{index-W6_ogglw.js → index-CKRp6axU.js} +28 -28
  24. package/dist/{index-BydXFu_2.js → index-CL0adQ5R.js} +1 -1
  25. package/dist/{index-BDDjWwK4.js → index-CXyZgoBl.js} +16862 -21806
  26. package/dist/{index-BmfQcIrc.js → index-DZAvLKar.js} +118 -116
  27. package/dist/index-F2-F96Nx.js +720 -0
  28. package/dist/index.js +3 -3
  29. package/dist/marked.esm-Tjr8Gfse.js +1114 -0
  30. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +1 -0
  31. package/dist/plugins/AIChatPlugin.commands.d.ts +7 -0
  32. package/dist/plugins/AIChatPlugin.d.ts +0 -7
  33. package/dist/plugins/CommentPlugin.commands.d.ts +5 -0
  34. package/dist/plugins/CommentPlugin.d.ts +0 -5
  35. package/dist/plugins/NotePanelPlugin.commands.d.ts +6 -0
  36. package/dist/plugins/NotePanelPlugin.d.ts +0 -6
  37. package/dist/plugins/TextEnhancePlugin.commands.d.ts +1 -0
  38. package/dist/plugins/TextEnhancePlugin.d.ts +0 -1
  39. package/dist/plugins/WordCountPlugin.d.ts +1 -0
  40. package/dist/sparkles-CTAYmQOE.js +17 -0
  41. package/dist/square-CupR-YWR.js +7 -0
  42. package/dist/types.d.ts +1 -0
  43. package/dist/useVoiceToText-U0yKgS5Q.js +153 -0
  44. package/package.json +5 -2
  45. package/dist/LazyCodeMirror-C1bW4mVF.js +0 -44822
@@ -1,30 +1,30 @@
1
1
  import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
- import { useLexicalComposerContext as j } from "@lexical/react/LexicalComposerContext";
2
+ import { useLexicalComposerContext as B } from "@lexical/react/LexicalComposerContext";
3
3
  import { $getNodeByKey as g } from "lexical";
4
- import { useState as B, useEffect as D } from "react";
5
- import { k, D as y, T as E, F as m, l as I, m as W } from "./index-BDDjWwK4.js";
4
+ import { useState as E, useEffect as N } from "react";
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;
9
9
  }
10
10
  function z(e, t) {
11
- const [d, n] = B(null);
12
- return D(() => {
11
+ const [d, n] = E(null);
12
+ return N(() => {
13
13
  const c = e && t ? $(t, e) : null;
14
14
  if (!e || !t || !c) {
15
15
  n(null);
16
16
  return;
17
17
  }
18
18
  let l = !1;
19
- return c === "pdf" ? import("./generatePdfThumbnail-CfDAh39b.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-DJlPLsdY.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-cRIT4Jyf.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);
@@ -33,15 +33,15 @@ function z(e, t) {
33
33
  };
34
34
  }, [e, t]), d;
35
35
  }
36
- const R = (e) => e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(1)} GB` : "", N = (e) => {
36
+ const R = (e) => e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(1)} GB` : "", D = (e) => {
37
37
  const t = e.split(".");
38
38
  return t.length > 1 ? t[t.length - 1].toLowerCase() : "";
39
- }, F = (e) => {
40
- const t = N(e);
41
- return t === "pdf" || t === "docx" || t === "xlsx" || t === "xls";
42
39
  }, C = (e) => {
43
- const t = N(e);
44
- return ["pdf", "doc", "docx", "txt", "odt"].includes(t) ? /* @__PURE__ */ r(m, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-blue-600" }) : ["xls", "xlsx", "csv"].includes(t) ? /* @__PURE__ */ r(m, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-green-600" }) : ["ppt", "pptx"].includes(t) ? /* @__PURE__ */ r(m, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-red-600" }) : ["zip", "rar", "7z", "tar", "gz"].includes(t) ? /* @__PURE__ */ r(I, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-orange-500" }) : /* @__PURE__ */ r(W, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-gray-500" });
40
+ const t = D(e);
41
+ return t === "pdf" || t === "docx" || t === "xlsx" || t === "xls";
42
+ }, F = (e) => {
43
+ const t = D(e);
44
+ return ["pdf", "doc", "docx", "txt", "odt"].includes(t) ? /* @__PURE__ */ r(h, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-blue-600" }) : ["xls", "xlsx", "csv"].includes(t) ? /* @__PURE__ */ r(h, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-green-600" }) : ["ppt", "pptx"].includes(t) ? /* @__PURE__ */ r(h, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-red-600" }) : ["zip", "rar", "7z", "tar", "gz"].includes(t) ? /* @__PURE__ */ r(T, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-orange-500" }) : /* @__PURE__ */ r(W, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-gray-500" });
45
45
  }, H = ({
46
46
  src: e,
47
47
  fileName: t,
@@ -49,24 +49,24 @@ const R = (e) => e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFix
49
49
  displayType: n = "card",
50
50
  nodeKey: c
51
51
  }) => {
52
- const l = n === "inline" ? "inline" : "card", [o] = j(), u = z(F(t) ? e : void 0, t);
53
- if (D(() => {
52
+ const l = n === "inline" ? "inline" : "card", [o] = B(), u = z(C(t) ? e : void 0, t);
53
+ if (N(() => {
54
54
  u && o.update(() => {
55
55
  const a = g(c);
56
56
  k(a) && a.setPreviewDataUrl(u);
57
57
  });
58
58
  }, [o, c, u]), !e || !t)
59
59
  return console.error("FileView: Missing required props", { src: e, fileName: t, fileSize: d, nodeKey: c }), /* @__PURE__ */ r("div", { className: "cteditor-inline-flex cteditor-items-center cteditor-gap-3 cteditor-px-4 cteditor-py-3 cteditor-my-2 cteditor-border cteditor-border-destructive cteditor-rounded-lg cteditor-bg-destructive/10", children: /* @__PURE__ */ r("div", { className: "cteditor-text-sm cteditor-text-destructive", children: "Error loading file" }) });
60
- const h = (a) => {
60
+ const m = (a) => {
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 T = new Blob([w], { type: L }), v = URL.createObjectURL(T), 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");
@@ -80,7 +80,7 @@ const R = (e) => e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFix
80
80
  const i = g(c);
81
81
  k(i) && i.remove();
82
82
  });
83
- }, U = F(t) && u;
83
+ }, U = C(t) && u;
84
84
  return l === "inline" ? /* @__PURE__ */ p(
85
85
  "div",
86
86
  {
@@ -89,13 +89,13 @@ const R = (e) => e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFix
89
89
  tabIndex: 0,
90
90
  "data-lexical-node-key": c,
91
91
  children: [
92
- /* @__PURE__ */ r("span", { className: "cteditor-flex-shrink-0 *:cteditor-size-5", children: C(t) }),
92
+ /* @__PURE__ */ r("span", { className: "cteditor-flex-shrink-0 *:cteditor-size-5", children: F(t) }),
93
93
  /* @__PURE__ */ r("span", { className: "cteditor-flex-1 cteditor-min-w-0 cteditor-text-sm cteditor-font-medium cteditor-text-black cteditor-truncate", children: t }),
94
94
  /* @__PURE__ */ r(
95
95
  "button",
96
96
  {
97
97
  type: "button",
98
- onClick: h,
98
+ onClick: m,
99
99
  className: "cteditor-p-1 cteditor-rounded-md hover:cteditor-bg-accent cteditor-transition-colors cteditor-flex-shrink-0",
100
100
  "aria-label": "Download file",
101
101
  title: "Download file",
@@ -119,7 +119,7 @@ const R = (e) => e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFix
119
119
  alt: "",
120
120
  className: "cteditor-w-full cteditor-h-full cteditor-object-cover"
121
121
  }
122
- ) : /* @__PURE__ */ r("div", { className: "*:cteditor-size-8", children: C(t) }) }),
122
+ ) : /* @__PURE__ */ r("div", { className: "*:cteditor-size-8", children: F(t) }) }),
123
123
  /* @__PURE__ */ p("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-w-full", children: [
124
124
  /* @__PURE__ */ p("div", { className: "cteditor-flex-1 cteditor-min-w-0", children: [
125
125
  /* @__PURE__ */ r("div", { className: "cteditor-font-medium cteditor-text-xs cteditor-text-black cteditor-truncate", children: t }),
@@ -130,7 +130,7 @@ const R = (e) => e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFix
130
130
  "button",
131
131
  {
132
132
  type: "button",
133
- onClick: h,
133
+ onClick: m,
134
134
  className: "cteditor-p-1 cteditor-rounded-md cteditor-text-black/80 hover:cteditor-bg-black/10 cteditor-transition-colors",
135
135
  "aria-label": "Download file",
136
136
  title: "Download file",
@@ -145,7 +145,7 @@ const R = (e) => e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFix
145
145
  className: "cteditor-p-1 cteditor-rounded-md cteditor-text-black/80 hover:cteditor-bg-black/10 cteditor-transition-colors",
146
146
  "aria-label": "Delete file",
147
147
  title: "Delete file",
148
- children: /* @__PURE__ */ r(E, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-current" })
148
+ children: /* @__PURE__ */ r(I, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-current" })
149
149
  }
150
150
  )
151
151
  ] })
@@ -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, g as I, h as w } from "./index-BDDjWwK4.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";