eddyter 1.3.75 → 1.3.77
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/LICENSE +24 -24
- package/README.md +478 -478
- package/dist/EddyterIcon.svg +24 -24
- package/dist/Provider/EditorProvider.d.ts +12 -0
- package/dist/api/auth.d.ts +10 -0
- package/dist/api/bugReport.d.ts +2 -0
- package/dist/api/config/endpoints.d.ts +1 -0
- package/dist/assets/style.css +1 -1
- package/dist/{babel-B9hn44Wo.js → babel-CCPWkrf4.js} +1302 -726
- package/dist/components/EddyterLogo/EddyterLogo.d.ts +2 -1
- package/dist/components/HtmlCodeEditor.d.ts +9 -0
- package/dist/components/ImageView/ImageCropDialog.d.ts +18 -0
- package/dist/components/LockedFeature/LockedFeature.d.ts +4 -0
- package/dist/components/Placeholder/styles.d.ts +2 -0
- package/dist/components/Toast/EditorToast.d.ts +2 -0
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/config/env.d.ts +9 -0
- package/dist/editorConfig.d.ts +1 -0
- package/dist/{estree-CocPn_Md.js → estree-CxUPh9wa.js} +917 -529
- package/dist/generateDocxThumbnail-Du6zd_sv.js +5876 -0
- package/dist/generatePdfThumbnail-DdNHlnr8.js +53 -0
- package/dist/generateXlsxThumbnail-VFzuEJln.js +21707 -0
- package/dist/hooks/useFeedbackEligibility.d.ts +2 -2
- package/dist/hooks/usePdfPreview.d.ts +6 -0
- package/dist/{html-CxCicOef.js → html-CmniStvG.js} +589 -350
- package/dist/html2canvas.esm-C2wu93Kq.js +4867 -0
- package/dist/{html2pdf.bundle.min-BxzIoi3T.js → html2pdf.bundle.min-4S-fQVxW.js} +5223 -3407
- package/dist/index-BUrH5xJk.js +1498 -0
- package/dist/index-DCBdbL8A.js +131 -0
- package/dist/{index-Cuv9ugJL.js → index-DSNo50FN.js} +17 -17
- package/dist/{index-DxEP36zG.js → index-Dh3DFyBT.js} +16269 -15166
- package/dist/index.js +1 -1
- package/dist/lib/toast.d.ts +39 -0
- package/dist/{markdown-BUjgWFLu.js → markdown-B0mEGGfQ.js} +1015 -578
- package/dist/nodes/EmbedNode.d.ts +9 -3
- package/dist/nodes/FileNode.d.ts +3 -0
- package/dist/{postcss-CGIcwj_g.js → postcss-B0bxXf7u.js} +1065 -615
- package/dist/{standalone-C0qguT38.js → standalone-DmuJV5rn.js} +596 -350
- package/dist/store/tableFullWidthStore.d.ts +6 -0
- package/dist/types.d.ts +4 -0
- package/dist/{typescript-BM7wk6k-.js → typescript-DZlC_9M8.js} +1805 -1113
- package/dist/utils/cropUrl.d.ts +28 -0
- package/dist/utils/editorStyleConverter.d.ts +3 -1
- package/dist/utils/export.d.ts +5 -0
- package/dist/utils/generateDocxThumbnail.d.ts +5 -0
- package/dist/utils/generatePdfThumbnail.d.ts +1 -0
- package/dist/utils/generateXlsxThumbnail.d.ts +5 -0
- package/dist/utils/helper.d.ts +2 -0
- package/dist/utils/htmlFormat.d.ts +5 -0
- package/dist/utils/index.d.ts +4 -4
- package/package.json +148 -150
- package/dist/html2pdf.bundle-CVq-OpZt.js +0 -32961
- package/dist/index-CtPRZTab.js +0 -845
- package/dist/index-eRyVFO7x.js +0 -83
package/dist/index-eRyVFO7x.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { useLexicalComposerContext as v } from "@lexical/react/LexicalComposerContext";
|
|
3
|
-
import { $getNodeByKey as w } from "lexical";
|
|
4
|
-
import { q as k, r as F, F as y, s as N, v as C, w as D } from "./index-DxEP36zG.js";
|
|
5
|
-
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) => {
|
|
6
|
-
const o = t.split(".");
|
|
7
|
-
return o.length > 1 ? o[o.length - 1].toLowerCase() : "";
|
|
8
|
-
}, L = (t) => {
|
|
9
|
-
const o = E(t);
|
|
10
|
-
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" });
|
|
11
|
-
}, z = ({ src: t, fileName: o, fileSize: n, nodeKey: s }) => {
|
|
12
|
-
const [x] = v();
|
|
13
|
-
if (!t || !o)
|
|
14
|
-
return console.error("FileView: Missing required props", { src: t, fileName: o, fileSize: n, nodeKey: s }), /* @__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" }) });
|
|
15
|
-
const l = (i) => {
|
|
16
|
-
i.preventDefault(), i.stopPropagation();
|
|
17
|
-
try {
|
|
18
|
-
if (t.startsWith("data:")) {
|
|
19
|
-
const e = t.split(","), m = e[0].match(/:(.*?);/), g = m ? m[1] : "application/octet-stream", u = atob(e[1]);
|
|
20
|
-
let c = u.length;
|
|
21
|
-
const p = new Uint8Array(c);
|
|
22
|
-
for (; c--; )
|
|
23
|
-
p[c] = u.charCodeAt(c);
|
|
24
|
-
const b = new Blob([p], { type: g }), h = URL.createObjectURL(b), d = document.createElement("a");
|
|
25
|
-
d.href = h, d.download = o, d.style.display = "none", document.body.appendChild(d), d.click(), document.body.removeChild(d), setTimeout(() => URL.revokeObjectURL(h), 100);
|
|
26
|
-
} else {
|
|
27
|
-
const e = document.createElement("a");
|
|
28
|
-
e.href = t, e.download = o, e.style.display = "none", e.target = "_blank", document.body.appendChild(e), e.click(), document.body.removeChild(e);
|
|
29
|
-
}
|
|
30
|
-
} catch (e) {
|
|
31
|
-
console.error("Error downloading file:", e), window.open(t, "_blank");
|
|
32
|
-
}
|
|
33
|
-
}, f = (i) => {
|
|
34
|
-
i.preventDefault(), i.stopPropagation(), x.update(() => {
|
|
35
|
-
const e = w(s);
|
|
36
|
-
D(e) && e.remove();
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
return /* @__PURE__ */ a(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
className: "cteditor-inline-flex cteditor-items-center cteditor-gap-3 cteditor-py-1 cteditor-px-2 cteditor-my-2 cteditor-border cteditor-border-border cteditor-rounded-lg cteditor-bg-background hover:cteditor-bg-accent/50 cteditor-transition-colors cteditor-cursor-pointer cteditor-max-w-md",
|
|
43
|
-
onClick: l,
|
|
44
|
-
role: "button",
|
|
45
|
-
tabIndex: 0,
|
|
46
|
-
onKeyDown: (i) => {
|
|
47
|
-
(i.key === "Enter" || i.key === " ") && (i.preventDefault(), l(i));
|
|
48
|
-
},
|
|
49
|
-
children: [
|
|
50
|
-
/* @__PURE__ */ r("div", { className: "cteditor-flex-shrink-0 *:cteditor-size-5", children: L(o) }),
|
|
51
|
-
/* @__PURE__ */ a("div", { className: "cteditor-flex-1 cteditor-min-w-0", children: [
|
|
52
|
-
/* @__PURE__ */ r("div", { className: "cteditor-font-medium cteditor-text-xs cteditor-text-foreground cteditor-truncate", children: o }),
|
|
53
|
-
n && /* @__PURE__ */ r("div", { className: "cteditor-text-xs cteditor-text-muted-foreground", children: B(n) })
|
|
54
|
-
] }),
|
|
55
|
-
/* @__PURE__ */ a("div", { className: "cteditor-flex cteditor-gap-1 cteditor-flex-shrink-0", children: [
|
|
56
|
-
/* @__PURE__ */ r(
|
|
57
|
-
"button",
|
|
58
|
-
{
|
|
59
|
-
onClick: l,
|
|
60
|
-
className: "cteditor-p-1 cteditor-rounded-md hover:cteditor-bg-accent cteditor-transition-colors",
|
|
61
|
-
"aria-label": "Download file",
|
|
62
|
-
title: "Download file",
|
|
63
|
-
children: /* @__PURE__ */ r(k, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-muted-foreground" })
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
/* @__PURE__ */ r(
|
|
67
|
-
"button",
|
|
68
|
-
{
|
|
69
|
-
onClick: f,
|
|
70
|
-
className: "cteditor-p-1 cteditor-rounded-md hover:cteditor-bg-destructive hover:cteditor-text-destructive-foreground cteditor-transition-colors",
|
|
71
|
-
"aria-label": "Delete file",
|
|
72
|
-
title: "Delete file",
|
|
73
|
-
children: /* @__PURE__ */ r(F, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-muted-foreground" })
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
] })
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
};
|
|
81
|
-
export {
|
|
82
|
-
z as default
|
|
83
|
-
};
|