@harbour-enterprises/superdoc 0.11.20 → 0.11.22
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/chunks/super-editor.es-Bk6dxWQa.cjs +452 -0
- package/dist/chunks/{super-editor.es-Du1kHoDA.es.js → super-editor.es-Lj84Zq0h.es.js} +7085 -7019
- package/dist/composables/use-ai.d.ts.map +1 -1
- package/dist/style.css +33 -32
- package/dist/super-editor/ai-writer.es.js +135 -135
- package/dist/super-editor/chunks/{converter-CwMvN1V7.js → converter-De1X-4ue.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-CW3YnwaW.js → docx-zipper-CcmKEgiG.js} +1 -1
- package/dist/super-editor/chunks/{editor-CR8riiuL.js → editor-usrJ_Hxe.js} +4787 -4722
- package/dist/super-editor/chunks/{toolbar-BZ4Xi416.js → toolbar-C7Ii-GgO.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/ai/ai-constants.d.ts +1 -0
- package/dist/super-editor/extensions/ai/ai-constants.d.ts.map +1 -1
- package/dist/super-editor/extensions/ai/ai-nodes.d.ts +2 -0
- package/dist/super-editor/extensions/ai/ai-nodes.d.ts.map +1 -0
- package/dist/super-editor/extensions/ai/ai-plugin.d.ts.map +1 -1
- package/dist/super-editor/extensions/ai/index.d.ts +1 -0
- package/dist/super-editor/extensions/index.d.ts +2 -1
- package/dist/super-editor/extensions/index.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +9 -9
- package/dist/superdoc.cjs +22 -22
- package/dist/superdoc.es.js +734 -715
- package/dist/superdoc.umd.js +5587 -5499
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/super-editor.es-DvREqt6O.cjs +0 -461
|
@@ -1,65 +1,66 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { ref as u, onMounted as X, onUnmounted as q, computed as S, createElementBlock as A, openBlock as M, withModifiers as E, createElementVNode as h, withDirectives as $, unref as I, vModelText as B, createCommentVNode as G, nextTick as U } from "vue";
|
|
2
|
+
import { T as Y } from "./chunks/converter-De1X-4ue.js";
|
|
3
|
+
import { _ as J } from "./chunks/editor-usrJ_Hxe.js";
|
|
4
|
+
const Q = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights", C = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
|
|
5
|
+
async function D(i, r = {}) {
|
|
6
|
+
const e = r.apiKey, s = r.endpoint || Q;
|
|
6
7
|
try {
|
|
7
|
-
const
|
|
8
|
+
const o = {
|
|
8
9
|
"Content-Type": "application/json"
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
const
|
|
11
|
+
e && (o["x-api-key"] = e);
|
|
12
|
+
const n = await fetch(s, {
|
|
12
13
|
method: "POST",
|
|
13
|
-
headers:
|
|
14
|
-
body: JSON.stringify(
|
|
14
|
+
headers: o,
|
|
15
|
+
body: JSON.stringify(i)
|
|
15
16
|
});
|
|
16
|
-
if (!
|
|
17
|
-
const
|
|
18
|
-
throw new Error(`Harbour API error: ${
|
|
17
|
+
if (!n.ok) {
|
|
18
|
+
const l = await n.text();
|
|
19
|
+
throw new Error(`Harbour API error: ${n.status} - ${l}`);
|
|
19
20
|
}
|
|
20
|
-
return
|
|
21
|
-
} catch (
|
|
22
|
-
throw console.error("Error calling Harbour API:",
|
|
21
|
+
return n;
|
|
22
|
+
} catch (o) {
|
|
23
|
+
throw console.error("Error calling Harbour API:", o), o;
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
async function F(
|
|
26
|
-
const
|
|
27
|
-
let
|
|
26
|
+
async function F(i, r, e) {
|
|
27
|
+
const s = i.getReader(), o = new TextDecoder();
|
|
28
|
+
let n = "", l = "";
|
|
28
29
|
try {
|
|
29
30
|
for (; ; ) {
|
|
30
|
-
const { done:
|
|
31
|
-
if (
|
|
32
|
-
typeof
|
|
31
|
+
const { done: d, value: v } = await s.read();
|
|
32
|
+
if (d) {
|
|
33
|
+
typeof e == "function" && e();
|
|
33
34
|
break;
|
|
34
35
|
}
|
|
35
|
-
const
|
|
36
|
-
typeof
|
|
36
|
+
const w = o.decode(v, { stream: !0 });
|
|
37
|
+
typeof r == "function" && r(w);
|
|
37
38
|
}
|
|
38
|
-
let
|
|
39
|
-
return
|
|
40
|
-
} catch (
|
|
41
|
-
throw console.error("Error reading stream:",
|
|
39
|
+
let c = Z(l);
|
|
40
|
+
return c !== null && (n = c), n || "";
|
|
41
|
+
} catch (c) {
|
|
42
|
+
throw console.error("Error reading stream:", c), c;
|
|
42
43
|
} finally {
|
|
43
|
-
|
|
44
|
+
s.releaseLock();
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function Z(i) {
|
|
47
48
|
try {
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
49
|
+
const r = /```json\s*\n([\s\S]*?)\n\s*```/, e = i.match(r);
|
|
50
|
+
if (e && e[1]) {
|
|
51
|
+
const s = JSON.parse(e[1]);
|
|
52
|
+
if (s.custom_prompt && s.custom_prompt.value !== void 0)
|
|
53
|
+
return s.custom_prompt.value || "";
|
|
53
54
|
}
|
|
54
55
|
return null;
|
|
55
56
|
} catch {
|
|
56
57
|
return null;
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
|
-
async function
|
|
60
|
-
if (!
|
|
60
|
+
async function ee(i, r = {}, e, s) {
|
|
61
|
+
if (!i)
|
|
61
62
|
throw new Error("Prompt is required for text generation");
|
|
62
|
-
const
|
|
63
|
+
const o = {
|
|
63
64
|
stream: !0,
|
|
64
65
|
context: C,
|
|
65
66
|
doc_text: "",
|
|
@@ -67,31 +68,31 @@ async function N(a, e = {}, n, r) {
|
|
|
67
68
|
{
|
|
68
69
|
type: "custom_prompt",
|
|
69
70
|
name: "text_generation",
|
|
70
|
-
message: `Generate text based on the following prompt: ${
|
|
71
|
+
message: `Generate text based on the following prompt: ${i}`
|
|
71
72
|
}
|
|
72
73
|
]
|
|
73
74
|
};
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
return
|
|
75
|
+
r.documentXml && (o.document_content = r.documentXml);
|
|
76
|
+
const n = await D(o, r.config || {});
|
|
77
|
+
return n.body ? await F(n.body, e, s) : "";
|
|
77
78
|
}
|
|
78
|
-
async function
|
|
79
|
-
if (!
|
|
79
|
+
async function te(i, r = "", e = {}, s, o) {
|
|
80
|
+
if (!i)
|
|
80
81
|
throw new Error("Text is required for rewriting");
|
|
81
|
-
const
|
|
82
|
+
const n = {
|
|
82
83
|
stream: !0,
|
|
83
84
|
context: C,
|
|
84
85
|
insights: [
|
|
85
86
|
{
|
|
86
87
|
type: "custom_prompt",
|
|
87
88
|
name: "text_rewrite",
|
|
88
|
-
message: `Rewrite the following text: "${
|
|
89
|
+
message: `Rewrite the following text: "${i}" using these instructions: ${r}`
|
|
89
90
|
}
|
|
90
91
|
]
|
|
91
|
-
},
|
|
92
|
-
return
|
|
92
|
+
}, l = await D(n, e.config || {});
|
|
93
|
+
return l.body ? await F(l.body, s, o) : "";
|
|
93
94
|
}
|
|
94
|
-
const
|
|
95
|
+
const oe = `<!-- @note: includes color gradient for inline svg AI Writer -->
|
|
95
96
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
|
|
96
97
|
<linearGradient id="gradient" x1="125%" y1="50%" x2="-25%" y2="50%">
|
|
97
98
|
<stop offset="-20%" stop-color="rgba(218, 215, 118, 0.5)" />
|
|
@@ -100,7 +101,7 @@ const U = `<!-- @note: includes color gradient for inline svg AI Writer -->
|
|
|
100
101
|
<stop offset="150%" stop-color="rgb(255, 219, 102)" />
|
|
101
102
|
</linearGradient>
|
|
102
103
|
<path fill="url(#gradient)" d="M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1 .8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"/>
|
|
103
|
-
</svg>`,
|
|
104
|
+
</svg>`, re = `<!-- @note: includes color gradient for inline svg AI Writer -->
|
|
104
105
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
|
|
105
106
|
<defs>
|
|
106
107
|
<linearGradient id="gradient" x1="125%" y1="50%" x2="-25%" y2="50%">
|
|
@@ -111,19 +112,7 @@ const U = `<!-- @note: includes color gradient for inline svg AI Writer -->
|
|
|
111
112
|
</linearGradient>
|
|
112
113
|
</defs>
|
|
113
114
|
<path fill="url(#gradient)" d="M440 6.5L24 246.4c-34.4 19.9-31.1 70.8 5.7 85.9L144 379.6V464c0 46.4 59.2 65.5 86.6 28.6l43.8-59.1 111.9 46.2c5.9 2.4 12.1 3.6 18.3 3.6 8.2 0 16.3-2.1 23.6-6.2 12.8-7.2 21.6-20 23.9-34.5l59.4-387.2c6.1-40.1-36.9-68.8-71.5-48.9zM192 464v-64.6l36.6 15.1L192 464zm212.6-28.7l-153.8-63.5L391 169.5c10.7-15.5-9.5-33.5-23.7-21.2L155.8 332.6 48 288 464 48l-59.4 387.3z"/>
|
|
114
|
-
</svg>`,
|
|
115
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm101.8-262.2L295.6 256l62.2 62.2c4.7 4.7 4.7 12.3 0 17l-22.6 22.6c-4.7 4.7-12.3 4.7-17 0L256 295.6l-62.2 62.2c-4.7 4.7-12.3 4.7-17 0l-22.6-22.6c-4.7-4.7-4.7-12.3 0-17l62.2-62.2-62.2-62.2c-4.7-4.7-4.7-12.3 0-17l22.6-22.6c4.7-4.7 12.3-4.7 17 0l62.2 62.2 62.2-62.2c4.7-4.7 12.3-4.7 17 0l22.6 22.6c4.7 4.7 4.7 12.3 0 17z"/></svg>`, Q = `<!-- @note: includes color gradient for inline svg AI Writer -->
|
|
116
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--> <defs>
|
|
117
|
-
<linearGradient id="gradient" x1="125%" y1="50%" x2="-25%" y2="50%">
|
|
118
|
-
<stop offset="-20%" stop-color="rgba(218, 215, 118, 0.5)" />
|
|
119
|
-
<stop offset="30%" stop-color="rgb(191, 100, 100)" />
|
|
120
|
-
<stop offset="60%" stop-color="rgb(77, 82, 217)" />
|
|
121
|
-
<stop offset="150%" stop-color="rgb(255, 219, 102)" />
|
|
122
|
-
</linearGradient>
|
|
123
|
-
</defs><path fill="url(#gradient)" d="M494.2 221.9l-59.8-40.5 13.7-71c2.6-13.2-1.6-26.8-11.1-36.4-9.6-9.5-23.2-13.7-36.2-11.1l-70.9 13.7-40.4-59.9c-15.1-22.3-51.9-22.3-67 0l-40.4 59.9-70.8-13.7C98 60.4 84.5 64.5 75 74.1c-9.5 9.6-13.7 23.1-11.1 36.3l13.7 71-59.8 40.5C6.6 229.5 0 242 0 255.5s6.7 26 17.8 33.5l59.8 40.5-13.7 71c-2.6 13.2 1.6 26.8 11.1 36.3 9.5 9.5 22.9 13.7 36.3 11.1l70.8-13.7 40.4 59.9C230 505.3 242.6 512 256 512s26-6.7 33.5-17.8l40.4-59.9 70.9 13.7c13.4 2.7 26.8-1.6 36.3-11.1 9.5-9.5 13.6-23.1 11.1-36.3l-13.7-71 59.8-40.5c11.1-7.5 17.8-20.1 17.8-33.5-.1-13.6-6.7-26.1-17.9-33.7zm-112.9 85.6l17.6 91.2-91-17.6L256 458l-51.9-77-90.9 17.6 17.6-91.2-76.8-52 76.8-52-17.6-91.2 91 17.6L256 53l51.9 76.9 91-17.6-17.6 91.1 76.8 52-76.8 52.1zM256 152c-57.3 0-104 46.7-104 104s46.7 104 104 104 104-46.7 104-104-46.7-104-104-104zm0 160c-30.9 0-56-25.1-56-56s25.1-56 56-56 56 25.1 56 56-25.1 56-56 56z"/></svg>`, Z = { class: "ai-user-input-field" }, ee = ["innerHTML"], te = ["placeholder"], oe = { class: "ai-loader" }, ne = {
|
|
124
|
-
key: 0,
|
|
125
|
-
class: "ai-textarea-icon loading spinner-wrapper"
|
|
126
|
-
}, re = ["innerHTML"], se = ["innerHTML"], ae = ["innerHTML"], ie = {
|
|
115
|
+
</svg>`, ne = { class: "ai-user-input-field" }, se = ["innerHTML"], ae = ["placeholder"], ie = { class: "ai-loader" }, ce = ["innerHTML"], le = {
|
|
127
116
|
__name: "AIWriter",
|
|
128
117
|
props: {
|
|
129
118
|
selectedText: {
|
|
@@ -155,42 +144,57 @@ const U = `<!-- @note: includes color gradient for inline svg AI Writer -->
|
|
|
155
144
|
type: Object
|
|
156
145
|
}
|
|
157
146
|
},
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
e.selectedText && (n.value = e.editor.state.selection, e.editor.commands.setMeta("storedSelection", n.value), c("add"));
|
|
165
|
-
}, h = () => {
|
|
166
|
-
B(() => {
|
|
167
|
-
o.value && o.value.focus();
|
|
168
|
-
});
|
|
147
|
+
emits: ["ai-highlight"],
|
|
148
|
+
setup(i, { emit: r }) {
|
|
149
|
+
const e = i, s = r, o = u(null), n = u(null), l = (t) => {
|
|
150
|
+
n.value && !n.value.contains(t.target) && (m.value || d("remove"), e.handleClose());
|
|
151
|
+
}, c = u(null), d = (t, a = null) => {
|
|
152
|
+
e.superToolbar ? e.superToolbar.emit("ai-highlight", { type: t, data: a }) : s("ai-highlight", { type: t, data: a });
|
|
169
153
|
}, v = () => {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
154
|
+
e.selectedText && (o.value = {
|
|
155
|
+
...e.editor.state.selection,
|
|
156
|
+
from: e.editor.state.selection.from,
|
|
157
|
+
to: e.editor.state.selection.to
|
|
158
|
+
}, e.editor.commands.setMeta("storedSelection", o.value), d("add"));
|
|
159
|
+
}, w = () => {
|
|
160
|
+
U(() => {
|
|
161
|
+
c.value && c.value.focus();
|
|
162
|
+
});
|
|
163
|
+
}, P = () => {
|
|
164
|
+
document.addEventListener("mousedown", l), document.addEventListener("keydown", x, !0);
|
|
165
|
+
}, H = () => {
|
|
166
|
+
document.removeEventListener("mousedown", l), document.removeEventListener("keydown", x, !0);
|
|
173
167
|
};
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}),
|
|
177
|
-
|
|
168
|
+
X(() => {
|
|
169
|
+
v(), w(), P();
|
|
170
|
+
}), q(() => {
|
|
171
|
+
m.value || d("remove"), H();
|
|
178
172
|
});
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
},
|
|
173
|
+
const x = (t) => {
|
|
174
|
+
c.value && t.target === c.value && ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(t.key) && t.stopPropagation();
|
|
175
|
+
}, N = S(
|
|
182
176
|
() => e.selectedText ? "Insert prompt to update text" : "Insert prompt to generate text"
|
|
183
|
-
),
|
|
177
|
+
), m = u(!1), f = u(""), p = u(""), g = u(!1), O = u(""), b = S(() => e.editor.isInSuggestingMode?.() || !1), R = () => {
|
|
184
178
|
try {
|
|
185
179
|
return e.editor.state.doc.textContent || "";
|
|
186
180
|
} catch (t) {
|
|
187
181
|
return console.error("Error getting document XML:", t), "";
|
|
188
182
|
}
|
|
189
|
-
},
|
|
183
|
+
}, T = (t) => {
|
|
190
184
|
try {
|
|
191
|
-
if (e.
|
|
185
|
+
if (e.editor.commands.removeAiNode("aiLoaderNode"), e.selectedText && !g.value) {
|
|
186
|
+
if (d("remove"), e.editor.commands.clearAiHighlightStyle(), o.value) {
|
|
187
|
+
const { state: k } = e.editor, { from: j, to: z } = o.value, W = k.tr.setSelection(
|
|
188
|
+
Y.create(k.doc, j, z)
|
|
189
|
+
);
|
|
190
|
+
e.editor.view.dispatch(W);
|
|
191
|
+
} else
|
|
192
|
+
console.warn("[AIWriter] No stored selection to restore");
|
|
193
|
+
e.editor.commands.deleteSelection(), g.value = !0;
|
|
194
|
+
}
|
|
195
|
+
if (t == null || t === "")
|
|
192
196
|
return;
|
|
193
|
-
const
|
|
197
|
+
const a = String(t), y = {
|
|
194
198
|
type: "text",
|
|
195
199
|
marks: [{
|
|
196
200
|
type: "aiAnimationMark",
|
|
@@ -199,83 +203,79 @@ const U = `<!-- @note: includes color gradient for inline svg AI Writer -->
|
|
|
199
203
|
dataMarkId: `ai-animation-${Date.now()}`
|
|
200
204
|
}
|
|
201
205
|
}],
|
|
202
|
-
text:
|
|
206
|
+
text: a
|
|
203
207
|
};
|
|
204
|
-
e.editor.commands.insertContent(
|
|
205
|
-
} catch (
|
|
206
|
-
console.error("Error handling text chunk:",
|
|
208
|
+
e.editor.commands.insertContent(y), e.handleClose();
|
|
209
|
+
} catch (a) {
|
|
210
|
+
console.error("Error handling text chunk:", a);
|
|
207
211
|
}
|
|
208
|
-
},
|
|
212
|
+
}, _ = () => {
|
|
209
213
|
setTimeout(() => {
|
|
210
|
-
e.editor.commands.removeAiMark("aiAnimationMark");
|
|
214
|
+
e.editor.commands.removeAiMark("aiAnimationMark"), d("remove");
|
|
211
215
|
}, 1e3);
|
|
212
|
-
},
|
|
213
|
-
|
|
216
|
+
}, L = async () => {
|
|
217
|
+
f.value = "", g.value = !1, O.value = "", m.value = !0;
|
|
214
218
|
try {
|
|
215
|
-
|
|
216
|
-
|
|
219
|
+
e.handleClose(), e.selectedText ? d("update") : e.editor.commands.insertContent({
|
|
220
|
+
type: "aiLoaderNode"
|
|
221
|
+
}), b.value && e.editor.commands.enableTrackChanges();
|
|
222
|
+
const a = {
|
|
217
223
|
// @todo: implement grabbing document text
|
|
218
224
|
docText: "",
|
|
219
|
-
documentXml:
|
|
225
|
+
documentXml: R(),
|
|
220
226
|
config: {
|
|
221
227
|
// Pass the aiApiKey to the AI helper functions
|
|
222
228
|
apiKey: e.apiKey,
|
|
223
229
|
endpoint: e.endpoint
|
|
224
230
|
}
|
|
225
231
|
};
|
|
226
|
-
e.selectedText ? await
|
|
232
|
+
e.selectedText ? await te(e.selectedText, p.value, a, T, _) : await ee(p.value, a, T, _);
|
|
227
233
|
} catch (t) {
|
|
228
|
-
console.error("AI generation error:", t),
|
|
234
|
+
console.error("AI generation error:", t), f.value = t.message || "An error occurred";
|
|
229
235
|
} finally {
|
|
230
|
-
|
|
236
|
+
p.value = "", b.value && e.editor.commands.disableTrackChanges(), m.value = !1, g.value = !1;
|
|
231
237
|
}
|
|
232
|
-
},
|
|
233
|
-
t.key === "Enter" && !t.shiftKey && (t.preventDefault(),
|
|
234
|
-
},
|
|
235
|
-
|
|
238
|
+
}, K = (t) => {
|
|
239
|
+
t.key === "Enter" && !t.shiftKey && (t.preventDefault(), L());
|
|
240
|
+
}, V = (t) => {
|
|
241
|
+
f.value && (f.value = ""), p.value = t.target.value;
|
|
236
242
|
};
|
|
237
|
-
return (t,
|
|
243
|
+
return (t, a) => (M(), A("div", {
|
|
238
244
|
class: "ai-writer prosemirror-isolated",
|
|
239
245
|
ref_key: "aiWriterRef",
|
|
240
|
-
ref:
|
|
241
|
-
onMousedown:
|
|
246
|
+
ref: n,
|
|
247
|
+
onMousedown: a[1] || (a[1] = E(() => {
|
|
242
248
|
}, ["stop"]))
|
|
243
249
|
}, [
|
|
244
|
-
|
|
245
|
-
|
|
250
|
+
h("div", ne, [
|
|
251
|
+
h("span", {
|
|
246
252
|
class: "ai-textarea-icon",
|
|
247
|
-
innerHTML:
|
|
248
|
-
}, null, 8,
|
|
249
|
-
|
|
253
|
+
innerHTML: I(oe)
|
|
254
|
+
}, null, 8, se),
|
|
255
|
+
$(h("textarea", {
|
|
250
256
|
ref_key: "editableRef",
|
|
251
|
-
ref:
|
|
257
|
+
ref: c,
|
|
252
258
|
class: "ai-textarea",
|
|
253
|
-
placeholder:
|
|
254
|
-
onKeydown:
|
|
255
|
-
onInput:
|
|
256
|
-
"onUpdate:modelValue":
|
|
259
|
+
placeholder: N.value,
|
|
260
|
+
onKeydown: K,
|
|
261
|
+
onInput: V,
|
|
262
|
+
"onUpdate:modelValue": a[0] || (a[0] = (y) => p.value = y),
|
|
257
263
|
rows: "4"
|
|
258
|
-
}, null, 40,
|
|
259
|
-
[
|
|
264
|
+
}, null, 40, ae), [
|
|
265
|
+
[B, p.value]
|
|
260
266
|
])
|
|
261
267
|
]),
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
])) : p.value ? (g(), f("span", {
|
|
266
|
-
key: 1,
|
|
267
|
-
class: "ai-textarea-icon error",
|
|
268
|
-
innerHTML: w(J)
|
|
269
|
-
}, null, 8, se)) : u.value ? (g(), f("span", {
|
|
270
|
-
key: 2,
|
|
268
|
+
h("div", ie, [
|
|
269
|
+
p.value ? (M(), A("span", {
|
|
270
|
+
key: 0,
|
|
271
271
|
class: "ai-textarea-icon ai-submit-button",
|
|
272
|
-
onClick:
|
|
273
|
-
innerHTML:
|
|
274
|
-
}, null, 8,
|
|
272
|
+
onClick: E(L, ["stop"]),
|
|
273
|
+
innerHTML: I(re)
|
|
274
|
+
}, null, 8, ce)) : G("", !0)
|
|
275
275
|
])
|
|
276
276
|
], 544));
|
|
277
277
|
}
|
|
278
|
-
},
|
|
278
|
+
}, me = /* @__PURE__ */ J(le, [["__scopeId", "data-v-b140a4fa"]]);
|
|
279
279
|
export {
|
|
280
|
-
|
|
280
|
+
me as default
|
|
281
281
|
};
|
|
@@ -16725,7 +16725,7 @@ const pt = class pt {
|
|
|
16725
16725
|
return;
|
|
16726
16726
|
}
|
|
16727
16727
|
}
|
|
16728
|
-
static updateDocumentVersion(e = this.convertedXml, t = "0.11.
|
|
16728
|
+
static updateDocumentVersion(e = this.convertedXml, t = "0.11.22") {
|
|
16729
16729
|
const n = "docProps/custom.xml";
|
|
16730
16730
|
e[n] || (e[n] = Bu());
|
|
16731
16731
|
const i = e["docProps/custom.xml"];
|
|
@@ -16988,7 +16988,7 @@ function Cp(r) {
|
|
|
16988
16988
|
function Bu() {
|
|
16989
16989
|
return Wf;
|
|
16990
16990
|
}
|
|
16991
|
-
function ku(r = 2, e = "0.11.
|
|
16991
|
+
function ku(r = 2, e = "0.11.22") {
|
|
16992
16992
|
return {
|
|
16993
16993
|
type: "element",
|
|
16994
16994
|
name: "property",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as Tt, a0 as wt, B as ut, a1 as Bt, a2 as Rt } from "./converter-
|
|
1
|
+
import { p as Tt, a0 as wt, B as ut, a1 as Bt, a2 as Rt } from "./converter-De1X-4ue.js";
|
|
2
2
|
function kt(bt) {
|
|
3
3
|
throw new Error('Could not dynamically require "' + bt + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
4
|
}
|