eddyter 1.4.18 → 1.4.19
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-BUWq8ixX.js +1042 -0
- package/dist/{CombinedAutocompletGrammarPlugin-BXOz6IRb.js → CombinedAutocompletGrammarPlugin-Dq25w8tq.js} +388 -337
- package/dist/{CommentBubblePlugin-kiMehQkL.js → CommentBubblePlugin-B77d3Qq6.js} +4 -4
- package/dist/CommentPlugin-BJQyKmrN.js +212 -0
- package/dist/{NotePanelPlugin-FirMseLu.js → NotePanelPlugin-BqOdcg07.js} +3 -3
- package/dist/{TextEnhancePlugin-oXbL_F1i.js → TextEnhancePlugin-BnmdRgUu.js} +2 -2
- package/dist/assets/style.css +1 -1
- package/dist/components/AnimatedPlaceholderText.d.ts +2 -0
- package/dist/components/DividerPicker/DividerPicker.d.ts +17 -0
- package/dist/components/EditorialDivider/EditorialDividerView.d.ts +23 -0
- package/dist/components/EmojiPickerWidget/EmojiPickerWidget.d.ts +1 -1
- package/dist/components/LockedFeature/LockedFeature.d.ts +4 -0
- package/dist/components/Toolbar/styles.d.ts +19 -1
- package/dist/components/UnifiedColorPicker/UnifiedColorPicker.d.ts +1 -0
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/separator.d.ts +4 -1
- package/dist/constants.d.ts +12 -1
- package/dist/editorConfig.d.ts +7 -0
- package/dist/{generateDocxThumbnail-RE7yNAXP.js → generateDocxThumbnail-DBMxjZ83.js} +1 -1
- package/dist/{generatePdfThumbnail-CnldK2yE.js → generatePdfThumbnail-Cv2-ZCzh.js} +4 -4
- package/dist/{generateXlsxThumbnail-BpBB4ePK.js → generateXlsxThumbnail-UHmNc7Fa.js} +1 -1
- package/dist/hooks/useEditorToolbar.d.ts +1 -1
- package/dist/{index-CL0adQ5R.js → index-BaWQzoL2.js} +11 -11
- package/dist/{index-CXyZgoBl.js → index-Bex3G_eE.js} +18704 -15777
- package/dist/index-C_mjLQUF.js +796 -0
- package/dist/{index-C8ZUqYRj.js → index-ChSepytp.js} +26 -26
- package/dist/index-Cl_A9eof.js +1508 -0
- package/dist/{index-B4W_mfNI.js → index-DcHU8PlQ.js} +120 -123
- package/dist/{index-CKRp6axU.js → index-q_TW8dU1.js} +19 -19
- package/dist/index.js +7 -7
- package/dist/nodes/AsterismNode.d.ts +22 -0
- package/dist/nodes/ButtonNode.d.ts +37 -0
- package/dist/nodes/ColumnNode.d.ts +44 -0
- package/dist/nodes/ColumnsNode.d.ts +45 -0
- package/dist/nodes/EditorialFieldNode.d.ts +32 -0
- package/dist/nodes/FaqNode.d.ts +28 -0
- package/dist/nodes/ImagePlaceholderNode.d.ts +15 -0
- package/dist/nodes/LabeledRuleNode.d.ts +33 -0
- package/dist/nodes/OrnamentDividerNode.d.ts +22 -0
- package/dist/nodes/PullQuoteRulesNode.d.ts +32 -0
- package/dist/nodes/SectionNumberHeadingNode.d.ts +42 -0
- package/dist/plugins/BlockLayoutPlugin.d.ts +29 -0
- package/dist/plugins/ColumnAddButtonPlugin.d.ts +12 -0
- package/dist/plugins/CommentPlugin.commands.d.ts +1 -0
- package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +12 -2
- package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +2 -1
- package/dist/plugins/CustomHorizontalRulePlugin/styles.d.ts +38 -0
- package/dist/plugins/EditorialFloatingToolbarPlugin.d.ts +8 -0
- package/dist/plugins/EditorialTypographyPlugin.d.ts +18 -0
- package/dist/plugins/PatternsPlugin.d.ts +12 -0
- package/dist/{sparkles-CTAYmQOE.js → sparkles-C-XoMho5.js} +1 -1
- package/dist/types.d.ts +11 -0
- package/dist/ui/Icons.d.ts +34 -9
- package/dist/{useVoiceToText-U0yKgS5Q.js → useVoiceToText-BzaLSbRi.js} +17 -17
- package/package.json +1 -1
- package/dist/AIChatPlugin-DsUPycjT.js +0 -872
- package/dist/CommentPlugin-DIuM-Jao.js +0 -154
- package/dist/index-DZAvLKar.js +0 -1431
- package/dist/index-F2-F96Nx.js +0 -720
- package/dist/square-CupR-YWR.js +0 -7
|
@@ -1,154 +0,0 @@
|
|
|
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
|
-
};
|