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
|
@@ -10,14 +10,15 @@ import { LexicalErrorBoundary as Te } from "@lexical/react/LexicalErrorBoundary"
|
|
|
10
10
|
import { HistoryPlugin as Oe } from "@lexical/react/LexicalHistoryPlugin";
|
|
11
11
|
import { LexicalNestedComposer as _e } from "@lexical/react/LexicalNestedComposer";
|
|
12
12
|
import { OnChangePlugin as je } from "@lexical/react/LexicalOnChangePlugin";
|
|
13
|
-
import { RichTextPlugin as
|
|
14
|
-
import { useLexicalEditable as
|
|
13
|
+
import { RichTextPlugin as He } from "@lexical/react/LexicalRichTextPlugin";
|
|
14
|
+
import { useLexicalEditable as Fe } from "@lexical/react/useLexicalEditable";
|
|
15
15
|
import { useLexicalNodeSelection as Ye } from "@lexical/react/useLexicalNodeSelection";
|
|
16
16
|
import { mergeRegister as Be } from "@lexical/utils";
|
|
17
17
|
import { $getRoot as qt, $isNodeSelection as st, $getSelection as tt, $isParagraphNode as _t, $setSelection as pt, $isRangeSelection as Xe, SELECTION_CHANGE_COMMAND as Ue, COMMAND_PRIORITY_LOW as et, CLICK_COMMAND as Ge, DRAGSTART_COMMAND as Ke, KEY_DELETE_COMMAND as qe, KEY_BACKSPACE_COMMAND as Ve, KEY_ENTER_COMMAND as Je, KEY_ESCAPE_COMMAND as Qe, $getNodeByKey as rt, RootNode as Ze, TextNode as tr, LineBreakNode as er, ParagraphNode as rr, createCommand as or } from "lexical";
|
|
18
18
|
import { useState as C, useEffect as X, useRef as B, useMemo as Vt, useCallback as R, useLayoutEffect as Jt, Suspense as ir } from "react";
|
|
19
|
-
import { c as Rt, D as oe, a as ie, b as ne, d as ce, e as ae, g as de, B as Qt,
|
|
20
|
-
import { S as
|
|
19
|
+
import { c as Rt, D as oe, a as ie, b as ne, d as ce, e as ae, g as de, B as Qt, az as Pt, t as k, ac as nr, o as cr, aA as V, aB as ar, aC as dr, aD as sr, ae as lr, af as ur, ag as mr, ah as gr, ai as hr, aE as fr, ab as pr, aF as br, aG as wr, X as xr, aH as yr, aI as Cr, l as vr, aJ as Nr, aK as Rr } from "./index-CXyZgoBl.js";
|
|
20
|
+
import { S as kr } from "./square-CupR-YWR.js";
|
|
21
|
+
import { S as Ir } from "./sparkles-CTAYmQOE.js";
|
|
21
22
|
const se = Rt("Crop", [
|
|
22
23
|
["path", { d: "M6 2v14a2 2 0 0 0 2 2h14", key: "ron5a4" }],
|
|
23
24
|
["path", { d: "M18 22V8a2 2 0 0 0-2-2H2", key: "7s9ehn" }]
|
|
@@ -295,8 +296,8 @@ function Ar({
|
|
|
295
296
|
return;
|
|
296
297
|
}
|
|
297
298
|
const S = u.mode;
|
|
298
|
-
let O = G, Z = ct,
|
|
299
|
-
S.includes("e") && (
|
|
299
|
+
let O = G, Z = ct, H = T, F = K;
|
|
300
|
+
S.includes("e") && (H = T + b), S.includes("w") && (O = G + b, H = T - b), S.includes("s") && (F = K + j), S.includes("n") && (Z = ct + j, F = K - j), Q != null && Q > 0 && (S === "e" || S === "w" ? (F = H / Q, S.includes("n") && (Z = ct + K - F)) : S === "n" || S === "s" ? (H = F * Q, S.includes("w") && (O = G + T - H)) : (F = H / Q, S.includes("n") && (Z = ct + K - F), S.includes("w") && (O = G + T - H))), D(z({ x: O, y: Z, width: H, height: F }));
|
|
300
301
|
}, g = () => {
|
|
301
302
|
it.current = null;
|
|
302
303
|
};
|
|
@@ -408,7 +409,7 @@ function Ar({
|
|
|
408
409
|
/* @__PURE__ */ e("div", { className: "cteditor-grid cteditor-grid-cols-3 cteditor-gap-2", children: [
|
|
409
410
|
{ id: "freeform", label: "Freeform", icon: se },
|
|
410
411
|
{ id: "original", label: "Original", icon: nr },
|
|
411
|
-
{ id: "1:1", label: "1:1", icon:
|
|
412
|
+
{ id: "1:1", label: "1:1", icon: kr },
|
|
412
413
|
{ id: "4:3", label: "4:3", icon: Zt },
|
|
413
414
|
{ id: "16:9", label: "16:9", icon: Zt },
|
|
414
415
|
{ id: "3:4", label: "3:4", icon: te },
|
|
@@ -570,7 +571,7 @@ function Tr(o, c = 12e3) {
|
|
|
570
571
|
}, y.src = o;
|
|
571
572
|
});
|
|
572
573
|
}
|
|
573
|
-
function
|
|
574
|
+
function co({
|
|
574
575
|
src: o,
|
|
575
576
|
altText: c,
|
|
576
577
|
nodeKey: s,
|
|
@@ -585,7 +586,7 @@ function no({
|
|
|
585
586
|
position: w = "none",
|
|
586
587
|
linkUrl: I
|
|
587
588
|
}) {
|
|
588
|
-
const x = B(null), J = B(null), [i, A, v] = Ye(s), [D, it] = C(!1), ut = B(!1), { isCollabActive: bt } = ze(), [d] = $e(), [z, wt] = C(null), nt = B(null), [U, xt] = C(!1), St =
|
|
589
|
+
const x = B(null), J = B(null), [i, A, v] = Ye(s), [D, it] = C(!1), ut = B(!1), { isCollabActive: bt } = ze(), [d] = $e(), [z, wt] = C(null), nt = B(null), [U, xt] = C(!1), St = Fe(), [n, g] = C(!1), [p, u] = C(""), [b, j] = C(!1), [mt, gt] = C(!1), [Q, G] = C(""), [ct, T] = C(""), [K, S] = C(!1), O = B(null), [Z, H] = C(0), [F, ht] = C(!1), kt = B(null), [ue, yt] = C(null), [Mt, Ct] = C(!1), [jt, Ht] = C(!1), at = B(null), It = cr()?.apiKey, Dt = Z > 0 && Z < 350;
|
|
589
590
|
Jt(() => {
|
|
590
591
|
if (!i || !st(z) || U) {
|
|
591
592
|
yt(null);
|
|
@@ -620,7 +621,7 @@ function no({
|
|
|
620
621
|
}, [i, z, U, Dt, d, Z]), X(() => {
|
|
621
622
|
if (x.current) {
|
|
622
623
|
const t = () => {
|
|
623
|
-
ut.current || x.current &&
|
|
624
|
+
ut.current || x.current && H(x.current.offsetWidth);
|
|
624
625
|
};
|
|
625
626
|
t();
|
|
626
627
|
const r = new ResizeObserver(t);
|
|
@@ -647,7 +648,7 @@ function no({
|
|
|
647
648
|
})), !1;
|
|
648
649
|
},
|
|
649
650
|
[d, i]
|
|
650
|
-
),
|
|
651
|
+
), Ft = R(
|
|
651
652
|
(t) => {
|
|
652
653
|
const r = tt(), a = J.current;
|
|
653
654
|
if (i && st(r) && r.getNodes().length === 1) {
|
|
@@ -731,7 +732,7 @@ function no({
|
|
|
731
732
|
Lt,
|
|
732
733
|
et
|
|
733
734
|
),
|
|
734
|
-
d.registerCommand(Je,
|
|
735
|
+
d.registerCommand(Je, Ft, et),
|
|
735
736
|
d.registerCommand(
|
|
736
737
|
Qe,
|
|
737
738
|
Yt,
|
|
@@ -748,7 +749,7 @@ function no({
|
|
|
748
749
|
i,
|
|
749
750
|
s,
|
|
750
751
|
Lt,
|
|
751
|
-
|
|
752
|
+
Ft,
|
|
752
753
|
Yt,
|
|
753
754
|
At,
|
|
754
755
|
zt,
|
|
@@ -897,7 +898,7 @@ function no({
|
|
|
897
898
|
}, []), X(() => {
|
|
898
899
|
i || ht(!1);
|
|
899
900
|
}, [i]), X(() => {
|
|
900
|
-
xt(!1),
|
|
901
|
+
xt(!1), Ht(!1);
|
|
901
902
|
}, [o]);
|
|
902
903
|
const Xt = async () => {
|
|
903
904
|
if (!p.trim() || b) return;
|
|
@@ -933,7 +934,7 @@ function no({
|
|
|
933
934
|
m(Y) && c && c !== "Generated image" && c.trim() ? P = c.trim() : P = Y;
|
|
934
935
|
} else c && c !== "Generated image" && c.trim() && (P = c.trim());
|
|
935
936
|
P ? r = `${P} with ${l}` : r = l;
|
|
936
|
-
const L = await fetch(`${
|
|
937
|
+
const L = await fetch(`${vr}/agent/stream`, {
|
|
937
938
|
method: "POST",
|
|
938
939
|
headers: { "Content-Type": "application/json" },
|
|
939
940
|
body: JSON.stringify({
|
|
@@ -980,13 +981,13 @@ function no({
|
|
|
980
981
|
description: "Compare the images and choose which to keep."
|
|
981
982
|
}), G(dt), T(r), gt(!0), u(""), g(!1);
|
|
982
983
|
} catch (r) {
|
|
983
|
-
if (k.dismiss(t), r instanceof
|
|
984
|
+
if (k.dismiss(t), r instanceof Nr) {
|
|
984
985
|
const a = r.code === "API_KEYS_DISABLED" ? "API Keys Disabled" : "API Key Required";
|
|
985
986
|
k.error(a, {
|
|
986
987
|
description: r.message,
|
|
987
988
|
duration: 8e3
|
|
988
989
|
});
|
|
989
|
-
} else r instanceof
|
|
990
|
+
} else r instanceof Rr ? k.error("Credits Issue", {
|
|
990
991
|
description: r.message,
|
|
991
992
|
duration: 8e3
|
|
992
993
|
}) : k.error("Failed to refine image", {
|
|
@@ -1012,7 +1013,7 @@ function no({
|
|
|
1012
1013
|
at.current && o === at.current && (Nt.add(o), at.current = null, Ct(!1));
|
|
1013
1014
|
}, [o]), Ee = R(() => {
|
|
1014
1015
|
if (!jt && lt(o) && o !== $t) {
|
|
1015
|
-
|
|
1016
|
+
Ht(!0), xt(!1), Ct(!1), at.current = null, d.update(() => {
|
|
1016
1017
|
const r = rt(s);
|
|
1017
1018
|
if (!V(r)) return;
|
|
1018
1019
|
r.setSrc($t);
|
|
@@ -1235,7 +1236,7 @@ function no({
|
|
|
1235
1236
|
className: " cteditor-size-8 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-accent hover:cteditor-bg-accent/90 cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-foreground/20",
|
|
1236
1237
|
"aria-label": "Refine image",
|
|
1237
1238
|
title: "Refine image",
|
|
1238
|
-
children: /* @__PURE__ */ e(
|
|
1239
|
+
children: /* @__PURE__ */ e(Ir, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
|
|
1239
1240
|
}
|
|
1240
1241
|
),
|
|
1241
1242
|
/* @__PURE__ */ e(
|
|
@@ -1248,7 +1249,7 @@ function no({
|
|
|
1248
1249
|
className: " cteditor-size-8 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-accent hover:cteditor-bg-accent/90 cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-foreground/20",
|
|
1249
1250
|
"aria-label": "Open image in new tab",
|
|
1250
1251
|
title: "Open in new tab",
|
|
1251
|
-
children: /* @__PURE__ */ e(
|
|
1252
|
+
children: /* @__PURE__ */ e(br, {})
|
|
1252
1253
|
}
|
|
1253
1254
|
),
|
|
1254
1255
|
/* @__PURE__ */ e(
|
|
@@ -1261,7 +1262,7 @@ function no({
|
|
|
1261
1262
|
className: " cteditor-size-8 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-accent hover:cteditor-bg-destructive hover:cteditor-text-destructive-foreground cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-foreground/20",
|
|
1262
1263
|
"aria-label": "Delete image",
|
|
1263
1264
|
title: "Delete image",
|
|
1264
|
-
children: /* @__PURE__ */ e(
|
|
1265
|
+
children: /* @__PURE__ */ e(wr, {})
|
|
1265
1266
|
}
|
|
1266
1267
|
)
|
|
1267
1268
|
]
|
|
@@ -1323,7 +1324,7 @@ function no({
|
|
|
1323
1324
|
},
|
|
1324
1325
|
disabled: b,
|
|
1325
1326
|
className: "cteditor-size-9 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-text-sm cteditor-rounded-md cteditor-bg-background cteditor-border cteditor-border-border cteditor-text-foreground hover:cteditor-bg-accent disabled:cteditor-opacity-50 disabled:cteditor-cursor-not-allowed cteditor-transition-colors",
|
|
1326
|
-
children: /* @__PURE__ */ e(
|
|
1327
|
+
children: /* @__PURE__ */ e(xr, { size: 16 })
|
|
1327
1328
|
}
|
|
1328
1329
|
)
|
|
1329
1330
|
] })
|
|
@@ -1372,7 +1373,7 @@ function no({
|
|
|
1372
1373
|
children: [
|
|
1373
1374
|
/* @__PURE__ */ e(Ae, {}),
|
|
1374
1375
|
/* @__PURE__ */ e(
|
|
1375
|
-
|
|
1376
|
+
He,
|
|
1376
1377
|
{
|
|
1377
1378
|
contentEditable: /* @__PURE__ */ e(
|
|
1378
1379
|
We,
|
|
@@ -1393,7 +1394,7 @@ function no({
|
|
|
1393
1394
|
}
|
|
1394
1395
|
),
|
|
1395
1396
|
/* @__PURE__ */ e(Oe, {}),
|
|
1396
|
-
/* @__PURE__ */ e(
|
|
1397
|
+
/* @__PURE__ */ e(yr, { namespace: Cr.namespace })
|
|
1397
1398
|
]
|
|
1398
1399
|
}
|
|
1399
1400
|
)
|
|
@@ -1402,7 +1403,7 @@ function no({
|
|
|
1402
1403
|
/* @__PURE__ */ e(
|
|
1403
1404
|
Ar,
|
|
1404
1405
|
{
|
|
1405
|
-
open:
|
|
1406
|
+
open: F,
|
|
1406
1407
|
onOpenChange: ht,
|
|
1407
1408
|
src: o,
|
|
1408
1409
|
altText: c,
|
|
@@ -1426,5 +1427,5 @@ function no({
|
|
|
1426
1427
|
}
|
|
1427
1428
|
export {
|
|
1428
1429
|
re as RIGHT_CLICK_IMAGE_COMMAND,
|
|
1429
|
-
|
|
1430
|
+
co as default
|
|
1430
1431
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import { useLexicalComposerContext as se } from "@lexical/react/LexicalComposerContext";
|
|
3
3
|
import { COMMAND_PRIORITY_LOW as k, $getSelection as O, $isRangeSelection as R, $insertNodes as de, $getRoot as G } from "lexical";
|
|
4
|
-
import { c as X, D as $, a as F, b as U, d as K,
|
|
5
|
-
import
|
|
4
|
+
import { c as X, D as $, a as F, b as U, d as K, e as z, L as le, I as ue, f as J, g as H, B as E, u as me, A as fe, h as ge, i as pe, t as a, j as he, p as _, k as ye, $ as xe, l as Ne, m as L, n as be } from "./index-CXyZgoBl.js";
|
|
5
|
+
import B, { useState as I, forwardRef as ve, useImperativeHandle as Ie, useRef as A, useEffect as D } from "react";
|
|
6
|
+
import { S as W } from "./sparkles-CTAYmQOE.js";
|
|
6
7
|
const V = X("Globe", [
|
|
7
8
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
8
9
|
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
@@ -21,9 +22,9 @@ const Y = X("Volume2", [
|
|
|
21
22
|
initialText: x
|
|
22
23
|
}) => {
|
|
23
24
|
const [f, u] = I("");
|
|
24
|
-
|
|
25
|
+
B.useEffect(() => {
|
|
25
26
|
i && x && u(x);
|
|
26
|
-
}, [i, x]),
|
|
27
|
+
}, [i, x]), B.useEffect(() => {
|
|
27
28
|
i || u("");
|
|
28
29
|
}, [i]);
|
|
29
30
|
const v = async () => {
|
|
@@ -41,7 +42,7 @@ const Y = X("Volume2", [
|
|
|
41
42
|
return /* @__PURE__ */ e($, { open: i, onOpenChange: w, children: /* @__PURE__ */ n(F, { className: "sm:cteditor-max-w-[500px] cteditor-max-h-[90vh] cteditor-overflow-y-auto", children: [
|
|
42
43
|
/* @__PURE__ */ n(U, { children: [
|
|
43
44
|
/* @__PURE__ */ n(K, { className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-text-xl", children: [
|
|
44
|
-
/* @__PURE__ */ e(
|
|
45
|
+
/* @__PURE__ */ e(W, {}),
|
|
45
46
|
"Generate Image with AI"
|
|
46
47
|
] }),
|
|
47
48
|
/* @__PURE__ */ e(z, { className: "cteditor-text-base cteditor-pt-2", children: "Describe the image you want to create, and AI will generate it for you." })
|
|
@@ -64,7 +65,7 @@ const Y = X("Volume2", [
|
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
67
|
/* @__PURE__ */ n("p", { className: "cteditor-text-muted-foreground cteditor-flex cteditor-gap-1 cteditor-text-xs ", children: [
|
|
67
|
-
/* @__PURE__ */ e(
|
|
68
|
+
/* @__PURE__ */ e(J, { className: "cteditor-h-4 cteditor-w-4" }),
|
|
68
69
|
" Just describe what you want - be specific and detailed for best results"
|
|
69
70
|
] })
|
|
70
71
|
] }),
|
|
@@ -77,7 +78,7 @@ const Y = X("Volume2", [
|
|
|
77
78
|
] }) }),
|
|
78
79
|
!d && /* @__PURE__ */ e("div", { className: "cteditor-p-3 cteditor-bg-muted/50 cteditor-rounded-lg", children: /* @__PURE__ */ n("div", { className: "flex items-start cteditor-flex-col", children: [
|
|
79
80
|
/* @__PURE__ */ n("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-1 cteditor-mb-2", children: [
|
|
80
|
-
/* @__PURE__ */ e(
|
|
81
|
+
/* @__PURE__ */ e(J, { className: "cteditor-h-4 cteditor-w-4" }),
|
|
81
82
|
/* @__PURE__ */ e("h3", { className: "cteditor-text-sm cteditor-font-medium", children: "Good examples:" })
|
|
82
83
|
] }),
|
|
83
84
|
/* @__PURE__ */ n("div", { className: "text-xs text-gray-600 dark:text-gray-400", children: [
|
|
@@ -112,7 +113,7 @@ const Y = X("Volume2", [
|
|
|
112
113
|
/* @__PURE__ */ e("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent mr-2" }),
|
|
113
114
|
"Generating..."
|
|
114
115
|
] }) : /* @__PURE__ */ n(j, { children: [
|
|
115
|
-
/* @__PURE__ */ e(
|
|
116
|
+
/* @__PURE__ */ e(W, {}),
|
|
116
117
|
"Generate & Insert"
|
|
117
118
|
] })
|
|
118
119
|
}
|
|
@@ -365,7 +366,7 @@ const Q = [
|
|
|
365
366
|
)
|
|
366
367
|
] })
|
|
367
368
|
] }) });
|
|
368
|
-
},
|
|
369
|
+
}, Me = () => {
|
|
369
370
|
const [i] = se(), y = A(null), { apiKey: N } = me(), [h, d] = I(!1), [x, f] = I(!1), [u, v] = I(""), [w, m] = I(""), g = A(null), T = A(null), o = A(void 0), ee = async (t) => {
|
|
370
371
|
let r, c = "";
|
|
371
372
|
if (i.getEditorState().read(() => {
|
|
@@ -715,5 +716,5 @@ const Q = [
|
|
|
715
716
|
] });
|
|
716
717
|
};
|
|
717
718
|
export {
|
|
718
|
-
|
|
719
|
+
Me as default
|
|
719
720
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aM as i, aN as r, aO as t, aP as s, aQ as o, aR as d, aS as u, aT as v, u as f, Q as n, aU as l, aV as w } from "./index-CXyZgoBl.js";
|
|
2
2
|
export {
|
|
3
3
|
i as ConfigurableEditor,
|
|
4
4
|
r as ConfigurableEditorWithAuth,
|
|
@@ -25,6 +25,7 @@ interface ConfigurableEditorProps {
|
|
|
25
25
|
contentClassName?: string;
|
|
26
26
|
editorStyle?: React.CSSProperties;
|
|
27
27
|
floatingToolbarClassName?: string;
|
|
28
|
+
fitToPage?: boolean;
|
|
28
29
|
}
|
|
29
30
|
declare const ConfigurableEditor: React.FC<ConfigurableEditorProps>;
|
|
30
31
|
export default ConfigurableEditor;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { c as a } from "./index-CXyZgoBl.js";
|
|
2
|
+
const p = a("Sparkles", [
|
|
3
|
+
[
|
|
4
|
+
"path",
|
|
5
|
+
{
|
|
6
|
+
d: "m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",
|
|
7
|
+
key: "17u4zn"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
["path", { d: "M5 3v4", key: "bklmnn" }],
|
|
11
|
+
["path", { d: "M19 17v4", key: "iiml17" }],
|
|
12
|
+
["path", { d: "M3 5h4", key: "nem4j1" }],
|
|
13
|
+
["path", { d: "M17 19h4", key: "lbex7p" }]
|
|
14
|
+
]);
|
|
15
|
+
export {
|
|
16
|
+
p as S
|
|
17
|
+
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as K,
|
|
1
|
+
import { c as K, a6 as Q, a7 as X, t as V, a8 as Y, a9 as ee } from "./index-CXyZgoBl.js";
|
|
2
2
|
import { useState as k, useRef as c, useEffect as re, useCallback as b } from "react";
|
|
3
3
|
const se = K("Mic", [
|
|
4
4
|
["path", { d: "M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z", key: "131961" }],
|
|
5
5
|
["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
|
|
6
6
|
["line", { x1: "12", x2: "12", y1: "19", y2: "22", key: "x3vr5v" }]
|
|
7
7
|
]), ce = ({ onTranscriptUpdate: P, onSessionEnd: W, apiKey: C }) => {
|
|
8
|
-
const [u, x] = k(!1), [l, M] = k(!1), [z, D] = k(!1), [G, m] = k(null), [J, T] = k(!1), [R, N] = k(0), A = c(null), w = c(null), o = c(null), h = c(null),
|
|
8
|
+
const [u, x] = k(!1), [l, M] = k(!1), [z, D] = k(!1), [G, m] = k(null), [J, T] = k(!1), [R, N] = k(0), A = c(null), w = c(null), o = c(null), h = c(null), B = c(-1), f = c(""), S = c(""), L = c(!1), a = c(null), g = c(0), I = c(0);
|
|
9
9
|
re(() => {
|
|
10
10
|
if (u && !l)
|
|
11
11
|
return g.current === 0 && (g.current = Date.now() - I.current), a.current = setInterval(() => {
|
|
@@ -16,7 +16,7 @@ const se = K("Mic", [
|
|
|
16
16
|
};
|
|
17
17
|
l && (a.current && (clearInterval(a.current), a.current = null), I.current = R * 1e3);
|
|
18
18
|
}, [u, l, R]);
|
|
19
|
-
const
|
|
19
|
+
const _ = b(async () => {
|
|
20
20
|
try {
|
|
21
21
|
m(null), D(!0), f.current = "", S.current = "", N(0), g.current = 0, I.current = 0, M(!1);
|
|
22
22
|
const e = await Q(C);
|
|
@@ -40,7 +40,7 @@ const se = K("Mic", [
|
|
|
40
40
|
const n = JSON.parse(i.data);
|
|
41
41
|
if (n.type === "Turn") {
|
|
42
42
|
if (n.transcript !== void 0) {
|
|
43
|
-
n.turn_order !==
|
|
43
|
+
n.turn_order !== B.current && (B.current !== -1 && f.current && (S.current += f.current + " "), B.current = n.turn_order, f.current = ""), f.current = n.transcript;
|
|
44
44
|
const F = S.current + f.current;
|
|
45
45
|
if (P(F), n.end_of_turn) {
|
|
46
46
|
S.current += f.current + " ", f.current = "";
|
|
@@ -55,7 +55,7 @@ const se = K("Mic", [
|
|
|
55
55
|
}, t.onerror = () => {
|
|
56
56
|
m("WebSocket connection error"), T(!1);
|
|
57
57
|
}, t.onclose = (i) => {
|
|
58
|
-
T(!1), i.code !== 1e3 && !
|
|
58
|
+
T(!1), i.code !== 1e3 && !L.current && m("Connection closed unexpectedly"), L.current = !1;
|
|
59
59
|
};
|
|
60
60
|
const s = new AudioContext({ sampleRate: 16e3 });
|
|
61
61
|
o.current = s;
|
|
@@ -78,13 +78,13 @@ const se = K("Mic", [
|
|
|
78
78
|
x(!0);
|
|
79
79
|
} catch (e) {
|
|
80
80
|
if (e instanceof X)
|
|
81
|
-
|
|
81
|
+
V.error("API Key Required", {
|
|
82
82
|
description: "Please upload your AssemblyAI key in License Section > Manage API keys > API Keys to configure your keys.",
|
|
83
83
|
duration: 5e3
|
|
84
84
|
}), m(e.message);
|
|
85
85
|
else {
|
|
86
86
|
const r = e && e.message ? e.message : "Unknown error";
|
|
87
|
-
|
|
87
|
+
V.error("Voice Recording Error", {
|
|
88
88
|
description: r,
|
|
89
89
|
duration: 5e3
|
|
90
90
|
}), m("Error starting recording: " + r);
|
|
@@ -98,12 +98,12 @@ const se = K("Mic", [
|
|
|
98
98
|
const i = 1600;
|
|
99
99
|
t.onaudioprocess = (n) => {
|
|
100
100
|
if (E.readyState === WebSocket.OPEN) {
|
|
101
|
-
const v = n.inputBuffer.getChannelData(0),
|
|
101
|
+
const v = n.inputBuffer.getChannelData(0), O = new Int16Array(v.length);
|
|
102
102
|
for (let p = 0; p < v.length; p++) {
|
|
103
103
|
const y = Math.max(-1, Math.min(1, v[p]));
|
|
104
|
-
|
|
104
|
+
O[p] = y < 0 ? y * 32768 : y * 32767;
|
|
105
105
|
}
|
|
106
|
-
if (s.push(
|
|
106
|
+
if (s.push(O), d += O.length, d >= i) {
|
|
107
107
|
const p = new Int16Array(d);
|
|
108
108
|
let y = 0;
|
|
109
109
|
for (const j of s)
|
|
@@ -117,7 +117,7 @@ const se = K("Mic", [
|
|
|
117
117
|
}, [u, l]), $ = b(() => {
|
|
118
118
|
!u || !l || (M(!1), g.current = Date.now() - I.current, o.current && o.current.state === "suspended" && o.current.resume());
|
|
119
119
|
}, [u, l]), q = b(async () => {
|
|
120
|
-
|
|
120
|
+
L.current = !0;
|
|
121
121
|
const e = R;
|
|
122
122
|
if (x(!1), M(!1), N(0), g.current = 0, I.current = 0, a.current && (clearInterval(a.current), a.current = null), h.current && (h.current.disconnect(), h.current = null), o.current && (o.current.close(), o.current = null), A.current && (A.current.getTracks().forEach((r) => r.stop()), A.current = null), w.current && (w.current.readyState === WebSocket.OPEN && w.current.close(1e3, "Recording stopped"), w.current = null), T(!1), e > 0)
|
|
123
123
|
try {
|
|
@@ -127,14 +127,14 @@ const se = K("Mic", [
|
|
|
127
127
|
totalCredits: r.credits.totalCredits
|
|
128
128
|
});
|
|
129
129
|
} catch (r) {
|
|
130
|
-
console.error("Failed to end voice session:", r), r instanceof ee &&
|
|
130
|
+
console.error("Failed to end voice session:", r), r instanceof ee && V.error("Credit Error", {
|
|
131
131
|
description: r.message,
|
|
132
132
|
duration: 5e3
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
}, [R, W, C]), H = b(() => {
|
|
136
|
-
u ? q() :
|
|
137
|
-
}, [u,
|
|
136
|
+
u ? q() : _();
|
|
137
|
+
}, [u, _, q]);
|
|
138
138
|
return {
|
|
139
139
|
isRecording: u,
|
|
140
140
|
isPaused: l,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eddyter",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.18",
|
|
5
5
|
"description": "Plug and Play AI Rich Text Editor for any website, blog, CRM, ERP, or web app. Built on Lexical with AI writing assistance, dark mode, and real-time collaboration.",
|
|
6
6
|
"homepage": "https://www.eddyter.com",
|
|
7
7
|
"repository": {
|