@aswin.dev/editor 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/dist/AccessibilityPanel-CvQGLdu6.js +108 -0
  2. package/dist/AiChatSidebar-B3SJIKG_.js +229 -0
  3. package/dist/AiFeatureMenu-BLLKoOos.js +63 -0
  4. package/dist/BlockA11yBadge-CXDLqkcJ.js +34 -0
  5. package/dist/CloudEditor-BCz1ZTYC.js +1172 -0
  6. package/dist/CollaboratorBar-DuPYW5iF.js +95 -0
  7. package/dist/CommentsSidebar-B1pvJdqF.js +441 -0
  8. package/dist/CountdownBlock-BNSj1jvJ.js +92 -0
  9. package/dist/CountdownToolbar-ClJr2GzL.js +210 -0
  10. package/dist/DesignReferenceSidebar-B8V_F2yF.js +276 -0
  11. package/dist/LoadingTrack-B0CWFHXQ.js +10 -0
  12. package/dist/ModuleBrowserModal-DrUFMTDx.js +206 -0
  13. package/dist/ModulePreviewCanvas-CHdOwV_4.js +106 -0
  14. package/dist/NumberWithSuffix-DkXUez9t.js +422 -0
  15. package/dist/ParagraphEditor-D75wl3BX.js +695 -0
  16. package/dist/RichTextEditorContent-DYkIauIk.js +137 -0
  17. package/dist/SaveModuleDialog-FZ9lxY7_.js +123 -0
  18. package/dist/SnapshotHistory-BR3eV120.js +127 -0
  19. package/dist/TemplateScoringPanel-4GTNHej5.js +256 -0
  20. package/dist/TestEmailModal--ue5w9fT.js +94 -0
  21. package/dist/TitleEditor-fStSADI-.js +172 -0
  22. package/dist/TplModal-BwSfxIHf.js +44 -0
  23. package/dist/_plugin-vue_export-helper-B0hnzhyu.js +8 -0
  24. package/dist/accessibility-e8JYu_zd.js +27 -0
  25. package/dist/blockTypeIcons-BcTrDjmH.js +126 -0
  26. package/dist/bundle-stats.json +10 -0
  27. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +97 -0
  28. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +1 -0
  29. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +59 -0
  30. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +1 -0
  31. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +33 -0
  32. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +1 -0
  33. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +1143 -0
  34. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +1 -0
  35. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +51 -0
  36. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +1 -0
  37. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +93 -0
  38. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +1 -0
  39. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +212 -0
  40. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +1 -0
  41. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +195 -0
  42. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +1 -0
  43. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +107 -0
  44. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +1 -0
  45. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +423 -0
  46. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +1 -0
  47. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +544 -0
  48. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +1 -0
  49. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +106 -0
  50. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +1 -0
  51. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +119 -0
  52. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +1 -0
  53. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +171 -0
  54. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +1 -0
  55. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +22 -0
  56. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +1 -0
  57. package/dist/cdn/chunks/de-Ce-LbJ2J.js +89 -0
  58. package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +1 -0
  59. package/dist/cdn/chunks/de-D8CnZxV9.js +523 -0
  60. package/dist/cdn/chunks/de-D8CnZxV9.js.map +1 -0
  61. package/dist/cdn/chunks/de-RQrZR56a.js +209 -0
  62. package/dist/cdn/chunks/de-RQrZR56a.js.map +1 -0
  63. package/dist/cdn/chunks/draggable-Bcb86AsV.js +11572 -0
  64. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
  65. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +19 -0
  66. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +1 -0
  67. package/dist/cdn/chunks/en-8FHaQv4V.js +523 -0
  68. package/dist/cdn/chunks/en-8FHaQv4V.js.map +1 -0
  69. package/dist/cdn/chunks/en-Bl1ecfRF.js +209 -0
  70. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +1 -0
  71. package/dist/cdn/chunks/en-DiCWK5fG.js +89 -0
  72. package/dist/cdn/chunks/en-DiCWK5fG.js.map +1 -0
  73. package/dist/cdn/chunks/extensions-DIxF31tA.js +598 -0
  74. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +1 -0
  75. package/dist/cdn/chunks/features-DEMb13KS.js +6814 -0
  76. package/dist/cdn/chunks/features-DEMb13KS.js.map +1 -0
  77. package/dist/cdn/chunks/icons-CsLTcirh.js +700 -0
  78. package/dist/cdn/chunks/icons-CsLTcirh.js.map +1 -0
  79. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +3279 -0
  80. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +1 -0
  81. package/dist/cdn/chunks/media-library-CVaNvhpM.js +6014 -0
  82. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +1 -0
  83. package/dist/cdn/chunks/pusher-CDbNlZBE.js +2508 -0
  84. package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +1 -0
  85. package/dist/cdn/chunks/quality-BaBfc54_.js +1456 -0
  86. package/dist/cdn/chunks/quality-BaBfc54_.js.map +1 -0
  87. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
  88. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
  89. package/dist/cdn/chunks/renderer-CUxvx7ro.js +548 -0
  90. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +1 -0
  91. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
  92. package/dist/cdn/chunks/src-CRaqN-p8.js +497 -0
  93. package/dist/cdn/chunks/src-CRaqN-p8.js.map +1 -0
  94. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +57 -0
  95. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +1 -0
  96. package/dist/cdn/chunks/styles-BHJULjNR.js +2947 -0
  97. package/dist/cdn/chunks/styles-BHJULjNR.js.map +1 -0
  98. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +14654 -0
  99. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +1 -0
  100. package/dist/cdn/editor.css +2 -0
  101. package/dist/cdn/editor.js +250 -0
  102. package/dist/cdn/editor.js.map +1 -0
  103. package/dist/check-Da05j8yl.js +7 -0
  104. package/dist/chevron-down-R2uY34iD.js +7 -0
  105. package/dist/circle-alert-DZuGWPX-.js +25 -0
  106. package/dist/clock-CRp2sIub.js +12 -0
  107. package/dist/cloud-DEk_b4CR.js +1733 -0
  108. package/dist/createLucideIcon-C3pa2siy.js +43 -0
  109. package/dist/de-Brqvgr43.js +521 -0
  110. package/dist/de-DCaaCE5s.js +207 -0
  111. package/dist/dist-B1IR0bpH.js +326 -0
  112. package/dist/dist-BFawx6IS.js +519 -0
  113. package/dist/dist-BaQIYPsn.js +35 -0
  114. package/dist/dist-Cp0zXPAD.js +189 -0
  115. package/dist/dist-D6uC2xhi.js +5 -0
  116. package/dist/dist-D90y8dvT.js +2082 -0
  117. package/dist/dist-DDJIWTRY.js +776 -0
  118. package/dist/dist-DJmnUmW9.js +362 -0
  119. package/dist/dist-DjviJBCi.js +74 -0
  120. package/dist/dist-KoBJjK1G.js +61 -0
  121. package/dist/dist-aRzjfSRN.js +35 -0
  122. package/dist/dist-iLBdeBDR.js +10658 -0
  123. package/dist/dist-us-RpCWN.js +47 -0
  124. package/dist/dist-wzMIGj-D.js +5 -0
  125. package/dist/emojiData-PQyVa4bU.js +17 -0
  126. package/dist/en-DXCyK4-X.js +207 -0
  127. package/dist/en-WDVp87TE.js +521 -0
  128. package/dist/extensions-CUcl9Ok4.js +799 -0
  129. package/dist/formatRelativeTime-BOEf47hq.js +12 -0
  130. package/dist/image-up-MBZKKg9p.js +23 -0
  131. package/dist/index.d.ts +275 -0
  132. package/dist/info-CJEC7piy.js +19 -0
  133. package/dist/keys-ciNfSSGj.js +10 -0
  134. package/dist/liquid.browser-CdMv1BTn.js +3277 -0
  135. package/dist/loader-circle-DsY5Yg33.js +7 -0
  136. package/dist/message-circle-yElBbR2C.js +7 -0
  137. package/dist/readableTextColor-CY3SiRnt.js +30 -0
  138. package/dist/refresh-cw-CE_AGtn8.js +29 -0
  139. package/dist/rolldown-runtime-BZGGJVDF.js +20 -0
  140. package/dist/scan-line-D0vcUekt.js +25 -0
  141. package/dist/send-DH4oDQqC.js +10 -0
  142. package/dist/shield-check-CfJgs2Hd.js +10 -0
  143. package/dist/sparkles-CvRXGqFs.js +23 -0
  144. package/dist/style.css +2 -0
  145. package/dist/styleConstants-fWzlIIwN.js +55 -0
  146. package/dist/styles-DEXEkBvg.js +3176 -0
  147. package/dist/templatical-editor.js +249 -0
  148. package/dist/text-align-start-BT9VUDxK.js +43 -0
  149. package/dist/timeouts-BSGxjuUF.js +4 -0
  150. package/dist/trash-2-DbP2Y6t2.js +25 -0
  151. package/dist/triangle-alert-aOXceTSe.js +17 -0
  152. package/dist/useCloudI18n-BuIwR6OE.js +23 -0
  153. package/dist/useEditorCore-C6ost42Q.js +9342 -0
  154. package/dist/useI18n-lb2DHDiu.js +17 -0
  155. package/dist/useMergeTag-CBwKnnNB.js +34 -0
  156. package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +5775 -0
  157. package/dist/x-u2oVmjN_.js +10 -0
  158. package/package.json +1 -1
