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.
- package/dist/AIChatPlugin-DsUPycjT.js +872 -0
- package/dist/CombinedAutocompletGrammarPlugin-BXOz6IRb.js +1778 -0
- package/dist/{CommentBubblePlugin-DZQW1ibY.js → CommentBubblePlugin-kiMehQkL.js} +5 -5
- package/dist/CommentPlugin-DIuM-Jao.js +154 -0
- package/dist/LazyCodeMirror-DdCIk-83.js +21374 -0
- package/dist/{LazySignatureCanvas-FKl1mD-T.js → LazySignatureCanvas-BtcxlSTW.js} +1 -1
- package/dist/NotePanelPlugin-FirMseLu.js +31 -0
- package/dist/TextEnhancePlugin-oXbL_F1i.js +199 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/assets/style.css +1 -1
- package/dist/components/AiPlugin/commands.d.ts +4 -0
- package/dist/components/AiPlugin/index.d.ts +0 -4
- package/dist/components/CommentToggle/CommentToggle.d.ts +1 -0
- package/dist/components/ConfigurableEditorWithAuth.d.ts +2 -0
- package/dist/editor/components/FloatingToolbarManager.d.ts +2 -1
- package/dist/editor/components/ToolbarMount.d.ts +2 -1
- package/dist/{generateDocxThumbnail-DJlPLsdY.js → generateDocxThumbnail-RE7yNAXP.js} +7 -6
- package/dist/{generatePdfThumbnail-CfDAh39b.js → generatePdfThumbnail-CnldK2yE.js} +4 -4
- package/dist/{generateXlsxThumbnail-cRIT4Jyf.js → generateXlsxThumbnail-BpBB4ePK.js} +1 -1
- package/dist/{html2pdf.bundle.min-BW3dolOS.js → html2pdf.bundle.min-u-o_L5zA.js} +1 -1
- package/dist/{index-BEepnYCf.js → index-B4W_mfNI.js} +15 -15
- package/dist/{index-gjz4wieB.js → index-C8ZUqYRj.js} +56 -56
- package/dist/{index-W6_ogglw.js → index-CKRp6axU.js} +28 -28
- package/dist/{index-BydXFu_2.js → index-CL0adQ5R.js} +1 -1
- package/dist/{index-BDDjWwK4.js → index-CXyZgoBl.js} +16862 -21806
- package/dist/{index-BmfQcIrc.js → index-DZAvLKar.js} +118 -116
- package/dist/index-F2-F96Nx.js +720 -0
- package/dist/index.js +3 -3
- package/dist/marked.esm-Tjr8Gfse.js +1114 -0
- package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +1 -0
- package/dist/plugins/AIChatPlugin.commands.d.ts +7 -0
- package/dist/plugins/AIChatPlugin.d.ts +0 -7
- package/dist/plugins/CommentPlugin.commands.d.ts +5 -0
- package/dist/plugins/CommentPlugin.d.ts +0 -5
- package/dist/plugins/NotePanelPlugin.commands.d.ts +6 -0
- package/dist/plugins/NotePanelPlugin.d.ts +0 -6
- package/dist/plugins/TextEnhancePlugin.commands.d.ts +1 -0
- package/dist/plugins/TextEnhancePlugin.d.ts +0 -1
- package/dist/plugins/WordCountPlugin.d.ts +1 -0
- package/dist/sparkles-CTAYmQOE.js +17 -0
- package/dist/square-CupR-YWR.js +7 -0
- package/dist/types.d.ts +1 -0
- package/dist/useVoiceToText-U0yKgS5Q.js +153 -0
- package/package.json +5 -2
- package/dist/LazyCodeMirror-C1bW4mVF.js +0 -44822
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useLexicalComposerContext as
|
|
1
|
+
import { useLexicalComposerContext as p } from "@lexical/react/LexicalComposerContext";
|
|
2
2
|
import { useRef as y, useEffect as v } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { a1 as b } from "./index-CXyZgoBl.js";
|
|
4
4
|
const g = () => {
|
|
5
|
-
const [n] =
|
|
5
|
+
const [n] = p(), { getCommentById: o } = b(), t = y(null);
|
|
6
6
|
return v(() => {
|
|
7
7
|
if (!n.getRootElement())
|
|
8
8
|
return;
|
|
@@ -12,8 +12,8 @@ const g = () => {
|
|
|
12
12
|
const d = l, { commentId: i, element: u } = d.detail, c = o(i);
|
|
13
13
|
if (!c)
|
|
14
14
|
return;
|
|
15
|
-
const
|
|
16
|
-
e.textContent =
|
|
15
|
+
const a = 1 + c.replies.length;
|
|
16
|
+
e.textContent = a.toString();
|
|
17
17
|
const s = u.getBoundingClientRect();
|
|
18
18
|
e.style.setProperty("display", "flex", "important"), e.style.setProperty("left", `${s.right + window.scrollX - 10}px`, "important"), e.style.setProperty("top", `${s.top + window.scrollY - 10}px`, "important");
|
|
19
19
|
}, m = () => {
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { useLexicalComposerContext as w } from "@lexical/react/LexicalComposerContext";
|
|
3
|
+
import { $getSelection as b, $isRangeSelection as D, $isTextNode as A, COMMAND_PRIORITY_LOW as S } from "lexical";
|
|
4
|
+
import { a1 as I, a2 as _, a3 as $, a4 as j, D as F, a as K, b as L, d as P, U as H, V as U, a5 as z, H as B, g as V, B as O } from "./index-CXyZgoBl.js";
|
|
5
|
+
import { useState as M, useCallback as f, useEffect as N, useRef as W } from "react";
|
|
6
|
+
import { u as Y, M as q } from "./useVoiceToText-U0yKgS5Q.js";
|
|
7
|
+
const G = ({
|
|
8
|
+
isOpen: o,
|
|
9
|
+
onClose: n,
|
|
10
|
+
onSubmit: u,
|
|
11
|
+
selectedText: g
|
|
12
|
+
}) => {
|
|
13
|
+
const [c, d] = M(""), {
|
|
14
|
+
isRecording: r,
|
|
15
|
+
error: s,
|
|
16
|
+
toggleRecording: C
|
|
17
|
+
} = Y({
|
|
18
|
+
onTranscriptUpdate: (e) => {
|
|
19
|
+
d(e);
|
|
20
|
+
}
|
|
21
|
+
}), l = f(() => {
|
|
22
|
+
c.trim() && (u(c.trim()), d(""), n());
|
|
23
|
+
}, [c, u, n]), p = f(
|
|
24
|
+
(e) => {
|
|
25
|
+
e.key === "Enter" && (e.metaKey || e.ctrlKey) ? (e.preventDefault(), l()) : e.key === "Escape" && (e.preventDefault(), n());
|
|
26
|
+
},
|
|
27
|
+
[l, n]
|
|
28
|
+
);
|
|
29
|
+
N(() => {
|
|
30
|
+
o && d("");
|
|
31
|
+
}, [o]);
|
|
32
|
+
const m = W(null);
|
|
33
|
+
return N(() => {
|
|
34
|
+
if (!m.current) return;
|
|
35
|
+
const e = m.current;
|
|
36
|
+
e.style.height = "auto", e.style.height = `${e.scrollHeight}px`;
|
|
37
|
+
}, [c]), /* @__PURE__ */ t(F, { open: o, onOpenChange: n, children: /* @__PURE__ */ a(K, { className: "sm:cteditor-max-w-xl", children: [
|
|
38
|
+
/* @__PURE__ */ t(L, { children: /* @__PURE__ */ t(P, { className: "cteditor-flex cteditor-items-center cteditor-gap-3", children: "Add Comment" }) }),
|
|
39
|
+
/* @__PURE__ */ a("div", { className: "cteditor-space-y-4", children: [
|
|
40
|
+
g && /* @__PURE__ */ t(H, { className: "cteditor-bg-primary/5 cteditor-border-primary/20 cteditor-rounded-md pt-6", children: /* @__PURE__ */ t(U, { className: "md:cteditor-p-2 cteditor-p-2 cteditor-px-4 md:cteditor-pt-3 cteditor-pt-2", children: /* @__PURE__ */ a("div", { className: "cteditor-space-y-1", children: [
|
|
41
|
+
/* @__PURE__ */ t("p", { className: "cteditor-text-sm cteditor-font-medium", children: "Selected text:" }),
|
|
42
|
+
/* @__PURE__ */ a("p", { className: "cteditor-text-sm cteditor-italic cteditor-text-muted-foreground cteditor-leading-relaxed", children: [
|
|
43
|
+
"“",
|
|
44
|
+
g,
|
|
45
|
+
"”"
|
|
46
|
+
] })
|
|
47
|
+
] }) }) }),
|
|
48
|
+
/* @__PURE__ */ a("div", { className: "cteditor-space-y-2", children: [
|
|
49
|
+
/* @__PURE__ */ a("div", { className: "cteditor-relative", children: [
|
|
50
|
+
/* @__PURE__ */ t(
|
|
51
|
+
z,
|
|
52
|
+
{
|
|
53
|
+
ref: m,
|
|
54
|
+
value: c,
|
|
55
|
+
onChange: (e) => d(e.target.value),
|
|
56
|
+
onKeyDown: p,
|
|
57
|
+
className: "cteditor-min-h-[120px] cteditor-resize-none cteditor-pr-11 cteditor-overflow-clip",
|
|
58
|
+
placeholder: r ? "Listening..." : "Write your comment here...",
|
|
59
|
+
autoFocus: !0,
|
|
60
|
+
disabled: r
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ t(
|
|
64
|
+
"button",
|
|
65
|
+
{
|
|
66
|
+
type: "button",
|
|
67
|
+
onClick: C,
|
|
68
|
+
className: `cteditor-absolute cteditor-right-1 cteditor-top-1/2 -cteditor-translate-y-1/2 cteditor-h-8 cteditor-w-8 [&>svg]:cteditor-size-5 cteditor-flex cteditor-justify-center cteditor-items-center ${r ? "cteditor-text-red-500 cteditor-animate-pulse" : ""}`,
|
|
69
|
+
title: r ? "Stop recording" : "Start voice input",
|
|
70
|
+
children: r ? /* @__PURE__ */ t(B, {}) : /* @__PURE__ */ t(q, {})
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] }),
|
|
74
|
+
r && /* @__PURE__ */ a("p", { className: "cteditor-text-xs cteditor-text-blue-600 dark:cteditor-text-blue-400 cteditor-flex cteditor-items-center cteditor-gap-1", children: [
|
|
75
|
+
/* @__PURE__ */ t("span", { className: "cteditor-inline-block cteditor-w-2 cteditor-h-2 cteditor-bg-red-500 cteditor-rounded-full cteditor-animate-pulse" }),
|
|
76
|
+
"Recording... Speak your comment clearly"
|
|
77
|
+
] }),
|
|
78
|
+
s && /* @__PURE__ */ t("p", { className: "cteditor-text-xs cteditor-text-destructive", children: s }),
|
|
79
|
+
!r && !s && /* @__PURE__ */ t("p", { className: "cteditor-text-xs cteditor-text-muted-foreground", children: "Press Ctrl/Cmd + Enter to submit or click the microphone to speak" })
|
|
80
|
+
] })
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ t(V, { className: "cteditor-flex cteditor-justify-between cteditor-items-center", children: /* @__PURE__ */ a("div", { className: "cteditor-flex cteditor-gap-2", children: [
|
|
83
|
+
/* @__PURE__ */ t(O, { variant: "outline", onClick: n, children: "Cancel" }),
|
|
84
|
+
/* @__PURE__ */ t(O, { onClick: l, disabled: !c.trim(), children: "Add Comment" })
|
|
85
|
+
] }) })
|
|
86
|
+
] }) });
|
|
87
|
+
}, ot = () => {
|
|
88
|
+
const [o] = w(), [n, u] = M(!1), [g, c] = M(""), { addComment: d, currentUser: r } = I(), s = r?.name || "Anonymous", C = r?.id, l = r?.avatar, p = f(
|
|
89
|
+
(i) => {
|
|
90
|
+
o.update(() => {
|
|
91
|
+
const x = b();
|
|
92
|
+
if (D(x)) {
|
|
93
|
+
const T = x.getTextContent();
|
|
94
|
+
if (T.trim()) {
|
|
95
|
+
const k = d({
|
|
96
|
+
text: i,
|
|
97
|
+
author: s,
|
|
98
|
+
authorId: C,
|
|
99
|
+
authorAvatar: l,
|
|
100
|
+
selectedText: T
|
|
101
|
+
}), E = x.extract(), R = Date.now();
|
|
102
|
+
for (const h of E)
|
|
103
|
+
if (A(h)) {
|
|
104
|
+
const y = _(
|
|
105
|
+
h.getTextContent(),
|
|
106
|
+
k,
|
|
107
|
+
i,
|
|
108
|
+
s,
|
|
109
|
+
R
|
|
110
|
+
);
|
|
111
|
+
y.setFormat(h.getFormat());
|
|
112
|
+
const v = h.getStyle();
|
|
113
|
+
v && y.setStyle(v), h.replace(y);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
[o, d, s, C, l]
|
|
120
|
+
), m = f(() => {
|
|
121
|
+
o.getEditorState().read(() => {
|
|
122
|
+
const i = b();
|
|
123
|
+
if (D(i)) {
|
|
124
|
+
const x = i.getTextContent();
|
|
125
|
+
c(x);
|
|
126
|
+
}
|
|
127
|
+
}), u(!0);
|
|
128
|
+
}, [o]), e = f(() => {
|
|
129
|
+
u(!1), c("");
|
|
130
|
+
}, []);
|
|
131
|
+
return N(() => o.registerCommand(
|
|
132
|
+
$,
|
|
133
|
+
({ text: i }) => (p(i), !0),
|
|
134
|
+
S
|
|
135
|
+
), [o, p]), N(() => {
|
|
136
|
+
const i = () => (m(), !0);
|
|
137
|
+
return o.registerCommand(
|
|
138
|
+
j,
|
|
139
|
+
i,
|
|
140
|
+
S
|
|
141
|
+
);
|
|
142
|
+
}, [o, m]), /* @__PURE__ */ t(
|
|
143
|
+
G,
|
|
144
|
+
{
|
|
145
|
+
isOpen: n,
|
|
146
|
+
onClose: e,
|
|
147
|
+
onSubmit: p,
|
|
148
|
+
selectedText: g
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
};
|
|
152
|
+
export {
|
|
153
|
+
ot as default
|
|
154
|
+
};
|