@aswin.dev/editor 0.7.0 → 0.7.1

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 (169) hide show
  1. package/README.md +3 -3
  2. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-COL6Wm7p.js} +37 -37
  3. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DWGPVtvC.js} +68 -68
  4. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-duUFSfDf.js} +22 -22
  5. package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-Qs6HtXid.js} +12 -12
  6. package/dist/CloudEditor-CFldoCOb.js +1207 -0
  7. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bw-lbt61.js} +21 -21
  8. package/dist/CommentsSidebar-BaD5F53-.js +436 -0
  9. package/dist/CountdownBlock-DaYGxKqo.js +92 -0
  10. package/dist/CountdownToolbar-Dg4F8MTk.js +210 -0
  11. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-BSH7uNP_.js} +58 -58
  12. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-Ba2pfF57.js} +2 -2
  13. package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-6phxZSKI.js} +80 -80
  14. package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
  15. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-BpUzQOJt.js} +87 -87
  16. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DNSzAB-I.js} +182 -182
  17. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CrqPQdnk.js} +38 -38
  18. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-zMQTpez7.js} +28 -28
  19. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-Do-A5rYU.js} +45 -50
  20. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-CS7o62zS.js} +75 -75
  21. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-DGj_9V1u.js} +28 -28
  22. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-C7IDnAoS.js} +68 -68
  23. package/dist/{TplModal-BwSfxIHf.js → TplModal-BAsVzcTb.js} +14 -14
  24. package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
  25. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-C6LDKvmd.js} +19 -5
  26. package/dist/bundle-stats.json +7 -7
  27. package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
  28. package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
  29. package/dist/chevron-right-BqCptpdp.js +10 -0
  30. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
  31. package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
  32. package/dist/{cloud-DEk_b4CR.js → cloud-6ZmAvF0j.js} +485 -427
  33. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
  34. package/dist/{de-Brqvgr43.js → de-DWcgp-7T.js} +209 -1
  35. package/dist/{dist-BaQIYPsn.js → dist-BUzw1buG.js} +1 -1
  36. package/dist/{dist-DjviJBCi.js → dist-BZyY-SS4.js} +1 -1
  37. package/dist/{dist-D6uC2xhi.js → dist-BadNx4qo.js} +1 -1
  38. package/dist/{dist-aRzjfSRN.js → dist-BesOh2mk.js} +1 -1
  39. package/dist/{dist-D90y8dvT.js → dist-Bz3M4RXG.js} +3 -3
  40. package/dist/dist-C04s_fLA.js +563 -0
  41. package/dist/{dist-DDJIWTRY.js → dist-C3T2AKtB.js} +1 -1
  42. package/dist/{dist-BFawx6IS.js → dist-C9ckKEZL.js} +51 -51
  43. package/dist/{dist-us-RpCWN.js → dist-CBItRG-Z.js} +1 -1
  44. package/dist/{dist-wzMIGj-D.js → dist-COSzWQUs.js} +1 -1
  45. package/dist/dist-CivF9P8b.js +382 -0
  46. package/dist/{dist-Cp0zXPAD.js → dist-DtiDUrX-.js} +1 -1
  47. package/dist/{dist-KoBJjK1G.js → dist-Dzt5foyL.js} +1 -1
  48. package/dist/{en-WDVp87TE.js → en-Cxd4fhNm.js} +209 -1
  49. package/dist/{extensions-CUcl9Ok4.js → extensions-D__hOlV1.js} +106 -106
  50. package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
  51. package/dist/index.d.ts +88 -11
  52. package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
  53. package/dist/keys-CvX8D-8C.js +10 -0
  54. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
  55. package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
  56. package/dist/pencil-BZJPNYWR.js +10 -0
  57. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
  58. package/dist/{scan-line-D0vcUekt.js → scan-line-CzfFJO1o.js} +1 -1
  59. package/dist/{send-DH4oDQqC.js → send-D2eSo4GH.js} +1 -1
  60. package/dist/{shield-check-CfJgs2Hd.js → shield-check-jkpgcC0-.js} +1 -1
  61. package/dist/{sparkles-CvRXGqFs.js → sparkles-Chm5CZfb.js} +1 -1
  62. package/dist/style.css +1 -1
  63. package/dist/styleConstants-34eUKPOZ.js +55 -0
  64. package/dist/styles-B4tjX5SP.js +5224 -0
  65. package/dist/templatical-editor.js +189 -126
  66. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-CzBnJsW8.js} +1 -1
  67. package/dist/{trash-2-DbP2Y6t2.js → trash-2-CtK2apEH.js} +1 -1
  68. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-KpDVNbpn.js} +1 -1
  69. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-DOKSZql1.js} +2 -2
  70. package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-wslttMH-.js} +2425 -2250
  71. package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
  72. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-DX0XG5V9.js} +5 -5
  73. package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
  74. package/dist/{x-u2oVmjN_.js → x-BkaOMosX.js} +1 -1
  75. package/package.json +10 -10
  76. package/dist/CloudEditor-BCz1ZTYC.js +0 -1172
  77. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  78. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  79. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  80. package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
  81. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +0 -97
  82. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +0 -1
  83. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +0 -59
  84. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
  85. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +0 -33
  86. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +0 -1
  87. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
  88. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
  89. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +0 -51
  90. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
  91. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
  92. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
  93. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  94. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
  95. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
  96. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
  97. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
  98. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
  99. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +0 -423
  100. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +0 -1
  101. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +0 -544
  102. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +0 -1
  103. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +0 -106
  104. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +0 -1
  105. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +0 -119
  106. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
  107. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +0 -171
  108. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
  109. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
  110. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
  111. package/dist/cdn/chunks/de-Ce-LbJ2J.js +0 -89
  112. package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +0 -1
  113. package/dist/cdn/chunks/de-D8CnZxV9.js +0 -523
  114. package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
  115. package/dist/cdn/chunks/de-RQrZR56a.js +0 -209
  116. package/dist/cdn/chunks/de-RQrZR56a.js.map +0 -1
  117. package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
  118. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
  119. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +0 -19
  120. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +0 -1
  121. package/dist/cdn/chunks/en-8FHaQv4V.js +0 -523
  122. package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
  123. package/dist/cdn/chunks/en-Bl1ecfRF.js +0 -209
  124. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +0 -1
  125. package/dist/cdn/chunks/en-DiCWK5fG.js +0 -89
  126. package/dist/cdn/chunks/en-DiCWK5fG.js.map +0 -1
  127. package/dist/cdn/chunks/extensions-DIxF31tA.js +0 -598
  128. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
  129. package/dist/cdn/chunks/features-DEMb13KS.js +0 -6814
  130. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  131. package/dist/cdn/chunks/icons-CsLTcirh.js +0 -700
  132. package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
  133. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +0 -3279
  134. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +0 -1
  135. package/dist/cdn/chunks/media-library-CVaNvhpM.js +0 -6014
  136. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
  137. package/dist/cdn/chunks/pusher-CDbNlZBE.js +0 -2508
  138. package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +0 -1
  139. package/dist/cdn/chunks/quality-BaBfc54_.js +0 -1456
  140. package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
  141. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +0 -32
  142. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +0 -1
  143. package/dist/cdn/chunks/renderer-CUxvx7ro.js +0 -548
  144. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
  145. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
  146. package/dist/cdn/chunks/src-CRaqN-p8.js +0 -497
  147. package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
  148. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
  149. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
  150. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  151. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  152. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +0 -14654
  153. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +0 -1
  154. package/dist/cdn/editor.css +0 -2
  155. package/dist/cdn/editor.js +0 -250
  156. package/dist/cdn/editor.js.map +0 -1
  157. package/dist/dist-B1IR0bpH.js +0 -326
  158. package/dist/dist-DJmnUmW9.js +0 -362
  159. package/dist/keys-ciNfSSGj.js +0 -10
  160. package/dist/styleConstants-fWzlIIwN.js +0 -55
  161. package/dist/styles-DEXEkBvg.js +0 -3176
  162. /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-BVAJ4lgT.js} +0 -0
  163. /package/dist/{de-DCaaCE5s.js → de-GOtR9DwW.js} +0 -0
  164. /package/dist/{dist-iLBdeBDR.js → dist-DXa1uAMh.js} +0 -0
  165. /package/dist/{emojiData-PQyVa4bU.js → emojiData-DrBuvEoP.js} +0 -0
  166. /package/dist/{en-DXCyK4-X.js → en-dFFQVzNn.js} +0 -0
  167. /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-BhhO8yCl.js} +0 -0
  168. /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-BvCyLQII.js} +0 -0
  169. /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-DVuzNX1y.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,97 +0,0 @@
