@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
@@ -0,0 +1,108 @@
1
+ import { C as e, D as t, F as n, L as r, N as i, R as a, f as o, g as s, h as c, jt as l, m as u, st as d, v as f } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { P as p, _ as m, a as h, b as g, f as _, g as v, h as y, i as b, m as x, n as S, p as C, r as w, u as T, v as E, y as D } from "./useEditorCore-BGnzcT7p.js";
3
+ import { s as O } from "./keys-CvX8D-8C.js";
4
+ //#region src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
5
+ var k = { class: "tpl:w-full" }, A = { class: "tpl:flex tpl:gap-0" }, j = /* @__PURE__ */ e({
6
+ name: "PreviewSectionBlock",
7
+ __name: "PreviewSectionBlock",
8
+ props: {
9
+ block: {},
10
+ viewport: {}
11
+ },
12
+ setup(e) {
13
+ let j = {
14
+ title: T,
15
+ paragraph: x,
16
+ image: m,
17
+ video: S,
18
+ button: p,
19
+ input: v,
20
+ divider: D,
21
+ social: h,
22
+ menu: y,
23
+ table: w,
24
+ spacer: b,
25
+ html: E,
26
+ custom: g
27
+ }, M = e, N = t(O, null), P = u(() => {
28
+ switch (M.block.columns) {
29
+ case "2": return ["50%", "50%"];
30
+ case "3": return [
31
+ "33.33%",
32
+ "33.33%",
33
+ "33.33%"
34
+ ];
35
+ case "1-2": return ["33.33%", "66.67%"];
36
+ case "2-1": return ["66.67%", "33.33%"];
37
+ default: return ["100%"];
38
+ }
39
+ }), F = u(() => {
40
+ let e = P.value.length, t = [...M.block.children];
41
+ for (; t.length < e;) t.push([]);
42
+ return t.slice(0, e);
43
+ });
44
+ function I(e) {
45
+ return F.value[e] || [];
46
+ }
47
+ function L(e) {
48
+ return C(e, N, j);
49
+ }
50
+ return (e, t) => {
51
+ let u = r("PreviewSectionBlock", !0);
52
+ return i(), f("div", k, [c("div", A, [(i(!0), f(o, null, n(F.value, (e, t) => (i(), f("div", {
53
+ key: t,
54
+ style: l({ width: P.value[t] })
55
+ }, [(i(!0), f(o, null, n(I(t), (e) => (i(), f("div", {
56
+ key: e.id,
57
+ style: l(d(_)(e))
58
+ }, [e.type === "section" ? (i(), s(u, {
59
+ key: 0,
60
+ block: e,
61
+ viewport: "desktop"
62
+ }, null, 8, ["block"])) : (i(), s(a(L(e)), {
63
+ key: 1,
64
+ block: e,
65
+ viewport: "desktop"
66
+ }, null, 8, ["block"]))], 4))), 128))], 4))), 128))])]);
67
+ };
68
+ }
69
+ }), M = {
70
+ class: "tpl:pointer-events-none tpl:mx-auto tpl:w-[600px] tpl:select-none tpl:rounded-lg",
71
+ style: {
72
+ "background-color": "var(--tpl-canvas-bg)",
73
+ "box-shadow": "var(--tpl-shadow-sm)"
74
+ }
75
+ }, N = /* @__PURE__ */ e({
76
+ __name: "ModulePreviewCanvas",
77
+ props: { blocks: {} },
78
+ setup(e) {
79
+ let r = t(O), c = {
80
+ section: j,
81
+ title: T,
82
+ paragraph: x,
83
+ image: m,
84
+ video: S,
85
+ button: p,
86
+ input: v,
87
+ divider: D,
88
+ social: h,
89
+ menu: y,
90
+ table: w,
91
+ spacer: b,
92
+ html: E,
93
+ custom: g
94
+ };
95
+ function u(e) {
96
+ return C(e, r, c);
97
+ }
98
+ return (t, r) => (i(), f("div", M, [(i(!0), f(o, null, n(e.blocks, (e) => (i(), f("div", {
99
+ key: e.id,
100
+ style: l(d(_)(e))
101
+ }, [(i(), s(a(u(e)), {
102
+ block: e,
103
+ viewport: "desktop"
104
+ }, null, 8, ["block"]))], 4))), 128))]));
105
+ }
106
+ });
107
+ //#endregion
108
+ export { N as default };
@@ -1,36 +1,36 @@
1
- import { Dt as e, F as t, L as n, M as r, Mt as i, Ot as a, P as o, Q as s, S as c, V as l, _ as u, b as d, d as f, g as p, h as m, it as h, l as ee, m as g, p as _, t as v } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import { t as y } from "./dist-B1IR0bpH.js";
3
- import { t as te } from "./useI18n-lb2DHDiu.js";
4
- import { h as b, i as x, m as S, p as C, u as ne } from "./styleConstants-fWzlIIwN.js";
1
+ import { At as e, C as t, F as n, Ft as r, I as i, N as a, R as o, U as s, _ as c, et as l, f as u, g as d, h as f, jt as p, m, st as h, t as ee, u as g, v as _, x as v } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { t as y } from "./dist-CivF9P8b.js";
3
+ import { t as te } from "./useI18n-C2xQZ6K9.js";
4
+ import { h as b, i as x, m as S, p as C, u as w } from "./styleConstants-wWRbcuEK.js";
5
5
  //#region ../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js
