@templatical/editor 0.27.2 → 0.27.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 (164) hide show
  1. package/dist/{AiChatSidebar-iVJDzqjr.js → AiChatSidebar-LstHjwBU.js} +8 -8
  2. package/dist/{AiFeatureMenu-DrLGc2H2.js → AiFeatureMenu-DVQrznsN.js} +6 -6
  3. package/dist/{BlockIssueBadge-BHysq7XQ.js → BlockIssueBadge-DKaFQNxW.js} +4 -4
  4. package/dist/{BlockPreviewCanvas-2WASf5A4.js → BlockPreviewCanvas-D9eC04OA.js} +2 -2
  5. package/dist/{CloudHeaderExtras-DWApyc4P.js → CloudHeaderExtras-DX0j3CJ3.js} +3 -3
  6. package/dist/{CloudPanels-DvOhGdRj.js → CloudPanels-DCeNSwXy.js} +5 -5
  7. package/dist/{CollaboratorBar-C6MC0UCk.js → CollaboratorBar-BZ-JCjdM.js} +3 -3
  8. package/dist/{ColorPicker-Di8L5TLQ.js → ColorPicker-j0TQu5lE.js} +4 -4
  9. package/dist/{CommentsPanel-D5wQB1Kf.js → CommentsPanel-c5LmzlNN.js} +1 -1
  10. package/dist/{CommentsSidebar-BoTIxpLE.js → CommentsSidebar-Bm1DxFb5.js} +12 -12
  11. package/dist/{CountdownBlock-BFX8iU90.js → CountdownBlock-qKtJVRIV.js} +1 -1
  12. package/dist/{CountdownToolbar-d9QM4m5x.js → CountdownToolbar-UPdwNvVI.js} +2 -2
  13. package/dist/{DesignReferenceSidebar-DKsx2TiL.js → DesignReferenceSidebar-C8WTApc5.js} +7 -7
  14. package/dist/{IssuesPanel-flKKwKpM.js → IssuesPanel-D49aJjLS.js} +41 -40
  15. package/dist/{MergeTagModeToggle-PKCoKAoF.js → MergeTagModeToggle-CVzJY9b2.js} +4 -4
  16. package/dist/{ParagraphEditor-iwTjkjtx.js → ParagraphEditor-C9-jQ5zP.js} +11 -11
  17. package/dist/{RestoreVersionDialog-DyMPGfsr.js → RestoreVersionDialog-Ds6gEF5u.js} +4 -4
  18. package/dist/{RichTextEditorContent-BVXG9oF4.js → RichTextEditorContent-CO1se6ln.js} +6 -6
  19. package/dist/{SaveBlockDialog-BMCAIfK9.js → SaveBlockDialog-DJIcncsU.js} +8 -8
  20. package/dist/{SavedBlocksBrowserModal-p5ma1qay.js → SavedBlocksBrowserModal-BUhhkGEb.js} +9 -9
  21. package/dist/{SavedBlocksPanels-BsiSstsZ.js → SavedBlocksPanels-DBfPz4iB.js} +1 -1
  22. package/dist/{SavedBlocksPickBar-fU4Mjm-8.js → SavedBlocksPickBar-D9NsfzCB.js} +3 -3
  23. package/dist/{TemplateScoringPanel-Bv_bBsJi.js → TemplateScoringPanel-BFsUqnXR.js} +12 -12
  24. package/dist/{TestEmailModal-EFYcrmTk.js → TestEmailModal-DARwBqpV.js} +8 -8
  25. package/dist/{TestEmailPanel-ljriUqs1.js → TestEmailPanel-BkgAew1S.js} +1 -1
  26. package/dist/{TitleEditor-BqRW7HTz.js → TitleEditor-BWLwZh84.js} +8 -8
  27. package/dist/{TplModal-CTC9-w6B.js → TplModal-CJLs8as_.js} +3 -3
  28. package/dist/{VersionHistoryMenu-Cq4rH56t.js → VersionHistoryMenu-CrIVG_SN.js} +11 -11
  29. package/dist/{VersionHistoryPanels-GkxkBiSi.js → VersionHistoryPanels-s45U7XY-.js} +1 -1
  30. package/dist/{VersionPreviewBanner-BdtTu9mI.js → VersionPreviewBanner-BIy95B34.js} +2 -2
  31. package/dist/{blockTypeIcons-CIrMr1SJ.js → blockTypeIcons-BjUkQsAe.js} +2 -2
  32. package/dist/bundle-stats.json +7 -7
  33. package/dist/cdn/chunks/{AiChatSidebar-DTUoBH5a.js → AiChatSidebar-tZqbhmuJ.js} +3 -3
  34. package/dist/cdn/chunks/{AiChatSidebar-DTUoBH5a.js.map → AiChatSidebar-tZqbhmuJ.js.map} +1 -1
  35. package/dist/cdn/chunks/{AiFeatureMenu-BQz9Kczt.js → AiFeatureMenu-BhtNkpIq.js} +5 -5
  36. package/dist/cdn/chunks/{AiFeatureMenu-BQz9Kczt.js.map → AiFeatureMenu-BhtNkpIq.js.map} +1 -1
  37. package/dist/cdn/chunks/{BlockIssueBadge-UzSSOM_2.js → BlockIssueBadge-D9L8j7Db.js} +4 -4
  38. package/dist/cdn/chunks/{BlockIssueBadge-UzSSOM_2.js.map → BlockIssueBadge-D9L8j7Db.js.map} +1 -1
  39. package/dist/cdn/chunks/{BlockPreviewCanvas-40ocpXDD.js → BlockPreviewCanvas-Bt7fFzIQ.js} +3 -3
  40. package/dist/cdn/chunks/{BlockPreviewCanvas-40ocpXDD.js.map → BlockPreviewCanvas-Bt7fFzIQ.js.map} +1 -1
  41. package/dist/cdn/chunks/{CloudHeaderExtras-F_ySlW1S.js → CloudHeaderExtras-CScGpeLl.js} +4 -4
  42. package/dist/cdn/chunks/{CloudHeaderExtras-F_ySlW1S.js.map → CloudHeaderExtras-CScGpeLl.js.map} +1 -1
  43. package/dist/cdn/chunks/{CloudPanels-C34bcHpc.js → CloudPanels-DVtJkWsj.js} +6 -6
  44. package/dist/cdn/chunks/{CloudPanels-C34bcHpc.js.map → CloudPanels-DVtJkWsj.js.map} +1 -1
  45. package/dist/cdn/chunks/{CollaboratorBar-WBtrPPnM.js → CollaboratorBar-BH1lM_Ta.js} +4 -4
  46. package/dist/cdn/chunks/{CollaboratorBar-WBtrPPnM.js.map → CollaboratorBar-BH1lM_Ta.js.map} +1 -1
  47. package/dist/cdn/chunks/{ColorPicker-CxKYd_8N.js → ColorPicker-d4kY7WWd.js} +5 -5
  48. package/dist/cdn/chunks/{ColorPicker-CxKYd_8N.js.map → ColorPicker-d4kY7WWd.js.map} +1 -1
  49. package/dist/cdn/chunks/{CommentsPanel-jzZ2X0P4.js → CommentsPanel-COhQMagD.js} +2 -2
  50. package/dist/cdn/chunks/{CommentsPanel-jzZ2X0P4.js.map → CommentsPanel-COhQMagD.js.map} +1 -1
  51. package/dist/cdn/chunks/{CommentsSidebar-Dxke-vUP.js → CommentsSidebar-vzLX-_h3.js} +4 -4
  52. package/dist/cdn/chunks/{CommentsSidebar-Dxke-vUP.js.map → CommentsSidebar-vzLX-_h3.js.map} +1 -1
  53. package/dist/cdn/chunks/{CountdownBlock-BYSrJWxg.js → CountdownBlock-BKrYGRiT.js} +2 -2
  54. package/dist/cdn/chunks/{CountdownBlock-BYSrJWxg.js.map → CountdownBlock-BKrYGRiT.js.map} +1 -1
  55. package/dist/cdn/chunks/{CountdownToolbar-pVbkPNVo.js → CountdownToolbar-BRDbI1mM.js} +3 -3
  56. package/dist/cdn/chunks/{CountdownToolbar-pVbkPNVo.js.map → CountdownToolbar-BRDbI1mM.js.map} +1 -1
  57. package/dist/cdn/chunks/{DesignReferenceSidebar-sZWciECR.js → DesignReferenceSidebar-npLxDRJI.js} +4 -4
  58. package/dist/cdn/chunks/{DesignReferenceSidebar-sZWciECR.js.map → DesignReferenceSidebar-npLxDRJI.js.map} +1 -1
  59. package/dist/cdn/chunks/{IssuesPanel-CHtetM9i.js → IssuesPanel-CTGlv7HF.js} +37 -35
  60. package/dist/cdn/chunks/IssuesPanel-CTGlv7HF.js.map +1 -0
  61. package/dist/cdn/chunks/{MergeTagModeToggle-ZwW-5EeN.js → MergeTagModeToggle-CkpKFx9N.js} +4 -4
  62. package/dist/cdn/chunks/{MergeTagModeToggle-ZwW-5EeN.js.map → MergeTagModeToggle-CkpKFx9N.js.map} +1 -1
  63. package/dist/cdn/chunks/{ParagraphEditor-BBcIQQK2.js → ParagraphEditor-BgeeE0Gj.js} +9 -9
  64. package/dist/cdn/chunks/{ParagraphEditor-BBcIQQK2.js.map → ParagraphEditor-BgeeE0Gj.js.map} +1 -1
  65. package/dist/cdn/chunks/{RestoreVersionDialog-DNUZHFa_.js → RestoreVersionDialog-tfoAQAeP.js} +4 -4
  66. package/dist/cdn/chunks/{RestoreVersionDialog-DNUZHFa_.js.map → RestoreVersionDialog-tfoAQAeP.js.map} +1 -1
  67. package/dist/cdn/chunks/{RichTextEditorContent-Cl-acKAD.js → RichTextEditorContent-DvLBtUcW.js} +6 -6
  68. package/dist/cdn/chunks/{RichTextEditorContent-Cl-acKAD.js.map → RichTextEditorContent-DvLBtUcW.js.map} +1 -1
  69. package/dist/cdn/chunks/{SaveBlockDialog-BXTZ729e.js → SaveBlockDialog-D67K2lHn.js} +7 -7
  70. package/dist/cdn/chunks/{SaveBlockDialog-BXTZ729e.js.map → SaveBlockDialog-D67K2lHn.js.map} +1 -1
  71. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BqGNBpRR.js → SavedBlocksBrowserModal-BxVR-yDt.js} +8 -8
  72. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BqGNBpRR.js.map → SavedBlocksBrowserModal-BxVR-yDt.js.map} +1 -1
  73. package/dist/cdn/chunks/{SavedBlocksPanels-nbK0UQTp.js → SavedBlocksPanels-VkKCO0uY.js} +2 -2
  74. package/dist/cdn/chunks/SavedBlocksPanels-VkKCO0uY.js.map +1 -0
  75. package/dist/cdn/chunks/{SavedBlocksPickBar-B9mbw3Gk.js → SavedBlocksPickBar-BJHQDgUT.js} +4 -4
  76. package/dist/cdn/chunks/{SavedBlocksPickBar-B9mbw3Gk.js.map → SavedBlocksPickBar-BJHQDgUT.js.map} +1 -1
  77. package/dist/cdn/chunks/{TemplateScoringPanel-Xdkp2EMY.js → TemplateScoringPanel-MvdrkgqL.js} +4 -4
  78. package/dist/cdn/chunks/{TemplateScoringPanel-Xdkp2EMY.js.map → TemplateScoringPanel-MvdrkgqL.js.map} +1 -1
  79. package/dist/cdn/chunks/{TestEmailModal-DE6fi3he.js → TestEmailModal-CEBFCevy.js} +8 -8
  80. package/dist/cdn/chunks/{TestEmailModal-DE6fi3he.js.map → TestEmailModal-CEBFCevy.js.map} +1 -1
  81. package/dist/cdn/chunks/{TestEmailPanel-CAjQDXle.js → TestEmailPanel-C35nqIIl.js} +2 -2
  82. package/dist/cdn/chunks/TestEmailPanel-C35nqIIl.js.map +1 -0
  83. package/dist/cdn/chunks/{TitleEditor-BP0ewaWF.js → TitleEditor-c2aQCyds.js} +8 -8
  84. package/dist/cdn/chunks/{TitleEditor-BP0ewaWF.js.map → TitleEditor-c2aQCyds.js.map} +1 -1
  85. package/dist/cdn/chunks/{TplModal-C4kJduTr.js → TplModal-DSTVZKuI.js} +4 -4
  86. package/dist/cdn/chunks/{TplModal-C4kJduTr.js.map → TplModal-DSTVZKuI.js.map} +1 -1
  87. package/dist/cdn/chunks/{VersionHistoryMenu-_MAj3qZj.js → VersionHistoryMenu-BNYSIjVj.js} +5 -5
  88. package/dist/cdn/chunks/{VersionHistoryMenu-_MAj3qZj.js.map → VersionHistoryMenu-BNYSIjVj.js.map} +1 -1
  89. package/dist/cdn/chunks/{VersionHistoryPanels-DMq2PRee.js → VersionHistoryPanels-CvWySHUE.js} +2 -2
  90. package/dist/cdn/chunks/{VersionHistoryPanels-DMq2PRee.js.map → VersionHistoryPanels-CvWySHUE.js.map} +1 -1
  91. package/dist/cdn/chunks/{VersionPreviewBanner-04CL1SGY.js → VersionPreviewBanner-CBVDWnhq.js} +3 -3
  92. package/dist/cdn/chunks/VersionPreviewBanner-CBVDWnhq.js.map +1 -0
  93. package/dist/cdn/chunks/{blockTypeIcons-hX_W4dqo.js → blockTypeIcons-A9qFb1cR.js} +2 -2
  94. package/dist/cdn/chunks/{blockTypeIcons-hX_W4dqo.js.map → blockTypeIcons-A9qFb1cR.js.map} +1 -1
  95. package/dist/cdn/chunks/{createCloudRuntime-gXA8_QRU.js → createCloudRuntime-DYDf_-rN.js} +3 -3
  96. package/dist/cdn/chunks/{createCloudRuntime-gXA8_QRU.js.map → createCloudRuntime-DYDf_-rN.js.map} +1 -1
  97. package/dist/cdn/chunks/{extensions-CMcVw2uu.js → extensions-Byo2sA1r.js} +3 -3
  98. package/dist/cdn/chunks/{extensions-CMcVw2uu.js.map → extensions-Byo2sA1r.js.map} +1 -1
  99. package/dist/cdn/chunks/{icons-C36Ha5VU.js → icons-Dl5bcXmT.js} +7 -7
  100. package/dist/cdn/chunks/{icons-C36Ha5VU.js.map → icons-Dl5bcXmT.js.map} +1 -1
  101. package/dist/cdn/chunks/{keys-CbQuRX85.js → keys-oJdkdtPn.js} +2 -2
  102. package/dist/cdn/chunks/{keys-CbQuRX85.js.map → keys-oJdkdtPn.js.map} +1 -1
  103. package/dist/cdn/chunks/{src-D5lajkK5.js → src-BAWlZu4B.js} +3 -3
  104. package/dist/cdn/chunks/{src-D5lajkK5.js.map → src-BAWlZu4B.js.map} +1 -1
  105. package/dist/cdn/chunks/{src-CoHDh8Ua.js → src-BDUi-9js.js} +15 -15
  106. package/dist/cdn/chunks/{src-CoHDh8Ua.js.map → src-BDUi-9js.js.map} +1 -1
  107. package/dist/cdn/chunks/{useCloudI18n-NVa1aeY8.js → useCloudI18n-Ch-SiRjU.js} +3 -3
  108. package/dist/cdn/chunks/{useCloudI18n-NVa1aeY8.js.map → useCloudI18n-Ch-SiRjU.js.map} +1 -1
  109. package/dist/cdn/chunks/{useEditorCore-DC8gmfs6.js → useEditorCore-D84laTMj.js} +128 -135
  110. package/dist/cdn/chunks/useEditorCore-D84laTMj.js.map +1 -0
  111. package/dist/cdn/chunks/useEditorRoot-Cxnmf5hM.js +10 -0
  112. package/dist/cdn/chunks/useEditorRoot-Cxnmf5hM.js.map +1 -0
  113. package/dist/cdn/chunks/{useI18n-DVWCJJFH.js → useI18n-4sUbTM3Y.js} +3 -3
  114. package/dist/cdn/chunks/useI18n-4sUbTM3Y.js.map +1 -0
  115. package/dist/cdn/chunks/{useMergeTag-BfZBRPQp.js → useMergeTag-DxjTEyin.js} +2 -2
  116. package/dist/cdn/chunks/{useMergeTag-BfZBRPQp.js.map → useMergeTag-DxjTEyin.js.map} +1 -1
  117. package/dist/cdn/chunks/{usePopoverPosition-BC-HA7TK.js → usePopoverPosition-C1N2kaiZ.js} +2 -2
  118. package/dist/cdn/chunks/{usePopoverPosition-BC-HA7TK.js.map → usePopoverPosition-C1N2kaiZ.js.map} +1 -1
  119. package/dist/cdn/chunks/useScrollToBlock-BvWAfWd8.js +22 -0
  120. package/dist/cdn/chunks/useScrollToBlock-BvWAfWd8.js.map +1 -0
  121. package/dist/cdn/editor.css +1 -1
  122. package/dist/cdn/editor.js +974 -937
  123. package/dist/cdn/editor.js.map +1 -1
  124. package/dist/{check-DZbmkMQe.js → check-GRcTaHlZ.js} +1 -1
  125. package/dist/{chevron-down-nYScOLeZ.js → chevron-down-NUIAa2Qf.js} +1 -1
  126. package/dist/{chevron-up-CpYpDLnc.js → chevron-up-Bjf2BQtL.js} +1 -1
  127. package/dist/{circle-alert-CuuK6thq.js → circle-alert-FpQ8ykQL.js} +1 -1
  128. package/dist/{clock-DxkrtqOr.js → clock-CaOM1DC-.js} +1 -1
  129. package/dist/{createCloudRuntime-Bt8W-ajI.js → createCloudRuntime-FEZG-Gve.js} +1 -1
  130. package/dist/{createLucideIcon-L-wQXW_R.js → createLucideIcon-CAmDKr5Z.js} +2 -2
  131. package/dist/{extensions-CX87G4aL.js → extensions-BV9qfsYr.js} +2 -2
  132. package/dist/{image-up-DouZRGVt.js → image-up-CIGT4cSb.js} +1 -1
  133. package/dist/{info-puX5V6Iq.js → info-9YwKinXj.js} +1 -1
  134. package/dist/{keys-BxixS0TN.js → keys-CVpi8xCT.js} +1 -1
  135. package/dist/{loader-circle-DqTxB7Kr.js → loader-circle-QyURl47g.js} +1 -1
  136. package/dist/{message-circle-BZ7YpB22.js → message-circle-C9pycEzV.js} +1 -1
  137. package/dist/{pencil-DmbRhTJu.js → pencil-BvW86jVn.js} +1 -1
  138. package/dist/{refresh-cw-OK_O-cL0.js → refresh-cw-BDAUomac.js} +1 -1
  139. package/dist/{scan-line-DyaSTsJ5.js → scan-line-B5EvAPSG.js} +1 -1
  140. package/dist/{send-B-wasJJC.js → send-BAUn7DLp.js} +1 -1
  141. package/dist/{shield-check-DUIyRrTo.js → shield-check-CLGywlg0.js} +1 -1
  142. package/dist/{sparkles-DYEMATWC.js → sparkles-X6C0spo6.js} +1 -1
  143. package/dist/style.css +1 -1
  144. package/dist/templatical-editor.js +931 -895
  145. package/dist/{text-align-start-CzjLeBLe.js → text-align-start-C6FXOoEj.js} +1 -1
  146. package/dist/{trash-2-C0shEPry.js → trash-2-balHkQP4.js} +1 -1
  147. package/dist/{triangle-alert-Fw0ce8oQ.js → triangle-alert-D2JBEr6k.js} +1 -1
  148. package/dist/{upload-D69C2CBx.js → upload-D70OYprI.js} +1 -1
  149. package/dist/{useCloudI18n-CAZTZ9_a.js → useCloudI18n-DmWo4nzs.js} +2 -2
  150. package/dist/{useEditorCore-CFLzobo_.js → useEditorCore-D7Gz7_CW.js} +474 -481
  151. package/dist/useEditorRoot-DKyG95pb.js +8 -0
  152. package/dist/{useI18n-BfXff_Sy.js → useI18n-CvYvat9_.js} +2 -2
  153. package/dist/{useMergeTag-Dd4I7kge.js → useMergeTag-D6Z6cyDa.js} +1 -1
  154. package/dist/{usePopoverPosition-CxhCX3SQ.js → usePopoverPosition-WslxM_PU.js} +1 -1
  155. package/dist/useScrollToBlock-DcImB73T.js +44 -0
  156. package/dist/{x-BjTlFqRv.js → x-DTUPbuwx.js} +1 -1
  157. package/package.json +9 -9
  158. package/dist/cdn/chunks/IssuesPanel-CHtetM9i.js.map +0 -1
  159. package/dist/cdn/chunks/SavedBlocksPanels-nbK0UQTp.js.map +0 -1
  160. package/dist/cdn/chunks/TestEmailPanel-CAjQDXle.js.map +0 -1
  161. package/dist/cdn/chunks/VersionPreviewBanner-04CL1SGY.js.map +0 -1
  162. package/dist/cdn/chunks/useEditorCore-DC8gmfs6.js.map +0 -1
  163. package/dist/cdn/chunks/useI18n-DVWCJJFH.js.map +0 -1
  164. package/dist/list-checks-jw-ZlvWY.js +0 -25
