@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,19 +1,19 @@
|
|
|
1
|
-
import { C as e, F as t, G as n, H as r, K as i, L as a, O as o, R as s, _ as c, b as l, ct as u, dt as d, g as f, h as p, j as m, m as h, mt as g, o as
|
|
2
|
-
import { D as
|
|
1
|
+
import { C as e, F as t, G as n, H as r, K as i, L as a, O as o, R as s, _ as c, b as l, ct as u, dt as d, g as f, h as p, j as m, m as h, mt as g, o as ee, p as _, tt as v, u as y, x as b } from "./draggable-IRVFEZ-b.js";
|
|
2
|
+
import { D as x, Ft as te, K as ne, T as re, Tt as S, _t as C, at as ie, j as ae, t as w, tt as oe, u as T, z as se } from "./icons-DdVB-5WO.js";
|
|
3
3
|
import { _ as ce, g as le } from "./dist-BtWMy7UQ.js";
|
|
4
4
|
import { t as ue } from "./LoadingTrack-o-89hApJ.js";
|
|
5
5
|
import { t as de } from "./useI18n-DPg6rPbu.js";
|
|
6
6
|
import { w as E } from "./styleConstants-Br6CIRoS.js";
|
|
7
7
|
import { st as fe, v as pe } from "./keys-ywH4jHJ2.js";
|
|
8
|
-
import { t as
|
|
9
|
-
import { n as
|
|
10
|
-
import { t as
|
|
8
|
+
import { t as me } from "./useLanguageName-DDhdVpqh.js";
|
|
9
|
+
import { n as D } from "./aiErrors-C3QEMB0x.js";
|
|
10
|
+
import { t as O } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
11
11
|
// src/components/ai/AiPanelShell.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
12
|
+
var 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 = {
|
|
13
13
|
key: 0,
|
|
14
14
|
"data-testid": "ai-panel-subtitle",
|
|
15
15
|
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
16
|
-
},
|
|
16
|
+
}, 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" }, he = /* @__PURE__ */ e({
|
|
17
17
|
__name: "AiPanelShell",
|
|
18
18
|
props: {
|
|
19
19
|
title: {},
|
|
@@ -30,37 +30,37 @@ var A = ["aria-label", "data-testid"], j = { class: "tpl:flex tpl:items-start tp
|
|
|
30
30
|
"data-testid": e.testid,
|
|
31
31
|
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)]"
|
|
32
32
|
}, [
|
|
33
|
-
h("div",
|
|
33
|
+
h("div", A, [h("div", j, [h("div", M, [b(u(x), {
|
|
34
34
|
size: 13,
|
|
35
35
|
"stroke-width": 2,
|
|
36
36
|
"aria-hidden": "true"
|
|
37
|
-
}), h("span",
|
|
37
|
+
}), h("span", N, g(e.title), 1)]), e.subtitle ? (t(), c("p", P, g(e.subtitle), 1)) : f("", !0)]), h("div", F, [s(n.$slots, "actions"), h("button", {
|
|
38
38
|
type: "button",
|
|
39
39
|
"data-testid": "ai-panel-close",
|
|
40
40
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]",
|
|
41
41
|
"aria-label": e.closeLabel,
|
|
42
42
|
title: e.closeLabel,
|
|
43
43
|
onClick: i[0] ||= (e) => r("close")
|
|
44
|
-
}, [
|
|
44
|
+
}, [b(u(w), {
|
|
45
45
|
size: 14,
|
|
46
46
|
"stroke-width": 2,
|
|
47
47
|
"aria-hidden": "true"
|
|
48
|
-
})], 8,
|
|
49
|
-
h("div",
|
|
48
|
+
})], 8, I)])]),
|
|
49
|
+
h("div", L, [s(n.$slots, "default")]),
|
|
50
50
|
s(n.$slots, "footer")
|
|
51
|
-
], 8,
|
|
51
|
+
], 8, k));
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), R = /* @__PURE__ */ new Set([
|
|
54
54
|
"image/png",
|
|
55
55
|
"image/jpeg",
|
|
56
56
|
"image/webp",
|
|
57
57
|
"image/gif",
|
|
58
58
|
"application/pdf"
|
|
59
59
|
]);
|
|
60
|
-
function
|
|
60
|
+
function ge(e, t) {
|
|
61
61
|
let n = [...e], r = [], i = e.reduce((e, t) => e + t.size, 0);
|
|
62
62
|
for (let e of t) {
|
|
63
|
-
let t = n.length >= 4 ? "tooMany" :
|
|
63
|
+
let t = n.length >= 4 ? "tooMany" : R.has(e.type) ? e.size > 5242880 ? "tooLarge" : i + e.size > 10485760 ? "totalTooLarge" : null : "wrongType";
|
|
64
64
|
t ? r.push({
|
|
65
65
|
name: e.name,
|
|
66
66
|
reason: t
|
|
@@ -72,28 +72,28 @@ function he(e, t) {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
// src/components/ai/AiChatPanel.vue?vue&type=script&setup=true&lang.ts
|
|
75
|
-
var
|
|
75
|
+
var _e = [
|
|
76
76
|
"aria-label",
|
|
77
77
|
"title",
|
|
78
78
|
"disabled"
|
|
79
|
-
],
|
|
79
|
+
], ve = {
|
|
80
80
|
key: 0,
|
|
81
81
|
"data-testid": "ai-chat-drop-hint",
|
|
82
82
|
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"
|
|
83
|
-
},
|
|
83
|
+
}, ye = {
|
|
84
84
|
key: 0,
|
|
85
85
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
86
|
-
},
|
|
86
|
+
}, be = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, xe = {
|
|
87
87
|
key: 1,
|
|
88
88
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
89
|
-
},
|
|
89
|
+
}, Se = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ce = {
|
|
90
90
|
key: 2,
|
|
91
91
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
92
|
-
},
|
|
92
|
+
}, we = {
|
|
93
93
|
key: 0,
|
|
94
94
|
"data-testid": "ai-chat-language",
|
|
95
95
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
96
|
-
},
|
|
96
|
+
}, Te = {
|
|
97
97
|
key: 1,
|
|
98
98
|
"data-testid": "ai-chat-prompt",
|
|
99
99
|
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",
|
|
@@ -103,10 +103,10 @@ var ge = [
|
|
|
103
103
|
"max-width": "85%",
|
|
104
104
|
"box-shadow": "var(--tpl-shadow)"
|
|
105
105
|
}
|
|
106
|
-
},
|
|
106
|
+
}, Ee = {
|
|
107
107
|
key: 2,
|
|
108
108
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
109
|
-
},
|
|
109
|
+
}, De = {
|
|
110
110
|
key: 1,
|
|
111
111
|
"data-testid": "ai-chat-reply",
|
|
112
112
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
@@ -116,40 +116,40 @@ var ge = [
|
|
|
116
116
|
color: "var(--tpl-text)",
|
|
117
117
|
"box-shadow": "var(--tpl-shadow)"
|
|
118
118
|
}
|
|
119
|
-
},
|
|
119
|
+
}, Oe = {
|
|
120
120
|
key: 2,
|
|
121
121
|
"data-testid": "ai-chat-applied",
|
|
122
122
|
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
123
|
-
},
|
|
123
|
+
}, ke = ["disabled", "onClick"], Ae = {
|
|
124
124
|
key: 3,
|
|
125
125
|
role: "alert",
|
|
126
126
|
"data-testid": "ai-chat-item-error",
|
|
127
127
|
class: "tpl:m-0 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
128
|
-
},
|
|
128
|
+
}, je = {
|
|
129
129
|
key: 1,
|
|
130
130
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
131
131
|
style: {
|
|
132
132
|
"background-color": "color-mix(in srgb, var(--tpl-bg) 50%, transparent)",
|
|
133
133
|
"backdrop-filter": "blur(2px)"
|
|
134
134
|
}
|
|
135
|
-
},
|
|
135
|
+
}, 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"], Ie = {
|
|
136
136
|
key: 0,
|
|
137
137
|
class: "tpl:mb-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
138
|
-
},
|
|
138
|
+
}, z = { class: "tpl:truncate" }, Le = [
|
|
139
139
|
"aria-label",
|
|
140
140
|
"disabled",
|
|
141
141
|
"onClick"
|
|
142
|
-
],
|
|
142
|
+
], Re = {
|
|
143
143
|
key: 1,
|
|
144
144
|
class: "tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
145
|
-
},
|
|
145
|
+
}, ze = {
|
|
146
146
|
"aria-live": "polite",
|
|
147
147
|
class: "tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
148
|
-
},
|
|
148
|
+
}, Be = {
|
|
149
149
|
key: 1,
|
|
150
150
|
role: "status",
|
|
151
151
|
class: "tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
152
|
-
},
|
|
152
|
+
}, Ve = ["disabled"], He = {
|
|
153
153
|
key: 2,
|
|
154
154
|
role: "alert",
|
|
155
155
|
"data-testid": "ai-chat-error",
|
|
@@ -158,34 +158,34 @@ var ge = [
|
|
|
158
158
|
"background-color": "var(--tpl-danger-light)",
|
|
159
159
|
color: "var(--tpl-danger)"
|
|
160
160
|
}
|
|
161
|
-
},
|
|
161
|
+
}, 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 = {
|
|
162
162
|
key: 0,
|
|
163
163
|
"data-testid": "ai-active-language",
|
|
164
164
|
class: "tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
165
|
-
},
|
|
165
|
+
}, Ge = [
|
|
166
166
|
"placeholder",
|
|
167
167
|
"aria-label",
|
|
168
168
|
"disabled"
|
|
169
|
-
],
|
|
169
|
+
], Ke = { class: "tpl:flex tpl:items-center tpl:justify-between" }, qe = [
|
|
170
170
|
"aria-label",
|
|
171
171
|
"title",
|
|
172
172
|
"disabled"
|
|
173
|
-
],
|
|
173
|
+
], Je = ["aria-label", "title"], Ye = [
|
|
174
174
|
"aria-label",
|
|
175
175
|
"title",
|
|
176
176
|
"disabled"
|
|
177
|
-
],
|
|
177
|
+
], Xe = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, B = /*#__PURE__*/ O(/* @__PURE__ */ e({
|
|
178
178
|
__name: "AiChatPanel",
|
|
179
179
|
props: { feature: {} },
|
|
180
180
|
emits: ["close"],
|
|
181
181
|
setup(e, { emit: s }) {
|
|
182
|
-
let
|
|
183
|
-
r(() =>
|
|
184
|
-
F.value = "", R.value = [],
|
|
182
|
+
let O = e, k = s, { t: A, format: j } = de(), M = o(pe, null), N = me(M), P = o(fe, void 0), F = v(""), I = v(null), L = v(null), R = v([]), B = v([]), V = v(0);
|
|
183
|
+
r(() => O.feature.templateSession.value, () => {
|
|
184
|
+
F.value = "", R.value = [], B.value = [], V.value = 0;
|
|
185
185
|
}, { flush: "sync" });
|
|
186
|
-
let H =
|
|
186
|
+
let H = _(() => O.feature.has("chatAttachments"));
|
|
187
187
|
function U(e) {
|
|
188
|
-
let t =
|
|
188
|
+
let t = ge(R.value, e);
|
|
189
189
|
R.value = t.accepted;
|
|
190
190
|
let n = {
|
|
191
191
|
tooMany: "attachTooMany",
|
|
@@ -193,107 +193,107 @@ var ge = [
|
|
|
193
193
|
totalTooLarge: "attachTotalTooLarge",
|
|
194
194
|
wrongType: "attachWrongType"
|
|
195
195
|
};
|
|
196
|
-
|
|
196
|
+
B.value = t.errors.map((e) => j(A.ai.chat[n[e.reason]], { name: e.name }));
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function Ze(e) {
|
|
199
199
|
let t = e.target;
|
|
200
200
|
!Y.value && H.value && U(Array.from(t.files ?? [])), t.value = "";
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
Y.value || (R.value.splice(e, 1),
|
|
202
|
+
function Qe(e) {
|
|
203
|
+
Y.value || (R.value.splice(e, 1), B.value = []);
|
|
204
204
|
}
|
|
205
205
|
function W(e) {
|
|
206
206
|
return Array.from(e.dataTransfer?.types ?? []).includes("Files");
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function $e(e) {
|
|
209
209
|
H.value && !Y.value && W(e) && (e.preventDefault(), V.value++);
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function et(e) {
|
|
212
212
|
W(e) && (V.value = Math.max(0, V.value - 1));
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function tt(e) {
|
|
215
215
|
H.value && W(e) && e.preventDefault();
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function nt(e) {
|
|
218
218
|
V.value = 0, H.value && W(e) && (e.preventDefault(), Y.value || U(Array.from(e.dataTransfer?.files ?? [])));
|
|
219
219
|
}
|
|
220
|
-
r(() =>
|
|
221
|
-
H.value && e.length && (U(e), F.value.trim() || (F.value =
|
|
220
|
+
r(() => O.feature.importQueue.value, (e) => {
|
|
221
|
+
H.value && e.length && (U(e), F.value.trim() || (F.value = A.ai.import.prompt), O.feature.importQueue.value = [], m(() => I.value?.focus()));
|
|
222
222
|
}, { immediate: !0 });
|
|
223
|
-
let G =
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
223
|
+
let G = v(null), K = v(0), q = _(() => O.feature.isTemplateEmpty.value ? [
|
|
224
|
+
A.ai.starters.emptyWelcome,
|
|
225
|
+
A.ai.starters.emptyLaunch,
|
|
226
|
+
A.ai.starters.emptyNewsletter
|
|
227
227
|
] : [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
]), J =
|
|
233
|
-
let e =
|
|
234
|
-
return e ?
|
|
235
|
-
}), { pause: Z, resume:
|
|
228
|
+
A.ai.starters.filledShorten,
|
|
229
|
+
A.ai.starters.filledFriendlier,
|
|
230
|
+
A.ai.starters.filledDates,
|
|
231
|
+
A.ai.starters.filledCta
|
|
232
|
+
]), J = _(() => O.feature.messages.value), Y = _(() => O.feature.isRunning.value), X = _(() => {
|
|
233
|
+
let e = O.feature.failure.value;
|
|
234
|
+
return e ? D(e.error, A.ai.errors, j, P, e.context) : "";
|
|
235
|
+
}), { pause: Z, resume: rt } = le(() => {
|
|
236
236
|
K.value < q.value.length ? K.value++ : Z();
|
|
237
|
-
}, 150, { immediate: !1 }), { start:
|
|
237
|
+
}, 150, { immediate: !1 }), { start: it } = ce(() => rt(), 100, { immediate: !1 });
|
|
238
238
|
r(() => q.value.length, (e) => {
|
|
239
|
-
Z(), K.value = 0, e > 0 &&
|
|
239
|
+
Z(), K.value = 0, e > 0 && it();
|
|
240
240
|
}, { immediate: !0 });
|
|
241
241
|
function Q() {
|
|
242
242
|
m(() => {
|
|
243
243
|
G.value && (G.value.scrollTop = G.value.scrollHeight);
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
r(() => J.value.length, Q), r(() => [
|
|
246
|
+
r(() => J.value.length, Q), r(() => [O.feature.failedPrompt.value, O.feature.failedAttachments.value], ([e, t]) => {
|
|
247
247
|
e && (F.value = e, R.value = [...t]);
|
|
248
248
|
}, { immediate: !0 });
|
|
249
249
|
async function $() {
|
|
250
250
|
let e = F.value.trim();
|
|
251
251
|
if (!e || Y.value) return;
|
|
252
252
|
let t = [...R.value];
|
|
253
|
-
F.value = "", R.value = [],
|
|
254
|
-
}
|
|
255
|
-
function it(e) {
|
|
256
|
-
return e.undone ? j.ai.chat.undone : e.operationCount === 1 ? j.ai.chat.appliedChange : M(j.ai.chat.appliedChanges, { count: e.operationCount });
|
|
253
|
+
F.value = "", R.value = [], B.value = [], Q(), await O.feature.send(e, t), Q();
|
|
257
254
|
}
|
|
258
255
|
function at(e) {
|
|
259
|
-
return e.
|
|
256
|
+
return e.undone ? A.ai.chat.undone : e.operationCount === 1 ? A.ai.chat.appliedChange : j(A.ai.chat.appliedChanges, { count: e.operationCount });
|
|
260
257
|
}
|
|
261
258
|
function ot(e) {
|
|
262
|
-
e.
|
|
259
|
+
return e.failure ? D(e.failure.error, A.ai.errors, j, P, e.failure.context) : "";
|
|
263
260
|
}
|
|
264
261
|
function st(e) {
|
|
265
|
-
|
|
262
|
+
e.undone ? O.feature.redoMessage(e.id) : O.feature.undoMessage(e.id);
|
|
266
263
|
}
|
|
267
264
|
function ct(e) {
|
|
265
|
+
Z(), F.value = e, $();
|
|
266
|
+
}
|
|
267
|
+
function lt(e) {
|
|
268
268
|
e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), $());
|
|
269
269
|
}
|
|
270
|
-
return (r, o) => (t(), p(
|
|
271
|
-
title: u(
|
|
272
|
-
subtitle: u(
|
|
270
|
+
return (r, o) => (t(), p(he, {
|
|
271
|
+
title: u(A).ai.chat.title,
|
|
272
|
+
subtitle: u(A).ai.chat.notice,
|
|
273
273
|
testid: "ai-panel-chat",
|
|
274
|
-
"close-label": u(
|
|
275
|
-
onClose: o[5] ||= (e) =>
|
|
276
|
-
onDragenter:
|
|
277
|
-
onDragleave:
|
|
278
|
-
onDragover:
|
|
279
|
-
onDrop:
|
|
274
|
+
"close-label": u(A).ai.chat.close,
|
|
275
|
+
onClose: o[5] ||= (e) => k("close"),
|
|
276
|
+
onDragenter: $e,
|
|
277
|
+
onDragleave: et,
|
|
278
|
+
onDragover: tt,
|
|
279
|
+
onDrop: nt
|
|
280
280
|
}, {
|
|
281
281
|
actions: n(() => [e.feature.canClear && J.value.length > 0 ? (t(), c("button", {
|
|
282
282
|
key: 0,
|
|
283
283
|
type: "button",
|
|
284
284
|
"data-testid": "ai-chat-new",
|
|
285
285
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)] tpl:disabled:opacity-40",
|
|
286
|
-
"aria-label": u(
|
|
287
|
-
title: u(
|
|
286
|
+
"aria-label": u(A).ai.chat.newChat,
|
|
287
|
+
title: u(A).ai.chat.newChat,
|
|
288
288
|
disabled: Y.value,
|
|
289
289
|
onClick: o[0] ||= (t) => e.feature.newChat()
|
|
290
|
-
}, [
|
|
290
|
+
}, [b(u(oe), {
|
|
291
291
|
size: 14,
|
|
292
292
|
"stroke-width": 2,
|
|
293
293
|
"aria-hidden": "true"
|
|
294
|
-
})], 8,
|
|
295
|
-
footer: n(() => [h("div",
|
|
296
|
-
H.value ? (t(), c(
|
|
294
|
+
})], 8, _e)) : f("", !0)]),
|
|
295
|
+
footer: n(() => [h("div", Pe, [
|
|
296
|
+
H.value ? (t(), c(y, { key: 0 }, [
|
|
297
297
|
h("input", {
|
|
298
298
|
ref_key: "fileInput",
|
|
299
299
|
ref: L,
|
|
@@ -303,161 +303,161 @@ var ge = [
|
|
|
303
303
|
accept: "image/png,image/jpeg,image/webp,image/gif,application/pdf",
|
|
304
304
|
hidden: "",
|
|
305
305
|
disabled: Y.value,
|
|
306
|
-
onChange:
|
|
307
|
-
}, null, 40,
|
|
308
|
-
R.value.length ? (t(), c("div",
|
|
306
|
+
onChange: Ze
|
|
307
|
+
}, null, 40, Fe),
|
|
308
|
+
R.value.length ? (t(), c("div", Ie, [(t(!0), c(y, null, a(R.value, (e, n) => (t(), c("span", {
|
|
309
309
|
key: n,
|
|
310
310
|
"data-testid": "ai-chat-attachment",
|
|
311
311
|
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)]"
|
|
312
312
|
}, [
|
|
313
|
-
e.type === "application/pdf" ? (t(), p(u(
|
|
313
|
+
e.type === "application/pdf" ? (t(), p(u(S), {
|
|
314
314
|
key: 0,
|
|
315
315
|
size: 12,
|
|
316
316
|
"aria-hidden": "true"
|
|
317
|
-
})) : (t(), p(u(
|
|
317
|
+
})) : (t(), p(u(C), {
|
|
318
318
|
key: 1,
|
|
319
319
|
size: 12,
|
|
320
320
|
"aria-hidden": "true"
|
|
321
321
|
})),
|
|
322
|
-
h("span",
|
|
322
|
+
h("span", z, g(e.name), 1),
|
|
323
323
|
h("button", {
|
|
324
324
|
type: "button",
|
|
325
|
-
"aria-label": u(
|
|
325
|
+
"aria-label": u(j)(u(A).ai.chat.removeAttachment, { name: e.name }),
|
|
326
326
|
disabled: Y.value,
|
|
327
327
|
class: "tpl:shrink-0 tpl:rounded tpl:p-0.5 tpl:disabled:opacity-40",
|
|
328
|
-
onClick: (e) =>
|
|
329
|
-
}, [
|
|
328
|
+
onClick: (e) => Qe(n)
|
|
329
|
+
}, [b(u(w), {
|
|
330
330
|
size: 12,
|
|
331
331
|
"aria-hidden": "true"
|
|
332
|
-
})], 8,
|
|
332
|
+
})], 8, Le)
|
|
333
333
|
]))), 128))])) : f("", !0),
|
|
334
|
-
R.value.length ? (t(), c("p",
|
|
335
|
-
h("div",
|
|
334
|
+
R.value.length ? (t(), c("p", Re, g(u(A).ai.import.placeholderNote), 1)) : f("", !0),
|
|
335
|
+
h("div", ze, [(t(!0), c(y, null, a(B.value, (e, n) => (t(), c("p", {
|
|
336
336
|
key: n,
|
|
337
337
|
class: "tpl:mb-2"
|
|
338
338
|
}, g(e), 1))), 128))])
|
|
339
339
|
], 64)) : f("", !0),
|
|
340
|
-
e.feature.keptYourVersion.value ? (t(), c("div",
|
|
340
|
+
e.feature.keptYourVersion.value ? (t(), c("div", Be, [h("p", null, g(u(A).ai.chat.keptYourVersion), 1), h("button", {
|
|
341
341
|
type: "button",
|
|
342
342
|
disabled: Y.value,
|
|
343
343
|
class: d(u(E)),
|
|
344
344
|
onClick: o[1] ||= (t) => e.feature.reloadTemplate()
|
|
345
|
-
}, g(u(
|
|
346
|
-
X.value ? (t(), c("div",
|
|
345
|
+
}, g(u(A).ai.chat.reload), 11, Ve)])) : f("", !0),
|
|
346
|
+
X.value ? (t(), c("div", He, [b(u(te), {
|
|
347
347
|
size: 14,
|
|
348
348
|
"stroke-width": 2,
|
|
349
349
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
350
350
|
"aria-hidden": "true"
|
|
351
351
|
}), h("span", null, g(X.value), 1)])) : f("", !0),
|
|
352
|
-
h("div",
|
|
353
|
-
u(
|
|
352
|
+
h("div", Ue, [
|
|
353
|
+
u(M)?.activeLocale?.value ? (t(), c("p", We, g(u(j)(u(A).localization.aiActiveLanguage, { language: u(N)(u(M).activeLocale.value) })), 1)) : f("", !0),
|
|
354
354
|
i(h("textarea", {
|
|
355
355
|
ref_key: "composer",
|
|
356
356
|
ref: I,
|
|
357
357
|
"onUpdate:modelValue": o[2] ||= (e) => F.value = e,
|
|
358
358
|
"data-testid": "ai-chat-input",
|
|
359
359
|
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)]",
|
|
360
|
-
placeholder: u(
|
|
361
|
-
"aria-label": u(
|
|
360
|
+
placeholder: u(A).ai.chat.inputPlaceholder,
|
|
361
|
+
"aria-label": u(A).ai.chat.inputPlaceholder,
|
|
362
362
|
disabled: Y.value,
|
|
363
363
|
maxlength: "4000",
|
|
364
364
|
rows: "3",
|
|
365
|
-
onKeydown:
|
|
366
|
-
}, null, 40,
|
|
367
|
-
h("div",
|
|
365
|
+
onKeydown: lt
|
|
366
|
+
}, null, 40, Ge), [[ee, F.value]]),
|
|
367
|
+
h("div", Ke, [H.value ? (t(), c("button", {
|
|
368
368
|
key: 0,
|
|
369
369
|
type: "button",
|
|
370
|
-
"aria-label": u(
|
|
371
|
-
title: u(
|
|
370
|
+
"aria-label": u(A).ai.chat.attach,
|
|
371
|
+
title: u(A).ai.chat.attach,
|
|
372
372
|
disabled: Y.value,
|
|
373
373
|
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",
|
|
374
374
|
onClick: o[3] ||= (e) => L.value?.click()
|
|
375
|
-
}, [
|
|
375
|
+
}, [b(u(ne), {
|
|
376
376
|
size: 16,
|
|
377
377
|
"aria-hidden": "true"
|
|
378
|
-
})], 8,
|
|
378
|
+
})], 8, qe)) : f("", !0), Y.value ? (t(), c("button", {
|
|
379
379
|
key: 1,
|
|
380
380
|
type: "button",
|
|
381
381
|
"data-testid": "ai-chat-stop",
|
|
382
382
|
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)]",
|
|
383
|
-
"aria-label": u(
|
|
384
|
-
title: u(
|
|
383
|
+
"aria-label": u(A).ai.chat.stop,
|
|
384
|
+
title: u(A).ai.chat.stop,
|
|
385
385
|
onClick: o[4] ||= (t) => e.feature.stop()
|
|
386
|
-
}, [
|
|
386
|
+
}, [b(u(re), {
|
|
387
387
|
size: 16,
|
|
388
388
|
"stroke-width": 2,
|
|
389
389
|
"aria-hidden": "true"
|
|
390
|
-
})], 8,
|
|
390
|
+
})], 8, Je)) : (t(), c("button", {
|
|
391
391
|
key: 2,
|
|
392
392
|
type: "button",
|
|
393
393
|
"data-testid": "ai-chat-send",
|
|
394
394
|
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)]",
|
|
395
|
-
"aria-label": u(
|
|
396
|
-
title: u(
|
|
395
|
+
"aria-label": u(A).ai.chat.send,
|
|
396
|
+
title: u(A).ai.chat.send,
|
|
397
397
|
disabled: !F.value.trim(),
|
|
398
398
|
onClick: $
|
|
399
|
-
}, [
|
|
399
|
+
}, [b(u(ae), {
|
|
400
400
|
size: 16,
|
|
401
401
|
"stroke-width": 2,
|
|
402
402
|
"aria-hidden": "true"
|
|
403
|
-
})], 8,
|
|
403
|
+
})], 8, Ye))])
|
|
404
404
|
]),
|
|
405
|
-
h("p",
|
|
405
|
+
h("p", Xe, g(u(A).ai.chat.disclaimer), 1)
|
|
406
406
|
])]),
|
|
407
407
|
default: n(() => [
|
|
408
|
-
H.value && V.value > 0 && !Y.value ? (t(), c("div",
|
|
408
|
+
H.value && V.value > 0 && !Y.value ? (t(), c("div", ve, g(u(A).ai.chat.dropHint), 1)) : f("", !0),
|
|
409
409
|
h("div", {
|
|
410
410
|
ref_key: "messagesContainer",
|
|
411
411
|
ref: G,
|
|
412
412
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
413
|
-
}, [e.feature.isLoadingHistory.value ? (t(), c("div",
|
|
413
|
+
}, [e.feature.isLoadingHistory.value ? (t(), c("div", ye, [b(u(ie), {
|
|
414
414
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
415
415
|
size: 24,
|
|
416
416
|
"stroke-width": 2,
|
|
417
417
|
"aria-hidden": "true"
|
|
418
|
-
}), h("p",
|
|
418
|
+
}), h("p", be, g(u(A).ai.chat.loadingHistory), 1)])) : J.value.length === 0 ? (t(), c("div", xe, [b(u(x), {
|
|
419
419
|
size: 32,
|
|
420
420
|
"stroke-width": 1.5,
|
|
421
421
|
class: "tpl:text-[var(--tpl-text-dim)]",
|
|
422
422
|
"aria-hidden": "true"
|
|
423
|
-
}), h("p",
|
|
423
|
+
}), h("p", Se, g(u(A).ai.chat.placeholder), 1)])) : (t(), c("div", Ce, [(t(!0), c(y, null, a(J.value, (e) => (t(), c("div", {
|
|
424
424
|
key: e.id,
|
|
425
425
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
426
|
-
}, [typeof e.locale == "string" ? (t(), c("span",
|
|
426
|
+
}, [typeof e.locale == "string" ? (t(), c("span", we, g(u(N)(e.locale)), 1)) : f("", !0), e.role === "user" ? (t(), c("div", Te, [l(g(e.text) + " ", 1), (t(!0), c(y, null, a(e.attachments, (e, n) => (t(), c("span", {
|
|
427
427
|
key: n,
|
|
428
428
|
"data-testid": "ai-chat-history-attachment",
|
|
429
429
|
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"
|
|
430
|
-
}, [e.kind === "pdf" ? (t(), p(u(
|
|
430
|
+
}, [e.kind === "pdf" ? (t(), p(u(S), {
|
|
431
431
|
key: 0,
|
|
432
432
|
size: 12,
|
|
433
433
|
"aria-hidden": "true"
|
|
434
|
-
})) : (t(), p(u(
|
|
434
|
+
})) : (t(), p(u(C), {
|
|
435
435
|
key: 1,
|
|
436
436
|
size: 12,
|
|
437
437
|
"aria-hidden": "true"
|
|
438
|
-
})), l(g(e.name), 1)]))), 128))])) : (t(), c("div",
|
|
439
|
-
e.text === "" && e.status === "streaming" ? (t(), p(ue, { key: 0 })) : e.text === "" ? f("", !0) : (t(), c("div",
|
|
440
|
-
e.operationCount > 0 ? (t(), c("div",
|
|
438
|
+
})), l(g(e.name), 1)]))), 128))])) : (t(), c("div", Ee, [
|
|
439
|
+
e.text === "" && e.status === "streaming" ? (t(), p(ue, { key: 0 })) : e.text === "" ? f("", !0) : (t(), c("div", De, g(e.text), 1)),
|
|
440
|
+
e.operationCount > 0 ? (t(), c("div", Oe, [h("span", null, g(at(e)), 1), (e.undone ? e.canRedo : e.canUndo) ? (t(), c("button", {
|
|
441
441
|
key: 0,
|
|
442
442
|
type: "button",
|
|
443
443
|
"data-testid": "ai-chat-undo",
|
|
444
444
|
class: d(u(E)),
|
|
445
445
|
disabled: Y.value,
|
|
446
|
-
onClick: (t) =>
|
|
446
|
+
onClick: (t) => st(e)
|
|
447
447
|
}, [e.undone ? (t(), p(u(se), {
|
|
448
448
|
key: 0,
|
|
449
449
|
size: 12,
|
|
450
450
|
"stroke-width": 2,
|
|
451
451
|
"aria-hidden": "true"
|
|
452
|
-
})) : (t(), p(u(
|
|
452
|
+
})) : (t(), p(u(T), {
|
|
453
453
|
key: 1,
|
|
454
454
|
size: 12,
|
|
455
455
|
"stroke-width": 2,
|
|
456
456
|
"aria-hidden": "true"
|
|
457
|
-
})), l(" " + g(e.undone ? u(
|
|
458
|
-
e.failure ? (t(), c("p",
|
|
457
|
+
})), l(" " + g(e.undone ? u(A).ai.chat.redo : u(A).ai.chat.undo), 1)], 10, ke)) : f("", !0)])) : f("", !0),
|
|
458
|
+
e.failure ? (t(), c("p", Ae, g(ot(e)), 1)) : f("", !0)
|
|
459
459
|
]))]))), 128))]))], 512),
|
|
460
|
-
J.value.length === 0 && q.value.length > 0 ? (t(), c("div",
|
|
460
|
+
J.value.length === 0 && q.value.length > 0 ? (t(), c("div", je, [h("div", Me, [(t(!0), c(y, null, a(q.value, (e, n) => (t(), c("button", {
|
|
461
461
|
key: n,
|
|
462
462
|
type: "button",
|
|
463
463
|
"data-testid": "ai-chat-starter",
|
|
@@ -468,8 +468,8 @@ var ge = [
|
|
|
468
468
|
"background-color": "var(--tpl-bg)",
|
|
469
469
|
"box-shadow": "var(--tpl-shadow)"
|
|
470
470
|
},
|
|
471
|
-
onClick: (t) =>
|
|
472
|
-
}, g(e), 11,
|
|
471
|
+
onClick: (t) => ct(e)
|
|
472
|
+
}, g(e), 11, Ne))), 128))])])) : f("", !0)
|
|
473
473
|
]),
|
|
474
474
|
_: 1
|
|
475
475
|
}, 8, [
|
|
@@ -478,7 +478,7 @@ var ge = [
|
|
|
478
478
|
"close-label"
|
|
479
479
|
]));
|
|
480
480
|
}
|
|
481
|
-
}), [["__scopeId", "data-v-
|
|
482
|
-
export {
|
|
481
|
+
}), [["__scopeId", "data-v-35cc75c0"]]);
|
|
482
|
+
export { B as default };
|
|
483
483
|
|
|
484
|
-
//# sourceMappingURL=AiChatPanel-
|
|
484
|
+
//# sourceMappingURL=AiChatPanel-BYAsgmoC.js.map
|