@templatical/editor 0.21.0 → 0.21.2
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-CPdNpHpZ.js → AiFeatureMenu-CcqQDHzJ.js} +1 -1
- package/dist/{CloudEditor-3a7mqMhe.js → CloudEditor-DOjGJwPe.js} +24 -24
- package/dist/{CollaboratorBar-Ds0YZWzV.js → CollaboratorBar-Bj4NZiie.js} +1 -1
- package/dist/CountdownBlock-J_Q9JRQM.js +91 -0
- package/dist/{ParagraphEditor-CkwBirNl.js → ParagraphEditor--_zWfxps.js} +1 -1
- package/dist/{SaveBlockDialog-Cc5BSUBx.js → SaveBlockDialog-CYIEHABH.js} +3 -3
- package/dist/{SavedBlockPreviewCanvas-ubttfmKr.js → SavedBlockPreviewCanvas-2-mzAnZE.js} +1 -1
- package/dist/{SavedBlocksBrowserModal-LkY_U3lY.js → SavedBlocksBrowserModal-D5V5yF_3.js} +4 -4
- package/dist/{SavedBlocksPanels-CET0zvH6.js → SavedBlocksPanels-Dff38YXu.js} +1 -1
- package/dist/{SavedBlocksPickBar-poGS4PoI.js → SavedBlocksPickBar-rB6iyji6.js} +1 -1
- package/dist/{SnapshotHistory-BvF5IXn1.js → SnapshotHistory-FtzDq8f0.js} +1 -1
- package/dist/{TestEmailModal-BRaM_eko.js → TestEmailModal-DL2O1H8M.js} +2 -2
- package/dist/{TitleEditor-Bhgzh-iQ.js → TitleEditor-CPda5lh-.js} +1 -1
- package/dist/{TplModal-BA-Zsg0O.js → TplModal-C7Koj5gM.js} +1 -1
- package/dist/{blockTypeIcons-B1-Yzp-a.js → blockTypeIcons-CgwECCut.js} +1 -1
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js +203 -0
- package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu--PdArSnv.js → AiFeatureMenu-Duwg413F.js} +9 -5
- package/dist/cdn/chunks/{AiFeatureMenu--PdArSnv.js.map → AiFeatureMenu-Duwg413F.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DMSd0SIl.js → BlockIssueBadge-Da4yR-mh.js} +7 -5
- package/dist/cdn/chunks/{BlockIssueBadge-DMSd0SIl.js.map → BlockIssueBadge-Da4yR-mh.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DnTfI5GU.js → CloudEditor-C0Y4RD4c.js} +162 -153
- package/dist/cdn/chunks/CloudEditor-C0Y4RD4c.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CBqd7ldq.js → CollaboratorBar-BS3rJy6-.js} +7 -6
- package/dist/cdn/chunks/{CollaboratorBar-CBqd7ldq.js.map → CollaboratorBar-BS3rJy6-.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-DCdWP8YB.js → ColorPicker-DZSzZ5ZP.js} +107 -103
- package/dist/cdn/chunks/{ColorPicker-DCdWP8YB.js.map → ColorPicker-DZSzZ5ZP.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js +412 -0
- package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-Bffpoppw.js +93 -0
- package/dist/cdn/chunks/{CountdownBlock-BDnWMAME.js.map → CountdownBlock-Bffpoppw.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BbLoo22S.js → CountdownToolbar-DAnmIZjq.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-BbLoo22S.js.map → CountdownToolbar-DAnmIZjq.js.map} +1 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js +223 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-CfudrI3T.js → IssuesPanel-D80JedOj.js} +11 -10
- package/dist/cdn/chunks/{IssuesPanel-CfudrI3T.js.map → IssuesPanel-D80JedOj.js.map} +1 -1
- package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js +12 -0
- package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js.map +1 -0
- package/dist/cdn/chunks/{NumberWithSuffix-BmMx9_n_.js → NumberWithSuffix-CjlVNIEe.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-BmMx9_n_.js.map → NumberWithSuffix-CjlVNIEe.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DPCUSXpx.js → ParagraphEditor-CtaRa1vr.js} +73 -68
- package/dist/cdn/chunks/{ParagraphEditor-DPCUSXpx.js.map → ParagraphEditor-CtaRa1vr.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-B8dOiv_D.js → RichTextEditorContent-BbdgJqWM.js} +9 -6
- package/dist/cdn/chunks/{RichTextEditorContent-B8dOiv_D.js.map → RichTextEditorContent-BbdgJqWM.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BY3SMnNV.js → SaveBlockDialog-Bb3fdUEZ.js} +30 -26
- package/dist/cdn/chunks/{SaveBlockDialog-BY3SMnNV.js.map → SaveBlockDialog-Bb3fdUEZ.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlockPreviewCanvas-LpaOcusq.js → SavedBlockPreviewCanvas-DZOMgNsz.js} +33 -32
- package/dist/cdn/chunks/{SavedBlockPreviewCanvas-LpaOcusq.js.map → SavedBlockPreviewCanvas-DZOMgNsz.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CfIcmyzF.js → SavedBlocksBrowserModal-CeUWcPv0.js} +14 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CfIcmyzF.js.map → SavedBlocksBrowserModal-CeUWcPv0.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-kIowCfh_.js → SavedBlocksPanels-D-pA_wfk.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-kIowCfh_.js.map → SavedBlocksPanels-D-pA_wfk.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-WSGe1GiZ.js → SavedBlocksPickBar-1rf1KpqS.js} +6 -4
- package/dist/cdn/chunks/{SavedBlocksPickBar-WSGe1GiZ.js.map → SavedBlocksPickBar-1rf1KpqS.js.map} +1 -1
- package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js +121 -0
- package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js.map +1 -0
- package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js +231 -0
- package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js.map +1 -0
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js +96 -0
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-iwd-O9sO.js → TitleEditor-BJ7LFykI.js} +15 -12
- package/dist/cdn/chunks/{TitleEditor-iwd-O9sO.js.map → TitleEditor-BJ7LFykI.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-CH9RzKF7.js +50 -0
- package/dist/cdn/chunks/TplModal-CH9RzKF7.js.map +1 -0
- package/dist/cdn/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/cdn/chunks/blockTypeIcons-etMMQoVv.js +21 -0
- package/dist/cdn/chunks/{blockTypeIcons-BYz0fgLz.js.map → blockTypeIcons-etMMQoVv.js.map} +1 -1
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js +1787 -0
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js.map +1 -0
- package/dist/cdn/chunks/dist-CiBEt0VR.js +163 -0
- package/dist/cdn/chunks/dist-CiBEt0VR.js.map +1 -0
- package/dist/cdn/chunks/dist-CxTt8FRE.js +403 -0
- package/dist/cdn/chunks/dist-CxTt8FRE.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DeJh3E9b.js → extensions-ZX2oarW6.js} +17 -15
- package/dist/cdn/chunks/{extensions-DeJh3E9b.js.map → extensions-ZX2oarW6.js.map} +1 -1
- package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js +12 -0
- package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js.map +1 -0
- package/dist/cdn/chunks/htmlparser-CZa2V5cF.js +1008 -0
- package/dist/cdn/chunks/htmlparser-CZa2V5cF.js.map +1 -0
- package/dist/cdn/chunks/icons-CYWw8Xfp.js +1190 -0
- package/dist/cdn/chunks/icons-CYWw8Xfp.js.map +1 -0
- package/dist/cdn/chunks/keys-D7kUmfpE.js +12 -0
- package/dist/cdn/chunks/keys-D7kUmfpE.js.map +1 -0
- package/dist/cdn/chunks/src-BKI1x1k7.js +546 -0
- package/dist/cdn/chunks/src-BKI1x1k7.js.map +1 -0
- package/dist/cdn/chunks/{renderer-Yg1XhsBN.js → src-BuC_IHzN.js} +118 -134
- package/dist/cdn/chunks/src-BuC_IHzN.js.map +1 -0
- package/dist/cdn/chunks/src-CM0gCvAS.js +1176 -0
- package/dist/cdn/chunks/src-CM0gCvAS.js.map +1 -0
- package/dist/cdn/chunks/{media-library-mCCZieYO.js → src-D6F_3XkE.js} +1782 -1280
- package/dist/cdn/chunks/src-D6F_3XkE.js.map +1 -0
- package/dist/cdn/chunks/{styles-Bp5Jsu9J.js → styles-DMOEiSX9.js} +867 -859
- package/dist/cdn/chunks/styles-DMOEiSX9.js.map +1 -0
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js +6 -0
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js.map +1 -0
- package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js +12 -0
- package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js.map +1 -0
- package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js +25 -0
- package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js.map +1 -0
- package/dist/cdn/chunks/useEditorCore-BA6mspzD.js +3019 -0
- package/dist/cdn/chunks/useEditorCore-BA6mspzD.js.map +1 -0
- package/dist/cdn/chunks/useI18n-8Wd7G-cq.js +19 -0
- package/dist/cdn/chunks/useI18n-8Wd7G-cq.js.map +1 -0
- package/dist/cdn/chunks/useMergeTag-C7G31KV-.js +46 -0
- package/dist/cdn/chunks/useMergeTag-C7G31KV-.js.map +1 -0
- package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js +61 -0
- package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +72 -69
- package/dist/cdn/editor.js.map +1 -1
- package/dist/index.d.ts +15 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DIDAJdkj.js → styles-PcOPXvLO.js} +547 -549
- package/dist/templatical-editor.js +5 -5
- package/dist/{useEditorCore-Bd9CA4L_.js → useEditorCore-CT1slufs.js} +3 -3
- package/package.json +7 -7
- package/dist/CountdownBlock-BUHYIAe9.js +0 -92
- package/dist/cdn/chunks/CloudEditor-DnTfI5GU.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-BDnWMAME.js +0 -93
- package/dist/cdn/chunks/blockTypeIcons-BYz0fgLz.js +0 -22
- package/dist/cdn/chunks/features-pLfGJWIB.js +0 -7813
- package/dist/cdn/chunks/features-pLfGJWIB.js.map +0 -1
- package/dist/cdn/chunks/icons-FLemooQz.js +0 -690
- package/dist/cdn/chunks/icons-FLemooQz.js.map +0 -1
- package/dist/cdn/chunks/media-library-mCCZieYO.js.map +0 -1
- package/dist/cdn/chunks/quality-BRbHtAk1.js +0 -2180
- package/dist/cdn/chunks/quality-BRbHtAk1.js.map +0 -1
- package/dist/cdn/chunks/renderer-Yg1XhsBN.js.map +0 -1
- package/dist/cdn/chunks/src-BDJeYiVE.js +0 -509
- package/dist/cdn/chunks/src-BDJeYiVE.js.map +0 -1
- package/dist/cdn/chunks/styles-Bp5Jsu9J.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as e, Dt as t, N as n, O as r, Ot as i, _ as a, c as o, d as s, l as c, r as l, s as u } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
|
-
import "./useEditorCore-
|
|
2
|
+
import "./useEditorCore-CT1slufs.js";
|
|
3
3
|
import { B as d, t as f } from "./keys-CHPcp-Nz.js";
|
|
4
4
|
import { t as p } from "./image-up-CQdtq8ge.js";
|
|
5
5
|
import { t as m } from "./shield-check-B7x5OKt5.js";
|
|
@@ -2,7 +2,7 @@ import { A as e, D as t, Dt as n, E as r, Et as i, I as a, K as o, O as s, Ot as
|
|
|
2
2
|
import { c as E, o as D, t as O } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
3
|
import { n as k } from "./upload-BwwE0U6G.js";
|
|
4
4
|
import { A } from "./dist-BJbqgyPn.js";
|
|
5
|
-
import { E as j, V as M, t as N, x as P } from "./useEditorCore-
|
|
5
|
+
import { E as j, V as M, t as N, x as P } from "./useEditorCore-CT1slufs.js";
|
|
6
6
|
import { m as F } from "./dist-DYv_Pttj.js";
|
|
7
7
|
import { s as I } from "./usePopoverPosition-BO2LNy5n.js";
|
|
8
8
|
import { A as L, F as R, c as z, r as B, s as V, t as H, u as ee } from "./keys-CHPcp-Nz.js";
|
|
@@ -10,7 +10,7 @@ import { t as U } from "./useI18n-D2L9Mkik.js";
|
|
|
10
10
|
import { t as W } from "./createLucideIcon-JWHwTI6N.js";
|
|
11
11
|
import { t as G } from "./check-BpQDKiPz.js";
|
|
12
12
|
import { t as K } from "./circle-alert-CgtE46ND.js";
|
|
13
|
-
import { a as q, c as te, d as ne, f as re, i as ie, l as ae, m as oe, n as se, o as ce, p as le, r as ue, s as de, t as fe, u as pe } from "./styles-
|
|
13
|
+
import { a as q, c as te, d as ne, f as re, i as ie, l as ae, m as oe, n as se, o as ce, p as le, r as ue, s as de, t as fe, u as pe } from "./styles-PcOPXvLO.js";
|
|
14
14
|
import { t as me } from "./clock-BzKLLW5L.js";
|
|
15
15
|
import { t as J } from "./loader-circle-C-Z6kgI6.js";
|
|
16
16
|
import { t as Y } from "./message-circle-CEm5qckV.js";
|
|
@@ -363,36 +363,36 @@ function Be(e) {
|
|
|
363
363
|
comments: I,
|
|
364
364
|
channel: b.channel
|
|
365
365
|
});
|
|
366
|
-
let z = le({
|
|
367
|
-
provider: Te(h),
|
|
366
|
+
let z = typeof t.savedBlocks == "object" && t.savedBlocks !== null ? t.savedBlocks : null, U = le({
|
|
367
|
+
provider: z ?? Te(h),
|
|
368
368
|
editor: y,
|
|
369
369
|
onError: t.onError,
|
|
370
|
-
isAvailable: () => t.savedBlocks !== !1 && g.hasFeature("saved_modules")
|
|
371
|
-
}),
|
|
370
|
+
isAvailable: z ? () => !0 : () => t.savedBlocks !== !1 && g.hasFeature("saved_modules")
|
|
371
|
+
}), W = _e({
|
|
372
372
|
authManager: h,
|
|
373
373
|
getTemplateId: () => y.state.template?.id ?? null
|
|
374
374
|
});
|
|
375
|
-
function
|
|
375
|
+
function G(e) {
|
|
376
376
|
D.commentsOpen.value = !0, queueMicrotask(() => {
|
|
377
377
|
o()?.filterByBlock(e);
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
|
-
_(L, A.handleRequestMedia), _(B, h), _(H, O), _(ee, I), _(R,
|
|
380
|
+
_(L, A.handleRequestMedia), _(B, h), _(H, O), _(ee, I), _(R, W), _(V, {
|
|
381
381
|
plan: g,
|
|
382
382
|
ai: O,
|
|
383
383
|
comments: {
|
|
384
384
|
getBlockCount: (e) => I.commentCountByBlock.value.get(e) ?? 0,
|
|
385
|
-
openForBlock:
|
|
385
|
+
openForBlock: G
|
|
386
386
|
},
|
|
387
|
-
savedBlocks:
|
|
387
|
+
savedBlocks: U.capability
|
|
388
388
|
});
|
|
389
|
-
function
|
|
389
|
+
function K(e) {
|
|
390
390
|
g.hasFeature("theme_customization") && (w.themeOverrides.value = e);
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function q(e) {
|
|
393
393
|
y.setUiTheme(e);
|
|
394
394
|
}
|
|
395
|
-
async function
|
|
395
|
+
async function te() {
|
|
396
396
|
s.value = !0, l.value = null;
|
|
397
397
|
try {
|
|
398
398
|
if (await h.initialize(), d) return;
|
|
@@ -411,7 +411,7 @@ function Be(e) {
|
|
|
411
411
|
d || (s.value = !1);
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function ne() {
|
|
415
415
|
d = !0, r.cleanupFontLinks(), b.disconnect(), w.destroy(), t.onUnmount?.();
|
|
416
416
|
}
|
|
417
417
|
return {
|
|
@@ -432,17 +432,17 @@ function Be(e) {
|
|
|
432
432
|
exporter: P,
|
|
433
433
|
testEmail: F,
|
|
434
434
|
commentsInstance: I,
|
|
435
|
-
savedBlocks:
|
|
436
|
-
scoringInstance:
|
|
435
|
+
savedBlocks: U,
|
|
436
|
+
scoringInstance: W,
|
|
437
437
|
panelState: D,
|
|
438
438
|
snapshotPreview: E,
|
|
439
439
|
collabWarning: T,
|
|
440
440
|
onSaveHook: f,
|
|
441
|
-
initialize:
|
|
442
|
-
destroy:
|
|
443
|
-
setThemeOverrides:
|
|
444
|
-
setUiTheme:
|
|
445
|
-
openCommentsForBlock:
|
|
441
|
+
initialize: te,
|
|
442
|
+
destroy: ne,
|
|
443
|
+
setThemeOverrides: K,
|
|
444
|
+
setUiTheme: q,
|
|
445
|
+
openCommentsForBlock: G
|
|
446
446
|
};
|
|
447
447
|
}
|
|
448
448
|
//#endregion
|
|
@@ -622,7 +622,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
622
622
|
},
|
|
623
623
|
emits: ["save"],
|
|
624
624
|
setup(e) {
|
|
625
|
-
let t = h(() => import("./CollaboratorBar-
|
|
625
|
+
let t = h(() => import("./CollaboratorBar-Bj4NZiie.js")), r = h(() => import("./SnapshotHistory-FtzDq8f0.js")), a = h(() => import("./AiFeatureMenu-CcqQDHzJ.js")), { t: o, format: u } = Q();
|
|
626
626
|
return (d, f) => (s(), m("header", et, [
|
|
627
627
|
p("div", tt, [e.featureFlags.templateLimit.value === null ? w("", !0) : (s(), m("span", nt, c(b(u)(b(o).header.templatesUsed, {
|
|
628
628
|
used: e.featureFlags.templateCount.value,
|
|
@@ -774,7 +774,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
774
774
|
},
|
|
775
775
|
emits: ["send-test-email"],
|
|
776
776
|
setup(e, { expose: t, emit: n }) {
|
|
777
|
-
let r = h(() => import("./AiChatSidebar-K_AehWc-.js")), i = h(() => import("./CommentsSidebar-DvNEdugN.js")), a = h(() => import("./DesignReferenceSidebar-DNmK3dxp.js")), o = h(() => import("./TemplateScoringPanel-ifGGGWs5.js")), c = h(() => import("./TestEmailModal-
|
|
777
|
+
let r = h(() => import("./AiChatSidebar-K_AehWc-.js")), i = h(() => import("./CommentsSidebar-DvNEdugN.js")), a = h(() => import("./DesignReferenceSidebar-DNmK3dxp.js")), o = h(() => import("./TemplateScoringPanel-ifGGGWs5.js")), c = h(() => import("./TestEmailModal-DL2O1H8M.js")), l = h(async () => {
|
|
778
778
|
try {
|
|
779
779
|
return (await import("@templatical/media-library")).MediaLibraryModal;
|
|
780
780
|
} catch {
|
|
@@ -933,7 +933,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
933
933
|
},
|
|
934
934
|
emits: ["ready"],
|
|
935
935
|
setup(e, { expose: a, emit: o }) {
|
|
936
|
-
let d = h(() => import("./SavedBlocksPanels-
|
|
936
|
+
let d = h(() => import("./SavedBlocksPanels-Dff38YXu.js")), f = e;
|
|
937
937
|
_(z, f.cloudTranslations);
|
|
938
938
|
let x = o, S = u(null), C = u(null), k = Be({
|
|
939
939
|
config: f.config,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as e, Dt as t, O as n, Ot as r, _ as i, c as a, d as o, l as s, nt as c, r as l, s as u, u as d } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
|
-
import "./useEditorCore-
|
|
2
|
+
import "./useEditorCore-CT1slufs.js";
|
|
3
3
|
import { t as f } from "./createLucideIcon-JWHwTI6N.js";
|
|
4
4
|
import { n as p } from "./useCloudI18n-BmiygEM4.js";
|
|
5
5
|
import { t as m } from "./readableTextColor-f8Kykfnh.js";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { A as e, Dt as t, O as n, Ot as r, Y as i, _ as a, c as o, d as s, nt as c, r as l, s as u, u as d } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
|
+
import { p as f } from "./dist-DYv_Pttj.js";
|
|
3
|
+
import { t as p } from "./useI18n-D2L9Mkik.js";
|
|
4
|
+
//#region src/components/blocks/CountdownBlock.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var m = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
8
|
+
}, h = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-4 tpl:text-xs tpl:text-[var(--tpl-text-dim)] tpl:opacity-50"
|
|
11
|
+
}, g = { class: "tpl:text-center" }, _ = /* @__PURE__ */ a({
|
|
12
|
+
__name: "CountdownBlock",
|
|
13
|
+
props: {
|
|
14
|
+
block: {},
|
|
15
|
+
viewport: {}
|
|
16
|
+
},
|
|
17
|
+
setup(a) {
|
|
18
|
+
let _ = a, { t: v } = p(), y = i(Date.now());
|
|
19
|
+
f(() => {
|
|
20
|
+
y.value = Date.now();
|
|
21
|
+
}, 1e3);
|
|
22
|
+
let b = u(() => {
|
|
23
|
+
if (!_.block.targetDate) return null;
|
|
24
|
+
let e = new Date(_.block.targetDate);
|
|
25
|
+
return isNaN(e.getTime()) ? null : e.getTime();
|
|
26
|
+
}), x = u(() => b.value ? y.value >= b.value : !1), S = u(() => {
|
|
27
|
+
if (!b.value || x.value) return {
|
|
28
|
+
days: 0,
|
|
29
|
+
hours: 0,
|
|
30
|
+
minutes: 0,
|
|
31
|
+
seconds: 0
|
|
32
|
+
};
|
|
33
|
+
let e = b.value - y.value, t = Math.floor(e / 1e3);
|
|
34
|
+
return {
|
|
35
|
+
days: Math.floor(t / 86400),
|
|
36
|
+
hours: Math.floor(t % 86400 / 3600),
|
|
37
|
+
minutes: Math.floor(t % 3600 / 60),
|
|
38
|
+
seconds: t % 60
|
|
39
|
+
};
|
|
40
|
+
}), C = u(() => {
|
|
41
|
+
let e = [];
|
|
42
|
+
return _.block.showDays && e.push({
|
|
43
|
+
value: String(S.value.days).padStart(2, "0"),
|
|
44
|
+
label: _.block.labelDays
|
|
45
|
+
}), _.block.showHours && e.push({
|
|
46
|
+
value: String(S.value.hours).padStart(2, "0"),
|
|
47
|
+
label: _.block.labelHours
|
|
48
|
+
}), _.block.showMinutes && e.push({
|
|
49
|
+
value: String(S.value.minutes).padStart(2, "0"),
|
|
50
|
+
label: _.block.labelMinutes
|
|
51
|
+
}), _.block.showSeconds && e.push({
|
|
52
|
+
value: String(S.value.seconds).padStart(2, "0"),
|
|
53
|
+
label: _.block.labelSeconds
|
|
54
|
+
}), e;
|
|
55
|
+
}), w = u(() => ({
|
|
56
|
+
backgroundColor: _.block.backgroundColor,
|
|
57
|
+
fontFamily: _.block.fontFamily || "inherit"
|
|
58
|
+
})), T = u(() => ({
|
|
59
|
+
fontSize: `${_.block.digitFontSize}px`,
|
|
60
|
+
fontWeight: "bold",
|
|
61
|
+
color: _.block.digitColor,
|
|
62
|
+
lineHeight: "1.2"
|
|
63
|
+
})), E = u(() => ({
|
|
64
|
+
fontSize: `${_.block.labelFontSize}px`,
|
|
65
|
+
color: _.block.labelColor,
|
|
66
|
+
marginTop: "4px"
|
|
67
|
+
})), D = u(() => ({
|
|
68
|
+
fontSize: `${_.block.digitFontSize}px`,
|
|
69
|
+
color: _.block.digitColor,
|
|
70
|
+
fontFamily: _.block.fontFamily || "inherit"
|
|
71
|
+
}));
|
|
72
|
+
return (i, u) => a.block.targetDate ? x.value && a.block.hideOnExpiry ? (n(), s("div", h, r(c(v).countdown.hidden), 1)) : x.value ? (n(), s("div", {
|
|
73
|
+
key: 2,
|
|
74
|
+
style: t(w.value),
|
|
75
|
+
class: "tpl:py-4 tpl:text-center"
|
|
76
|
+
}, [o("span", { style: t({
|
|
77
|
+
fontSize: `${a.block.digitFontSize}px`,
|
|
78
|
+
color: a.block.digitColor
|
|
79
|
+
}) }, r(a.block.expiredMessage), 5)], 4)) : (n(), s("div", {
|
|
80
|
+
key: 3,
|
|
81
|
+
style: t(w.value),
|
|
82
|
+
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:py-4"
|
|
83
|
+
}, [(n(!0), s(l, null, e(C.value, (e, i) => (n(), s(l, { key: e.label }, [i > 0 ? (n(), s("span", {
|
|
84
|
+
key: 0,
|
|
85
|
+
style: t(D.value),
|
|
86
|
+
class: "tpl:self-start"
|
|
87
|
+
}, r(a.block.separator), 5)) : d("", !0), o("div", g, [o("div", { style: t(T.value) }, r(e.value), 5), o("div", { style: t(E.value) }, r(e.label), 5)])], 64))), 128))], 4)) : (n(), s("div", m, r(c(v).countdown.setDate), 1));
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
//#endregion
|
|
91
|
+
export { _ as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
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 { C as S, D as C, O as w, S as T } from "./useEditorCore-
|
|
3
|
+
import { C as S, D as C, O as w, S as T } from "./useEditorCore-CT1slufs.js";
|
|
4
4
|
import { n as E, s as D } from "./usePopoverPosition-BO2LNy5n.js";
|
|
5
5
|
import { B as O, D as k, L as A, _ as ee, h as te, w as ne, z as re } from "./keys-CHPcp-Nz.js";
|
|
6
6
|
import { t as j } from "./useI18n-D2L9Mkik.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { A as e, Dt as t, E as n, Et as r, I as i, N as a, O as o, Ot as s, R as c, T as l, Y as u, _ as d, c as f, d as p, h as m, l as h, m as g, nt as _, r as v, s as y, u as b, x, z as S } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
2
|
import { a as C, c as w, s as T } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
-
import { H as E, P as D, c as O } from "./useEditorCore-
|
|
3
|
+
import { H as E, P as D, c as O } from "./useEditorCore-CT1slufs.js";
|
|
4
4
|
import { B as k, P as A, f as j, h as M } from "./keys-CHPcp-Nz.js";
|
|
5
5
|
import { t as N } from "./useI18n-D2L9Mkik.js";
|
|
6
6
|
import { t as P } from "./chevron-down-j8GrdTyz.js";
|
|
7
7
|
import { t as F } from "./chevron-up-BACyVhyC.js";
|
|
8
8
|
import { t as I } from "./loader-circle-C-Z6kgI6.js";
|
|
9
|
-
import { t as L } from "./TplModal-
|
|
10
|
-
import { t as R } from "./SavedBlockPreviewCanvas-
|
|
9
|
+
import { t as L } from "./TplModal-C7Koj5gM.js";
|
|
10
|
+
import { t as R } from "./SavedBlockPreviewCanvas-2-mzAnZE.js";
|
|
11
11
|
//#region src/components/SavedBlockPreviewRow.vue?vue&type=script&setup=true&lang.ts
|
|
12
12
|
var z = ["data-block-id"], B = ["aria-label", "title"], V = { class: "tpl:relative tpl:min-w-0 tpl:flex-1" }, H = {
|
|
13
13
|
key: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
2
|
import { A as t, Dt as n, M as r, N as i, O as a, _ as o, c as s, d as c, l, nt as u, r as d, s as f, x as p } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
3
|
-
import { a as m, b as h, d as g, f as _, g as v, h as y, i as b, l as x, m as S, n as C, p as w, r as T, v as E, y as D, z as O } from "./useEditorCore-
|
|
3
|
+
import { a as m, b as h, d as g, f as _, g as v, h as y, i as b, l as x, m as S, n as C, p as w, r as T, v as E, y as D, z as O } from "./useEditorCore-CT1slufs.js";
|
|
4
4
|
import { h as k, o as A } from "./keys-CHPcp-Nz.js";
|
|
5
5
|
//#region src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var j = { class: "tpl:w-full" }, M = { class: "tpl:flex tpl:gap-0" }, N = /* @__PURE__ */ o({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { A as e, Dt as t, Et as n, I as r, N as i, O as a, Ot as o, R as ee, Y as s, _ as c, c as l, d as u, g as te, h as d, l as f, nt as p, r as m, s as h, u as g, w as ne, z as _ } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
2
|
import { a as v, c as y, i as b, s as x } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
-
import "./useEditorCore-
|
|
3
|
+
import "./useEditorCore-CT1slufs.js";
|
|
4
4
|
import { B as S, P as re, h as ie } from "./keys-CHPcp-Nz.js";
|
|
5
5
|
import { t as ae } from "./useI18n-D2L9Mkik.js";
|
|
6
|
-
import { n as oe, r as C, t as w } from "./blockTypeIcons-
|
|
6
|
+
import { n as oe, r as C, t as w } from "./blockTypeIcons-CgwECCut.js";
|
|
7
7
|
import { t as se } from "./pencil-DdwmkKLb.js";
|
|
8
8
|
import { t as ce } from "./trash-2-DE8CmxAG.js";
|
|
9
9
|
import { t as le } from "./x-CkD6A1iB.js";
|
|
10
|
-
import { t as ue } from "./TplModal-
|
|
10
|
+
import { t as ue } from "./TplModal-C7Koj5gM.js";
|
|
11
11
|
import { t as de } from "./formatRelativeTime-CtUU-QZ8.js";
|
|
12
12
|
//#region src/components/SavedBlocksBrowserModal.vue?vue&type=script&setup=true&lang.ts
|
|
13
13
|
var fe = {
|
|
@@ -65,7 +65,7 @@ var fe = {
|
|
|
65
65
|
props: { visible: { type: Boolean } },
|
|
66
66
|
emits: ["close", "insert"],
|
|
67
67
|
setup(c, { emit: A }) {
|
|
68
|
-
let et = c, j = A, tt = te(() => import("./SavedBlockPreviewCanvas-
|
|
68
|
+
let et = c, j = A, tt = te(() => import("./SavedBlockPreviewCanvas-2-mzAnZE.js").then((e) => e.n)), { t: M, format: N } = ae(), P = S(re, "SavedBlocksBrowserModal"), F = S(ie, "SavedBlocksBrowserModal"), I = s(""), L = s(""), R = s(null), z = s(null), B = s(null), V = s(""), H = s(""), U = s(null), W = s("end"), G = h(() => {
|
|
69
69
|
let e = I.value.trim().toLowerCase(), t = L.value;
|
|
70
70
|
return P.savedBlocks.value.filter((n) => !(e && !n.name.toLowerCase().includes(e) || t && n.category !== t));
|
|
71
71
|
}), K = h(() => P.isLoading.value && P.savedBlocks.value.length === 0), nt = h(() => I.value.trim().length > 0 || L.value !== ""), q = h(() => R.value ? P.savedBlocks.value.find((e) => e.id === R.value) ?? null : null), rt = h(() => {
|
|
@@ -5,7 +5,7 @@ var c = /* @__PURE__ */ t({
|
|
|
5
5
|
__name: "SavedBlocksPanels",
|
|
6
6
|
props: { feature: {} },
|
|
7
7
|
setup(t) {
|
|
8
|
-
let c = t, l = r(() => import("./SavedBlocksPickBar-
|
|
8
|
+
let c = t, l = r(() => import("./SavedBlocksPickBar-rB6iyji6.js")), u = r(() => import("./SaveBlockDialog-CYIEHABH.js")), d = r(() => import("./SavedBlocksBrowserModal-D5V5yF_3.js"));
|
|
9
9
|
function f(e, t) {
|
|
10
10
|
c.feature.insert(e, t);
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as e, Ot as t, _ as n, c as r, d as i, h as a, m as o, nt as s } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
|
-
import { R as c } from "./useEditorCore-
|
|
2
|
+
import { R as c } from "./useEditorCore-CT1slufs.js";
|
|
3
3
|
import { t as l } from "./useI18n-D2L9Mkik.js";
|
|
4
4
|
import { t as u } from "./x-CkD6A1iB.js";
|
|
5
5
|
//#region src/components/SavedBlocksPickBar.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
+
import "./useEditorCore-CT1slufs.js";
|
|
4
4
|
import { s as _ } from "./usePopoverPosition-BO2LNy5n.js";
|
|
5
5
|
import { t as v } from "./useI18n-D2L9Mkik.js";
|
|
6
6
|
import { t as y } from "./createLucideIcon-JWHwTI6N.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-CT1slufs.js";
|
|
4
4
|
import { t as v } from "./loader-circle-C-Z6kgI6.js";
|
|
5
5
|
import { n as y } from "./useCloudI18n-BmiygEM4.js";
|
|
6
|
-
import { t as b } from "./TplModal-
|
|
6
|
+
import { t as b } from "./TplModal-C7Koj5gM.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,5 +1,5 @@
|
|
|
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 { C as ee, S as te } from "./useEditorCore-
|
|
2
|
+
import { C as ee, S as te } from "./useEditorCore-CT1slufs.js";
|
|
3
3
|
import { n as ne } from "./usePopoverPosition-BO2LNy5n.js";
|
|
4
4
|
import { D as _, L as v, w as y, z as b } from "./keys-CHPcp-Nz.js";
|
|
5
5
|
import { t as re } from "./useI18n-D2L9Mkik.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 { O as g } from "./useEditorCore-
|
|
3
|
+
import { O as g } from "./useEditorCore-CT1slufs.js";
|
|
4
4
|
import { n as _ } from "./usePopoverPosition-BO2LNy5n.js";
|
|
5
5
|
import { z as v } from "./keys-CHPcp-Nz.js";
|
|
6
6
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, L as t, M as n, N as r, j as i } from "./useEditorCore-
|
|
1
|
+
import { A as e, L as t, M as n, N as r, j as i } from "./useEditorCore-CT1slufs.js";
|
|
2
2
|
import { t as a } from "./createLucideIcon-JWHwTI6N.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.21.
|
|
3
|
-
"initialGzipBytes":
|
|
4
|
-
"initialRawBytes":
|
|
5
|
-
"initialFileCount":
|
|
6
|
-
"lazyGzipBytes":
|
|
7
|
-
"lazyRawBytes":
|
|
8
|
-
"lazyFileCount":
|
|
9
|
-
"generatedAt": "2026-07-
|
|
2
|
+
"version": "0.21.2",
|
|
3
|
+
"initialGzipBytes": 286975,
|
|
4
|
+
"initialRawBytes": 1033853,
|
|
5
|
+
"initialFileCount": 38,
|
|
6
|
+
"lazyGzipBytes": 190290,
|
|
7
|
+
"lazyRawBytes": 624509,
|
|
8
|
+
"lazyFileCount": 52,
|
|
9
|
+
"generatedAt": "2026-07-30T09:39:43.642Z"
|
|
10
10
|
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { H as e, M as t, O as n, P as r, T as i, V as ee, Z as a, ct as o, g as s, h as c, it as l, m as u, n as d, o as te, ot as ne, p as f, u as p, v as m, x as h, y as g, z as _ } from "./draggable-D840DIZB.js";
|
|
2
|
+
import { _ as re, g as ie } from "./dist-CiBEt0VR.js";
|
|
3
|
+
import { B as v, T as ae, c as oe, h as se, r as ce } from "./keys-D7kUmfpE.js";
|
|
4
|
+
import { At as le, c as y, d as ue, j as de, n as fe, rt as pe, w as b, z as me } from "./icons-CYWw8Xfp.js";
|
|
5
|
+
import { t as x } from "./LoadingTrack-D-CW2tUa.js";
|
|
6
|
+
import { t as S } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
7
|
+
import { t as C } from "./useAliveFlag-aanU8uqB.js";
|
|
8
|
+
import { g as w } from "./cloud-BJlbXGTJ.js";
|
|
9
|
+
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var T = {
|
|
11
|
+
key: 0,
|
|
12
|
+
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)]"
|
|
13
|
+
}, E = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, D = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, O = { class: "tpl:flex tpl:items-center tpl:gap-1" }, k = ["title"], A = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, j = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
16
|
+
}, M = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, N = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
19
|
+
}, P = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, F = {
|
|
20
|
+
key: 2,
|
|
21
|
+
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
22
|
+
}, I = {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
25
|
+
style: {
|
|
26
|
+
"background-color": "var(--tpl-primary-light)",
|
|
27
|
+
color: "var(--tpl-text)",
|
|
28
|
+
"max-width": "85%",
|
|
29
|
+
"box-shadow": "var(--tpl-shadow)"
|
|
30
|
+
}
|
|
31
|
+
}, L = {
|
|
32
|
+
key: 1,
|
|
33
|
+
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
34
|
+
}, R = {
|
|
35
|
+
key: 1,
|
|
36
|
+
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
37
|
+
style: {
|
|
38
|
+
"max-width": "85%",
|
|
39
|
+
"background-color": "var(--tpl-bg)",
|
|
40
|
+
color: "var(--tpl-text)",
|
|
41
|
+
"box-shadow": "var(--tpl-shadow)"
|
|
42
|
+
}
|
|
43
|
+
}, z = {
|
|
44
|
+
key: 0,
|
|
45
|
+
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",
|
|
46
|
+
style: {
|
|
47
|
+
"background-color": "var(--tpl-danger-light)",
|
|
48
|
+
color: "var(--tpl-danger)"
|
|
49
|
+
}
|
|
50
|
+
}, he = {
|
|
51
|
+
key: 1,
|
|
52
|
+
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
53
|
+
style: {
|
|
54
|
+
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
55
|
+
"backdrop-filter": "blur(2px)"
|
|
56
|
+
}
|
|
57
|
+
}, ge = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, _e = ["onClick"], ve = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, ye = { 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)]" }, be = ["placeholder", "disabled"], xe = ["disabled"], Se = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, B = /*#__PURE__*/ S(/* @__PURE__ */ h({
|
|
58
|
+
__name: "AiChatSidebar",
|
|
59
|
+
props: {
|
|
60
|
+
visible: { type: Boolean },
|
|
61
|
+
onApply: { type: Function }
|
|
62
|
+
},
|
|
63
|
+
emits: ["close"],
|
|
64
|
+
setup(h, { emit: S }) {
|
|
65
|
+
let B = h, Ce = S, V = v(oe, "AiChatSidebar"), H = v(se, "AiChatSidebar"), we = v(ce, "AiChatSidebar"), U = i(ae, []), W = C(), G = w({
|
|
66
|
+
authManager: we,
|
|
67
|
+
getTemplateId: () => H.state.template?.id ?? null,
|
|
68
|
+
onApply: B.onApply,
|
|
69
|
+
onError: void 0
|
|
70
|
+
}), K = a(""), q = a(null), J = a(!1), Y = a(0), { pause: X, resume: Te } = ie(() => {
|
|
71
|
+
Y.value < (G.suggestions.value?.length ?? 0) ? Y.value++ : X();
|
|
72
|
+
}, 150, { immediate: !1 }), { start: Ee } = re(() => Te(), 100, { immediate: !1 });
|
|
73
|
+
_(() => G.suggestions.value?.length ?? 0, (e) => {
|
|
74
|
+
if (X(), e === 0) {
|
|
75
|
+
Y.value = 0;
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
Y.value = 0, Ee();
|
|
79
|
+
});
|
|
80
|
+
function Z() {
|
|
81
|
+
n(() => {
|
|
82
|
+
q.value && (q.value.scrollTop = q.value.scrollHeight);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
_(() => G.messages.value?.length ?? 0, () => Z()), _(() => B.visible, async (e) => {
|
|
86
|
+
if (e && !J.value) {
|
|
87
|
+
if (J.value = !0, await G.loadConversation(), !W.alive) return;
|
|
88
|
+
(G.messages.value?.length ?? 0) === 0 && H.content.value.blocks.length === 0 && G.loadSuggestions(H.content.value, U);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
async function Q() {
|
|
92
|
+
let e = K.value.trim();
|
|
93
|
+
!e || G.isGenerating.value || (K.value = "", G.error.value = null, G.failedPrompt.value = null, Z(), await G.sendPrompt(e, H.content.value, U), W.alive && (G.failedPrompt.value && (K.value = G.failedPrompt.value), Z()));
|
|
94
|
+
}
|
|
95
|
+
function $(e) {
|
|
96
|
+
return e.replace(/```json[\s\S]*?```/g, "").replace(/```json[\s\S]*/g, "").trim();
|
|
97
|
+
}
|
|
98
|
+
function De(e) {
|
|
99
|
+
X(), K.value = e, Q();
|
|
100
|
+
}
|
|
101
|
+
function Oe(e) {
|
|
102
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q());
|
|
103
|
+
}
|
|
104
|
+
return (n, i) => (t(), u(d, {
|
|
105
|
+
"enter-active-class": "tpl-ai-slide-enter-active",
|
|
106
|
+
"enter-from-class": "tpl:translate-x-full",
|
|
107
|
+
"enter-to-class": "tpl:translate-x-0",
|
|
108
|
+
"leave-active-class": "tpl-ai-slide-leave-active",
|
|
109
|
+
"leave-from-class": "tpl:translate-x-0",
|
|
110
|
+
"leave-to-class": "tpl:translate-x-full"
|
|
111
|
+
}, {
|
|
112
|
+
default: ee(() => [h.visible ? (t(), s("div", T, [
|
|
113
|
+
f("div", E, [f("div", D, [g(l(b), {
|
|
114
|
+
size: 13,
|
|
115
|
+
"stroke-width": 2
|
|
116
|
+
}), f("span", null, o(l(V).aiChat.title), 1)]), f("div", O, [(l(G).messages.value?.length ?? 0) > 0 ? (t(), s("button", {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
119
|
+
title: l(V).aiChat.clear,
|
|
120
|
+
onClick: i[0] ||= (e) => l(G).clearChat()
|
|
121
|
+
}, [g(l(ue), {
|
|
122
|
+
size: 14,
|
|
123
|
+
"stroke-width": 2
|
|
124
|
+
})], 8, k)) : c("", !0), f("button", {
|
|
125
|
+
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
126
|
+
onClick: i[1] ||= (e) => Ce("close")
|
|
127
|
+
}, [g(l(fe), {
|
|
128
|
+
size: 14,
|
|
129
|
+
"stroke-width": 2
|
|
130
|
+
})])])]),
|
|
131
|
+
f("div", A, [
|
|
132
|
+
f("div", {
|
|
133
|
+
ref_key: "messagesContainer",
|
|
134
|
+
ref: q,
|
|
135
|
+
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
136
|
+
}, [l(G).isLoadingHistory.value ? (t(), s("div", j, [g(l(pe), {
|
|
137
|
+
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
138
|
+
size: 24,
|
|
139
|
+
"stroke-width": 2
|
|
140
|
+
}), f("p", M, o(l(V).aiChat.loadingHistory), 1)])) : (l(G).messages.value?.length ?? 0) === 0 ? (t(), s("div", N, [g(l(b), {
|
|
141
|
+
size: 32,
|
|
142
|
+
"stroke-width": 1.5,
|
|
143
|
+
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
144
|
+
}), f("p", P, o(l(V).aiChat.placeholder), 1)])) : (t(), s("div", F, [(t(!0), s(p, null, r(l(G).messages.value, (e, n) => (t(), s("div", {
|
|
145
|
+
key: e.id,
|
|
146
|
+
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
147
|
+
}, [e.role === "user" ? (t(), s("div", I, o(e.content), 1)) : (t(), s("div", L, [!$(e.content) && l(G).isGenerating.value && n === (l(G).messages.value?.length ?? 0) - 1 ? (t(), u(x, { key: 0 })) : (t(), s("div", R, o($(e.content) || l(V).aiChat.applied), 1)), e.id === l(G).lastApplyMessageId.value && !l(G).isGenerating.value ? (t(), s("button", {
|
|
148
|
+
key: 2,
|
|
149
|
+
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",
|
|
150
|
+
style: {
|
|
151
|
+
"border-color": "var(--tpl-border)",
|
|
152
|
+
color: "var(--tpl-text-muted)",
|
|
153
|
+
"background-color": "transparent"
|
|
154
|
+
},
|
|
155
|
+
onClick: i[2] ||= (e) => l(G).toggleLastRevert()
|
|
156
|
+
}, [l(G).isLastChangeReverted.value ? (t(), s(p, { key: 0 }, [g(l(me), {
|
|
157
|
+
size: 12,
|
|
158
|
+
"stroke-width": 2
|
|
159
|
+
}), m(" " + o(l(V).aiChat.reapply), 1)], 64)) : (t(), s(p, { key: 1 }, [g(l(y), {
|
|
160
|
+
size: 12,
|
|
161
|
+
"stroke-width": 2
|
|
162
|
+
}), m(" " + o(l(V).aiChat.revert), 1)], 64))])) : c("", !0)]))]))), 128))]))], 512),
|
|
163
|
+
l(G).error.value ? (t(), s("div", z, [g(l(le), {
|
|
164
|
+
size: 14,
|
|
165
|
+
"stroke-width": 2,
|
|
166
|
+
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
167
|
+
}), f("span", null, o(l(G).error.value === "ai_apply_failed" ? l(V).aiChat.applyFailed : l(V).aiChat.error), 1)])) : c("", !0),
|
|
168
|
+
(l(G).suggestions.value?.length ?? 0) > 0 ? (t(), s("div", he, [f("div", ge, [(t(!0), s(p, null, r(l(G).suggestions.value ?? [], (e, n) => (t(), s("button", {
|
|
169
|
+
key: n,
|
|
170
|
+
class: ne(["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", (l(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"]),
|
|
171
|
+
style: {
|
|
172
|
+
"border-color": "var(--tpl-border)",
|
|
173
|
+
color: "var(--tpl-primary)",
|
|
174
|
+
"background-color": "var(--tpl-bg)",
|
|
175
|
+
"box-shadow": "var(--tpl-shadow)"
|
|
176
|
+
},
|
|
177
|
+
onClick: (t) => De(e)
|
|
178
|
+
}, o(e), 11, _e))), 128))])])) : c("", !0)
|
|
179
|
+
]),
|
|
180
|
+
f("div", ve, [f("div", ye, [e(f("textarea", {
|
|
181
|
+
"onUpdate:modelValue": i[3] ||= (e) => K.value = e,
|
|
182
|
+
class: "tpl:max-h-32 tpl:min-h-[64px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]",
|
|
183
|
+
placeholder: l(V).aiChat.inputPlaceholder,
|
|
184
|
+
disabled: l(G).isGenerating.value,
|
|
185
|
+
rows: "3",
|
|
186
|
+
onKeydown: Oe
|
|
187
|
+
}, null, 40, be), [[te, K.value]]), f("button", {
|
|
188
|
+
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)]",
|
|
189
|
+
disabled: !K.value.trim() || l(G).isGenerating.value,
|
|
190
|
+
onClick: Q
|
|
191
|
+
}, [g(l(de), {
|
|
192
|
+
size: 16,
|
|
193
|
+
"stroke-width": 2
|
|
194
|
+
})], 8, xe)]), f("p", Se, o(l(V).aiMenu.disclaimer), 1)])
|
|
195
|
+
])) : c("", !0)]),
|
|
196
|
+
_: 1
|
|
197
|
+
}));
|
|
198
|
+
}
|
|
199
|
+
}), [["__scopeId", "data-v-a55e4bff"]]);
|
|
200
|
+
//#endregion
|
|
201
|
+
export { B as default };
|
|
202
|
+
|
|
203
|
+
//# sourceMappingURL=AiChatSidebar-A1CuWGY0.js.map
|