eddyter 1.3.51 → 1.3.53

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
2
  import { useLexicalComposerContext as v } from "@lexical/react/LexicalComposerContext";
3
3
  import { $getNodeByKey as w } from "lexical";
4
- import { D as k, T as F, F as y, a as D, b as N, $ as C } from "./index-269df0bf.js";
4
+ import { q as k, r as F, F as y, s as N, u as C, v as D } from "./index-006b2aae.js";
5
5
  import "react";
6
6
  import "axios";
7
7
  import "react-dom";
@@ -30,12 +30,12 @@ import "emoji-picker-react";
30
30
  import "@lexical/react/LexicalLinkPlugin";
31
31
  import "@lexical/react/LexicalTypeaheadMenuPlugin";
32
32
  import "@lexical/react/useLexicalEditable";
33
- const $ = (t) => t ? t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : t < 1024 * 1024 * 1024 ? `${(t / (1024 * 1024)).toFixed(1)} MB` : `${(t / (1024 * 1024 * 1024)).toFixed(1)} GB` : "", B = (t) => {
33
+ const B = (t) => t ? t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : t < 1024 * 1024 * 1024 ? `${(t / (1024 * 1024)).toFixed(1)} MB` : `${(t / (1024 * 1024 * 1024)).toFixed(1)} GB` : "", E = (t) => {
34
34
  const o = t.split(".");
35
35
  return o.length > 1 ? o[o.length - 1].toLowerCase() : "";
36
- }, E = (t) => {
37
- const o = B(t);
38
- return ["pdf", "doc", "docx", "txt", "odt"].includes(o) ? /* @__PURE__ */ r(y, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-blue-500" }) : ["zip", "rar", "7z", "tar", "gz"].includes(o) ? /* @__PURE__ */ r(D, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-orange-500" }) : /* @__PURE__ */ r(N, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-gray-500" });
36
+ }, L = (t) => {
37
+ const o = E(t);
38
+ return ["pdf", "doc", "docx", "txt", "odt"].includes(o) ? /* @__PURE__ */ r(y, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-blue-500" }) : ["zip", "rar", "7z", "tar", "gz"].includes(o) ? /* @__PURE__ */ r(N, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-orange-500" }) : /* @__PURE__ */ r(C, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-gray-500" });
39
39
  }, lt = ({ src: t, fileName: o, fileSize: n, nodeKey: s }) => {
40
40
  const [x] = v();
41
41
  if (!t || !o)
@@ -61,7 +61,7 @@ const $ = (t) => t ? t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFix
61
61
  }, f = (i) => {
62
62
  i.preventDefault(), i.stopPropagation(), x.update(() => {
63
63
  const e = w(s);
64
- C(e) && e.remove();
64
+ D(e) && e.remove();
65
65
  });
66
66
  };
67
67
  return /* @__PURE__ */ a(
@@ -75,10 +75,10 @@ const $ = (t) => t ? t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFix
75
75
  (i.key === "Enter" || i.key === " ") && (i.preventDefault(), l(i));
76
76
  },
77
77
  children: [
78
- /* @__PURE__ */ r("div", { className: "cteditor-flex-shrink-0 *:cteditor-size-5", children: E(o) }),
78
+ /* @__PURE__ */ r("div", { className: "cteditor-flex-shrink-0 *:cteditor-size-5", children: L(o) }),
79
79
  /* @__PURE__ */ a("div", { className: "cteditor-flex-1 cteditor-min-w-0", children: [
80
80
  /* @__PURE__ */ r("div", { className: "cteditor-font-medium cteditor-text-xs cteditor-text-foreground cteditor-truncate", children: o }),
81
- n && /* @__PURE__ */ r("div", { className: "cteditor-text-xs cteditor-text-muted-foreground", children: $(n) })
81
+ n && /* @__PURE__ */ r("div", { className: "cteditor-text-xs cteditor-text-muted-foreground", children: B(n) })
82
82
  ] }),
83
83
  /* @__PURE__ */ a("div", { className: "cteditor-flex cteditor-gap-1 cteditor-flex-shrink-0", children: [
84
84
  /* @__PURE__ */ r(
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G as z, z as B, K as G, x as I, H as J, J as L, O as M, M as O, y as j, w as q, N as D, I as F } from "./index-269df0bf.js";
1
+ import { G as z, z as B, K as G, x as I, H as J, J as L, O as M, M as O, y as j, w as q, N as D, I as F } from "./index-006b2aae.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "axios";