@templatical/editor 0.16.1 → 0.16.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/{AiFeatureMenu-Rb8G3EBo.js → AiFeatureMenu-CcGRd1xE.js} +1 -1
- package/dist/{CloudEditor-D88gLBXp.js → CloudEditor-CUIWUMp5.js} +6 -6
- package/dist/{CollaboratorBar-dxCD8jSi.js → CollaboratorBar-DmxqeBYZ.js} +1 -1
- package/dist/ColorPicker-Gs4BMVog.js +474 -0
- package/dist/{CountdownToolbar-8XVTOuGX.js → CountdownToolbar-92w1YySJ.js} +2 -2
- package/dist/{ModuleBrowserModal-l4_RCC8m.js → ModuleBrowserModal-DsehjLvh.js} +4 -4
- package/dist/{ModulePreviewCanvas-BqYAr4fz.js → ModulePreviewCanvas-BBfuS8VW.js} +1 -1
- package/dist/{NumberWithSuffix-Di-cDy_m.js → NumberWithSuffix-BxSRfI8b.js} +1 -1
- package/dist/{ParagraphEditor-DIQ1jmSP.js → ParagraphEditor-vgvQxicC.js} +77 -87
- package/dist/{RichTextEditorContent-DkTJ6KK8.js → RichTextEditorContent-Dza2oPvh.js} +1 -1
- package/dist/{SaveModuleDialog-DPo3Raon.js → SaveModuleDialog-DNWGCHlS.js} +2 -2
- package/dist/{SnapshotHistory-m7brKV7C.js → SnapshotHistory-BLmnNLg1.js} +2 -2
- package/dist/{TestEmailModal-BE9sFEIl.js → TestEmailModal-D6v1hgY2.js} +2 -2
- package/dist/{TitleEditor-BATN-k-Q.js → TitleEditor-DPdzOQpq.js} +2 -2
- package/dist/{TplModal-DHBcZ1gq.js → TplModal-DObT0uxf.js} +1 -1
- package/dist/{blockTypeIcons-wRchKKx0.js → blockTypeIcons-B9f5fH_5.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-W7VQFAwq.js → AiFeatureMenu-CyUCHd9I.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-W7VQFAwq.js.map → AiFeatureMenu-CyUCHd9I.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-ww2vNIfJ.js → BlockIssueBadge-BAa_dI-c.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-ww2vNIfJ.js.map → BlockIssueBadge-BAa_dI-c.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BVSJ1kvB.js → CloudEditor-ClfgLU48.js} +159 -159
- package/dist/cdn/chunks/{CloudEditor-BVSJ1kvB.js.map → CloudEditor-ClfgLU48.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-BFrAua9a.js → CollaboratorBar-DCc5SL0P.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-BFrAua9a.js.map → CollaboratorBar-DCc5SL0P.js.map} +1 -1
- package/dist/cdn/chunks/ColorPicker-Pi-1fR8c.js +471 -0
- package/dist/cdn/chunks/ColorPicker-Pi-1fR8c.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-MC-mhtQD.js → CountdownBlock-Bj7aoBUU.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-MC-mhtQD.js.map → CountdownBlock-Bj7aoBUU.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-dXyr7tz-.js → CountdownToolbar-B1oniVq1.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-dXyr7tz-.js.map → CountdownToolbar-B1oniVq1.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CTxSgViL.js → IssuesPanel-BXLVRo-c.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-CTxSgViL.js.map → IssuesPanel-BXLVRo-c.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-B5sCsrud.js → ModuleBrowserModal-C7BkJvzf.js} +6 -6
- package/dist/cdn/chunks/{ModuleBrowserModal-B5sCsrud.js.map → ModuleBrowserModal-C7BkJvzf.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DGTGo8kg.js → ModulePreviewCanvas-BJn-ZHlC.js} +10 -10
- package/dist/cdn/chunks/{ModulePreviewCanvas-DGTGo8kg.js.map → ModulePreviewCanvas-BJn-ZHlC.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-tAHfui6k.js → NumberWithSuffix-CkOxH3F7.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-tAHfui6k.js.map → NumberWithSuffix-CkOxH3F7.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CB5FGRs3.js → ParagraphEditor-4cMKKC-V.js} +181 -190
- package/dist/cdn/chunks/ParagraphEditor-4cMKKC-V.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-CPelbtck.js → RichTextEditorContent-7RZe4tbj.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-CPelbtck.js.map → RichTextEditorContent-7RZe4tbj.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-7f9uUUEC.js → SaveModuleDialog-mr9A4j6G.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-7f9uUUEC.js.map → SaveModuleDialog-mr9A4j6G.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C0mYpgs4.js → TitleEditor-Cqw2jvuc.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-C0mYpgs4.js.map → TitleEditor-Cqw2jvuc.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BtxaUtlx.js → blockTypeIcons-B_xRBxSU.js} +8 -8
- package/dist/cdn/chunks/{blockTypeIcons-BtxaUtlx.js.map → blockTypeIcons-B_xRBxSU.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-BJ7vaBol.js → extensions-Btyx_IMf.js} +19 -19
- package/dist/cdn/chunks/{extensions-BJ7vaBol.js.map → extensions-Btyx_IMf.js.map} +1 -1
- package/dist/cdn/chunks/{features-CgbSSCgv.js → features-Dwb5aTLg.js} +18 -16
- package/dist/cdn/chunks/features-Dwb5aTLg.js.map +1 -0
- package/dist/cdn/chunks/{icons-Dlx5MT1V.js → icons-Dhqh5lYQ.js} +2 -2
- package/dist/cdn/chunks/{icons-Dlx5MT1V.js.map → icons-Dhqh5lYQ.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-BMlykZGq.js → media-library-DRodsf2D.js} +101 -101
- package/dist/cdn/chunks/{media-library-BMlykZGq.js.map → media-library-DRodsf2D.js.map} +1 -1
- package/dist/cdn/chunks/{quality-DsVgXk_j.js → quality-A_V2Iqu_.js} +435 -435
- package/dist/cdn/chunks/{quality-DsVgXk_j.js.map → quality-A_V2Iqu_.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-DPvEtVGO.js → renderer-BM_-zceB.js} +12 -12
- package/dist/cdn/chunks/renderer-BM_-zceB.js.map +1 -0
- package/dist/cdn/chunks/{src-CAdirukY.js → src-DSomxPI-.js} +4 -4
- package/dist/cdn/chunks/{src-CAdirukY.js.map → src-DSomxPI-.js.map} +1 -1
- package/dist/cdn/chunks/{styles-D7u4vCpH.js → styles--UXn88wH.js} +829 -829
- package/dist/cdn/chunks/{styles-D7u4vCpH.js.map → styles--UXn88wH.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +30 -30
- package/dist/{dist-CFOQvhSC.js → color-DhoxCSMv.js} +9 -1
- package/dist/style.css +1 -1
- package/dist/{styles-B-yhoJnH.js → styles-CPt6RYEc.js} +6 -6
- package/dist/templatical-editor.js +4 -4
- package/dist/{useEditorCore-CV1ct_17.js → useEditorCore-CSfeEwCj.js} +196 -202
- package/package.json +8 -8
- package/dist/ColorPicker-CAgMCX3A.js +0 -442
- package/dist/cdn/chunks/ColorPicker-DmxMDn-t.js +0 -439
- package/dist/cdn/chunks/ColorPicker-DmxMDn-t.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-CB5FGRs3.js.map +0 -1
- package/dist/cdn/chunks/features-CgbSSCgv.js.map +0 -1
- package/dist/cdn/chunks/renderer-DPvEtVGO.js.map +0 -1
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { A as e, Dt as t, Et as n, N as r, O as i, Ot as a, W as o, Y as s, _ as c, c as l, d as u, h as d, i as f, l as p, m, nt as h, r as g, s as _, u as v, x as y } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
2
|
import { c as b, s as x } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
-
import { D as S, E as C, S as w, x as T } from "./useEditorCore-
|
|
4
|
-
import {
|
|
3
|
+
import { D as S, E as C, S as w, x as T } from "./useEditorCore-CSfeEwCj.js";
|
|
4
|
+
import { n as E } from "./color-DhoxCSMv.js";
|
|
5
5
|
import { I as D, L as O, P as k, g as ee, m as te, w as ne, x as re } from "./keys-BbDgCU6K.js";
|
|
6
6
|
import { t as A } from "./useI18n-eR1yVW0v.js";
|
|
7
7
|
import { t as j } from "./createLucideIcon-Bh9xOmlW.js";
|
|
8
|
-
import { a as ie, i as ae, n as M, r as oe, t as N } from "./RichTextEditorContent-
|
|
8
|
+
import { a as ie, i as ae, n as M, r as oe, t as N } from "./RichTextEditorContent-Dza2oPvh.js";
|
|
9
9
|
import { n as se, t as ce } from "./scan-line-QgyDIgn_.js";
|
|
10
10
|
import { t as le } from "./loader-circle-DFU0HPAa.js";
|
|
11
11
|
import { n as ue, r as de, t as fe } from "./text-align-start-BMU70uAm.js";
|
|
12
|
-
import { t as pe } from "./x-CG_NV3nP.js";
|
|
13
12
|
import { t as P } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
14
13
|
import { t as F } from "./usePopoverRoot-C1j0D7cc.js";
|
|
15
|
-
import { c as
|
|
16
|
-
var
|
|
14
|
+
import { c as pe, o as me, r as he, s as ge, t as I } from "./ColorPicker-Gs4BMVog.js";
|
|
15
|
+
var L = j("list-ordered", [
|
|
17
16
|
["path", {
|
|
18
17
|
d: "M11 5h10",
|
|
19
18
|
key: "1cz7ny"
|
|
@@ -38,7 +37,7 @@ var I = j("list-ordered", [
|
|
|
38
37
|
d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",
|
|
39
38
|
key: "xtkcd5"
|
|
40
39
|
}]
|
|
41
|
-
]),
|
|
40
|
+
]), _e = j("list", [
|
|
42
41
|
["path", {
|
|
43
42
|
d: "M3 5h.01",
|
|
44
43
|
key: "18ugdj"
|
|
@@ -63,7 +62,7 @@ var I = j("list-ordered", [
|
|
|
63
62
|
d: "M8 19h13",
|
|
64
63
|
key: "m83p4d"
|
|
65
64
|
}]
|
|
66
|
-
]),
|
|
65
|
+
]), ve = j("remove-formatting", [
|
|
67
66
|
["path", {
|
|
68
67
|
d: "M4 7V4h16v3",
|
|
69
68
|
key: "9msm58"
|
|
@@ -109,7 +108,7 @@ var I = j("list-ordered", [
|
|
|
109
108
|
y2: "9",
|
|
110
109
|
key: "1p4y9e"
|
|
111
110
|
}]
|
|
112
|
-
]),
|
|
111
|
+
]), ye = j("subscript", [
|
|
113
112
|
["path", {
|
|
114
113
|
d: "m4 5 8 8",
|
|
115
114
|
key: "1eunvl"
|
|
@@ -122,7 +121,7 @@ var I = j("list-ordered", [
|
|
|
122
121
|
d: "M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07",
|
|
123
122
|
key: "e8ta8j"
|
|
124
123
|
}]
|
|
125
|
-
]),
|
|
124
|
+
]), be = j("strikethrough", [
|
|
126
125
|
["path", {
|
|
127
126
|
d: "M16 4H9a3 3 0 0 0-2.83 4",
|
|
128
127
|
key: "43sutm"
|
|
@@ -138,7 +137,7 @@ var I = j("list-ordered", [
|
|
|
138
137
|
y2: "12",
|
|
139
138
|
key: "1e0a9i"
|
|
140
139
|
}]
|
|
141
|
-
]),
|
|
140
|
+
]), xe = j("superscript", [
|
|
142
141
|
["path", {
|
|
143
142
|
d: "m4 19 8-8",
|
|
144
143
|
key: "hr47gm"
|
|
@@ -151,7 +150,7 @@ var I = j("list-ordered", [
|
|
|
151
150
|
d: "M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06",
|
|
152
151
|
key: "1dfcux"
|
|
153
152
|
}]
|
|
154
|
-
]),
|
|
153
|
+
]), Se = j("underline", [["path", {
|
|
155
154
|
d: "M6 4v6a6 6 0 0 0 12 0V4",
|
|
156
155
|
key: "9kb039"
|
|
157
156
|
}], ["line", {
|
|
@@ -164,7 +163,7 @@ var I = j("list-ordered", [
|
|
|
164
163
|
"aria-label",
|
|
165
164
|
"title",
|
|
166
165
|
"aria-expanded"
|
|
167
|
-
], B = ["aria-label"], V = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, H = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, U = ["aria-label", "onClick"],
|
|
166
|
+
], B = ["aria-label"], V = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, H = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, U = ["aria-label", "onClick"], Ce = /* @__PURE__ */ c({
|
|
168
167
|
__name: "EmojiPickerDropdown",
|
|
169
168
|
emits: ["insert"],
|
|
170
169
|
setup(t, { emit: r }) {
|
|
@@ -249,7 +248,7 @@ var Y = /*#__PURE__*/ P(K, [["render", J]]), X = [
|
|
|
249
248
|
"value",
|
|
250
249
|
"aria-label",
|
|
251
250
|
"title"
|
|
252
|
-
],
|
|
251
|
+
], we = { value: "" }, Te = ["value"], Z = /* @__PURE__ */ c({
|
|
253
252
|
__name: "ToolbarSelect",
|
|
254
253
|
props: {
|
|
255
254
|
modelValue: {},
|
|
@@ -276,10 +275,10 @@ var Y = /*#__PURE__*/ P(K, [["render", J]]), X = [
|
|
|
276
275
|
"aria-label": t.label,
|
|
277
276
|
title: t.label,
|
|
278
277
|
onChange: s
|
|
279
|
-
}, [l("option",
|
|
278
|
+
}, [l("option", we, a(t.placeholder ?? ""), 1), (i(!0), u(g, null, e(t.options, (e) => (i(), u("option", {
|
|
280
279
|
key: c(e),
|
|
281
280
|
value: c(e)
|
|
282
|
-
}, a(d(e)), 9,
|
|
281
|
+
}, a(d(e)), 9, Te))), 128))], 42, X));
|
|
283
282
|
}
|
|
284
283
|
});
|
|
285
284
|
//#endregion
|
|
@@ -289,18 +288,10 @@ function Q(e, t) {
|
|
|
289
288
|
}
|
|
290
289
|
//#endregion
|
|
291
290
|
//#region src/components/blocks/ParagraphToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
292
|
-
var
|
|
293
|
-
"value",
|
|
294
|
-
"aria-label",
|
|
295
|
-
"title"
|
|
296
|
-
], ke = ["aria-label", "title"], Ae = { class: "tpl:relative" }, $ = [
|
|
297
|
-
"value",
|
|
298
|
-
"aria-label",
|
|
299
|
-
"title"
|
|
300
|
-
], je = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Me = ["aria-label", "title"], Ne = ["aria-label", "title"], Pe = {
|
|
291
|
+
var Ee = ["data-tpl-theme", "aria-label"], De = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Oe = { class: "tpl:flex tpl:items-center tpl:gap-1" }, ke = ["aria-label", "title"], Ae = ["aria-label", "title"], $ = {
|
|
301
292
|
key: 1,
|
|
302
293
|
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
303
|
-
},
|
|
294
|
+
}, je = /* @__PURE__ */ c({
|
|
304
295
|
__name: "ParagraphToolbar",
|
|
305
296
|
props: {
|
|
306
297
|
editor: {},
|
|
@@ -345,7 +336,7 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
345
336
|
return z() ? Q(B(), e?.linkColor || e?.textColor) : Q(N("color"), e?.textColor);
|
|
346
337
|
}
|
|
347
338
|
function U() {
|
|
348
|
-
return z() ? B()
|
|
339
|
+
return z() ? B() : N("color");
|
|
349
340
|
}
|
|
350
341
|
function W() {
|
|
351
342
|
return r.editor?.getAttributes("paragraph").lineHeight || "";
|
|
@@ -380,7 +371,7 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
380
371
|
transform: "translateY(-100%)",
|
|
381
372
|
flexDirection: "column"
|
|
382
373
|
})
|
|
383
|
-
}, [!e.isLoading && e.editor ? (i(), u(g, { key: 0 }, [l("div",
|
|
374
|
+
}, [!e.isLoading && e.editor ? (i(), u(g, { key: 0 }, [l("div", De, [
|
|
384
375
|
d(Z, {
|
|
385
376
|
"model-value": N("fontFamily"),
|
|
386
377
|
options: h(j),
|
|
@@ -396,7 +387,7 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
396
387
|
]),
|
|
397
388
|
d(Z, {
|
|
398
389
|
"model-value": N("fontSize"),
|
|
399
|
-
options: h(
|
|
390
|
+
options: h(me),
|
|
400
391
|
label: h(E).paragraphEditor.fontSize,
|
|
401
392
|
placeholder: h(E).paragraphEditor.defaultSize,
|
|
402
393
|
"width-class": "tpl:w-20",
|
|
@@ -408,40 +399,39 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
408
399
|
"placeholder"
|
|
409
400
|
]),
|
|
410
401
|
d(Y),
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
402
|
+
d(I, {
|
|
403
|
+
"swatch-only": "",
|
|
404
|
+
size: "sm",
|
|
405
|
+
"data-testid": "text-color-picker",
|
|
406
|
+
"model-value": U(),
|
|
407
|
+
"seed-color": H(),
|
|
415
408
|
"aria-label": h(E).paragraphEditor.textColor,
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
"
|
|
428
|
-
})], 8, ke)) : v("", !0)]),
|
|
429
|
-
l("div", Ae, [l("input", {
|
|
430
|
-
type: "color",
|
|
431
|
-
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
432
|
-
style: t({ backgroundColor: J() || "var(--tpl-bg)" }),
|
|
433
|
-
value: J() || h("#ffff00"),
|
|
409
|
+
"onUpdate:modelValue": V
|
|
410
|
+
}, null, 8, [
|
|
411
|
+
"model-value",
|
|
412
|
+
"seed-color",
|
|
413
|
+
"aria-label"
|
|
414
|
+
]),
|
|
415
|
+
d(I, {
|
|
416
|
+
"swatch-only": "",
|
|
417
|
+
size: "sm",
|
|
418
|
+
"data-testid": "highlight-color-picker",
|
|
419
|
+
"model-value": J(),
|
|
420
|
+
"seed-color": h(he),
|
|
434
421
|
"aria-label": h(E).paragraphEditor.highlightColor,
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
422
|
+
"onUpdate:modelValue": X
|
|
423
|
+
}, null, 8, [
|
|
424
|
+
"model-value",
|
|
425
|
+
"seed-color",
|
|
426
|
+
"aria-label"
|
|
427
|
+
]),
|
|
438
428
|
d(Y),
|
|
439
429
|
d(G, {
|
|
440
430
|
icon: h(ie),
|
|
441
431
|
label: h(E).paragraphEditor.bold,
|
|
442
432
|
active: e.editor.isActive("bold"),
|
|
443
433
|
"stroke-width": 2.5,
|
|
444
|
-
onClick: r[
|
|
434
|
+
onClick: r[0] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
445
435
|
}, null, 8, [
|
|
446
436
|
"icon",
|
|
447
437
|
"label",
|
|
@@ -451,27 +441,27 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
451
441
|
icon: h(ae),
|
|
452
442
|
label: h(E).paragraphEditor.italic,
|
|
453
443
|
active: e.editor.isActive("italic"),
|
|
454
|
-
onClick: r[
|
|
444
|
+
onClick: r[1] ||= (t) => e.editor.chain().focus().toggleItalic().run()
|
|
455
445
|
}, null, 8, [
|
|
456
446
|
"icon",
|
|
457
447
|
"label",
|
|
458
448
|
"active"
|
|
459
449
|
]),
|
|
460
450
|
d(G, {
|
|
461
|
-
icon: h(
|
|
451
|
+
icon: h(Se),
|
|
462
452
|
label: h(E).paragraphEditor.underline,
|
|
463
453
|
active: e.editor.isActive("underline"),
|
|
464
|
-
onClick: r[
|
|
454
|
+
onClick: r[2] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
|
|
465
455
|
}, null, 8, [
|
|
466
456
|
"icon",
|
|
467
457
|
"label",
|
|
468
458
|
"active"
|
|
469
459
|
]),
|
|
470
460
|
d(G, {
|
|
471
|
-
icon: h(
|
|
461
|
+
icon: h(be),
|
|
472
462
|
label: h(E).paragraphEditor.strikethrough,
|
|
473
463
|
active: e.editor.isActive("strike"),
|
|
474
|
-
onClick: r[
|
|
464
|
+
onClick: r[3] ||= (t) => e.editor.chain().focus().toggleStrike().run()
|
|
475
465
|
}, null, 8, [
|
|
476
466
|
"icon",
|
|
477
467
|
"label",
|
|
@@ -479,20 +469,20 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
479
469
|
]),
|
|
480
470
|
d(Y),
|
|
481
471
|
d(G, {
|
|
482
|
-
icon: h(
|
|
472
|
+
icon: h(ye),
|
|
483
473
|
label: h(E).paragraphEditor.subscript,
|
|
484
474
|
active: e.editor.isActive("subscript"),
|
|
485
|
-
onClick: r[
|
|
475
|
+
onClick: r[4] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
|
|
486
476
|
}, null, 8, [
|
|
487
477
|
"icon",
|
|
488
478
|
"label",
|
|
489
479
|
"active"
|
|
490
480
|
]),
|
|
491
481
|
d(G, {
|
|
492
|
-
icon: h(
|
|
482
|
+
icon: h(xe),
|
|
493
483
|
label: h(E).paragraphEditor.superscript,
|
|
494
484
|
active: e.editor.isActive("superscript"),
|
|
495
|
-
onClick: r[
|
|
485
|
+
onClick: r[5] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
|
|
496
486
|
}, null, 8, [
|
|
497
487
|
"icon",
|
|
498
488
|
"label",
|
|
@@ -503,28 +493,28 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
503
493
|
icon: h(oe),
|
|
504
494
|
label: h(E).paragraphEditor.addLink,
|
|
505
495
|
active: e.editor.isActive("link"),
|
|
506
|
-
onClick: r[
|
|
496
|
+
onClick: r[6] ||= (e) => o("open-link-dialog")
|
|
507
497
|
}, null, 8, [
|
|
508
498
|
"icon",
|
|
509
499
|
"label",
|
|
510
500
|
"active"
|
|
511
501
|
])
|
|
512
|
-
]), l("div",
|
|
502
|
+
]), l("div", Oe, [
|
|
513
503
|
d(G, {
|
|
514
|
-
icon: h(
|
|
504
|
+
icon: h(_e),
|
|
515
505
|
label: h(E).paragraphEditor.bulletList,
|
|
516
506
|
active: e.editor.isActive("bulletList"),
|
|
517
|
-
onClick: r[
|
|
507
|
+
onClick: r[7] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
|
|
518
508
|
}, null, 8, [
|
|
519
509
|
"icon",
|
|
520
510
|
"label",
|
|
521
511
|
"active"
|
|
522
512
|
]),
|
|
523
513
|
d(G, {
|
|
524
|
-
icon: h(
|
|
514
|
+
icon: h(L),
|
|
525
515
|
label: h(E).paragraphEditor.numberedList,
|
|
526
516
|
active: e.editor.isActive("orderedList"),
|
|
527
|
-
onClick: r[
|
|
517
|
+
onClick: r[8] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
|
|
528
518
|
}, null, 8, [
|
|
529
519
|
"icon",
|
|
530
520
|
"label",
|
|
@@ -535,7 +525,7 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
535
525
|
icon: h(fe),
|
|
536
526
|
label: h(E).paragraphEditor.alignLeft,
|
|
537
527
|
active: e.editor.isActive({ textAlign: "left" }),
|
|
538
|
-
onClick: r[
|
|
528
|
+
onClick: r[9] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
539
529
|
}, null, 8, [
|
|
540
530
|
"icon",
|
|
541
531
|
"label",
|
|
@@ -545,7 +535,7 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
545
535
|
icon: h(ue),
|
|
546
536
|
label: h(E).paragraphEditor.alignCenter,
|
|
547
537
|
active: e.editor.isActive({ textAlign: "center" }),
|
|
548
|
-
onClick: r[
|
|
538
|
+
onClick: r[10] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
|
|
549
539
|
}, null, 8, [
|
|
550
540
|
"icon",
|
|
551
541
|
"label",
|
|
@@ -555,7 +545,7 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
555
545
|
icon: h(de),
|
|
556
546
|
label: h(E).paragraphEditor.alignRight,
|
|
557
547
|
active: e.editor.isActive({ textAlign: "right" }),
|
|
558
|
-
onClick: r[
|
|
548
|
+
onClick: r[11] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
559
549
|
}, null, 8, [
|
|
560
550
|
"icon",
|
|
561
551
|
"label",
|
|
@@ -564,7 +554,7 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
564
554
|
d(Y),
|
|
565
555
|
d(Z, {
|
|
566
556
|
"model-value": W(),
|
|
567
|
-
options: h(
|
|
557
|
+
options: h(pe),
|
|
568
558
|
label: h(E).paragraphEditor.lineHeight,
|
|
569
559
|
placeholder: "LH",
|
|
570
560
|
"width-class": "tpl:w-16",
|
|
@@ -588,40 +578,40 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
588
578
|
]),
|
|
589
579
|
d(Y),
|
|
590
580
|
d(G, {
|
|
591
|
-
icon: h(
|
|
581
|
+
icon: h(ve),
|
|
592
582
|
label: h(E).paragraphEditor.clearFormatting,
|
|
593
|
-
onClick: r[
|
|
583
|
+
onClick: r[12] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
|
|
594
584
|
}, null, 8, ["icon", "label"]),
|
|
595
585
|
d(Y),
|
|
596
|
-
d(
|
|
586
|
+
d(Ce, { onInsert: M }),
|
|
597
587
|
e.canRequestMergeTag ? (i(), u(g, { key: 0 }, [d(Y), l("button", {
|
|
598
588
|
type: "button",
|
|
599
589
|
class: "tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-bg-active)]",
|
|
600
590
|
"aria-label": h(E).mergeTag.insert,
|
|
601
591
|
title: h(E).mergeTag.insert,
|
|
602
|
-
onClick: r[
|
|
592
|
+
onClick: r[13] ||= (e) => o("add-merge-tag")
|
|
603
593
|
}, [d(h(ce), {
|
|
604
594
|
size: 16,
|
|
605
595
|
"stroke-width": 2
|
|
606
|
-
}), m(" " + a(h(E).mergeTag.insertShort), 1)], 8,
|
|
596
|
+
}), m(" " + a(h(E).mergeTag.insertShort), 1)], 8, ke)], 64)) : v("", !0),
|
|
607
597
|
e.canInsertLogicTag ? (i(), u(g, { key: 1 }, [d(Y), l("button", {
|
|
608
598
|
type: "button",
|
|
609
599
|
class: "tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-bg-active)]",
|
|
610
600
|
"aria-label": h(E).logicTag.insert,
|
|
611
601
|
title: h(E).logicTag.insert,
|
|
612
602
|
"data-testid": "insert-logic-button",
|
|
613
|
-
onClick: r[
|
|
603
|
+
onClick: r[14] ||= (e) => o("add-logic-tag")
|
|
614
604
|
}, [d(h(se), {
|
|
615
605
|
size: 16,
|
|
616
606
|
"stroke-width": 2
|
|
617
|
-
}), m(" " + a(h(E).logicTag.insertShort), 1)], 8,
|
|
618
|
-
])], 64)) : (i(), u("div",
|
|
607
|
+
}), m(" " + a(h(E).logicTag.insertShort), 1)], 8, Ae)], 64)) : v("", !0)
|
|
608
|
+
])], 64)) : (i(), u("div", $, [d(h(le), {
|
|
619
609
|
class: "tpl-spinner",
|
|
620
610
|
size: 14,
|
|
621
611
|
"stroke-width": 2
|
|
622
|
-
}), m(" " + a(h(E).errors.editorLoading), 1)]))], 12,
|
|
612
|
+
}), m(" " + a(h(E).errors.editorLoading), 1)]))], 12, Ee)], 8, ["to"])) : v("", !0);
|
|
623
613
|
}
|
|
624
|
-
}),
|
|
614
|
+
}), Me = { class: "tpl-text-editor-wrapper tpl:relative" }, Ne = /* @__PURE__ */ c({
|
|
625
615
|
__name: "ParagraphEditor",
|
|
626
616
|
props: {
|
|
627
617
|
block: {},
|
|
@@ -694,8 +684,8 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
694
684
|
};
|
|
695
685
|
}
|
|
696
686
|
});
|
|
697
|
-
return (t, n) => (i(), u("div",
|
|
698
|
-
d(
|
|
687
|
+
return (t, n) => (i(), u("div", Me, [
|
|
688
|
+
d(je, {
|
|
699
689
|
editor: h(s),
|
|
700
690
|
"toolbar-position": e.toolbarPosition,
|
|
701
691
|
"is-loading": h(l),
|
|
@@ -755,4 +745,4 @@ var Te = ["data-tpl-theme", "aria-label"], Ee = { class: "tpl:flex tpl:items-cen
|
|
|
755
745
|
}
|
|
756
746
|
});
|
|
757
747
|
//#endregion
|
|
758
|
-
export {
|
|
748
|
+
export { Ne as default };
|
|
@@ -5,7 +5,7 @@ import { t as C } from "./useI18n-eR1yVW0v.js";
|
|
|
5
5
|
import { t as w } from "./createLucideIcon-Bh9xOmlW.js";
|
|
6
6
|
import { t as T } from "./x-CG_NV3nP.js";
|
|
7
7
|
import { t as E } from "./usePopoverRoot-C1j0D7cc.js";
|
|
8
|
-
import { t as D } from "./ColorPicker-
|
|
8
|
+
import { t as D } from "./ColorPicker-Gs4BMVog.js";
|
|
9
9
|
var O = w("bold", [["path", {
|
|
10
10
|
d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",
|
|
11
11
|
key: "mg9rjx"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { A as e, Dt as t, Et as n, I as r, O as i, Ot as a, R as o, Y as s, _ as c, c as l, d as u, h as d, l as f, m as p, nt as m, r as h, s as g, u as ee, z as _ } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
2
|
import { a as v } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
-
import "./useEditorCore-
|
|
3
|
+
import "./useEditorCore-CSfeEwCj.js";
|
|
4
4
|
import { L as y, j as b, m as x } from "./keys-BbDgCU6K.js";
|
|
5
5
|
import { t as S } from "./useI18n-eR1yVW0v.js";
|
|
6
6
|
import { t as te } from "./loader-circle-DFU0HPAa.js";
|
|
7
7
|
import { n as ne } from "./useCloudI18n-WbfVWq5k.js";
|
|
8
|
-
import { t as re } from "./TplModal-
|
|
8
|
+
import { t as re } from "./TplModal-DObT0uxf.js";
|
|
9
9
|
//#region src/cloud/components/SaveModuleDialog.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var C = ["aria-busy"], w = {
|
|
11
11
|
id: "tpl-save-module-title",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as e, Et as t, I as n, O as r, Ot as i, R as a, Y as o, _ as s, c, d as l, h as u, nt as d, r as f, s as p, u as m } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
2
|
import { c as h, t as g } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
-
import "./useEditorCore-
|
|
4
|
-
import {
|
|
3
|
+
import "./useEditorCore-CSfeEwCj.js";
|
|
4
|
+
import { n as _ } from "./color-DhoxCSMv.js";
|
|
5
5
|
import { t as v } from "./useI18n-eR1yVW0v.js";
|
|
6
6
|
import { t as y } from "./createLucideIcon-Bh9xOmlW.js";
|
|
7
7
|
import { t as b } from "./chevron-down-ByXpufZD.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { A as e, Et as t, I as n, O as r, Ot as i, R as a, Y as o, _ as s, c, d as l, h as u, l as d, m as f, nt as p, r as m, u as h, z as g } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
2
|
import { i as _ } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
-
import "./useEditorCore-
|
|
3
|
+
import "./useEditorCore-CSfeEwCj.js";
|
|
4
4
|
import { t as v } from "./loader-circle-DFU0HPAa.js";
|
|
5
5
|
import { n as y } from "./useCloudI18n-WbfVWq5k.js";
|
|
6
|
-
import { t as b } from "./TplModal-
|
|
6
|
+
import { t as b } from "./TplModal-DObT0uxf.js";
|
|
7
7
|
//#region src/cloud/components/TestEmailModal.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var x = ["aria-busy"], S = {
|
|
9
9
|
id: "tpl-test-email-title",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Dt as e, Et as t, O as n, Ot as r, W as i, _ as a, c as o, d as s, h as c, i as l, l as u, m as d, nt as f, r as p, s as m, u as h, x as g } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
|
-
import { S as ee, x as te } from "./useEditorCore-
|
|
2
|
+
import { S as ee, x as te } from "./useEditorCore-CSfeEwCj.js";
|
|
3
3
|
import { I as ne, P as _, w as v, x as y } from "./keys-BbDgCU6K.js";
|
|
4
4
|
import { t as b } from "./useI18n-eR1yVW0v.js";
|
|
5
|
-
import { a as re, i as ie, n as ae, r as oe, t as se } from "./RichTextEditorContent-
|
|
5
|
+
import { a as re, i as ie, n as ae, r as oe, t as se } from "./RichTextEditorContent-Dza2oPvh.js";
|
|
6
6
|
import { n as ce, t as x } from "./scan-line-QgyDIgn_.js";
|
|
7
7
|
import { t as S } from "./loader-circle-DFU0HPAa.js";
|
|
8
8
|
import { t as C } from "./usePopoverRoot-C1j0D7cc.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { O as e, R as t, Y as n, _ as r, c as i, d as a, h as o, i as s, j as c, l, nt as u, s as d, u as f, x as p } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
2
|
import { c as m, t as h } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
-
import { D as g } from "./useEditorCore-
|
|
3
|
+
import { D as g } from "./useEditorCore-CSfeEwCj.js";
|
|
4
4
|
import { I as _ } from "./keys-BbDgCU6K.js";
|
|
5
5
|
import { t as v } from "./usePopoverRoot-C1j0D7cc.js";
|
|
6
6
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, F as t, M as n, j as r, k as i } from "./useEditorCore-
|
|
1
|
+
import { A as e, F as t, M as n, j as r, k as i } from "./useEditorCore-CSfeEwCj.js";
|
|
2
2
|
import { t as a } from "./createLucideIcon-Bh9xOmlW.js";
|
|
3
3
|
var o = a("columns-3", [
|
|
4
4
|
["rect", {
|
package/dist/bundle-stats.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.16.
|
|
3
|
-
"initialGzipBytes":
|
|
4
|
-
"initialRawBytes":
|
|
2
|
+
"version": "0.16.3",
|
|
3
|
+
"initialGzipBytes": 282054,
|
|
4
|
+
"initialRawBytes": 1014968,
|
|
5
5
|
"initialFileCount": 42,
|
|
6
|
-
"lazyGzipBytes":
|
|
7
|
-
"lazyRawBytes":
|
|
6
|
+
"lazyGzipBytes": 181472,
|
|
7
|
+
"lazyRawBytes": 596219,
|
|
8
8
|
"lazyFileCount": 46,
|
|
9
|
-
"generatedAt": "2026-07-
|
|
9
|
+
"generatedAt": "2026-07-19T22:05:50.617Z"
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { L as e, M as t, P as n, ct as r, f as i, g as a, m as o, p as s, st as c, u as l, x as u } from "./draggable-D840DIZB.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Bt as d, Tt as f, at as p, dn as m, ht as h, mt as g, st as _ } from "./features-Dwb5aTLg.js";
|
|
3
3
|
//#region src/cloud/components/AiFeatureMenu.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var v = {
|
|
5
5
|
class: "tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
@@ -7,27 +7,27 @@ var v = {
|
|
|
7
7
|
"backdrop-filter": "blur(8px)",
|
|
8
8
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
9
9
|
}
|
|
10
|
-
}, y = ["onClick"], b = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, x = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, S = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]" }, C = /*#__PURE__*/
|
|
10
|
+
}, y = ["onClick"], b = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, x = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, S = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]" }, C = /*#__PURE__*/ _(/* @__PURE__ */ u({
|
|
11
11
|
__name: "AiFeatureMenu",
|
|
12
12
|
props: { activeFeature: {} },
|
|
13
13
|
emits: ["select"],
|
|
14
|
-
setup(u, { emit:
|
|
15
|
-
let C =
|
|
14
|
+
setup(u, { emit: _ }) {
|
|
15
|
+
let C = _, { t: w } = p(), T = m(d, "AiFeatureMenu"), E = {
|
|
16
16
|
"ai-chat": "chat",
|
|
17
17
|
"design-reference": "designToTemplate",
|
|
18
18
|
scoring: "scoring"
|
|
19
19
|
}, D = [
|
|
20
20
|
{
|
|
21
21
|
key: "ai-chat",
|
|
22
|
-
icon:
|
|
22
|
+
icon: g
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
key: "design-reference",
|
|
26
|
-
icon:
|
|
26
|
+
icon: f
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
key: "scoring",
|
|
30
|
-
icon:
|
|
30
|
+
icon: h
|
|
31
31
|
}
|
|
32
32
|
], O = i(() => D.filter((e) => T.isFeatureEnabled(E[e.key])));
|
|
33
33
|
function k(e) {
|
|
@@ -56,4 +56,4 @@ var v = {
|
|
|
56
56
|
//#endregion
|
|
57
57
|
export { C as default };
|
|
58
58
|
|
|
59
|
-
//# sourceMappingURL=AiFeatureMenu-
|
|
59
|
+
//# sourceMappingURL=AiFeatureMenu-CyUCHd9I.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiFeatureMenu-
|
|
1
|
+
{"version":3,"file":"AiFeatureMenu-CyUCHd9I.js","names":[],"sources":["../../../src/cloud/components/AiFeatureMenu.vue","../../../src/cloud/components/AiFeatureMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { AI_CONFIG_KEY, requireInject } from \"../../keys\";\nimport type { AiConfig } from \"@templatical/types\";\nimport { ImageUp, ShieldCheck, Sparkles } from \"@lucide/vue\";\nimport { computed } from \"vue\";\n\nexport type AiFeature = \"ai-chat\" | \"design-reference\" | \"scoring\";\n\ndefineProps<{\n activeFeature: AiFeature | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"select\", feature: AiFeature): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst aiConfig = requireInject(AI_CONFIG_KEY, \"AiFeatureMenu\");\n\nconst configKeyMap: Record<AiFeature, keyof AiConfig> = {\n \"ai-chat\": \"chat\",\n \"design-reference\": \"designToTemplate\",\n scoring: \"scoring\",\n};\n\nconst allFeatures: { key: AiFeature; icon: typeof Sparkles }[] = [\n { key: \"ai-chat\", icon: Sparkles },\n { key: \"design-reference\", icon: ImageUp },\n { key: \"scoring\", icon: ShieldCheck },\n];\n\nconst features = computed(() =>\n allFeatures.filter((f) => aiConfig.isFeatureEnabled(configKeyMap[f.key])),\n);\n\nfunction getTitle(key: AiFeature): string {\n if (key === \"ai-chat\") return cloudT.aiMenu.aiAssistant;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplate;\n return cloudT.aiMenu.templateScore;\n}\n\nfunction getDescription(key: AiFeature): string {\n if (key === \"ai-chat\") return cloudT.aiMenu.aiAssistantDesc;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplateDesc;\n return cloudT.aiMenu.templateScoreDesc;\n}\n</script>\n\n<template>\n <div\n class=\"tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px)\"\n >\n <button\n v-for=\"feature in features\"\n :key=\"feature.key\"\n class=\"tpl-ai-feature-menu-item tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-start tpl:gap-3 tpl:border-none tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary-light)'\n : 'transparent',\n }\"\n @click=\"emit('select', feature.key)\"\n >\n <div\n class=\"tpl:mt-0.5 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)]\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary)'\n : 'var(--tpl-bg-active)',\n color:\n activeFeature === feature.key\n ? 'var(--tpl-bg)'\n : 'var(--tpl-text-muted)',\n }\"\n >\n <component :is=\"feature.icon\" :size=\"15\" :stroke-width=\"2\" />\n </div>\n <div class=\"tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5\">\n <span class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]\">\n {{ getTitle(feature.key) }}\n </span>\n <span\n class=\"tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ getDescription(feature.key) }}\n </span>\n </div>\n </button>\n </div>\n</template>\n\n<style scoped>\n.tpl-ai-feature-menu-item:hover {\n background-color: var(--tpl-bg-hover) !important;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { AI_CONFIG_KEY, requireInject } from \"../../keys\";\nimport type { AiConfig } from \"@templatical/types\";\nimport { ImageUp, ShieldCheck, Sparkles } from \"@lucide/vue\";\nimport { computed } from \"vue\";\n\nexport type AiFeature = \"ai-chat\" | \"design-reference\" | \"scoring\";\n\ndefineProps<{\n activeFeature: AiFeature | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"select\", feature: AiFeature): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst aiConfig = requireInject(AI_CONFIG_KEY, \"AiFeatureMenu\");\n\nconst configKeyMap: Record<AiFeature, keyof AiConfig> = {\n \"ai-chat\": \"chat\",\n \"design-reference\": \"designToTemplate\",\n scoring: \"scoring\",\n};\n\nconst allFeatures: { key: AiFeature; icon: typeof Sparkles }[] = [\n { key: \"ai-chat\", icon: Sparkles },\n { key: \"design-reference\", icon: ImageUp },\n { key: \"scoring\", icon: ShieldCheck },\n];\n\nconst features = computed(() =>\n allFeatures.filter((f) => aiConfig.isFeatureEnabled(configKeyMap[f.key])),\n);\n\nfunction getTitle(key: AiFeature): string {\n if (key === \"ai-chat\") return cloudT.aiMenu.aiAssistant;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplate;\n return cloudT.aiMenu.templateScore;\n}\n\nfunction getDescription(key: AiFeature): string {\n if (key === \"ai-chat\") return cloudT.aiMenu.aiAssistantDesc;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplateDesc;\n return cloudT.aiMenu.templateScoreDesc;\n}\n</script>\n\n<template>\n <div\n class=\"tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px)\"\n >\n <button\n v-for=\"feature in features\"\n :key=\"feature.key\"\n class=\"tpl-ai-feature-menu-item tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-start tpl:gap-3 tpl:border-none tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary-light)'\n : 'transparent',\n }\"\n @click=\"emit('select', feature.key)\"\n >\n <div\n class=\"tpl:mt-0.5 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)]\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary)'\n : 'var(--tpl-bg-active)',\n color:\n activeFeature === feature.key\n ? 'var(--tpl-bg)'\n : 'var(--tpl-text-muted)',\n }\"\n >\n <component :is=\"feature.icon\" :size=\"15\" :stroke-width=\"2\" />\n </div>\n <div class=\"tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5\">\n <span class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]\">\n {{ getTitle(feature.key) }}\n </span>\n <span\n class=\"tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ getDescription(feature.key) }}\n </span>\n </div>\n </button>\n </div>\n</template>\n\n<style scoped>\n.tpl-ai-feature-menu-item:hover {\n background-color: var(--tpl-bg-hover) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAaA,IAAM,IAAO,GAIP,EAAE,GAAG,MAAW,EAAmB,GAEnC,IAAW,EAAc,GAAe,eAAe,GAEvD,IAAkD;GACtD,WAAW;GACX,oBAAoB;GACpB,SAAS;EACX,GAEM,IAA2D;GAC/D;IAAE,KAAK;IAAW,MAAM;GAAS;GACjC;IAAE,KAAK;IAAoB,MAAM;GAAQ;GACzC;IAAE,KAAK;IAAW,MAAM;GAAY;EACtC,GAEM,IAAW,QACf,EAAY,QAAQ,MAAM,EAAS,iBAAiB,EAAa,EAAE,IAAI,CAAC,CAC1E;EAEA,SAAS,EAAS,GAAwB;GAGxC,OAFI,MAAQ,YAAkB,EAAO,OAAO,cACxC,MAAQ,qBAA2B,EAAO,OAAO,mBAC9C,EAAO,OAAO;EACvB;EAEA,SAAS,EAAe,GAAwB;GAG9C,OAFI,MAAQ,YAAkB,EAAO,OAAO,kBACxC,MAAQ,qBAA2B,EAAO,OAAO,uBAC9C,EAAO,OAAO;EACvB;yBAIE,EA0CM,OA1CN,GA0CM,EAAA,EAAA,EAAA,GAtCJ,EAqCS,GAAA,MAAA,EApCW,EAAA,QAAX,YADT,EAqCS,UAAA;GAnCN,KAAK,EAAQ;GACd,OAAM;GACL,OAAK,EAAA,EAAA,iBAAuC,EAAA,kBAAkB,EAAQ,MAAA,6BAAA,cAAA,CAAA;GAMtE,UAAK,MAAE,EAAI,UAAW,EAAQ,GAAG;MAElC,EAcM,OAAA;GAbJ,OAAM;GACL,OAAK,EAAA;qBAA2C,EAAA,kBAAkB,EAAQ,MAAA,uBAAA;WAA8G,EAAA,kBAAkB,EAAQ,MAAA,kBAAA;;YAWnN,EAA6D,EAA7C,EAAQ,IAAI,GAAA;GAAG,MAAM;GAAK,gBAAc;YAE1D,EASM,OATN,GASM,CARJ,EAEO,QAFP,GAEO,EADF,EAAS,EAAQ,GAAG,CAAA,GAAA,CAAA,GAEzB,EAIO,QAJP,GAIO,EADF,EAAe,EAAQ,GAAG,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,GAAA,IAAA,CAAA"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { M as e, T as t, f as n, g as r, h as i, it as a, m as o, ot as s, x as c } from "./draggable-D840DIZB.js";
|
|
2
|
-
import {
|
|
2
|
+
import { dt as l, jt as u, sn as d, zt as f } from "./features-Dwb5aTLg.js";
|
|
3
3
|
//#region src/components/canvas/BlockIssueBadge.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var p = ["title", "aria-label"], m = /* @__PURE__ */ c({
|
|
5
5
|
__name: "BlockIssueBadge",
|
|
6
6
|
props: { blockId: {} },
|
|
7
7
|
setup(c) {
|
|
8
|
-
let m = c, { t: h } =
|
|
8
|
+
let m = c, { t: h } = f(), g = t(d, null), _ = n(() => (g?.issues.value ?? []).filter((e) => e.blockId === m.blockId)), v = n(() => _.value.some((e) => e.severity === "error") ? "error" : _.value.some((e) => e.severity === "warning") ? "warning" : null), y = n(() => v.value === "error" ? h.issues.badgeError : h.issues.badgeWarning);
|
|
9
9
|
return (t, n) => v.value ? (e(), r("span", {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: s(["tpl:absolute tpl:top-1 tpl:right-1 tpl:z-10 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)] tpl:ring-1 tpl:ring-[var(--tpl-border)]", v.value === "error" ? "tpl:text-[var(--tpl-danger)]" : "tpl:text-[var(--tpl-warning)]"]),
|
|
12
12
|
title: y.value,
|
|
13
13
|
"aria-label": y.value,
|
|
14
14
|
role: "img"
|
|
15
|
-
}, [v.value === "error" ? (e(), o(a(
|
|
15
|
+
}, [v.value === "error" ? (e(), o(a(u), {
|
|
16
16
|
key: 0,
|
|
17
17
|
size: 14,
|
|
18
18
|
"stroke-width": 2.25,
|
|
19
19
|
fill: "currentColor",
|
|
20
20
|
stroke: "var(--tpl-bg)"
|
|
21
|
-
})) : (e(), o(a(
|
|
21
|
+
})) : (e(), o(a(l), {
|
|
22
22
|
key: 1,
|
|
23
23
|
size: 14,
|
|
24
24
|
"stroke-width": 2.25,
|
|
@@ -30,4 +30,4 @@ var p = ["title", "aria-label"], m = /* @__PURE__ */ c({
|
|
|
30
30
|
//#endregion
|
|
31
31
|
export { m as default };
|
|
32
32
|
|
|
33
|
-
//# sourceMappingURL=BlockIssueBadge-
|
|
33
|
+
//# sourceMappingURL=BlockIssueBadge-BAa_dI-c.js.map
|