@templatical/editor 0.39.2 → 0.39.4

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.
Files changed (152) hide show
  1. package/dist/{AiChatSidebar-pOxCZWz9.js → AiChatSidebar-5qqrS6uy.js} +69 -63
  2. package/dist/{AiFeatureMenu-Bljk6Qjv.js → AiFeatureMenu-BBO_Ojlp.js} +1 -1
  3. package/dist/{BlockPreviewCanvas-DXGjUECG.js → BlockPreviewCanvas-BMC16_QU.js} +1 -1
  4. package/dist/{CloudHeaderExtras-DaocwNmy.js → CloudHeaderExtras-Cg6uF-yQ.js} +1 -1
  5. package/dist/{CloudPanels-CyZAnSJY.js → CloudPanels-D1Gg4qrG.js} +80 -66
  6. package/dist/{CollaboratorBar-C7Zca3g1.js → CollaboratorBar-Cmn0LccS.js} +3 -3
  7. package/dist/{CommentsPanel-CNOb7YCm.js → CommentsPanel-twNhYUqZ.js} +1 -1
  8. package/dist/{CommentsSidebar-VmwjU9va.js → CommentsSidebar-DDO0Qx8U.js} +122 -112
  9. package/dist/{CountdownToolbar-C2kfS6Oy.js → CountdownToolbar-nvHxu8Gu.js} +1 -1
  10. package/dist/DesignReferenceSidebar-C8ohNhOd.js +280 -0
  11. package/dist/{IssuesPanel-DL2Xr14_.js → IssuesPanel-Ck0EGoV5.js} +4 -4
  12. package/dist/{LoadingTrack-C2jKCU2d.js → LoadingTrack-C1Epulqq.js} +1 -1
  13. package/dist/{MediaEditModal-D4GEq2md.js → MediaEditModal-BFWmufJK.js} +3 -3
  14. package/dist/{MediaPanels-sapgKtxu.js → MediaPanels-BmDda5rY.js} +1 -1
  15. package/dist/{ParagraphEditor-DkkPSexG.js → ParagraphEditor-D6FRxr8Y.js} +2 -2
  16. package/dist/{RestoreVersionDialog-BgueZnZr.js → RestoreVersionDialog--b0qfNaK.js} +1 -1
  17. package/dist/{SaveBlockDialog-BuTuVlLr.js → SaveBlockDialog-C0BdEGeL.js} +6 -6
  18. package/dist/{SavedBlocksBrowserModal-Srhix8BB.js → SavedBlocksBrowserModal-BzDgXtr4.js} +8 -8
  19. package/dist/{SavedBlocksPanels-B2iScCS-.js → SavedBlocksPanels-DN-bDZzy.js} +1 -1
  20. package/dist/SavedBlocksPickBar-pEi9Et8Q.js +53 -0
  21. package/dist/{TemplateScoringPanel-C2Rdlyn6.js → TemplateScoringPanel-B1wcfE0w.js} +62 -56
  22. package/dist/{TestEmailModal-DJ5q_u4N.js → TestEmailModal-maM8SLBV.js} +6 -6
  23. package/dist/{TestEmailPanel-CP24UGst.js → TestEmailPanel-8iAZYpCK.js} +1 -1
  24. package/dist/{TitleEditor-QBBOXtxx.js → TitleEditor-L26QXwna.js} +1 -1
  25. package/dist/{Toolbar-COD2TW20.js → Toolbar-B2kDLFhn.js} +314 -314
  26. package/dist/{TplModal-C8xGjC1l.js → TplModal-DVMS_nAn.js} +1 -1
  27. package/dist/{VersionHistoryPanels-BrK6na4A.js → VersionHistoryPanels-D8f8KvKX.js} +1 -1
  28. package/dist/bundle-stats.json +6 -6
  29. package/dist/{ca-YlPDhElv.js → ca-Bqeygp1_.js} +1 -0
  30. package/dist/cdn/chunks/{AiChatSidebar-CjSEoK4x.js → AiChatSidebar-ctfIU4i0.js} +67 -61
  31. package/dist/cdn/chunks/AiChatSidebar-ctfIU4i0.js.map +1 -0
  32. package/dist/cdn/chunks/{AiFeatureMenu-l0K5TOSn.js → AiFeatureMenu-ByygdH_9.js} +2 -2
  33. package/dist/cdn/chunks/{AiFeatureMenu-l0K5TOSn.js.map → AiFeatureMenu-ByygdH_9.js.map} +1 -1
  34. package/dist/cdn/chunks/{BlockPreviewCanvas-lQrAdgG3.js → BlockPreviewCanvas-DeS7Sa--.js} +2 -2
  35. package/dist/cdn/chunks/{BlockPreviewCanvas-lQrAdgG3.js.map → BlockPreviewCanvas-DeS7Sa--.js.map} +1 -1
  36. package/dist/cdn/chunks/{CloudHeaderExtras-CXNe7Q-4.js → CloudHeaderExtras-BxsMpvVr.js} +2 -2
  37. package/dist/cdn/chunks/{CloudHeaderExtras-CXNe7Q-4.js.map → CloudHeaderExtras-BxsMpvVr.js.map} +1 -1
  38. package/dist/cdn/chunks/{CloudPanels-bHhh9AUA.js → CloudPanels-DmxmqAS_.js} +78 -64
  39. package/dist/cdn/chunks/CloudPanels-DmxmqAS_.js.map +1 -0
  40. package/dist/cdn/chunks/{CollaboratorBar-DgqcaGGI.js → CollaboratorBar-B8ttqAqX.js} +4 -4
  41. package/dist/cdn/chunks/CollaboratorBar-B8ttqAqX.js.map +1 -0
  42. package/dist/cdn/chunks/{CommentsPanel-Cy4TlTHC.js → CommentsPanel-C8ibhaiK.js} +2 -2
  43. package/dist/cdn/chunks/{CommentsPanel-Cy4TlTHC.js.map → CommentsPanel-C8ibhaiK.js.map} +1 -1
  44. package/dist/cdn/chunks/{CommentsSidebar-C7oAP3Mx.js → CommentsSidebar-CybWfZ3V.js} +118 -108
  45. package/dist/cdn/chunks/CommentsSidebar-CybWfZ3V.js.map +1 -0
  46. package/dist/cdn/chunks/{CountdownToolbar-CN9h4nlC.js → CountdownToolbar-DRESXiVD.js} +2 -2
  47. package/dist/cdn/chunks/{CountdownToolbar-CN9h4nlC.js.map → CountdownToolbar-DRESXiVD.js.map} +1 -1
  48. package/dist/cdn/chunks/DesignReferenceSidebar-CtaoY-hl.js +230 -0
  49. package/dist/cdn/chunks/DesignReferenceSidebar-CtaoY-hl.js.map +1 -0
  50. package/dist/cdn/chunks/{IssuesPanel-DdFk-Blf.js → IssuesPanel-C6RlIxoi.js} +5 -5
  51. package/dist/cdn/chunks/IssuesPanel-C6RlIxoi.js.map +1 -0
  52. package/dist/cdn/chunks/{LoadingTrack-Ba5xh5HD.js → LoadingTrack-_7DH_5aw.js} +2 -2
  53. package/dist/cdn/chunks/{LoadingTrack-Ba5xh5HD.js.map → LoadingTrack-_7DH_5aw.js.map} +1 -1
  54. package/dist/cdn/chunks/{MediaEditModal-BBZRcYKe.js → MediaEditModal-CZBZviu2.js} +4 -4
  55. package/dist/cdn/chunks/MediaEditModal-CZBZviu2.js.map +1 -0
  56. package/dist/cdn/chunks/{MediaPanels-CSBCsFwT.js → MediaPanels-Bq5b-XJM.js} +2 -2
  57. package/dist/cdn/chunks/{MediaPanels-CSBCsFwT.js.map → MediaPanels-Bq5b-XJM.js.map} +1 -1
  58. package/dist/cdn/chunks/{ParagraphEditor-DO4RzP8l.js → ParagraphEditor-R2ph_UOo.js} +3 -3
  59. package/dist/cdn/chunks/ParagraphEditor-R2ph_UOo.js.map +1 -0
  60. package/dist/cdn/chunks/{RestoreVersionDialog-CzZ_sFnz.js → RestoreVersionDialog-C-dwbb7T.js} +2 -2
  61. package/dist/cdn/chunks/{RestoreVersionDialog-CzZ_sFnz.js.map → RestoreVersionDialog-C-dwbb7T.js.map} +1 -1
  62. package/dist/cdn/chunks/{SaveBlockDialog-LgxYrXyx.js → SaveBlockDialog-C_BPjVv6.js} +7 -7
  63. package/dist/cdn/chunks/SaveBlockDialog-C_BPjVv6.js.map +1 -0
  64. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CdeSsTpb.js → SavedBlocksBrowserModal-CrrGEfFb.js} +9 -9
  65. package/dist/cdn/chunks/SavedBlocksBrowserModal-CrrGEfFb.js.map +1 -0
  66. package/dist/cdn/chunks/{SavedBlocksPanels-B5hakNJj.js → SavedBlocksPanels-DfTaMPAr.js} +2 -2
  67. package/dist/cdn/chunks/{SavedBlocksPanels-B5hakNJj.js.map → SavedBlocksPanels-DfTaMPAr.js.map} +1 -1
  68. package/dist/cdn/chunks/SavedBlocksPickBar-DziwHYSu.js +55 -0
  69. package/dist/cdn/chunks/SavedBlocksPickBar-DziwHYSu.js.map +1 -0
  70. package/dist/cdn/chunks/{TemplateScoringPanel--JxR6CsQ.js → TemplateScoringPanel-CR6RG6dZ.js} +95 -89
  71. package/dist/cdn/chunks/TemplateScoringPanel-CR6RG6dZ.js.map +1 -0
  72. package/dist/cdn/chunks/{TestEmailModal-BAuDxJtD.js → TestEmailModal-DId9Og-N.js} +7 -7
  73. package/dist/cdn/chunks/TestEmailModal-DId9Og-N.js.map +1 -0
  74. package/dist/cdn/chunks/{TestEmailPanel-GUGZisLp.js → TestEmailPanel-B8LwXmeX.js} +2 -2
  75. package/dist/cdn/chunks/{TestEmailPanel-GUGZisLp.js.map → TestEmailPanel-B8LwXmeX.js.map} +1 -1
  76. package/dist/cdn/chunks/{TitleEditor-uKu33Nwr.js → TitleEditor-C7KMzX1e.js} +2 -2
  77. package/dist/cdn/chunks/{TitleEditor-uKu33Nwr.js.map → TitleEditor-C7KMzX1e.js.map} +1 -1
  78. package/dist/cdn/chunks/{Toolbar-dxDYwN5E.js → Toolbar-DqFhWxgW.js} +310 -310
  79. package/dist/cdn/chunks/Toolbar-DqFhWxgW.js.map +1 -0
  80. package/dist/cdn/chunks/{TplModal-DuwS2ifK.js → TplModal-BKqDFLq3.js} +2 -2
  81. package/dist/cdn/chunks/{TplModal-DuwS2ifK.js.map → TplModal-BKqDFLq3.js.map} +1 -1
  82. package/dist/cdn/chunks/{VersionHistoryPanels-GeR6MStB.js → VersionHistoryPanels-DcCFFDK6.js} +2 -2
  83. package/dist/cdn/chunks/{VersionHistoryPanels-GeR6MStB.js.map → VersionHistoryPanels-DcCFFDK6.js.map} +1 -1
  84. package/dist/cdn/chunks/{ca-YlPDhElv.js → ca-Bqeygp1_.js} +2 -1
  85. package/dist/cdn/chunks/{ca-YlPDhElv.js.map → ca-Bqeygp1_.js.map} +1 -1
  86. package/dist/cdn/chunks/{de-CONjnzrF.js → de-CY6SlqBx.js} +2 -1
  87. package/dist/cdn/chunks/{de-CONjnzrF.js.map → de-CY6SlqBx.js.map} +1 -1
  88. package/dist/{de-BytZwgn6.js → cdn/chunks/de-mMY5yQJu.js} +5 -0
  89. package/dist/cdn/chunks/de-mMY5yQJu.js.map +1 -0
  90. package/dist/cdn/chunks/{editor-modal-C-yBlj2C.js → editor-modal-zxvWz8R6.js} +4 -3
  91. package/dist/cdn/chunks/editor-modal-zxvWz8R6.js.map +1 -0
  92. package/dist/cdn/chunks/{en-BAMooiOF.js → en-8V-2kDcp.js} +2 -1
  93. package/dist/cdn/chunks/{en-BAMooiOF.js.map → en-8V-2kDcp.js.map} +1 -1
  94. package/dist/cdn/chunks/en-BcQ9ovQu.js +2 -0
  95. package/dist/{en-DyOSV0lY.js → cdn/chunks/en-ChVeGQBY.js} +5 -0
  96. package/dist/cdn/chunks/en-ChVeGQBY.js.map +1 -0
  97. package/dist/cdn/chunks/{es-I47lHs2m.js → es-Cmn1rT3l.js} +2 -1
  98. package/dist/cdn/chunks/{es-I47lHs2m.js.map → es-Cmn1rT3l.js.map} +1 -1
  99. package/dist/cdn/chunks/{fr-B8MIKjT4.js → fr-2yDa4zXM.js} +2 -1
  100. package/dist/cdn/chunks/{fr-B8MIKjT4.js.map → fr-2yDa4zXM.js.map} +1 -1
  101. package/dist/cdn/chunks/{nl-CBLxcb-0.js → nl-Bzk2zRI8.js} +2 -1
  102. package/dist/cdn/chunks/{nl-CBLxcb-0.js.map → nl-Bzk2zRI8.js.map} +1 -1
  103. package/dist/cdn/chunks/{pt-BR-C1WLSGDh.js → pt-BR-CoCwRUi0.js} +4 -1
  104. package/dist/cdn/chunks/pt-BR-CoCwRUi0.js.map +1 -0
  105. package/dist/cdn/chunks/{pt-BR-CMSRfX7t.js → pt-BR-DqtSCTUi.js} +2 -1
  106. package/dist/cdn/chunks/{pt-BR-CMSRfX7t.js.map → pt-BR-DqtSCTUi.js.map} +1 -1
  107. package/dist/cdn/chunks/{src-O5Sp_qJ7.js → src-CqYYKcCI.js} +2 -2
  108. package/dist/cdn/chunks/{src-O5Sp_qJ7.js.map → src-CqYYKcCI.js.map} +1 -1
  109. package/dist/cdn/chunks/{useEditorCore-BHmIp1hW.js → useEditorCore-CXYI14ux.js} +14 -14
  110. package/dist/cdn/chunks/{useEditorCore-BHmIp1hW.js.map → useEditorCore-CXYI14ux.js.map} +1 -1
  111. package/dist/cdn/editor.css +1 -1
  112. package/dist/cdn/editor.js +15 -15
  113. package/dist/cdn/editor.js.map +1 -1
  114. package/dist/{de-CONjnzrF.js → de-CY6SlqBx.js} +1 -0
  115. package/dist/{cdn/chunks/de-BytZwgn6.js → de-mMY5yQJu.js} +3 -2
  116. package/dist/{editor-modal-oD1qNz_P.js → editor-modal-Czq1I8oC.js} +3 -2
  117. package/dist/{en-BAMooiOF.js → en-8V-2kDcp.js} +1 -0
  118. package/dist/{cdn/chunks/en-DyOSV0lY.js → en-ChVeGQBY.js} +3 -2
  119. package/dist/en-DQqmtndQ.js +2 -0
  120. package/dist/{es-I47lHs2m.js → es-Cmn1rT3l.js} +1 -0
  121. package/dist/{fr-B8MIKjT4.js → fr-2yDa4zXM.js} +1 -0
  122. package/dist/{nl-CBLxcb-0.js → nl-Bzk2zRI8.js} +1 -0
  123. package/dist/{pt-BR-C1WLSGDh.js → pt-BR-CoCwRUi0.js} +3 -0
  124. package/dist/{pt-BR-CMSRfX7t.js → pt-BR-DqtSCTUi.js} +1 -0
  125. package/dist/style.css +1 -1
  126. package/dist/templatical-editor.js +14 -14
  127. package/dist/{useEditorCore-C5APBjjV.js → useEditorCore-BUVbQgwb.js} +13 -13
  128. package/package.json +7 -7
  129. package/dist/DesignReferenceSidebar-QC4gEUWp.js +0 -273
  130. package/dist/SavedBlocksPickBar-cI7bDQQi.js +0 -52
  131. package/dist/cdn/chunks/AiChatSidebar-CjSEoK4x.js.map +0 -1
  132. package/dist/cdn/chunks/CloudPanels-bHhh9AUA.js.map +0 -1
  133. package/dist/cdn/chunks/CollaboratorBar-DgqcaGGI.js.map +0 -1
  134. package/dist/cdn/chunks/CommentsSidebar-C7oAP3Mx.js.map +0 -1
  135. package/dist/cdn/chunks/DesignReferenceSidebar-Bjo0M-AY.js +0 -223
  136. package/dist/cdn/chunks/DesignReferenceSidebar-Bjo0M-AY.js.map +0 -1
  137. package/dist/cdn/chunks/IssuesPanel-DdFk-Blf.js.map +0 -1
  138. package/dist/cdn/chunks/MediaEditModal-BBZRcYKe.js.map +0 -1
  139. package/dist/cdn/chunks/ParagraphEditor-DO4RzP8l.js.map +0 -1
  140. package/dist/cdn/chunks/SaveBlockDialog-LgxYrXyx.js.map +0 -1
  141. package/dist/cdn/chunks/SavedBlocksBrowserModal-CdeSsTpb.js.map +0 -1
  142. package/dist/cdn/chunks/SavedBlocksPickBar-Cl6PLwwV.js +0 -54
  143. package/dist/cdn/chunks/SavedBlocksPickBar-Cl6PLwwV.js.map +0 -1
  144. package/dist/cdn/chunks/TemplateScoringPanel--JxR6CsQ.js.map +0 -1
  145. package/dist/cdn/chunks/TestEmailModal-BAuDxJtD.js.map +0 -1
  146. package/dist/cdn/chunks/Toolbar-dxDYwN5E.js.map +0 -1
  147. package/dist/cdn/chunks/de-BytZwgn6.js.map +0 -1
  148. package/dist/cdn/chunks/editor-modal-C-yBlj2C.js.map +0 -1
  149. package/dist/cdn/chunks/en-DYtFUE2l.js +0 -2
  150. package/dist/cdn/chunks/en-DyOSV0lY.js.map +0 -1
  151. package/dist/cdn/chunks/pt-BR-C1WLSGDh.js.map +0 -1
  152. package/dist/en-CM5fTFSo.js +0 -2