1
- import { E as e, F as t, N as n, R as r, S as i, _ as a, at as o, b as s, d as c, g as l, h as u, lt as d, m as f, p, st as m, y as h } from "./draggable-Bcb86AsV.js";
2
- import { Kt as g, Nt as _, Pt as v, Tt as y, _t as b, at as x } from "./features-DEMb13KS.js";
3
- import { Q as S, Z as C, t as w } from "./icons-CsLTcirh.js";
4
- //#region src/components/sidebar/AccessibilityPanel.vue?vue&type=script&setup=true&lang.ts
5
- var T = { class: "tpl:flex tpl:flex-col tpl:gap-4 tpl:p-4" }, E = { class: "tpl:flex tpl:items-center tpl:gap-2" }, D = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, O = ["title"], k = {
6
- key: 0,
7
- class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
8
- }, A = {
9
- key: 1,
10
- class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
11
- }, j = { class: "tpl:ml-auto tpl:font-normal tpl:opacity-70" }, M = {
12
- key: 1,
13
- class: "tpl:m-0 tpl:mb-3 tpl:flex tpl:list-none tpl:flex-col tpl:gap-2 tpl:p-0"
14
- }, N = { class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text)]" }, P = { class: "tpl:m-0 tpl:mb-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, F = { class: "tpl:flex tpl:gap-1.5" }, I = ["onClick"], L = ["title", "onClick"], R = /* @__PURE__ */ i({
15
- __name: "AccessibilityPanel",
16
- setup(i) {
17
- let { t: R, format: z } = _(), B = e(v, null), V = e(g, null), H = p(() => (B?.issues.value ?? []).filter((e) => e.severity === "error")), U = p(() => (B?.issues.value ?? []).filter((e) => e.severity === "warning")), W = p(() => (B?.issues.value ?? []).filter((e) => e.severity === "info")), G = p(() => H.value.length + U.value.length + W.value.length);
18
- function K(e) {
19
- V && e.blockId && V.selectBlock(e.blockId);
20
- }
21
- function q(e) {
22
- B?.applyFix(e);
23
- }
24
- return (e, i) => (n(), a("div", T, [f("header", E, [
25
- s(o(S), {
26
- size: 16,
27
- "stroke-width": 1.5
28
- }),
29
- f("h3", D, d(o(R).accessibility.panelTitle), 1),
30
- G.value > 0 ? (n(), a("span", {
31
- key: 0,
32
- class: "tpl:ml-auto tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-0.5 tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]",
33
- title: o(z)(o(R).accessibility.issueCountTooltip, { count: G.value })
34
- }, d(G.value), 9, O)) : l("", !0)
35
- ]), !o(B) || o(B).unavailable.value ? (n(), a("div", k)) : G.value === 0 ? (n(), a("div", A, d(o(R).accessibility.emptyState), 1)) : (n(!0), a(c, { key: 2 }, t([
36
- {
37
- key: "errors",
38
- title: o(R).accessibility.groupErrors,
39
- icon: o(y),
40
- items: H.value,
41
- tone: "tpl:text-[var(--tpl-danger)]"
42
- },
43
- {
44
- key: "warnings",
45
- title: o(R).accessibility.groupWarnings,
46
- icon: o(x),
47
- items: U.value,
48
- tone: "tpl:text-[var(--tpl-warning)]"
49
- },
50
- {
51
- key: "info",
52
- title: o(R).accessibility.groupInfo,
53
- icon: o(b),
54
- items: W.value,
55
- tone: "tpl:text-[var(--tpl-text-muted)]"
56
- }
57
- ], (e) => (n(), a("section", { key: e.key }, [e.items.length > 0 ? (n(), a("header", {
58
- key: 0,
59
- class: m(["tpl:mb-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-[11px] tpl:font-semibold tpl:uppercase tpl:tracking-wide", e.tone])
60
- }, [
61
- (n(), u(r(e.icon), {
62
- size: 12,
63
- "stroke-width": 2
64
- })),
65
- h(" " + d(e.title) + " ", 1),
66
- f("span", j, d(e.items.length), 1)
67
- ], 2)) : l("", !0), e.items.length > 0 ? (n(), a("ul", M, [(n(!0), a(c, null, t(e.items, (e) => (n(), a("li", {
68
- key: `${e.ruleId}-${e.blockId ?? "template"}`,
69
- class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3"
70
- }, [
71
- f("p", N, d(e.message), 1),
72
- f("p", P, d(e.ruleId), 1),
73
- f("div", F, [e.blockId ? (n(), a("button", {
74
- key: 0,
75
- type: "button",
76
- class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text)]",
77
- onClick: (t) => K(e)
78
- }, [s(o(C), {
79
- size: 10,
80
- "stroke-width": 2
81
- }), h(" " + d(o(R).accessibility.jump), 1)], 8, I)) : l("", !0), e.fix ? (n(), a("button", {
82
- key: 1,
83
- type: "button",
84
- class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:bg-[var(--tpl-primary)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-white",
85
- title: e.fix.description,
86
- onClick: (t) => q(e)
87
- }, [s(o(w), {
88
- size: 10,
89
- "stroke-width": 2
90
- }), h(" " + d(o(R).accessibility.fix), 1)], 8, L)) : l("", !0)])
91
- ]))), 128))])) : l("", !0)]))), 128))]));
92
- }
93
- });
94
- //#endregion
95
- export { R as default };
96
-
97
- //# sourceMappingURL=AccessibilityPanel-B6DOjojm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AccessibilityPanel-B6DOjojm.js","names":[],"sources":["../../../src/components/sidebar/AccessibilityPanel.vue","../../../src/components/sidebar/AccessibilityPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport {\n Accessibility,\n AlertCircle,\n AlertTriangle,\n Info,\n ArrowRight,\n Wrench,\n} from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { ACCESSIBILITY_LINT_KEY, EDITOR_KEY } from \"../../keys\";\nimport type { A11yIssue } from \"../../composables/useAccessibilityLint\";\n\nconst { t, format } = useI18n();\nconst lint = inject(ACCESSIBILITY_LINT_KEY, null);\nconst editor = inject(EDITOR_KEY, null);\n\nconst errors = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"error\"),\n);\nconst warnings = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"warning\"),\n);\nconst infos = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"info\"),\n);\n\nconst totalCount = computed(\n () => errors.value.length + warnings.value.length + infos.value.length,\n);\n\nfunction jumpTo(issue: A11yIssue): void {\n if (!editor) return;\n if (issue.blockId) editor.selectBlock(issue.blockId);\n}\n\nfunction applyFix(issue: A11yIssue): void {\n lint?.applyFix(issue);\n}\n</script>\n\n<template>\n <div class=\"tpl:flex tpl:flex-col tpl:gap-4 tpl:p-4\">\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <Accessibility :size=\"16\" :stroke-width=\"1.5\" />\n <h3\n class=\"tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ t.accessibility.panelTitle }}\n </h3>\n <span\n v-if=\"totalCount > 0\"\n class=\"tpl:ml-auto tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-0.5 tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"\n format(t.accessibility.issueCountTooltip, { count: totalCount })\n \"\n >\n {{ totalCount }}\n </span>\n </header>\n\n <div\n v-if=\"!lint || lint.unavailable.value\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <!-- Quality package not available; render nothing visible beyond a hint. -->\n </div>\n\n <div\n v-else-if=\"totalCount === 0\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.accessibility.emptyState }}\n </div>\n\n <template v-else>\n <section\n v-for=\"group in [\n {\n key: 'errors',\n title: t.accessibility.groupErrors,\n icon: AlertCircle,\n items: errors,\n tone: 'tpl:text-[var(--tpl-danger)]',\n },\n {\n key: 'warnings',\n title: t.accessibility.groupWarnings,\n icon: AlertTriangle,\n items: warnings,\n tone: 'tpl:text-[var(--tpl-warning)]',\n },\n {\n key: 'info',\n title: t.accessibility.groupInfo,\n icon: Info,\n items: infos,\n tone: 'tpl:text-[var(--tpl-text-muted)]',\n },\n ]\"\n :key=\"group.key\"\n >\n <header\n v-if=\"group.items.length > 0\"\n class=\"tpl:mb-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-[11px] tpl:font-semibold tpl:uppercase tpl:tracking-wide\"\n :class=\"group.tone\"\n >\n <component :is=\"group.icon\" :size=\"12\" :stroke-width=\"2\" />\n {{ group.title }}\n <span class=\"tpl:ml-auto tpl:font-normal tpl:opacity-70\">\n {{ group.items.length }}\n </span>\n </header>\n <ul\n v-if=\"group.items.length > 0\"\n class=\"tpl:m-0 tpl:mb-3 tpl:flex tpl:list-none tpl:flex-col tpl:gap-2 tpl:p-0\"\n >\n <li\n v-for=\"issue in group.items\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3\"\n >\n <p class=\"tpl:m-0 tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </p>\n <p\n class=\"tpl:m-0 tpl:mb-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </p>\n <div class=\"tpl:flex tpl:gap-1.5\">\n <button\n v-if=\"issue.blockId\"\n type=\"button\"\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text)]\"\n @click=\"jumpTo(issue)\"\n >\n <ArrowRight :size=\"10\" :stroke-width=\"2\" />\n {{ t.accessibility.jump }}\n </button>\n <button\n v-if=\"issue.fix\"\n type=\"button\"\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:bg-[var(--tpl-primary)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-white\"\n :title=\"issue.fix.description\"\n @click=\"applyFix(issue)\"\n >\n <Wrench :size=\"10\" :stroke-width=\"2\" />\n {{ t.accessibility.fix }}\n </button>\n </div>\n </li>\n </ul>\n </section>\n </template>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport {\n Accessibility,\n AlertCircle,\n AlertTriangle,\n Info,\n ArrowRight,\n Wrench,\n} from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { ACCESSIBILITY_LINT_KEY, EDITOR_KEY } from \"../../keys\";\nimport type { A11yIssue } from \"../../composables/useAccessibilityLint\";\n\nconst { t, format } = useI18n();\nconst lint = inject(ACCESSIBILITY_LINT_KEY, null);\nconst editor = inject(EDITOR_KEY, null);\n\nconst errors = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"error\"),\n);\nconst warnings = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"warning\"),\n);\nconst infos = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"info\"),\n);\n\nconst totalCount = computed(\n () => errors.value.length + warnings.value.length + infos.value.length,\n);\n\nfunction jumpTo(issue: A11yIssue): void {\n if (!editor) return;\n if (issue.blockId) editor.selectBlock(issue.blockId);\n}\n\nfunction applyFix(issue: A11yIssue): void {\n lint?.applyFix(issue);\n}\n</script>\n\n<template>\n <div class=\"tpl:flex tpl:flex-col tpl:gap-4 tpl:p-4\">\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <Accessibility :size=\"16\" :stroke-width=\"1.5\" />\n <h3\n class=\"tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ t.accessibility.panelTitle }}\n </h3>\n <span\n v-if=\"totalCount > 0\"\n class=\"tpl:ml-auto tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-0.5 tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"\n format(t.accessibility.issueCountTooltip, { count: totalCount })\n \"\n >\n {{ totalCount }}\n </span>\n </header>\n\n <div\n v-if=\"!lint || lint.unavailable.value\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <!-- Quality package not available; render nothing visible beyond a hint. -->\n </div>\n\n <div\n v-else-if=\"totalCount === 0\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.accessibility.emptyState }}\n </div>\n\n <template v-else>\n <section\n v-for=\"group in [\n {\n key: 'errors',\n title: t.accessibility.groupErrors,\n icon: AlertCircle,\n items: errors,\n tone: 'tpl:text-[var(--tpl-danger)]',\n },\n {\n key: 'warnings',\n title: t.accessibility.groupWarnings,\n icon: AlertTriangle,\n items: warnings,\n tone: 'tpl:text-[var(--tpl-warning)]',\n },\n {\n key: 'info',\n title: t.accessibility.groupInfo,\n icon: Info,\n items: infos,\n tone: 'tpl:text-[var(--tpl-text-muted)]',\n },\n ]\"\n :key=\"group.key\"\n >\n <header\n v-if=\"group.items.length > 0\"\n class=\"tpl:mb-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-[11px] tpl:font-semibold tpl:uppercase tpl:tracking-wide\"\n :class=\"group.tone\"\n >\n <component :is=\"group.icon\" :size=\"12\" :stroke-width=\"2\" />\n {{ group.title }}\n <span class=\"tpl:ml-auto tpl:font-normal tpl:opacity-70\">\n {{ group.items.length }}\n </span>\n </header>\n <ul\n v-if=\"group.items.length > 0\"\n class=\"tpl:m-0 tpl:mb-3 tpl:flex tpl:list-none tpl:flex-col tpl:gap-2 tpl:p-0\"\n >\n <li\n v-for=\"issue in group.items\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3\"\n >\n <p class=\"tpl:m-0 tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </p>\n <p\n class=\"tpl:m-0 tpl:mb-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </p>\n <div class=\"tpl:flex tpl:gap-1.5\">\n <button\n v-if=\"issue.blockId\"\n type=\"button\"\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text)]\"\n @click=\"jumpTo(issue)\"\n >\n <ArrowRight :size=\"10\" :stroke-width=\"2\" />\n {{ t.accessibility.jump }}\n </button>\n <button\n v-if=\"issue.fix\"\n type=\"button\"\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:bg-[var(--tpl-primary)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-white\"\n :title=\"issue.fix.description\"\n @click=\"applyFix(issue)\"\n >\n <Wrench :size=\"10\" :stroke-width=\"2\" />\n {{ t.accessibility.fix }}\n </button>\n </div>\n </li>\n </ul>\n </section>\n </template>\n </div>\n</template>\n"],"mappings":"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"}
@@ -1,59 +0,0 @@
1
- import { F as e, N as t, R as n, S as r, _ as i, ct as a, d as o, h as s, lt as c, m as l, p as u } from "./draggable-Bcb86AsV.js";
2
- import { $ as d, Ft as f, ct as p, en as m, lt as h, tt as g, yt as _ } from "./features-DEMb13KS.js";
3
- //#region src/cloud/components/AiFeatureMenu.vue?vue&type=script&setup=true&lang.ts
4
- var v = {
5
- 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)]",
6
- style: {
7
- "backdrop-filter": "blur(8px)",
8
- "-webkit-backdrop-filter": "blur(8px)"
9
- }
10
- }, y = ["onClick"], b = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, x = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, S = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]" }, C = /* @__PURE__ */ g(/* @__PURE__ */ r({
11
- __name: "AiFeatureMenu",
12
- props: { activeFeature: {} },
13
- emits: ["select"],
14
- setup(r, { emit: g }) {
15
- let C = g, { t: w } = d(), T = m(f, "AiFeatureMenu"), E = {
16
- "ai-chat": "chat",
17
- "design-reference": "designToTemplate",
18
- scoring: "scoring"
19
- }, D = [
20
- {
21
- key: "ai-chat",
22
- icon: p
23
- },
24
- {
25
- key: "design-reference",
26
- icon: _
27
- },
28
- {
29
- key: "scoring",
30
- icon: h
31
- }
32
- ], O = u(() => D.filter((e) => T.isFeatureEnabled(E[e.key])));
33
- function k(e) {
34
- return e === "ai-chat" ? w.aiMenu.aiAssistant : e === "design-reference" ? w.aiMenu.designToTemplate : w.aiMenu.templateScore;
35
- }
36
- function A(e) {
37
- return e === "ai-chat" ? w.aiMenu.aiAssistantDesc : e === "design-reference" ? w.aiMenu.designToTemplateDesc : w.aiMenu.templateScoreDesc;
38
- }
39
- return (u, d) => (t(), i("div", v, [(t(!0), i(o, null, e(O.value, (e) => (t(), i("button", {
40
- key: e.key,
41
- 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",
42
- style: a({ backgroundColor: r.activeFeature === e.key ? "var(--tpl-primary-light)" : "transparent" }),
43
- onClick: (t) => C("select", e.key)
44
- }, [l("div", {
45
- 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)]",
46
- style: a({
47
- backgroundColor: r.activeFeature === e.key ? "var(--tpl-primary)" : "var(--tpl-bg-active)",
48
- color: r.activeFeature === e.key ? "var(--tpl-bg)" : "var(--tpl-text-muted)"
49
- })
50
- }, [(t(), s(n(e.icon), {
51
- size: 15,
52
- "stroke-width": 2
53
- }))], 4), l("div", b, [l("span", x, c(k(e.key)), 1), l("span", S, c(A(e.key)), 1)])], 12, y))), 128))]));
54
- }
55
- }), [["__scopeId", "data-v-07839fa3"]]);
56
- //#endregion
57
- export { C as default };
58
-
59
- //# sourceMappingURL=AiFeatureMenu-qEdB2fZJ.js.map
@@ -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"}
@@ -1,33 +0,0 @@
1
- import { E as e, N as t, S as n, _ as r, at as i, g as a, h as o, p as s, st as c } from "./draggable-Bcb86AsV.js";
2
- import { Nt as l, Pt as u, Tt as d, at as f } from "./features-DEMb13KS.js";
3
- //#region src/components/canvas/BlockA11yBadge.vue?vue&type=script&setup=true&lang.ts
4
- var p = ["title", "aria-label"], m = /* @__PURE__ */ n({
5
- __name: "BlockA11yBadge",
6
- props: { blockId: {} },
7
- setup(n) {
8
- let m = n, { t: h } = l(), g = e(u, null), _ = s(() => (g?.issues.value ?? []).filter((e) => e.blockId === m.blockId)), v = s(() => _.value.some((e) => e.severity === "error") ? "error" : _.value.some((e) => e.severity === "warning") ? "warning" : null), y = s(() => v.value === "error" ? h.accessibility.badgeError : h.accessibility.badgeWarning);
9
- return (e, n) => v.value ? (t(), r("span", {
10
- key: 0,
11
- class: c(["tpl:absolute tpl:top-1 tpl:right-1 tpl:z-10 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)] tpl:ring-1 tpl:ring-[var(--tpl-border)]", v.value === "error" ? "tpl:text-[var(--tpl-danger)]" : "tpl:text-[var(--tpl-warning)]"]),
12
- title: y.value,
13
- "aria-label": y.value,
14
- role: "img"
15
- }, [v.value === "error" ? (t(), o(i(d), {
16
- key: 0,
17
- size: 14,
18
- "stroke-width": 2.25,
19
- fill: "currentColor",
20
- stroke: "var(--tpl-bg)"
21
- })) : (t(), o(i(f), {
22
- key: 1,
23
- size: 14,
24
- "stroke-width": 2.25,
25
- fill: "currentColor",
26
- stroke: "var(--tpl-bg)"
27
- }))], 10, p)) : a("", !0);
28
- }
29
- });
30
- //#endregion
31
- export { m as default };
32
-
33
- //# sourceMappingURL=BlockA11yBadge-DcEZftf6.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlockA11yBadge-DcEZftf6.js","names":[],"sources":["../../../src/components/canvas/BlockA11yBadge.vue","../../../src/components/canvas/BlockA11yBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { ACCESSIBILITY_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(ACCESSIBILITY_LINT_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.blockId === props.blockId),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\"\n ? t.accessibility.badgeError\n : t.accessibility.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl:absolute tpl:top-1 tpl:right-1 tpl:z-10 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)] tpl:ring-1 tpl:ring-[var(--tpl-border)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { ACCESSIBILITY_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(ACCESSIBILITY_LINT_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.blockId === props.blockId),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\"\n ? t.accessibility.badgeError\n : t.accessibility.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl:absolute tpl:top-1 tpl:right-1 tpl:z-10 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)] tpl:ring-1 tpl:ring-[var(--tpl-border)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n"],"mappings":";;;;;;;EAMA,IAAM,IAAQ,GACR,EAAE,SAAM,GAAS,EACjB,IAAO,EAAO,GAAwB,KAAK,EAE3C,IAAc,SACjB,GAAM,OAAO,SAAS,EAAE,EAAE,QAAQ,MAAM,EAAE,YAAY,EAAM,QAAQ,CACtE,EAEK,IAAW,QACX,EAAY,MAAM,MAAM,MAAM,EAAE,aAAa,QAAQ,GAAS,UAC9D,EAAY,MAAM,MAAM,MAAM,EAAE,aAAa,UAAU,GAAS,YAC7D,KACP,EAEI,IAAU,QACd,EAAS,UAAU,UACf,EAAE,cAAc,aAChB,EAAE,cAAc,aACrB;mBAKS,EAAA,SAAA,GAAA,EADR,EA0BO,QAAA;;GAxBL,OAAK,EAAA,CAAC,yNACS,EAAA,UAAQ,UAAA,iCAAA,gCAAA,CAAA;GAKtB,OAAO,EAAA;GACP,cAAY,EAAA;GACb,MAAK;MAGG,EAAA,UAAQ,WAAA,GAAA,EADhB,EAME,EAAA,EAAA,EAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO;cAET,EAME,EAAA,EAAA,EAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO"}