@@ -0,0 +1,210 @@
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 };
@@ -0,0 +1,276 @@
1
+ import { Dt as e, H as t, M as n, Mt as r, Ot as i, Q as a, S as o, V as ee, _ as s, b as c, g as l, h as te, it as u, k as d, m as f, p as ne, s as re, t as ie, y as p, z as ae } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
+ import "./timeouts-BSGxjuUF.js";
3
+ import { O as m, i as oe, m as h } from "./keys-ciNfSSGj.js";
4
+ import { t as g } from "./createLucideIcon-C3pa2siy.js";
5
+ import { t as se } from "./circle-alert-DZuGWPX-.js";
6
+ import { t as _ } from "./image-up-MBZKKg9p.js";
7
+ import { t as v } from "./x-u2oVmjN_.js";
8
+ import { t as ce } from "./LoadingTrack-B0CWFHXQ.js";
9
+ import { t as y } from "./_plugin-vue_export-helper-B0hnzhyu.js";
10
+ import { n as le } from "./useCloudI18n-BuIwR6OE.js";
11
+ import { u as ue } from "./cloud-DEk_b4CR.js";
12
+ var de = g("file-image", [
13
+ ["path", {
14
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
15
+ key: "1oefj6"
16
+ }],
17
+ ["path", {
18
+ d: "M14 2v5a1 1 0 0 0 1 1h5",
19
+ key: "wfsgrz"
20
+ }],
21
+ ["circle", {
22
+ cx: "10",
23
+ cy: "12",
24
+ r: "2",
25
+ key: "737tya"
26
+ }],
27
+ ["path", {
28
+ d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
29
+ key: "wt3hpn"
30
+ }]
31
+ ]), b = g("file-text", [
32
+ ["path", {
33
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
34
+ key: "1oefj6"
35
+ }],
36
+ ["path", {
37
+ d: "M14 2v5a1 1 0 0 0 1 1h5",
38
+ key: "wfsgrz"
39
+ }],
40
+ ["path", {
41
+ d: "M10 9H8",
42
+ key: "b1mrlr"
43
+ }],
44
+ ["path", {
45
+ d: "M16 13H8",
46
+ key: "t4e002"
47
+ }],
48
+ ["path", {
49
+ d: "M16 17H8",
50
+ key: "z1uh3a"
51
+ }]
52
+ ]), fe = g("upload", [
53
+ ["path", {
54
+ d: "M12 3v12",
55
+ key: "1x0j5s"
56
+ }],
57
+ ["path", {
58
+ d: "m17 8-5-5-5 5",
59
+ key: "7q97r8"
60
+ }],
61
+ ["path", {
62
+ d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
63
+ key: "ih7n3h"
64
+ }]
65
+ ]), pe = {
66
+ key: 0,
67
+ class: "tpl-design-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
68
+ }, me = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, he = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, x = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, S = {
69
+ key: 0,
70
+ class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
71
+ }, C = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, w = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, T = {
72
+ key: 1,
73
+ class: "tpl:flex tpl:flex-col tpl:gap-4"
74
+ }, E = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, D = {
75
+ key: 0,
76
+ class: "tpl:flex tpl:flex-col tpl:gap-2"
77
+ }, O = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, k = ["src", "alt"], A = {
78
+ key: 1,
79
+ class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
80
+ }, j = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, M = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, N = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, P = ["accept"], F = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, I = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, L = ["placeholder"], R = {
81
+ key: 0,
82
+ class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:px-3 tpl:py-3 tpl:bg-[var(--tpl-warning-light)] tpl:border tpl:border-[var(--tpl-warning)]"
83
+ }, ge = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, _e = { class: "tpl:flex tpl:gap-2" }, ve = {
84
+ key: 1,
85
+ class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
86
+ }, ye = ["disabled"], be = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, z = /* @__PURE__ */ y(/* @__PURE__ */ o({
87
+ __name: "DesignReferenceSidebar",
88
+ props: {
89
+ visible: { type: Boolean },
90
+ hasExistingBlocks: { type: Boolean }
91
+ },
92
+ emits: ["close", "apply"],
93
+ setup(o, { emit: g }) {
94
+ let y = o, z = g, { t: B } = le(), xe = m(h, "DesignReferenceSidebar"), V = ue({
95
+ authManager: m(oe, "DesignReferenceSidebar"),
96
+ getTemplateId: () => xe.state.template?.id ?? null,
97
+ onApply: (e) => z("apply", e)
98
+ }), H = a(null), U = a("image"), W = a(null), G = a(""), K = a(null), q = a(!1), J = a(!1), Y = ne(() => V.isGenerating.value ? !1 : W.value !== null);
99
+ function X(e) {
100
+ U.value = e, Q();
101
+ }
102
+ function Se(e) {
103
+ let t = e.target, n = t.files?.[0];
104
+ n && Z(n), t.value = "";
105
+ }
106
+ function Z(e) {
107
+ if (e.size > 10485760) {
108
+ V.error.value = B.designReference.fileTooLarge;
109
+ return;
110
+ }
111
+ if (U.value === "image") {
112
+ if (![
113
+ "image/png",
114
+ "image/jpeg",
115
+ "image/jpg",
116
+ "image/webp"
117
+ ].includes(e.type)) {
118
+ V.error.value = B.designReference.invalidFileType;
119
+ return;
120
+ }
121
+ } else if (U.value === "pdf" && e.type !== "application/pdf") {
122
+ V.error.value = B.designReference.invalidFileType;
123
+ return;
124
+ }
125
+ W.value = e, V.error.value = null, K.value && URL.revokeObjectURL(K.value), e.type.startsWith("image/") ? K.value = URL.createObjectURL(e) : K.value = null;
126
+ }
127
+ function Q() {
128
+ K.value &&= (URL.revokeObjectURL(K.value), null), W.value = null;
129
+ }
130
+ function Ce(e) {
131
+ e.preventDefault(), J.value = !0;
132
+ }
133
+ function we() {
134
+ J.value = !1;
135
+ }
136
+ function Te(e) {
137
+ e.preventDefault(), J.value = !1;
138
+ let t = e.dataTransfer?.files?.[0];
139
+ t && Z(t);
140
+ }
141
+ function $() {
142
+ if (!Y.value) return;
143
+ if (y.hasExistingBlocks && !q.value) {
144
+ q.value = !0;
145
+ return;
146
+ }
147
+ q.value = !1;
148
+ let e = {};
149
+ G.value.trim() && (e.prompt = G.value.trim()), U.value === "image" && W.value ? e.imageUpload = W.value : U.value === "pdf" && W.value && (e.pdfUpload = W.value), V.generate(e);
150
+ }
151
+ function Ee() {
152
+ q.value = !1;
153
+ }
154
+ return ae(() => y.visible, (e) => {
155
+ e || (q.value = !1);
156
+ }), d(() => {
157
+ K.value &&= (URL.revokeObjectURL(K.value), null);
158
+ }), (a, d) => (n(), te(ie, {
159
+ "enter-active-class": "tpl-design-slide-enter-active",
160
+ "enter-from-class": "tpl:translate-x-full",
161
+ "enter-to-class": "tpl:translate-x-0",
162
+ "leave-active-class": "tpl-design-slide-leave-active",
163
+ "leave-from-class": "tpl:translate-x-0",
164
+ "leave-to-class": "tpl:translate-x-full"
165
+ }, {
166
+ default: ee(() => [o.visible ? (n(), s("div", pe, [f("div", me, [f("div", he, [c(u(_), {
167
+ size: 13,
168
+ "stroke-width": 2
169
+ }), f("span", null, r(u(B).designReference.title), 1)]), f("button", {
170
+ class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
171
+ onClick: d[0] ||= (e) => z("close")
172
+ }, [c(u(v), {
173
+ size: 14,
174
+ "stroke-width": 2
175
+ })])]), f("div", x, [u(V).isGenerating.value ? (n(), s("div", S, [f("div", C, [c(ce), f("p", w, r(u(B).designReference.generating), 1)])])) : (n(), s("div", T, [
176
+ f("div", E, [f("button", {
177
+ class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
178
+ style: i({
179
+ backgroundColor: U.value === "image" ? "var(--tpl-bg)" : "transparent",
180
+ color: U.value === "image" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
181
+ boxShadow: U.value === "image" ? "var(--tpl-shadow)" : "none"
182
+ }),
183
+ onClick: d[1] ||= (e) => X("image")
184
+ }, [c(u(de), {
185
+ size: 12,
186
+ "stroke-width": 2
187
+ }), p(" " + r(u(B).designReference.uploadImage), 1)], 4), f("button", {
188
+ class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
189
+ style: i({
190
+ backgroundColor: U.value === "pdf" ? "var(--tpl-bg)" : "transparent",
191
+ color: U.value === "pdf" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
192
+ boxShadow: U.value === "pdf" ? "var(--tpl-shadow)" : "none"
193
+ }),
194
+ onClick: d[2] ||= (e) => X("pdf")
195
+ }, [c(u(b), {
196
+ size: 12,
197
+ "stroke-width": 2
198
+ }), p(" " + r(u(B).designReference.uploadPdf), 1)], 4)]),
199
+ f("div", null, [W.value ? (n(), s("div", D, [f("div", O, [K.value ? (n(), s("img", {
200
+ key: 0,
201
+ src: K.value,
202
+ alt: W.value.name,
203
+ class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
204
+ }, null, 8, k)) : (n(), s("div", A, [c(u(b), {
205
+ size: 32,
206
+ "stroke-width": 1.5,
207
+ class: "tpl:text-[var(--tpl-text-dim)]"
208
+ }), f("span", j, r(W.value.name), 1)])), f("button", {
209
+ class: "tpl:absolute tpl:top-2 tpl:right-2 tpl:rounded-full tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow)]",
210
+ onClick: Q
211
+ }, [c(u(v), {
212
+ size: 12,
213
+ "stroke-width": 2
214
+ })])])])) : (n(), s("div", {
215
+ key: 1,
216
+ class: "tpl-design-dropzone tpl:flex tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border-2 tpl:border-dashed tpl:px-4 tpl:py-8 tpl:transition-colors tpl:duration-150",
217
+ style: i({
218
+ borderColor: J.value ? "var(--tpl-primary)" : "var(--tpl-border-light)",
219
+ backgroundColor: J.value ? "var(--tpl-primary-light)" : "var(--tpl-bg)"
220
+ }),
221
+ onClick: d[3] ||= (e) => H.value?.click(),
222
+ onDragover: Ce,
223
+ onDragleave: we,
224
+ onDrop: Te
225
+ }, [
226
+ c(u(fe), {
227
+ size: 24,
228
+ "stroke-width": 1.5,
229
+ class: "tpl:text-[var(--tpl-text-dim)]"
230
+ }),
231
+ f("span", M, r(u(B).designReference.dropHint), 1),
232
+ f("span", N, r(U.value === "image" ? u(B).designReference.acceptedImages : u(B).designReference.acceptedPdf), 1)
233
+ ], 36)), f("input", {
234
+ ref_key: "fileInput",
235
+ ref: H,
236
+ type: "file",
237
+ class: "tpl:hidden",
238
+ accept: U.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
239
+ onChange: Se
240
+ }, null, 40, P)]),
241
+ f("div", F, [f("label", I, r(u(B).designReference.promptLabel), 1), t(f("textarea", {
242
+ "onUpdate:modelValue": d[4] ||= (e) => G.value = e,
243
+ class: e(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
244
+ placeholder: u(B).designReference.promptPlaceholder,
245
+ rows: "3"
246
+ }, null, 8, L), [[re, G.value]])]),
247
+ q.value ? (n(), s("div", R, [f("p", ge, r(u(B).designReference.replaceWarning), 1), f("div", _e, [f("button", {
248
+ class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
249
+ style: { "background-color": "transparent" },
250
+ onClick: Ee
251
+ }, r(u(B).designReference.replaceCancel), 1), f("button", {
252
+ class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
253
+ onClick: $
254
+ }, r(u(B).designReference.replaceConfirm), 1)])])) : l("", !0),
255
+ u(V).error.value ? (n(), s("div", ve, [c(u(se), {
256
+ size: 14,
257
+ "stroke-width": 2,
258
+ class: "tpl:mt-0.5 tpl:shrink-0"
259
+ }), f("span", null, r(u(B).designReference.error), 1)])) : l("", !0),
260
+ q.value ? l("", !0) : (n(), s("button", {
261
+ key: 2,
262
+ class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
263
+ disabled: !Y.value,
264
+ onClick: $
265
+ }, [c(u(_), {
266
+ size: 16,
267
+ "stroke-width": 2
268
+ }), p(" " + r(u(B).designReference.generate), 1)], 8, ye)),
269
+ f("p", be, r(u(B).aiMenu.disclaimer), 1)
270
+ ]))])])) : l("", !0)]),
271
+ _: 1
272
+ }));
273
+ }
274
+ }), [["__scopeId", "data-v-bdbf8d0d"]]);
275
+ //#endregion
276
+ export { z as default };
@@ -0,0 +1,10 @@
1
+ import { M as e, _ as t } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
+ import { t as n } from "./_plugin-vue_export-helper-B0hnzhyu.js";
3
+ //#region src/components/LoadingTrack.vue
4
+ var r = {}, i = { class: "tpl-loading-track" };
5
+ function a(n, r) {
6
+ return e(), t("div", i);
7
+ }
8
+ var o = /* @__PURE__ */ n(r, [["render", a], ["__scopeId", "data-v-1ed538ec"]]);
9
+ //#endregion
10
+ export { o as t };