eddyter 1.4.17 → 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-2pIKhzIw.js → AIChatPlugin-DsUPycjT.js} +41 -40
- package/dist/CombinedAutocompletGrammarPlugin-BXOz6IRb.js +1778 -0
- package/dist/{CommentBubblePlugin-J3r4kNGK.js → CommentBubblePlugin-kiMehQkL.js} +5 -5
- package/dist/{CommentPlugin-BbuE8_Aj.js → CommentPlugin-DIuM-Jao.js} +24 -24
- package/dist/{LazySignatureCanvas-D1t8oQDK.js → LazySignatureCanvas-BtcxlSTW.js} +1 -1
- package/dist/{NotePanelPlugin-C16G36Jd.js → NotePanelPlugin-FirMseLu.js} +3 -3
- package/dist/{TextEnhancePlugin-BShY1r5J.js → TextEnhancePlugin-oXbL_F1i.js} +10 -9
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/assets/style.css +1 -1
- 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-Ve0zlObJ.js → generateDocxThumbnail-RE7yNAXP.js} +7 -6
- package/dist/{generatePdfThumbnail-EuSjdwzm.js → generatePdfThumbnail-CnldK2yE.js} +4 -4
- package/dist/{generateXlsxThumbnail-C10kl6qh.js → generateXlsxThumbnail-BpBB4ePK.js} +1 -1
- package/dist/{html2pdf.bundle.min-BQaO0VTp.js → html2pdf.bundle.min-u-o_L5zA.js} +1 -1
- package/dist/{index-gPq4n7_a.js → index-B4W_mfNI.js} +15 -15
- package/dist/{index-BSgLtgyt.js → index-C8ZUqYRj.js} +23 -23
- package/dist/{index-B8zPtmsK.js → index-CKRp6axU.js} +9 -9
- package/dist/{index-ClsuXAKJ.js → index-CL0adQ5R.js} +1 -1
- package/dist/{index-CxOOJD40.js → index-CXyZgoBl.js} +12941 -14705
- package/dist/{index-D25uusM-.js → index-DZAvLKar.js} +27 -26
- package/dist/{index-CoLO4gm_.js → index-F2-F96Nx.js} +11 -10
- package/dist/index.js +1 -1
- package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +1 -0
- package/dist/plugins/WordCountPlugin.d.ts +1 -0
- package/dist/sparkles-CTAYmQOE.js +17 -0
- package/dist/{square-DrMKkLmP.js → square-CupR-YWR.js} +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/{useVoiceToText-DCddJzYF.js → useVoiceToText-U0yKgS5Q.js} +14 -14
- package/package.json +1 -1
|
@@ -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 = () => {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { useLexicalComposerContext as w } from "@lexical/react/LexicalComposerContext";
|
|
3
3
|
import { $getSelection as b, $isRangeSelection as D, $isTextNode as A, COMMAND_PRIORITY_LOW as S } from "lexical";
|
|
4
|
-
import {
|
|
5
|
-
import { useState as M, useCallback as f, useEffect as N, useRef as
|
|
6
|
-
import { u as Y, M as
|
|
7
|
-
const
|
|
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
8
|
isOpen: o,
|
|
9
9
|
onClose: n,
|
|
10
10
|
onSubmit: u,
|
|
11
11
|
selectedText: g
|
|
12
12
|
}) => {
|
|
13
|
-
const [c,
|
|
13
|
+
const [c, d] = M(""), {
|
|
14
14
|
isRecording: r,
|
|
15
15
|
error: s,
|
|
16
16
|
toggleRecording: C
|
|
17
17
|
} = Y({
|
|
18
18
|
onTranscriptUpdate: (e) => {
|
|
19
|
-
|
|
19
|
+
d(e);
|
|
20
20
|
}
|
|
21
21
|
}), l = f(() => {
|
|
22
|
-
c.trim() && (u(c.trim()),
|
|
22
|
+
c.trim() && (u(c.trim()), d(""), n());
|
|
23
23
|
}, [c, u, n]), p = f(
|
|
24
24
|
(e) => {
|
|
25
25
|
e.key === "Enter" && (e.metaKey || e.ctrlKey) ? (e.preventDefault(), l()) : e.key === "Escape" && (e.preventDefault(), n());
|
|
@@ -27,32 +27,32 @@ const Q = ({
|
|
|
27
27
|
[l, n]
|
|
28
28
|
);
|
|
29
29
|
N(() => {
|
|
30
|
-
o &&
|
|
30
|
+
o && d("");
|
|
31
31
|
}, [o]);
|
|
32
|
-
const m =
|
|
32
|
+
const m = W(null);
|
|
33
33
|
return N(() => {
|
|
34
34
|
if (!m.current) return;
|
|
35
35
|
const e = m.current;
|
|
36
36
|
e.style.height = "auto", e.style.height = `${e.scrollHeight}px`;
|
|
37
|
-
}, [c]), /* @__PURE__ */ t(F, { open: o, onOpenChange: n, children: /* @__PURE__ */
|
|
37
|
+
}, [c]), /* @__PURE__ */ t(F, { open: o, onOpenChange: n, children: /* @__PURE__ */ a(K, { className: "sm:cteditor-max-w-xl", children: [
|
|
38
38
|
/* @__PURE__ */ t(L, { children: /* @__PURE__ */ t(P, { className: "cteditor-flex cteditor-items-center cteditor-gap-3", children: "Add Comment" }) }),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
g && /* @__PURE__ */ t(
|
|
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
41
|
/* @__PURE__ */ t("p", { className: "cteditor-text-sm cteditor-font-medium", children: "Selected text:" }),
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ a("p", { className: "cteditor-text-sm cteditor-italic cteditor-text-muted-foreground cteditor-leading-relaxed", children: [
|
|
43
43
|
"“",
|
|
44
44
|
g,
|
|
45
45
|
"”"
|
|
46
46
|
] })
|
|
47
47
|
] }) }) }),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ a("div", { className: "cteditor-space-y-2", children: [
|
|
49
|
+
/* @__PURE__ */ a("div", { className: "cteditor-relative", children: [
|
|
50
50
|
/* @__PURE__ */ t(
|
|
51
51
|
z,
|
|
52
52
|
{
|
|
53
53
|
ref: m,
|
|
54
54
|
value: c,
|
|
55
|
-
onChange: (e) =>
|
|
55
|
+
onChange: (e) => d(e.target.value),
|
|
56
56
|
onKeyDown: p,
|
|
57
57
|
className: "cteditor-min-h-[120px] cteditor-resize-none cteditor-pr-11 cteditor-overflow-clip",
|
|
58
58
|
placeholder: r ? "Listening..." : "Write your comment here...",
|
|
@@ -67,11 +67,11 @@ const Q = ({
|
|
|
67
67
|
onClick: C,
|
|
68
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
69
|
title: r ? "Stop recording" : "Start voice input",
|
|
70
|
-
children: r ? /* @__PURE__ */ t(B, {}) : /* @__PURE__ */ t(
|
|
70
|
+
children: r ? /* @__PURE__ */ t(B, {}) : /* @__PURE__ */ t(q, {})
|
|
71
71
|
}
|
|
72
72
|
)
|
|
73
73
|
] }),
|
|
74
|
-
r && /* @__PURE__ */
|
|
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
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
76
|
"Recording... Speak your comment clearly"
|
|
77
77
|
] }),
|
|
@@ -79,20 +79,20 @@ const Q = ({
|
|
|
79
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
80
|
] })
|
|
81
81
|
] }),
|
|
82
|
-
/* @__PURE__ */ t(
|
|
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
83
|
/* @__PURE__ */ t(O, { variant: "outline", onClick: n, children: "Cancel" }),
|
|
84
84
|
/* @__PURE__ */ t(O, { onClick: l, disabled: !c.trim(), children: "Add Comment" })
|
|
85
85
|
] }) })
|
|
86
86
|
] }) });
|
|
87
87
|
}, ot = () => {
|
|
88
|
-
const [o] = w(), [n, u] = M(!1), [g, c] = M(""), { addComment:
|
|
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
89
|
(i) => {
|
|
90
90
|
o.update(() => {
|
|
91
91
|
const x = b();
|
|
92
92
|
if (D(x)) {
|
|
93
93
|
const T = x.getTextContent();
|
|
94
94
|
if (T.trim()) {
|
|
95
|
-
const k =
|
|
95
|
+
const k = d({
|
|
96
96
|
text: i,
|
|
97
97
|
author: s,
|
|
98
98
|
authorId: C,
|
|
@@ -116,7 +116,7 @@ const Q = ({
|
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
118
|
},
|
|
119
|
-
[o,
|
|
119
|
+
[o, d, s, C, l]
|
|
120
120
|
), m = f(() => {
|
|
121
121
|
o.getEditorState().read(() => {
|
|
122
122
|
const i = b();
|
|
@@ -140,7 +140,7 @@ const Q = ({
|
|
|
140
140
|
S
|
|
141
141
|
);
|
|
142
142
|
}, [o, m]), /* @__PURE__ */ t(
|
|
143
|
-
|
|
143
|
+
G,
|
|
144
144
|
{
|
|
145
145
|
isOpen: n,
|
|
146
146
|
onClose: e,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as j } from "react/jsx-runtime";
|
|
2
2
|
import A, { Component as q, forwardRef as I } from "react";
|
|
3
3
|
import { _ as V, a as $ } from "./objectWithoutPropertiesLoose-DiWPeE4c.js";
|
|
4
|
-
import {
|
|
4
|
+
import { g as N } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
5
5
|
function H(e, n) {
|
|
6
6
|
if (e == null) return {};
|
|
7
7
|
var r, t, o = V(e, n);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useLexicalComposerContext as a } from "@lexical/react/LexicalComposerContext";
|
|
2
2
|
import { $insertNodes as s, COMMAND_PRIORITY_EDITOR as i } from "lexical";
|
|
3
3
|
import { useEffect as l } from "react";
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
4
|
+
import { ap as N, aq as u, ar as d } from "./index-CXyZgoBl.js";
|
|
5
|
+
function g() {
|
|
6
6
|
const [e] = a();
|
|
7
7
|
return l(() => {
|
|
8
8
|
if (!e.hasNode(N))
|
|
@@ -27,5 +27,5 @@ function p() {
|
|
|
27
27
|
}, [e]), null;
|
|
28
28
|
}
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
g as default
|
|
31
31
|
};
|
|
@@ -2,7 +2,8 @@ import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { useLexicalComposerContext as R } from "@lexical/react/LexicalComposerContext";
|
|
3
3
|
import { COMMAND_PRIORITY_LOW as O, $getSelection as C, $isRangeSelection as w } from "lexical";
|
|
4
4
|
import { forwardRef as M, useState as l, useImperativeHandle as P, useRef as D, useEffect as H } from "react";
|
|
5
|
-
import { c as L, D as _, a as z, b as j, d as W,
|
|
5
|
+
import { c as L, D as _, a as z, b as j, d as W, e as B, as as K, g as $, B as b, at as q, t as d, p as F } from "./index-CXyZgoBl.js";
|
|
6
|
+
import { S as E } from "./sparkles-CTAYmQOE.js";
|
|
6
7
|
const U = L("ArrowRight", [
|
|
7
8
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
8
9
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
@@ -39,7 +40,7 @@ const U = L("ArrowRight", [
|
|
|
39
40
|
return /* @__PURE__ */ t(_, { open: h, onOpenChange: x, children: /* @__PURE__ */ o(z, { className: "sm:cteditor-max-w-[500px] cteditor-max-h-[650px]", children: [
|
|
40
41
|
/* @__PURE__ */ o(j, { children: [
|
|
41
42
|
/* @__PURE__ */ o(W, { className: "cteditor-flex cteditor-items-center cteditor-gap-2", children: [
|
|
42
|
-
/* @__PURE__ */ t(
|
|
43
|
+
/* @__PURE__ */ t(E, { className: "cteditor-size-5" }),
|
|
43
44
|
"Enhance Text"
|
|
44
45
|
] }),
|
|
45
46
|
/* @__PURE__ */ t(B, { children: "Enhance your selected text with AI assistance." })
|
|
@@ -82,7 +83,7 @@ const U = L("ArrowRight", [
|
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
),
|
|
85
|
-
/* @__PURE__ */ t("div", { className: "cteditor-absolute cteditor-inset-0 cteditor-rounded-full cteditor-bg-background cteditor-flex cteditor-items-center cteditor-justify-center cteditor-m-[2px]", children: /* @__PURE__ */ t(
|
|
86
|
+
/* @__PURE__ */ t("div", { className: "cteditor-absolute cteditor-inset-0 cteditor-rounded-full cteditor-bg-background cteditor-flex cteditor-items-center cteditor-justify-center cteditor-m-[2px]", children: /* @__PURE__ */ t(E, { className: "cteditor-w-6 cteditor-h-6 cteditor-text-purple-500 cteditor-animate-pulse" }) })
|
|
86
87
|
] }),
|
|
87
88
|
/* @__PURE__ */ t("div", { className: "cteditor-text-center", children: /* @__PURE__ */ t("p", { className: "cteditor-text-sm cteditor-font-medium cteditor-text-foreground", children: "Enhancing text..." }) })
|
|
88
89
|
] }),
|
|
@@ -95,20 +96,20 @@ const U = L("ArrowRight", [
|
|
|
95
96
|
] })
|
|
96
97
|
] }),
|
|
97
98
|
/* @__PURE__ */ o($, { children: [
|
|
98
|
-
/* @__PURE__ */ t(
|
|
99
|
+
/* @__PURE__ */ t(b, { variant: "outline", onClick: x, children: "Cancel" }),
|
|
99
100
|
!g && /* @__PURE__ */ o(
|
|
100
|
-
|
|
101
|
+
b,
|
|
101
102
|
{
|
|
102
103
|
onClick: T,
|
|
103
104
|
disabled: !c.trim() || p,
|
|
104
105
|
className: "cteditor-gap-2",
|
|
105
106
|
children: [
|
|
106
|
-
/* @__PURE__ */ t(
|
|
107
|
+
/* @__PURE__ */ t(E, { className: "cteditor-size-5" }),
|
|
107
108
|
"Enhance"
|
|
108
109
|
]
|
|
109
110
|
}
|
|
110
111
|
),
|
|
111
|
-
g && /* @__PURE__ */ o(
|
|
112
|
+
g && /* @__PURE__ */ o(b, { onClick: S, className: "cteditor-gap-2", children: [
|
|
112
113
|
"Insert",
|
|
113
114
|
/* @__PURE__ */ t(U, { className: "cteditor-size-5" })
|
|
114
115
|
] })
|
|
@@ -116,7 +117,7 @@ const U = L("ArrowRight", [
|
|
|
116
117
|
] }) });
|
|
117
118
|
});
|
|
118
119
|
I.displayName = "TextEnhanceDialog";
|
|
119
|
-
const
|
|
120
|
+
const Z = ({ apiKey: f }) => {
|
|
120
121
|
const [s] = R(), h = D(null), r = D(void 0), m = async (c, n) => {
|
|
121
122
|
let i = null;
|
|
122
123
|
s.getEditorState().read(() => {
|
|
@@ -194,5 +195,5 @@ const V = ({ apiKey: f }) => {
|
|
|
194
195
|
);
|
|
195
196
|
};
|
|
196
197
|
export {
|
|
197
|
-
|
|
198
|
+
Z as default
|
|
198
199
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function l(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
o as c,
|
|
7
|
+
l as g
|
|
8
|
+
};
|