@templatical/editor 0.60.4 → 0.61.0
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/{AiChatPanel-CjUnhJGB.js → AiChatPanel-DF5TvO9H.js} +166 -166
- package/dist/{AiPanels-DwI9KjjI.js → AiPanels-zRqC5DIP.js} +1 -1
- package/dist/{AiRewriteMenu-Bh1cIX8F.js → AiRewriteMenu-CmZKTO-O.js} +1 -1
- package/dist/{BlockPreviewCanvas-C_N6f_FS.js → BlockPreviewCanvas-knSyWaCP.js} +2 -2
- package/dist/{CloudPanels-BS49EsuN.js → CloudPanels-BbHJHZri.js} +1 -1
- package/dist/{CommentsPanel-BSLk23YP.js → CommentsPanel-BMYvXRKK.js} +1 -1
- package/dist/{CommentsSidebar-L-DgP_kM.js → CommentsSidebar-_8at1Rug.js} +139 -139
- package/dist/{CountdownToolbar-B6erqTbz.js → CountdownToolbar-BprSuPJk.js} +2 -2
- package/dist/{LanguageMenu-DsfCHdVi.js → LanguageMenu-CkGqLYjf.js} +122 -122
- package/dist/{LocaleNotices-BxR3xcLl.js → LocaleNotices-D0be8ovO.js} +8 -8
- package/dist/{MergeTagTextarea-q6eeDD2l.js → MergeTagTextarea-BjHlamJv.js} +12 -12
- package/dist/{ParagraphEditor-25SNi_8O.js → ParagraphEditor-Ctu4fSsl.js} +2 -2
- package/dist/{RestoreVersionDialog-BXtCxJF1.js → RestoreVersionDialog-DvZoTJVa.js} +1 -1
- package/dist/{SaveBlockDialog-k1lxEBVW.js → SaveBlockDialog-DHfT-Tpx.js} +3 -3
- package/dist/{SavedBlocksBrowserModal-CV-8mDPj.js → SavedBlocksBrowserModal-BjJuuXQv.js} +3 -3
- package/dist/{SavedBlocksPanels-9nZj1jG_.js → SavedBlocksPanels-D6eiMQZ3.js} +1 -1
- package/dist/{SavedBlocksPickBar-Dy6NN9tm.js → SavedBlocksPickBar-BkgCDSXe.js} +1 -1
- package/dist/{TemplateSettings-DWxdUdM5.js → TemplateSettings-DQAbNsiS.js} +1 -1
- package/dist/{TestEmailModal-BAkkZTaZ.js → TestEmailModal-m_AEa36T.js} +3 -3
- package/dist/{TestEmailPanel-ccT2E3em.js → TestEmailPanel-OApkuaVd.js} +1 -1
- package/dist/{TitleEditor-B19dYnER.js → TitleEditor-Cwdtfk15.js} +1 -1
- package/dist/{Toolbar-DxlZq_36.js → Toolbar-D_T55elL.js} +359 -359
- package/dist/{TplModal-Bp2qPmQw.js → TplModal-2MKm5y6r.js} +1 -1
- package/dist/{VersionHistoryPanels-wAVDmhnP.js → VersionHistoryPanels-CCM0IQBg.js} +1 -1
- package/dist/{WrapperBlock-DHnD6Exl.js → WrapperBlock-BZl10HLy.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiChatPanel-DTYmFRwb.js → AiChatPanel-BYAsgmoC.js} +146 -146
- package/dist/cdn/chunks/AiChatPanel-BYAsgmoC.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-BW9ze-6O.js → AiPanels-MY_YPls8.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-BW9ze-6O.js.map → AiPanels-MY_YPls8.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-B9b92d0R.js → AiRewriteMenu-BSePiXe_.js} +2 -2
- package/dist/cdn/chunks/{AiRewriteMenu-B9b92d0R.js.map → AiRewriteMenu-BSePiXe_.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-CLid1x0c.js → BlockPreviewCanvas-B153A3hu.js} +3 -3
- package/dist/cdn/chunks/{BlockPreviewCanvas-CLid1x0c.js.map → BlockPreviewCanvas-B153A3hu.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-D4dslsyk.js → CloudPanels-Bv26_Sd8.js} +2 -2
- package/dist/cdn/chunks/{CloudPanels-D4dslsyk.js.map → CloudPanels-Bv26_Sd8.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-BynxXJ-F.js → CommentsPanel-R27fqh9O.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-BynxXJ-F.js.map → CommentsPanel-R27fqh9O.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-C81N5Hwr.js → CommentsSidebar-BEiOQ_zT.js} +133 -133
- package/dist/cdn/chunks/CommentsSidebar-BEiOQ_zT.js.map +1 -0
- package/dist/cdn/chunks/{CountdownToolbar-f1aqEba0.js → CountdownToolbar-DOhXnbsq.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-f1aqEba0.js.map → CountdownToolbar-DOhXnbsq.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-CJp7XdfG.js → LanguageMenu-B6kt8SgX.js} +104 -104
- package/dist/cdn/chunks/LanguageMenu-B6kt8SgX.js.map +1 -0
- package/dist/cdn/chunks/{LocaleNotices-D5vZzcUj.js → LocaleNotices-Bleg4gTu.js} +9 -9
- package/dist/cdn/chunks/LocaleNotices-Bleg4gTu.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagTextarea-DMXZgGUF.js → MergeTagTextarea-DGDv-pdn.js} +13 -13
- package/dist/cdn/chunks/MergeTagTextarea-DGDv-pdn.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-Ce7_Ix0K.js → ParagraphEditor-D0q36Myd.js} +3 -3
- package/dist/cdn/chunks/{ParagraphEditor-Ce7_Ix0K.js.map → ParagraphEditor-D0q36Myd.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-JmMLhN6G.js → RestoreVersionDialog-CJggFdbi.js} +2 -2
- package/dist/cdn/chunks/{RestoreVersionDialog-JmMLhN6G.js.map → RestoreVersionDialog-CJggFdbi.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-B-2amBN5.js → SaveBlockDialog-BzES5tqd.js} +4 -4
- package/dist/cdn/chunks/{SaveBlockDialog-B-2amBN5.js.map → SaveBlockDialog-BzES5tqd.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BR6fQ222.js → SavedBlocksBrowserModal-CLNcZcLd.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BR6fQ222.js.map → SavedBlocksBrowserModal-CLNcZcLd.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DVNNshfr.js → SavedBlocksPanels-R0W9LElD.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-DVNNshfr.js.map → SavedBlocksPanels-R0W9LElD.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BfxLHLQV.js → SavedBlocksPickBar-JNi5Rx4V.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPickBar-BfxLHLQV.js.map → SavedBlocksPickBar-JNi5Rx4V.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-TMFrRV2c.js → TemplateSettings-C5wsNcgX.js} +2 -2
- package/dist/cdn/chunks/{TemplateSettings-TMFrRV2c.js.map → TemplateSettings-C5wsNcgX.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-tTU35BKZ.js → TestEmailModal-BxIAwjww.js} +4 -4
- package/dist/cdn/chunks/{TestEmailModal-tTU35BKZ.js.map → TestEmailModal-BxIAwjww.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BNJBVwx0.js → TestEmailPanel-B8BsWXjE.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-BNJBVwx0.js.map → TestEmailPanel-B8BsWXjE.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BbscL_C1.js → TitleEditor-DhcI1aRS.js} +2 -2
- package/dist/cdn/chunks/{TitleEditor-BbscL_C1.js.map → TitleEditor-DhcI1aRS.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-BxzyS69X.js → Toolbar-Ch3h2BUs.js} +194 -194
- package/dist/cdn/chunks/Toolbar-Ch3h2BUs.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-Bzhc_l8y.js → TplModal-CPOqOxVf.js} +2 -2
- package/dist/cdn/chunks/{TplModal-Bzhc_l8y.js.map → TplModal-CPOqOxVf.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-Bbb1xUJs.js → VersionHistoryPanels-CVrXHYxT.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-Bbb1xUJs.js.map → VersionHistoryPanels-CVrXHYxT.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-BboijK5T.js → WrapperBlock-B8SJ7Q4w.js} +2 -2
- package/dist/cdn/chunks/{WrapperBlock-BboijK5T.js.map → WrapperBlock-B8SJ7Q4w.js.map} +1 -1
- package/dist/cdn/chunks/{composables-C77dGo-I.js → composables-CKXPwWo9.js} +148 -148
- package/dist/cdn/chunks/composables-CKXPwWo9.js.map +1 -0
- package/dist/cdn/chunks/keys-ywH4jHJ2.js.map +1 -1
- package/dist/cdn/chunks/{src-1MSPRtI8.js → src-Bk1LF1np.js} +2 -2
- package/dist/cdn/chunks/{src-1MSPRtI8.js.map → src-Bk1LF1np.js.map} +1 -1
- package/dist/cdn/chunks/useLanguageName-DDhdVpqh.js +41 -0
- package/dist/cdn/chunks/useLanguageName-DDhdVpqh.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +58 -56
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-Bu_OmyjT.js → composables-26aR45W3.js} +1222 -1222
- package/dist/index.d.ts +5 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +57 -55
- package/dist/useLanguageName-CEFzafHB.js +39 -0
- package/package.json +8 -8
- package/dist/cdn/chunks/AiChatPanel-DTYmFRwb.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-C81N5Hwr.js.map +0 -1
- package/dist/cdn/chunks/LanguageMenu-CJp7XdfG.js.map +0 -1
- package/dist/cdn/chunks/LocaleNotices-D5vZzcUj.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-DMXZgGUF.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-BxzyS69X.js.map +0 -1
- package/dist/cdn/chunks/composables-C77dGo-I.js.map +0 -1
- package/dist/cdn/chunks/languageName-DEEOhDWI.js +0 -12
- package/dist/cdn/chunks/languageName-DEEOhDWI.js.map +0 -1
- package/dist/languageName-DEEOhDWI.js +0 -10
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { B as e, F as t, Ft as n, M as r, Mt as i, O as a, P as o, U as s, W as ee, _ as c, c as l, ct as u, d, et as f, f as p, g as m, l as h, r as g, u as _, w as v, y } from "./vue.runtime.esm-bundler-BE5V8ADU.js";
|
|
2
|
-
import { a as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { _ as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { w
|
|
15
|
-
import { st as
|
|
16
|
-
import { t as
|
|
17
|
-
import { n as
|
|
18
|
-
import { t as
|
|
19
|
-
var
|
|
2
|
+
import { a as te } from "./runtime-dom.esm-bundler-nN-jsqr1.js";
|
|
3
|
+
import { t as ne } from "./circle-exclamation-point-BCx1tR91.js";
|
|
4
|
+
import { t as b } from "./createLucideIcon-BKeRiObH.js";
|
|
5
|
+
import { t as x } from "./image-g47lDP0J.js";
|
|
6
|
+
import { t as S } from "./x-CuyPLm0U.js";
|
|
7
|
+
import { t as re } from "./loader-circle-uLY01591.js";
|
|
8
|
+
import { t as ie } from "./send-BJEuoIc2.js";
|
|
9
|
+
import { t as C } from "./sparkles-zWGR8hrs.js";
|
|
10
|
+
import { t as ae } from "./square--3H462TJ.js";
|
|
11
|
+
import { _ as oe, g as se } from "./dist-A328tG0Z.js";
|
|
12
|
+
import { t as ce } from "./LoadingTrack-c4SeD16s.js";
|
|
13
|
+
import { t as le } from "./useI18n-Cx9W7OWb.js";
|
|
14
|
+
import { w } from "./styleConstants-Br6CIRoS.js";
|
|
15
|
+
import { st as ue, v as de } from "./keys-B4DimcgX.js";
|
|
16
|
+
import { t as fe } from "./useLanguageName-CEFzafHB.js";
|
|
17
|
+
import { n as T } from "./aiErrors-C3QEMB0x.js";
|
|
18
|
+
import { t as E } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
19
|
+
var D = b({
|
|
20
20
|
name: "file-text",
|
|
21
21
|
size: 24,
|
|
22
22
|
node: [
|
|
@@ -41,7 +41,7 @@ var k = x({
|
|
|
41
41
|
key: "z1uh3a"
|
|
42
42
|
}]
|
|
43
43
|
]
|
|
44
|
-
}),
|
|
44
|
+
}), O = b({
|
|
45
45
|
name: "message-square-plus",
|
|
46
46
|
size: 24,
|
|
47
47
|
node: [
|
|
@@ -58,14 +58,14 @@ var k = x({
|
|
|
58
58
|
key: "1fldmi"
|
|
59
59
|
}]
|
|
60
60
|
]
|
|
61
|
-
}),
|
|
61
|
+
}), pe = b({
|
|
62
62
|
name: "paperclip",
|
|
63
63
|
size: 24,
|
|
64
64
|
node: [["path", {
|
|
65
65
|
d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",
|
|
66
66
|
key: "1miecu"
|
|
67
67
|
}]]
|
|
68
|
-
}),
|
|
68
|
+
}), me = b({
|
|
69
69
|
name: "redo-2",
|
|
70
70
|
size: 24,
|
|
71
71
|
node: [["path", {
|
|
@@ -75,7 +75,7 @@ var k = x({
|
|
|
75
75
|
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
76
76
|
key: "6uklza"
|
|
77
77
|
}]]
|
|
78
|
-
}),
|
|
78
|
+
}), he = b({
|
|
79
79
|
name: "undo-2",
|
|
80
80
|
size: 24,
|
|
81
81
|
node: [["path", {
|
|
@@ -85,11 +85,11 @@ var k = x({
|
|
|
85
85
|
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
86
86
|
key: "f3b9sd"
|
|
87
87
|
}]]
|
|
88
|
-
}),
|
|
88
|
+
}), k = ["aria-label", "data-testid"], A = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, j = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, M = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, N = { "data-testid": "ai-panel-title" }, P = {
|
|
89
89
|
key: 0,
|
|
90
90
|
"data-testid": "ai-panel-subtitle",
|
|
91
91
|
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
92
|
-
},
|
|
92
|
+
}, F = { class: "tpl:flex tpl:items-center tpl:gap-1" }, I = ["aria-label", "title"], L = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, R = /* @__PURE__ */ y({
|
|
93
93
|
__name: "AiPanelShell",
|
|
94
94
|
props: {
|
|
95
95
|
title: {},
|
|
@@ -106,37 +106,37 @@ var k = x({
|
|
|
106
106
|
"data-testid": e.testid,
|
|
107
107
|
class: "tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
108
108
|
}, [
|
|
109
|
-
h("div",
|
|
109
|
+
h("div", A, [h("div", j, [h("div", M, [c(u(C), {
|
|
110
110
|
size: 13,
|
|
111
111
|
"stroke-width": 2,
|
|
112
112
|
"aria-hidden": "true"
|
|
113
|
-
}), h("span",
|
|
113
|
+
}), h("span", N, n(e.title), 1)]), e.subtitle ? (r(), p("p", P, n(e.subtitle), 1)) : d("", !0)]), h("div", F, [t(i.$slots, "actions"), h("button", {
|
|
114
114
|
type: "button",
|
|
115
115
|
"data-testid": "ai-panel-close",
|
|
116
116
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]",
|
|
117
117
|
"aria-label": e.closeLabel,
|
|
118
118
|
title: e.closeLabel,
|
|
119
119
|
onClick: o[0] ||= (e) => a("close")
|
|
120
|
-
}, [c(u(
|
|
120
|
+
}, [c(u(S), {
|
|
121
121
|
size: 14,
|
|
122
122
|
"stroke-width": 2,
|
|
123
123
|
"aria-hidden": "true"
|
|
124
|
-
})], 8,
|
|
125
|
-
h("div",
|
|
124
|
+
})], 8, I)])]),
|
|
125
|
+
h("div", L, [t(i.$slots, "default")]),
|
|
126
126
|
t(i.$slots, "footer")
|
|
127
|
-
], 8,
|
|
127
|
+
], 8, k));
|
|
128
128
|
}
|
|
129
|
-
}),
|
|
129
|
+
}), z = /* @__PURE__ */ new Set([
|
|
130
130
|
"image/png",
|
|
131
131
|
"image/jpeg",
|
|
132
132
|
"image/webp",
|
|
133
133
|
"image/gif",
|
|
134
134
|
"application/pdf"
|
|
135
135
|
]);
|
|
136
|
-
function
|
|
136
|
+
function ge(e, t) {
|
|
137
137
|
let n = [...e], r = [], i = e.reduce((e, t) => e + t.size, 0);
|
|
138
138
|
for (let e of t) {
|
|
139
|
-
let t = n.length >= 4 ? "tooMany" :
|
|
139
|
+
let t = n.length >= 4 ? "tooMany" : z.has(e.type) ? e.size > 5242880 ? "tooLarge" : i + e.size > 10485760 ? "totalTooLarge" : null : "wrongType";
|
|
140
140
|
t ? r.push({
|
|
141
141
|
name: e.name,
|
|
142
142
|
reason: t
|
|
@@ -148,28 +148,28 @@ function he(e, t) {
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
// src/components/ai/AiChatPanel.vue?vue&type=script&setup=true&lang.ts
|
|
151
|
-
var
|
|
151
|
+
var _e = [
|
|
152
152
|
"aria-label",
|
|
153
153
|
"title",
|
|
154
154
|
"disabled"
|
|
155
|
-
],
|
|
155
|
+
], ve = {
|
|
156
156
|
key: 0,
|
|
157
157
|
"data-testid": "ai-chat-drop-hint",
|
|
158
158
|
class: "tpl:absolute tpl:inset-0 tpl:z-20 tpl:flex tpl:items-center tpl:justify-center tpl:border-2 tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-4 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-primary)] tpl:pointer-events-none"
|
|
159
|
-
},
|
|
159
|
+
}, ye = {
|
|
160
160
|
key: 0,
|
|
161
161
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
162
|
-
},
|
|
162
|
+
}, be = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, xe = {
|
|
163
163
|
key: 1,
|
|
164
164
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
165
|
-
},
|
|
165
|
+
}, Se = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ce = {
|
|
166
166
|
key: 2,
|
|
167
167
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
168
|
-
},
|
|
168
|
+
}, we = {
|
|
169
169
|
key: 0,
|
|
170
170
|
"data-testid": "ai-chat-language",
|
|
171
171
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
172
|
-
},
|
|
172
|
+
}, Te = {
|
|
173
173
|
key: 1,
|
|
174
174
|
"data-testid": "ai-chat-prompt",
|
|
175
175
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
@@ -179,10 +179,10 @@ var ge = [
|
|
|
179
179
|
"max-width": "85%",
|
|
180
180
|
"box-shadow": "var(--tpl-shadow)"
|
|
181
181
|
}
|
|
182
|
-
},
|
|
182
|
+
}, Ee = {
|
|
183
183
|
key: 2,
|
|
184
184
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
185
|
-
},
|
|
185
|
+
}, De = {
|
|
186
186
|
key: 1,
|
|
187
187
|
"data-testid": "ai-chat-reply",
|
|
188
188
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
@@ -192,40 +192,40 @@ var ge = [
|
|
|
192
192
|
color: "var(--tpl-text)",
|
|
193
193
|
"box-shadow": "var(--tpl-shadow)"
|
|
194
194
|
}
|
|
195
|
-
},
|
|
195
|
+
}, Oe = {
|
|
196
196
|
key: 2,
|
|
197
197
|
"data-testid": "ai-chat-applied",
|
|
198
198
|
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
199
|
-
},
|
|
199
|
+
}, ke = ["disabled", "onClick"], Ae = {
|
|
200
200
|
key: 3,
|
|
201
201
|
role: "alert",
|
|
202
202
|
"data-testid": "ai-chat-item-error",
|
|
203
203
|
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
204
|
-
},
|
|
204
|
+
}, je = {
|
|
205
205
|
key: 1,
|
|
206
206
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
207
207
|
style: {
|
|
208
208
|
"background-color": "color-mix(in srgb, var(--tpl-bg) 50%, transparent)",
|
|
209
209
|
"backdrop-filter": "blur(2px)"
|
|
210
210
|
}
|
|
211
|
-
},
|
|
211
|
+
}, Me = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Ne = ["onClick"], Pe = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Fe = ["disabled"], B = {
|
|
212
212
|
key: 0,
|
|
213
213
|
class: "tpl:mb-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
214
|
-
},
|
|
214
|
+
}, Ie = { class: "tpl:truncate" }, Le = [
|
|
215
215
|
"aria-label",
|
|
216
216
|
"disabled",
|
|
217
217
|
"onClick"
|
|
218
|
-
],
|
|
218
|
+
], Re = {
|
|
219
219
|
key: 1,
|
|
220
220
|
class: "tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
221
|
-
},
|
|
221
|
+
}, ze = {
|
|
222
222
|
"aria-live": "polite",
|
|
223
223
|
class: "tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
224
|
-
},
|
|
224
|
+
}, Be = {
|
|
225
225
|
key: 1,
|
|
226
226
|
role: "status",
|
|
227
227
|
class: "tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
228
|
-
},
|
|
228
|
+
}, Ve = ["disabled"], He = {
|
|
229
229
|
key: 2,
|
|
230
230
|
role: "alert",
|
|
231
231
|
"data-testid": "ai-chat-error",
|
|
@@ -234,34 +234,34 @@ var ge = [
|
|
|
234
234
|
"background-color": "var(--tpl-danger-light)",
|
|
235
235
|
color: "var(--tpl-danger)"
|
|
236
236
|
}
|
|
237
|
-
},
|
|
237
|
+
}, Ue = { class: "tpl-ai-input-wrapper tpl-focus-ring-host tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, We = {
|
|
238
238
|
key: 0,
|
|
239
239
|
"data-testid": "ai-active-language",
|
|
240
240
|
class: "tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
241
|
-
},
|
|
241
|
+
}, Ge = [
|
|
242
242
|
"placeholder",
|
|
243
243
|
"aria-label",
|
|
244
244
|
"disabled"
|
|
245
|
-
],
|
|
245
|
+
], Ke = { class: "tpl:flex tpl:items-center tpl:justify-between" }, qe = [
|
|
246
246
|
"aria-label",
|
|
247
247
|
"title",
|
|
248
248
|
"disabled"
|
|
249
|
-
],
|
|
249
|
+
], Je = ["aria-label", "title"], Ye = [
|
|
250
250
|
"aria-label",
|
|
251
251
|
"title",
|
|
252
252
|
"disabled"
|
|
253
|
-
],
|
|
253
|
+
], Xe = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, V = /*#__PURE__*/ E(/* @__PURE__ */ y({
|
|
254
254
|
__name: "AiChatPanel",
|
|
255
255
|
props: { feature: {} },
|
|
256
256
|
emits: ["close"],
|
|
257
257
|
setup(t, { emit: y }) {
|
|
258
|
-
let
|
|
259
|
-
e(() =>
|
|
260
|
-
P.value = "", L.value = [],
|
|
258
|
+
let b = t, E = y, { t: k, format: A } = le(), j = v(de, null), M = fe(j), N = v(ue, void 0), P = f(""), F = f(null), I = f(null), L = f([]), z = f([]), V = f(0);
|
|
259
|
+
e(() => b.feature.templateSession.value, () => {
|
|
260
|
+
P.value = "", L.value = [], z.value = [], V.value = 0;
|
|
261
261
|
}, { flush: "sync" });
|
|
262
|
-
let H = l(() =>
|
|
262
|
+
let H = l(() => b.feature.has("chatAttachments"));
|
|
263
263
|
function U(e) {
|
|
264
|
-
let t =
|
|
264
|
+
let t = ge(L.value, e);
|
|
265
265
|
L.value = t.accepted;
|
|
266
266
|
let n = {
|
|
267
267
|
tooMany: "attachTooMany",
|
|
@@ -269,106 +269,106 @@ var ge = [
|
|
|
269
269
|
totalTooLarge: "attachTotalTooLarge",
|
|
270
270
|
wrongType: "attachWrongType"
|
|
271
271
|
};
|
|
272
|
-
|
|
272
|
+
z.value = t.errors.map((e) => A(k.ai.chat[n[e.reason]], { name: e.name }));
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function Ze(e) {
|
|
275
275
|
let t = e.target;
|
|
276
276
|
!Y.value && H.value && U(Array.from(t.files ?? [])), t.value = "";
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
Y.value || (L.value.splice(e, 1),
|
|
278
|
+
function Qe(e) {
|
|
279
|
+
Y.value || (L.value.splice(e, 1), z.value = []);
|
|
280
280
|
}
|
|
281
281
|
function W(e) {
|
|
282
282
|
return Array.from(e.dataTransfer?.types ?? []).includes("Files");
|
|
283
283
|
}
|
|
284
|
-
function Qe(e) {
|
|
285
|
-
H.value && !Y.value && W(e) && (e.preventDefault(), B.value++);
|
|
286
|
-
}
|
|
287
284
|
function $e(e) {
|
|
288
|
-
W(e) && (
|
|
285
|
+
H.value && !Y.value && W(e) && (e.preventDefault(), V.value++);
|
|
289
286
|
}
|
|
290
287
|
function et(e) {
|
|
291
|
-
|
|
288
|
+
W(e) && (V.value = Math.max(0, V.value - 1));
|
|
292
289
|
}
|
|
293
290
|
function tt(e) {
|
|
294
|
-
|
|
291
|
+
H.value && W(e) && e.preventDefault();
|
|
292
|
+
}
|
|
293
|
+
function nt(e) {
|
|
294
|
+
V.value = 0, H.value && W(e) && (e.preventDefault(), Y.value || U(Array.from(e.dataTransfer?.files ?? [])));
|
|
295
295
|
}
|
|
296
|
-
e(() =>
|
|
297
|
-
H.value && e.length && (U(e), P.value.trim() || (P.value =
|
|
296
|
+
e(() => b.feature.importQueue.value, (e) => {
|
|
297
|
+
H.value && e.length && (U(e), P.value.trim() || (P.value = k.ai.import.prompt), b.feature.importQueue.value = [], a(() => F.value?.focus()));
|
|
298
298
|
}, { immediate: !0 });
|
|
299
|
-
let G = f(null), K = f(0), q = l(() =>
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
299
|
+
let G = f(null), K = f(0), q = l(() => b.feature.isTemplateEmpty.value ? [
|
|
300
|
+
k.ai.starters.emptyWelcome,
|
|
301
|
+
k.ai.starters.emptyLaunch,
|
|
302
|
+
k.ai.starters.emptyNewsletter
|
|
303
303
|
] : [
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
]), J = l(() =>
|
|
309
|
-
let e =
|
|
310
|
-
return e ?
|
|
311
|
-
}), { pause: Z, resume:
|
|
304
|
+
k.ai.starters.filledShorten,
|
|
305
|
+
k.ai.starters.filledFriendlier,
|
|
306
|
+
k.ai.starters.filledDates,
|
|
307
|
+
k.ai.starters.filledCta
|
|
308
|
+
]), J = l(() => b.feature.messages.value), Y = l(() => b.feature.isRunning.value), X = l(() => {
|
|
309
|
+
let e = b.feature.failure.value;
|
|
310
|
+
return e ? T(e.error, k.ai.errors, A, N, e.context) : "";
|
|
311
|
+
}), { pause: Z, resume: rt } = se(() => {
|
|
312
312
|
K.value < q.value.length ? K.value++ : Z();
|
|
313
|
-
}, 150, { immediate: !1 }), { start:
|
|
313
|
+
}, 150, { immediate: !1 }), { start: it } = oe(() => rt(), 100, { immediate: !1 });
|
|
314
314
|
e(() => q.value.length, (e) => {
|
|
315
|
-
Z(), K.value = 0, e > 0 &&
|
|
315
|
+
Z(), K.value = 0, e > 0 && it();
|
|
316
316
|
}, { immediate: !0 });
|
|
317
317
|
function Q() {
|
|
318
318
|
a(() => {
|
|
319
319
|
G.value && (G.value.scrollTop = G.value.scrollHeight);
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
|
-
e(() => J.value.length, Q), e(() => [
|
|
322
|
+
e(() => J.value.length, Q), e(() => [b.feature.failedPrompt.value, b.feature.failedAttachments.value], ([e, t]) => {
|
|
323
323
|
e && (P.value = e, L.value = [...t]);
|
|
324
324
|
}, { immediate: !0 });
|
|
325
325
|
async function $() {
|
|
326
326
|
let e = P.value.trim();
|
|
327
327
|
if (!e || Y.value) return;
|
|
328
328
|
let t = [...L.value];
|
|
329
|
-
P.value = "", L.value = [],
|
|
330
|
-
}
|
|
331
|
-
function it(e) {
|
|
332
|
-
return e.undone ? A.ai.chat.undone : e.operationCount === 1 ? A.ai.chat.appliedChange : j(A.ai.chat.appliedChanges, { count: e.operationCount });
|
|
329
|
+
P.value = "", L.value = [], z.value = [], Q(), await b.feature.send(e, t), Q();
|
|
333
330
|
}
|
|
334
331
|
function at(e) {
|
|
335
|
-
return e.
|
|
332
|
+
return e.undone ? k.ai.chat.undone : e.operationCount === 1 ? k.ai.chat.appliedChange : A(k.ai.chat.appliedChanges, { count: e.operationCount });
|
|
336
333
|
}
|
|
337
334
|
function ot(e) {
|
|
338
|
-
e.
|
|
335
|
+
return e.failure ? T(e.failure.error, k.ai.errors, A, N, e.failure.context) : "";
|
|
339
336
|
}
|
|
340
337
|
function st(e) {
|
|
341
|
-
|
|
338
|
+
e.undone ? b.feature.redoMessage(e.id) : b.feature.undoMessage(e.id);
|
|
342
339
|
}
|
|
343
340
|
function ct(e) {
|
|
341
|
+
Z(), P.value = e, $();
|
|
342
|
+
}
|
|
343
|
+
function lt(e) {
|
|
344
344
|
e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), $());
|
|
345
345
|
}
|
|
346
|
-
return (e, a) => (r(), _(
|
|
347
|
-
title: u(
|
|
348
|
-
subtitle: u(
|
|
346
|
+
return (e, a) => (r(), _(R, {
|
|
347
|
+
title: u(k).ai.chat.title,
|
|
348
|
+
subtitle: u(k).ai.chat.notice,
|
|
349
349
|
testid: "ai-panel-chat",
|
|
350
|
-
"close-label": u(
|
|
351
|
-
onClose: a[5] ||= (e) =>
|
|
352
|
-
onDragenter:
|
|
353
|
-
onDragleave:
|
|
354
|
-
onDragover:
|
|
355
|
-
onDrop:
|
|
350
|
+
"close-label": u(k).ai.chat.close,
|
|
351
|
+
onClose: a[5] ||= (e) => E("close"),
|
|
352
|
+
onDragenter: $e,
|
|
353
|
+
onDragleave: et,
|
|
354
|
+
onDragover: tt,
|
|
355
|
+
onDrop: nt
|
|
356
356
|
}, {
|
|
357
357
|
actions: s(() => [t.feature.canClear && J.value.length > 0 ? (r(), p("button", {
|
|
358
358
|
key: 0,
|
|
359
359
|
type: "button",
|
|
360
360
|
"data-testid": "ai-chat-new",
|
|
361
361
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)] tpl:disabled:opacity-40",
|
|
362
|
-
"aria-label": u(
|
|
363
|
-
title: u(
|
|
362
|
+
"aria-label": u(k).ai.chat.newChat,
|
|
363
|
+
title: u(k).ai.chat.newChat,
|
|
364
364
|
disabled: Y.value,
|
|
365
365
|
onClick: a[0] ||= (e) => t.feature.newChat()
|
|
366
|
-
}, [c(u(
|
|
366
|
+
}, [c(u(O), {
|
|
367
367
|
size: 14,
|
|
368
368
|
"stroke-width": 2,
|
|
369
369
|
"aria-hidden": "true"
|
|
370
|
-
})], 8,
|
|
371
|
-
footer: s(() => [h("div",
|
|
370
|
+
})], 8, _e)) : d("", !0)]),
|
|
371
|
+
footer: s(() => [h("div", Pe, [
|
|
372
372
|
H.value ? (r(), p(g, { key: 0 }, [
|
|
373
373
|
h("input", {
|
|
374
374
|
ref_key: "fileInput",
|
|
@@ -379,161 +379,161 @@ var ge = [
|
|
|
379
379
|
accept: "image/png,image/jpeg,image/webp,image/gif,application/pdf",
|
|
380
380
|
hidden: "",
|
|
381
381
|
disabled: Y.value,
|
|
382
|
-
onChange:
|
|
383
|
-
}, null, 40,
|
|
384
|
-
L.value.length ? (r(), p("div",
|
|
382
|
+
onChange: Ze
|
|
383
|
+
}, null, 40, Fe),
|
|
384
|
+
L.value.length ? (r(), p("div", B, [(r(!0), p(g, null, o(L.value, (e, t) => (r(), p("span", {
|
|
385
385
|
key: t,
|
|
386
386
|
"data-testid": "ai-chat-attachment",
|
|
387
387
|
class: "tpl:flex tpl:max-w-full tpl:items-center tpl:gap-1 tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
388
388
|
}, [
|
|
389
|
-
e.type === "application/pdf" ? (r(), _(u(
|
|
389
|
+
e.type === "application/pdf" ? (r(), _(u(D), {
|
|
390
390
|
key: 0,
|
|
391
391
|
size: 12,
|
|
392
392
|
"aria-hidden": "true"
|
|
393
|
-
})) : (r(), _(u(
|
|
393
|
+
})) : (r(), _(u(x), {
|
|
394
394
|
key: 1,
|
|
395
395
|
size: 12,
|
|
396
396
|
"aria-hidden": "true"
|
|
397
397
|
})),
|
|
398
|
-
h("span",
|
|
398
|
+
h("span", Ie, n(e.name), 1),
|
|
399
399
|
h("button", {
|
|
400
400
|
type: "button",
|
|
401
|
-
"aria-label": u(
|
|
401
|
+
"aria-label": u(A)(u(k).ai.chat.removeAttachment, { name: e.name }),
|
|
402
402
|
disabled: Y.value,
|
|
403
403
|
class: "tpl:shrink-0 tpl:rounded tpl:p-0.5 tpl:disabled:opacity-40",
|
|
404
|
-
onClick: (e) =>
|
|
405
|
-
}, [c(u(
|
|
404
|
+
onClick: (e) => Qe(t)
|
|
405
|
+
}, [c(u(S), {
|
|
406
406
|
size: 12,
|
|
407
407
|
"aria-hidden": "true"
|
|
408
|
-
})], 8,
|
|
408
|
+
})], 8, Le)
|
|
409
409
|
]))), 128))])) : d("", !0),
|
|
410
|
-
L.value.length ? (r(), p("p",
|
|
411
|
-
h("div",
|
|
410
|
+
L.value.length ? (r(), p("p", Re, n(u(k).ai.import.placeholderNote), 1)) : d("", !0),
|
|
411
|
+
h("div", ze, [(r(!0), p(g, null, o(z.value, (e, t) => (r(), p("p", {
|
|
412
412
|
key: t,
|
|
413
413
|
class: "tpl:mb-2"
|
|
414
414
|
}, n(e), 1))), 128))])
|
|
415
415
|
], 64)) : d("", !0),
|
|
416
|
-
t.feature.keptYourVersion.value ? (r(), p("div",
|
|
416
|
+
t.feature.keptYourVersion.value ? (r(), p("div", Be, [h("p", null, n(u(k).ai.chat.keptYourVersion), 1), h("button", {
|
|
417
417
|
type: "button",
|
|
418
418
|
disabled: Y.value,
|
|
419
|
-
class: i(u(
|
|
419
|
+
class: i(u(w)),
|
|
420
420
|
onClick: a[1] ||= (e) => t.feature.reloadTemplate()
|
|
421
|
-
}, n(u(
|
|
422
|
-
X.value ? (r(), p("div",
|
|
421
|
+
}, n(u(k).ai.chat.reload), 11, Ve)])) : d("", !0),
|
|
422
|
+
X.value ? (r(), p("div", He, [c(u(ne), {
|
|
423
423
|
size: 14,
|
|
424
424
|
"stroke-width": 2,
|
|
425
425
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
426
426
|
"aria-hidden": "true"
|
|
427
427
|
}), h("span", null, n(X.value), 1)])) : d("", !0),
|
|
428
|
-
h("div",
|
|
429
|
-
u(
|
|
428
|
+
h("div", Ue, [
|
|
429
|
+
u(j)?.activeLocale?.value ? (r(), p("p", We, n(u(A)(u(k).localization.aiActiveLanguage, { language: u(M)(u(j).activeLocale.value) })), 1)) : d("", !0),
|
|
430
430
|
ee(h("textarea", {
|
|
431
431
|
ref_key: "composer",
|
|
432
432
|
ref: F,
|
|
433
433
|
"onUpdate:modelValue": a[2] ||= (e) => P.value = e,
|
|
434
434
|
"data-testid": "ai-chat-input",
|
|
435
435
|
class: "tpl:max-h-32 tpl:min-h-[44px] tpl:w-full tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]",
|
|
436
|
-
placeholder: u(
|
|
437
|
-
"aria-label": u(
|
|
436
|
+
placeholder: u(k).ai.chat.inputPlaceholder,
|
|
437
|
+
"aria-label": u(k).ai.chat.inputPlaceholder,
|
|
438
438
|
disabled: Y.value,
|
|
439
439
|
maxlength: "4000",
|
|
440
440
|
rows: "3",
|
|
441
|
-
onKeydown:
|
|
442
|
-
}, null, 40,
|
|
443
|
-
h("div",
|
|
441
|
+
onKeydown: lt
|
|
442
|
+
}, null, 40, Ge), [[te, P.value]]),
|
|
443
|
+
h("div", Ke, [H.value ? (r(), p("button", {
|
|
444
444
|
key: 0,
|
|
445
445
|
type: "button",
|
|
446
|
-
"aria-label": u(
|
|
447
|
-
title: u(
|
|
446
|
+
"aria-label": u(k).ai.chat.attach,
|
|
447
|
+
title: u(k).ai.chat.attach,
|
|
448
448
|
disabled: Y.value,
|
|
449
449
|
class: "tpl:-ml-1.5 tpl:shrink-0 tpl:rounded-md tpl:p-1.5 tpl:text-[var(--tpl-text-muted)] tpl:disabled:opacity-40",
|
|
450
450
|
onClick: a[3] ||= (e) => I.value?.click()
|
|
451
|
-
}, [c(u(
|
|
451
|
+
}, [c(u(pe), {
|
|
452
452
|
size: 16,
|
|
453
453
|
"aria-hidden": "true"
|
|
454
|
-
})], 8,
|
|
454
|
+
})], 8, qe)) : d("", !0), Y.value ? (r(), p("button", {
|
|
455
455
|
key: 1,
|
|
456
456
|
type: "button",
|
|
457
457
|
"data-testid": "ai-chat-stop",
|
|
458
458
|
class: "tpl-ai-send-btn tpl:ml-auto tpl:-mr-1.5 tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:text-[var(--tpl-primary)]",
|
|
459
|
-
"aria-label": u(
|
|
460
|
-
title: u(
|
|
459
|
+
"aria-label": u(k).ai.chat.stop,
|
|
460
|
+
title: u(k).ai.chat.stop,
|
|
461
461
|
onClick: a[4] ||= (e) => t.feature.stop()
|
|
462
|
-
}, [c(u(
|
|
462
|
+
}, [c(u(ae), {
|
|
463
463
|
size: 16,
|
|
464
464
|
"stroke-width": 2,
|
|
465
465
|
"aria-hidden": "true"
|
|
466
|
-
})], 8,
|
|
466
|
+
})], 8, Je)) : (r(), p("button", {
|
|
467
467
|
key: 2,
|
|
468
468
|
type: "button",
|
|
469
469
|
"data-testid": "ai-chat-send",
|
|
470
470
|
class: "tpl-ai-send-btn tpl:ml-auto tpl:-mr-1.5 tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
471
|
-
"aria-label": u(
|
|
472
|
-
title: u(
|
|
471
|
+
"aria-label": u(k).ai.chat.send,
|
|
472
|
+
title: u(k).ai.chat.send,
|
|
473
473
|
disabled: !P.value.trim(),
|
|
474
474
|
onClick: $
|
|
475
|
-
}, [c(u(
|
|
475
|
+
}, [c(u(ie), {
|
|
476
476
|
size: 16,
|
|
477
477
|
"stroke-width": 2,
|
|
478
478
|
"aria-hidden": "true"
|
|
479
|
-
})], 8,
|
|
479
|
+
})], 8, Ye))])
|
|
480
480
|
]),
|
|
481
|
-
h("p",
|
|
481
|
+
h("p", Xe, n(u(k).ai.chat.disclaimer), 1)
|
|
482
482
|
])]),
|
|
483
483
|
default: s(() => [
|
|
484
|
-
H.value &&
|
|
484
|
+
H.value && V.value > 0 && !Y.value ? (r(), p("div", ve, n(u(k).ai.chat.dropHint), 1)) : d("", !0),
|
|
485
485
|
h("div", {
|
|
486
486
|
ref_key: "messagesContainer",
|
|
487
487
|
ref: G,
|
|
488
488
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
489
|
-
}, [t.feature.isLoadingHistory.value ? (r(), p("div",
|
|
489
|
+
}, [t.feature.isLoadingHistory.value ? (r(), p("div", ye, [c(u(re), {
|
|
490
490
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
491
491
|
size: 24,
|
|
492
492
|
"stroke-width": 2,
|
|
493
493
|
"aria-hidden": "true"
|
|
494
|
-
}), h("p",
|
|
494
|
+
}), h("p", be, n(u(k).ai.chat.loadingHistory), 1)])) : J.value.length === 0 ? (r(), p("div", xe, [c(u(C), {
|
|
495
495
|
size: 32,
|
|
496
496
|
"stroke-width": 1.5,
|
|
497
497
|
class: "tpl:text-[var(--tpl-text-dim)]",
|
|
498
498
|
"aria-hidden": "true"
|
|
499
|
-
}), h("p",
|
|
499
|
+
}), h("p", Se, n(u(k).ai.chat.placeholder), 1)])) : (r(), p("div", Ce, [(r(!0), p(g, null, o(J.value, (e) => (r(), p("div", {
|
|
500
500
|
key: e.id,
|
|
501
501
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
502
|
-
}, [typeof e.locale == "string" ? (r(), p("span",
|
|
502
|
+
}, [typeof e.locale == "string" ? (r(), p("span", we, n(u(M)(e.locale)), 1)) : d("", !0), e.role === "user" ? (r(), p("div", Te, [m(n(e.text) + " ", 1), (r(!0), p(g, null, o(e.attachments, (e, t) => (r(), p("span", {
|
|
503
503
|
key: t,
|
|
504
504
|
"data-testid": "ai-chat-history-attachment",
|
|
505
505
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:px-2 tpl:py-1 tpl:text-xs"
|
|
506
|
-
}, [e.kind === "pdf" ? (r(), _(u(
|
|
506
|
+
}, [e.kind === "pdf" ? (r(), _(u(D), {
|
|
507
507
|
key: 0,
|
|
508
508
|
size: 12,
|
|
509
509
|
"aria-hidden": "true"
|
|
510
|
-
})) : (r(), _(u(
|
|
510
|
+
})) : (r(), _(u(x), {
|
|
511
511
|
key: 1,
|
|
512
512
|
size: 12,
|
|
513
513
|
"aria-hidden": "true"
|
|
514
|
-
})), m(n(e.name), 1)]))), 128))])) : (r(), p("div",
|
|
515
|
-
e.text === "" && e.status === "streaming" ? (r(), _(
|
|
516
|
-
e.operationCount > 0 ? (r(), p("div",
|
|
514
|
+
})), m(n(e.name), 1)]))), 128))])) : (r(), p("div", Ee, [
|
|
515
|
+
e.text === "" && e.status === "streaming" ? (r(), _(ce, { key: 0 })) : e.text === "" ? d("", !0) : (r(), p("div", De, n(e.text), 1)),
|
|
516
|
+
e.operationCount > 0 ? (r(), p("div", Oe, [h("span", null, n(at(e)), 1), (e.undone ? e.canRedo : e.canUndo) ? (r(), p("button", {
|
|
517
517
|
key: 0,
|
|
518
518
|
type: "button",
|
|
519
519
|
"data-testid": "ai-chat-undo",
|
|
520
|
-
class: i(u(
|
|
520
|
+
class: i(u(w)),
|
|
521
521
|
disabled: Y.value,
|
|
522
|
-
onClick: (t) =>
|
|
523
|
-
}, [e.undone ? (r(), _(u(
|
|
522
|
+
onClick: (t) => st(e)
|
|
523
|
+
}, [e.undone ? (r(), _(u(me), {
|
|
524
524
|
key: 0,
|
|
525
525
|
size: 12,
|
|
526
526
|
"stroke-width": 2,
|
|
527
527
|
"aria-hidden": "true"
|
|
528
|
-
})) : (r(), _(u(
|
|
528
|
+
})) : (r(), _(u(he), {
|
|
529
529
|
key: 1,
|
|
530
530
|
size: 12,
|
|
531
531
|
"stroke-width": 2,
|
|
532
532
|
"aria-hidden": "true"
|
|
533
|
-
})), m(" " + n(e.undone ? u(
|
|
534
|
-
e.failure ? (r(), p("p",
|
|
533
|
+
})), m(" " + n(e.undone ? u(k).ai.chat.redo : u(k).ai.chat.undo), 1)], 10, ke)) : d("", !0)])) : d("", !0),
|
|
534
|
+
e.failure ? (r(), p("p", Ae, n(ot(e)), 1)) : d("", !0)
|
|
535
535
|
]))]))), 128))]))], 512),
|
|
536
|
-
J.value.length === 0 && q.value.length > 0 ? (r(), p("div",
|
|
536
|
+
J.value.length === 0 && q.value.length > 0 ? (r(), p("div", je, [h("div", Me, [(r(!0), p(g, null, o(q.value, (e, t) => (r(), p("button", {
|
|
537
537
|
key: t,
|
|
538
538
|
type: "button",
|
|
539
539
|
"data-testid": "ai-chat-starter",
|
|
@@ -544,8 +544,8 @@ var ge = [
|
|
|
544
544
|
"background-color": "var(--tpl-bg)",
|
|
545
545
|
"box-shadow": "var(--tpl-shadow)"
|
|
546
546
|
},
|
|
547
|
-
onClick: (t) =>
|
|
548
|
-
}, n(e), 11,
|
|
547
|
+
onClick: (t) => ct(e)
|
|
548
|
+
}, n(e), 11, Ne))), 128))])])) : d("", !0)
|
|
549
549
|
]),
|
|
550
550
|
_: 1
|
|
551
551
|
}, 8, [
|
|
@@ -554,5 +554,5 @@ var ge = [
|
|
|
554
554
|
"close-label"
|
|
555
555
|
]));
|
|
556
556
|
}
|
|
557
|
-
}), [["__scopeId", "data-v-
|
|
558
|
-
export {
|
|
557
|
+
}), [["__scopeId", "data-v-35cc75c0"]]);
|
|
558
|
+
export { V as default };
|