@templatical/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/dist/{AiChatSidebar-BwLECwsO.js → AiChatSidebar-H7SIsxeC.js} +49 -59
- package/dist/{AiFeatureMenu-CVHKharv.js → AiFeatureMenu-CJGX-fP5.js} +1 -1
- package/dist/{CloudEditor-S7AzuNwC.js → CloudEditor-BBs3p-mW.js} +124 -120
- package/dist/{CollaboratorBar-VZKOv_Zn.js → CollaboratorBar-CiEo25lb.js} +2 -2
- package/dist/{CommentsSidebar-BiRtaXYD.js → CommentsSidebar-DikjSLtH.js} +1 -1
- package/dist/{CountdownToolbar-CojjlZet.js → CountdownToolbar-Bn4RwJVN.js} +2 -2
- package/dist/{DesignReferenceSidebar-Ci9HIGbf.js → DesignReferenceSidebar-D08CLZPA.js} +1 -1
- package/dist/{ModuleBrowserModal-D7IYx1Nh.js → ModuleBrowserModal-D6637s8j.js} +4 -4
- package/dist/{ModulePreviewCanvas-I-uMcK5G.js → ModulePreviewCanvas-DBFmwq-y.js} +1 -1
- package/dist/{NumberWithSuffix-CLTBb2Rj.js → NumberWithSuffix-CyFX9w1e.js} +1 -1
- package/dist/{ParagraphEditor-BRQTNDFO.js → ParagraphEditor-DC2jOjNh.js} +16 -16
- package/dist/{RichTextEditorContent-C3QSg7gd.js → RichTextEditorContent-8NkjTIua.js} +1 -1
- package/dist/{SaveModuleDialog-DGGGNZfm.js → SaveModuleDialog-NKT7bWWs.js} +2 -2
- package/dist/{SnapshotHistory-C97Iw6xw.js → SnapshotHistory-XNqYxPBj.js} +2 -2
- package/dist/{TestEmailModal-B7S8H-VG.js → TestEmailModal-B_-Qo5Us.js} +2 -2
- package/dist/{TitleEditor-DhFTYzrw.js → TitleEditor-DnH3yyTr.js} +7 -7
- package/dist/{TplModal-BgABm6ju.js → TplModal-BoEZFe3U.js} +2 -2
- package/dist/{blockTypeIcons-BSf-3RJ-.js → blockTypeIcons-CUcYuWAO.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AccessibilityPanel-kgNBRaZV.js → AccessibilityPanel-CQt87OMk.js} +5 -5
- package/dist/cdn/chunks/{AccessibilityPanel-kgNBRaZV.js.map → AccessibilityPanel-CQt87OMk.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-CRkzwdMg.js → AiFeatureMenu-SxIqfqA0.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-CRkzwdMg.js.map → AiFeatureMenu-SxIqfqA0.js.map} +1 -1
- package/dist/cdn/chunks/{BlockA11yBadge-BfuH2Hrg.js → BlockA11yBadge-QqW6nomn.js} +3 -3
- package/dist/cdn/chunks/{BlockA11yBadge-BfuH2Hrg.js.map → BlockA11yBadge-QqW6nomn.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BGiN3M_f.js → CloudEditor-ChWUIMw7.js} +165 -161
- package/dist/cdn/chunks/CloudEditor-ChWUIMw7.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CMl3lAZU.js → CollaboratorBar-73LfbzqF.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-CMl3lAZU.js.map → CollaboratorBar-73LfbzqF.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-D1RoaOgF.js → CountdownBlock-WYz9b9Ex.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-D1RoaOgF.js.map → CountdownBlock-WYz9b9Ex.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DltwuOer.js → CountdownToolbar-B9fPfFqp.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-DltwuOer.js.map → CountdownToolbar-B9fPfFqp.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-3uu2mXR9.js → ModuleBrowserModal-DfnJQBkM.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-3uu2mXR9.js.map → ModuleBrowserModal-DfnJQBkM.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-K9CQFr7p.js → ModulePreviewCanvas-DE4_oHA_.js} +20 -20
- package/dist/cdn/chunks/{ModulePreviewCanvas-K9CQFr7p.js.map → ModulePreviewCanvas-DE4_oHA_.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-BIFgtqGs.js → NumberWithSuffix-BST0yRor.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-BIFgtqGs.js.map → NumberWithSuffix-BST0yRor.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DlpZX_x4.js → ParagraphEditor-CQfijF3i.js} +36 -36
- package/dist/cdn/chunks/{ParagraphEditor-DlpZX_x4.js.map → ParagraphEditor-CQfijF3i.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CPGT8h-O.js → RichTextEditorContent-CBds8dnm.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-CPGT8h-O.js.map → RichTextEditorContent-CBds8dnm.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-_uaJscj1.js → SaveModuleDialog-DXhuZgZ4.js} +13 -13
- package/dist/cdn/chunks/{SaveModuleDialog-_uaJscj1.js.map → SaveModuleDialog-DXhuZgZ4.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Kerz6US8.js → TitleEditor-BdQvH7eK.js} +7 -7
- package/dist/cdn/chunks/{TitleEditor-Kerz6US8.js.map → TitleEditor-BdQvH7eK.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BeOhGtoo.js → blockTypeIcons-D3CGFW5P.js} +8 -8
- package/dist/cdn/chunks/{blockTypeIcons-BeOhGtoo.js.map → blockTypeIcons-D3CGFW5P.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-BZYkPlKr.js → extensions-BE81zpqP.js} +50 -48
- package/dist/cdn/chunks/{extensions-BZYkPlKr.js.map → extensions-BE81zpqP.js.map} +1 -1
- package/dist/cdn/chunks/{features-DzIN-Nua.js → features-CXF_YKlL.js} +1313 -1122
- package/dist/cdn/chunks/features-CXF_YKlL.js.map +1 -0
- package/dist/cdn/chunks/{icons-Nvr6w13E.js → icons-KbmhF7rg.js} +2 -2
- package/dist/cdn/chunks/{icons-Nvr6w13E.js.map → icons-KbmhF7rg.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-BzT7BoGU.js → media-library-BERe10wA.js} +103 -103
- package/dist/cdn/chunks/{media-library-BzT7BoGU.js.map → media-library-BERe10wA.js.map} +1 -1
- package/dist/cdn/chunks/{quality-C328caFm.js → quality-CmkY1kMU.js} +309 -309
- package/dist/cdn/chunks/{quality-C328caFm.js.map → quality-CmkY1kMU.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-eDlxzlJI.js → renderer-OttGEYkY.js} +50 -50
- package/dist/cdn/chunks/{renderer-eDlxzlJI.js.map → renderer-OttGEYkY.js.map} +1 -1
- package/dist/cdn/chunks/{src-DKNTQJVO.js → src-C21GI0p6.js} +6 -6
- package/dist/cdn/chunks/{src-DKNTQJVO.js.map → src-C21GI0p6.js.map} +1 -1
- package/dist/cdn/chunks/styles-Cy-My9zK.js +2976 -0
- package/dist/cdn/chunks/styles-Cy-My9zK.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +109 -106
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-a3VovHva.js → cloud-k0DgeCo2.js} +11 -0
- package/dist/{dist-DDJIWTRY.js → dist-B2jcQhv8.js} +1 -1
- package/dist/{dist-wzMIGj-D.js → dist-BYt3jdCR.js} +1 -1
- package/dist/{dist-aRzjfSRN.js → dist-CISFttkF.js} +1 -1
- package/dist/{dist-D6uC2xhi.js → dist-CfQPBf15.js} +1 -1
- package/dist/{dist-DjviJBCi.js → dist-DD-9hatO.js} +1 -1
- package/dist/{dist-KoBJjK1G.js → dist-DUvhjQ2-.js} +1 -1
- package/dist/{dist-BaQIYPsn.js → dist-DVwOAodp.js} +1 -1
- package/dist/{dist-Cp0zXPAD.js → dist-DxD1kSdH.js} +1 -1
- package/dist/{dist-Pk4MhWMP.js → dist-U5guDm2w.js} +1 -1
- package/dist/{dist-D90y8dvT.js → dist-hfu7I2rO.js} +3 -3
- package/dist/{dist-us-RpCWN.js → dist-v8h02hhE.js} +1 -1
- package/dist/{extensions-D-J02CiP.js → extensions-p6UBqXfg.js} +30 -28
- package/dist/index.d.ts +8 -8
- package/dist/style.css +1 -1
- package/dist/{styles-DeNciUTX.js → styles-BP15QmP3.js} +1078 -1056
- package/dist/templatical-editor.js +108 -105
- package/dist/useAliveFlag-D8GoB4VE.js +10 -0
- package/dist/{useEditorCore-uCU9Ny0M.js → useEditorCore-_rbu6iMu.js} +969 -791
- package/package.json +7 -7
- package/dist/cdn/chunks/CloudEditor-BGiN3M_f.js.map +0 -1
- package/dist/cdn/chunks/features-DzIN-Nua.js.map +0 -1
- package/dist/cdn/chunks/styles-lcwmaOou.js +0 -2955
- package/dist/cdn/chunks/styles-lcwmaOou.js.map +0 -1
- /package/dist/{AccessibilityPanel-D-PqmHdH.js → AccessibilityPanel-BeUibrUb.js} +0 -0
- /package/dist/{BlockA11yBadge-BFIw0h1m.js → BlockA11yBadge-BhyoMZJ9.js} +0 -0
- /package/dist/{CountdownBlock-Cq8A8WrM.js → CountdownBlock-ByJ0_8Pk.js} +0 -0
- /package/dist/{TemplateScoringPanel-V79yrEPC.js → TemplateScoringPanel-kYOGtac3.js} +0 -0
- /package/dist/{de-BhIWu_bO.js → de-C9hp3n_a.js} +0 -0
- /package/dist/{de-Di4MEjjx.js → de-GOtR9DwW.js} +0 -0
- /package/dist/{dist-iLBdeBDR.js → dist-CQQS9SRN.js} +0 -0
- /package/dist/{emojiData-DX3E0XT-.js → emojiData-DrBuvEoP.js} +0 -0
- /package/dist/{en-D7HRbYah.js → en-Dv776AqL.js} +0 -0
- /package/dist/{en-BSuzi-Pd.js → en-dFFQVzNn.js} +0 -0
- /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-bvx5sFh5.js} +0 -0
- /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-DX8ZHRdq.js} +0 -0
- /package/dist/{pt-BR-K32lt6YP.js → pt-BR-6n58Fl_q.js} +0 -0
- /package/dist/{pt-BR-CCVBRais.js → pt-BR-iOr79aDg.js} +0 -0
- /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-CXzrEnNb.js} +0 -0
- /package/dist/{styleConstants-fWzlIIwN.js → styleConstants-DkfOPzGu.js} +0 -0
- /package/dist/{usePopoverRoot-BxJrqnMD.js → usePopoverRoot-BwzFSPLy.js} +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { A as e, B as t,
|
|
2
|
-
import { o as
|
|
3
|
-
import { A as g, i as
|
|
1
|
+
import { A as e, B as t, E as n, L as r, M as i, X as a, _ as o, a as ee, at as te, b as s, f as c, h as l, l as u, m as d, p as f, rt as p, st as m, t as ne, v as h, w as re, z as ie } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
|
+
import { o as ae, s as oe } from "./dist-BzRLLpfq.js";
|
|
3
|
+
import { A as g, i as se, l as ce, m as _, y as le } from "./keys-B5SJtPWf.js";
|
|
4
4
|
import { t as v } from "./createLucideIcon-Di4mqmGn.js";
|
|
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 { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
5
|
+
import { t as y } from "./circle-alert-C0L9pUQ4.js";
|
|
6
|
+
import { t as ue } from "./loader-circle-_9bP23op.js";
|
|
7
|
+
import { t as de } from "./send-BatIZC9a.js";
|
|
8
|
+
import { t as b } from "./sparkles-D1IGi_cC.js";
|
|
9
|
+
import { t as fe } from "./trash-2-424iqbpN.js";
|
|
10
|
+
import { t as pe } from "./x-Dlaenqta.js";
|
|
11
|
+
import { t as me } from "./LoadingTrack-CFkDkjBb.js";
|
|
12
|
+
import { t as x } from "./_plugin-vue_export-helper-B0hnzhyu.js";
|
|
13
|
+
import { t as S } from "./useAliveFlag-D8GoB4VE.js";
|
|
14
|
+
import { i as C } from "./cloud-k0DgeCo2.js";
|
|
14
15
|
var w = v("redo-2", [["path", {
|
|
15
16
|
d: "m15 14 5-5-5-5",
|
|
16
17
|
key: "12vg1m"
|
|
@@ -23,30 +24,19 @@ var w = v("redo-2", [["path", {
|
|
|
23
24
|
}], ["path", {
|
|
24
25
|
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
26
|
key: "f3b9sd"
|
|
26
|
-
}]])
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/composables/useAliveFlag.ts
|
|
29
|
-
function E() {
|
|
30
|
-
let e = { alive: !0 };
|
|
31
|
-
return n(() => {
|
|
32
|
-
e.alive = !1;
|
|
33
|
-
}), e;
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
37
|
-
var D = {
|
|
27
|
+
}]]), E = {
|
|
38
28
|
key: 0,
|
|
39
29
|
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
|
-
},
|
|
30
|
+
}, 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
31
|
key: 0,
|
|
42
32
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
43
|
-
},
|
|
33
|
+
}, N = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, P = {
|
|
44
34
|
key: 1,
|
|
45
35
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
46
|
-
},
|
|
36
|
+
}, F = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, I = {
|
|
47
37
|
key: 2,
|
|
48
38
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
49
|
-
},
|
|
39
|
+
}, L = {
|
|
50
40
|
key: 0,
|
|
51
41
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
52
42
|
style: {
|
|
@@ -55,10 +45,10 @@ var D = {
|
|
|
55
45
|
"max-width": "85%",
|
|
56
46
|
"box-shadow": "var(--tpl-shadow)"
|
|
57
47
|
}
|
|
58
|
-
},
|
|
48
|
+
}, R = {
|
|
59
49
|
key: 1,
|
|
60
50
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
61
|
-
},
|
|
51
|
+
}, z = {
|
|
62
52
|
key: 1,
|
|
63
53
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
64
54
|
style: {
|
|
@@ -67,37 +57,37 @@ var D = {
|
|
|
67
57
|
color: "var(--tpl-text)",
|
|
68
58
|
"box-shadow": "var(--tpl-shadow)"
|
|
69
59
|
}
|
|
70
|
-
},
|
|
60
|
+
}, he = {
|
|
71
61
|
key: 0,
|
|
72
62
|
class: "tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs",
|
|
73
63
|
style: {
|
|
74
64
|
"background-color": "var(--tpl-danger-light)",
|
|
75
65
|
color: "var(--tpl-danger)"
|
|
76
66
|
}
|
|
77
|
-
},
|
|
67
|
+
}, ge = {
|
|
78
68
|
key: 1,
|
|
79
69
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
80
70
|
style: {
|
|
81
71
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
82
72
|
"backdrop-filter": "blur(2px)"
|
|
83
73
|
}
|
|
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)]" },
|
|
74
|
+
}, _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__ */ x(/* @__PURE__ */ s({
|
|
85
75
|
__name: "AiChatSidebar",
|
|
86
76
|
props: {
|
|
87
77
|
visible: { type: Boolean },
|
|
88
78
|
onApply: { type: Function }
|
|
89
79
|
},
|
|
90
80
|
emits: ["close"],
|
|
91
|
-
setup(
|
|
92
|
-
let
|
|
81
|
+
setup(s, { emit: v }) {
|
|
82
|
+
let x = s, B = v, V = g(ce, "AiChatSidebar"), H = g(_, "AiChatSidebar"), we = g(se, "AiChatSidebar"), U = re(le, []), W = S(), G = C({
|
|
93
83
|
authManager: we,
|
|
94
84
|
getTemplateId: () => H.state.template?.id ?? null,
|
|
95
|
-
onApply:
|
|
85
|
+
onApply: x.onApply,
|
|
96
86
|
onError: void 0
|
|
97
|
-
}), K = a(""), q = a(null), J = a(!1), Y = a(0), { pause: X, resume: Te } =
|
|
87
|
+
}), K = a(""), q = a(null), J = a(!1), Y = a(0), { pause: X, resume: Te } = ae(() => {
|
|
98
88
|
let e = G.suggestions.value?.length ?? 0;
|
|
99
89
|
Y.value < e ? Y.value++ : X();
|
|
100
|
-
}, 150, { immediate: !1 }), { start: Ee } =
|
|
90
|
+
}, 150, { immediate: !1 }), { start: Ee } = oe(() => Te(), 100, { immediate: !1 });
|
|
101
91
|
r(() => G.suggestions.value?.length ?? 0, (e) => {
|
|
102
92
|
if (X(), e === 0) {
|
|
103
93
|
Y.value = 0;
|
|
@@ -106,11 +96,11 @@ var D = {
|
|
|
106
96
|
Y.value = 0, Ee();
|
|
107
97
|
});
|
|
108
98
|
function Z() {
|
|
109
|
-
|
|
99
|
+
n(() => {
|
|
110
100
|
q.value && (q.value.scrollTop = q.value.scrollHeight);
|
|
111
101
|
});
|
|
112
102
|
}
|
|
113
|
-
r(() => G.messages.value?.length ?? 0, () => Z()), r(() =>
|
|
103
|
+
r(() => G.messages.value?.length ?? 0, () => Z()), r(() => x.visible, async (e) => {
|
|
114
104
|
if (e && !J.value) {
|
|
115
105
|
if (J.value = !0, await G.loadConversation(), !W.alive) return;
|
|
116
106
|
(G.messages.value?.length ?? 0) === 0 && H.content.value.blocks.length === 0 && G.loadSuggestions(H.content.value, U);
|
|
@@ -129,7 +119,7 @@ var D = {
|
|
|
129
119
|
function Oe(e) {
|
|
130
120
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q());
|
|
131
121
|
}
|
|
132
|
-
return (
|
|
122
|
+
return (n, r) => (e(), f(ne, {
|
|
133
123
|
"enter-active-class": "tpl-ai-slide-enter-active",
|
|
134
124
|
"enter-from-class": "tpl:translate-x-full",
|
|
135
125
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -137,42 +127,42 @@ var D = {
|
|
|
137
127
|
"leave-from-class": "tpl:translate-x-0",
|
|
138
128
|
"leave-to-class": "tpl:translate-x-full"
|
|
139
129
|
}, {
|
|
140
|
-
default:
|
|
141
|
-
c("div",
|
|
130
|
+
default: ie(() => [s.visible ? (e(), l("div", E, [
|
|
131
|
+
c("div", D, [c("div", O, [h(p(b), {
|
|
142
132
|
size: 13,
|
|
143
133
|
"stroke-width": 2
|
|
144
|
-
}), c("span", null, m(p(V).aiChat.title), 1)]), c("div",
|
|
134
|
+
}), c("span", null, m(p(V).aiChat.title), 1)]), c("div", k, [(p(G).messages.value?.length ?? 0) > 0 ? (e(), l("button", {
|
|
145
135
|
key: 0,
|
|
146
136
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
147
137
|
title: p(V).aiChat.clear,
|
|
148
138
|
onClick: r[0] ||= (e) => p(G).clearChat()
|
|
149
|
-
}, [h(p(
|
|
139
|
+
}, [h(p(fe), {
|
|
150
140
|
size: 14,
|
|
151
141
|
"stroke-width": 2
|
|
152
|
-
})], 8,
|
|
142
|
+
})], 8, A)) : d("", !0), c("button", {
|
|
153
143
|
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
|
-
}, [h(p(
|
|
144
|
+
onClick: r[1] ||= (e) => B("close")
|
|
145
|
+
}, [h(p(pe), {
|
|
156
146
|
size: 14,
|
|
157
147
|
"stroke-width": 2
|
|
158
148
|
})])])]),
|
|
159
|
-
c("div",
|
|
149
|
+
c("div", j, [
|
|
160
150
|
c("div", {
|
|
161
151
|
ref_key: "messagesContainer",
|
|
162
152
|
ref: q,
|
|
163
153
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
164
|
-
}, [p(G).isLoadingHistory.value ? (e(), l("div",
|
|
154
|
+
}, [p(G).isLoadingHistory.value ? (e(), l("div", M, [h(p(ue), {
|
|
165
155
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
166
156
|
size: 24,
|
|
167
157
|
"stroke-width": 2
|
|
168
|
-
}), c("p",
|
|
158
|
+
}), c("p", N, m(p(V).aiChat.loadingHistory), 1)])) : (p(G).messages.value?.length ?? 0) === 0 ? (e(), l("div", P, [h(p(b), {
|
|
169
159
|
size: 32,
|
|
170
160
|
"stroke-width": 1.5,
|
|
171
161
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
172
|
-
}), c("p",
|
|
162
|
+
}), c("p", F, m(p(V).aiChat.placeholder), 1)])) : (e(), l("div", I, [(e(!0), l(u, null, i(p(G).messages.value, (t, n) => (e(), l("div", {
|
|
173
163
|
key: t.id,
|
|
174
164
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
175
|
-
}, [t.role === "user" ? (e(), l("div",
|
|
165
|
+
}, [t.role === "user" ? (e(), l("div", L, m(t.content), 1)) : (e(), l("div", R, [!$(t.content) && p(G).isGenerating.value && n === (p(G).messages.value?.length ?? 0) - 1 ? (e(), f(me, { key: 0 })) : (e(), l("div", z, m($(t.content) || p(V).aiChat.applied), 1)), t.id === p(G).lastApplyMessageId.value && !p(G).isGenerating.value ? (e(), l("button", {
|
|
176
166
|
key: 2,
|
|
177
167
|
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
168
|
style: {
|
|
@@ -188,14 +178,14 @@ var D = {
|
|
|
188
178
|
size: 12,
|
|
189
179
|
"stroke-width": 2
|
|
190
180
|
}), o(" " + m(p(V).aiChat.revert), 1)], 64))])) : d("", !0)]))]))), 128))]))], 512),
|
|
191
|
-
p(G).error.value ? (e(), l("div",
|
|
181
|
+
p(G).error.value ? (e(), l("div", he, [h(p(y), {
|
|
192
182
|
size: 14,
|
|
193
183
|
"stroke-width": 2,
|
|
194
184
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
195
185
|
}), c("span", null, m(p(G).error.value === "ai_apply_failed" ? p(V).aiChat.applyFailed : p(V).aiChat.error), 1)])) : d("", !0),
|
|
196
|
-
(p(G).suggestions.value?.length ?? 0) > 0 ? (e(), l("div",
|
|
186
|
+
(p(G).suggestions.value?.length ?? 0) > 0 ? (e(), l("div", ge, [c("div", _e, [(e(!0), l(u, null, i(p(G).suggestions.value ?? [], (t, n) => (e(), l("button", {
|
|
197
187
|
key: n,
|
|
198
|
-
class:
|
|
188
|
+
class: te(["tpl-suggestion-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out", (p(G).suggestions.value?.length ?? 0) - 1 - n < Y.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
|
|
199
189
|
style: {
|
|
200
190
|
"border-color": "var(--tpl-border)",
|
|
201
191
|
color: "var(--tpl-primary)",
|
|
@@ -212,11 +202,11 @@ var D = {
|
|
|
212
202
|
disabled: p(G).isGenerating.value,
|
|
213
203
|
rows: "3",
|
|
214
204
|
onKeydown: Oe
|
|
215
|
-
}, null, 40, xe), [[
|
|
205
|
+
}, null, 40, xe), [[ee, K.value]]), c("button", {
|
|
216
206
|
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
207
|
disabled: !K.value.trim() || p(G).isGenerating.value,
|
|
218
208
|
onClick: Q
|
|
219
|
-
}, [h(p(
|
|
209
|
+
}, [h(p(de), {
|
|
220
210
|
size: 16,
|
|
221
211
|
"stroke-width": 2
|
|
222
212
|
})], 8, Se)]), c("p", Ce, m(p(V).aiMenu.disclaimer), 1)])
|
|
@@ -226,4 +216,4 @@ var D = {
|
|
|
226
216
|
}
|
|
227
217
|
}), [["__scopeId", "data-v-a55e4bff"]]);
|
|
228
218
|
//#endregion
|
|
229
|
-
export {
|
|
219
|
+
export { B as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as e, F as t, M as n, b as r, d as i, f as a, h as o, l as s, ot as c, p as l, st as u } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
|
-
import "./useEditorCore-
|
|
2
|
+
import "./useEditorCore-_rbu6iMu.js";
|
|
3
3
|
import { A as d, n as f } from "./keys-B5SJtPWf.js";
|
|
4
4
|
import { t as p } from "./image-up-1D_3XDdO.js";
|
|
5
5
|
import { t as m } from "./shield-check-C5Gv2cM1.js";
|