eddyter 1.4.19-beta.0 → 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-r4Q1CC4S.js → AIChatPlugin-BUWq8ixX.js} +3 -3
- package/dist/{CombinedAutocompletGrammarPlugin-BuAfoCfe.js → CombinedAutocompletGrammarPlugin-Dq25w8tq.js} +2 -2
- package/dist/{CommentBubblePlugin-B8Q5ZxWY.js → CommentBubblePlugin-B77d3Qq6.js} +1 -1
- package/dist/{CommentPlugin-BICzJnwy.js → CommentPlugin-BJQyKmrN.js} +60 -45
- package/dist/{NotePanelPlugin-igN9zPi_.js → NotePanelPlugin-BqOdcg07.js} +1 -1
- package/dist/{TextEnhancePlugin-q9i0TKCN.js → TextEnhancePlugin-BnmdRgUu.js} +6 -6
- package/dist/assets/style.css +1 -1
- package/dist/{generateDocxThumbnail-wh4lnFAw.js → generateDocxThumbnail-DBMxjZ83.js} +1 -1
- package/dist/{generatePdfThumbnail-DQyYzjOS.js → generatePdfThumbnail-Cv2-ZCzh.js} +1 -1
- package/dist/{generateXlsxThumbnail-DqvyM6q9.js → generateXlsxThumbnail-UHmNc7Fa.js} +1 -1
- package/dist/{index-Bzry1HiS.js → index-BaWQzoL2.js} +11 -11
- package/dist/{index-jEC_qTLD.js → index-Bex3G_eE.js} +5100 -5017
- package/dist/{index-w_DzPr7S.js → index-C_mjLQUF.js} +2 -2
- package/dist/{index-m-NFtIUR.js → index-ChSepytp.js} +21 -21
- package/dist/{index-DEW_Wgag.js → index-Cl_A9eof.js} +59 -59
- package/dist/{index-DQah7JmS.js → index-DcHU8PlQ.js} +1 -1
- package/dist/{index-BWs0p6X8.js → index-q_TW8dU1.js} +15 -15
- package/dist/index.js +3 -3
- package/dist/nodes/ButtonNode.d.ts +1 -1
- package/dist/{sparkles-N8q1Rg6P.js → sparkles-C-XoMho5.js} +1 -1
- package/dist/ui/Icons.d.ts +14 -3
- package/dist/{useVoiceToText-BSB1QOIb.js → useVoiceToText-BzaLSbRi.js} +6 -6
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as e, Fragment as tt, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { c as xt, T as Vt, w as Bt, x as Tt, y as Pt, D as yt, a as Nt, b as wt, d as kt, z as Ut, G as Mt, H as Rt, J as zt, K as Lt, M as U, L as Wt, O as Yt, Q as Ft, U as Jt, B as at, V as Qt, W as Xt, X as Zt, Y as te, Z as ee, _ as $t, e as re, g as oe, a0 as ht, a1 as ie, a2 as Dt, t as pt } from "./index-
|
|
2
|
+
import { c as xt, T as Vt, w as Bt, x as Tt, y as Pt, D as yt, a as Nt, b as wt, d as kt, z as Ut, G as Mt, H as Rt, J as zt, K as Lt, M as U, L as Wt, O as Yt, Q as Ft, U as Jt, B as at, V as Qt, W as Xt, X as Zt, Y as te, Z as ee, _ as $t, e as re, g as oe, a0 as ht, a1 as ie, a2 as Dt, t as pt } from "./index-Bex3G_eE.js";
|
|
3
3
|
import { useLexicalComposerContext as de } from "@lexical/react/LexicalComposerContext";
|
|
4
4
|
import { $getSelection as ct, COMMAND_PRIORITY_LOW as Ct, $isRangeSelection as St } from "lexical";
|
|
5
5
|
import { useState as d, useRef as W, useCallback as K, useEffect as $, useMemo as Et } from "react";
|
|
6
|
-
import { u as ce, M as ne } from "./useVoiceToText-
|
|
7
|
-
import { S as Ot } from "./sparkles-
|
|
6
|
+
import { u as ce, M as ne } from "./useVoiceToText-BzaLSbRi.js";
|
|
7
|
+
import { S as Ot } from "./sparkles-C-XoMho5.js";
|
|
8
8
|
const lt = xt("ArrowUpRight", [
|
|
9
9
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
10
10
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as v, jsxs as L, Fragment as Ee } from "react/jsx-runtime";
|
|
2
|
-
import { c as ve, a3 as Q, a4 as ye, a5 as be, a6 as ke, a7 as Se, a8 as Me, a0 as Ne, a9 as Vt, aa as Re } from "./index-
|
|
2
|
+
import { c as ve, a3 as Q, a4 as ye, a5 as be, a6 as ke, a7 as Se, a8 as Me, a0 as Ne, a9 as Vt, aa as Re } from "./index-Bex3G_eE.js";
|
|
3
3
|
import { $isCodeNode as Ie } from "@lexical/code";
|
|
4
4
|
import { useLexicalComposerContext as Oe } from "@lexical/react/LexicalComposerContext";
|
|
5
5
|
import { $getRoot as It, $getSelection as zt, $isRangeSelection as qt, $isTextNode as ut, $getNodeByKey as Gt, $createRangeSelection as Le, $setSelection as Ae, KEY_ARROW_DOWN_COMMAND as Be, COMMAND_PRIORITY_LOW as at, KEY_ARROW_UP_COMMAND as Pe, KEY_ESCAPE_COMMAND as De, KEY_TAB_COMMAND as _e, KEY_ENTER_COMMAND as Te, createCommand as He, $isElementNode as Fe } from "lexical";
|
|
@@ -7,7 +7,7 @@ import { g as We } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
|
7
7
|
import * as st from "react";
|
|
8
8
|
import { useRef as B, useState as q, useEffect as T, useCallback as G } from "react";
|
|
9
9
|
import { createPortal as Xt } from "react-dom";
|
|
10
|
-
import { S as $e } from "./sparkles-
|
|
10
|
+
import { S as $e } from "./sparkles-C-XoMho5.js";
|
|
11
11
|
const Yt = ve("BookOpen", [
|
|
12
12
|
["path", { d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z", key: "vv98re" }],
|
|
13
13
|
["path", { d: "M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z", key: "1cyq3y" }]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useLexicalComposerContext as p } from "@lexical/react/LexicalComposerContext";
|
|
2
2
|
import { useRef as y, useEffect as b } from "react";
|
|
3
|
-
import { ab as v } from "./index-
|
|
3
|
+
import { ab as v } from "./index-Bex3G_eE.js";
|
|
4
4
|
const g = () => {
|
|
5
5
|
const [n] = p(), { getCommentById: o } = v(), t = y(null);
|
|
6
6
|
return b(() => {
|
|
@@ -1,42 +1,57 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useLexicalComposerContext as
|
|
3
|
-
import { $getSelection as T, $isRangeSelection as S, $isTextNode as
|
|
4
|
-
import { ab as E, ac as R, ad as
|
|
5
|
-
import { useState as
|
|
6
|
-
import { u as
|
|
7
|
-
const
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { useLexicalComposerContext as I } from "@lexical/react/LexicalComposerContext";
|
|
3
|
+
import { $getSelection as T, $isRangeSelection as S, $isTextNode as A, COMMAND_PRIORITY_LOW as D } from "lexical";
|
|
4
|
+
import { c as z, ab as E, ac as R, ad as L, ae as $, af as F, D as V, a as j, ag as P, a0 as B, Y as K, B as O } from "./index-Bex3G_eE.js";
|
|
5
|
+
import { useState as v, useCallback as f, useEffect as N, useRef as U } from "react";
|
|
6
|
+
import { u as H, M as Q } from "./useVoiceToText-BzaLSbRi.js";
|
|
7
|
+
const W = z("Quote", [
|
|
8
|
+
[
|
|
9
|
+
"path",
|
|
10
|
+
{
|
|
11
|
+
d: "M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z",
|
|
12
|
+
key: "4rm80e"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: "M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z",
|
|
19
|
+
key: "10za9r"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
]), Y = ({
|
|
8
23
|
isOpen: r,
|
|
9
24
|
onClose: d,
|
|
10
25
|
onSubmit: p,
|
|
11
26
|
selectedText: x
|
|
12
27
|
}) => {
|
|
13
|
-
const [a, s] =
|
|
28
|
+
const [a, s] = v(""), [b, m] = v(!1), { currentUser: _ } = E(), h = _?.name || "Anonymous", u = (e) => e.split(" ").map((C) => C[0]).join("").toUpperCase().slice(0, 2), {
|
|
14
29
|
isRecording: n,
|
|
15
30
|
error: w,
|
|
16
31
|
toggleRecording: o
|
|
17
|
-
} =
|
|
32
|
+
} = H({
|
|
18
33
|
onTranscriptUpdate: (e) => {
|
|
19
34
|
s(e);
|
|
20
35
|
}
|
|
21
|
-
}),
|
|
36
|
+
}), c = f(() => {
|
|
22
37
|
a.trim() && (p(a.trim()), s(""), d());
|
|
23
38
|
}, [a, p, d]), l = f(
|
|
24
39
|
(e) => {
|
|
25
|
-
e.key === "Enter" && (e.metaKey || e.ctrlKey) ? (e.preventDefault(),
|
|
40
|
+
e.key === "Enter" && (e.metaKey || e.ctrlKey) ? (e.preventDefault(), c()) : e.key === "Escape" && (e.preventDefault(), d());
|
|
26
41
|
},
|
|
27
|
-
[
|
|
42
|
+
[c, d]
|
|
28
43
|
);
|
|
29
44
|
N(() => {
|
|
30
45
|
r && s("");
|
|
31
46
|
}, [r]);
|
|
32
|
-
const g =
|
|
47
|
+
const g = U(null);
|
|
33
48
|
return N(() => {
|
|
34
49
|
if (!g.current) return;
|
|
35
50
|
const e = g.current;
|
|
36
51
|
e.style.height = "auto", e.style.height = `${e.scrollHeight}px`;
|
|
37
|
-
}, [a]), /* @__PURE__ */ t(
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
52
|
+
}, [a]), /* @__PURE__ */ t(V, { open: r, onOpenChange: d, children: /* @__PURE__ */ i(j, { className: "cteditor-max-w-[460px] cteditor-gap-0 !cteditor-p-0 cteditor-border-black/[0.07] dark:cteditor-border-white/[0.07] cteditor-bg-white dark:cteditor-bg-[#18181b] cteditor-rounded-[14px] sm:cteditor-rounded-[14px] cteditor-overflow-hidden cteditor-shadow-[inset_0_1px_0_rgba(0,0,0,0.02),0_26px_60px_-18px_rgba(0,0,0,0.15),0_10px_22px_-10px_rgba(0,0,0,0.1)] dark:cteditor-shadow-[inset_0_1px_0_rgba(255,255,255,0.05),0_26px_60px_-18px_rgba(0,0,0,0.7),0_10px_22px_-10px_rgba(0,0,0,0.5)] [&>button.closeDialog]:cteditor-hidden", children: [
|
|
53
|
+
/* @__PURE__ */ i("div", { className: "cteditor-flex cteditor-items-center cteditor-justify-between cteditor-pt-3.5 cteditor-px-4 cteditor-pb-2.5", children: [
|
|
54
|
+
/* @__PURE__ */ i("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-text-[13px] cteditor-font-semibold cteditor-text-black/90 dark:cteditor-text-white/[0.92] cteditor-tracking-[-0.005em]", children: [
|
|
40
55
|
/* @__PURE__ */ t("span", { className: "cteditor-w-5.5 cteditor-h-5.5 cteditor-bg-black/[0.03] dark:cteditor-bg-white/[0.05] cteditor-border cteditor-border-black/[0.05] dark:cteditor-border-white/[0.07] cteditor-rounded-md cteditor-grid cteditor-place-items-center cteditor-text-black/70 dark:cteditor-text-white/[0.78]", children: /* @__PURE__ */ t(P, { className: "cteditor-size-3" }) }),
|
|
41
56
|
/* @__PURE__ */ t("span", { children: "Add comment" })
|
|
42
57
|
] }),
|
|
@@ -50,21 +65,21 @@ const H = ({
|
|
|
50
65
|
}
|
|
51
66
|
)
|
|
52
67
|
] }),
|
|
53
|
-
x && /* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */ t(
|
|
68
|
+
x && /* @__PURE__ */ i("div", { className: "cteditor-mx-4 cteditor-pt-3 cteditor-pr-3.5 cteditor-pb-3 cteditor-pl-4 cteditor-bg-black/[0.015] dark:cteditor-bg-white/[0.025] cteditor-border cteditor-border-black/[0.04] cteditor-border-l-2 cteditor-border-l-[#d9a558]/65 cteditor-rounded-r-lg cteditor-rounded-l-none cteditor-relative", children: [
|
|
69
|
+
/* @__PURE__ */ i("div", { className: "cteditor-uppercase cteditor-tracking-[0.14em] cteditor-text-[10px] cteditor-font-semibold cteditor-text-black/45 dark:cteditor-text-white/[0.42] cteditor-mb-1.5 cteditor-flex cteditor-items-center cteditor-gap-1.5", children: [
|
|
70
|
+
/* @__PURE__ */ t(W, { className: "cteditor-size-2.5 cteditor-opacity-70" }),
|
|
56
71
|
"Selected · ",
|
|
57
72
|
x.length,
|
|
58
73
|
" chars"
|
|
59
74
|
] }),
|
|
60
75
|
/* @__PURE__ */ t("div", { className: "cteditor-font-serif cteditor-italic cteditor-text-sm cteditor-leading-normal cteditor-text-black/80 dark:cteditor-text-white/[0.82] cteditor-line-clamp-2", children: x })
|
|
61
76
|
] }),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ i("div", { className: `cteditor-mx-4 cteditor-rounded-[10px] cteditor-border cteditor-transition-all ${b ? "cteditor-border-black/15 dark:cteditor-border-white/18 cteditor-bg-black/[0.02] dark:cteditor-bg-white/3 cteditor-shadow-[0_0_0_3px_rgba(0,0,0,0.02)] dark:cteditor-shadow-[0_0_0_3px_rgba(255,255,255,0.03)]" : "cteditor-border-black/[0.06] dark:cteditor-border-white/[0.08] cteditor-bg-black/[0.01] dark:cteditor-bg-white/[0.018]"}`, children: [
|
|
78
|
+
/* @__PURE__ */ i("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-2 cteditor-pt-2.5 cteditor-px-3 cteditor-pb-2 cteditor-text-xs", children: [
|
|
64
79
|
/* @__PURE__ */ t("span", { className: "cteditor-w-5 cteditor-h-5 cteditor-rounded-full cteditor-bg-gradient-to-br cteditor-from-[#d9a558] cteditor-to-[#8c5a1c] cteditor-text-[#1a1408] cteditor-grid cteditor-place-items-center cteditor-text-[10px] cteditor-font-bold cteditor-tracking-[0.02em]", children: u(h) }),
|
|
65
80
|
/* @__PURE__ */ t("span", { className: "cteditor-text-black/80 dark:cteditor-text-white/[0.78] cteditor-font-medium", children: h })
|
|
66
81
|
] }),
|
|
67
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ i("div", { className: "cteditor-relative cteditor-px-3.5 cteditor-pb-3", children: [
|
|
68
83
|
/* @__PURE__ */ t(
|
|
69
84
|
"textarea",
|
|
70
85
|
{
|
|
@@ -87,18 +102,18 @@ const H = ({
|
|
|
87
102
|
onClick: o,
|
|
88
103
|
className: `cteditor-absolute cteditor-right-3 cteditor-bottom-3 cteditor-w-[26px] cteditor-h-[26px] cteditor-rounded-md cteditor-grid cteditor-place-items-center cteditor-border cteditor-transition-all ${n ? "cteditor-text-red-500 cteditor-bg-red-500/10 cteditor-border-red-500/20 cteditor-animate-pulse" : "cteditor-text-black/45 dark:cteditor-text-white/50 cteditor-bg-black/[0.02] dark:cteditor-bg-white/[0.03] cteditor-border-black/[0.05] dark:cteditor-border-white/[0.06] hover:cteditor-text-black dark:hover:cteditor-text-white/90"}`,
|
|
89
104
|
title: n ? "Stop recording" : "Start voice input",
|
|
90
|
-
children: n ? /* @__PURE__ */ t("span", { className: "cteditor-size-3.5 [&>svg]:cteditor-size-full", children: /* @__PURE__ */ t(
|
|
105
|
+
children: n ? /* @__PURE__ */ t("span", { className: "cteditor-size-3.5 [&>svg]:cteditor-size-full", children: /* @__PURE__ */ t(K, {}) }) : /* @__PURE__ */ t(Q, { className: "cteditor-size-[13px]" })
|
|
91
106
|
}
|
|
92
107
|
)
|
|
93
108
|
] })
|
|
94
109
|
] }),
|
|
95
110
|
/* @__PURE__ */ t("p", { className: "cteditor-text-xs cteditor-text-foreground/50 cteditor-px-4 -cteditor-mt-1", children: "Press Ctrl/Cmd + Enter to submit or click the microphone to speak" }),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */ t("div", { className: "cteditor-flex-grow", children: n ? /* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ i("div", { className: "cteditor-flex cteditor-items-center cteditor-justify-between cteditor-pt-2.5 cteditor-px-4 cteditor-pb-3.5 cteditor-border-t cteditor-border-black/5 dark:cteditor-border-white/[0.04]", children: [
|
|
112
|
+
/* @__PURE__ */ t("div", { className: "cteditor-flex-grow", children: n ? /* @__PURE__ */ i("p", { className: "cteditor-text-xs cteditor-text-blue-600 dark:cteditor-text-blue-400 cteditor-flex cteditor-items-center cteditor-gap-1", children: [
|
|
98
113
|
/* @__PURE__ */ t("span", { className: "cteditor-inline-block cteditor-w-2 cteditor-h-2 cteditor-bg-red-500 cteditor-rounded-full cteditor-animate-pulse" }),
|
|
99
114
|
"Recording... speak clearly"
|
|
100
115
|
] }) : w ? /* @__PURE__ */ t("p", { className: "cteditor-text-xs cteditor-text-destructive", children: w }) : null }),
|
|
101
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ i("div", { className: "cteditor-inline-flex cteditor-items-center cteditor-gap-2", children: [
|
|
102
117
|
/* @__PURE__ */ t(
|
|
103
118
|
O,
|
|
104
119
|
{
|
|
@@ -111,7 +126,7 @@ const H = ({
|
|
|
111
126
|
/* @__PURE__ */ t(
|
|
112
127
|
O,
|
|
113
128
|
{
|
|
114
|
-
onClick:
|
|
129
|
+
onClick: c,
|
|
115
130
|
disabled: !a.trim(),
|
|
116
131
|
className: "cteditor-text-[13px]",
|
|
117
132
|
children: "Add comment"
|
|
@@ -120,13 +135,13 @@ const H = ({
|
|
|
120
135
|
] })
|
|
121
136
|
] })
|
|
122
137
|
] }) });
|
|
123
|
-
},
|
|
124
|
-
const [r] =
|
|
138
|
+
}, et = () => {
|
|
139
|
+
const [r] = I(), [d, p] = v(!1), [x, a] = v(""), { addComment: s, currentUser: b } = E(), m = b?.name || "Anonymous", _ = b?.id, h = b?.avatar, u = f(
|
|
125
140
|
(o) => {
|
|
126
141
|
r.update(() => {
|
|
127
|
-
const
|
|
128
|
-
if (S(
|
|
129
|
-
const l =
|
|
142
|
+
const c = T();
|
|
143
|
+
if (S(c)) {
|
|
144
|
+
const l = c.getTextContent();
|
|
130
145
|
if (l.trim()) {
|
|
131
146
|
const g = s({
|
|
132
147
|
text: o,
|
|
@@ -134,15 +149,15 @@ const H = ({
|
|
|
134
149
|
authorId: _,
|
|
135
150
|
authorAvatar: h,
|
|
136
151
|
selectedText: l
|
|
137
|
-
}), e =
|
|
152
|
+
}), e = c.extract(), C = Date.now();
|
|
138
153
|
for (const k of e)
|
|
139
|
-
if (
|
|
154
|
+
if (A(k)) {
|
|
140
155
|
const M = R(
|
|
141
156
|
k.getTextContent(),
|
|
142
157
|
g,
|
|
143
158
|
o,
|
|
144
159
|
m,
|
|
145
|
-
|
|
160
|
+
C
|
|
146
161
|
);
|
|
147
162
|
M.setFormat(k.getFormat());
|
|
148
163
|
const y = k.getStyle();
|
|
@@ -157,33 +172,33 @@ const H = ({
|
|
|
157
172
|
r.getEditorState().read(() => {
|
|
158
173
|
const o = T();
|
|
159
174
|
if (S(o)) {
|
|
160
|
-
const
|
|
161
|
-
a(
|
|
175
|
+
const c = o.getTextContent();
|
|
176
|
+
a(c);
|
|
162
177
|
}
|
|
163
178
|
}), p(!0);
|
|
164
179
|
}, [r]), w = f(() => {
|
|
165
180
|
p(!1), a("");
|
|
166
181
|
}, []);
|
|
167
182
|
return N(() => r.registerCommand(
|
|
168
|
-
|
|
183
|
+
L,
|
|
169
184
|
({ text: o }) => (u(o), !0),
|
|
170
185
|
D
|
|
171
186
|
), [r, u]), N(() => {
|
|
172
187
|
const o = () => (n(), !0);
|
|
173
188
|
return r.registerCommand(
|
|
174
|
-
|
|
189
|
+
$,
|
|
175
190
|
o,
|
|
176
191
|
D
|
|
177
192
|
);
|
|
178
193
|
}, [r, n]), N(() => {
|
|
179
|
-
return r.registerRootListener((
|
|
180
|
-
l !== null && l.removeEventListener("comment-click", o),
|
|
194
|
+
return r.registerRootListener((c, l) => {
|
|
195
|
+
l !== null && l.removeEventListener("comment-click", o), c !== null && c.addEventListener("comment-click", o);
|
|
181
196
|
});
|
|
182
|
-
function o(
|
|
183
|
-
r.dispatchCommand(
|
|
197
|
+
function o(c) {
|
|
198
|
+
r.dispatchCommand(F, void 0);
|
|
184
199
|
}
|
|
185
200
|
}, [r]), /* @__PURE__ */ t(
|
|
186
|
-
|
|
201
|
+
Y,
|
|
187
202
|
{
|
|
188
203
|
isOpen: d,
|
|
189
204
|
onClose: w,
|
|
@@ -193,5 +208,5 @@ const H = ({
|
|
|
193
208
|
);
|
|
194
209
|
};
|
|
195
210
|
export {
|
|
196
|
-
|
|
211
|
+
et as default
|
|
197
212
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
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 {
|
|
4
|
+
import { aB as N, aC as u, aD as d } from "./index-Bex3G_eE.js";
|
|
5
5
|
function p() {
|
|
6
6
|
const [e] = a();
|
|
7
7
|
return l(() => {
|
|
@@ -2,8 +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, e as B, l as
|
|
6
|
-
import { S as E } from "./sparkles-
|
|
5
|
+
import { c as L, D as _, a as z, b as j, d as W, e as B, l as K, g as $, B as b, aE as q, t as d, p as F } from "./index-Bex3G_eE.js";
|
|
6
|
+
import { S as E } from "./sparkles-C-XoMho5.js";
|
|
7
7
|
const U = L("ArrowRight", [
|
|
8
8
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
9
9
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
@@ -89,13 +89,13 @@ const U = L("ArrowRight", [
|
|
|
89
89
|
] }),
|
|
90
90
|
g && !p && /* @__PURE__ */ o("div", { className: "cteditor-space-y-1.5 cteditor-animate-in cteditor-fade-in cteditor-slide-in-from-bottom-4", children: [
|
|
91
91
|
/* @__PURE__ */ o("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-1.5", children: [
|
|
92
|
-
/* @__PURE__ */ t(
|
|
92
|
+
/* @__PURE__ */ t(K, { className: "cteditor-w-3.5 cteditor-h-3.5 cteditor-text-green-500" }),
|
|
93
93
|
/* @__PURE__ */ t("label", { className: "cteditor-text-xs cteditor-font-medium cteditor-text-foreground", children: "Enhanced Text" })
|
|
94
94
|
] }),
|
|
95
95
|
/* @__PURE__ */ t("div", { className: "cteditor-p-3 cteditor-bg-gradient-to-br cteditor-from-purple-500/5 cteditor-to-pink-500/5 cteditor-rounded-lg cteditor-border cteditor-border-purple-500/20 cteditor-max-h-48 cteditor-overflow-y-auto", children: /* @__PURE__ */ t("p", { className: "cteditor-text-sm cteditor-text-foreground cteditor-leading-relaxed", children: i }) })
|
|
96
96
|
] })
|
|
97
97
|
] }),
|
|
98
|
-
/* @__PURE__ */ o(
|
|
98
|
+
/* @__PURE__ */ o($, { children: [
|
|
99
99
|
/* @__PURE__ */ t(b, { variant: "outline", onClick: x, children: "Cancel" }),
|
|
100
100
|
!g && /* @__PURE__ */ o(
|
|
101
101
|
b,
|
|
@@ -136,7 +136,7 @@ const Z = ({ apiKey: f }) => {
|
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
138
|
try {
|
|
139
|
-
await
|
|
139
|
+
await F({
|
|
140
140
|
editor: s,
|
|
141
141
|
selectedText: c,
|
|
142
142
|
transformationType: "ENHANCE_WITH_AI",
|
|
@@ -183,7 +183,7 @@ const Z = ({ apiKey: f }) => {
|
|
|
183
183
|
});
|
|
184
184
|
}), !0);
|
|
185
185
|
return H(() => s.registerCommand(
|
|
186
|
-
|
|
186
|
+
q,
|
|
187
187
|
(c) => (u(c), !0),
|
|
188
188
|
O
|
|
189
189
|
), [s, f]), /* @__PURE__ */ t(
|