@templatical/editor 0.19.0 → 0.21.0

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 (189) hide show
  1. package/README.md +1 -0
  2. package/dist/{AiChatSidebar-DAQTFuvi.js → AiChatSidebar-K_AehWc-.js} +9 -9
  3. package/dist/{AiFeatureMenu-aFSO20PR.js → AiFeatureMenu-CPdNpHpZ.js} +6 -6
  4. package/dist/{BlockIssueBadge-BQmq1bxn.js → BlockIssueBadge-Dmj9rVra.js} +4 -4
  5. package/dist/{CloudEditor-D0K-m1GA.js → CloudEditor-3a7mqMhe.js} +263 -315
  6. package/dist/{CollaboratorBar-CJO3l6Dt.js → CollaboratorBar-Ds0YZWzV.js} +3 -3
  7. package/dist/{ColorPicker-BsgpTJqK.js → ColorPicker-s9GHXjZs.js} +4 -4
  8. package/dist/CommentsSidebar-DvNEdugN.js +435 -0
  9. package/dist/{CountdownBlock-Bn5w7C-p.js → CountdownBlock-BUHYIAe9.js} +1 -1
  10. package/dist/{CountdownToolbar-PJI3ffi1.js → CountdownToolbar-DPRcv3Fu.js} +3 -4
  11. package/dist/{DesignReferenceSidebar-QfAV8XT9.js → DesignReferenceSidebar-DNmK3dxp.js} +8 -8
  12. package/dist/{IssuesPanel-CTjRgz8w.js → IssuesPanel-CEnEGFtd.js} +7 -7
  13. package/dist/{MergeTagSuggestion-DCuaSOPQ.js → MergeTagSuggestion-DMe4rqn0.js} +2 -2
  14. package/dist/NumberWithSuffix-CCPN_oCh.js +121 -0
  15. package/dist/{ParagraphEditor-Cf75UfSo.js → ParagraphEditor-CkwBirNl.js} +47 -47
  16. package/dist/{RichTextEditorContent-MdaLz6Q3.js → RichTextEditorContent-FbnWsh46.js} +6 -6
  17. package/dist/SaveBlockDialog-Cc5BSUBx.js +264 -0
  18. package/dist/SavedBlockPreviewCanvas-ubttfmKr.js +109 -0
  19. package/dist/SavedBlocksBrowserModal-LkY_U3lY.js +323 -0
  20. package/dist/SavedBlocksPanels-CET0zvH6.js +36 -0
  21. package/dist/SavedBlocksPickBar-poGS4PoI.js +52 -0
  22. package/dist/{SnapshotHistory-C_Y1LzAY.js → SnapshotHistory-BvF5IXn1.js} +8 -8
  23. package/dist/{TemplateScoringPanel-DikuKc6i.js → TemplateScoringPanel-ifGGGWs5.js} +14 -14
  24. package/dist/{TestEmailModal-BW8aTtzf.js → TestEmailModal-BRaM_eko.js} +4 -4
  25. package/dist/{TitleEditor-CCUkbRN0.js → TitleEditor-Bhgzh-iQ.js} +11 -11
  26. package/dist/{TplModal-DoOwUKlT.js → TplModal-BA-Zsg0O.js} +3 -3
  27. package/dist/{blockTypeIcons-BlPKjD7M.js → blockTypeIcons-B1-Yzp-a.js} +6 -6
  28. package/dist/bundle-stats.json +8 -8
  29. package/dist/{ca-DbWoy4rG.js → ca-BBgad6y5.js} +50 -3
  30. package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js → AiFeatureMenu--PdArSnv.js} +7 -7
  31. package/dist/cdn/chunks/{AiFeatureMenu-RwJiaPXZ.js.map → AiFeatureMenu--PdArSnv.js.map} +1 -1
  32. package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js → BlockIssueBadge-DMSd0SIl.js} +4 -4
  33. package/dist/cdn/chunks/{BlockIssueBadge-DM-TDKbr.js.map → BlockIssueBadge-DMSd0SIl.js.map} +1 -1
  34. package/dist/cdn/chunks/{CloudEditor-Dufl354p.js → CloudEditor-DnTfI5GU.js} +273 -325
  35. package/dist/cdn/chunks/CloudEditor-DnTfI5GU.js.map +1 -0
  36. package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js → CollaboratorBar-CBqd7ldq.js} +3 -3
  37. package/dist/cdn/chunks/{CollaboratorBar-xsU20iPl.js.map → CollaboratorBar-CBqd7ldq.js.map} +1 -1
  38. package/dist/cdn/chunks/{ColorPicker-y_obnw4o.js → ColorPicker-DCdWP8YB.js} +99 -99
  39. package/dist/cdn/chunks/ColorPicker-DCdWP8YB.js.map +1 -0
  40. package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js → CountdownBlock-BDnWMAME.js} +2 -2
  41. package/dist/cdn/chunks/{CountdownBlock-sHsRMe1q.js.map → CountdownBlock-BDnWMAME.js.map} +1 -1
  42. package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js → CountdownToolbar-BbLoo22S.js} +4 -5
  43. package/dist/cdn/chunks/{CountdownToolbar-Ckc_jEi-.js.map → CountdownToolbar-BbLoo22S.js.map} +1 -1
  44. package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js → IssuesPanel-CfudrI3T.js} +7 -7
  45. package/dist/cdn/chunks/{IssuesPanel-DF5Ajuna.js.map → IssuesPanel-CfudrI3T.js.map} +1 -1
  46. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js → MergeTagSuggestion-D7TsECll.js} +2 -2
  47. package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js.map → MergeTagSuggestion-D7TsECll.js.map} +1 -1
  48. package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js +123 -0
  49. package/dist/cdn/chunks/NumberWithSuffix-BmMx9_n_.js.map +1 -0
  50. package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js → ParagraphEditor-DPCUSXpx.js} +82 -82
  51. package/dist/cdn/chunks/{ParagraphEditor-BkafKSju.js.map → ParagraphEditor-DPCUSXpx.js.map} +1 -1
  52. package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js → RichTextEditorContent-B8dOiv_D.js} +5 -5
  53. package/dist/cdn/chunks/{RichTextEditorContent-BthhzOZS.js.map → RichTextEditorContent-B8dOiv_D.js.map} +1 -1
  54. package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js +259 -0
  55. package/dist/cdn/chunks/SaveBlockDialog-BY3SMnNV.js.map +1 -0
  56. package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js +110 -0
  57. package/dist/cdn/chunks/SavedBlockPreviewCanvas-LpaOcusq.js.map +1 -0
  58. package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js +318 -0
  59. package/dist/cdn/chunks/SavedBlocksBrowserModal-CfIcmyzF.js.map +1 -0
  60. package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js +38 -0
  61. package/dist/cdn/chunks/SavedBlocksPanels-kIowCfh_.js.map +1 -0
  62. package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js +52 -0
  63. package/dist/cdn/chunks/SavedBlocksPickBar-WSGe1GiZ.js.map +1 -0
  64. package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js → TitleEditor-iwd-O9sO.js} +11 -11
  65. package/dist/cdn/chunks/{TitleEditor-DLv9cXba.js.map → TitleEditor-iwd-O9sO.js.map} +1 -1
  66. package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js → blockTypeIcons-BYz0fgLz.js} +7 -7
  67. package/dist/cdn/chunks/{blockTypeIcons-B0uibGX7.js.map → blockTypeIcons-BYz0fgLz.js.map} +1 -1
  68. package/dist/cdn/chunks/{ca-DbWoy4rG.js → ca-BBgad6y5.js} +51 -4
  69. package/dist/cdn/chunks/ca-BBgad6y5.js.map +1 -0
  70. package/dist/{de-CTYXVU9v.js → cdn/chunks/de-Bw6fB5JU.js} +2 -24
  71. package/dist/cdn/chunks/{de-CTYXVU9v.js.map → de-Bw6fB5JU.js.map} +1 -1
  72. package/dist/cdn/chunks/{de-CgGOnerg.js → de-D7WbpFBR.js} +50 -3
  73. package/dist/cdn/chunks/de-D7WbpFBR.js.map +1 -0
  74. package/dist/{en-DrUV9xth.js → cdn/chunks/en-BrZ0uGK2.js} +51 -2
  75. package/dist/cdn/chunks/en-BrZ0uGK2.js.map +1 -0
  76. package/dist/{en-BtmIaJeb.js → cdn/chunks/en-DAdHJz7h.js} +2 -24
  77. package/dist/cdn/chunks/{en-BtmIaJeb.js.map → en-DAdHJz7h.js.map} +1 -1
  78. package/dist/{es-DwbKjU7q.js → cdn/chunks/es-tLSLysPs.js} +51 -2
  79. package/dist/cdn/chunks/es-tLSLysPs.js.map +1 -0
  80. package/dist/cdn/chunks/{extensions-DLHvZ0UH.js → extensions-DeJh3E9b.js} +29 -29
  81. package/dist/cdn/chunks/{extensions-DLHvZ0UH.js.map → extensions-DeJh3E9b.js.map} +1 -1
  82. package/dist/cdn/chunks/{features-Cnfv4QAY.js → features-pLfGJWIB.js} +1802 -1603
  83. package/dist/cdn/chunks/features-pLfGJWIB.js.map +1 -0
  84. package/dist/cdn/chunks/{icons-DbcM69bb.js → icons-FLemooQz.js} +16 -16
  85. package/dist/cdn/chunks/{icons-DbcM69bb.js.map → icons-FLemooQz.js.map} +1 -1
  86. package/dist/cdn/chunks/{media-library-DpSMwHd4.js → media-library-mCCZieYO.js} +163 -163
  87. package/dist/cdn/chunks/{media-library-DpSMwHd4.js.map → media-library-mCCZieYO.js.map} +1 -1
  88. package/dist/cdn/chunks/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +50 -3
  89. package/dist/cdn/chunks/pt-BR-BWFokdTU.js.map +1 -0
  90. package/dist/{pt-BR-B2ZvFlRL.js → cdn/chunks/pt-BR-w2sGzHNX.js} +2 -24
  91. package/dist/cdn/chunks/{pt-BR-B2ZvFlRL.js.map → pt-BR-w2sGzHNX.js.map} +1 -1
  92. package/dist/cdn/chunks/{pusher-CIwiKF8H.js → pusher-R0v5p99W.js} +27 -22
  93. package/dist/cdn/chunks/pusher-R0v5p99W.js.map +1 -0
  94. package/dist/cdn/chunks/{quality-D9QqkRcU.js → quality-BRbHtAk1.js} +460 -460
  95. package/dist/cdn/chunks/{quality-D9QqkRcU.js.map → quality-BRbHtAk1.js.map} +1 -1
  96. package/dist/cdn/chunks/{renderer-BsLQZNXU.js → renderer-Yg1XhsBN.js} +18 -18
  97. package/dist/cdn/chunks/{renderer-BsLQZNXU.js.map → renderer-Yg1XhsBN.js.map} +1 -1
  98. package/dist/cdn/chunks/{src-zu1ehVNN.js → src-BDJeYiVE.js} +33 -33
  99. package/dist/cdn/chunks/{src-zu1ehVNN.js.map → src-BDJeYiVE.js.map} +1 -1
  100. package/dist/cdn/chunks/{styles-Dx-jXeCd.js → styles-Bp5Jsu9J.js} +1422 -1332
  101. package/dist/cdn/chunks/styles-Bp5Jsu9J.js.map +1 -0
  102. package/dist/cdn/chunks/{tiptap-C2indasq.js → tiptap-BMZ-OENR.js} +2012 -1863
  103. package/dist/cdn/chunks/tiptap-BMZ-OENR.js.map +1 -0
  104. package/dist/cdn/editor.css +1 -1
  105. package/dist/cdn/editor.js +123 -114
  106. package/dist/cdn/editor.js.map +1 -1
  107. package/dist/{check-Cg6Mc2pP.js → check-BpQDKiPz.js} +1 -1
  108. package/dist/{chevron-down-dClfxKrJ.js → chevron-down-j8GrdTyz.js} +1 -1
  109. package/dist/chevron-up-BACyVhyC.js +7 -0
  110. package/dist/{circle-alert-Bhzm-fNA.js → circle-alert-CgtE46ND.js} +1 -1
  111. package/dist/{clock-m7TwQw4b.js → clock-BzKLLW5L.js} +1 -1
  112. package/dist/{cloud-B-RebwxI.js → cloud-Du7mnkz2.js} +19 -47
  113. package/dist/{createLucideIcon-FSF4peHQ.js → createLucideIcon-JWHwTI6N.js} +2 -2
  114. package/dist/{cdn/chunks/de-CTYXVU9v.js → de-Bw6fB5JU.js} +0 -26
  115. package/dist/{de-CgGOnerg.js → de-D7WbpFBR.js} +49 -2
  116. package/dist/{dist-CgTKuIUN.js → dist-BEpCh2mG.js} +1158 -1125
  117. package/dist/{dist-Cx7IUM7J.js → dist-BgPYC_8-.js} +14 -6
  118. package/dist/{dist-BKKo5wPC.js → dist-BkM8A17N.js} +2 -2
  119. package/dist/{dist-CcX5sLpz.js → dist-BuNDAAVp.js} +361 -256
  120. package/dist/{dist-COSN3oDJ.js → dist-CBzCU-a-.js} +2 -2
  121. package/dist/{dist-YSCPD13F.js → dist-CDO52Rxy.js} +2 -2
  122. package/dist/{dist-Dk5AdwoQ.js → dist-CrjzhIxB.js} +2 -2
  123. package/dist/{dist-DXAZUjj3.js → dist-CtcgoC_R.js} +2 -2
  124. package/dist/{dist-D6M5FAY7.js → dist-CuXha2_7.js} +2 -2
  125. package/dist/dist-CweLDZrs.js +5 -0
  126. package/dist/dist-DOsdqAEZ.js +5 -0
  127. package/dist/{dist-8TKf-Jpg.js → dist-DYClLqy8.js} +6 -3
  128. package/dist/{cdn/chunks/en-DrUV9xth.js → en-BrZ0uGK2.js} +49 -4
  129. package/dist/{cdn/chunks/en-BtmIaJeb.js → en-DAdHJz7h.js} +0 -26
  130. package/dist/{cdn/chunks/es-DwbKjU7q.js → es-tLSLysPs.js} +49 -4
  131. package/dist/{extensions-BCA9pyer.js → extensions-ClY5Sh7S.js} +5 -5
  132. package/dist/{image-up-CDEgJqwA.js → image-up-CQdtq8ge.js} +1 -1
  133. package/dist/index.d.ts +81 -4
  134. package/dist/{info-BNP8yGsK.js → info-BUJBXoE6.js} +1 -1
  135. package/dist/{keys-DFaIbGR8.js → keys-CHPcp-Nz.js} +2 -2
  136. package/dist/{list-checks-jepi4iYr.js → list-checks-BGHaCSD5.js} +1 -1
  137. package/dist/{loader-circle-BT38qSm3.js → loader-circle-C-Z6kgI6.js} +1 -1
  138. package/dist/{message-circle-BAHcL9S-.js → message-circle-CEm5qckV.js} +1 -1
  139. package/dist/pencil-DdwmkKLb.js +10 -0
  140. package/dist/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +49 -2
  141. package/dist/{cdn/chunks/pt-BR-B2ZvFlRL.js → pt-BR-w2sGzHNX.js} +0 -26
  142. package/dist/{refresh-cw-as5Bmg4X.js → refresh-cw-maKlg0dl.js} +1 -1
  143. package/dist/{scan-line-IAMjPtRw.js → scan-line-BFgesTOY.js} +1 -1
  144. package/dist/{send-DvMay6bt.js → send-B70aQDrA.js} +1 -1
  145. package/dist/{shield-check-YYDhGroE.js → shield-check-B7x5OKt5.js} +1 -1
  146. package/dist/{sparkles-CCwQMMMZ.js → sparkles-DVlm1Ipp.js} +1 -1
  147. package/dist/style.css +1 -1
  148. package/dist/{styles-64uLkPJV.js → styles-DIDAJdkj.js} +1241 -1151
  149. package/dist/templatical-editor.js +134 -125
  150. package/dist/{text-align-start-BwsA6QzC.js → text-align-start-Vay3Kvo2.js} +1 -1
  151. package/dist/{trash-2-CRBDolnR.js → trash-2-DE8CmxAG.js} +1 -1
  152. package/dist/{triangle-alert-B2g0ALvq.js → triangle-alert-Djg6IG8N.js} +1 -1
  153. package/dist/{upload-y4gxiFp5.js → upload-BwwE0U6G.js} +1 -1
  154. package/dist/{useCloudI18n-PCDOC2kz.js → useCloudI18n-BmiygEM4.js} +1 -1
  155. package/dist/{useEditorCore-ea9OrrH3.js → useEditorCore-Bd9CA4L_.js} +1236 -1013
  156. package/dist/{useI18n-BNMzZTM5.js → useI18n-D2L9Mkik.js} +1 -1
  157. package/dist/{useMergeTag-DfEY0eK5.js → useMergeTag-BTdDq5DC.js} +1 -1
  158. package/dist/{usePopoverPosition-F9STHRIr.js → usePopoverPosition-BO2LNy5n.js} +1 -1
  159. package/dist/{x-Ctg_250T.js → x-CkD6A1iB.js} +1 -1
  160. package/package.json +23 -23
  161. package/dist/CommentsSidebar-BYMVucZh.js +0 -442
  162. package/dist/ModuleBrowserModal-BNalLx0k.js +0 -202
  163. package/dist/ModulePreviewCanvas-BwObwisa.js +0 -106
  164. package/dist/NumberWithSuffix-D3BKz66W.js +0 -89
  165. package/dist/SaveModuleDialog-MTjwiF9D.js +0 -125
  166. package/dist/ToggleSwitch-DUNuUPsZ.js +0 -37
  167. package/dist/cdn/chunks/CloudEditor-Dufl354p.js.map +0 -1
  168. package/dist/cdn/chunks/ColorPicker-y_obnw4o.js.map +0 -1
  169. package/dist/cdn/chunks/ModuleBrowserModal-DG4AVFjH.js +0 -198
  170. package/dist/cdn/chunks/ModuleBrowserModal-DG4AVFjH.js.map +0 -1
  171. package/dist/cdn/chunks/ModulePreviewCanvas-Bc_PcJuc.js +0 -107
  172. package/dist/cdn/chunks/ModulePreviewCanvas-Bc_PcJuc.js.map +0 -1
  173. package/dist/cdn/chunks/NumberWithSuffix-8fOO-LC_.js +0 -91
  174. package/dist/cdn/chunks/NumberWithSuffix-8fOO-LC_.js.map +0 -1
  175. package/dist/cdn/chunks/SaveModuleDialog-DhsfYf2n.js +0 -120
  176. package/dist/cdn/chunks/SaveModuleDialog-DhsfYf2n.js.map +0 -1
  177. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +0 -39
  178. package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +0 -1
  179. package/dist/cdn/chunks/ca-DbWoy4rG.js.map +0 -1
  180. package/dist/cdn/chunks/de-CgGOnerg.js.map +0 -1
  181. package/dist/cdn/chunks/en-DrUV9xth.js.map +0 -1
  182. package/dist/cdn/chunks/es-DwbKjU7q.js.map +0 -1
  183. package/dist/cdn/chunks/features-Cnfv4QAY.js.map +0 -1
  184. package/dist/cdn/chunks/pt-BR-Bcc5Tjed.js.map +0 -1
  185. package/dist/cdn/chunks/pusher-CIwiKF8H.js.map +0 -1
  186. package/dist/cdn/chunks/styles-Dx-jXeCd.js.map +0 -1
  187. package/dist/cdn/chunks/tiptap-C2indasq.js.map +0 -1
  188. package/dist/dist-BDVm2MrW.js +0 -5
  189. package/dist/dist-DbekZDmJ.js +0 -5
