eddyter 1.3.73 → 1.3.74
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/{ImageResizer-FrE13F54.js → ImageResizer-o0eMm1Mg.js} +56 -50
- package/dist/api/ai/aiAgentService.d.ts +22 -1
- package/dist/api/config/endpoints.d.ts +3 -0
- package/dist/assets/style.css +1 -1
- package/dist/components/VideoView/index.d.ts +3 -1
- package/dist/{html2pdf.bundle-CQue4YDW.js → html2pdf.bundle-Bqwrc-rt.js} +1 -1
- package/dist/{html2pdf.bundle.min-BEj2NT3U.js → html2pdf.bundle.min-IddXSdmD.js} +1 -1
- package/dist/{index-BO5ICrpG.js → index-CUha-eOU.js} +1 -1
- package/dist/{index-CfRDm1jv.js → index-CnJbZHIU.js} +9697 -9439
- package/dist/index-DXkAwL6K.js +381 -0
- package/dist/{index-CX3cfSUQ.js → index-DeaVZP-3.js} +19 -7
- package/dist/index.js +1 -1
- package/dist/nodes/VideoNode.d.ts +10 -3
- package/package.json +1 -1
- package/dist/index-Buj5fA92.js +0 -274
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as B, jsx as
|
|
1
|
+
import { jsxs as B, jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { calculateZoomLevel as C } from "@lexical/utils";
|
|
3
|
-
import { useRef as
|
|
3
|
+
import { useRef as w } from "react";
|
|
4
4
|
function $(f, x, z) {
|
|
5
5
|
return Math.min(Math.max(f, x), z);
|
|
6
6
|
}
|
|
@@ -10,7 +10,7 @@ const r = {
|
|
|
10
10
|
south: 2,
|
|
11
11
|
west: 4
|
|
12
12
|
};
|
|
13
|
-
function
|
|
13
|
+
function F({
|
|
14
14
|
onResizeStart: f,
|
|
15
15
|
onResizeEnd: x,
|
|
16
16
|
buttonRef: z,
|
|
@@ -19,12 +19,12 @@ function Z({
|
|
|
19
19
|
editor: H,
|
|
20
20
|
showCaption: R,
|
|
21
21
|
setShowCaption: X,
|
|
22
|
-
captionsEnabled:
|
|
22
|
+
captionsEnabled: I
|
|
23
23
|
}) {
|
|
24
|
-
const W =
|
|
24
|
+
const W = w(null), g = w({
|
|
25
25
|
priority: "",
|
|
26
26
|
value: "default"
|
|
27
|
-
}), b =
|
|
27
|
+
}), b = w({
|
|
28
28
|
currentHeight: 0,
|
|
29
29
|
currentWidth: 0,
|
|
30
30
|
direction: 0,
|
|
@@ -34,9 +34,9 @@ function Z({
|
|
|
34
34
|
startWidth: 0,
|
|
35
35
|
startX: 0,
|
|
36
36
|
startY: 0
|
|
37
|
-
}),
|
|
38
|
-
const i = t === r.east || t === r.west, e = t === r.north || t === r.south,
|
|
39
|
-
|
|
37
|
+
}), P = w({ imageWrapper: null, editorImageSpan: null, parentParagraph: null }), u = H.getRootElement(), c = u !== null ? u.getBoundingClientRect().width - 20 : 100, L = u !== null ? u.getBoundingClientRect().height - 20 : 100, D = 100, S = 100, M = (t) => {
|
|
38
|
+
const i = t === r.east || t === r.west, e = t === r.north || t === r.south, h = t & r.north && t & r.west || t & r.south && t & r.east, l = i ? "ew" : e ? "ns" : h ? "nwse" : "nesw";
|
|
39
|
+
u !== null && u.style.setProperty(
|
|
40
40
|
"cursor",
|
|
41
41
|
`${l}-resize`,
|
|
42
42
|
"important"
|
|
@@ -54,27 +54,27 @@ function Z({
|
|
|
54
54
|
"important"
|
|
55
55
|
));
|
|
56
56
|
}, Y = () => {
|
|
57
|
-
|
|
57
|
+
u !== null && u.style.setProperty("cursor", "text"), document.body !== null && (document.body.style.setProperty("cursor", "default"), document.body.style.setProperty(
|
|
58
58
|
"-webkit-user-select",
|
|
59
59
|
g.current.value,
|
|
60
60
|
g.current.priority
|
|
61
61
|
));
|
|
62
|
-
},
|
|
62
|
+
}, d = (t, i) => {
|
|
63
63
|
if (!H.isEditable())
|
|
64
64
|
return;
|
|
65
|
-
const e = v.current,
|
|
66
|
-
if (e !== null &&
|
|
65
|
+
const e = v.current, h = W.current;
|
|
66
|
+
if (e !== null && h !== null) {
|
|
67
67
|
t.preventDefault();
|
|
68
|
-
const { width: l, height:
|
|
69
|
-
|
|
68
|
+
const { width: l, height: s } = e.getBoundingClientRect(), p = C(e), o = b.current;
|
|
69
|
+
o.startWidth = l, o.startHeight = s, o.ratio = l / s, o.currentWidth = l, o.currentHeight = s, o.startX = t.clientX / p, o.startY = t.clientY / p, o.isResizing = !0, o.direction = i, M(i), f(), h.classList.add("image-control-wrapper--resizing"), e.style.setProperty(
|
|
70
70
|
"max-width",
|
|
71
71
|
`${c}px`,
|
|
72
72
|
"important"
|
|
73
73
|
);
|
|
74
|
-
const
|
|
74
|
+
const y = e.parentElement, n = e.closest(
|
|
75
75
|
".editor-image"
|
|
76
76
|
), a = n?.parentElement ?? null;
|
|
77
|
-
|
|
77
|
+
P.current = { imageWrapper: y, editorImageSpan: n, parentParagraph: a }, y && (y.style.setProperty("display", "inline-block", "important"), y.style.setProperty("width", "auto", "important"), y.style.setProperty(
|
|
78
78
|
"max-width",
|
|
79
79
|
`${c}px`,
|
|
80
80
|
"important"
|
|
@@ -86,30 +86,30 @@ function Z({
|
|
|
86
86
|
"max-width",
|
|
87
87
|
`${c}px`,
|
|
88
88
|
"important"
|
|
89
|
-
), e.style.setProperty("height", `${
|
|
89
|
+
), e.style.setProperty("height", `${s}px`, "important"), e.style.setProperty("width", `${l}px`, "important"), document.addEventListener("pointermove", E), document.addEventListener("pointerup", k);
|
|
90
90
|
}
|
|
91
91
|
}, E = (t) => {
|
|
92
|
-
const i = v.current, e = b.current,
|
|
92
|
+
const i = v.current, e = b.current, h = e.direction & (r.east | r.west), l = e.direction & (r.south | r.north);
|
|
93
93
|
if (i !== null && e.isResizing) {
|
|
94
|
-
const
|
|
94
|
+
const s = C(i), { imageWrapper: p, editorImageSpan: o, parentParagraph: y } = P.current;
|
|
95
95
|
if (i.style.setProperty(
|
|
96
96
|
"max-width",
|
|
97
97
|
`${c}px`,
|
|
98
98
|
"important"
|
|
99
|
-
),
|
|
99
|
+
), p && (p.style.setProperty("display", "inline-block", "important"), p.style.setProperty("width", "auto", "important"), p.style.setProperty(
|
|
100
100
|
"max-width",
|
|
101
101
|
`${c}px`,
|
|
102
102
|
"important"
|
|
103
|
-
)),
|
|
103
|
+
)), o && (o.style.setProperty("display", "inline-block", "important"), o.style.setProperty(
|
|
104
104
|
"max-width",
|
|
105
105
|
`${c}px`,
|
|
106
106
|
"important"
|
|
107
|
-
)),
|
|
107
|
+
)), y && y.style.setProperty(
|
|
108
108
|
"max-width",
|
|
109
109
|
`${c}px`,
|
|
110
110
|
"important"
|
|
111
|
-
),
|
|
112
|
-
let n = Math.floor(e.startX - t.clientX /
|
|
111
|
+
), h && l) {
|
|
112
|
+
let n = Math.floor(e.startX - t.clientX / s);
|
|
113
113
|
n = e.direction & r.east ? -n : n;
|
|
114
114
|
const a = $(
|
|
115
115
|
e.startWidth + n,
|
|
@@ -118,16 +118,16 @@ function Z({
|
|
|
118
118
|
), N = a / e.ratio;
|
|
119
119
|
i.style.setProperty("width", `${a}px`, "important"), i.style.setProperty("height", `${N}px`, "important"), e.currentHeight = N, e.currentWidth = a;
|
|
120
120
|
} else if (l) {
|
|
121
|
-
let n = Math.floor(e.startY - t.clientY /
|
|
121
|
+
let n = Math.floor(e.startY - t.clientY / s);
|
|
122
122
|
n = e.direction & r.south ? -n : n;
|
|
123
123
|
const a = $(
|
|
124
124
|
e.startHeight + n,
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
S,
|
|
126
|
+
L
|
|
127
127
|
);
|
|
128
128
|
i.style.setProperty("height", `${a}px`, "important"), e.currentHeight = a;
|
|
129
129
|
} else {
|
|
130
|
-
let n = Math.floor(e.startX - t.clientX /
|
|
130
|
+
let n = Math.floor(e.startX - t.clientX / s);
|
|
131
131
|
n = e.direction & r.east ? -n : n;
|
|
132
132
|
const a = $(
|
|
133
133
|
e.startWidth + n,
|
|
@@ -140,14 +140,20 @@ function Z({
|
|
|
140
140
|
}, k = () => {
|
|
141
141
|
const t = v.current, i = b.current, e = W.current;
|
|
142
142
|
if (t !== null && e !== null && i.isResizing) {
|
|
143
|
-
const
|
|
143
|
+
const h = i.currentWidth, l = i.currentHeight;
|
|
144
144
|
i.startWidth = 0, i.startHeight = 0, i.ratio = 0, i.startX = 0, i.startY = 0, i.currentWidth = 0, i.currentHeight = 0, i.isResizing = !1, e.classList.remove("image-control-wrapper--resizing");
|
|
145
|
-
const { imageWrapper: o } =
|
|
146
|
-
|
|
145
|
+
const { imageWrapper: s, editorImageSpan: p, parentParagraph: o } = P.current;
|
|
146
|
+
s && (s.style.removeProperty("display"), s.style.removeProperty("width"), s.style.removeProperty("max-width")), Y(), x(h, l), requestAnimationFrame(() => {
|
|
147
|
+
t.style.removeProperty("max-width"), p && (p.style.removeProperty("display"), p.style.removeProperty("max-width")), o && o.style.removeProperty("max-width");
|
|
148
|
+
}), P.current = {
|
|
149
|
+
imageWrapper: null,
|
|
150
|
+
editorImageSpan: null,
|
|
151
|
+
parentParagraph: null
|
|
152
|
+
}, document.removeEventListener("pointermove", E), document.removeEventListener("pointerup", k);
|
|
147
153
|
}
|
|
148
154
|
};
|
|
149
155
|
return /* @__PURE__ */ B("div", { ref: W, children: [
|
|
150
|
-
!R &&
|
|
156
|
+
!R && I && /* @__PURE__ */ m(
|
|
151
157
|
"button",
|
|
152
158
|
{
|
|
153
159
|
className: "image-caption-button",
|
|
@@ -158,80 +164,80 @@ function Z({
|
|
|
158
164
|
children: "Add Caption"
|
|
159
165
|
}
|
|
160
166
|
),
|
|
161
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ m(
|
|
162
168
|
"div",
|
|
163
169
|
{
|
|
164
170
|
className: "image-resizer image-resizer-n",
|
|
165
171
|
onPointerDown: (t) => {
|
|
166
|
-
|
|
172
|
+
d(t, r.north);
|
|
167
173
|
}
|
|
168
174
|
}
|
|
169
175
|
),
|
|
170
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ m(
|
|
171
177
|
"div",
|
|
172
178
|
{
|
|
173
179
|
className: "image-resizer image-resizer-ne",
|
|
174
180
|
onPointerDown: (t) => {
|
|
175
|
-
|
|
181
|
+
d(t, r.north | r.east);
|
|
176
182
|
}
|
|
177
183
|
}
|
|
178
184
|
),
|
|
179
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ m(
|
|
180
186
|
"div",
|
|
181
187
|
{
|
|
182
188
|
className: "image-resizer image-resizer-e",
|
|
183
189
|
onPointerDown: (t) => {
|
|
184
|
-
|
|
190
|
+
d(t, r.east);
|
|
185
191
|
}
|
|
186
192
|
}
|
|
187
193
|
),
|
|
188
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ m(
|
|
189
195
|
"div",
|
|
190
196
|
{
|
|
191
197
|
className: "image-resizer image-resizer-se",
|
|
192
198
|
onPointerDown: (t) => {
|
|
193
|
-
|
|
199
|
+
d(t, r.south | r.east);
|
|
194
200
|
}
|
|
195
201
|
}
|
|
196
202
|
),
|
|
197
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ m(
|
|
198
204
|
"div",
|
|
199
205
|
{
|
|
200
206
|
className: "image-resizer image-resizer-s",
|
|
201
207
|
onPointerDown: (t) => {
|
|
202
|
-
|
|
208
|
+
d(t, r.south);
|
|
203
209
|
}
|
|
204
210
|
}
|
|
205
211
|
),
|
|
206
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ m(
|
|
207
213
|
"div",
|
|
208
214
|
{
|
|
209
215
|
className: "image-resizer image-resizer-sw",
|
|
210
216
|
onPointerDown: (t) => {
|
|
211
|
-
|
|
217
|
+
d(t, r.south | r.west);
|
|
212
218
|
}
|
|
213
219
|
}
|
|
214
220
|
),
|
|
215
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ m(
|
|
216
222
|
"div",
|
|
217
223
|
{
|
|
218
224
|
className: "image-resizer image-resizer-w",
|
|
219
225
|
onPointerDown: (t) => {
|
|
220
|
-
|
|
226
|
+
d(t, r.west);
|
|
221
227
|
}
|
|
222
228
|
}
|
|
223
229
|
),
|
|
224
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ m(
|
|
225
231
|
"div",
|
|
226
232
|
{
|
|
227
233
|
className: "image-resizer image-resizer-nw",
|
|
228
234
|
onPointerDown: (t) => {
|
|
229
|
-
|
|
235
|
+
d(t, r.north | r.west);
|
|
230
236
|
}
|
|
231
237
|
}
|
|
232
238
|
)
|
|
233
239
|
] });
|
|
234
240
|
}
|
|
235
241
|
export {
|
|
236
|
-
|
|
242
|
+
F as I
|
|
237
243
|
};
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import { LexicalEditor, RangeSelection } from '../../../node_modules/lexical';
|
|
2
2
|
export type AIProvider = "chatgpt" | "claude" | "grok" | "gemini" | "deepseek";
|
|
3
3
|
export type AIStatus = "idle" | "loading" | "success" | "error";
|
|
4
|
+
export type SavedSelection = RangeSelection | {
|
|
5
|
+
anchor: {
|
|
6
|
+
key: string;
|
|
7
|
+
offset: number;
|
|
8
|
+
type: "text" | "element";
|
|
9
|
+
};
|
|
10
|
+
focus: {
|
|
11
|
+
key: string;
|
|
12
|
+
offset: number;
|
|
13
|
+
type: "text" | "element";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
4
16
|
export interface AIAgentConfig {
|
|
5
17
|
editor: LexicalEditor;
|
|
6
18
|
query: string;
|
|
7
19
|
model: AIProvider;
|
|
8
20
|
apiKey: string;
|
|
9
21
|
type?: string;
|
|
10
|
-
savedSelection?:
|
|
22
|
+
savedSelection?: SavedSelection | null;
|
|
23
|
+
originalPrompt?: string;
|
|
11
24
|
onStatusChange?: (status: AIStatus) => void;
|
|
12
25
|
onLoadingChange?: (isLoading: boolean) => void;
|
|
13
26
|
onStreamStart?: () => void;
|
|
@@ -42,3 +55,11 @@ export declare function processAITransformation(config: AITransformConfig): Prom
|
|
|
42
55
|
export declare function processAIRequest(config: AIAgentConfig & {
|
|
43
56
|
secondaryPrompt?: string;
|
|
44
57
|
}): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Fetch the user's last 3 AI prompt history entries.
|
|
60
|
+
*/
|
|
61
|
+
export declare function getAIPromptHistory(apiKey: string): Promise<Array<{
|
|
62
|
+
id: string;
|
|
63
|
+
prompt: string;
|
|
64
|
+
createdAt: string;
|
|
65
|
+
}>>;
|