6
- var w = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, T = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
6
+ var T = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, E = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
7
7
  360 / (Math.PI * 2);
8
- var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
8
+ var ne = (e) => j(D(e)), D = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
9
9
  r: parseInt(e[0] + e[0], 16),
10
10
  g: parseInt(e[1] + e[1], 16),
11
11
  b: parseInt(e[2] + e[2], 16),
12
- a: e.length === 4 ? T(parseInt(e[3] + e[3], 16) / 255, 2) : 1
12
+ a: e.length === 4 ? E(parseInt(e[3] + e[3], 16) / 255, 2) : 1
13
13
  } : {
14
14
  r: parseInt(e.substring(0, 2), 16),
15
15
  g: parseInt(e.substring(2, 4), 16),
16
16
  b: parseInt(e.substring(4, 6), 16),
17
- a: e.length === 8 ? T(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
18
- }), D = (e) => ae(k(e)), ie = ({ h: e, s: t, v: n, a: r }) => {
17
+ a: e.length === 8 ? E(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
18
+ }), O = (e) => ae(ie(e)), re = ({ h: e, s: t, v: n, a: r }) => {
19
19
  let i = (200 - t) * n / 100;
20
20
  return {
21
- h: T(e),
22
- s: T(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
23
- l: T(i / 2),
24
- a: T(r, 2)
21
+ h: E(e),
22
+ s: E(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
23
+ l: E(i / 2),
24
+ a: E(r, 2)
25
25
  };
26
- }, O = (e) => {
27
- let { h: t, s: n, l: r } = ie(e);
26
+ }, k = (e) => {
27
+ let { h: t, s: n, l: r } = re(e);
28
28
  return `hsl(${t}, ${n}%, ${r}%)`;
29
- }, k = ({ h: e, s: t, v: n, a: r }) => {
29
+ }, ie = ({ h: e, s: t, v: n, a: r }) => {
30
30
  e = e / 360 * 6, t /= 100, n /= 100;
31
31
  let i = Math.floor(e), a = n * (1 - t), o = n * (1 - (e - i) * t), s = n * (1 - (1 - e + i) * t), c = i % 6;
32
32
  return {
33
- r: T([
33
+ r: E([
34
34
  n,
35
35
  o,
36
36
  a,
@@ -38,7 +38,7 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
38
38
  s,
39
39
  n
40
40
  ][c] * 255),
41
- g: T([
41
+ g: E([
42
42
  s,
43
43
  n,
44
44
  n,
@@ -46,7 +46,7 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
46
46
  a,
47
47
  a
48
48
  ][c] * 255),
49
- b: T([
49
+ b: E([
50
50
  a,
51
51
  a,
52
52
  s,
@@ -54,27 +54,27 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
54
54
  n,
55
55
  o
56
56
  ][c] * 255),
57
- a: T(r, 2)
57
+ a: E(r, 2)
58
58
  };
59
59
  }, A = (e) => {
60
60
  let t = e.toString(16);
61
61
  return t.length < 2 ? "0" + t : t;
62
62
  }, ae = ({ r: e, g: t, b: n, a: r }) => {
63
- let i = r < 1 ? A(T(r * 255)) : "";
63
+ let i = r < 1 ? A(E(r * 255)) : "";
64
64
  return "#" + A(e) + A(t) + A(n) + i;
65
- }, oe = ({ r: e, g: t, b: n, a: r }) => {
65
+ }, j = ({ r: e, g: t, b: n, a: r }) => {
66
66
  let i = Math.max(e, t, n), a = i - Math.min(e, t, n), o = a ? i === e ? (t - n) / a : i === t ? 2 + (n - e) / a : 4 + (e - t) / a : 0;
67
67
  return {
68
- h: T(60 * (o < 0 ? o + 6 : o)),
69
- s: T(i ? a / i * 100 : 0),
70
- v: T(i / 255 * 100),
68
+ h: E(60 * (o < 0 ? o + 6 : o)),
69
+ s: E(i ? a / i * 100 : 0),
70
+ v: E(i / 255 * 100),
71
71
  a: r
72
72
  };
73
- }, j = (e, t) => {
73
+ }, M = (e, t) => {
74
74
  if (e === t) return !0;
75
75
  for (let n in e) if (e[n] !== t[n]) return !1;
76
76
  return !0;
77
- }, M = (e, t) => e.toLowerCase() === t.toLowerCase() ? !0 : j(E(e), E(t)), N = {}, P = (e) => {
77
+ }, oe = (e, t) => e.toLowerCase() === t.toLowerCase() ? !0 : M(D(e), D(t)), N = {}, P = (e) => {
78
78
  let t = N[e];
79
79
  return t || (t = document.createElement("template"), t.innerHTML = e, N[e] = t), t;
80
80
  }, F = (e, t, n) => {
@@ -85,8 +85,8 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
85
85
  }, I = !1, L = (e) => "touches" in e, R = (e) => I && !L(e) ? !1 : (I ||= L(e), !0), z = (e, t) => {
86
86
  let n = L(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
87
87
  F(e.el, "move", e.getMove({
88
- x: w((n.pageX - (r.left + window.pageXOffset)) / r.width),
89
- y: w((n.pageY - (r.top + window.pageYOffset)) / r.height)
88
+ x: T((n.pageX - (r.left + window.pageXOffset)) / r.width),
89
+ y: T((n.pageY - (r.top + window.pageYOffset)) / r.height)
90
90
  }));
91
91
  }, B = (e, t) => {
92
92
  let n = t.keyCode;
@@ -137,16 +137,16 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
137
137
  update({ h: e }) {
138
138
  this.h = e, this.style([{
139
139
  left: `${e / 360 * 100}%`,
140
- color: O({
140
+ color: k({
141
141
  h: e,
142
142
  s: 100,
143
143
  v: 100,
144
144
  a: 1
145
145
  })
146
- }]), this.el.setAttribute("aria-valuenow", `${T(e)}`);
146
+ }]), this.el.setAttribute("aria-valuenow", `${E(e)}`);
147
147
  }
148
148
  getMove(e, t) {
149
- return { h: t ? w(this.h + e.x * 360, 0, 360) : 360 * e.x };
149
+ return { h: t ? T(this.h + e.x * 360, 0, 360) : 360 * e.x };
150
150
  }
151
151
  }, U = class extends V {
152
152
  constructor(e) {
@@ -156,18 +156,18 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
156
156
  this.hsva = e, this.style([{
157
157
  top: `${100 - e.v}%`,
158
158
  left: `${e.s}%`,
159
- color: O(e)
160
- }, { "background-color": O({
159
+ color: k(e)
160
+ }, { "background-color": k({
161
161
  h: e.h,
162
162
  s: 100,
163
163
  v: 100,
164
164
  a: 1
165
- }) }]), this.el.setAttribute("aria-valuetext", `Saturation ${T(e.s)}%, Brightness ${T(e.v)}%`);
165
+ }) }]), this.el.setAttribute("aria-valuetext", `Saturation ${E(e.s)}%, Brightness ${E(e.v)}%`);
166
166
  }
167
167
  getMove(e, t) {
168
168
  return {
169
- s: t ? w(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
170
- v: t ? w(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
169
+ s: t ? T(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
170
+ v: t ? T(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
171
171
  };
172
172
  }
173
173
  }, W = ":host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}", G = "[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}", K = "[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}", q = Symbol("same"), J = Symbol("color"), Y = Symbol("hsva"), X = Symbol("update"), Z = Symbol("parts"), Q = Symbol("css"), $ = Symbol("sliders"), se = class extends HTMLElement {
@@ -215,7 +215,7 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
215
215
  };
216
216
  this[X](n);
217
217
  let r;
218
- !j(n, t) && !this[q](r = this.colorModel.fromHsva(n)) && (this[J] = r, F(this, "color-changed", { value: r }));
218
+ !M(n, t) && !this[q](r = this.colorModel.fromHsva(n)) && (this[J] = r, F(this, "color-changed", { value: r }));
219
219
  }
220
220
  [q](e) {
221
221
  return this.color && this.colorModel.equal(e, this.color);
@@ -225,14 +225,14 @@ var re = (e) => oe(E(e)), E = (e) => (e[0] === "#" && (e = e.substring(1)), e.le
225
225
  }
226
226
  }, ce = {
227
227
  defaultColor: "#000",
228
- toHsva: re,
229
- fromHsva: ({ h: e, s: t, v: n }) => D({
228
+ toHsva: ne,
229
+ fromHsva: ({ h: e, s: t, v: n }) => O({
230
230
  h: e,
231
231
  s: t,
232
232
  v: n,
233
233
  a: 1
234
234
  }),
235
- equal: M,
235
+ equal: oe,
236
236
  fromAttr: (e) => e
237
237
  }, le = class extends se {
238
238
  get colorModel() {
@@ -251,7 +251,7 @@ var de = [
251
251
  "placeholder",
252
252
  "disabled",
253
253
  "aria-label"
254
- ], pe = ["color", "aria-label"], me = /* @__PURE__ */ c({
254
+ ], pe = ["color", "aria-label"], me = /* @__PURE__ */ t({
255
255
  __name: "ColorPicker",
256
256
  props: {
257
257
  modelValue: {},
@@ -268,13 +268,13 @@ var de = [
268
268
  },
269
269
  emits: ["update:modelValue"],
270
270
  setup(t, { emit: n }) {
271
- let i = t, o = n, { t: c } = te(), f = s(!1), m = s(), b = s();
272
- y(m, () => {
273
- f.value = !1;
271
+ let r = t, i = n, { t: o } = te(), u = l(!1), d = l(), b = l();
272
+ y(d, () => {
273
+ u.value = !1;
274
274
  }, { ignore: [b] });
275
- let x = _({
276
- get: () => i.modelValue || "#000000",
277
- set: (e) => o("update:modelValue", e)
275
+ let x = m({
276
+ get: () => r.modelValue || "#000000",
277
+ set: (e) => i("update:modelValue", e)
278
278
  });
279
279
  function S(e) {
280
280
  x.value = e.detail.value;
@@ -282,36 +282,36 @@ var de = [
282
282
  function C(e) {
283
283
  x.value = e.target.value;
284
284
  }
285
- return (n, i) => (r(), u("div", { class: e(["tpl:flex tpl:gap-2 tpl:relative", t.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
286
- g("button", {
285
+ return (n, r) => (a(), _("div", { class: e(["tpl:flex tpl:gap-2 tpl:relative tpl:w-full tpl:min-w-0", t.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
286
+ f("button", {
287
287
  ref_key: "swatchRef",
288
288
  ref: b,
289
289
  type: "button",
290
290
  disabled: t.disabled,
291
- "aria-label": h(c).colorPicker.pickColor,
292
- "aria-expanded": f.value,
291
+ "aria-label": h(o).colorPicker.pickColor,
292
+ "aria-expanded": u.value,
293
293
  class: e([
294
294
  "tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-0.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
295
295
  t.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
296
- f.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !t.disabled && "hover:tpl:border-[var(--tpl-text-dim)]",
296
+ u.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !t.disabled && "hover:tpl:border-[var(--tpl-text-dim)]",
297
297
  t.size === "large" ? "tpl:size-12" : "tpl:size-10"
298
298
  ]),
299
- onClick: i[0] ||= (e) => !t.disabled && (f.value = !f.value)
300
- }, [g("span", {
299
+ onClick: r[0] ||= (e) => !t.disabled && (u.value = !u.value)
300
+ }, [f("span", {
301
301
  class: "tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]",
302
- style: a({ backgroundColor: x.value })
302
+ style: p({ backgroundColor: x.value })
303
303
  }, null, 4)], 10, de),
304
- t.swatchOnly ? p("", !0) : (r(), u("input", {
304
+ t.swatchOnly ? c("", !0) : (a(), _("input", {
305
305
  key: 0,
306
306
  type: "text",
307
- class: e(h(ne)),
307
+ class: e(h(w)),
308
308
  value: t.modelValue,
309
309
  placeholder: t.placeholder,
310
310
  disabled: t.disabled,
311
- "aria-label": h(c).colorPicker.hexValue,
311
+ "aria-label": h(o).colorPicker.hexValue,
312
312
  onInput: C
313
313
  }, null, 42, fe)),
314
- d(v, {
314
+ v(ee, {
315
315
  "enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
316
316
  "enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
317
317
  "enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
@@ -319,17 +319,17 @@ var de = [
319
319
  "leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
320
320
  "leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
321
321
  }, {
322
- default: l(() => [f.value ? (r(), u("div", {
322
+ default: s(() => [u.value ? (a(), _("div", {
323
323
  key: 0,
324
324
  ref_key: "popoverRef",
325
- ref: m,
325
+ ref: d,
326
326
  class: "tpl:absolute tpl:left-0 tpl:top-full tpl:z-50 tpl:mt-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-3 tpl:shadow-lg"
327
- }, [g("hex-color-picker", {
327
+ }, [f("hex-color-picker", {
328
328
  color: x.value,
329
- "aria-label": h(c).colorPicker.pickColor,
329
+ "aria-label": h(o).colorPicker.pickColor,
330
330
  onColorChanged: S,
331
- onKeydown: i[1] ||= ee((e) => f.value = !1, ["escape"])
332
- }, null, 40, pe)], 512)) : p("", !0)]),
331
+ onKeydown: r[1] ||= g((e) => u.value = !1, ["escape"])
332
+ }, null, 40, pe)], 512)) : c("", !0)]),
333
333
  _: 1
334
334
  })
335
335
  ], 2));
@@ -339,7 +339,7 @@ var de = [
339
339
  "aria-label",
340
340
  "title",
341
341
  "onClick"
342
- ], ge = { key: 1 }, _e = /* @__PURE__ */ c({
342
+ ], ge = { key: 1 }, _e = /* @__PURE__ */ t({
343
343
  __name: "SlidingPillSelect",
344
344
  props: {
345
345
  options: {},
@@ -347,57 +347,57 @@ var de = [
347
347
  },
348
348
  emits: ["update:modelValue"],
349
349
  setup(e, { emit: t }) {
350
- let s = e, c = t, l = _(() => s.options.findIndex((e) => e.value === s.modelValue)), d = _(() => `translateX(${Math.max(l.value, 0) * 100}%)`);
351
- return (t, s) => (r(), u("div", {
350
+ let i = e, s = t, l = m(() => i.options.findIndex((e) => e.value === i.modelValue)), f = m(() => `translateX(${Math.max(l.value, 0) * 100}%)`);
351
+ return (t, i) => (a(), _("div", {
352
352
  role: "radiogroup",
353
353
  class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
354
- style: a({
354
+ style: p({
355
355
  gridTemplateColumns: `repeat(${e.options.length}, 1fr)`,
356
356
  backgroundColor: "var(--tpl-bg-hover)"
357
357
  })
358
- }, [l.value >= 0 ? (r(), u("div", {
358
+ }, [l.value >= 0 ? (a(), _("div", {
359
359
  key: 0,
360
360
  class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
361
- style: a({
361
+ style: p({
362
362
  left: "4px",
363
363
  width: `calc((100% - 8px) / ${e.options.length})`,
364
- transform: d.value,
364
+ transform: f.value,
365
365
  backgroundColor: "var(--tpl-bg)",
366
366
  boxShadow: "var(--tpl-shadow)",
367
367
  transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
368
368
  })
369
- }, null, 4)) : p("", !0), (r(!0), u(f, null, o(e.options, (t) => (r(), u("button", {
369
+ }, null, 4)) : c("", !0), (a(!0), _(u, null, n(e.options, (t) => (a(), _("button", {
370
370
  key: t.value,
371
371
  role: "radio",
372
372
  "aria-checked": e.modelValue === t.value,
373
373
  "aria-label": t.label,
374
374
  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",
375
- style: a({
375
+ style: p({
376
376
  color: e.modelValue === t.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
377
377
  transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
378
378
  }),
379
379
  title: t.label,
380
- onClick: (e) => c("update:modelValue", t.value)
381
- }, [t.icon ? (r(), m(n(t.icon), {
380
+ onClick: (e) => s("update:modelValue", t.value)
381
+ }, [t.icon ? (a(), d(o(t.icon), {
382
382
  key: 0,
383
383
  size: 14,
384
384
  "stroke-width": 2
385
- })) : (r(), u("span", ge, i(t.label), 1))], 12, he))), 128))], 4));
385
+ })) : (a(), _("span", ge, r(t.label), 1))], 12, he))), 128))], 4));
386
386
  }
387
- }), ve = { class: "tpl:mb-3.5" }, ye = /* @__PURE__ */ c({
387
+ }), ve = { class: "tpl:mb-3.5" }, ye = /* @__PURE__ */ t({
388
388
  __name: "FieldRow",
389
389
  props: { label: {} },
390
- setup(n) {
391
- return (a, o) => (r(), u("div", ve, [n.label ? (r(), u("label", {
390
+ setup(t) {
391
+ return (n, o) => (a(), _("div", ve, [t.label ? (a(), _("label", {
392
392
  key: 0,
393
393
  class: e(h(b))
394
- }, i(n.label), 3)) : p("", !0), t(a.$slots, "default")]));
394
+ }, r(t.label), 3)) : c("", !0), i(n.$slots, "default")]));
395
395
  }
396
396
  }), be = { class: "tpl:flex tpl:items-stretch" }, xe = [
397
397
  "value",
398
398
  "min",
399
399
  "max"
400
- ], Se = /* @__PURE__ */ c({
400
+ ], Se = /* @__PURE__ */ t({
401
401
  __name: "NumberWithSuffix",
402
402
  props: {
403
403
  modelValue: {},
@@ -407,15 +407,15 @@ var de = [
407
407
  },
408
408
  emits: ["update:modelValue"],
409
409
  setup(t, { emit: n }) {
410
- let a = n;
411
- return (n, o) => (r(), u("div", be, [g("input", {
410
+ let i = n;
411
+ return (n, o) => (a(), _("div", be, [f("input", {
412
412
  type: "number",
413
413
  class: e(h(C)),
414
414
  value: t.modelValue,
415
415
  min: t.min,
416
416
  max: t.max,
417
- onInput: o[0] ||= (e) => a("update:modelValue", Number(e.target.value))
418
- }, null, 42, xe), g("span", { class: e(h(S)) }, i(t.suffix), 3)]));
417
+ onInput: o[0] ||= (e) => i("update:modelValue", Number(e.target.value))
418
+ }, null, 42, xe), f("span", { class: e(h(S)) }, r(t.suffix), 3)]));
419
419
  }
420
420
  });
421
421
  //#endregion