@@ -1,202 +0,0 @@
1
- import { A as e, Dt as t, I as n, N as r, O as i, Ot as a, R as o, Y as s, _ as c, c as l, d as u, g as ee, h as d, l as f, nt as p, r as m, s as h, u as te, z as g } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- import { a as ne, c as _, i as re } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
3
- import "./useEditorCore-ea9OrrH3.js";
4
- import { B as v, P as ie, h as ae } from "./keys-DFaIbGR8.js";
5
- import { t as oe } from "./useI18n-BNMzZTM5.js";
6
- import { n as se, r as y, t as b } from "./blockTypeIcons-BlPKjD7M.js";
7
- import { t as ce } from "./trash-2-CRBDolnR.js";
8
- import { t as le } from "./x-Ctg_250T.js";
9
- import { n as ue } from "./useCloudI18n-PCDOC2kz.js";
10
- import { t as de } from "./TplModal-DoOwUKlT.js";
11
- //#region src/cloud/components/ModuleBrowserModal.vue?vue&type=script&setup=true&lang.ts
12
- var fe = {
13
- role: "dialog",
14
- "aria-modal": "true",
15
- "aria-labelledby": "tpl-module-browser-title",
16
- class: "tpl-scale-in tpl:mx-4 tpl:flex tpl:w-full tpl:max-w-[1000px] tpl:flex-col tpl:rounded-[var(--tpl-radius-lg)]",
17
- style: {
18
- "background-color": "var(--tpl-bg-elevated)",
19
- "box-shadow": "var(--tpl-shadow-xl)",
20
- "max-height": "90vh"
21
- }
22
- }, pe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, me = {
23
- id: "tpl-module-browser-title",
24
- class: "tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
25
- }, x = ["aria-label"], S = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, C = { class: "tpl:flex tpl:w-[300px] tpl:shrink-0 tpl:flex-col tpl:overflow-hidden" }, w = { class: "tpl:px-4 tpl:pt-4 tpl:pb-3" }, T = { class: "tpl:relative" }, E = ["placeholder"], D = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:px-4 tpl:pb-4" }, O = {
26
- key: 0,
27
- class: "tpl:flex tpl:flex-col tpl:gap-1"
28
- }, k = ["aria-pressed", "onClick"], A = { class: "tpl:flex tpl:items-center tpl:gap-2" }, j = { class: "tpl:flex-1 tpl:truncate tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, M = { class: "tpl:shrink-0 tpl:rounded-full tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]" }, N = { class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1" }, P = {
29
- key: 0,
30
- class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
31
- }, F = ["aria-label", "onClick"], I = [
32
- "aria-label",
33
- "title",
34
- "onClick"
35
- ], L = {
36
- key: 1,
37
- class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-12"
38
- }, R = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, z = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, he = {
39
- key: 0,
40
- class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
41
- }, ge = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, _e = {
42
- key: 1,
43
- class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
44
- }, ve = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, ye = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, be = { class: "tpl:flex tpl:items-center tpl:gap-2" }, xe = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Se = ["value"], Ce = { class: "tpl:flex tpl:gap-2" }, we = ["disabled"], B = /* @__PURE__ */ c({
45
- __name: "ModuleBrowserModal",
46
- props: { visible: { type: Boolean } },
47
- emits: ["close", "insert"],
48
- setup(c, { emit: B }) {
49
- let Te = c, V = B, Ee = ee(() => import("./ModulePreviewCanvas-BwObwisa.js")), { t: De } = oe(), { t: H } = ue(), U = v(ie, "ModuleBrowserModal"), W = v(ae, "ModuleBrowserModal"), G = s(""), K = s(null), q = s(null), J = s("end"), Y = h(() => {
50
- let e = U.modules.value;
51
- if (!G.value) return e;
52
- let t = G.value.toLowerCase();
53
- return e.filter((e) => e.name.toLowerCase().includes(t));
54
- }), X = h(() => K.value ? U.modules.value.find((e) => e.id === K.value) ?? null : null), Oe = h(() => {
55
- let e = [{
56
- value: "beginning",
57
- label: H.modules.insertAtBeginning
58
- }], t = W.content.value.blocks;
59
- for (let n = 0; n < t.length; n++) {
60
- let r = t[n], i = r.type, a = De.blocks[i] ?? r.type;
61
- e.push({
62
- value: r.id,
63
- label: H.modules.insertAfterBlock.replace("{block}", `${a} ${n + 1}`)
64
- });
65
- }
66
- return e.push({
67
- value: "end",
68
- label: H.modules.insertAtEnd
69
- }), e;
70
- }), ke = h(() => {
71
- if (J.value === "end") return;
72
- if (J.value === "beginning") return 0;
73
- let e = W.content.value.blocks.findIndex((e) => e.id === J.value);
74
- if (e !== -1) return e + 1;
75
- });
76
- n(() => Te.visible, (e) => {
77
- if (e) {
78
- G.value = "", K.value = null, q.value = null;
79
- let e = W.state.selectedBlockId;
80
- if (e) {
81
- let t = W.content.value.blocks.findIndex((t) => t.id === e);
82
- J.value = t === -1 ? "end" : e;
83
- } else J.value = "end";
84
- }
85
- });
86
- function Ae(e) {
87
- let t = [], n = /* @__PURE__ */ new Set();
88
- for (let r of e.content) if (!n.has(r.type) && b[r.type] && (n.add(r.type), t.push({
89
- type: r.type,
90
- icon: b[r.type]
91
- })), t.length >= 5) break;
92
- return t;
93
- }
94
- function Z(e) {
95
- let t = new Set(e.content.map((e) => e.type));
96
- return Math.max(0, t.size - 5);
97
- }
98
- async function je(e) {
99
- try {
100
- await U.deleteModule(e), K.value === e && (K.value = null);
101
- } finally {
102
- q.value = null;
103
- }
104
- }
105
- function Q() {
106
- X.value && V("insert", X.value, ke.value);
107
- }
108
- function $() {
109
- V("close");
110
- }
111
- function Me(e) {
112
- e.key === "Escape" && $(), e.key === "Enter" && X.value && (e.preventDefault(), Q());
113
- }
114
- return (n, s) => (i(), f(de, {
115
- visible: c.visible,
116
- onClose: $,
117
- onKeydown: Me
118
- }, {
119
- default: o(() => [l("div", fe, [
120
- l("div", pe, [l("h3", me, a(p(H).modules.browse), 1), l("button", {
121
- "aria-label": p(H).modules.close,
122
- class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-1 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
123
- onClick: $
124
- }, [d(p(le), {
125
- size: 16,
126
- "stroke-width": 2
127
- })], 8, x)]),
128
- l("div", S, [l("div", C, [l("div", w, [l("div", T, [d(p(se), {
129
- size: 14,
130
- "stroke-width": 2,
131
- class: "tpl:pointer-events-none tpl:absolute tpl:left-3 tpl:top-1/2 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]"
132
- }), g(l("input", {
133
- "onUpdate:modelValue": s[0] ||= (e) => G.value = e,
134
- type: "text",
135
- placeholder: p(H).modules.search,
136
- class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:pl-9 tpl:pr-3 tpl:text-sm tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
137
- }, null, 8, E), [[ne, G.value]])])]), l("div", D, [Y.value.length > 0 ? (i(), u("div", O, [(i(!0), u(m, null, e(Y.value, (n) => (i(), u("button", {
138
- key: n.id,
139
- type: "button",
140
- "aria-pressed": K.value === n.id,
141
- class: "tpl:group/card tpl:w-full tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:bg-transparent tpl:px-3 tpl:py-2 tpl:text-left tpl:transition-all tpl:duration-[120ms]",
142
- style: t({
143
- borderColor: K.value === n.id ? "var(--tpl-primary)" : "var(--tpl-border)",
144
- backgroundColor: K.value === n.id ? "var(--tpl-primary-light)" : "transparent"
145
- }),
146
- onClick: (e) => K.value = n.id
147
- }, [l("div", A, [l("span", j, a(n.name), 1), l("span", M, a(p(H).modules.blockCount.replace("{count}", String(n.content.length))), 1)]), l("div", N, [
148
- (i(!0), u(m, null, e(Ae(n), (e) => (i(), f(r(e.icon), {
149
- key: e.type,
150
- size: 14,
151
- "stroke-width": 1.5,
152
- class: "tpl:text-[var(--tpl-text-dim)]"
153
- }))), 128)),
154
- Z(n) > 0 ? (i(), u("span", P, " +" + a(Z(n)), 1)) : te("", !0),
155
- q.value === n.id ? (i(), u("button", {
156
- key: 1,
157
- "aria-label": p(H).modules.deleteConfirm,
158
- class: "tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-100 tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-danger)]",
159
- style: { "background-color": "transparent" },
160
- onClick: _((e) => je(n.id), ["stop"])
161
- }, a(p(H).modules.deleteConfirm), 9, F)) : (i(), u("button", {
162
- key: 2,
163
- class: "tpl-module-delete-btn tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
164
- "aria-label": p(H).modules.delete,
165
- title: p(H).modules.delete,
166
- onClick: _((e) => q.value = n.id, ["stop"])
167
- }, [d(p(ce), {
168
- size: 12,
169
- "stroke-width": 1.5
170
- })], 8, I))
171
- ])], 12, k))), 128))])) : (i(), u("div", L, [d(p(y), {
172
- size: 32,
173
- "stroke-width": 1,
174
- class: "tpl:text-[var(--tpl-text-dim)]"
175
- }), l("p", R, a(G.value ? p(H).modules.noModules : p(H).modules.noModulesHint), 1)]))])]), l("div", z, [X.value ? (i(), u("div", he, [l("div", ge, [d(p(Ee), { blocks: X.value.content }, null, 8, ["blocks"])])])) : (i(), u("div", _e, [d(p(y), {
176
- size: 32,
177
- "stroke-width": 1,
178
- class: "tpl:text-[var(--tpl-text-dim)]"
179
- }), l("p", ve, a(p(H).modules.selectToPreview), 1)]))])]),
180
- l("div", ye, [l("div", be, [l("label", xe, a(p(H).modules.insertPosition), 1), g(l("select", {
181
- "onUpdate:modelValue": s[1] ||= (e) => J.value = e,
182
- class: "tpl:h-7 tpl:max-w-[220px] tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
183
- }, [(i(!0), u(m, null, e(Oe.value, (e) => (i(), u("option", {
184
- key: e.value,
185
- value: e.value
186
- }, a(e.label), 9, Se))), 128))], 512), [[re, J.value]])]), l("div", Ce, [l("button", {
187
- type: "button",
188
- class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]",
189
- onClick: $
190
- }, a(p(H).modules.close), 1), l("button", {
191
- type: "button",
192
- class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
193
- disabled: !X.value,
194
- onClick: Q
195
- }, a(p(H).modules.insert), 9, we)])])
196
- ])]),
197
- _: 1
198
- }, 8, ["visible"]));
199
- }
200
- });
201
- //#endregion
202
- export { B as default };
@@ -1,106 +0,0 @@
1
- import { A as e, Dt as t, M as n, N as r, O as i, _ as a, c as o, d as s, l as c, nt as l, r as u, s as d, x as f } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- import { I as p, _ as m, a as h, d as g, f as _, h as v, i as y, l as b, m as x, n as S, p as C, r as w, v as T, y as E } from "./useEditorCore-ea9OrrH3.js";
3
- import { o as D } from "./keys-DFaIbGR8.js";
4
- //#region src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
5
- var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__PURE__ */ a({
6
- name: "PreviewSectionBlock",
7
- __name: "PreviewSectionBlock",
8
- props: {
9
- block: {},
10
- viewport: {}
11
- },
12
- setup(a) {
13
- let A = {
14
- title: b,
15
- paragraph: C,
16
- image: v,
17
- video: S,
18
- button: p,
19
- divider: T,
20
- social: h,
21
- menu: x,
22
- table: w,
23
- spacer: y,
24
- html: m,
25
- custom: E
26
- }, j = a, M = f(D, null), N = d(() => {
27
- switch (j.block.columns) {
28
- case "2": return ["50%", "50%"];
29
- case "3": return [
30
- "33.33%",
31
- "33.33%",
32
- "33.33%"
33
- ];
34
- case "1-2": return ["33.33%", "66.67%"];
35
- case "2-1": return ["66.67%", "33.33%"];
36
- default: return ["100%"];
37
- }
38
- }), P = d(() => {
39
- let e = N.value.length, t = [...j.block.children];
40
- for (; t.length < e;) t.push([]);
41
- return t.slice(0, e);
42
- });
43
- function F(e) {
44
- return P.value[e] || [];
45
- }
46
- function I(e) {
47
- return _(e, M, A);
48
- }
49
- return (a, d) => {
50
- let f = n("PreviewSectionBlock", !0);
51
- return i(), s("div", O, [o("div", k, [(i(!0), s(u, null, e(P.value, (n, a) => (i(), s("div", {
52
- key: a,
53
- style: t({ width: N.value[a] })
54
- }, [(i(!0), s(u, null, e(F(a), (e) => (i(), s("div", {
55
- key: e.id,
56
- style: t(l(g)(e))
57
- }, [e.type === "section" ? (i(), c(f, {
58
- key: 0,
59
- block: e,
60
- viewport: "desktop"
61
- }, null, 8, ["block"])) : (i(), c(r(I(e)), {
62
- key: 1,
63
- block: e,
64
- viewport: "desktop"
65
- }, null, 8, ["block"]))], 4))), 128))], 4))), 128))])]);
66
- };
67
- }
68
- }), j = {
69
- class: "tpl:pointer-events-none tpl:mx-auto tpl:w-[600px] tpl:select-none tpl:rounded-lg",
70
- style: {
71
- "background-color": "var(--tpl-canvas-bg)",
72
- "box-shadow": "var(--tpl-shadow-sm)"
73
- }
74
- }, M = /* @__PURE__ */ a({
75
- __name: "ModulePreviewCanvas",
76
- props: { blocks: {} },
77
- setup(n) {
78
- let a = f(D), o = {
79
- section: A,
80
- title: b,
81
- paragraph: C,
82
- image: v,
83
- video: S,
84
- button: p,
85
- divider: T,
86
- social: h,
87
- menu: x,
88
- table: w,
89
- spacer: y,
90
- html: m,
91
- custom: E
92
- };
93
- function d(e) {
94
- return _(e, a, o);
95
- }
96
- return (a, o) => (i(), s("div", j, [(i(!0), s(u, null, e(n.blocks, (e) => (i(), s("div", {
97
- key: e.id,
98
- style: t(l(g)(e))
99
- }, [(i(), c(r(d(e)), {
100
- block: e,
101
- viewport: "desktop"
102
- }, null, 8, ["block"]))], 4))), 128))]));
103
- }
104
- });
105
- //#endregion
106
- export { M as default };
@@ -1,89 +0,0 @@
1
- import { A as e, Dt as t, Et as n, N as r, O as i, Ot as a, _ as o, c as s, d as c, j as l, l as u, nt as d, r as f, s as p, u as m } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- import { h, m as g, p as _ } from "./ColorPicker-BsgpTJqK.js";
3
- //#region src/components/SlidingPillSelect.vue?vue&type=script&setup=true&lang.ts
4
- var v = [
5
- "aria-checked",
6
- "aria-label",
7
- "title",
8
- "onClick"
9
- ], y = { key: 1 }, b = /* @__PURE__ */ o({
10
- __name: "SlidingPillSelect",
11
- props: {
12
- options: {},
13
- modelValue: {}
14
- },
15
- emits: ["update:modelValue"],
16
- setup(n, { emit: o }) {
17
- let s = n, l = o, d = p(() => s.options.findIndex((e) => e.value === s.modelValue)), h = p(() => `translateX(${Math.max(d.value, 0) * 100}%)`);
18
- return (o, s) => (i(), c("div", {
19
- role: "radiogroup",
20
- class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
21
- style: t({
22
- gridTemplateColumns: `repeat(${n.options.length}, 1fr)`,
23
- backgroundColor: "var(--tpl-bg-hover)"
24
- })
25
- }, [d.value >= 0 ? (i(), c("div", {
26
- key: 0,
27
- class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
28
- style: t({
29
- left: "4px",
30
- width: `calc((100% - 8px) / ${n.options.length})`,
31
- transform: h.value,
32
- backgroundColor: "var(--tpl-bg)",
33
- boxShadow: "var(--tpl-shadow)",
34
- transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
35
- })
36
- }, null, 4)) : m("", !0), (i(!0), c(f, null, e(n.options, (e) => (i(), c("button", {
37
- key: e.value,
38
- role: "radio",
39
- "aria-checked": n.modelValue === e.value,
40
- "aria-label": e.label,
41
- class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:py-[5px] tpl:text-xs tpl:font-medium",
42
- style: t({
43
- color: n.modelValue === e.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
44
- transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
45
- }),
46
- title: e.label,
47
- onClick: (t) => l("update:modelValue", e.value)
48
- }, [e.icon ? (i(), u(r(e.icon), {
49
- key: 0,
50
- size: 14,
51
- "stroke-width": 2
52
- })) : (i(), c("span", y, a(e.label), 1))], 12, v))), 128))], 4));
53
- }
54
- }), x = { class: "tpl:mb-3.5" }, S = /* @__PURE__ */ o({
55
- __name: "FieldRow",
56
- props: { label: {} },
57
- setup(e) {
58
- return (t, r) => (i(), c("div", x, [e.label ? (i(), c("label", {
59
- key: 0,
60
- class: n(d(h))
61
- }, a(e.label), 3)) : m("", !0), l(t.$slots, "default")]));
62
- }
63
- }), C = { class: "tpl:flex tpl:items-stretch" }, w = [
64
- "value",
65
- "min",
66
- "max"
67
- ], T = /* @__PURE__ */ o({
68
- __name: "NumberWithSuffix",
69
- props: {
70
- modelValue: {},
71
- min: {},
72
- max: {},
73
- suffix: {}
74
- },
75
- emits: ["update:modelValue"],
76
- setup(e, { emit: t }) {
77
- let r = t;
78
- return (t, o) => (i(), c("div", C, [s("input", {
79
- type: "number",
80
- class: n(d(_)),
81
- value: e.modelValue,
82
- min: e.min,
83
- max: e.max,
84
- onInput: o[0] ||= (e) => r("update:modelValue", Number(e.target.value))
85
- }, null, 42, w), s("span", { class: n(d(g)) }, a(e.suffix), 3)]));
86
- }
87
- });
88
- //#endregion
89
- export { S as n, b as r, T as t };
@@ -1,125 +0,0 @@
1
- import { A as e, Dt as t, Et as n, I as r, O as i, Ot as a, R as o, Y as s, _ as c, c as l, d as u, h as d, l as f, m as p, nt as m, r as h, s as g, u as ee, z as _ } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- import { a as v } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
3
- import "./useEditorCore-ea9OrrH3.js";
4
- import { B as y, P as b, h as x } from "./keys-DFaIbGR8.js";
5
- import { t as S } from "./useI18n-BNMzZTM5.js";
6
- import { t as te } from "./loader-circle-BT38qSm3.js";
7
- import { n as ne } from "./useCloudI18n-PCDOC2kz.js";
8
- import { t as re } from "./ToggleSwitch-DUNuUPsZ.js";
9
- import { t as C } from "./TplModal-DoOwUKlT.js";
10
- //#region src/cloud/components/SaveModuleDialog.vue?vue&type=script&setup=true&lang.ts
11
- var w = ["aria-busy"], T = {
12
- id: "tpl-save-module-title",
13
- class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
14
- }, E = { class: "tpl:mb-3" }, D = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, O = ["placeholder", "disabled"], k = { class: "tpl:mb-3" }, A = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, j = { class: "tpl:max-h-40 tpl:space-y-1 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:p-2 tpl:border-[var(--tpl-border)]" }, M = {
15
- key: 0,
16
- role: "alert",
17
- class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
18
- }, N = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, P = ["disabled"], F = ["disabled"], I = {
19
- key: 0,
20
- class: "tpl:flex tpl:items-center tpl:gap-1.5"
21
- }, L = { key: 1 }, R = /* @__PURE__ */ c({
22
- __name: "SaveModuleDialog",
23
- props: {
24
- visible: { type: Boolean },
25
- preSelectedBlockId: {}
26
- },
27
- emits: ["close", "saved"],
28
- setup(c, { emit: R }) {
29
- let z = c, B = R, { t: V } = S(), { t: H } = ne(), U = y(x, "SaveModuleDialog"), W = y(b, "SaveModuleDialog"), G = s(""), K = s(/* @__PURE__ */ new Set()), q = s(!1), J = s(null), Y = g(() => U.content.value.blocks);
30
- function X(e, t) {
31
- let n = e.type;
32
- return `${V.blocks[n] ?? e.type} ${t + 1}`;
33
- }
34
- r(() => z.visible, (e) => {
35
- e && (G.value = "", J.value = null, K.value = new Set(z.preSelectedBlockId ? [z.preSelectedBlockId] : []));
36
- });
37
- function ie(e) {
38
- let t = new Set(K.value);
39
- t.has(e) ? t.delete(e) : t.add(e), K.value = t;
40
- }
41
- let Z = g(() => G.value.trim().length > 0 && K.value.size > 0 && !q.value);
42
- async function Q() {
43
- if (Z.value) {
44
- q.value = !0, J.value = null;
45
- try {
46
- let e = Y.value.filter((e) => K.value.has(e.id));
47
- await W.createModule(G.value.trim(), e), B("saved"), B("close");
48
- } catch (e) {
49
- J.value = e.message;
50
- } finally {
51
- q.value = !1;
52
- }
53
- }
54
- }
55
- function $() {
56
- q.value || B("close");
57
- }
58
- function ae(e) {
59
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q()), e.key === "Escape" && $();
60
- }
61
- return (r, s) => (i(), f(C, {
62
- visible: c.visible,
63
- onClose: $,
64
- onKeydown: ae
65
- }, {
66
- default: o(() => [l("div", {
67
- role: "dialog",
68
- "aria-modal": "true",
69
- "aria-busy": q.value,
70
- "aria-labelledby": "tpl-save-module-title",
71
- class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
72
- style: {
73
- "background-color": "var(--tpl-bg-elevated)",
74
- "box-shadow": "var(--tpl-shadow-xl)"
75
- }
76
- }, [
77
- l("h3", T, a(m(H).modules.saveAsModule), 1),
78
- l("div", E, [l("label", D, a(m(H).modules.moduleName), 1), _(l("input", {
79
- "onUpdate:modelValue": s[0] ||= (e) => G.value = e,
80
- type: "text",
81
- placeholder: m(H).modules.moduleNamePlaceholder,
82
- class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
83
- disabled: q.value
84
- }, null, 8, O), [[v, G.value]])]),
85
- l("div", k, [l("label", A, a(m(H).modules.selectBlocks), 1), l("div", j, [(i(!0), u(h, null, e(Y.value, (e, n) => (i(), f(re, {
86
- key: e.id,
87
- class: "tpl:rounded-sm tpl:px-2 tpl:py-1.5 tpl:text-sm tpl:transition-colors tpl:duration-100",
88
- style: t({
89
- color: "var(--tpl-text)",
90
- backgroundColor: K.value.has(e.id) ? "var(--tpl-primary-light)" : "transparent"
91
- }),
92
- "model-value": K.value.has(e.id),
93
- label: X(e, n),
94
- disabled: q.value,
95
- "onUpdate:modelValue": (t) => ie(e.id)
96
- }, null, 8, [
97
- "style",
98
- "model-value",
99
- "label",
100
- "disabled",
101
- "onUpdate:modelValue"
102
- ]))), 128))])]),
103
- J.value ? (i(), u("p", M, a(J.value), 1)) : ee("", !0),
104
- l("div", N, [l("button", {
105
- type: "button",
106
- class: n(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": q.value }]),
107
- disabled: q.value,
108
- onClick: $
109
- }, a(m(H).modules.cancel), 11, P), l("button", {
110
- type: "button",
111
- class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
112
- disabled: !Z.value,
113
- onClick: Q
114
- }, [q.value ? (i(), u("span", I, [d(m(te), {
115
- class: "tpl:animate-spin",
116
- size: 12,
117
- "stroke-width": 2
118
- }), p(" " + a(m(H).modules.saving), 1)])) : (i(), u("span", L, a(m(H).modules.save), 1))], 8, F)])
119
- ], 8, w)]),
120
- _: 1
121
- }, 8, ["visible"]));
122
- }
123
- });
124
- //#endregion
125
- export { R as default };
@@ -1,37 +0,0 @@
1
- import { Et as e, O as t, Ot as n, _ as r, c as i, d as a, j as o, m as s, u as c } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
- //#region src/components/ToggleSwitch.vue?vue&type=script&setup=true&lang.ts
3
- var l = { key: 0 }, u = {
4
- key: 0,
5
- class: "tpl:text-[var(--tpl-danger)]"
6
- }, d = [
7
- "aria-checked",
8
- "aria-label",
9
- "disabled"
10
- ], f = /* @__PURE__ */ r({
11
- __name: "ToggleSwitch",
12
- props: {
13
- modelValue: { type: Boolean },
14
- label: {},
15
- disabled: { type: Boolean },
16
- required: { type: Boolean }
17
- },
18
- emits: ["update:modelValue"],
19
- setup(r, { emit: f }) {
20
- let p = f;
21
- return (f, m) => (t(), a("label", { class: e(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", r.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [f.$slots.default || r.label || r.required ? (t(), a("span", l, [o(f.$slots, "default", {}, () => [s(n(r.label), 1)]), r.required ? (t(), a("span", u, " *")) : c("", !0)])) : c("", !0), i("button", {
22
- type: "button",
23
- role: "switch",
24
- "aria-checked": r.modelValue,
25
- "aria-label": r.label,
26
- disabled: r.disabled,
27
- class: e([
28
- "tpl:relative tpl:inline-flex tpl:h-5 tpl:w-9 tpl:shrink-0 tpl:rounded-full tpl:border-2 tpl:border-transparent tpl:transition-colors tpl:duration-200",
29
- r.modelValue ? "tpl:bg-[var(--tpl-primary)]" : "tpl:bg-[var(--tpl-border)]",
30
- r.disabled ? "tpl:cursor-not-allowed tpl:opacity-60" : "tpl:cursor-pointer"
31
- ]),
32
- onClick: m[0] ||= (e) => !r.disabled && p("update:modelValue", !r.modelValue)
33
- }, [i("span", { class: e(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", r.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10, d)], 2));
34
- }
35
- });
36
- //#endregion
37
- export { f as t };