@@ -1,273 +0,0 @@
1
- import { A as e, At as t, B as n, D as ee, R as r, V as te, Z as i, at as a, c as o, d as s, g as c, h as l, jt as u, kt as ne, l as re, s as ie, u as d, v as f } from "./vue.runtime.esm-bundler-CyqhBwpY.js";
2
- import { a as ae, t as oe } from "./runtime-dom.esm-bundler-BGbPz4-g.js";
3
- import { Z as p, g as se, i as ce } from "./keys-BdoSgsz9.js";
4
- import "./timeouts-DHPZQ0G3.js";
5
- import { t as m } from "./createLucideIcon-BxY5yz5u.js";
6
- import { t as le } from "./circle-alert-CYgTHKWr.js";
7
- import { t as h } from "./image-up-Qi2BXD7T.js";
8
- import { t as ue } from "./upload-BBDme2cy.js";
9
- import { t as g } from "./x-3BHV3Q6K.js";
10
- import { t as de } from "./LoadingTrack-C2jKCU2d.js";
11
- import { t as _ } from "./_plugin-vue_export-helper-B3ysoDQm.js";
12
- import { n as fe } from "./useCloudI18n-D1iedlP3.js";
13
- import { _ as pe } from "./cloud-C9xWZXhg.js";
14
- var me = m({
15
- name: "file-image",
16
- size: 24,
17
- node: [
18
- ["path", {
19
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
20
- key: "1oefj6"
21
- }],
22
- ["path", {
23
- d: "M14 2v5a1 1 0 0 0 1 1h5",
24
- key: "wfsgrz"
25
- }],
26
- ["circle", {
27
- cx: "10",
28
- cy: "12",
29
- r: "2",
30
- key: "737tya"
31
- }],
32
- ["path", {
33
- d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
34
- key: "wt3hpn"
35
- }]
36
- ]
37
- }), v = m({
38
- name: "file-text",
39
- size: 24,
40
- node: [
41
- ["path", {
42
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
43
- key: "1oefj6"
44
- }],
45
- ["path", {
46
- d: "M14 2v5a1 1 0 0 0 1 1h5",
47
- key: "wfsgrz"
48
- }],
49
- ["path", {
50
- d: "M10 9H8",
51
- key: "b1mrlr"
52
- }],
53
- ["path", {
54
- d: "M16 13H8",
55
- key: "t4e002"
56
- }],
57
- ["path", {
58
- d: "M16 17H8",
59
- key: "z1uh3a"
60
- }]
61
- ]
62
- }), he = {
63
- key: 0,
64
- class: "tpl-design-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
65
- }, ge = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, y = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, b = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, x = {
66
- key: 0,
67
- class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
68
- }, S = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, C = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, w = {
69
- key: 1,
70
- class: "tpl:flex tpl:flex-col tpl:gap-4"
71
- }, T = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, E = {
72
- key: 0,
73
- class: "tpl:flex tpl:flex-col tpl:gap-2"
74
- }, D = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, O = ["src", "alt"], k = {
75
- key: 1,
76
- class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
77
- }, A = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, j = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, M = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, N = ["accept"], P = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, F = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, I = ["placeholder"], L = {
78
- key: 0,
79
- class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:px-3 tpl:py-3 tpl:bg-[var(--tpl-warning-light)] tpl:border tpl:border-[var(--tpl-warning)]"
80
- }, _e = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, ve = { class: "tpl:flex tpl:gap-2" }, ye = {
81
- key: 1,
82
- class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
83
- }, be = ["disabled"], xe = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, R = /*#__PURE__*/ _(/* @__PURE__ */ f({
84
- __name: "DesignReferenceSidebar",
85
- props: {
86
- visible: { type: Boolean },
87
- hasExistingBlocks: { type: Boolean }
88
- },
89
- emits: ["close", "apply"],
90
- setup(f, { emit: m }) {
91
- let _ = f, R = m, { t: z } = fe(), Se = p(se, "DesignReferenceSidebar"), Ce = p(ce, "DesignReferenceSidebar"), B = pe({
92
- authManager: Ce,
93
- getTemplateId: () => Se.state.template?.id ?? null,
94
- onApply: (e) => R("apply", e)
95
- }), V = i(null), H = i("image"), U = i(null), W = i(""), G = i(null), K = i(!1), q = i(!1), J = ie(() => !B.isGenerating.value && U.value !== null);
96
- function Y(e) {
97
- H.value = e, Z();
98
- }
99
- function we(e) {
100
- let t = e.target, n = t.files?.[0];
101
- n && X(n), t.value = "";
102
- }
103
- function X(e) {
104
- if (e.size > 10485760) {
105
- B.error.value = z.designReference.fileTooLarge;
106
- return;
107
- }
108
- if (H.value === "image") {
109
- if (![
110
- "image/png",
111
- "image/jpeg",
112
- "image/jpg",
113
- "image/webp"
114
- ].includes(e.type)) {
115
- B.error.value = z.designReference.invalidFileType;
116
- return;
117
- }
118
- } else if (H.value === "pdf" && e.type !== "application/pdf") {
119
- B.error.value = z.designReference.invalidFileType;
120
- return;
121
- }
122
- U.value = e, B.error.value = null, G.value && URL.revokeObjectURL(G.value), e.type.startsWith("image/") ? G.value = URL.createObjectURL(e) : G.value = null;
123
- }
124
- function Z() {
125
- G.value &&= (URL.revokeObjectURL(G.value), null), U.value = null;
126
- }
127
- function Q(e) {
128
- e.preventDefault(), q.value = !0;
129
- }
130
- function Te() {
131
- q.value = !1;
132
- }
133
- function Ee(e) {
134
- e.preventDefault(), q.value = !1;
135
- let t = e.dataTransfer?.files?.[0];
136
- t && X(t);
137
- }
138
- function $() {
139
- if (!J.value) return;
140
- if (_.hasExistingBlocks && !K.value) {
141
- K.value = !0;
142
- return;
143
- }
144
- K.value = !1;
145
- let e = {};
146
- W.value.trim() && (e.prompt = W.value.trim()), H.value === "image" && U.value ? e.imageUpload = U.value : H.value === "pdf" && U.value && (e.pdfUpload = U.value), B.generate(e);
147
- }
148
- function De() {
149
- K.value = !1;
150
- }
151
- return r(() => _.visible, (e) => {
152
- e || (K.value = !1);
153
- }), ee(() => {
154
- G.value &&= (URL.revokeObjectURL(G.value), null);
155
- }), (ee, r) => (e(), re(oe, {
156
- "enter-active-class": "tpl-design-slide-enter-active",
157
- "enter-from-class": "tpl:translate-x-full",
158
- "enter-to-class": "tpl:translate-x-0",
159
- "leave-active-class": "tpl-design-slide-leave-active",
160
- "leave-from-class": "tpl:translate-x-0",
161
- "leave-to-class": "tpl:translate-x-full"
162
- }, {
163
- default: n(() => [f.visible ? (e(), s("div", he, [o("div", ge, [o("div", y, [c(a(h), {
164
- size: 13,
165
- "stroke-width": 2
166
- }), o("span", null, u(a(z).designReference.title), 1)]), o("button", {
167
- class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]",
168
- onClick: r[0] ||= (e) => R("close")
169
- }, [c(a(g), {
170
- size: 14,
171
- "stroke-width": 2
172
- })])]), o("div", b, [a(B).isGenerating.value ? (e(), s("div", x, [o("div", S, [c(de), o("p", C, u(a(z).designReference.generating), 1)])])) : (e(), s("div", w, [
173
- o("div", T, [o("button", {
174
- class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all",
175
- style: t({
176
- backgroundColor: H.value === "image" ? "var(--tpl-bg)" : "transparent",
177
- color: H.value === "image" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
178
- boxShadow: H.value === "image" ? "var(--tpl-shadow)" : "none"
179
- }),
180
- onClick: r[1] ||= (e) => Y("image")
181
- }, [c(a(me), {
182
- size: 12,
183
- "stroke-width": 2
184
- }), l(" " + u(a(z).designReference.uploadImage), 1)], 4), o("button", {
185
- class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all",
186
- style: t({
187
- backgroundColor: H.value === "pdf" ? "var(--tpl-bg)" : "transparent",
188
- color: H.value === "pdf" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
189
- boxShadow: H.value === "pdf" ? "var(--tpl-shadow)" : "none"
190
- }),
191
- onClick: r[2] ||= (e) => Y("pdf")
192
- }, [c(a(v), {
193
- size: 12,
194
- "stroke-width": 2
195
- }), l(" " + u(a(z).designReference.uploadPdf), 1)], 4)]),
196
- o("div", null, [U.value ? (e(), s("div", E, [o("div", D, [G.value ? (e(), s("img", {
197
- key: 0,
198
- src: G.value,
199
- alt: U.value.name,
200
- class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
201
- }, null, 8, O)) : (e(), s("div", k, [c(a(v), {
202
- size: 32,
203
- "stroke-width": 1.5,
204
- class: "tpl:text-[var(--tpl-text-dim)]"
205
- }), o("span", A, u(U.value.name), 1)])), o("button", {
206
- class: "tpl:absolute tpl:top-2 tpl:right-2 tpl:rounded-full tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow)]",
207
- onClick: Z
208
- }, [c(a(g), {
209
- size: 12,
210
- "stroke-width": 2
211
- })])])])) : (e(), s("div", {
212
- key: 1,
213
- class: "tpl-design-dropzone tpl:flex tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border-2 tpl:border-dashed tpl:px-4 tpl:py-8 tpl:transition-colors",
214
- style: t({
215
- borderColor: q.value ? "var(--tpl-primary)" : "var(--tpl-border-light)",
216
- backgroundColor: q.value ? "var(--tpl-primary-light)" : "var(--tpl-bg)"
217
- }),
218
- onClick: r[3] ||= (e) => V.value?.click(),
219
- onDragover: Q,
220
- onDragleave: Te,
221
- onDrop: Ee
222
- }, [
223
- c(a(ue), {
224
- size: 24,
225
- "stroke-width": 1.5,
226
- class: "tpl:text-[var(--tpl-text-dim)]"
227
- }),
228
- o("span", j, u(a(z).designReference.dropHint), 1),
229
- o("span", M, u(H.value === "image" ? a(z).designReference.acceptedImages : a(z).designReference.acceptedPdf), 1)
230
- ], 36)), o("input", {
231
- ref_key: "fileInput",
232
- ref: V,
233
- type: "file",
234
- class: "tpl:hidden",
235
- accept: H.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
236
- onChange: we
237
- }, null, 40, N)]),
238
- o("div", P, [o("label", F, u(a(z).designReference.promptLabel), 1), te(o("textarea", {
239
- "onUpdate:modelValue": r[4] ||= (e) => W.value = e,
240
- class: ne(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
241
- placeholder: a(z).designReference.promptPlaceholder,
242
- rows: "3"
243
- }, null, 8, I), [[ae, W.value]])]),
244
- K.value ? (e(), s("div", L, [o("p", _e, u(a(z).designReference.replaceWarning), 1), o("div", ve, [o("button", {
245
- class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
246
- style: { "background-color": "transparent" },
247
- onClick: De
248
- }, u(a(z).designReference.replaceCancel), 1), o("button", {
249
- class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]",
250
- onClick: $
251
- }, u(a(z).designReference.replaceConfirm), 1)])])) : d("", !0),
252
- a(B).error.value ? (e(), s("div", ye, [c(a(le), {
253
- size: 14,
254
- "stroke-width": 2,
255
- class: "tpl:mt-0.5 tpl:shrink-0"
256
- }), o("span", null, u(a(z).designReference.error), 1)])) : d("", !0),
257
- K.value ? d("", !0) : (e(), s("button", {
258
- key: 2,
259
- class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]",
260
- disabled: !J.value,
261
- onClick: $
262
- }, [c(a(h), {
263
- size: 16,
264
- "stroke-width": 2
265
- }), l(" " + u(a(z).designReference.generate), 1)], 8, be)),
266
- o("p", xe, u(a(z).aiMenu.disclaimer), 1)
267
- ]))])])) : d("", !0)]),
268
- _: 1
269
- }));
270
- }
271
- }), [["__scopeId", "data-v-d72bc7be"]]);
272
- //#endregion
273
- export { R as default };
@@ -1,52 +0,0 @@
1
- import { A as e, at as t, c as n, d as r, g as i, h as a, jt as o, v as s } from "./vue.runtime.esm-bundler-CyqhBwpY.js";
2
- import { O as c } from "./useEditorCore-C5APBjjV.js";
3
- import { t as l } from "./useI18n-Ds_-druD.js";
4
- import { t as u } from "./x-3BHV3Q6K.js";
5
- //#region src/components/SavedBlocksPickBar.vue?vue&type=script&setup=true&lang.ts
6
- var d = {
7
- "data-testid": "saved-blocks-pick-bar",
8
- class: "tpl:absolute tpl:bottom-10 tpl:left-12 tpl:right-[320px] tpl:z-50 tpl:flex tpl:justify-center tpl:px-4",
9
- style: { "pointer-events": "none" }
10
- }, f = ["aria-label"], p = { class: "tpl:flex tpl:flex-col" }, m = {
11
- "data-testid": "saved-blocks-pick-count",
12
- class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]"
13
- }, h = { class: "tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, g = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, _ = ["disabled"], v = /* @__PURE__ */ s({
14
- __name: "SavedBlocksPickBar",
15
- props: { count: {} },
16
- emits: ["confirm", "cancel"],
17
- setup(s, { emit: v }) {
18
- let y = s, b = v, { t: x, format: S } = l();
19
- function C() {
20
- y.count > 0 && b("confirm");
21
- }
22
- return (l, v) => (e(), r("div", d, [n("div", {
23
- role: "toolbar",
24
- "aria-label": t(x).savedBlocks.pickToolbar,
25
- class: "tpl-scale-in tpl:flex tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-lg)] tpl:border tpl:py-2 tpl:pl-4 tpl:pr-2 tpl:border-[var(--tpl-border)]",
26
- style: {
27
- "pointer-events": "auto",
28
- "background-color": "var(--tpl-bg-elevated)",
29
- "box-shadow": "var(--tpl-shadow-xl)"
30
- }
31
- }, [n("div", p, [n("span", m, o(t(S)(t(x).savedBlocks.pickCount, { count: s.count })), 1), n("span", h, o(t(x).savedBlocks.pickHint), 1)]), n("div", g, [n("button", {
32
- type: "button",
33
- "data-testid": "saved-blocks-pick-cancel",
34
- class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]",
35
- onClick: v[0] ||= (e) => b("cancel")
36
- }, [i(t(u), {
37
- size: 13,
38
- "stroke-width": 2
39
- }), a(" " + o(t(x).savedBlocks.cancel), 1)]), n("button", {
40
- type: "button",
41
- "data-testid": "saved-blocks-pick-confirm",
42
- class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:px-2.5 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]",
43
- disabled: s.count === 0,
44
- onClick: C
45
- }, [i(t(c), {
46
- size: 13,
47
- "stroke-width": 2
48
- }), a(" " + o(t(x).savedBlocks.save), 1)], 8, _)])], 8, f)]));
49
- }
50
- });
51
- //#endregion
52
- export { v as default };
@@ -1 +0,0 @@
1
- {"version":3,"file":"AiChatSidebar-CjSEoK4x.js","names":[],"sources":["../../../src/cloud/components/AiChatSidebar.vue","../../../src/cloud/components/AiChatSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport LoadingTrack from \"../../components/LoadingTrack.vue\";\nimport { useAiChat } from \"@templatical/core/cloud\";\nimport {\n CLOUD_TRANSLATIONS_KEY,\n EDITOR_KEY,\n AUTH_MANAGER_KEY,\n MERGE_TAGS_KEY,\n NO_MERGE_TAGS,\n requireInject,\n} from \"../../keys\";\nimport { useAliveFlag } from \"../../composables/useAliveFlag\";\nimport type { TemplateContent } from \"@templatical/types\";\nimport {\n CircleAlert,\n LoaderCircle,\n Redo2,\n Send,\n Sparkles,\n Trash2,\n Undo2,\n X,\n} from \"@lucide/vue\";\nimport { inject, nextTick, ref, watch } from \"vue\";\nimport { useIntervalFn, useTimeoutFn } from \"@vueuse/core\";\n\nconst props = defineProps<{\n visible: boolean;\n onApply?: (content: TemplateContent) => void;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n}>();\n\nconst cloudTranslations = requireInject(\n CLOUD_TRANSLATIONS_KEY,\n \"AiChatSidebar\",\n);\nconst editor = requireInject(EDITOR_KEY, \"AiChatSidebar\");\nconst authManager = requireInject(AUTH_MANAGER_KEY, \"AiChatSidebar\");\nconst mergeTags = inject(MERGE_TAGS_KEY, NO_MERGE_TAGS);\nconst aliveFlag = useAliveFlag();\n\nconst aiChat = useAiChat({\n authManager,\n getTemplateId: () => editor.state.template?.id ?? null,\n onApply: props.onApply,\n onError: undefined,\n});\n\nconst promptInput = ref(\"\");\nconst messagesContainer = ref<HTMLElement | null>(null);\nconst historyLoaded = ref(false);\nconst visibleSuggestionCount = ref(0);\n\nconst { pause: pauseReveal, resume: resumeReveal } = useIntervalFn(\n () => {\n const count = aiChat.suggestions.value?.length ?? 0;\n if (visibleSuggestionCount.value < count) {\n visibleSuggestionCount.value++;\n } else {\n pauseReveal();\n }\n },\n 150,\n { immediate: false },\n);\n\nconst { start: startRevealTimeout } = useTimeoutFn(() => resumeReveal(), 100, {\n immediate: false,\n});\n\nwatch(\n () => aiChat.suggestions.value?.length ?? 0,\n (count) => {\n pauseReveal();\n if (count === 0) {\n visibleSuggestionCount.value = 0;\n return;\n }\n\n visibleSuggestionCount.value = 0;\n startRevealTimeout();\n },\n);\n\nfunction scrollToBottom(): void {\n nextTick(() => {\n if (messagesContainer.value) {\n messagesContainer.value.scrollTop = messagesContainer.value.scrollHeight;\n }\n });\n}\n\nwatch(\n () => aiChat.messages.value?.length ?? 0,\n () => scrollToBottom(),\n);\n\nwatch(\n () => props.visible,\n async (isVisible) => {\n if (isVisible && !historyLoaded.value) {\n historyLoaded.value = true;\n await aiChat.loadConversation();\n if (!aliveFlag.alive) return;\n\n if (\n (aiChat.messages.value?.length ?? 0) === 0 &&\n editor.content.value.blocks.length === 0\n ) {\n aiChat.loadSuggestions(editor.content.value, mergeTags.value);\n }\n }\n },\n);\n\nasync function handleSend(): Promise<void> {\n const prompt = promptInput.value.trim();\n if (!prompt || aiChat.isGenerating.value) {\n return;\n }\n\n promptInput.value = \"\";\n aiChat.error.value = null;\n aiChat.failedPrompt.value = null;\n scrollToBottom();\n\n await aiChat.sendPrompt(prompt, editor.content.value, mergeTags.value);\n if (!aliveFlag.alive) return;\n\n if (aiChat.failedPrompt.value) {\n promptInput.value = aiChat.failedPrompt.value;\n }\n\n scrollToBottom();\n}\n\nfunction stripJsonBlock(text: string): string {\n return text\n .replace(/```json[\\s\\S]*?```/g, \"\")\n .replace(/```json[\\s\\S]*/g, \"\")\n .trim();\n}\n\nfunction handleSuggestionClick(suggestion: string): void {\n pauseReveal();\n promptInput.value = suggestion;\n handleSend();\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleSend();\n }\n}\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl-ai-slide-enter-active\"\n enter-from-class=\"tpl:translate-x-full\"\n enter-to-class=\"tpl:translate-x-0\"\n leave-active-class=\"tpl-ai-slide-leave-active\"\n leave-from-class=\"tpl:translate-x-0\"\n leave-to-class=\"tpl:translate-x-full\"\n >\n <div\n v-if=\"visible\"\n class=\"tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]\"\n >\n <!-- Header -->\n <div\n class=\"tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]\"\n >\n <Sparkles :size=\"13\" :stroke-width=\"2\" />\n <span>\n {{ cloudTranslations.aiChat.title }}\n </span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-1\">\n <button\n v-if=\"(aiChat.messages.value?.length ?? 0) > 0\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n :title=\"cloudTranslations.aiChat.clear\"\n @click=\"aiChat.clearChat()\"\n >\n <Trash2 :size=\"14\" :stroke-width=\"2\" />\n </button>\n <button\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n @click=\"emit('close')\"\n >\n <X :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n\n <!-- Messages wrapper -->\n <div class=\"tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col\">\n <!-- Messages -->\n <div\n ref=\"messagesContainer\"\n class=\"tpl:flex-1 tpl:overflow-y-auto tpl:p-4\"\n >\n <!-- Loading history state -->\n <div\n v-if=\"aiChat.isLoadingHistory.value\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <LoaderCircle\n class=\"tpl-spinner tpl:text-[var(--tpl-text-muted)]\"\n :size=\"24\"\n :stroke-width=\"2\"\n />\n <p class=\"tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ cloudTranslations.aiChat.loadingHistory }}\n </p>\n </div>\n\n <!-- Empty state -->\n <div\n v-else-if=\"(aiChat.messages.value?.length ?? 0) === 0\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <Sparkles\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-text-dim)]\"\n />\n <p\n class=\"tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ cloudTranslations.aiChat.placeholder }}\n </p>\n </div>\n\n <!-- Message list -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-4\">\n <div\n v-for=\"(message, index) in aiChat.messages.value\"\n :key=\"message.id\"\n class=\"tpl:flex tpl:flex-col tpl:gap-2\"\n >\n <!-- User message -->\n <div\n v-if=\"message.role === 'user'\"\n class=\"tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm\"\n style=\"\n background-color: var(--tpl-primary-light);\n color: var(--tpl-text);\n max-width: 85%;\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{ message.content }}\n </div>\n\n <!-- Assistant message -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-2\">\n <LoadingTrack\n v-if=\"\n !stripJsonBlock(message.content) &&\n aiChat.isGenerating.value &&\n index === (aiChat.messages.value?.length ?? 0) - 1\n \"\n />\n <div\n v-else\n class=\"tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap\"\n style=\"\n max-width: 85%;\n background-color: var(--tpl-bg);\n color: var(--tpl-text);\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{\n stripJsonBlock(message.content) ||\n cloudTranslations.aiChat.applied\n }}\n </div>\n <button\n v-if=\"\n message.id === aiChat.lastApplyMessageId.value &&\n !aiChat.isGenerating.value\n \"\n 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\"\n style=\"\n border-color: var(--tpl-border);\n color: var(--tpl-text-muted);\n background-color: transparent;\n \"\n @click=\"aiChat.toggleLastRevert()\"\n >\n <template v-if=\"aiChat.isLastChangeReverted.value\">\n <Redo2 :size=\"12\" :stroke-width=\"2\" />\n {{ cloudTranslations.aiChat.reapply }}\n </template>\n <template v-else>\n <Undo2 :size=\"12\" :stroke-width=\"2\" />\n {{ cloudTranslations.aiChat.revert }}\n </template>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Error message -->\n <div\n v-if=\"aiChat.error.value\"\n 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\"\n style=\"\n background-color: var(--tpl-danger-light);\n color: var(--tpl-danger);\n \"\n >\n <CircleAlert\n :size=\"14\"\n :stroke-width=\"2\"\n class=\"tpl:mt-0.5 tpl:shrink-0\"\n />\n <span>{{\n aiChat.error.value === \"ai_apply_failed\"\n ? cloudTranslations.aiChat.applyFailed\n : cloudTranslations.aiChat.error\n }}</span>\n </div>\n\n <!-- Suggestions (overlay) -->\n <div\n v-if=\"(aiChat.suggestions.value?.length ?? 0) > 0\"\n class=\"tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3\"\n style=\"\n background-color: color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n );\n backdrop-filter: blur(2px);\n \"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-1.5\">\n <button\n v-for=\"(suggestion, index) in aiChat.suggestions.value ?? []\"\n :key=\"index\"\n class=\"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\"\n :class=\"\n (aiChat.suggestions.value?.length ?? 0) - 1 - index <\n visibleSuggestionCount\n ? 'tpl:translate-y-0 tpl:opacity-100'\n : 'tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0'\n \"\n style=\"\n border-color: var(--tpl-border);\n color: var(--tpl-primary);\n background-color: var(--tpl-bg);\n box-shadow: var(--tpl-shadow);\n \"\n @click=\"handleSuggestionClick(suggestion)\"\n >\n {{ suggestion }}\n </button>\n </div>\n </div>\n </div>\n\n <!-- Input area -->\n <div class=\"tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]\">\n <div\n class=\"tpl-ai-input-wrapper tpl-focus-ring-host 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)]\"\n >\n <textarea\n v-model=\"promptInput\"\n 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)]\"\n :placeholder=\"cloudTranslations.aiChat.inputPlaceholder\"\n :disabled=\"aiChat.isGenerating.value\"\n rows=\"3\"\n @keydown=\"handleKeydown\"\n />\n <button\n 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:disabled:opacity-40 tpl:text-[var(--tpl-primary)]\"\n :disabled=\"!promptInput.trim() || aiChat.isGenerating.value\"\n @click=\"handleSend\"\n >\n <Send :size=\"16\" :stroke-width=\"2\" />\n </button>\n </div>\n\n <!-- AI disclaimer -->\n <p\n class=\"tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ cloudTranslations.aiMenu.disclaimer }}\n </p>\n </div>\n </div>\n </Transition>\n</template>\n\n<style scoped>\n.tpl-ai-slide-enter-active {\n transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.tpl-ai-slide-leave-active {\n transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.tpl-ai-input-wrapper:focus-within {\n border-color: var(--tpl-primary);\n box-shadow: var(--tpl-ring);\n}\n\n.tpl-ai-send-btn:not(:disabled):hover {\n transform: scale(1.05);\n}\n\n.tpl-suggestion-btn:hover {\n border-color: var(--tpl-primary) !important;\n background-color: var(--tpl-primary-light) !important;\n}\n</style>\n","<script setup lang=\"ts\">\nimport LoadingTrack from \"../../components/LoadingTrack.vue\";\nimport { useAiChat } from \"@templatical/core/cloud\";\nimport {\n CLOUD_TRANSLATIONS_KEY,\n EDITOR_KEY,\n AUTH_MANAGER_KEY,\n MERGE_TAGS_KEY,\n NO_MERGE_TAGS,\n requireInject,\n} from \"../../keys\";\nimport { useAliveFlag } from \"../../composables/useAliveFlag\";\nimport type { TemplateContent } from \"@templatical/types\";\nimport {\n CircleAlert,\n LoaderCircle,\n Redo2,\n Send,\n Sparkles,\n Trash2,\n Undo2,\n X,\n} from \"@lucide/vue\";\nimport { inject, nextTick, ref, watch } from \"vue\";\nimport { useIntervalFn, useTimeoutFn } from \"@vueuse/core\";\n\nconst props = defineProps<{\n visible: boolean;\n onApply?: (content: TemplateContent) => void;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n}>();\n\nconst cloudTranslations = requireInject(\n CLOUD_TRANSLATIONS_KEY,\n \"AiChatSidebar\",\n);\nconst editor = requireInject(EDITOR_KEY, \"AiChatSidebar\");\nconst authManager = requireInject(AUTH_MANAGER_KEY, \"AiChatSidebar\");\nconst mergeTags = inject(MERGE_TAGS_KEY, NO_MERGE_TAGS);\nconst aliveFlag = useAliveFlag();\n\nconst aiChat = useAiChat({\n authManager,\n getTemplateId: () => editor.state.template?.id ?? null,\n onApply: props.onApply,\n onError: undefined,\n});\n\nconst promptInput = ref(\"\");\nconst messagesContainer = ref<HTMLElement | null>(null);\nconst historyLoaded = ref(false);\nconst visibleSuggestionCount = ref(0);\n\nconst { pause: pauseReveal, resume: resumeReveal } = useIntervalFn(\n () => {\n const count = aiChat.suggestions.value?.length ?? 0;\n if (visibleSuggestionCount.value < count) {\n visibleSuggestionCount.value++;\n } else {\n pauseReveal();\n }\n },\n 150,\n { immediate: false },\n);\n\nconst { start: startRevealTimeout } = useTimeoutFn(() => resumeReveal(), 100, {\n immediate: false,\n});\n\nwatch(\n () => aiChat.suggestions.value?.length ?? 0,\n (count) => {\n pauseReveal();\n if (count === 0) {\n visibleSuggestionCount.value = 0;\n return;\n }\n\n visibleSuggestionCount.value = 0;\n startRevealTimeout();\n },\n);\n\nfunction scrollToBottom(): void {\n nextTick(() => {\n if (messagesContainer.value) {\n messagesContainer.value.scrollTop = messagesContainer.value.scrollHeight;\n }\n });\n}\n\nwatch(\n () => aiChat.messages.value?.length ?? 0,\n () => scrollToBottom(),\n);\n\nwatch(\n () => props.visible,\n async (isVisible) => {\n if (isVisible && !historyLoaded.value) {\n historyLoaded.value = true;\n await aiChat.loadConversation();\n if (!aliveFlag.alive) return;\n\n if (\n (aiChat.messages.value?.length ?? 0) === 0 &&\n editor.content.value.blocks.length === 0\n ) {\n aiChat.loadSuggestions(editor.content.value, mergeTags.value);\n }\n }\n },\n);\n\nasync function handleSend(): Promise<void> {\n const prompt = promptInput.value.trim();\n if (!prompt || aiChat.isGenerating.value) {\n return;\n }\n\n promptInput.value = \"\";\n aiChat.error.value = null;\n aiChat.failedPrompt.value = null;\n scrollToBottom();\n\n await aiChat.sendPrompt(prompt, editor.content.value, mergeTags.value);\n if (!aliveFlag.alive) return;\n\n if (aiChat.failedPrompt.value) {\n promptInput.value = aiChat.failedPrompt.value;\n }\n\n scrollToBottom();\n}\n\nfunction stripJsonBlock(text: string): string {\n return text\n .replace(/```json[\\s\\S]*?```/g, \"\")\n .replace(/```json[\\s\\S]*/g, \"\")\n .trim();\n}\n\nfunction handleSuggestionClick(suggestion: string): void {\n pauseReveal();\n promptInput.value = suggestion;\n handleSend();\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleSend();\n }\n}\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl-ai-slide-enter-active\"\n enter-from-class=\"tpl:translate-x-full\"\n enter-to-class=\"tpl:translate-x-0\"\n leave-active-class=\"tpl-ai-slide-leave-active\"\n leave-from-class=\"tpl:translate-x-0\"\n leave-to-class=\"tpl:translate-x-full\"\n >\n <div\n v-if=\"visible\"\n class=\"tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]\"\n >\n <!-- Header -->\n <div\n class=\"tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]\"\n >\n <Sparkles :size=\"13\" :stroke-width=\"2\" />\n <span>\n {{ cloudTranslations.aiChat.title }}\n </span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-1\">\n <button\n v-if=\"(aiChat.messages.value?.length ?? 0) > 0\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n :title=\"cloudTranslations.aiChat.clear\"\n @click=\"aiChat.clearChat()\"\n >\n <Trash2 :size=\"14\" :stroke-width=\"2\" />\n </button>\n <button\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n @click=\"emit('close')\"\n >\n <X :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n\n <!-- Messages wrapper -->\n <div class=\"tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col\">\n <!-- Messages -->\n <div\n ref=\"messagesContainer\"\n class=\"tpl:flex-1 tpl:overflow-y-auto tpl:p-4\"\n >\n <!-- Loading history state -->\n <div\n v-if=\"aiChat.isLoadingHistory.value\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <LoaderCircle\n class=\"tpl-spinner tpl:text-[var(--tpl-text-muted)]\"\n :size=\"24\"\n :stroke-width=\"2\"\n />\n <p class=\"tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ cloudTranslations.aiChat.loadingHistory }}\n </p>\n </div>\n\n <!-- Empty state -->\n <div\n v-else-if=\"(aiChat.messages.value?.length ?? 0) === 0\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <Sparkles\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-text-dim)]\"\n />\n <p\n class=\"tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ cloudTranslations.aiChat.placeholder }}\n </p>\n </div>\n\n <!-- Message list -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-4\">\n <div\n v-for=\"(message, index) in aiChat.messages.value\"\n :key=\"message.id\"\n class=\"tpl:flex tpl:flex-col tpl:gap-2\"\n >\n <!-- User message -->\n <div\n v-if=\"message.role === 'user'\"\n class=\"tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm\"\n style=\"\n background-color: var(--tpl-primary-light);\n color: var(--tpl-text);\n max-width: 85%;\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{ message.content }}\n </div>\n\n <!-- Assistant message -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-2\">\n <LoadingTrack\n v-if=\"\n !stripJsonBlock(message.content) &&\n aiChat.isGenerating.value &&\n index === (aiChat.messages.value?.length ?? 0) - 1\n \"\n />\n <div\n v-else\n class=\"tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap\"\n style=\"\n max-width: 85%;\n background-color: var(--tpl-bg);\n color: var(--tpl-text);\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{\n stripJsonBlock(message.content) ||\n cloudTranslations.aiChat.applied\n }}\n </div>\n <button\n v-if=\"\n message.id === aiChat.lastApplyMessageId.value &&\n !aiChat.isGenerating.value\n \"\n 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\"\n style=\"\n border-color: var(--tpl-border);\n color: var(--tpl-text-muted);\n background-color: transparent;\n \"\n @click=\"aiChat.toggleLastRevert()\"\n >\n <template v-if=\"aiChat.isLastChangeReverted.value\">\n <Redo2 :size=\"12\" :stroke-width=\"2\" />\n {{ cloudTranslations.aiChat.reapply }}\n </template>\n <template v-else>\n <Undo2 :size=\"12\" :stroke-width=\"2\" />\n {{ cloudTranslations.aiChat.revert }}\n </template>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Error message -->\n <div\n v-if=\"aiChat.error.value\"\n 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\"\n style=\"\n background-color: var(--tpl-danger-light);\n color: var(--tpl-danger);\n \"\n >\n <CircleAlert\n :size=\"14\"\n :stroke-width=\"2\"\n class=\"tpl:mt-0.5 tpl:shrink-0\"\n />\n <span>{{\n aiChat.error.value === \"ai_apply_failed\"\n ? cloudTranslations.aiChat.applyFailed\n : cloudTranslations.aiChat.error\n }}</span>\n </div>\n\n <!-- Suggestions (overlay) -->\n <div\n v-if=\"(aiChat.suggestions.value?.length ?? 0) > 0\"\n class=\"tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3\"\n style=\"\n background-color: color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n );\n backdrop-filter: blur(2px);\n \"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-1.5\">\n <button\n v-for=\"(suggestion, index) in aiChat.suggestions.value ?? []\"\n :key=\"index\"\n class=\"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\"\n :class=\"\n (aiChat.suggestions.value?.length ?? 0) - 1 - index <\n visibleSuggestionCount\n ? 'tpl:translate-y-0 tpl:opacity-100'\n : 'tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0'\n \"\n style=\"\n border-color: var(--tpl-border);\n color: var(--tpl-primary);\n background-color: var(--tpl-bg);\n box-shadow: var(--tpl-shadow);\n \"\n @click=\"handleSuggestionClick(suggestion)\"\n >\n {{ suggestion }}\n </button>\n </div>\n </div>\n </div>\n\n <!-- Input area -->\n <div class=\"tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]\">\n <div\n class=\"tpl-ai-input-wrapper tpl-focus-ring-host 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)]\"\n >\n <textarea\n v-model=\"promptInput\"\n 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)]\"\n :placeholder=\"cloudTranslations.aiChat.inputPlaceholder\"\n :disabled=\"aiChat.isGenerating.value\"\n rows=\"3\"\n @keydown=\"handleKeydown\"\n />\n <button\n 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:disabled:opacity-40 tpl:text-[var(--tpl-primary)]\"\n :disabled=\"!promptInput.trim() || aiChat.isGenerating.value\"\n @click=\"handleSend\"\n >\n <Send :size=\"16\" :stroke-width=\"2\" />\n </button>\n </div>\n\n <!-- AI disclaimer -->\n <p\n class=\"tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ cloudTranslations.aiMenu.disclaimer }}\n </p>\n </div>\n </div>\n </Transition>\n</template>\n\n<style scoped>\n.tpl-ai-slide-enter-active {\n transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.tpl-ai-slide-leave-active {\n transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.tpl-ai-input-wrapper:focus-within {\n border-color: var(--tpl-primary);\n box-shadow: var(--tpl-ring);\n}\n\n.tpl-ai-send-btn:not(:disabled):hover {\n transform: scale(1.05);\n}\n\n.tpl-suggestion-btn:hover {\n border-color: var(--tpl-primary) !important;\n background-color: var(--tpl-primary-light) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BA,IAAM,IAAQ,GAKR,KAAO,GAIP,IAAoB,EACxB,GACA,eACF,GACM,IAAS,EAAc,IAAY,eAAe,GAClD,KAAc,EAAc,IAAkB,eAAe,GAC7D,IAAY,EAAO,IAAgB,EAAa,GAChD,IAAY,EAAa,GAEzB,IAAS,EAAU;GACvB;GACA,qBAAqB,EAAO,MAAM,UAAU,MAAM;GAClD,SAAS,EAAM;GACf,SAAS,KAAA;EACX,CAAC,GAEK,IAAc,EAAI,EAAE,GACpB,IAAoB,EAAwB,IAAI,GAChD,IAAgB,EAAI,EAAK,GACzB,IAAyB,EAAI,CAAC,GAE9B,EAAE,OAAO,GAAa,QAAQ,OAAiB,SAC7C;GAEJ,AAAI,EAAuB,SADb,EAAO,YAAY,OAAO,UAAU,KAEhD,EAAuB,UAEvB,EAAY;EAEhB,GACA,KACA,EAAE,WAAW,GAAM,CACrB,GAEM,EAAE,OAAO,OAAuB,SAAmB,GAAa,GAAG,KAAK,EAC5E,WAAW,GACb,CAAC;EAED,QACQ,EAAO,YAAY,OAAO,UAAU,IACzC,MAAU;GAET,IADA,EAAY,GACR,MAAU,GAAG;IACf,EAAuB,QAAQ;IAC/B;GACF;GAGA,AADA,EAAuB,QAAQ,GAC/B,GAAmB;EACrB,CACF;EAEA,SAAS,IAAuB;GAC9B,QAAe;IACb,AAAI,EAAkB,UACpB,EAAkB,MAAM,YAAY,EAAkB,MAAM;GAEhE,CAAC;EACH;EAOA,AALA,QACQ,EAAO,SAAS,OAAO,UAAU,SACjC,EAAe,CACvB,GAEA,QACQ,EAAM,SACZ,OAAO,MAAc;GACnB,IAAI,KAAa,CAAC,EAAc,OAAO;IAGrC,IAFA,EAAc,QAAQ,IACtB,MAAM,EAAO,iBAAi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MAAA,IAAA,EAAA,GAAA,CAAA,CAAA,IAAA,EAAA,KAAW,CAAA,CAAA,GAOtB,EAMS,UAAA;KALP,OAAM;KACL,UAAQ,CAAG,EAAA,MAAY,KAAI,KAAM,EAAA,CAAA,CAAM,CAAC,aAAa;KACrD,SAAO;IAER,GAAA,CAAA,EAAqC,EAAA,EAAA,GAAA;KAA9B,MAAM;KAAK,gBAAc;IAKpC,CAAA,CAAA,GAAA,GAAA,EAAA,CAAA,CAAA,GAAA,EAII,KAJJ,IAII,EADC,EAAA,CAAA,CAAiB,CAAC,OAAO,UAAU,GAAA,CAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CloudPanels-bHhh9AUA.js","names":[],"sources":["../../../src/cloud/components/CloudErrorOverlay.vue","../../../src/cloud/components/CloudErrorOverlay.vue","../../../src/cloud/components/CloudLoadingOverlay.vue","../../../src/cloud/components/CloudLoadingOverlay.vue","../../../src/cloud/components/CloudSaveGateModal.vue","../../../src/cloud/components/CloudSaveGateModal.vue","../../../src/cloud/components/CollabUndoToast.vue","../../../src/cloud/components/CollabUndoToast.vue","../../../src/cloud/components/CloudPanels.vue","../../../src/cloud/components/CloudPanels.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CircleAlert } from \"@lucide/vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n error: Error | null;\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"retry\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nfunction getErrorMessage(error: Error): string {\n if (\n \"isUnauthorized\" in error &&\n (error as { isUnauthorized: boolean }).isUnauthorized\n ) {\n return cloudT.error.authFailed;\n }\n if (\"isNotFound\" in error && (error as { isNotFound: boolean }).isNotFound) {\n return cloudT.error.templateNotFound;\n }\n return cloudT.error.defaultMessage;\n}\n\nfunction isNotFoundError(error: Error): boolean {\n return (\n \"isNotFound\" in error && !!(error as { isNotFound: boolean }).isNotFound\n );\n}\n</script>\n\n<template>\n <div\n v-if=\"visible && error\"\n role=\"alert\"\n class=\"tpl-error tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]\"\n >\n <div\n class=\"tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]\"\n >\n <CircleAlert\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-danger)]\"\n />\n </div>\n <div\n class=\"tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center\"\n >\n <h2 class=\"tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]\">\n {{ cloudT.error.title }}\n </h2>\n <p class=\"tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ getErrorMessage(error) }}\n </p>\n </div>\n <button\n v-if=\"!isNotFoundError(error)\"\n class=\"tpl-btn tpl-btn-primary tpl:inline-flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]\"\n @click=\"emit('retry')\"\n >\n {{ cloudT.error.retry }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { CircleAlert } from \"@lucide/vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n error: Error | null;\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"retry\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nfunction getErrorMessage(error: Error): string {\n if (\n \"isUnauthorized\" in error &&\n (error as { isUnauthorized: boolean }).isUnauthorized\n ) {\n return cloudT.error.authFailed;\n }\n if (\"isNotFound\" in error && (error as { isNotFound: boolean }).isNotFound) {\n return cloudT.error.templateNotFound;\n }\n return cloudT.error.defaultMessage;\n}\n\nfunction isNotFoundError(error: Error): boolean {\n return (\n \"isNotFound\" in error && !!(error as { isNotFound: boolean }).isNotFound\n );\n}\n</script>\n\n<template>\n <div\n v-if=\"visible && error\"\n role=\"alert\"\n class=\"tpl-error tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]\"\n >\n <div\n class=\"tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]\"\n >\n <CircleAlert\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-danger)]\"\n />\n </div>\n <div\n class=\"tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center\"\n >\n <h2 class=\"tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]\">\n {{ cloudT.error.title }}\n </h2>\n <p class=\"tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ getErrorMessage(error) }}\n </p>\n </div>\n <button\n v-if=\"!isNotFoundError(error)\"\n class=\"tpl-btn tpl-btn-primary tpl:inline-flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]\"\n @click=\"emit('retry')\"\n >\n {{ cloudT.error.retry }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\ndefineProps<{\n visible: boolean;\n}>();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n class=\"tpl-loading tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]\"\n >\n <!-- Skeleton header -->\n <div\n class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl:flex tpl:gap-3\">\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n </div>\n <!-- Skeleton body -->\n <div class=\"tpl:flex tpl:flex-1 tpl:overflow-hidden\">\n <!-- Left sidebar rail -->\n <div\n class=\"tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-for=\"n in 5\"\n :key=\"n\"\n class=\"tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <!-- Canvas area -->\n <div\n class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <div\n class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"\n >\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:flex tpl:justify-center tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"\n ></div>\n </div>\n </div>\n </div>\n <!-- Right panel -->\n <div\n class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\ndefineProps<{\n visible: boolean;\n}>();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n class=\"tpl-loading tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]\"\n >\n <!-- Skeleton header -->\n <div\n class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl:flex tpl:gap-3\">\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n </div>\n <!-- Skeleton body -->\n <div class=\"tpl:flex tpl:flex-1 tpl:overflow-hidden\">\n <!-- Left sidebar rail -->\n <div\n class=\"tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-for=\"n in 5\"\n :key=\"n\"\n class=\"tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <!-- Canvas area -->\n <div\n class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <div\n class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"\n >\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:flex tpl:justify-center tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"\n ></div>\n </div>\n </div>\n </div>\n <!-- Right panel -->\n <div\n class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { AlertTriangle } from \"@lucide/vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\ndefineProps<{\n open: boolean;\n issues: LintIssue[];\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl:transition-opacity\"\n leave-active-class=\"tpl:transition-opacity\"\n enter-from-class=\"tpl:opacity-0\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <div\n v-if=\"open\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"cloudT.saveGate.title\"\n class=\"tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6\"\n @click.self=\"emit('cancel')\"\n >\n <div\n class=\"tpl:flex tpl:max-h-[80%] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-md)]\"\n >\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <AlertTriangle\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-warning)]\"\n />\n <h2\n class=\"tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ cloudT.saveGate.title }}\n </h2>\n </header>\n\n <p class=\"tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ cloudT.saveGate.body }}\n </p>\n\n <ul\n class=\"tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2\"\n >\n <li\n v-for=\"issue in issues\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5\"\n >\n <span class=\"tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </span>\n <span\n class=\"tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </span>\n </li>\n </ul>\n\n <footer class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n @click=\"emit('cancel')\"\n >\n {{ cloudT.saveGate.cancel }}\n </button>\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:bg-[var(--tpl-danger)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-bg)]\"\n @click=\"emit('confirm')\"\n >\n {{ cloudT.saveGate.confirm }}\n </button>\n </footer>\n </div>\n </div>\n </Transition>\n</template>\n","<script setup lang=\"ts\">\nimport { AlertTriangle } from \"@lucide/vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\ndefineProps<{\n open: boolean;\n issues: LintIssue[];\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl:transition-opacity\"\n leave-active-class=\"tpl:transition-opacity\"\n enter-from-class=\"tpl:opacity-0\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <div\n v-if=\"open\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"cloudT.saveGate.title\"\n class=\"tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6\"\n @click.self=\"emit('cancel')\"\n >\n <div\n class=\"tpl:flex tpl:max-h-[80%] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-md)]\"\n >\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <AlertTriangle\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-warning)]\"\n />\n <h2\n class=\"tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ cloudT.saveGate.title }}\n </h2>\n </header>\n\n <p class=\"tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ cloudT.saveGate.body }}\n </p>\n\n <ul\n class=\"tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2\"\n >\n <li\n v-for=\"issue in issues\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5\"\n >\n <span class=\"tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </span>\n <span\n class=\"tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </span>\n </li>\n </ul>\n\n <footer class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n @click=\"emit('cancel')\"\n >\n {{ cloudT.saveGate.cancel }}\n </button>\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:bg-[var(--tpl-danger)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-bg)]\"\n @click=\"emit('confirm')\"\n >\n {{ cloudT.saveGate.confirm }}\n </button>\n </footer>\n </div>\n </div>\n </Transition>\n</template>\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../../composables/useI18n\";\n\ndefineProps<{\n visible: boolean;\n}>();\n\nconst { t } = useI18n();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:absolute tpl:top-16 tpl:left-1/2 tpl:z-[60] tpl:-translate-x-1/2 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"\n background-color: var(--tpl-warning-light);\n color: var(--tpl-text);\n border: 1px solid var(--tpl-warning);\n \"\n >\n {{ t.history.collabWarning }}\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../../composables/useI18n\";\n\ndefineProps<{\n visible: boolean;\n}>();\n\nconst { t } = useI18n();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:absolute tpl:top-16 tpl:left-1/2 tpl:z-[60] tpl:-translate-x-1/2 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"\n background-color: var(--tpl-warning-light);\n color: var(--tpl-text);\n border: 1px solid var(--tpl-warning);\n \"\n >\n {{ t.history.collabWarning }}\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { defineAsyncComponent } from \"vue\";\nimport type { TemplateContent } from \"@templatical/types\";\nimport type { UseEditorReturn } from \"@templatical/core\";\n\nimport type { UseEditorCoreReturn } from \"../../composables/useEditorCore\";\nimport type { CloudAttachment, CloudReady, CloudRuntime } from \"../runtime\";\n\nimport CloudErrorOverlay from \"./CloudErrorOverlay.vue\";\nimport CloudLoadingOverlay from \"./CloudLoadingOverlay.vue\";\nimport CloudSaveGateModal from \"./CloudSaveGateModal.vue\";\nimport CollabUndoToast from \"./CollabUndoToast.vue\";\n\nconst AiChatSidebar = defineAsyncComponent(() => import(\"./AiChatSidebar.vue\"));\nconst DesignReferenceSidebar = defineAsyncComponent(\n () => import(\"./DesignReferenceSidebar.vue\"),\n);\nconst TemplateScoringPanel = defineAsyncComponent(\n () => import(\"./TemplateScoringPanel.vue\"),\n);\n\n/**\n * Every piece of Cloud chrome that renders outside the header.\n *\n * `Editor.vue` mounts this behind one lazy `defineAsyncComponent` gated on a\n * cloud runtime being present, so an OSS consumer downloads none of it — the\n * `SavedBlocksPanels` / `TestEmailPanel` pattern.\n *\n * The overlays live here rather than in the shared editor deliberately: `init()`\n * cannot fail after it mounts, and OSS should not grow the ability.\n *\n * The comments sidebar is deliberately not here: it is shared, as `CommentsPanel`\n * in `Editor.vue` over a `CommentsProvider`. Its filter target lives on the shared\n * feature rather than being relayed through this component, so it survives the\n * lazy panel's mount without a runtime hop.\n *\n * The media library is not here either: it is shared, as `MediaPanels` in\n * `Editor.vue` over a `MediaProvider`. Cloud supplies that provider; it does\n * not mount a second modal.\n */\nconst props = defineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n}>();\n\nfunction applyContent(content: TemplateContent): void {\n props.core.history.record();\n props.editor.setContent(content);\n props.core.conditionPreview.reset();\n}\n</script>\n\n<template>\n <!-- A template create / load in flight. Cloud reads its content from the\n server, so there is a real gap where the canvas shows the wrong thing. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-100\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudLoadingOverlay :visible=\"editor.state.isLoading\" />\n </Transition>\n\n <!-- Session failure — an auth refresh that could not renew the token. The\n *bootstrap* has no overlay any more: it runs before the mount, so a\n failure there rejects `initCloud()` instead of mounting a dead editor. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudErrorOverlay\n :error=\"ready.sessionError.value\"\n :visible=\"!!ready.sessionError.value\"\n @retry=\"ready.retry\"\n />\n </Transition>\n\n <CloudSaveGateModal\n :open=\"ready.saveGate.modalOpen.value\"\n :issues=\"ready.saveGate.blockingIssues.value\"\n @cancel=\"ready.saveGate.cancel\"\n @confirm=\"ready.saveGate.confirmAndSave\"\n />\n\n <Transition\n enter-active-class=\"tpl:transition-all tpl:duration-200 tpl:ease-out\"\n enter-from-class=\"tpl:translate-y-[-8px] tpl:opacity-0\"\n enter-to-class=\"tpl:translate-y-0 tpl:opacity-100\"\n leave-active-class=\"tpl:transition-all tpl:duration-300 tpl:ease-in\"\n leave-from-class=\"tpl:translate-y-0 tpl:opacity-100\"\n leave-to-class=\"tpl:translate-y-[-8px] tpl:opacity-0\"\n >\n <CollabUndoToast\n :visible=\"ready.collabWarning.collabUndoWarningVisible.value\"\n />\n </Transition>\n\n <AiChatSidebar\n :visible=\"cloud.panelState.aiChatOpen.value\"\n :on-apply=\"applyContent\"\n @close=\"cloud.panelState.aiChatOpen.value = false\"\n />\n\n <TemplateScoringPanel\n :visible=\"cloud.panelState.scoringPanelOpen.value\"\n @close=\"cloud.panelState.scoringPanelOpen.value = false\"\n />\n\n <DesignReferenceSidebar\n :visible=\"cloud.panelState.designReferenceOpen.value\"\n :has-existing-blocks=\"editor.content.value.blocks.length > 0\"\n @close=\"cloud.panelState.designReferenceOpen.value = false\"\n @apply=\"applyContent\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { defineAsyncComponent } from \"vue\";\nimport type { TemplateContent } from \"@templatical/types\";\nimport type { UseEditorReturn } from \"@templatical/core\";\n\nimport type { UseEditorCoreReturn } from \"../../composables/useEditorCore\";\nimport type { CloudAttachment, CloudReady, CloudRuntime } from \"../runtime\";\n\nimport CloudErrorOverlay from \"./CloudErrorOverlay.vue\";\nimport CloudLoadingOverlay from \"./CloudLoadingOverlay.vue\";\nimport CloudSaveGateModal from \"./CloudSaveGateModal.vue\";\nimport CollabUndoToast from \"./CollabUndoToast.vue\";\n\nconst AiChatSidebar = defineAsyncComponent(() => import(\"./AiChatSidebar.vue\"));\nconst DesignReferenceSidebar = defineAsyncComponent(\n () => import(\"./DesignReferenceSidebar.vue\"),\n);\nconst TemplateScoringPanel = defineAsyncComponent(\n () => import(\"./TemplateScoringPanel.vue\"),\n);\n\n/**\n * Every piece of Cloud chrome that renders outside the header.\n *\n * `Editor.vue` mounts this behind one lazy `defineAsyncComponent` gated on a\n * cloud runtime being present, so an OSS consumer downloads none of it — the\n * `SavedBlocksPanels` / `TestEmailPanel` pattern.\n *\n * The overlays live here rather than in the shared editor deliberately: `init()`\n * cannot fail after it mounts, and OSS should not grow the ability.\n *\n * The comments sidebar is deliberately not here: it is shared, as `CommentsPanel`\n * in `Editor.vue` over a `CommentsProvider`. Its filter target lives on the shared\n * feature rather than being relayed through this component, so it survives the\n * lazy panel's mount without a runtime hop.\n *\n * The media library is not here either: it is shared, as `MediaPanels` in\n * `Editor.vue` over a `MediaProvider`. Cloud supplies that provider; it does\n * not mount a second modal.\n */\nconst props = defineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n}>();\n\nfunction applyContent(content: TemplateContent): void {\n props.core.history.record();\n props.editor.setContent(content);\n props.core.conditionPreview.reset();\n}\n</script>\n\n<template>\n <!-- A template create / load in flight. Cloud reads its content from the\n server, so there is a real gap where the canvas shows the wrong thing. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-100\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudLoadingOverlay :visible=\"editor.state.isLoading\" />\n </Transition>\n\n <!-- Session failure — an auth refresh that could not renew the token. The\n *bootstrap* has no overlay any more: it runs before the mount, so a\n failure there rejects `initCloud()` instead of mounting a dead editor. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudErrorOverlay\n :error=\"ready.sessionError.value\"\n :visible=\"!!ready.sessionError.value\"\n @retry=\"ready.retry\"\n />\n </Transition>\n\n <CloudSaveGateModal\n :open=\"ready.saveGate.modalOpen.value\"\n :issues=\"ready.saveGate.blockingIssues.value\"\n @cancel=\"ready.saveGate.cancel\"\n @confirm=\"ready.saveGate.confirmAndSave\"\n />\n\n <Transition\n enter-active-class=\"tpl:transition-all tpl:duration-200 tpl:ease-out\"\n enter-from-class=\"tpl:translate-y-[-8px] tpl:opacity-0\"\n enter-to-class=\"tpl:translate-y-0 tpl:opacity-100\"\n leave-active-class=\"tpl:transition-all tpl:duration-300 tpl:ease-in\"\n leave-from-class=\"tpl:translate-y-0 tpl:opacity-100\"\n leave-to-class=\"tpl:translate-y-[-8px] tpl:opacity-0\"\n >\n <CollabUndoToast\n :visible=\"ready.collabWarning.collabUndoWarningVisible.value\"\n />\n </Transition>\n\n <AiChatSidebar\n :visible=\"cloud.panelState.aiChatOpen.value\"\n :on-apply=\"applyContent\"\n @close=\"cloud.panelState.aiChatOpen.value = false\"\n />\n\n <TemplateScoringPanel\n :visible=\"cloud.panelState.scoringPanelOpen.value\"\n @close=\"cloud.panelState.scoringPanelOpen.value = false\"\n />\n\n <DesignReferenceSidebar\n :visible=\"cloud.panelState.designReferenceOpen.value\"\n :has-existing-blocks=\"editor.content.value.blocks.length > 0\"\n @close=\"cloud.panelState.designReferenceOpen.value = false\"\n @apply=\"applyContent\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EASA,IAAM,IAAO,GAIP,EAAE,GAAG,MAAW,EAAmB;EAEzC,SAAS,EAAgB,GAAsB;GAU7C,OARE,oBAAoB,KACnB,EAAsC,iBAEhC,EAAO,MAAM,aAElB,gBAAgB,KAAU,EAAkC,aACvD,EAAO,MAAM,mBAEf,EAAO,MAAM;EACtB;EAEA,SAAS,EAAgB,GAAuB;GAC9C,OACE,gBAAgB,KAAS,CAAC,CAAE,EAAkC;EAElE;mBAKU,EAAA,WAAW,EAAA,SADnB,EAAA,GAAA,EA+BM,OA/BN,GA+BM;GA1BJ,EAQM,OARN,GAQM,CALJ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W,oBAAoB;IAC9C,uBAAqB,EAAA,OAAO,QAAQ,MAAM,OAAO,SAAM;IACvD,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,MAAM,WAAW,oBAAoB,QAAK;IACjD,SAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollaboratorBar-DgqcaGGI.js","names":[],"sources":["../../../src/cloud/components/CollaboratorBar.vue","../../../src/cloud/components/CollaboratorBar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Collaborator } from \"@templatical/types\";\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n collaborators: Collaborator[];\n isConnected: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst maxVisible = 3;\n\nconst visibleCollaborators = computed(() =>\n props.collaborators.slice(0, maxVisible),\n);\n\nconst overflowCollaborators = computed(() =>\n props.collaborators.slice(maxVisible),\n);\n\nconst overflowCount = computed(() => overflowCollaborators.value.length);\n\nconst overflowNames = computed(() =>\n overflowCollaborators.value.map((c) => c.name).join(\"\\n\"),\n);\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/);\n if (parts.length >= 2) {\n return (\n parts[0].charAt(0) + parts[parts.length - 1].charAt(0)\n ).toUpperCase();\n }\n return name.charAt(0).toUpperCase();\n}\n</script>\n\n<template>\n <div class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\">\n <!-- Connection indicator -->\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"\n isConnected\n ? cloudT.collaboration.connected\n : cloudT.collaboration.disconnected\n \"\n >\n <Wifi v-if=\"isConnected\" :size=\"12\" :stroke-width=\"2\" />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" />\n </div>\n\n <!-- Avatar stack -->\n <div\n v-if=\"collaborators.length > 0\"\n class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\"\n >\n <div\n v-for=\"collaborator in visibleCollaborators\"\n :key=\"collaborator.id\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]\"\n :style=\"{\n backgroundColor: collaborator.color,\n color: readableTextColor(collaborator.color),\n }\"\n :title=\"collaborator.name\"\n >\n {{ getInitials(collaborator.name) }}\n </div>\n <div\n v-if=\"overflowCount > 0\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[9px] tpl:font-bold tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowCount }}\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { Collaborator } from \"@templatical/types\";\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n collaborators: Collaborator[];\n isConnected: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst maxVisible = 3;\n\nconst visibleCollaborators = computed(() =>\n props.collaborators.slice(0, maxVisible),\n);\n\nconst overflowCollaborators = computed(() =>\n props.collaborators.slice(maxVisible),\n);\n\nconst overflowCount = computed(() => overflowCollaborators.value.length);\n\nconst overflowNames = computed(() =>\n overflowCollaborators.value.map((c) => c.name).join(\"\\n\"),\n);\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/);\n if (parts.length >= 2) {\n return (\n parts[0].charAt(0) + parts[parts.length - 1].charAt(0)\n ).toUpperCase();\n }\n return name.charAt(0).toUpperCase();\n}\n</script>\n\n<template>\n <div class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\">\n <!-- Connection indicator -->\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"\n isConnected\n ? cloudT.collaboration.connected\n : cloudT.collaboration.disconnected\n \"\n >\n <Wifi v-if=\"isConnected\" :size=\"12\" :stroke-width=\"2\" />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" />\n </div>\n\n <!-- Avatar stack -->\n <div\n v-if=\"collaborators.length > 0\"\n class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\"\n >\n <div\n v-for=\"collaborator in visibleCollaborators\"\n :key=\"collaborator.id\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]\"\n :style=\"{\n backgroundColor: collaborator.color,\n color: readableTextColor(collaborator.color),\n }\"\n :title=\"collaborator.name\"\n >\n {{ getInitials(collaborator.name) }}\n </div>\n <div\n v-if=\"overflowCount > 0\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[9px] tpl:font-bold tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowCount }}\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;iCAcM,IAAa;;;;;;;EAPnB,IAAM,IAAQ,GAKR,EAAE,GAAG,MAAW,EAAmB,GAInC,IAAuB,QAC3B,EAAM,cAAc,MAAM,GAAG,CAAU,C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