@aswin.dev/editor 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/LICENSE +56 -0
  2. package/README.md +3 -3
  3. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-EmQ19wiS.js} +37 -37
  4. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DeB0w_32.js} +67 -81
  5. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-DoLD5Cde.js} +22 -22
  6. package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-DkNbDvJA.js} +12 -12
  7. package/dist/CloudEditor-zo9PjjvY.js +1214 -0
  8. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-BsXMY-8e.js} +21 -21
  9. package/dist/CommentsSidebar-DIWIa4rS.js +436 -0
  10. package/dist/CountdownBlock-BCi7-DAM.js +92 -0
  11. package/dist/CountdownToolbar-BuS8p5ju.js +210 -0
  12. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-RDlnhL-6.js} +58 -58
  13. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-BJ59h9ok.js} +2 -2
  14. package/dist/ModuleBrowserModal-b7HbpByz.js +206 -0
  15. package/dist/ModulePreviewCanvas-D__YlOLS.js +108 -0
  16. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Ca3vNY84.js} +87 -87
  17. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-B1aYPO-6.js} +182 -182
  18. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-BmEVMrkJ.js} +38 -38
  19. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-ClovqI6h.js} +28 -28
  20. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DoqtH0cw.js} +45 -50
  21. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-DQv2ZAiL.js} +75 -75
  22. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-iIeYJYsj.js} +28 -28
  23. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-CTDIwRF_.js} +68 -68
  24. package/dist/{TplModal-BwSfxIHf.js → TplModal-CBq1J1pG.js} +14 -14
  25. package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
  26. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-QkC6f5UE.js} +19 -5
  27. package/dist/bundle-stats.json +7 -7
  28. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-BeU8nz7A.js} +28 -28
  29. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-BeU8nz7A.js.map} +1 -1
  30. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-B2mhscyP.js} +21 -21
  31. package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js.map +1 -0
  32. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-C4g77gF0.js} +11 -11
  33. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-C4g77gF0.js.map} +1 -1
  34. package/dist/{CloudEditor-BCz1ZTYC.js → cdn/chunks/CloudEditor-Btyr0b0_.js} +486 -475
  35. package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js.map +1 -0
  36. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-YBiIjiRh.js} +15 -15
  37. package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js.map +1 -0
  38. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js +93 -0
  39. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js.map +1 -0
  40. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js +212 -0
  41. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js.map +1 -0
  42. package/dist/{ModuleBrowserModal-DrUFMTDx.js → cdn/chunks/ModuleBrowserModal-C2CDWKW6.js} +51 -62
  43. package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js.map +1 -0
  44. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js +109 -0
  45. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js.map +1 -0
  46. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-Ty1bp9vB.js} +64 -64
  47. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-Ty1bp9vB.js.map} +1 -1
  48. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-BA1WbHI7.js} +188 -188
  49. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-BA1WbHI7.js.map} +1 -1
  50. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-BtWCA_Oc.js} +30 -30
  51. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-BtWCA_Oc.js.map} +1 -1
  52. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-AwL0tkCV.js} +21 -21
  53. package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js.map +1 -0
  54. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-DbSyeixS.js} +65 -65
  55. package/dist/cdn/chunks/TitleEditor-DbSyeixS.js.map +1 -0
  56. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js +23 -0
  57. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js.map +1 -0
  58. package/dist/cdn/chunks/{de-D8CnZxV9.js → de-_tooy3Q8.js} +250 -2
  59. package/dist/cdn/chunks/de-_tooy3Q8.js.map +1 -0
  60. package/dist/cdn/chunks/{draggable-Bcb86AsV.js → draggable-C-1_gch3.js} +2 -2
  61. package/dist/cdn/chunks/{draggable-Bcb86AsV.js.map → draggable-C-1_gch3.js.map} +1 -1
  62. package/dist/cdn/chunks/{en-8FHaQv4V.js → en-CNqLoIm9.js} +250 -2
  63. package/dist/cdn/chunks/en-CNqLoIm9.js.map +1 -0
  64. package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BVKQw_sp.js} +107 -107
  65. package/dist/cdn/chunks/extensions-BVKQw_sp.js.map +1 -0
  66. package/dist/cdn/chunks/{features-DEMb13KS.js → features-DIBEo4xl.js} +3388 -2289
  67. package/dist/cdn/chunks/features-DIBEo4xl.js.map +1 -0
  68. package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-C1Gg-ov-.js} +346 -54
  69. package/dist/cdn/chunks/icons-C1Gg-ov-.js.map +1 -0
  70. package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-BTF_Ko70.js} +985 -985
  71. package/dist/cdn/chunks/media-library-BTF_Ko70.js.map +1 -0
  72. package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-C5AmotmP.js} +312 -312
  73. package/dist/cdn/chunks/quality-C5AmotmP.js.map +1 -0
  74. package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-D0L44Vlp.js} +236 -142
  75. package/dist/cdn/chunks/renderer-D0L44Vlp.js.map +1 -0
  76. package/dist/cdn/chunks/{src-CRaqN-p8.js → src-RKexlYjA.js} +161 -161
  77. package/dist/cdn/chunks/src-RKexlYjA.js.map +1 -0
  78. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js +57 -0
  79. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js.map +1 -0
  80. package/dist/cdn/chunks/styles-CQR6ed13.js +4976 -0
  81. package/dist/cdn/chunks/styles-CQR6ed13.js.map +1 -0
  82. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-CDzAbF2j.js} +43 -43
  83. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-CDzAbF2j.js.map} +1 -1
  84. package/dist/cdn/editor.css +1 -1
  85. package/dist/cdn/editor.js +211 -123
  86. package/dist/cdn/editor.js.map +1 -1
  87. package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
  88. package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
  89. package/dist/chevron-right-BqCptpdp.js +10 -0
  90. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
  91. package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
  92. package/dist/{cloud-DEk_b4CR.js → cloud-DJG4tb4_.js} +485 -427
  93. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
  94. package/dist/{de-Brqvgr43.js → de-2LEvILeZ.js} +249 -1
  95. package/dist/{dist-Cp0zXPAD.js → dist-BHAeXaUY.js} +1 -1
  96. package/dist/{dist-BaQIYPsn.js → dist-BSJvAvH3.js} +1 -1
  97. package/dist/{dist-wzMIGj-D.js → dist-BeFnymxK.js} +1 -1
  98. package/dist/dist-Bmir0gYb.js +1167 -0
  99. package/dist/{dist-DDJIWTRY.js → dist-BvPgo-UK.js} +1 -1
  100. package/dist/{dist-BFawx6IS.js → dist-CPVBKMmd.js} +51 -51
  101. package/dist/dist-CivF9P8b.js +382 -0
  102. package/dist/{dist-D6uC2xhi.js → dist-Df4ie7vZ.js} +1 -1
  103. package/dist/{dist-us-RpCWN.js → dist-DxOoemkW.js} +1 -1
  104. package/dist/{dist-KoBJjK1G.js → dist-HEQ52gTJ.js} +1 -1
  105. package/dist/{dist-DjviJBCi.js → dist-b-XUqAoF.js} +1 -1
  106. package/dist/{dist-D90y8dvT.js → dist-kZfaVUpW.js} +3 -3
  107. package/dist/{dist-aRzjfSRN.js → dist-wfAedlzi.js} +1 -1
  108. package/dist/{en-WDVp87TE.js → en-D2RU2Poj.js} +249 -1
  109. package/dist/{extensions-CUcl9Ok4.js → extensions-BQ1xXx3d.js} +103 -103
  110. package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
  111. package/dist/index.d.ts +102 -14
  112. package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
  113. package/dist/keys-CvX8D-8C.js +10 -0
  114. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
  115. package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
  116. package/dist/pencil-BZJPNYWR.js +10 -0
  117. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
  118. package/dist/{scan-line-D0vcUekt.js → scan-line-DlghmhNf.js} +1 -1
  119. package/dist/{send-DH4oDQqC.js → send-DDdhIRj8.js} +1 -1
  120. package/dist/{shield-check-CfJgs2Hd.js → shield-check-OSQ-JVTX.js} +1 -1
  121. package/dist/{sparkles-CvRXGqFs.js → sparkles-BN4a-CoF.js} +1 -1
  122. package/dist/style.css +1 -1
  123. package/dist/styleConstants-wWRbcuEK.js +55 -0
  124. package/dist/styles-CavWjvol.js +5487 -0
  125. package/dist/templatical-editor.js +211 -119
  126. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-D1weisjS.js} +1 -1
  127. package/dist/{trash-2-DbP2Y6t2.js → trash-2-CMWvQ5KX.js} +1 -1
  128. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DyidRNX_.js} +1 -1
  129. package/dist/undo-2-Cg8I7obC.js +16 -0
  130. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-BTTNBk5i.js} +2 -2
  131. package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-BGnzcT7p.js} +2424 -2249
  132. package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
  133. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-CfuZq2fF.js} +4 -4
  134. package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
  135. package/dist/{x-u2oVmjN_.js → x-CgIhNcT9.js} +1 -1
  136. package/package.json +15 -15
  137. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  138. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  139. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  140. package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
  141. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
  142. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
  143. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
  144. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
  145. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
  146. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
  147. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  148. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
  149. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
  150. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
  151. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
  152. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
  153. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
  154. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
  155. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
  156. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
  157. package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
  158. package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
  159. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
  160. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  161. package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
  162. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
  163. package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
  164. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
  165. package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
  166. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
  167. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
  168. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  169. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  170. package/dist/dist-B1IR0bpH.js +0 -326
  171. package/dist/dist-DJmnUmW9.js +0 -362
  172. package/dist/keys-ciNfSSGj.js +0 -10
  173. package/dist/styleConstants-fWzlIIwN.js +0 -55
  174. package/dist/styles-DEXEkBvg.js +0 -3176
  175. /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-Bwh4ceeO.js} +0 -0
  176. /package/dist/{de-DCaaCE5s.js → de-D2npYjrZ.js} +0 -0
  177. /package/dist/{dist-iLBdeBDR.js → dist-DvHLtWVP.js} +0 -0
  178. /package/dist/{emojiData-PQyVa4bU.js → emojiData-DvQBBzmO.js} +0 -0
  179. /package/dist/{en-DXCyK4-X.js → en-ib-4h3_o.js} +0 -0
  180. /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-CFDZnEIs.js} +0 -0
  181. /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-7Rv0QDiO.js} +0 -0
  182. /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-C_9OpzBw.js} +0 -0