@@ -1 +1 @@
1
- {"version":3,"file":"BlockPreviewCanvas-40ocpXDD.js","names":[],"sources":["../../../src/components/blocks/PreviewSectionBlock.vue","../../../src/components/blocks/PreviewSectionBlock.vue","../../../src/components/BlockPreviewCanvas.vue","../../../src/components/BlockPreviewCanvas.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport ButtonBlock from \"./ButtonBlock.vue\";\nimport CustomBlock from \"./CustomBlock.vue\";\nimport DividerBlock from \"./DividerBlock.vue\";\nimport HtmlBlock from \"./HtmlBlock.vue\";\nimport ImageBlock from \"./ImageBlock.vue\";\nimport MenuBlock from \"./MenuBlock.vue\";\nimport SocialIconsBlock from \"./SocialIconsBlock.vue\";\nimport SpacerBlock from \"./SpacerBlock.vue\";\nimport TableBlock from \"./TableBlock.vue\";\nimport TitleBlock from \"./TitleBlock.vue\";\nimport ParagraphBlock from \"./ParagraphBlock.vue\";\nimport VideoBlock from \"./VideoBlock.vue\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n SectionBlock as SectionBlockType,\n} from \"@templatical/types\";\nimport { computed, inject, type Component } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\nconst previewBlockComponentMap: Record<string, Component> = {\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nconst props = defineProps<{\n block: SectionBlockType;\n viewport: \"desktop\";\n}>();\n\ndefineOptions({ name: \"PreviewSectionBlock\" });\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst columnWidths = computed(() => {\n switch (props.block.columns) {\n case \"2\":\n return [\"50%\", \"50%\"];\n case \"3\":\n return [\"33.33%\", \"33.33%\", \"33.33%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n default:\n return [\"100%\"];\n }\n});\n\nconst columns = computed(() => {\n const count = columnWidths.value.length;\n const children = [...props.block.children];\n while (children.length < count) {\n children.push([]);\n }\n return children.slice(0, count);\n});\n\nfunction getColumnBlocks(colIndex: number): Block[] {\n return columns.value[colIndex] || [];\n}\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewBlockComponentMap);\n}\n</script>\n\n<template>\n <div class=\"tpl:w-full\">\n <div class=\"tpl:flex tpl:gap-0\">\n <div\n v-for=\"(_, colIndex) in columns\"\n :key=\"colIndex\"\n :style=\"{ width: columnWidths[colIndex] }\"\n >\n <div\n v-for=\"childBlock in getColumnBlocks(colIndex)\"\n :key=\"childBlock.id\"\n :style=\"getBlockWrapperStyle(childBlock)\"\n >\n <!-- Recursive self-reference for nested sections -->\n <PreviewSectionBlock\n v-if=\"childBlock.type === 'section'\"\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n <component\n :is=\"getBlockComponent(childBlock)\"\n v-else\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./ButtonBlock.vue\";\nimport CustomBlock from \"./CustomBlock.vue\";\nimport DividerBlock from \"./DividerBlock.vue\";\nimport HtmlBlock from \"./HtmlBlock.vue\";\nimport ImageBlock from \"./ImageBlock.vue\";\nimport MenuBlock from \"./MenuBlock.vue\";\nimport SocialIconsBlock from \"./SocialIconsBlock.vue\";\nimport SpacerBlock from \"./SpacerBlock.vue\";\nimport TableBlock from \"./TableBlock.vue\";\nimport TitleBlock from \"./TitleBlock.vue\";\nimport ParagraphBlock from \"./ParagraphBlock.vue\";\nimport VideoBlock from \"./VideoBlock.vue\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n SectionBlock as SectionBlockType,\n} from \"@templatical/types\";\nimport { computed, inject, type Component } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\nconst previewBlockComponentMap: Record<string, Component> = {\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nconst props = defineProps<{\n block: SectionBlockType;\n viewport: \"desktop\";\n}>();\n\ndefineOptions({ name: \"PreviewSectionBlock\" });\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst columnWidths = computed(() => {\n switch (props.block.columns) {\n case \"2\":\n return [\"50%\", \"50%\"];\n case \"3\":\n return [\"33.33%\", \"33.33%\", \"33.33%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n default:\n return [\"100%\"];\n }\n});\n\nconst columns = computed(() => {\n const count = columnWidths.value.length;\n const children = [...props.block.children];\n while (children.length < count) {\n children.push([]);\n }\n return children.slice(0, count);\n});\n\nfunction getColumnBlocks(colIndex: number): Block[] {\n return columns.value[colIndex] || [];\n}\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewBlockComponentMap);\n}\n</script>\n\n<template>\n <div class=\"tpl:w-full\">\n <div class=\"tpl:flex tpl:gap-0\">\n <div\n v-for=\"(_, colIndex) in columns\"\n :key=\"colIndex\"\n :style=\"{ width: columnWidths[colIndex] }\"\n >\n <div\n v-for=\"childBlock in getColumnBlocks(colIndex)\"\n :key=\"childBlock.id\"\n :style=\"getBlockWrapperStyle(childBlock)\"\n >\n <!-- Recursive self-reference for nested sections -->\n <PreviewSectionBlock\n v-if=\"childBlock.type === 'section'\"\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n <component\n :is=\"getBlockComponent(childBlock)\"\n v-else\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./blocks/ButtonBlock.vue\";\nimport CustomBlock from \"./blocks/CustomBlock.vue\";\nimport DividerBlock from \"./blocks/DividerBlock.vue\";\nimport HtmlBlock from \"./blocks/HtmlBlock.vue\";\nimport ImageBlock from \"./blocks/ImageBlock.vue\";\nimport MenuBlock from \"./blocks/MenuBlock.vue\";\nimport PreviewSectionBlock from \"./blocks/PreviewSectionBlock.vue\";\nimport SocialIconsBlock from \"./blocks/SocialIconsBlock.vue\";\nimport SpacerBlock from \"./blocks/SpacerBlock.vue\";\nimport TableBlock from \"./blocks/TableBlock.vue\";\nimport TitleBlock from \"./blocks/TitleBlock.vue\";\nimport ParagraphBlock from \"./blocks/ParagraphBlock.vue\";\nimport VideoBlock from \"./blocks/VideoBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n} from \"../keys\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport type { Block, ViewportSize } from \"@templatical/types\";\nimport { computed, inject, provide, type Component } from \"vue\";\n\nconst props = withDefaults(\n defineProps<{\n blocks: Block[];\n /**\n * Which viewport to render. Defaults to `desktop`, so the saved-blocks\n * surfaces — which have no viewport control — behave exactly as before.\n * The test-email dialog passes the user's choice so responsive blocks show\n * the variant a recipient on that device would receive.\n */\n viewport?: ViewportSize;\n /**\n * Whether the hand-toggled display-condition filter still applies here.\n * `false` where a resolver owns the preview: it has already evaluated every\n * condition against real data, so layering a manual hide on top would veto\n * the answer that was asked for.\n *\n * A prop rather than an injected `PREVIEW_RESOLUTION_KEY` read, because the\n * test-email dialog builds its *own* resolution instance (keyed to the\n * selected recipient) — injecting would consult the shared canvas instance\n * and get the wrong answer.\n */\n applyConditionFilter?: boolean;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\n\n/**\n * This canvas is only ever a preview — nothing here is editable — so it honours\n * the user's mode directly, with no `previewMode` gate of the kind `Canvas.vue`\n * needs. Re-provided rather than left to inherit, because a `BlockPreviewCanvas`\n * inside a dialog may sit under an editing `Canvas` that provides `false`.\n */\nconst mergeTagSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\nprovide(\n USE_MERGE_TAG_SAMPLES_KEY,\n computed(() => mergeTagSampleMode?.value ?? false),\n);\n\n/**\n * Blocks a display condition currently excludes, so a preview never shows\n * content the recipient won't get. The canvas does the same via\n * `v-show=\"!conditionPreview?.isHidden(block.id)\"`.\n *\n * A no-op for the saved-blocks browser: entries there carry their *stored* ids,\n * which aren't in the current template, so nothing is tracked as hidden. It\n * bites where it should — the save dialog and the test-email preview, both of\n * which show blocks that are live on the canvas.\n *\n * Skipped entirely when `applyConditionFilter` is false — see the prop.\n */\nconst visibleBlocks = computed(() =>\n props.applyConditionFilter\n ? props.blocks.filter((block) => !conditionPreview?.isHidden(block.id))\n : props.blocks,\n);\n\n/**\n * Frame width, from the one helper the canvas and the scaled preview rows also\n * use — so all three agree by construction rather than by three constants that\n * happen to match. A template with a custom body width now previews at that\n * width instead of a flat 600.\n */\nconst frameWidth = computed(() =>\n getEmailFrameWidth(editor?.content.value.settings, props.viewport),\n);\n\n/**\n * The same document-level style the canvas applies, so a previewed block\n * renders identically to the canvas one: without it the font falls back to the\n * editor UI's and the link rules hit their unset defaults, dropping the\n * underline and the link colour.\n *\n * Read from the *current* template even in the saved-blocks browser, where the\n * previewed content came from elsewhere — a saved block stores only `Block[]`,\n * and the current settings are what it will actually look like once inserted.\n */\nconst documentStyle = computed(() =>\n editor ? getDocumentStyle(editor.content.value.settings) : {},\n);\n\nconst previewComponentMap: Record<string, Component> = {\n section: PreviewSectionBlock,\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n</script>\n\n<template>\n <div\n data-testid=\"block-preview-canvas\"\n class=\"tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg\"\n :style=\"{\n width: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n backgroundColor: 'var(--tpl-canvas-bg)',\n boxShadow: 'var(--tpl-shadow-sm)',\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"getBlockWrapperStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./blocks/ButtonBlock.vue\";\nimport CustomBlock from \"./blocks/CustomBlock.vue\";\nimport DividerBlock from \"./blocks/DividerBlock.vue\";\nimport HtmlBlock from \"./blocks/HtmlBlock.vue\";\nimport ImageBlock from \"./blocks/ImageBlock.vue\";\nimport MenuBlock from \"./blocks/MenuBlock.vue\";\nimport PreviewSectionBlock from \"./blocks/PreviewSectionBlock.vue\";\nimport SocialIconsBlock from \"./blocks/SocialIconsBlock.vue\";\nimport SpacerBlock from \"./blocks/SpacerBlock.vue\";\nimport TableBlock from \"./blocks/TableBlock.vue\";\nimport TitleBlock from \"./blocks/TitleBlock.vue\";\nimport ParagraphBlock from \"./blocks/ParagraphBlock.vue\";\nimport VideoBlock from \"./blocks/VideoBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n} from \"../keys\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport type { Block, ViewportSize } from \"@templatical/types\";\nimport { computed, inject, provide, type Component } from \"vue\";\n\nconst props = withDefaults(\n defineProps<{\n blocks: Block[];\n /**\n * Which viewport to render. Defaults to `desktop`, so the saved-blocks\n * surfaces — which have no viewport control — behave exactly as before.\n * The test-email dialog passes the user's choice so responsive blocks show\n * the variant a recipient on that device would receive.\n */\n viewport?: ViewportSize;\n /**\n * Whether the hand-toggled display-condition filter still applies here.\n * `false` where a resolver owns the preview: it has already evaluated every\n * condition against real data, so layering a manual hide on top would veto\n * the answer that was asked for.\n *\n * A prop rather than an injected `PREVIEW_RESOLUTION_KEY` read, because the\n * test-email dialog builds its *own* resolution instance (keyed to the\n * selected recipient) — injecting would consult the shared canvas instance\n * and get the wrong answer.\n */\n applyConditionFilter?: boolean;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\n\n/**\n * This canvas is only ever a preview — nothing here is editable — so it honours\n * the user's mode directly, with no `previewMode` gate of the kind `Canvas.vue`\n * needs. Re-provided rather than left to inherit, because a `BlockPreviewCanvas`\n * inside a dialog may sit under an editing `Canvas` that provides `false`.\n */\nconst mergeTagSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\nprovide(\n USE_MERGE_TAG_SAMPLES_KEY,\n computed(() => mergeTagSampleMode?.value ?? false),\n);\n\n/**\n * Blocks a display condition currently excludes, so a preview never shows\n * content the recipient won't get. The canvas does the same via\n * `v-show=\"!conditionPreview?.isHidden(block.id)\"`.\n *\n * A no-op for the saved-blocks browser: entries there carry their *stored* ids,\n * which aren't in the current template, so nothing is tracked as hidden. It\n * bites where it should — the save dialog and the test-email preview, both of\n * which show blocks that are live on the canvas.\n *\n * Skipped entirely when `applyConditionFilter` is false — see the prop.\n */\nconst visibleBlocks = computed(() =>\n props.applyConditionFilter\n ? props.blocks.filter((block) => !conditionPreview?.isHidden(block.id))\n : props.blocks,\n);\n\n/**\n * Frame width, from the one helper the canvas and the scaled preview rows also\n * use — so all three agree by construction rather than by three constants that\n * happen to match. A template with a custom body width now previews at that\n * width instead of a flat 600.\n */\nconst frameWidth = computed(() =>\n getEmailFrameWidth(editor?.content.value.settings, props.viewport),\n);\n\n/**\n * The same document-level style the canvas applies, so a previewed block\n * renders identically to the canvas one: without it the font falls back to the\n * editor UI's and the link rules hit their unset defaults, dropping the\n * underline and the link colour.\n *\n * Read from the *current* template even in the saved-blocks browser, where the\n * previewed content came from elsewhere — a saved block stores only `Block[]`,\n * and the current settings are what it will actually look like once inserted.\n */\nconst documentStyle = computed(() =>\n editor ? getDocumentStyle(editor.content.value.settings) : {},\n);\n\nconst previewComponentMap: Record<string, Component> = {\n section: PreviewSectionBlock,\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n</script>\n\n<template>\n <div\n data-testid=\"block-preview-canvas\"\n class=\"tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg\"\n :style=\"{\n width: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n backgroundColor: 'var(--tpl-canvas-bg)',\n boxShadow: 'var(--tpl-shadow-sm)',\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"getBlockWrapperStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAwBA,IAAM,IAAsD;GAC1D,OAAO;GACP,WAAW;GACX,OAAO;GACP,OAAO;GACP,QAAQ;GACR,SAAS;GACT,QAAQ;GACR,MAAM;GACN,OAAO;GACP,QAAQ;GACR,MAAM;GACN,QAAQ;EACV,GAEM,IAAQ,GAOR,IAAgB,EAAO,GAAoB,IAAI,GAE/C,IAAe,QAAe;GAClC,QAAQ,EAAM,MAAM,SAApB;IACE,KAAK,KACH,OAAO,CAAC,OAAO,KAAK;IACtB,KAAK,KACH,OAAO;KAAC;KAAU;KAAU;IAAQ;IACtC,KAAK,OACH,OAAO,CAAC,UAAU,QAAQ;IAC5B,KAAK,OACH,OAAO,CAAC,UAAU,QAAQ;IAC5B,SACE,OAAO,CAAC,MAAM;GAClB;EACF,CAAC,GAEK,IAAU,QAAe;GAC7B,IAAM,IAAQ,EAAa,MAAM,QAC3B,IAAW,CAAC,GAAG,EAAM,MAAM,QAAQ;GACzC,OAAO,EAAS,SAAS,IACvB,EAAS,KAAK,CAAC,CAAC;GAElB,OAAO,EAAS,MAAM,GAAG,CAAK;EAChC,CAAC;EAED,SAAS,EAAgB,GAA2B;GAClD,OAAO,EAAQ,MAAM,MAAa,CAAC;EACrC;EAEA,SAAS,EAAkB,GAAgC;GACzD,OAAO,EAAsB,GAAO,GAAe,CAAwB;EAC7E;;;GAIE,OAAA,EAAA,GAAA,EA2BM,OA3BN,GA2BM,CA1BJ,EAyBM,OAzBN,GAyBM,EAxBJ,EAAA,EAAA,GAAA,EAuBM,GAAA,MAAA,EAtBoB,EAAA,QAAhB,GAAG,OADb,EAAA,GAAA,EAuBM,OAAA;IArBH,KAAK;IACL,OAAK,EAAA,EAAA,OAAW,EAAA,MAAa,GAAQ,CAAA;GAEtC,GAAA,EA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H,GAAA,EAAA;;EAQ3L,GAAA,EAAA,EAAA,EAAA,GAAA,EAUM,GAAA,MAAA,EATY,EAAA,QAAT,OADT,EAAA,GAAA,EAUM,OAAA;GARH,KAAK,EAAM;GACX,OAAK,EAAE,EAAA,CAAA,CAAoB,CAAC,CAAK,CAAA;EAElC,GAAA,EAAA,EAAA,GAAA,EAIE,EAHK,EAAkB,CAAK,CAAA,GAAA;GACpB;GACP,UAAU,EAAA"}
1
+ {"version":3,"file":"BlockPreviewCanvas-Bt7fFzIQ.js","names":[],"sources":["../../../src/components/blocks/PreviewSectionBlock.vue","../../../src/components/blocks/PreviewSectionBlock.vue","../../../src/components/BlockPreviewCanvas.vue","../../../src/components/BlockPreviewCanvas.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport ButtonBlock from \"./ButtonBlock.vue\";\nimport CustomBlock from \"./CustomBlock.vue\";\nimport DividerBlock from \"./DividerBlock.vue\";\nimport HtmlBlock from \"./HtmlBlock.vue\";\nimport ImageBlock from \"./ImageBlock.vue\";\nimport MenuBlock from \"./MenuBlock.vue\";\nimport SocialIconsBlock from \"./SocialIconsBlock.vue\";\nimport SpacerBlock from \"./SpacerBlock.vue\";\nimport TableBlock from \"./TableBlock.vue\";\nimport TitleBlock from \"./TitleBlock.vue\";\nimport ParagraphBlock from \"./ParagraphBlock.vue\";\nimport VideoBlock from \"./VideoBlock.vue\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n SectionBlock as SectionBlockType,\n} from \"@templatical/types\";\nimport { computed, inject, type Component } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\nconst previewBlockComponentMap: Record<string, Component> = {\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nconst props = defineProps<{\n block: SectionBlockType;\n viewport: \"desktop\";\n}>();\n\ndefineOptions({ name: \"PreviewSectionBlock\" });\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst columnWidths = computed(() => {\n switch (props.block.columns) {\n case \"2\":\n return [\"50%\", \"50%\"];\n case \"3\":\n return [\"33.33%\", \"33.33%\", \"33.33%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n default:\n return [\"100%\"];\n }\n});\n\nconst columns = computed(() => {\n const count = columnWidths.value.length;\n const children = [...props.block.children];\n while (children.length < count) {\n children.push([]);\n }\n return children.slice(0, count);\n});\n\nfunction getColumnBlocks(colIndex: number): Block[] {\n return columns.value[colIndex] || [];\n}\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewBlockComponentMap);\n}\n</script>\n\n<template>\n <div class=\"tpl:w-full\">\n <div class=\"tpl:flex tpl:gap-0\">\n <div\n v-for=\"(_, colIndex) in columns\"\n :key=\"colIndex\"\n :style=\"{ width: columnWidths[colIndex] }\"\n >\n <div\n v-for=\"childBlock in getColumnBlocks(colIndex)\"\n :key=\"childBlock.id\"\n :style=\"getBlockWrapperStyle(childBlock)\"\n >\n <!-- Recursive self-reference for nested sections -->\n <PreviewSectionBlock\n v-if=\"childBlock.type === 'section'\"\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n <component\n :is=\"getBlockComponent(childBlock)\"\n v-else\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./ButtonBlock.vue\";\nimport CustomBlock from \"./CustomBlock.vue\";\nimport DividerBlock from \"./DividerBlock.vue\";\nimport HtmlBlock from \"./HtmlBlock.vue\";\nimport ImageBlock from \"./ImageBlock.vue\";\nimport MenuBlock from \"./MenuBlock.vue\";\nimport SocialIconsBlock from \"./SocialIconsBlock.vue\";\nimport SpacerBlock from \"./SpacerBlock.vue\";\nimport TableBlock from \"./TableBlock.vue\";\nimport TitleBlock from \"./TitleBlock.vue\";\nimport ParagraphBlock from \"./ParagraphBlock.vue\";\nimport VideoBlock from \"./VideoBlock.vue\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n SectionBlock as SectionBlockType,\n} from \"@templatical/types\";\nimport { computed, inject, type Component } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\nconst previewBlockComponentMap: Record<string, Component> = {\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nconst props = defineProps<{\n block: SectionBlockType;\n viewport: \"desktop\";\n}>();\n\ndefineOptions({ name: \"PreviewSectionBlock\" });\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst columnWidths = computed(() => {\n switch (props.block.columns) {\n case \"2\":\n return [\"50%\", \"50%\"];\n case \"3\":\n return [\"33.33%\", \"33.33%\", \"33.33%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n default:\n return [\"100%\"];\n }\n});\n\nconst columns = computed(() => {\n const count = columnWidths.value.length;\n const children = [...props.block.children];\n while (children.length < count) {\n children.push([]);\n }\n return children.slice(0, count);\n});\n\nfunction getColumnBlocks(colIndex: number): Block[] {\n return columns.value[colIndex] || [];\n}\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewBlockComponentMap);\n}\n</script>\n\n<template>\n <div class=\"tpl:w-full\">\n <div class=\"tpl:flex tpl:gap-0\">\n <div\n v-for=\"(_, colIndex) in columns\"\n :key=\"colIndex\"\n :style=\"{ width: columnWidths[colIndex] }\"\n >\n <div\n v-for=\"childBlock in getColumnBlocks(colIndex)\"\n :key=\"childBlock.id\"\n :style=\"getBlockWrapperStyle(childBlock)\"\n >\n <!-- Recursive self-reference for nested sections -->\n <PreviewSectionBlock\n v-if=\"childBlock.type === 'section'\"\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n <component\n :is=\"getBlockComponent(childBlock)\"\n v-else\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./blocks/ButtonBlock.vue\";\nimport CustomBlock from \"./blocks/CustomBlock.vue\";\nimport DividerBlock from \"./blocks/DividerBlock.vue\";\nimport HtmlBlock from \"./blocks/HtmlBlock.vue\";\nimport ImageBlock from \"./blocks/ImageBlock.vue\";\nimport MenuBlock from \"./blocks/MenuBlock.vue\";\nimport PreviewSectionBlock from \"./blocks/PreviewSectionBlock.vue\";\nimport SocialIconsBlock from \"./blocks/SocialIconsBlock.vue\";\nimport SpacerBlock from \"./blocks/SpacerBlock.vue\";\nimport TableBlock from \"./blocks/TableBlock.vue\";\nimport TitleBlock from \"./blocks/TitleBlock.vue\";\nimport ParagraphBlock from \"./blocks/ParagraphBlock.vue\";\nimport VideoBlock from \"./blocks/VideoBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n} from \"../keys\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport type { Block, ViewportSize } from \"@templatical/types\";\nimport { computed, inject, provide, type Component } from \"vue\";\n\nconst props = withDefaults(\n defineProps<{\n blocks: Block[];\n /**\n * Which viewport to render. Defaults to `desktop`, so the saved-blocks\n * surfaces — which have no viewport control — behave exactly as before.\n * The test-email dialog passes the user's choice so responsive blocks show\n * the variant a recipient on that device would receive.\n */\n viewport?: ViewportSize;\n /**\n * Whether the hand-toggled display-condition filter still applies here.\n * `false` where a resolver owns the preview: it has already evaluated every\n * condition against real data, so layering a manual hide on top would veto\n * the answer that was asked for.\n *\n * A prop rather than an injected `PREVIEW_RESOLUTION_KEY` read, because the\n * test-email dialog builds its *own* resolution instance (keyed to the\n * selected recipient) — injecting would consult the shared canvas instance\n * and get the wrong answer.\n */\n applyConditionFilter?: boolean;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\n\n/**\n * This canvas is only ever a preview — nothing here is editable — so it honours\n * the user's mode directly, with no `previewMode` gate of the kind `Canvas.vue`\n * needs. Re-provided rather than left to inherit, because a `BlockPreviewCanvas`\n * inside a dialog may sit under an editing `Canvas` that provides `false`.\n */\nconst mergeTagSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\nprovide(\n USE_MERGE_TAG_SAMPLES_KEY,\n computed(() => mergeTagSampleMode?.value ?? false),\n);\n\n/**\n * Blocks a display condition currently excludes, so a preview never shows\n * content the recipient won't get. The canvas does the same via\n * `v-show=\"!conditionPreview?.isHidden(block.id)\"`.\n *\n * A no-op for the saved-blocks browser: entries there carry their *stored* ids,\n * which aren't in the current template, so nothing is tracked as hidden. It\n * bites where it should — the save dialog and the test-email preview, both of\n * which show blocks that are live on the canvas.\n *\n * Skipped entirely when `applyConditionFilter` is false — see the prop.\n */\nconst visibleBlocks = computed(() =>\n props.applyConditionFilter\n ? props.blocks.filter((block) => !conditionPreview?.isHidden(block.id))\n : props.blocks,\n);\n\n/**\n * Frame width, from the one helper the canvas and the scaled preview rows also\n * use — so all three agree by construction rather than by three constants that\n * happen to match. A template with a custom body width now previews at that\n * width instead of a flat 600.\n */\nconst frameWidth = computed(() =>\n getEmailFrameWidth(editor?.content.value.settings, props.viewport),\n);\n\n/**\n * The same document-level style the canvas applies, so a previewed block\n * renders identically to the canvas one: without it the font falls back to the\n * editor UI's and the link rules hit their unset defaults, dropping the\n * underline and the link colour.\n *\n * Read from the *current* template even in the saved-blocks browser, where the\n * previewed content came from elsewhere — a saved block stores only `Block[]`,\n * and the current settings are what it will actually look like once inserted.\n */\nconst documentStyle = computed(() =>\n editor ? getDocumentStyle(editor.content.value.settings) : {},\n);\n\nconst previewComponentMap: Record<string, Component> = {\n section: PreviewSectionBlock,\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n</script>\n\n<template>\n <div\n data-testid=\"block-preview-canvas\"\n class=\"tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg\"\n :style=\"{\n width: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n backgroundColor: 'var(--tpl-canvas-bg)',\n boxShadow: 'var(--tpl-shadow-sm)',\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"getBlockWrapperStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./blocks/ButtonBlock.vue\";\nimport CustomBlock from \"./blocks/CustomBlock.vue\";\nimport DividerBlock from \"./blocks/DividerBlock.vue\";\nimport HtmlBlock from \"./blocks/HtmlBlock.vue\";\nimport ImageBlock from \"./blocks/ImageBlock.vue\";\nimport MenuBlock from \"./blocks/MenuBlock.vue\";\nimport PreviewSectionBlock from \"./blocks/PreviewSectionBlock.vue\";\nimport SocialIconsBlock from \"./blocks/SocialIconsBlock.vue\";\nimport SpacerBlock from \"./blocks/SpacerBlock.vue\";\nimport TableBlock from \"./blocks/TableBlock.vue\";\nimport TitleBlock from \"./blocks/TitleBlock.vue\";\nimport ParagraphBlock from \"./blocks/ParagraphBlock.vue\";\nimport VideoBlock from \"./blocks/VideoBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n} from \"../keys\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport type { Block, ViewportSize } from \"@templatical/types\";\nimport { computed, inject, provide, type Component } from \"vue\";\n\nconst props = withDefaults(\n defineProps<{\n blocks: Block[];\n /**\n * Which viewport to render. Defaults to `desktop`, so the saved-blocks\n * surfaces — which have no viewport control — behave exactly as before.\n * The test-email dialog passes the user's choice so responsive blocks show\n * the variant a recipient on that device would receive.\n */\n viewport?: ViewportSize;\n /**\n * Whether the hand-toggled display-condition filter still applies here.\n * `false` where a resolver owns the preview: it has already evaluated every\n * condition against real data, so layering a manual hide on top would veto\n * the answer that was asked for.\n *\n * A prop rather than an injected `PREVIEW_RESOLUTION_KEY` read, because the\n * test-email dialog builds its *own* resolution instance (keyed to the\n * selected recipient) — injecting would consult the shared canvas instance\n * and get the wrong answer.\n */\n applyConditionFilter?: boolean;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\n\n/**\n * This canvas is only ever a preview — nothing here is editable — so it honours\n * the user's mode directly, with no `previewMode` gate of the kind `Canvas.vue`\n * needs. Re-provided rather than left to inherit, because a `BlockPreviewCanvas`\n * inside a dialog may sit under an editing `Canvas` that provides `false`.\n */\nconst mergeTagSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\nprovide(\n USE_MERGE_TAG_SAMPLES_KEY,\n computed(() => mergeTagSampleMode?.value ?? false),\n);\n\n/**\n * Blocks a display condition currently excludes, so a preview never shows\n * content the recipient won't get. The canvas does the same via\n * `v-show=\"!conditionPreview?.isHidden(block.id)\"`.\n *\n * A no-op for the saved-blocks browser: entries there carry their *stored* ids,\n * which aren't in the current template, so nothing is tracked as hidden. It\n * bites where it should — the save dialog and the test-email preview, both of\n * which show blocks that are live on the canvas.\n *\n * Skipped entirely when `applyConditionFilter` is false — see the prop.\n */\nconst visibleBlocks = computed(() =>\n props.applyConditionFilter\n ? props.blocks.filter((block) => !conditionPreview?.isHidden(block.id))\n : props.blocks,\n);\n\n/**\n * Frame width, from the one helper the canvas and the scaled preview rows also\n * use — so all three agree by construction rather than by three constants that\n * happen to match. A template with a custom body width now previews at that\n * width instead of a flat 600.\n */\nconst frameWidth = computed(() =>\n getEmailFrameWidth(editor?.content.value.settings, props.viewport),\n);\n\n/**\n * The same document-level style the canvas applies, so a previewed block\n * renders identically to the canvas one: without it the font falls back to the\n * editor UI's and the link rules hit their unset defaults, dropping the\n * underline and the link colour.\n *\n * Read from the *current* template even in the saved-blocks browser, where the\n * previewed content came from elsewhere — a saved block stores only `Block[]`,\n * and the current settings are what it will actually look like once inserted.\n */\nconst documentStyle = computed(() =>\n editor ? getDocumentStyle(editor.content.value.settings) : {},\n);\n\nconst previewComponentMap: Record<string, Component> = {\n section: PreviewSectionBlock,\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n</script>\n\n<template>\n <div\n data-testid=\"block-preview-canvas\"\n class=\"tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg\"\n :style=\"{\n width: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n backgroundColor: 'var(--tpl-canvas-bg)',\n boxShadow: 'var(--tpl-shadow-sm)',\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"getBlockWrapperStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAwBA,IAAM,IAAsD;GAC1D,OAAO;GACP,WAAW;GACX,OAAO;GACP,OAAO;GACP,QAAQ;GACR,SAAS;GACT,QAAQ;GACR,MAAM;GACN,OAAO;GACP,QAAQ;GACR,MAAM;GACN,QAAQ;EACV,GAEM,IAAQ,GAOR,IAAgB,EAAO,GAAoB,IAAI,GAE/C,IAAe,QAAe;GAClC,QAAQ,EAAM,MAAM,SAApB;IACE,KAAK,KACH,OAAO,CAAC,OAAO,KAAK;IACtB,KAAK,KACH,OAAO;KAAC;KAAU;KAAU;IAAQ;IACtC,KAAK,OACH,OAAO,CAAC,UAAU,QAAQ;IAC5B,KAAK,OACH,OAAO,CAAC,UAAU,QAAQ;IAC5B,SACE,OAAO,CAAC,MAAM;GAClB;EACF,CAAC,GAEK,IAAU,QAAe;GAC7B,IAAM,IAAQ,EAAa,MAAM,QAC3B,IAAW,CAAC,GAAG,EAAM,MAAM,QAAQ;GACzC,OAAO,EAAS,SAAS,IACvB,EAAS,KAAK,CAAC,CAAC;GAElB,OAA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gB,QACpB,IAAS,EAAiB,EAAO,QAAQ,MAAM,QAAQ,IAAI,CAAC,CAC9D,GAEM,IAAiD;GACrD,SAAS;GACT,OAAO;GACP,WAAW;GACX,OAAO;GACP,OAAO;GACP,QAAQ;GACR,SAAS;GACT,QAAQ;GACR,MAAM;GACN,OAAO;GACP,QAAQ;GACR,MAAM;GACN,QAAQ;EACV;EAEA,SAAS,EAAkB,GAAgC;GACzD,OAAO,EAAsB,GAAO,GAAe,CAAmB;EACxE;oBAIE,EAAA,GAAA,EAsBM,OAAA;GArBJ,eAAY;GACZ,OAAM;GACL,OAAK,EAAA;IAAoB,OAAA,GAAA,EAAA,MAAU;IAAwB,YAAA,EAAA,CAAA;;;IAA+H,GAAA,EAAA;;EAQ3L,GAAA,EAAA,EAAA,EAAA,GAAA,EAUM,GAAA,MAAA,EATY,EAAA,QAAT,OADT,EAAA,GAAA,EAUM,OAAA;GARH,KAAK,EAAM;GACX,OAAK,EAAE,EAAA,CAAA,CAAoB,CAAC,CAAK,CAAA;EAElC,GAAA,EAAA,EAAA,GAAA,EAIE,EAHK,EAAkB,CAAK,CAAA,GAAA;GACpB;GACP,UAAU,EAAA"}
@@ -1,6 +1,6 @@
1
1
  import { H as e, N as t, S as n, at as r, b as i, ct as a, g as o, h as s, l as c, m as l, n as u, p as d, u as f, ut as p, x as m, y as h } from "./draggable-BfpsXFg7.js";
2
- import { E as g } from "./icons-C36Ha5VU.js";
3
- import { n as _ } from "./useCloudI18n-NVa1aeY8.js";
2
+ import { E as g } from "./icons-Dl5bcXmT.js";
3
+ import { n as _ } from "./useCloudI18n-Ch-SiRjU.js";
4
4
  //#region src/cloud/components/CloudHeaderExtras.vue?vue&type=script&setup=true&lang.ts
5
5
  var v = {
6
6
  key: 0,
@@ -16,7 +16,7 @@ var v = {
16
16
  cloud: {}
17
17
  },
18
18
  setup(n) {
19
- let x = m(() => import("./CollaboratorBar-WBtrPPnM.js")), S = m(() => import("./AiFeatureMenu-BQz9Kczt.js")), { t: C, format: w } = _();
19
+ let x = m(() => import("./CollaboratorBar-BH1lM_Ta.js")), S = m(() => import("./AiFeatureMenu-BhtNkpIq.js")), { t: C, format: w } = _();
20
20
  return (m, _) => n.part === "left" && n.cloud.featureFlags.templateLimit.value !== null ? (t(), o("span", v, p(r(w)(r(C).header.templatesUsed, {
21
21
  used: n.cloud.featureFlags.templateCount.value,
22
22
  max: n.cloud.featureFlags.templateLimit.value
@@ -57,4 +57,4 @@ var v = {
57
57
  //#endregion
58
58
  export { x as default };
59
59
 
60
- //# sourceMappingURL=CloudHeaderExtras-F_ySlW1S.js.map
60
+ //# sourceMappingURL=CloudHeaderExtras-CScGpeLl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CloudHeaderExtras-F_ySlW1S.js","names":[],"sources":["../../../src/cloud/components/CloudHeaderExtras.vue","../../../src/cloud/components/CloudHeaderExtras.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { defineAsyncComponent } from \"vue\";\nimport { Sparkles } from \"@lucide/vue\";\n\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { CloudAttachment } from \"../runtime\";\n\nconst CollaboratorBar = defineAsyncComponent(\n () => import(\"./CollaboratorBar.vue\"),\n);\nconst AiFeatureMenu = defineAsyncComponent(() => import(\"./AiFeatureMenu.vue\"));\n\n/**\n * The Cloud-only header controls, filled into `EditorHeader`'s three\n * `*-extras` slots.\n *\n * One component with a `part` prop rather than three: the three regions share\n * this file's lazy chunk, so a Cloud session pays one round-trip for all of them\n * and an OSS session pays none.\n *\n * The plan-usage readout and the AI button live here rather than in the shared\n * header because they render **cloud-chunk** strings; OSS translators never see\n * them. Comments are deliberately not here: that feature is shared and\n * provider-backed, so its trigger and its strings belong to the shared header and\n * the OSS chunk.\n */\ndefineProps<{\n part: \"left\" | \"center\" | \"right\";\n cloud: CloudAttachment;\n}>();\n\nconst { t: cloudT, format: cloudFormat } = useCloudI18nStrict();\n</script>\n\n<template>\n <!-- Left: templates used / allowed. A plan *limit*, not a templates concern,\n which is why it sits here and its string stays in the cloud chunk. -->\n <span\n v-if=\"part === 'left' && cloud.featureFlags.templateLimit.value !== null\"\n data-testid=\"cloud-template-usage\"\n class=\"tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]\"\n >\n {{\n cloudFormat(cloudT.header.templatesUsed, {\n used: cloud.featureFlags.templateCount.value,\n max: cloud.featureFlags.templateLimit.value,\n })\n }}\n </span>\n\n <!-- Center: who else is in the template right now. -->\n <CollaboratorBar\n v-else-if=\"\n part === 'center' &&\n cloud.collaboration &&\n cloud.isCollaborationEnabled.value\n \"\n :collaborators=\"cloud.collaboration.collaborators.value\"\n :is-connected=\"cloud.websocket.isConnected.value\"\n />\n\n <!-- Right: AI — after the shared header's Comments button and before the\n test-email button, so the shared header is a superset of the OSS one rather\n than a rearrangement. -->\n <template v-else-if=\"part === 'right'\">\n <div\n v-if=\"\n cloud.featureFlags.canUseAiGeneration.value &&\n cloud.featureFlags.hasTemplateSaved.value\n \"\n :ref=\"\n (el) => (cloud.panelState.aiMenuRef.value = el as HTMLElement | null)\n \"\n class=\"tpl:relative\"\n >\n <button\n type=\"button\"\n data-testid=\"ai-menu-trigger\"\n :aria-expanded=\"cloud.panelState.aiMenuOpen.value\"\n class=\"tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200\"\n :class=\"\n cloud.panelState.aiButtonActive.value\n ? 'tpl-ai-btn--active'\n : 'tpl-ai-btn--idle'\n \"\n @click.stop=\"cloud.panelState.toggleAiMenu\"\n >\n <Sparkles :size=\"16\" :stroke-width=\"2\" class=\"tpl-ai-btn-icon\" />\n {{ cloudT.aiChat.button }}\n </button>\n <Transition\n enter-active-class=\"tpl:transition-all tpl:ease-out\"\n enter-from-class=\"tpl:scale-95 tpl:opacity-0\"\n enter-to-class=\"tpl:scale-100 tpl:opacity-100\"\n leave-active-class=\"tpl:transition-all tpl:duration-100 tpl:ease-in\"\n leave-from-class=\"tpl:scale-100 tpl:opacity-100\"\n leave-to-class=\"tpl:scale-95 tpl:opacity-0\"\n >\n <div\n v-if=\"cloud.panelState.aiMenuOpen.value\"\n class=\"tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right\"\n >\n <AiFeatureMenu\n :active-feature=\"cloud.panelState.activeAiFeature.value\"\n @select=\"cloud.panelState.handleAiFeatureSelect\"\n />\n </div>\n </Transition>\n </div>\n </template>\n</template>\n","<script setup lang=\"ts\">\nimport { defineAsyncComponent } from \"vue\";\nimport { Sparkles } from \"@lucide/vue\";\n\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { CloudAttachment } from \"../runtime\";\n\nconst CollaboratorBar = defineAsyncComponent(\n () => import(\"./CollaboratorBar.vue\"),\n);\nconst AiFeatureMenu = defineAsyncComponent(() => import(\"./AiFeatureMenu.vue\"));\n\n/**\n * The Cloud-only header controls, filled into `EditorHeader`'s three\n * `*-extras` slots.\n *\n * One component with a `part` prop rather than three: the three regions share\n * this file's lazy chunk, so a Cloud session pays one round-trip for all of them\n * and an OSS session pays none.\n *\n * The plan-usage readout and the AI button live here rather than in the shared\n * header because they render **cloud-chunk** strings; OSS translators never see\n * them. Comments are deliberately not here: that feature is shared and\n * provider-backed, so its trigger and its strings belong to the shared header and\n * the OSS chunk.\n */\ndefineProps<{\n part: \"left\" | \"center\" | \"right\";\n cloud: CloudAttachment;\n}>();\n\nconst { t: cloudT, format: cloudFormat } = useCloudI18nStrict();\n</script>\n\n<template>\n <!-- Left: templates used / allowed. A plan *limit*, not a templates concern,\n which is why it sits here and its string stays in the cloud chunk. -->\n <span\n v-if=\"part === 'left' && cloud.featureFlags.templateLimit.value !== null\"\n data-testid=\"cloud-template-usage\"\n class=\"tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]\"\n >\n {{\n cloudFormat(cloudT.header.templatesUsed, {\n used: cloud.featureFlags.templateCount.value,\n max: cloud.featureFlags.templateLimit.value,\n })\n }}\n </span>\n\n <!-- Center: who else is in the template right now. -->\n <CollaboratorBar\n v-else-if=\"\n part === 'center' &&\n cloud.collaboration &&\n cloud.isCollaborationEnabled.value\n \"\n :collaborators=\"cloud.collaboration.collaborators.value\"\n :is-connected=\"cloud.websocket.isConnected.value\"\n />\n\n <!-- Right: AI — after the shared header's Comments button and before the\n test-email button, so the shared header is a superset of the OSS one rather\n than a rearrangement. -->\n <template v-else-if=\"part === 'right'\">\n <div\n v-if=\"\n cloud.featureFlags.canUseAiGeneration.value &&\n cloud.featureFlags.hasTemplateSaved.value\n \"\n :ref=\"\n (el) => (cloud.panelState.aiMenuRef.value = el as HTMLElement | null)\n \"\n class=\"tpl:relative\"\n >\n <button\n type=\"button\"\n data-testid=\"ai-menu-trigger\"\n :aria-expanded=\"cloud.panelState.aiMenuOpen.value\"\n class=\"tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200\"\n :class=\"\n cloud.panelState.aiButtonActive.value\n ? 'tpl-ai-btn--active'\n : 'tpl-ai-btn--idle'\n \"\n @click.stop=\"cloud.panelState.toggleAiMenu\"\n >\n <Sparkles :size=\"16\" :stroke-width=\"2\" class=\"tpl-ai-btn-icon\" />\n {{ cloudT.aiChat.button }}\n </button>\n <Transition\n enter-active-class=\"tpl:transition-all tpl:ease-out\"\n enter-from-class=\"tpl:scale-95 tpl:opacity-0\"\n enter-to-class=\"tpl:scale-100 tpl:opacity-100\"\n leave-active-class=\"tpl:transition-all tpl:duration-100 tpl:ease-in\"\n leave-from-class=\"tpl:scale-100 tpl:opacity-100\"\n leave-to-class=\"tpl:scale-95 tpl:opacity-0\"\n >\n <div\n v-if=\"cloud.panelState.aiMenuOpen.value\"\n class=\"tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right\"\n >\n <AiFeatureMenu\n :active-feature=\"cloud.panelState.activeAiFeature.value\"\n @select=\"cloud.panelState.handleAiFeatureSelect\"\n />\n </div>\n </Transition>\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAOA,IAAM,IAAkB,QAChB,OAAO,gCACf,GACM,IAAgB,QAA2B,OAAO,8BAAsB,GAqBxE,EAAE,GAAG,GAAQ,QAAQ,MAAgB,EAAmB;mBAOpD,EAAA,SAAI,UAAe,EAAA,MAAM,aAAa,cAAc,UAAK,QADjE,EAAA,GAAA,EAWO,QAXP,GAWO,EALH,EAAA,CAAA,CAAW,CAAC,EAAA,CAAA,CAAM,CAAC,OAAO,eAAa;GAAkB,MAAA,EAAA,MAAM,aAAa,cAAc;GAAoB,KAAA,EAAA,MAAM,aAAa,cAAc;EAS/H,CAAA,CAAA,GAAA,CAAA,KAAA,EAAA,SAAI,YAAuB,EAAA,MAAM,iBAAuB,EAAA,MAAM,uBAAuB,SADzG,EAAA,GAAA,EAQE,EAAA,CAAA,GAAA;;GAFC,eAAe,EAAA,MAAM,cAAc,cAAc;GACjD,gBAAc,EAAA,MAAM,UAAU,YAAY;EAMxB,GAAA,MAAA,GAAA,CAAA,iBAAA,cAAA,CAAA,KAAA,EAAA,SAAI,WAAzB,EAAA,GAAA,EA6CW,GAAA,EAAA,KAAA,EAAA,GAAA,CA3CQ,EAAA,MAAM,aAAa,mBAAmB,SAAiB,EAAA,MAAM,aAAa,iBAAiB,SAD5G,EAAA,GAAA,EA2CM,OAAA;;GAtCH,MAAe,MAAQ,EAAA,MAAM,WAAW,UAAU,QAAQ;GAG3D,OAAM;EAEN,GAAA,CAAA,EAcS,UAAA;GAbP,MAAK;GACL,eAAY;GACX,iBAAe,EAAA,MAAM,WAAW,WAAW;GAC5C,OAAK,EAAA,CAAC,wNACa,EAAA,MAAM,WAAW,eAAe,QAAA,uBAAA,kBAAA,CAAA;GAKlD,SAAK,AAAA,EAAA,OAAA,GAAO,GAAA,MAAA,EAAA,MAAM,WAAW,gBAAjB,EAAA,MAAM,WAAW,aAAY,GAAA,CAAA,GAAA,CAAA,MAAA,CAAA;EAE1C,GAAA,CAAA,EAAiE,EAAA,CAAA,GAAA;GAAtD,MAAM;GAAK,gBAAc;GAAG,OAAM;EAAoB,CAAA,GAAA,EAAA,MACjE,EAAG,EAAA,CAAA,CAAM,CAAC,OAAO,MAAM,GAAA,CAAA,CAAA,GAAA,IAAA,CAAA,GAEzB,EAiBa,GAAA;GAhBX,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;GACf,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;;GAEf,SAAA,QAQM,CAPE,EAAA,MAAM,WAAW,WAAW,SADpC,EAAA,GAAA,EAQM,OARN,GAQM,CAJJ,EAGE,EAAA,CAAA,GAAA;IAFC,kBAAgB,EAAA,MAAM,WAAW,gBAAgB;IACjD,UAAQ,EAAA,MAAM,WAAW"}
1
+ {"version":3,"file":"CloudHeaderExtras-CScGpeLl.js","names":[],"sources":["../../../src/cloud/components/CloudHeaderExtras.vue","../../../src/cloud/components/CloudHeaderExtras.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { defineAsyncComponent } from \"vue\";\nimport { Sparkles } from \"@lucide/vue\";\n\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { CloudAttachment } from \"../runtime\";\n\nconst CollaboratorBar = defineAsyncComponent(\n () => import(\"./CollaboratorBar.vue\"),\n);\nconst AiFeatureMenu = defineAsyncComponent(() => import(\"./AiFeatureMenu.vue\"));\n\n/**\n * The Cloud-only header controls, filled into `EditorHeader`'s three\n * `*-extras` slots.\n *\n * One component with a `part` prop rather than three: the three regions share\n * this file's lazy chunk, so a Cloud session pays one round-trip for all of them\n * and an OSS session pays none.\n *\n * The plan-usage readout and the AI button live here rather than in the shared\n * header because they render **cloud-chunk** strings; OSS translators never see\n * them. Comments are deliberately not here: that feature is shared and\n * provider-backed, so its trigger and its strings belong to the shared header and\n * the OSS chunk.\n */\ndefineProps<{\n part: \"left\" | \"center\" | \"right\";\n cloud: CloudAttachment;\n}>();\n\nconst { t: cloudT, format: cloudFormat } = useCloudI18nStrict();\n</script>\n\n<template>\n <!-- Left: templates used / allowed. A plan *limit*, not a templates concern,\n which is why it sits here and its string stays in the cloud chunk. -->\n <span\n v-if=\"part === 'left' && cloud.featureFlags.templateLimit.value !== null\"\n data-testid=\"cloud-template-usage\"\n class=\"tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]\"\n >\n {{\n cloudFormat(cloudT.header.templatesUsed, {\n used: cloud.featureFlags.templateCount.value,\n max: cloud.featureFlags.templateLimit.value,\n })\n }}\n </span>\n\n <!-- Center: who else is in the template right now. -->\n <CollaboratorBar\n v-else-if=\"\n part === 'center' &&\n cloud.collaboration &&\n cloud.isCollaborationEnabled.value\n \"\n :collaborators=\"cloud.collaboration.collaborators.value\"\n :is-connected=\"cloud.websocket.isConnected.value\"\n />\n\n <!-- Right: AI — after the shared header's Comments button and before the\n test-email button, so the shared header is a superset of the OSS one rather\n than a rearrangement. -->\n <template v-else-if=\"part === 'right'\">\n <div\n v-if=\"\n cloud.featureFlags.canUseAiGeneration.value &&\n cloud.featureFlags.hasTemplateSaved.value\n \"\n :ref=\"\n (el) => (cloud.panelState.aiMenuRef.value = el as HTMLElement | null)\n \"\n class=\"tpl:relative\"\n >\n <button\n type=\"button\"\n data-testid=\"ai-menu-trigger\"\n :aria-expanded=\"cloud.panelState.aiMenuOpen.value\"\n class=\"tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200\"\n :class=\"\n cloud.panelState.aiButtonActive.value\n ? 'tpl-ai-btn--active'\n : 'tpl-ai-btn--idle'\n \"\n @click.stop=\"cloud.panelState.toggleAiMenu\"\n >\n <Sparkles :size=\"16\" :stroke-width=\"2\" class=\"tpl-ai-btn-icon\" />\n {{ cloudT.aiChat.button }}\n </button>\n <Transition\n enter-active-class=\"tpl:transition-all tpl:ease-out\"\n enter-from-class=\"tpl:scale-95 tpl:opacity-0\"\n enter-to-class=\"tpl:scale-100 tpl:opacity-100\"\n leave-active-class=\"tpl:transition-all tpl:duration-100 tpl:ease-in\"\n leave-from-class=\"tpl:scale-100 tpl:opacity-100\"\n leave-to-class=\"tpl:scale-95 tpl:opacity-0\"\n >\n <div\n v-if=\"cloud.panelState.aiMenuOpen.value\"\n class=\"tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right\"\n >\n <AiFeatureMenu\n :active-feature=\"cloud.panelState.activeAiFeature.value\"\n @select=\"cloud.panelState.handleAiFeatureSelect\"\n />\n </div>\n </Transition>\n </div>\n </template>\n</template>\n","<script setup lang=\"ts\">\nimport { defineAsyncComponent } from \"vue\";\nimport { Sparkles } from \"@lucide/vue\";\n\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { CloudAttachment } from \"../runtime\";\n\nconst CollaboratorBar = defineAsyncComponent(\n () => import(\"./CollaboratorBar.vue\"),\n);\nconst AiFeatureMenu = defineAsyncComponent(() => import(\"./AiFeatureMenu.vue\"));\n\n/**\n * The Cloud-only header controls, filled into `EditorHeader`'s three\n * `*-extras` slots.\n *\n * One component with a `part` prop rather than three: the three regions share\n * this file's lazy chunk, so a Cloud session pays one round-trip for all of them\n * and an OSS session pays none.\n *\n * The plan-usage readout and the AI button live here rather than in the shared\n * header because they render **cloud-chunk** strings; OSS translators never see\n * them. Comments are deliberately not here: that feature is shared and\n * provider-backed, so its trigger and its strings belong to the shared header and\n * the OSS chunk.\n */\ndefineProps<{\n part: \"left\" | \"center\" | \"right\";\n cloud: CloudAttachment;\n}>();\n\nconst { t: cloudT, format: cloudFormat } = useCloudI18nStrict();\n</script>\n\n<template>\n <!-- Left: templates used / allowed. A plan *limit*, not a templates concern,\n which is why it sits here and its string stays in the cloud chunk. -->\n <span\n v-if=\"part === 'left' && cloud.featureFlags.templateLimit.value !== null\"\n data-testid=\"cloud-template-usage\"\n class=\"tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]\"\n >\n {{\n cloudFormat(cloudT.header.templatesUsed, {\n used: cloud.featureFlags.templateCount.value,\n max: cloud.featureFlags.templateLimit.value,\n })\n }}\n </span>\n\n <!-- Center: who else is in the template right now. -->\n <CollaboratorBar\n v-else-if=\"\n part === 'center' &&\n cloud.collaboration &&\n cloud.isCollaborationEnabled.value\n \"\n :collaborators=\"cloud.collaboration.collaborators.value\"\n :is-connected=\"cloud.websocket.isConnected.value\"\n />\n\n <!-- Right: AI — after the shared header's Comments button and before the\n test-email button, so the shared header is a superset of the OSS one rather\n than a rearrangement. -->\n <template v-else-if=\"part === 'right'\">\n <div\n v-if=\"\n cloud.featureFlags.canUseAiGeneration.value &&\n cloud.featureFlags.hasTemplateSaved.value\n \"\n :ref=\"\n (el) => (cloud.panelState.aiMenuRef.value = el as HTMLElement | null)\n \"\n class=\"tpl:relative\"\n >\n <button\n type=\"button\"\n data-testid=\"ai-menu-trigger\"\n :aria-expanded=\"cloud.panelState.aiMenuOpen.value\"\n class=\"tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200\"\n :class=\"\n cloud.panelState.aiButtonActive.value\n ? 'tpl-ai-btn--active'\n : 'tpl-ai-btn--idle'\n \"\n @click.stop=\"cloud.panelState.toggleAiMenu\"\n >\n <Sparkles :size=\"16\" :stroke-width=\"2\" class=\"tpl-ai-btn-icon\" />\n {{ cloudT.aiChat.button }}\n </button>\n <Transition\n enter-active-class=\"tpl:transition-all tpl:ease-out\"\n enter-from-class=\"tpl:scale-95 tpl:opacity-0\"\n enter-to-class=\"tpl:scale-100 tpl:opacity-100\"\n leave-active-class=\"tpl:transition-all tpl:duration-100 tpl:ease-in\"\n leave-from-class=\"tpl:scale-100 tpl:opacity-100\"\n leave-to-class=\"tpl:scale-95 tpl:opacity-0\"\n >\n <div\n v-if=\"cloud.panelState.aiMenuOpen.value\"\n class=\"tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right\"\n >\n <AiFeatureMenu\n :active-feature=\"cloud.panelState.activeAiFeature.value\"\n @select=\"cloud.panelState.handleAiFeatureSelect\"\n />\n </div>\n </Transition>\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAOA,IAAM,IAAkB,QAChB,OAAO,gCACf,GACM,IAAgB,QAA2B,OAAO,8BAAsB,GAqBxE,EAAE,GAAG,GAAQ,QAAQ,MAAgB,EAAmB;mBAOpD,EAAA,SAAI,UAAe,EAAA,MAAM,aAAa,cAAc,UAAK,QADjE,EAAA,GAAA,EAWO,QAXP,GAWO,EALH,EAAA,CAAA,CAAW,CAAC,EAAA,CAAA,CAAM,CAAC,OAAO,eAAa;GAAkB,MAAA,EAAA,MAAM,aAAa,cAAc;GAAoB,KAAA,EAAA,MAAM,aAAa,cAAc;EAS/H,CAAA,CAAA,GAAA,CAAA,KAAA,EAAA,SAAI,YAAuB,EAAA,MAAM,iBAAuB,EAAA,MAAM,uBAAuB,SADzG,EAAA,GAAA,EAQE,EAAA,CAAA,GAAA;;GAFC,eAAe,EAAA,MAAM,cAAc,cAAc;GACjD,gBAAc,EAAA,MAAM,UAAU,YAAY;EAMxB,GAAA,MAAA,GAAA,CAAA,iBAAA,cAAA,CAAA,KAAA,EAAA,SAAI,WAAzB,EAAA,GAAA,EA6CW,GAAA,EAAA,KAAA,EAAA,GAAA,CA3CQ,EAAA,MAAM,aAAa,mBAAmB,SAAiB,EAAA,MAAM,aAAa,iBAAiB,SAD5G,EAAA,GAAA,EA2CM,OAAA;;GAtCH,MAAe,MAAQ,EAAA,MAAM,WAAW,UAAU,QAAQ;GAG3D,OAAM;EAEN,GAAA,CAAA,EAcS,UAAA;GAbP,MAAK;GACL,eAAY;GACX,iBAAe,EAAA,MAAM,WAAW,WAAW;GAC5C,OAAK,EAAA,CAAC,wNACa,EAAA,MAAM,WAAW,eAAe,QAAA,uBAAA,kBAAA,CAAA;GAKlD,SAAK,AAAA,EAAA,OAAA,GAAO,GAAA,MAAA,EAAA,MAAM,WAAW,gBAAjB,EAAA,MAAM,WAAW,aAAY,GAAA,CAAA,GAAA,CAAA,MAAA,CAAA;EAE1C,GAAA,CAAA,EAAiE,EAAA,CAAA,GAAA;GAAtD,MAAM;GAAK,gBAAc;GAAG,OAAM;EAAoB,CAAA,GAAA,EAAA,MACjE,EAAG,EAAA,CAAA,CAAM,CAAC,OAAO,MAAM,GAAA,CAAA,CAAA,GAAA,IAAA,CAAA,GAEzB,EAiBa,GAAA;GAhBX,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;GACf,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;;GAEf,SAAA,QAQM,CAPE,EAAA,MAAM,WAAW,WAAW,SADpC,EAAA,GAAA,EAQM,OARN,GAQM,CAJJ,EAGE,EAAA,CAAA,GAAA;IAFC,kBAAgB,EAAA,MAAM,WAAW,gBAAgB;IACjD,UAAQ,EAAA,MAAM,WAAW"}
@@ -1,7 +1,7 @@
1
1
  import { F as e, H as t, N as n, S as r, at as i, b as a, g as o, h as s, l as c, m as l, n as u, p as d, u as f, ut as p, v as m, x as h } from "./draggable-BfpsXFg7.js";
2
- import { t as g } from "./useI18n-DVWCJJFH.js";
3
- import { Mt as _, u as v } from "./icons-C36Ha5VU.js";
4
- import { n as y } from "./useCloudI18n-NVa1aeY8.js";
2
+ import { t as g } from "./useI18n-4sUbTM3Y.js";
3
+ import { Mt as _, u as v } from "./icons-Dl5bcXmT.js";
4
+ import { n as y } from "./useCloudI18n-Ch-SiRjU.js";
5
5
  //#region src/cloud/components/CloudErrorOverlay.vue?vue&type=script&setup=true&lang.ts
6
6
  var b = {
7
7
  key: 0,
@@ -122,9 +122,9 @@ var b = {
122
122
  locale: {}
123
123
  },
124
124
  setup(e) {
125
- let r = h(() => import("./AiChatSidebar-DTUoBH5a.js")), s = h(() => import("./DesignReferenceSidebar-sZWciECR.js")), c = h(() => import("./TemplateScoringPanel-Xdkp2EMY.js")), l = h(async () => {
125
+ let r = h(() => import("./AiChatSidebar-tZqbhmuJ.js")), s = h(() => import("./DesignReferenceSidebar-npLxDRJI.js")), c = h(() => import("./TemplateScoringPanel-MvdrkgqL.js")), l = h(async () => {
126
126
  try {
127
- return (await import("./src-CoHDh8Ua.js")).MediaLibraryModal;
127
+ return (await import("./src-BDUi-9js.js")).MediaLibraryModal;
128
128
  } catch {
129
129
  throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
130
130
  }
@@ -229,4 +229,4 @@ var b = {
229
229
  //#endregion
230
230
  export { H as default };
231
231
 
232
- //# sourceMappingURL=CloudPanels-C34bcHpc.js.map
232
+ //# sourceMappingURL=CloudPanels-DVtJkWsj.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CloudPanels-C34bcHpc.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-overlay 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-overlay 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-overlay 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-overlay 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-[80vh] 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-[80vh] 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-toast 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-toast 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);\nconst MediaLibraryModal = defineAsyncComponent(async () => {\n // try/catch downgrades Webpack's \"Module not found\" from error to warning\n // when the optional peer isn't installed. Cloud consumers always install it.\n try {\n const m = await import(\"@templatical/media-library\");\n return m.MediaLibraryModal;\n } catch {\n throw new Error(\n \"[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.\",\n );\n }\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 */\nconst props = defineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n /**\n * The editor's `init({ locale })`, forwarded to `MediaLibraryModal` so\n * `@templatical/media-library` loads its own strings in the same language.\n * A locale rather than translations: that package owns its copy, and the\n * editor's own chunk carries none of it.\n */\n locale?: string;\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\n <!-- `auth-manager` / `project-id` / `plan-config` are props, not injections.\n An injection would have to match the modal's key identity; a mismatch\n arrives as `undefined` with no error and the browser opens inert. -->\n <MediaLibraryModal\n :visible=\"cloud.panelState.mediaLibraryOpen.value\"\n :accept=\"cloud.panelState.mediaLibraryAccept.value\"\n :popover-target=\"core.popoverRoot.value\"\n :locale=\"locale\"\n :ui-theme=\"core.resolvedTheme.value\"\n :auth-manager=\"cloud.mediaBrowser.authManager\"\n :project-id=\"cloud.mediaBrowser.projectId\"\n :plan-config=\"cloud.mediaBrowser.planConfig\"\n @select=\"cloud.mediaLib.handleMediaSelect\"\n @close=\"cloud.mediaLib.handleMediaLibraryClose\"\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);\nconst MediaLibraryModal = defineAsyncComponent(async () => {\n // try/catch downgrades Webpack's \"Module not found\" from error to warning\n // when the optional peer isn't installed. Cloud consumers always install it.\n try {\n const m = await import(\"@templatical/media-library\");\n return m.MediaLibraryModal;\n } catch {\n throw new Error(\n \"[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.\",\n );\n }\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 */\nconst props = defineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n /**\n * The editor's `init({ locale })`, forwarded to `MediaLibraryModal` so\n * `@templatical/media-library` loads its own strings in the same language.\n * A locale rather than translations: that package owns its copy, and the\n * editor's own chunk carries none of it.\n */\n locale?: string;\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\n <!-- `auth-manager` / `project-id` / `plan-config` are props, not injections.\n An injection would have to match the modal's key identity; a mismatch\n arrives as `undefined` with no error and the browser opens inert. -->\n <MediaLibraryModal\n :visible=\"cloud.panelState.mediaLibraryOpen.value\"\n :accept=\"cloud.panelState.mediaLibraryAccept.value\"\n :popover-target=\"core.popoverRoot.value\"\n :locale=\"locale\"\n :ui-theme=\"core.resolvedTheme.value\"\n :auth-manager=\"cloud.mediaBrowser.authManager\"\n :project-id=\"cloud.mediaBrowser.projectId\"\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orOverlay.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-overlay 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-overlay 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-overlay 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-overlay 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-[80vh] 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-[80vh] 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-toast 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-toast 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);\nconst MediaLibraryModal = defineAsyncComponent(async () => {\n // try/catch downgrades Webpack's \"Module not found\" from error to warning\n // when the optional peer isn't installed. Cloud consumers always install it.\n try {\n const m = await import(\"@templatical/media-library\");\n return m.MediaLibraryModal;\n } catch {\n throw new Error(\n \"[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.\",\n );\n }\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 */\nconst props = defineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n /**\n * The editor's `init({ locale })`, forwarded to `MediaLibraryModal` so\n * `@templatical/media-library` loads its own strings in the same language.\n * A locale rather than translations: that package owns its copy, and the\n * editor's own chunk carries none of it.\n */\n locale?: string;\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\n <!-- `auth-manager` / `project-id` / `plan-config` are props, not injections.\n An injection would have to match the modal's key identity; a mismatch\n arrives as `undefined` with no error and the browser opens inert. -->\n <MediaLibraryModal\n :visible=\"cloud.panelState.mediaLibraryOpen.value\"\n :accept=\"cloud.panelState.mediaLibraryAccept.value\"\n :popover-target=\"core.popoverRoot.value\"\n :locale=\"locale\"\n :ui-theme=\"core.resolvedTheme.value\"\n :auth-manager=\"cloud.mediaBrowser.authManager\"\n :project-id=\"cloud.mediaBrowser.projectId\"\n :plan-config=\"cloud.mediaBrowser.planConfig\"\n @select=\"cloud.mediaLib.handleMediaSelect\"\n @close=\"cloud.mediaLib.handleMediaLibraryClose\"\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);\nconst MediaLibraryModal = defineAsyncComponent(async () => {\n // try/catch downgrades Webpack's \"Module not found\" from error to warning\n // when the optional peer isn't installed. Cloud consumers always install it.\n try {\n const m = await import(\"@templatical/media-library\");\n return m.MediaLibraryModal;\n } catch {\n throw new Error(\n \"[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.\",\n );\n }\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 */\nconst props = defineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n /**\n * The editor's `init({ locale })`, forwarded to `MediaLibraryModal` so\n * `@templatical/media-library` loads its own strings in the same language.\n * A locale rather than translations: that package owns its copy, and the\n * editor's own chunk carries none of it.\n */\n locale?: string;\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\n <!-- `auth-manager` / `project-id` / `plan-config` are props, not injections.\n An injection would have to match the modal's key identity; a mismatch\n arrives as `undefined` with no error and the browser opens inert. -->\n <MediaLibraryModal\n :visible=\"cloud.panelState.mediaLibraryOpen.value\"\n :accept=\"cloud.panelState.mediaLibraryAccept.value\"\n :popover-target=\"core.popoverRoot.value\"\n :locale=\"locale\"\n :ui-theme=\"core.resolvedTheme.value\"\n :auth-manager=\"cloud.mediaBrowser.authManager\"\n :project-id=\"cloud.mediaBrowser.projectId\"\n :plan-config=\"cloud.mediaBrowser.planConfig\"\n @select=\"cloud.mediaLib.handleMediaSelect\"\n @close=\"cloud.mediaLib.handleMediaLibraryClose\"\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,EAIE,EAAA,CAAA,GAAA;IAHC,MAAM;IACN,gBAAc;IACf,OAAM;;GAGV,EASM,OATN,GASM,CANJ,EAEK,MAFL,GAEK,EADA,EAAA,CAAA,CAAM,CAAC,MAAM,KAAK,GAAA,CAAA,GAEvB,EAEI,KAFJ,GAEI,EADC,EAAgB,EAAA,KAAK,CAAA,GAAA,CAAA,CAAA,CAAA;GAInB,EAAgB,EAAA,KAAK,IAIP,EAAA,IAAA,EAAA,KALvB,EAAA,GAAA,EAMS,UAAA;;IAJP,OAAM;IACL,SAAK,AA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AAQ,EAAA,MAAM,WAAW,mBAAmB;IAC5C,kBAAgB,EAAA,KAAK,YAAY;IACjC,QAAQ,EAAA;IACR,YAAU,EAAA,KAAK,cAAc;IAC7B,gBAAc,EAAA,MAAM,aAAa;IACjC,cAAY,EAAA,MAAM,aAAa;IAC/B,eAAa,EAAA,MAAM,aAAa;IAChC,UAAQ,EAAA,MAAM,SAAS;IACvB,SAAO,EAAA,MAAM,SAAS"}
@@ -1,7 +1,7 @@
1
1
  import { F as e, N as t, S as n, at as r, f as i, g as a, h as o, lt as s, m as c, p as l, u, ut as d } from "./draggable-BfpsXFg7.js";
2
- import "./useEditorCore-DC8gmfs6.js";
3
- import { a as f, i as p } from "./icons-C36Ha5VU.js";
4
- import { n as m } from "./useCloudI18n-NVa1aeY8.js";
2
+ import "./useEditorCore-D84laTMj.js";
3
+ import { a as f, i as p } from "./icons-Dl5bcXmT.js";
4
+ import { n as m } from "./useCloudI18n-Ch-SiRjU.js";
5
5
  import { t as h } from "./readableTextColor-f8Kykfnh.js";
6
6
  //#region src/cloud/components/CollaboratorBar.vue?vue&type=script&setup=true&lang.ts
7
7
  var g = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, _ = ["title"], v = {
@@ -49,4 +49,4 @@ var g = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, _
49
49
  //#endregion
50
50
  export { S as default };
51
51
 
52
- //# sourceMappingURL=CollaboratorBar-WBtrPPnM.js.map
52
+ //# sourceMappingURL=CollaboratorBar-BH1lM_Ta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollaboratorBar-WBtrPPnM.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,CACzC,GAEM,IAAwB,QAC5B,EAAM,cAAc,MAAM,CAAU,CACtC,GAEM,IAAgB,QAAe,EAAsB,MAAM,MAAM,GAEjE,IAAgB,QACpB,EAAsB,MAAM,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,IAAI,CAC1D;EAEA,SAAS,EAAY,GAAsB;GACzC,IAAM,IAAQ,EAAK,KAAK,CAAC,CAAC,MAAM,KAAK;GAMrC,OALI,EAAM,UAAU,KAEhB,EAAM,EAAE,CAAC,OAAO,CAAC,IAAI,EAAM,EAAM,SAAS,EAAE,CAAC,OAAO,CAAC,EAAA,CACrD,YAAY,IAET,EAAK,OAAO,CAAC,CAAC,CAAC,YAAY;EACpC;oBAIE,EAAA,GAAA,EA0CM,OA1CN,GA0CM,CAxCJ,EAaM,OAAA;GAZJ,OAAM;GACL,OAAK,EAAA,EAAmB,OAAA,EAAA,cAAW,uBAAA,wBAAA,CAAA;GAGnC,OAAgB,EAAA,cAAwB,EAAA,CAAA,CAAM,CAAC,cAAc,YAAsB,EAAA,CAAA,CAAM,CAAC,cAAc;EAM7F,GAAA,CAAA,EAAA,eAAZ,EAAA,GAAA,EAAwD,EAAA,CAAA,GAAA;;GAA9B,MAAM;GAAK,gBAAc;EACnD,CAAA,MAAA,EAAA,GAAA,EAA+C,EAAA,CAAA,GAAA;;GAA9B,MAAM;GAAK,gBAAc;EAKpC,CAAA,EAAA,GAAA,IAAA,CAAA,GAAA,EAAA,cAAc,SAAM,KAD5B,EAAA,GAAA,EAuBM,OAvBN,GAuBM,EAnBJ,EAAA,EAAA,GAAA,EAWM,GAAA,MAAA,EAVmB,EAAA,QAAhB,OADT,EAAA,GAAA,EAWM,OAAA;GATH,KAAK,EAAa;GACnB,OAAM;GACL,OAAK,EAAA;IAA+B,iBAAA,EAAa;IAAwB,OAAA,EAAA,CAAA,CAAiB,CAAC,EAAa,KAAK;;GAI7G,OAAO,EAAa;EAElB,GAAA,EAAA,EAAY,EAAa,IAAI,CAAA,GAAA,IAAA,CAAA,EAG1B,GAAA,GAAA,IAAA,EAAA,QAAa,KADrB,EAAA,GAAA,EAMM,OAAA;;GAJJ,OAAM;GACL,OAAO,EAAA;EACT,GAAA,OACE,EAAG,EAAA,KAAa,GAAA,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"CollaboratorBar-BH1lM_Ta.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,CACzC,GAEM,IAAwB,QAC5B,EAAM,cAAc,MAAM,CAAU,CACtC,GAEM,IAAgB,QAAe,EAAsB,MAAM,MAAM,GAEjE,IAAgB,QACpB,EAAsB,MAAM,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,IAAI,CAC1D;EAEA,SAAS,EAAY,GAAsB;GACzC,IAAM,IAAQ,EAAK,KAAK,CAAC,CAAC,MAAM,KAAK;GAMrC,OALI,EAAM,UAAU,KAEhB,EAAM,EAAE,CAAC,OAAO,CAAC,IAAI,EAAM,EAAM,SAAS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ne, n as re, p as m, u as ie } from "./draggable-BfpsXFg7.js";
2
2
  import { t as ae } from "./dist-CM8TB0VD.js";
3
- import { B as oe, H as se, u as ce } from "./keys-CbQuRX85.js";
4
- import { t as le } from "./useI18n-DVWCJJFH.js";
5
- import { a as ue, i as h, n as de, r as g, t as fe } from "./usePopoverPosition-BC-HA7TK.js";
6
- import { n as _ } from "./icons-C36Ha5VU.js";
3
+ import { B as oe, H as se, u as ce } from "./keys-oJdkdtPn.js";
4
+ import { t as le } from "./useI18n-4sUbTM3Y.js";
5
+ import { a as ue, i as h, n as de, r as g, t as fe } from "./usePopoverPosition-C1N2kaiZ.js";
6
+ import { n as _ } from "./icons-Dl5bcXmT.js";
7
7
  import { u as v } from "./styleConstants-9oK5kn21.js";
8
8
  //#region ../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js
9
9
  var y = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, b = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
@@ -499,4 +499,4 @@ var he = [
499
499
  //#endregion
500
500
  export { De as t };
501
501
 
502
- //# sourceMappingURL=ColorPicker-CxKYd_8N.js.map
502
+ //# sourceMappingURL=ColorPicker-d4kY7WWd.js.map