eddyter 1.4.19 → 1.4.20-beta.0

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 (39) hide show
  1. package/README.md +6 -3
  2. package/dist/{AIChatPlugin-BUWq8ixX.js → AIChatPlugin-XDBXQanb.js} +3 -3
  3. package/dist/{CombinedAutocompletGrammarPlugin-Dq25w8tq.js → CombinedAutocompletGrammarPlugin-BRBmG7Uo.js} +186 -167
  4. package/dist/{CommentBubblePlugin-B77d3Qq6.js → CommentBubblePlugin-BALioirG.js} +1 -1
  5. package/dist/{CommentPlugin-BJQyKmrN.js → CommentPlugin-CHmC9IZh.js} +2 -2
  6. package/dist/{NotePanelPlugin-BqOdcg07.js → NotePanelPlugin-CPGzqjuk.js} +1 -1
  7. package/dist/{TextEnhancePlugin-BnmdRgUu.js → TextEnhancePlugin-DgC4kmVA.js} +2 -2
  8. package/dist/assets/style.css +1 -1
  9. package/dist/components/FormatTextMenu/FormatTextMenu.d.ts +5 -0
  10. package/dist/components/InsertVideoDialog.d.ts +7 -0
  11. package/dist/components/ListMenu/ListMenu.d.ts +10 -0
  12. package/dist/components/ListMenu/index.d.ts +1 -0
  13. package/dist/components/NewBadge/NewBadge.d.ts +5 -0
  14. package/dist/components/NewBadge/NewDot.d.ts +9 -0
  15. package/dist/components/Toolbar/styles.d.ts +2 -2
  16. package/dist/{generateDocxThumbnail-DBMxjZ83.js → generateDocxThumbnail-BTxOqVy6.js} +1 -1
  17. package/dist/{generatePdfThumbnail-Cv2-ZCzh.js → generatePdfThumbnail-bcpGGSUp.js} +1 -1
  18. package/dist/{generateXlsxThumbnail-UHmNc7Fa.js → generateXlsxThumbnail-BWM1cmSl.js} +1 -1
  19. package/dist/hooks/useNewFeatures.d.ts +5 -0
  20. package/dist/{index-Bex3G_eE.js → index-0VTRLfjb.js} +15648 -14919
  21. package/dist/{index-ChSepytp.js → index-BNICgdB-.js} +21 -21
  22. package/dist/{index-q_TW8dU1.js → index-BxOZNLwu.js} +4 -4
  23. package/dist/{index-C_mjLQUF.js → index-DDSVx-B8.js} +2 -2
  24. package/dist/{index-Cl_A9eof.js → index-DRLZF4xQ.js} +193 -198
  25. package/dist/{index-BaWQzoL2.js → index-DZESLGLB.js} +1 -1
  26. package/dist/{index-DcHU8PlQ.js → index-FZ7Aopvl.js} +73 -73
  27. package/dist/index.d.ts +0 -1
  28. package/dist/index.js +12 -13
  29. package/dist/nodes/ButtonNode.d.ts +15 -2
  30. package/dist/nodes/documentPalette.d.ts +24 -0
  31. package/dist/plugins/WordCountPlugin.d.ts +2 -0
  32. package/dist/{sparkles-C-XoMho5.js → sparkles-DIeZhywG.js} +1 -1
  33. package/dist/types.d.ts +6 -0
  34. package/dist/ui/Icons.d.ts +7 -1
  35. package/dist/{useVoiceToText-BzaLSbRi.js → useVoiceToText-sR--QAUC.js} +1 -1
  36. package/dist/utils/neutralTextColor.d.ts +22 -0
  37. package/dist/utils/newFeatures.d.ts +13 -0
  38. package/dist/utils/notePanelPaste.d.ts +3 -0
  39. package/package.json +2 -2
@@ -13,9 +13,9 @@ 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 O, 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";
16
+ import { $getSelection as P, $isNodeSelection as p, $setSelection as T, 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 W } from "lexical";
17
17
  import { useRef as L, useState as w, useCallback as x, useEffect as Dt } from "react";