@@ -1,210 +0,0 @@
1
- import { Dt as e, M as t, Mt as n, P as r, S as i, V as a, _ as o, b as s, d as c, h as l, it as u, m as d, p as f, y as p } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import { t as m } from "./useI18n-lb2DHDiu.js";
3
- import { f as h } from "./styleConstants-fWzlIIwN.js";
4
- import { i as g, n as _, r as v, t as y } from "./NumberWithSuffix-DkXUez9t.js";
5
- //#region src/components/toolbar/CheckboxItem.vue?vue&type=script&setup=true&lang.ts
6
- var b = { class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text)]" }, x = ["checked"], S = /* @__PURE__ */ i({
7
- __name: "CheckboxItem",
8
- props: {
9
- modelValue: { type: Boolean },
10
- label: {}
11
- },
12
- emits: ["update:modelValue"],
13
- setup(e, { emit: r }) {
14
- let i = r;
15
- return (r, a) => (t(), o("label", b, [d("input", {
16
- type: "checkbox",
17
- class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
18
- checked: e.modelValue,
19
- onChange: a[0] ||= (e) => i("update:modelValue", e.target.checked)
20
- }, null, 40, x), p(" " + n(e.label), 1)]));
21
- }
22
- }), C = ["value"], w = ["value"], T = ["value"], E = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, D = ["value"], O = { value: "" }, k = ["value"], A = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, j = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, M = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, N = [
23
- "value",
24
- "placeholder",
25
- "onInput"
26
- ], P = ["value", "placeholder"], F = ["value"], I = /* @__PURE__ */ i({
27
- __name: "CountdownToolbar",
28
- props: {
29
- block: {},
30
- fontFamilies: {}
31
- },
32
- emits: ["update"],
33
- setup(i, { emit: p }) {
34
- let b = p, { t: x } = m(), I = [
35
- "UTC",
36
- "America/New_York",
37
- "America/Chicago",
38
- "America/Denver",
39
- "America/Los_Angeles",
40
- "Europe/London",
41
- "Europe/Berlin",
42
- "Europe/Paris",
43
- "Europe/Moscow",
44
- "Asia/Dubai",
45
- "Asia/Kolkata",
46
- "Asia/Shanghai",
47
- "Asia/Tokyo",
48
- "Australia/Sydney",
49
- "Pacific/Auckland"
50
- ], L = [
51
- {
52
- value: ":",
53
- label: ":"
54
- },
55
- {
56
- value: "-",
57
- label: "-"
58
- },
59
- {
60
- value: " ",
61
- label: "␣"
62
- }
63
- ], R = [
64
- "Days",
65
- "Hours",
66
- "Minutes",
67
- "Seconds"
68
- ], z = f(() => R.map((e) => ({
69
- unit: e,
70
- showKey: `show${e}`,
71
- labelKey: `label${e}`,
72
- translationKey: e.toLowerCase()
73
- })));
74
- function B(e, t) {
75
- b("update", { [e]: t });
76
- }
77
- return (f, p) => (t(), o(c, null, [
78
- s(_, { label: u(x).countdown.targetDate }, {
79
- default: a(() => [d("input", {
80
- type: "datetime-local",
81
- class: e(u(h)),
82
- value: i.block.targetDate,
83
- onInput: p[0] ||= (e) => B("targetDate", e.target.value)
84
- }, null, 42, C)]),
85
- _: 1
86
- }, 8, ["label"]),
87
- s(_, { label: u(x).countdown.timezone }, {
88
- default: a(() => [d("select", {
89
- class: e(u(h)),
90
- value: i.block.timezone,
91
- onChange: p[1] ||= (e) => B("timezone", e.target.value)
92
- }, [(t(), o(c, null, r(I, (e) => d("option", {
93
- key: e,
94
- value: e
95
- }, n(e), 9, T)), 64))], 42, w)]),
96
- _: 1
97
- }, 8, ["label"]),
98
- s(_, { label: u(x).countdown.display }, {
99
- default: a(() => [d("div", E, [(t(!0), o(c, null, r(z.value, (e) => (t(), l(S, {
100
- key: e.unit,
101
- "model-value": i.block[e.showKey],
102
- label: u(x).countdown[e.translationKey],
103
- "onUpdate:modelValue": (t) => B(e.showKey, t)
104
- }, null, 8, [
105
- "model-value",
106
- "label",
107
- "onUpdate:modelValue"
108
- ]))), 128))])]),
109
- _: 1
110
- }, 8, ["label"]),
111
- s(_, { label: u(x).countdown.separator }, {
112
- default: a(() => [s(v, {
113
- options: L,
114
- "model-value": i.block.separator,
115
- "onUpdate:modelValue": p[2] ||= (e) => B("separator", e)
116
- }, null, 8, ["model-value"])]),
117
- _: 1
118
- }, 8, ["label"]),
119
- s(_, { label: u(x).countdown.fontFamily }, {
120
- default: a(() => [d("select", {
121
- class: e(u(h)),
122
- value: i.block.fontFamily || "",
123
- onChange: p[3] ||= (e) => B("fontFamily", e.target.value || void 0)
124
- }, [d("option", O, n(u(x).countdown.inheritFont), 1), (t(!0), o(c, null, r(i.fontFamilies, (e) => (t(), o("option", {
125
- key: e.value,
126
- value: e.value
127
- }, n(e.label), 9, k))), 128))], 42, D)]),
128
- _: 1
129
- }, 8, ["label"]),
130
- d("div", A, [s(_, { label: u(x).countdown.digitFontSize }, {
131
- default: a(() => [s(y, {
132
- "model-value": i.block.digitFontSize,
133
- min: 12,
134
- max: 72,
135
- suffix: "px",
136
- "onUpdate:modelValue": p[4] ||= (e) => B("digitFontSize", e)
137
- }, null, 8, ["model-value"])]),
138
- _: 1
139
- }, 8, ["label"]), s(_, { label: u(x).countdown.labelFontSize }, {
140
- default: a(() => [s(y, {
141
- "model-value": i.block.labelFontSize,
142
- min: 8,
143
- max: 24,
144
- suffix: "px",
145
- "onUpdate:modelValue": p[5] ||= (e) => B("labelFontSize", e)
146
- }, null, 8, ["model-value"])]),
147
- _: 1
148
- }, 8, ["label"])]),
149
- d("div", j, [s(_, { label: u(x).countdown.digitColor }, {
150
- default: a(() => [s(g, {
151
- "model-value": i.block.digitColor,
152
- "onUpdate:modelValue": p[6] ||= (e) => B("digitColor", e)
153
- }, null, 8, ["model-value"])]),
154
- _: 1
155
- }, 8, ["label"]), s(_, { label: u(x).countdown.labelColor }, {
156
- default: a(() => [s(g, {
157
- "model-value": i.block.labelColor,
158
- "onUpdate:modelValue": p[7] ||= (e) => B("labelColor", e)
159
- }, null, 8, ["model-value"])]),
160
- _: 1
161
- }, 8, ["label"])]),
162
- s(_, { label: u(x).countdown.background }, {
163
- default: a(() => [s(g, {
164
- "model-value": i.block.backgroundColor,
165
- "onUpdate:modelValue": p[8] ||= (e) => B("backgroundColor", e)
166
- }, null, 8, ["model-value"])]),
167
- _: 1
168
- }, 8, ["label"]),
169
- s(_, { label: u(x).countdown.labels }, {
170
- default: a(() => [d("div", M, [(t(!0), o(c, null, r(z.value, (n) => (t(), o("input", {
171
- key: n.unit,
172
- type: "text",
173
- class: e(u(h)),
174
- value: i.block[n.labelKey],
175
- placeholder: u(x).countdown[n.translationKey],
176
- onInput: (e) => B(n.labelKey, e.target.value)
177
- }, null, 42, N))), 128))])]),
178
- _: 1
179
- }, 8, ["label"]),
180
- s(_, { label: u(x).countdown.expiry }, {
181
- default: a(() => [d("input", {
182
- type: "text",
183
- class: e(u(h)),
184
- value: i.block.expiredMessage,
185
- placeholder: u(x).countdown.expiredMessagePlaceholder,
186
- onInput: p[9] ||= (e) => B("expiredMessage", e.target.value)
187
- }, null, 42, P)]),
188
- _: 1
189
- }, 8, ["label"]),
190
- s(_, { label: u(x).countdown.expiredImageUrl }, {
191
- default: a(() => [d("input", {
192
- type: "url",
193
- class: e(u(h)),
194
- value: i.block.expiredImageUrl,
195
- placeholder: "https://...",
196
- onInput: p[10] ||= (e) => B("expiredImageUrl", e.target.value)
197
- }, null, 42, F)]),
198
- _: 1
199
- }, 8, ["label"]),
200
- s(S, {
201
- "model-value": i.block.hideOnExpiry,
202
- label: u(x).countdown.hideOnExpiry,
203
- class: "tpl:mb-3.5",
204
- "onUpdate:modelValue": p[11] ||= (e) => B("hideOnExpiry", e)
205
- }, null, 8, ["model-value", "label"])
206
- ], 64));
207
- }
208
- });
209
- //#endregion
210
- export { I as default };
@@ -1,106 +0,0 @@
1
- import { E as e, I as t, L as n, M as r, Ot as i, P as a, S as o, _ as s, d as c, h as l, it as u, m as d, p as f } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import { N as p, _ as m, a as h, f as g, g as _, h as v, i as y, m as b, n as x, p as S, r as C, u as w, v as T, y as E } from "./useEditorCore-C6ost42Q.js";
3
- import { s as D } from "./keys-ciNfSSGj.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__ */ o({
6
- name: "PreviewSectionBlock",
7
- __name: "PreviewSectionBlock",
8
- props: {
9
- block: {},
10
- viewport: {}
11
- },
12
- setup(o) {
13
- let A = {
14
- title: w,
15
- paragraph: b,
16
- image: _,
17
- video: x,
18
- button: p,
19
- divider: T,
20
- social: h,
21
- menu: v,
22
- table: C,
23
- spacer: y,
24
- html: m,
25
- custom: E
26
- }, j = o, M = e(D, null), N = f(() => {
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 = f(() => {
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 S(e, M, A);
48
- }
49
- return (e, o) => {
50
- let f = t("PreviewSectionBlock", !0);
51
- return r(), s("div", O, [d("div", k, [(r(!0), s(c, null, a(P.value, (e, t) => (r(), s("div", {
52
- key: t,
53
- style: i({ width: N.value[t] })
54
- }, [(r(!0), s(c, null, a(F(t), (e) => (r(), s("div", {
55
- key: e.id,
56
- style: i(u(g)(e))
57
- }, [e.type === "section" ? (r(), l(f, {
58
- key: 0,
59
- block: e,
60
- viewport: "desktop"
61
- }, null, 8, ["block"])) : (r(), l(n(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__ */ o({
75
- __name: "ModulePreviewCanvas",
76
- props: { blocks: {} },
77
- setup(t) {
78
- let o = e(D), d = {
79
- section: A,
80
- title: w,
81
- paragraph: b,
82
- image: _,
83
- video: x,
84
- button: p,
85
- divider: T,
86
- social: h,
87
- menu: v,
88
- table: C,
89
- spacer: y,
90
- html: m,
91
- custom: E
92
- };
93
- function f(e) {
94
- return S(e, o, d);
95
- }
96
- return (e, o) => (r(), s("div", j, [(r(!0), s(c, null, a(t.blocks, (e) => (r(), s("div", {
97
- key: e.id,
98
- style: i(u(g)(e))
99
- }, [(r(), l(n(f(e)), {
100
- block: e,
101
- viewport: "desktop"
102
- }, null, 8, ["block"]))], 4))), 128))]));
103
- }
104
- });
105
- //#endregion
106
- export { M as default };
@@ -1 +0,0 @@
1
- {"version":3,"file":"AiFeatureMenu-qEdB2fZJ.js","names":[],"sources":["../../../src/cloud/components/AiFeatureMenu.vue","../../../src/cloud/components/AiFeatureMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { AI_CONFIG_KEY, requireInject } from \"../../keys\";\nimport type { AiConfig } from \"@templatical/types\";\nimport { ImageUp, ShieldCheck, Sparkles } from \"@lucide/vue\";\nimport { computed } from \"vue\";\n\nexport type AiFeature = \"ai-chat\" | \"design-reference\" | \"scoring\";\n\ndefineProps<{\n activeFeature: AiFeature | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"select\", feature: AiFeature): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst aiConfig = requireInject(AI_CONFIG_KEY, \"AiFeatureMenu\");\n\nconst configKeyMap: Record<AiFeature, keyof AiConfig> = {\n \"ai-chat\": \"chat\",\n \"design-reference\": \"designToTemplate\",\n scoring: \"scoring\",\n};\n\nconst allFeatures: { key: AiFeature; icon: typeof Sparkles }[] = [\n { key: \"ai-chat\", icon: Sparkles },\n { key: \"design-reference\", icon: ImageUp },\n { key: \"scoring\", icon: ShieldCheck },\n];\n\nconst features = computed(() =>\n allFeatures.filter((f) => aiConfig.isFeatureEnabled(configKeyMap[f.key])),\n);\n\nfunction getTitle(key: AiFeature): string {\n if (key === \"ai-chat\") return cloudT.aiMenu.aiAssistant;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplate;\n return cloudT.aiMenu.templateScore;\n}\n\nfunction getDescription(key: AiFeature): string {\n if (key === \"ai-chat\") return cloudT.aiMenu.aiAssistantDesc;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplateDesc;\n return cloudT.aiMenu.templateScoreDesc;\n}\n</script>\n\n<template>\n <div\n class=\"tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px)\"\n >\n <button\n v-for=\"feature in features\"\n :key=\"feature.key\"\n class=\"tpl-ai-feature-menu-item tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-start tpl:gap-3 tpl:border-none tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary-light)'\n : 'transparent',\n }\"\n @click=\"emit('select', feature.key)\"\n >\n <div\n class=\"tpl:mt-0.5 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)]\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary)'\n : 'var(--tpl-bg-active)',\n color:\n activeFeature === feature.key\n ? 'var(--tpl-bg)'\n : 'var(--tpl-text-muted)',\n }\"\n >\n <component :is=\"feature.icon\" :size=\"15\" :stroke-width=\"2\" />\n </div>\n <div class=\"tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5\">\n <span class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]\">\n {{ getTitle(feature.key) }}\n </span>\n <span\n class=\"tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ getDescription(feature.key) }}\n </span>\n </div>\n </button>\n </div>\n</template>\n\n<style scoped>\n.tpl-ai-feature-menu-item:hover {\n background-color: var(--tpl-bg-hover) !important;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useCloudI18nStrict } from \"../../composables\";\nimport { AI_CONFIG_KEY, requireInject } from \"../../keys\";\nimport type { AiConfig } from \"@templatical/types\";\nimport { ImageUp, ShieldCheck, Sparkles } from \"@lucide/vue\";\nimport { computed } from \"vue\";\n\nexport type AiFeature = \"ai-chat\" | \"design-reference\" | \"scoring\";\n\ndefineProps<{\n activeFeature: AiFeature | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"select\", feature: AiFeature): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nconst aiConfig = requireInject(AI_CONFIG_KEY, \"AiFeatureMenu\");\n\nconst configKeyMap: Record<AiFeature, keyof AiConfig> = {\n \"ai-chat\": \"chat\",\n \"design-reference\": \"designToTemplate\",\n scoring: \"scoring\",\n};\n\nconst allFeatures: { key: AiFeature; icon: typeof Sparkles }[] = [\n { key: \"ai-chat\", icon: Sparkles },\n { key: \"design-reference\", icon: ImageUp },\n { key: \"scoring\", icon: ShieldCheck },\n];\n\nconst features = computed(() =>\n allFeatures.filter((f) => aiConfig.isFeatureEnabled(configKeyMap[f.key])),\n);\n\nfunction getTitle(key: AiFeature): string {\n if (key === \"ai-chat\") return cloudT.aiMenu.aiAssistant;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplate;\n return cloudT.aiMenu.templateScore;\n}\n\nfunction getDescription(key: AiFeature): string {\n if (key === \"ai-chat\") return cloudT.aiMenu.aiAssistantDesc;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplateDesc;\n return cloudT.aiMenu.templateScoreDesc;\n}\n</script>\n\n<template>\n <div\n class=\"tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px)\"\n >\n <button\n v-for=\"feature in features\"\n :key=\"feature.key\"\n class=\"tpl-ai-feature-menu-item tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-start tpl:gap-3 tpl:border-none tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary-light)'\n : 'transparent',\n }\"\n @click=\"emit('select', feature.key)\"\n >\n <div\n class=\"tpl:mt-0.5 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)]\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary)'\n : 'var(--tpl-bg-active)',\n color:\n activeFeature === feature.key\n ? 'var(--tpl-bg)'\n : 'var(--tpl-text-muted)',\n }\"\n >\n <component :is=\"feature.icon\" :size=\"15\" :stroke-width=\"2\" />\n </div>\n <div class=\"tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5\">\n <span class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]\">\n {{ getTitle(feature.key) }}\n </span>\n <span\n class=\"tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ getDescription(feature.key) }}\n </span>\n </div>\n </button>\n </div>\n</template>\n\n<style scoped>\n.tpl-ai-feature-menu-item:hover {\n background-color: var(--tpl-bg-hover) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAaA,IAAM,IAAO,GAIP,EAAE,GAAG,MAAW,GAAoB,EAEpC,IAAW,EAAc,GAAe,gBAAgB,EAExD,IAAkD;GACtD,WAAW;GACX,oBAAoB;GACpB,SAAS;GACV,EAEK,IAA2D;GAC/D;IAAE,KAAK;IAAW,MAAM;IAAU;GAClC;IAAE,KAAK;IAAoB,MAAM;IAAS;GAC1C;IAAE,KAAK;IAAW,MAAM;IAAa;GACtC,EAEK,IAAW,QACf,EAAY,QAAQ,MAAM,EAAS,iBAAiB,EAAa,EAAE,KAAK,CAAC,CAC1E;EAED,SAAS,EAAS,GAAwB;AAGxC,UAFI,MAAQ,YAAkB,EAAO,OAAO,cACxC,MAAQ,qBAA2B,EAAO,OAAO,mBAC9C,EAAO,OAAO;;EAGvB,SAAS,EAAe,GAAwB;AAG9C,UAFI,MAAQ,YAAkB,EAAO,OAAO,kBACxC,MAAQ,qBAA2B,EAAO,OAAO,uBAC9C,EAAO,OAAO;;yBAKrB,EA0CM,OA1CN,GA0CM,EAAA,EAAA,GAAA,EAtCJ,EAqCS,GAAA,MAAA,EApCW,EAAA,QAAX,YADT,EAqCS,UAAA;GAnCN,KAAK,EAAQ;GACd,OAAM;GACL,OAAK,EAAA,EAAA,iBAAuC,EAAA,kBAAkB,EAAQ,MAAA,6BAAA,eAAA,CAAA;GAMtE,UAAK,MAAE,EAAI,UAAW,EAAQ,IAAG;MAElC,EAcM,OAAA;GAbJ,OAAM;GACL,OAAK,EAAA;qBAA2C,EAAA,kBAAkB,EAAQ,MAAA,uBAAA;WAA8G,EAAA,kBAAkB,EAAQ,MAAA,kBAAA;;YAWnN,EAA6D,EAA7C,EAAQ,KAAI,EAAA;GAAG,MAAM;GAAK,gBAAc;YAE1D,EASM,OATN,GASM,CARJ,EAEO,QAFP,GAEO,EADF,EAAS,EAAQ,IAAG,CAAA,EAAA,EAAA,EAEzB,EAIO,QAJP,GAIO,EADF,EAAe,EAAQ,IAAG,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,IAAA,EAAA"}