@aswin.dev/editor 0.7.1 → 0.7.3
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/LICENSE +56 -0
- package/dist/{AiChatSidebar-DWGPVtvC.js → AiChatSidebar-Dt5pvG5t.js} +37 -51
- package/dist/{AiFeatureMenu-duUFSfDf.js → AiFeatureMenu-BipxcGap.js} +1 -1
- package/dist/{CloudEditor-CFldoCOb.js → CloudEditor-CnUX0IOW.js} +283 -239
- package/dist/{CollaboratorBar-Bw-lbt61.js → CollaboratorBar-NaaZTjbs.js} +2 -2
- package/dist/{CommentsSidebar-BaD5F53-.js → CommentsSidebar-DE6ZsM4D.js} +9 -10
- package/dist/CountdownBlock-Ba3T-i2X.js +1536 -0
- package/dist/{CountdownToolbar-Dg4F8MTk.js → CountdownToolbar-CbhSp_uq.js} +1 -1
- package/dist/{DesignReferenceSidebar-BSH7uNP_.js → DesignReferenceSidebar-CZg97bbj.js} +1 -1
- package/dist/{ModuleBrowserModal-6phxZSKI.js → ModuleBrowserModal-D2EVdexc.js} +4 -4
- package/dist/{ModulePreviewCanvas-BW8L3eQX.js → ModulePreviewCanvas-P3N-nxkU.js} +52 -47
- package/dist/{NumberWithSuffix-BpUzQOJt.js → NumberWithSuffix-CihczoAd.js} +1 -1
- package/dist/{ParagraphEditor-DNSzAB-I.js → ParagraphEditor-BbRuKhWv.js} +7 -7
- package/dist/{SaveModuleDialog-zMQTpez7.js → SaveModuleDialog-DLZa3m3O.js} +2 -2
- package/dist/{SnapshotHistory-Do-A5rYU.js → SnapshotHistory-Csg1_jXi.js} +3 -3
- package/dist/{TestEmailModal-DGj_9V1u.js → TestEmailModal-m3okLbJz.js} +2 -2
- package/dist/{TitleEditor-C7IDnAoS.js → TitleEditor-CtJIS5ER.js} +2 -2
- package/dist/{TplModal-BAsVzcTb.js → TplModal-CQCrKeKP.js} +1 -1
- package/dist/{blockTypeIcons-C6LDKvmd.js → blockTypeIcons-Dah0pgt-.js} +50 -19
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/AccessibilityPanel-Bt_fD7QT.js +97 -0
- package/dist/cdn/chunks/AccessibilityPanel-Bt_fD7QT.js.map +1 -0
- package/dist/cdn/chunks/AiFeatureMenu-Bn-0rgfr.js +59 -0
- package/dist/cdn/chunks/AiFeatureMenu-Bn-0rgfr.js.map +1 -0
- package/dist/cdn/chunks/BlockA11yBadge-Cj18Iw0p.js +33 -0
- package/dist/cdn/chunks/BlockA11yBadge-Cj18Iw0p.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-56lVcdot.js +1220 -0
- package/dist/cdn/chunks/CloudEditor-56lVcdot.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-B7DCV3xp.js +51 -0
- package/dist/cdn/chunks/CollaboratorBar-B7DCV3xp.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js.map +1 -0
- package/dist/cdn/chunks/ModuleBrowserModal-CiIY7ZGv.js +195 -0
- package/dist/cdn/chunks/ModuleBrowserModal-CiIY7ZGv.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-M7_OGV2m.js +113 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-M7_OGV2m.js.map +1 -0
- package/dist/cdn/chunks/NumberWithSuffix-DfVBnsgc.js +423 -0
- package/dist/cdn/chunks/NumberWithSuffix-DfVBnsgc.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-1XJOpiLX.js +544 -0
- package/dist/cdn/chunks/ParagraphEditor-1XJOpiLX.js.map +1 -0
- package/dist/cdn/chunks/RichTextEditorContent-C2q8sbp2.js +106 -0
- package/dist/cdn/chunks/RichTextEditorContent-C2q8sbp2.js.map +1 -0
- package/dist/cdn/chunks/SaveModuleDialog-BNxh1jPT.js +119 -0
- package/dist/cdn/chunks/SaveModuleDialog-BNxh1jPT.js.map +1 -0
- package/dist/cdn/chunks/TitleEditor-IF7VzLTk.js +171 -0
- package/dist/cdn/chunks/TitleEditor-IF7VzLTk.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js +24 -0
- package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js.map +1 -0
- package/dist/cdn/chunks/de-B05yW8Gi.js +840 -0
- package/dist/cdn/chunks/de-B05yW8Gi.js.map +1 -0
- package/dist/cdn/chunks/de-BPHtelu7.js +209 -0
- package/dist/cdn/chunks/de-BPHtelu7.js.map +1 -0
- package/dist/cdn/chunks/de-BRDqJwJe.js +89 -0
- package/dist/cdn/chunks/de-BRDqJwJe.js.map +1 -0
- package/dist/cdn/chunks/draggable-C-1_gch3.js +11572 -0
- package/dist/cdn/chunks/draggable-C-1_gch3.js.map +1 -0
- package/dist/cdn/chunks/emojiData-DUHzsh4j.js +19 -0
- package/dist/cdn/chunks/emojiData-DUHzsh4j.js.map +1 -0
- package/dist/cdn/chunks/en-BII7695P.js +840 -0
- package/dist/cdn/chunks/en-BII7695P.js.map +1 -0
- package/dist/cdn/chunks/en-Cdj_Ikl1.js +89 -0
- package/dist/cdn/chunks/en-Cdj_Ikl1.js.map +1 -0
- package/dist/cdn/chunks/en-DejwuJhw.js +209 -0
- package/dist/cdn/chunks/en-DejwuJhw.js.map +1 -0
- package/dist/cdn/chunks/extensions-B0eT-yjf.js +598 -0
- package/dist/cdn/chunks/extensions-B0eT-yjf.js.map +1 -0
- package/dist/cdn/chunks/features-BrvE2Fzv.js +9677 -0
- package/dist/cdn/chunks/features-BrvE2Fzv.js.map +1 -0
- package/dist/cdn/chunks/icons-C7wtAD8p.js +1043 -0
- package/dist/cdn/chunks/icons-C7wtAD8p.js.map +1 -0
- package/dist/cdn/chunks/liquid.browser-CllF-us3.js +3279 -0
- package/dist/cdn/chunks/liquid.browser-CllF-us3.js.map +1 -0
- package/dist/cdn/chunks/media-library-Cl5XuaKy.js +6030 -0
- package/dist/cdn/chunks/media-library-Cl5XuaKy.js.map +1 -0
- package/dist/cdn/chunks/pusher-i7-OBujc.js +2508 -0
- package/dist/cdn/chunks/pusher-i7-OBujc.js.map +1 -0
- package/dist/cdn/chunks/quality-Va91a3N8.js +1456 -0
- package/dist/cdn/chunks/quality-Va91a3N8.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
- package/dist/cdn/chunks/renderer-si0Zgxeb.js +642 -0
- package/dist/cdn/chunks/renderer-si0Zgxeb.js.map +1 -0
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
- package/dist/cdn/chunks/src-BLyYIbdZ.js +497 -0
- package/dist/cdn/chunks/src-BLyYIbdZ.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-DfcU8u_r.js +57 -0
- package/dist/cdn/chunks/styleConstants-DfcU8u_r.js.map +1 -0
- package/dist/cdn/chunks/styles-C6BQLT9F.js +5807 -0
- package/dist/cdn/chunks/styles-C6BQLT9F.js.map +1 -0
- package/dist/cdn/chunks/tiptap-D8whBv5F.js +14654 -0
- package/dist/cdn/chunks/tiptap-D8whBv5F.js.map +1 -0
- package/dist/cdn/editor.css +2 -0
- package/dist/cdn/editor.js +367 -0
- package/dist/cdn/editor.js.map +1 -0
- package/dist/{cloud-6ZmAvF0j.js → cloud-BoS0J0vs.js} +1 -1
- package/dist/{de-DWcgp-7T.js → de-C74F9xK3.js} +112 -3
- package/dist/dist-C2grMquk.js +1261 -0
- package/dist/{dist-CivF9P8b.js → dist-Djgi0A6k.js} +92 -77
- package/dist/{en-Cxd4fhNm.js → en-B24jVTeO.js} +112 -3
- package/dist/{extensions-D__hOlV1.js → extensions-DsmjHqBF.js} +14 -14
- package/dist/index.d.ts +21 -10
- package/dist/{pencil-BZJPNYWR.js → pencil-Bpimrzzw.js} +5 -2
- package/dist/style.css +1 -1
- package/dist/styles-BMFMtR9R.js +6341 -0
- package/dist/templatical-editor.js +197 -139
- package/dist/undo-2-m1EUDbUg.js +16 -0
- package/dist/{useEditorCore-wslttMH-.js → useEditorCore-CtNAo0uy.js} +2154 -2025
- package/dist/useMergeTag-2vTcVpNo.js +34 -0
- package/package.json +12 -12
- package/dist/CountdownBlock-DaYGxKqo.js +0 -92
- package/dist/check-DJrpDKO_.js +0 -7
- package/dist/dist-C04s_fLA.js +0 -563
- package/dist/styles-B4tjX5SP.js +0 -5224
- package/dist/useMergeTag-DX0XG5V9.js +0 -34
- /package/dist/{clock-ik2pRJKG.js → clock-Ba4p3rJM.js} +0 -0
- /package/dist/{readableTextColor-DVuzNX1y.js → readableTextColor-C_9OpzBw.js} +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
Functional Source License, Version 1.1, MIT Future License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present Templatical
|
|
4
|
+
|
|
5
|
+
## Terms and Conditions
|
|
6
|
+
|
|
7
|
+
### Licensor ("We")
|
|
8
|
+
|
|
9
|
+
Templatical
|
|
10
|
+
|
|
11
|
+
### The Software
|
|
12
|
+
|
|
13
|
+
Templatical Email Editor — the visual drag-and-drop email template editor
|
|
14
|
+
(@aswin.dev/core, @aswin.dev/editor, and @aswin.dev/media-library
|
|
15
|
+
packages).
|
|
16
|
+
|
|
17
|
+
### Grant of Rights
|
|
18
|
+
|
|
19
|
+
Subject to the terms and conditions of this License, We hereby grant You a
|
|
20
|
+
non-exclusive, worldwide, non-transferable license to use, copy, modify,
|
|
21
|
+
create derivative works, and redistribute the Software, subject to the
|
|
22
|
+
following conditions:
|
|
23
|
+
|
|
24
|
+
### Permitted Uses
|
|
25
|
+
|
|
26
|
+
You may use the Software for any purpose, including commercial purposes,
|
|
27
|
+
**provided that** you do not offer the Software, or a substantially similar
|
|
28
|
+
product built using the Software, as a hosted or managed service that
|
|
29
|
+
competes with Templatical's commercial offerings.
|
|
30
|
+
|
|
31
|
+
### Change Date
|
|
32
|
+
|
|
33
|
+
Two (2) years from the date of each release of the Software.
|
|
34
|
+
|
|
35
|
+
### Change License
|
|
36
|
+
|
|
37
|
+
MIT License
|
|
38
|
+
|
|
39
|
+
On the Change Date, the above copyright notice and this permission notice
|
|
40
|
+
shall be replaced with the MIT License, and the Software will be available
|
|
41
|
+
under the MIT License for all purposes without restriction.
|
|
42
|
+
|
|
43
|
+
### Notices
|
|
44
|
+
|
|
45
|
+
You must retain this license notice in all copies or substantial portions
|
|
46
|
+
of the Software.
|
|
47
|
+
|
|
48
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
49
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
50
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
Note: The @aswin.dev/types, @aswin.dev/renderer, and
|
|
55
|
+
@aswin.dev/import-beefree packages are licensed separately under the MIT
|
|
56
|
+
License. See LICENSE-MIT for those packages' terms.
|
|
@@ -1,32 +1,18 @@
|
|
|
1
1
|
import { A as e, At as t, C as n, D as r, F as i, Ft as a, N as o, U as ee, V as s, W as te, _ as c, b as l, c as ne, et as u, f as d, g as f, h as p, k as re, st as m, t as ie, v as h, x as g } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
|
-
import {
|
|
2
|
+
import { l as ae, u as oe } from "./dist-Djgi0A6k.js";
|
|
3
3
|
import { A as _, i as se, l as v, m as ce, y as le } from "./keys-CvX8D-8C.js";
|
|
4
|
-
import { t as y } from "./
|
|
5
|
-
import { t as b } from "./circle-alert-ZQQc98HC.js";
|
|
4
|
+
import { t as y } from "./circle-alert-ZQQc98HC.js";
|
|
6
5
|
import { t as ue } from "./loader-circle-Balo8p3d.js";
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
6
|
+
import { n as de, t as fe } from "./undo-2-m1EUDbUg.js";
|
|
7
|
+
import { t as pe } from "./send-D2eSo4GH.js";
|
|
8
|
+
import { t as b } from "./sparkles-Chm5CZfb.js";
|
|
9
|
+
import { t as me } from "./trash-2-CtK2apEH.js";
|
|
10
|
+
import { t as x } from "./x-BkaOMosX.js";
|
|
11
11
|
import { t as S } from "./LoadingTrack-Ba2pfF57.js";
|
|
12
12
|
import { t as C } from "./_plugin-vue_export-helper-BVAJ4lgT.js";
|
|
13
|
-
import { i as w } from "./cloud-
|
|
14
|
-
var T = y("redo-2", [["path", {
|
|
15
|
-
d: "m15 14 5-5-5-5",
|
|
16
|
-
key: "12vg1m"
|
|
17
|
-
}], ["path", {
|
|
18
|
-
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
19
|
-
key: "6uklza"
|
|
20
|
-
}]]), E = y("undo-2", [["path", {
|
|
21
|
-
d: "M9 14 4 9l5-5",
|
|
22
|
-
key: "102s5s"
|
|
23
|
-
}], ["path", {
|
|
24
|
-
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
25
|
-
key: "f3b9sd"
|
|
26
|
-
}]]);
|
|
27
|
-
//#endregion
|
|
13
|
+
import { i as w } from "./cloud-BoS0J0vs.js";
|
|
28
14
|
//#region src/composables/useAliveFlag.ts
|
|
29
|
-
function
|
|
15
|
+
function T() {
|
|
30
16
|
let t = { alive: !0 };
|
|
31
17
|
return e(() => {
|
|
32
18
|
t.alive = !1;
|
|
@@ -34,19 +20,19 @@ function D() {
|
|
|
34
20
|
}
|
|
35
21
|
//#endregion
|
|
36
22
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
37
|
-
var
|
|
23
|
+
var E = {
|
|
38
24
|
key: 0,
|
|
39
25
|
class: "tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
40
|
-
},
|
|
26
|
+
}, D = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, O = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, k = { class: "tpl:flex tpl:items-center tpl:gap-1" }, A = ["title"], j = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, M = {
|
|
41
27
|
key: 0,
|
|
42
28
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
43
|
-
},
|
|
29
|
+
}, N = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, P = {
|
|
44
30
|
key: 1,
|
|
45
31
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
46
|
-
},
|
|
32
|
+
}, F = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, I = {
|
|
47
33
|
key: 2,
|
|
48
34
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
49
|
-
},
|
|
35
|
+
}, L = {
|
|
50
36
|
key: 0,
|
|
51
37
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
52
38
|
style: {
|
|
@@ -55,10 +41,10 @@ var O = {
|
|
|
55
41
|
"max-width": "85%",
|
|
56
42
|
"box-shadow": "var(--tpl-shadow)"
|
|
57
43
|
}
|
|
58
|
-
},
|
|
44
|
+
}, R = {
|
|
59
45
|
key: 1,
|
|
60
46
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
61
|
-
},
|
|
47
|
+
}, z = {
|
|
62
48
|
key: 1,
|
|
63
49
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
64
50
|
style: {
|
|
@@ -81,7 +67,7 @@ var O = {
|
|
|
81
67
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
82
68
|
"backdrop-filter": "blur(2px)"
|
|
83
69
|
}
|
|
84
|
-
}, _e = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, ve = ["onClick"], ye = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, be = { class: "tpl-ai-input-wrapper tpl:flex tpl:items-end 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)]" }, xe = ["placeholder", "disabled"], Se = ["disabled"], Ce = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" },
|
|
70
|
+
}, _e = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, ve = ["onClick"], ye = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, be = { class: "tpl-ai-input-wrapper tpl:flex tpl:items-end 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)]" }, xe = ["placeholder", "disabled"], Se = ["disabled"], Ce = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, B = /* @__PURE__ */ C(/* @__PURE__ */ n({
|
|
85
71
|
__name: "AiChatSidebar",
|
|
86
72
|
props: {
|
|
87
73
|
visible: { type: Boolean },
|
|
@@ -89,10 +75,10 @@ var O = {
|
|
|
89
75
|
},
|
|
90
76
|
emits: ["close"],
|
|
91
77
|
setup(e, { emit: n }) {
|
|
92
|
-
let
|
|
78
|
+
let C = e, B = n, V = _(v, "AiChatSidebar"), H = _(ce, "AiChatSidebar"), we = _(se, "AiChatSidebar"), U = r(le, []), W = T(), G = w({
|
|
93
79
|
authManager: we,
|
|
94
80
|
getTemplateId: () => H.state.template?.id ?? null,
|
|
95
|
-
onApply:
|
|
81
|
+
onApply: C.onApply,
|
|
96
82
|
onError: void 0
|
|
97
83
|
}), K = u(""), q = u(null), J = u(!1), Y = u(0), { pause: X, resume: Te } = ae(() => {
|
|
98
84
|
let e = G.suggestions.value?.length ?? 0;
|
|
@@ -110,7 +96,7 @@ var O = {
|
|
|
110
96
|
q.value && (q.value.scrollTop = q.value.scrollHeight);
|
|
111
97
|
});
|
|
112
98
|
}
|
|
113
|
-
s(() => G.messages.value?.length ?? 0, () => Z()), s(() =>
|
|
99
|
+
s(() => G.messages.value?.length ?? 0, () => Z()), s(() => C.visible, async (e) => {
|
|
114
100
|
if (e && !J.value) {
|
|
115
101
|
if (J.value = !0, await G.loadConversation(), !W.alive) return;
|
|
116
102
|
(G.messages.value?.length ?? 0) === 0 && H.content.value.blocks.length === 0 && G.loadSuggestions(H.content.value, U);
|
|
@@ -137,42 +123,42 @@ var O = {
|
|
|
137
123
|
"leave-from-class": "tpl:translate-x-0",
|
|
138
124
|
"leave-to-class": "tpl:translate-x-full"
|
|
139
125
|
}, {
|
|
140
|
-
default: ee(() => [e.visible ? (o(), h("div",
|
|
141
|
-
p("div",
|
|
126
|
+
default: ee(() => [e.visible ? (o(), h("div", E, [
|
|
127
|
+
p("div", D, [p("div", O, [g(m(b), {
|
|
142
128
|
size: 13,
|
|
143
129
|
"stroke-width": 2
|
|
144
|
-
}), p("span", null, a(m(V).aiChat.title), 1)]), p("div",
|
|
130
|
+
}), p("span", null, a(m(V).aiChat.title), 1)]), p("div", k, [(m(G).messages.value?.length ?? 0) > 0 ? (o(), h("button", {
|
|
145
131
|
key: 0,
|
|
146
132
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
147
133
|
title: m(V).aiChat.clear,
|
|
148
134
|
onClick: r[0] ||= (e) => m(G).clearChat()
|
|
149
|
-
}, [g(m(
|
|
135
|
+
}, [g(m(me), {
|
|
150
136
|
size: 14,
|
|
151
137
|
"stroke-width": 2
|
|
152
|
-
})], 8,
|
|
138
|
+
})], 8, A)) : c("", !0), p("button", {
|
|
153
139
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
154
|
-
onClick: r[1] ||= (e) =>
|
|
155
|
-
}, [g(m(
|
|
140
|
+
onClick: r[1] ||= (e) => B("close")
|
|
141
|
+
}, [g(m(x), {
|
|
156
142
|
size: 14,
|
|
157
143
|
"stroke-width": 2
|
|
158
144
|
})])])]),
|
|
159
|
-
p("div",
|
|
145
|
+
p("div", j, [
|
|
160
146
|
p("div", {
|
|
161
147
|
ref_key: "messagesContainer",
|
|
162
148
|
ref: q,
|
|
163
149
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
164
|
-
}, [m(G).isLoadingHistory.value ? (o(), h("div",
|
|
150
|
+
}, [m(G).isLoadingHistory.value ? (o(), h("div", M, [g(m(ue), {
|
|
165
151
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
166
152
|
size: 24,
|
|
167
153
|
"stroke-width": 2
|
|
168
|
-
}), p("p",
|
|
154
|
+
}), p("p", N, a(m(V).aiChat.loadingHistory), 1)])) : (m(G).messages.value?.length ?? 0) === 0 ? (o(), h("div", P, [g(m(b), {
|
|
169
155
|
size: 32,
|
|
170
156
|
"stroke-width": 1.5,
|
|
171
157
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
172
|
-
}), p("p",
|
|
158
|
+
}), p("p", F, a(m(V).aiChat.placeholder), 1)])) : (o(), h("div", I, [(o(!0), h(d, null, i(m(G).messages.value, (e, t) => (o(), h("div", {
|
|
173
159
|
key: e.id,
|
|
174
160
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
175
|
-
}, [e.role === "user" ? (o(), h("div",
|
|
161
|
+
}, [e.role === "user" ? (o(), h("div", L, a(e.content), 1)) : (o(), h("div", R, [!$(e.content) && m(G).isGenerating.value && t === (m(G).messages.value?.length ?? 0) - 1 ? (o(), f(S, { key: 0 })) : (o(), h("div", z, a($(e.content) || m(V).aiChat.applied), 1)), e.id === m(G).lastApplyMessageId.value && !m(G).isGenerating.value ? (o(), h("button", {
|
|
176
162
|
key: 2,
|
|
177
163
|
class: "tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:self-start tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
178
164
|
style: {
|
|
@@ -181,14 +167,14 @@ var O = {
|
|
|
181
167
|
"background-color": "transparent"
|
|
182
168
|
},
|
|
183
169
|
onClick: r[2] ||= (e) => m(G).toggleLastRevert()
|
|
184
|
-
}, [m(G).isLastChangeReverted.value ? (o(), h(d, { key: 0 }, [g(m(
|
|
170
|
+
}, [m(G).isLastChangeReverted.value ? (o(), h(d, { key: 0 }, [g(m(de), {
|
|
185
171
|
size: 12,
|
|
186
172
|
"stroke-width": 2
|
|
187
|
-
}), l(" " + a(m(V).aiChat.reapply), 1)], 64)) : (o(), h(d, { key: 1 }, [g(m(
|
|
173
|
+
}), l(" " + a(m(V).aiChat.reapply), 1)], 64)) : (o(), h(d, { key: 1 }, [g(m(fe), {
|
|
188
174
|
size: 12,
|
|
189
175
|
"stroke-width": 2
|
|
190
176
|
}), l(" " + a(m(V).aiChat.revert), 1)], 64))])) : c("", !0)]))]))), 128))]))], 512),
|
|
191
|
-
m(G).error.value ? (o(), h("div", he, [g(m(
|
|
177
|
+
m(G).error.value ? (o(), h("div", he, [g(m(y), {
|
|
192
178
|
size: 14,
|
|
193
179
|
"stroke-width": 2,
|
|
194
180
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -216,7 +202,7 @@ var O = {
|
|
|
216
202
|
class: "tpl-ai-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
217
203
|
disabled: !K.value.trim() || m(G).isGenerating.value,
|
|
218
204
|
onClick: Q
|
|
219
|
-
}, [g(m(
|
|
205
|
+
}, [g(m(pe), {
|
|
220
206
|
size: 16,
|
|
221
207
|
"stroke-width": 2
|
|
222
208
|
})], 8, Se)]), p("p", Ce, a(m(V).aiMenu.disclaimer), 1)])
|
|
@@ -226,4 +212,4 @@ var O = {
|
|
|
226
212
|
}
|
|
227
213
|
}), [["__scopeId", "data-v-384b60d9"]]);
|
|
228
214
|
//#endregion
|
|
229
|
-
export {
|
|
215
|
+
export { B as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as e, F as t, Ft as n, N as r, R as i, f as a, g as o, h as s, jt as c, m as l, v as u } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
|
-
import "./useEditorCore-
|
|
2
|
+
import "./useEditorCore-CtNAo0uy.js";
|
|
3
3
|
import { A as d, n as f } from "./keys-CvX8D-8C.js";
|
|
4
4
|
import { t as p } from "./image-up-DT7gcJLN.js";
|
|
5
5
|
import { t as m } from "./shield-check-jkpgcC0-.js";
|