18
- import { aW as v, ap as Pt, aq as Lt, ar as Mt, as as _t, at as $t, aP as zt, av as It, aS as Wt, aT as Ot } from "./index-Bex3G_eE.js";
18
+ import { aX as v, ap as Pt, aq as Lt, ar as Mt, as as _t, at as $t, aQ as zt, av as It, aT as Ot, aU as Tt } from "./index-0VTRLfjb.js";
19
19
  function ie({
20
20
  src: j,
21
21
  nodeKey: g,
@@ -29,7 +29,7 @@ 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 = L(null), S = L(null), [a, d, C] = pt(g), [s, M] = w(!1), [o] = at(), [y, X] = w(null), _ = L(null), H = mt(), D = x(
33
33
  (t) => {
34
34
  const r = P();
35
35
  return a && p(r) && (t.preventDefault(), o.update(() => {
@@ -44,7 +44,7 @@ function ie({
44
44
  const r = P(), e = S.current;
45
45
  if (a && p(r) && r.getNodes().length === 1) {
46
46
  if (E)
47
- return O(null), t.preventDefault(), b.focus(), !0;
47
+ return T(null), t.preventDefault(), b.focus(), !0;
48
48
  if (e !== null && e !== document.activeElement)
49
49
  return t.preventDefault(), e.focus(), !0;
50
50
  }
@@ -52,7 +52,7 @@ function ie({
52
52
  },
53
53
  [b, a, E]
54
54
  ), z = x(
55
- (t) => _.current === b || S.current === t.target ? (O(null), o.update(() => {
55
+ (t) => _.current === b || S.current === t.target ? (T(null), o.update(() => {
56
56
  d(!0);
57
57
  const r = o.getRootElement();
58
58
  r !== null && r.focus();
@@ -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 && X(e.read(() => P()));
84
84
  }),
85
85
  o.registerCommand(
86
86
  bt,
@@ -129,7 +129,7 @@ function ie({
129
129
  I,
130
130
  d
131
131
  ]);
132
- const X = () => {
132
+ const K = () => {
133
133
  o.update(() => {
134
134
  const t = k(g);
135
135
  v(t) && t.setShowCaption(!0);
@@ -141,14 +141,14 @@ function ie({
141
141
  const e = k(g);
142
142
  v(e) && e.setWidthAndHeight(t, r);
143
143
  });
144
- }, q = () => {
144
+ }, U = () => {
145
145
  M(!0);
146
- }, U = (t) => {
146
+ }, q = (t) => {
147
147
  t.preventDefault(), t.stopPropagation(), o.update(() => {
148
148
  const r = k(g);
149
149
  if (v(r)) {
150
150
  const e = r.getParent();
151
- r.remove(), e && T(e) && e.getChildrenSize() === 0 && e.setFormat("left");
151
+ r.remove(), e && W(e) && e.getChildrenSize() === 0 && e.setFormat("left");
152
152
  }
153
153
  });
154
154
  }, m = (t, r) => {
@@ -157,10 +157,10 @@ function ie({
157
157
  if (v(e)) {
158
158
  e.setPosition(r);
159
159
  const c = e.getParent();
160
- c && T(c) && (r === "left" ? c.setFormat("left") : r === "right" ? c.setFormat("right") : c.setFormat(""));
160
+ c && W(c) && (r === "left" ? c.setFormat("left") : r === "right" ? c.setFormat("right") : c.setFormat(""));
161
161
  }
162
162
  });
163
- }, J = x(
163
+ }, Q = x(
164
164
  (t) => {
165
165
  if (s || t.target.closest("button"))
166
166
  return;
@@ -173,12 +173,12 @@ 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, W = (a || s) && K, Z = typeof h == "number" && typeof A == "number", tt = typeof h == "number" ? h : "auto", et = typeof A == "number" ? A : "auto";
176
+ ), J = a && p(y) && !s, O = (a || s) && H, 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",
180
180
  {
181
- draggable: Q,
181
+ draggable: J,
182
182
  style: n === "left" || n === "right" ? {
183
183
  position: "relative",
184
184
  display: "block",
@@ -207,7 +207,7 @@ function ie({
207
207
  position: "relative",
208
208
  display: "inline-block"
209
209
  },
210
- onClick: J,
210
+ onClick: Q,
211
211
  children: [
212
212
  /* @__PURE__ */ i(
213
213
  "video",
@@ -216,7 +216,7 @@ function ie({
216
216
  src: j,
217
217
  controls: V,
218
218
  preload: "metadata",
219
- className: W ? `focused ${p(y) ? "draggable" : ""}` : void 0,
219
+ className: O ? `focused ${p(y) ? "draggable" : ""}` : void 0,
220
220
  style: Z ? {
221
221
  width: tt,
222
222
  height: et,
@@ -304,7 +304,7 @@ function ie({
304
304
  {
305
305
  type: "button",
306
306
  onClick: (t) => {
307
- t.stopPropagation(), U(t);
307
+ t.stopPropagation(), q(t);
308
308
  },
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",
@@ -313,16 +313,16 @@ function ie({
313
313
  }
314
314
  )
315
315
  ] }),
316
- Y && p(y) && W && /* @__PURE__ */ i(
316
+ Y && p(y) && O && /* @__PURE__ */ i(
317
317
  it,
318
318
  {
319
319
  showCaption: E,
320
- setShowCaption: X,
320
+ setShowCaption: K,
321
321
  editor: o,
322
322
  buttonRef: S,
323
323
  imageRef: l,
324
324
  maxWidth: B,
325
- onResizeStart: q,
325
+ onResizeStart: U,
326
326
  onResizeEnd: G,
327
327
  captionsEnabled: F
328
328
  }
@@ -375,7 +375,7 @@ function ie({
375
375
  }
376
376
  ),
377
377
  /* @__PURE__ */ i(st, {}),
378
- /* @__PURE__ */ i(Wt, { namespace: Ot.namespace })
378
+ /* @__PURE__ */ i(Ot, { namespace: Tt.namespace })
379
379
  ]
380
380
  }
381
381
  )
@@ -2,7 +2,7 @@ import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
2
  import { useLexicalComposerContext as j } from "@lexical/react/LexicalComposerContext";
3
3
  import { $getNodeByKey as g } from "lexical";
4
4
  import { useState as B, useEffect as N } from "react";
5
- import { aF as k, aG as y, av as E, aH as h, aI as T, aJ as W } from "./index-Bex3G_eE.js";
5
+ import { aF as k, aG as y, av as E, aH as h, aI as T, aJ as W } from "./index-0VTRLfjb.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-Cv2-ZCzh.js").then(({ generatePdfThumbnail: o }) => o(e)).then((o) => {
19
+ return c === "pdf" ? import("./generatePdfThumbnail-bcpGGSUp.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-DBMxjZ83.js").then(({ generateDocxThumbnail: o }) => o(e)).then((o) => {
23
+ }) : c === "docx" ? import("./generateDocxThumbnail-BTxOqVy6.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-UHmNc7Fa.js").then(({ generateXlsxThumbnail: o }) => o(e)).then((o) => {
27
+ }) : c === "xlsx" && import("./generateXlsxThumbnail-BWM1cmSl.js").then(({ generateXlsxThumbnail: o }) => o(e)).then((o) => {
28
28
  l || n(o);
29
29
  }).catch(() => {
30
30
  l || n(null);
@@ -1,9 +1,9 @@
1
1
  import { jsx as e, jsxs as n, Fragment as j } from "react/jsx-runtime";
2
2
  import { useLexicalComposerContext as se } from "@lexical/react/LexicalComposerContext";
3
3
  import { COMMAND_PRIORITY_LOW as S, $getSelection as _, $isRangeSelection as O, $insertNodes as de, $getRoot as L } from "lexical";
4
- import { c as F, D as U, a as K, b as H, d as J, e as W, L as le, I as ue, f as B, g as z, B as T, P as me, F as fe, C as ge, h as pe, i as he, E as xe, j as ye, N as be, k as Ne, R as we, S as ve, l as Ie, u as ke, A as Ce, m as Te, n as Ee, t as a, o as Se, p as R, q as Ae, $ as Pe, r as Me, s as G, v as De } from "./index-Bex3G_eE.js";
4
+ import { c as F, D as U, a as K, b as H, d as J, e as W, L as le, I as ue, f as B, g as z, B as T, P as me, F as fe, C as ge, h as pe, i as he, E as xe, j as ye, N as be, k as Ne, R as we, S as ve, l as Ie, u as ke, A as Ce, m as Te, n as Ee, t as a, o as Se, p as R, q as Ae, $ as Pe, r as Me, s as G, v as De } from "./index-0VTRLfjb.js";
5
5
  import Q, { useState as v, forwardRef as _e, useImperativeHandle as Oe, useRef as A, useEffect as P } from "react";
6
- import { S as $ } from "./sparkles-C-XoMho5.js";
6
+ import { S as $ } from "./sparkles-DIeZhywG.js";
7
7
  const q = F("Globe", [
8
8
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
9
9
  ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],