markstream-vue 0.0.2-beta.9 → 0.0.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.
@@ -1,34 +1,34 @@
1
- var Et = Object.defineProperty, Ft = Object.defineProperties;
2
- var Ht = Object.getOwnPropertyDescriptors;
3
- var Ie = Object.getOwnPropertySymbols;
4
- var Lt = Object.prototype.hasOwnProperty, Dt = Object.prototype.propertyIsEnumerable;
5
- var Ve = (f, u, i) => u in f ? Et(f, u, { enumerable: !0, configurable: !0, writable: !0, value: i }) : f[u] = i, Re = (f, u) => {
1
+ var Ht = Object.defineProperty, Tt = Object.defineProperties;
2
+ var Dt = Object.getOwnPropertyDescriptors;
3
+ var Ve = Object.getOwnPropertySymbols;
4
+ var Pt = Object.prototype.hasOwnProperty, Lt = Object.prototype.propertyIsEnumerable;
5
+ var Re = (f, u, i) => u in f ? Ht(f, u, { enumerable: !0, configurable: !0, writable: !0, value: i }) : f[u] = i, _e = (f, u) => {
6
6
  for (var i in u || (u = {}))
7
- Lt.call(u, i) && Ve(f, i, u[i]);
8
- if (Ie)
9
- for (var i of Ie(u))
10
- Dt.call(u, i) && Ve(f, i, u[i]);
7
+ Pt.call(u, i) && Re(f, i, u[i]);
8
+ if (Ve)
9
+ for (var i of Ve(u))
10
+ Lt.call(u, i) && Re(f, i, u[i]);
11
11
  return f;
12
- }, _e = (f, u) => Ft(f, Ht(u));
13
- var R = (f, u, i) => new Promise((j, z) => {
14
- var H = (y) => {
12
+ }, Ye = (f, u) => Tt(f, Dt(u));
13
+ var _ = (f, u, i) => new Promise((j, I) => {
14
+ var F = (y) => {
15
15
  try {
16
16
  m(i.next(y));
17
17
  } catch ($) {
18
- z($);
18
+ I($);
19
19
  }
20
- }, r = (y) => {
20
+ }, a = (y) => {
21
21
  try {
22
22
  m(i.throw(y));
23
23
  } catch ($) {
24
- z($);
24
+ I($);
25
25
  }
26
- }, m = (y) => y.done ? j(y.value) : Promise.resolve(y.value).then(H, r);
26
+ }, m = (y) => y.done ? j(y.value) : Promise.resolve(y.value).then(F, a);
27
27
  m((i = i.apply(f, u)).next());
28
28
  });
29
- import { defineComponent as Je, computed as _, onMounted as Tt, onUnmounted as Qe, createBlock as xe, openBlock as F, Teleport as Pt, createElementVNode as a, normalizeClass as J, withModifiers as Ot, toDisplayString as be, unref as g, getCurrentInstance as $t, ref as B, watch as Y, onBeforeUnmount as Nt, nextTick as we, createElementBlock as O, normalizeStyle as Ye, createCommentVNode as X, withDirectives as Ae, renderSlot as ye, Fragment as zt, vShow as We } from "vue";
30
- import { u as Ze, _ as et, a as It, g as Vt, s as le, l as Rt, b as _t, c as Yt, d as je, h as At } from "./exports-CyoL-8XF.js";
31
- const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-frame__title" }, qt = { class: "html-preview-frame__label" }, Xt = ["srcdoc"], Ut = /* @__PURE__ */ Je({
29
+ import { defineComponent as Ze, computed as z, onMounted as Ot, onUnmounted as et, createBlock as Ce, openBlock as E, Teleport as $t, createElementVNode as r, normalizeClass as Q, withModifiers as Nt, toDisplayString as Me, unref as g, getCurrentInstance as zt, ref as B, watch as Y, onBeforeUnmount as It, nextTick as ye, createElementBlock as O, normalizeStyle as Ae, createCommentVNode as X, withDirectives as We, renderSlot as ke, Fragment as Vt, vShow as je } from "vue";
30
+ import { u as tt, _ as ot, n as xe, r as Rt, a as _t, g as Yt, s as ae, l as qe, b as At, c as Wt, d as Xe, h as jt } from "./exports-CnH6kN6F.js";
31
+ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-frame__title" }, Ut = { class: "html-preview-frame__label" }, Gt = ["srcdoc"], Kt = /* @__PURE__ */ Ze({
32
32
  __name: "HtmlPreviewFrame",
33
33
  props: {
34
34
  code: {},
@@ -37,10 +37,10 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
37
37
  title: {}
38
38
  },
39
39
  setup(f) {
40
- const u = f, { t: i } = Ze(), j = _(() => {
41
- const H = u.code || "", r = H.trim().toLowerCase();
42
- if (r.startsWith("<!doctype") || r.startsWith("<html") || r.startsWith("<body"))
43
- return H;
40
+ const u = f, { t: i } = tt(), j = z(() => {
41
+ const F = u.code || "", a = F.trim().toLowerCase();
42
+ if (a.startsWith("<!doctype") || a.startsWith("<html") || a.startsWith("<body"))
43
+ return F;
44
44
  const m = u.isDark ? "#020617" : "#ffffff", y = u.isDark ? "#e5e7eb" : "#020617";
45
45
  return `<!doctype html>
46
46
  <html lang="en">
@@ -61,59 +61,59 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
61
61
  </style>
62
62
  </head>
63
63
  <body>
64
- ${H}
64
+ ${F}
65
65
  </body>
66
66
  </html>`;
67
67
  });
68
- function z(H) {
69
- var r;
70
- (H.key === "Escape" || H.key === "Esc") && ((r = u.onClose) == null || r.call(u));
68
+ function I(F) {
69
+ var a;
70
+ (F.key === "Escape" || F.key === "Esc") && ((a = u.onClose) == null || a.call(u));
71
71
  }
72
- return Tt(() => {
73
- typeof window != "undefined" && window.addEventListener("keydown", z);
74
- }), Qe(() => {
75
- typeof window != "undefined" && window.removeEventListener("keydown", z);
76
- }), (H, r) => (F(), xe(Pt, { to: "body" }, [
77
- a("div", {
78
- class: J(["html-preview-frame__backdrop", { "html-preview-frame__backdrop--dark": u.isDark }]),
79
- onClick: r[2] || (r[2] = (m) => {
72
+ return Ot(() => {
73
+ typeof window != "undefined" && window.addEventListener("keydown", I);
74
+ }), et(() => {
75
+ typeof window != "undefined" && window.removeEventListener("keydown", I);
76
+ }), (F, a) => (E(), Ce($t, { to: "body" }, [
77
+ r("div", {
78
+ class: Q(["html-preview-frame__backdrop", { "html-preview-frame__backdrop--dark": u.isDark }]),
79
+ onClick: a[2] || (a[2] = (m) => {
80
80
  var y;
81
81
  return (y = u.onClose) == null ? void 0 : y.call(u);
82
82
  })
83
83
  }, [
84
- a("div", {
85
- class: J(["html-preview-frame", { "html-preview-frame--dark": u.isDark }]),
86
- onClick: r[1] || (r[1] = Ot(() => {
84
+ r("div", {
85
+ class: Q(["html-preview-frame", { "html-preview-frame--dark": u.isDark }]),
86
+ onClick: a[1] || (a[1] = Nt(() => {
87
87
  }, ["stop"]))
88
88
  }, [
89
- a("div", Wt, [
90
- a("div", jt, [
91
- r[3] || (r[3] = a("span", { class: "html-preview-frame__dot" }, null, -1)),
92
- a("span", qt, be(u.title || g(i)("common.preview") || "Preview"), 1)
89
+ r("div", qt, [
90
+ r("div", Xt, [
91
+ a[3] || (a[3] = r("span", { class: "html-preview-frame__dot" }, null, -1)),
92
+ r("span", Ut, Me(u.title || g(i)("common.preview") || "Preview"), 1)
93
93
  ]),
94
- a("button", {
94
+ r("button", {
95
95
  type: "button",
96
- class: J(["html-preview-frame__close", { "html-preview-frame__close--dark": u.isDark }]),
97
- onClick: r[0] || (r[0] = (m) => {
96
+ class: Q(["html-preview-frame__close", { "html-preview-frame__close--dark": u.isDark }]),
97
+ onClick: a[0] || (a[0] = (m) => {
98
98
  var y;
99
99
  return (y = u.onClose) == null ? void 0 : y.call(u);
100
100
  })
101
101
  }, " × ", 2)
102
102
  ]),
103
- a("iframe", {
103
+ r("iframe", {
104
104
  class: "html-preview-frame__iframe",
105
105
  sandbox: "allow-scripts allow-same-origin",
106
106
  srcdoc: j.value
107
- }, null, 8, Xt)
107
+ }, null, 8, Gt)
108
108
  ], 2)
109
109
  ], 2)
110
110
  ]));
111
111
  }
112
- }), Gt = /* @__PURE__ */ et(Ut, [["__scopeId", "data-v-3cf0ed56"]]), Kt = {
112
+ }), Jt = /* @__PURE__ */ ot(Kt, [["__scopeId", "data-v-3cf0ed56"]]), Qt = {
113
113
  key: 0,
114
114
  class: "code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",
115
115
  style: { color: "var(--vscode-editor-foreground)", "background-color": "var(--vscode-editor-background)" }
116
- }, Jt = { class: "flex items-center space-x-2 flex-1 overflow-hidden" }, Qt = ["innerHTML"], Zt = { class: "text-sm font-medium font-mono truncate" }, eo = { class: "flex items-center space-x-2" }, to = ["aria-pressed"], oo = ["disabled"], no = ["disabled"], io = ["disabled"], lo = ["aria-label"], ro = {
116
+ }, Zt = { class: "flex items-center space-x-2 flex-1 overflow-hidden" }, eo = ["innerHTML"], to = { class: "text-sm font-medium font-mono truncate" }, oo = { class: "flex items-center space-x-2" }, no = ["aria-pressed"], io = ["disabled"], lo = ["disabled"], ao = ["disabled"], ro = ["aria-label"], so = {
117
117
  key: 0,
118
118
  xmlns: "http://www.w3.org/2000/svg",
119
119
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
@@ -123,7 +123,7 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
123
123
  height: "1em",
124
124
  viewBox: "0 0 24 24",
125
125
  class: "w-3 h-3"
126
- }, ao = {
126
+ }, uo = {
127
127
  key: 1,
128
128
  xmlns: "http://www.w3.org/2000/svg",
129
129
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
@@ -133,7 +133,7 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
133
133
  height: "1em",
134
134
  viewBox: "0 0 24 24",
135
135
  class: "w-3 h-3"
136
- }, so = ["aria-pressed"], uo = {
136
+ }, co = ["aria-pressed"], fo = {
137
137
  key: 0,
138
138
  xmlns: "http://www.w3.org/2000/svg",
139
139
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
@@ -143,7 +143,7 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
143
143
  height: "1em",
144
144
  viewBox: "0 0 24 24",
145
145
  class: "w-3 h-3"
146
- }, co = {
146
+ }, vo = {
147
147
  key: 1,
148
148
  xmlns: "http://www.w3.org/2000/svg",
149
149
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
@@ -153,11 +153,11 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
153
153
  height: "1em",
154
154
  viewBox: "0 0 24 24",
155
155
  class: "w-3 h-3"
156
- }, fo = ["aria-label"], vo = { class: "code-loading-placeholder" }, mo = {
156
+ }, mo = ["aria-label"], ho = { class: "code-loading-placeholder" }, go = {
157
157
  class: "sr-only",
158
158
  "aria-live": "polite",
159
159
  role: "status"
160
- }, qe = 10, Xe = 36, Ue = 1, Ge = 0, Ke = 1.5, re = 1, ho = /* @__PURE__ */ Je({
160
+ }, Ue = 10, Ge = 36, Ke = 1, Je = 0, Qe = 1.5, re = 1, po = /* @__PURE__ */ Ze({
161
161
  __name: "CodeBlockNode",
162
162
  props: {
163
163
  node: {},
@@ -181,78 +181,78 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
181
181
  },
182
182
  emits: ["previewCode", "copy"],
183
183
  setup(f, { emit: u }) {
184
- var De, Te;
185
- const i = f, j = u, z = $t(), H = _(() => {
186
- const t = z == null ? void 0 : z.vnode.props;
184
+ var Le;
185
+ const i = f, j = u, I = zt(), F = z(() => {
186
+ const t = I == null ? void 0 : I.vnode.props;
187
187
  return !!(t && (t.onPreviewCode || t.onPreviewCode));
188
- }), { t: r } = Ze(), m = B(null), y = B(null), $ = B(!1), S = B(String((De = i.node.language) != null ? De : "")), C = B(!1), M = B(!1), Q = B(!1), Ce = B(!1), A = B(null);
189
- let ae = 0;
190
- const tt = It(), U = B(null), I = B(typeof window == "undefined");
188
+ }), { t: a } = tt(), m = B(null), y = B(null), $ = B(!1), P = B(xe(i.node.language)), U = z(() => Rt(P.value)), C = B(!1), M = B(!1), Z = B(!1), Be = B(!1), A = B(null);
189
+ let se = 0;
190
+ const nt = _t(), G = B(null), V = B(typeof window == "undefined");
191
191
  typeof window != "undefined" && Y(
192
192
  () => y.value,
193
193
  (t) => {
194
194
  var o;
195
- if ((o = U.value) == null || o.destroy(), U.value = null, !t) {
196
- I.value = !1;
195
+ if ((o = G.value) == null || o.destroy(), G.value = null, !t) {
196
+ V.value = !1;
197
197
  return;
198
198
  }
199
- const e = tt(t, { rootMargin: "400px" });
200
- U.value = e, I.value = e.isVisible.value, e.whenVisible.then(() => {
201
- I.value = !0;
199
+ const e = nt(t, { rootMargin: "400px" });
200
+ G.value = e, V.value = e.isVisible.value, e.whenVisible.then(() => {
201
+ V.value = !0;
202
202
  });
203
203
  },
204
204
  { immediate: !0 }
205
- ), Nt(() => {
205
+ ), It(() => {
206
206
  var t;
207
- (t = U.value) == null || t.destroy(), U.value = null;
207
+ (t = G.value) == null || t.destroy(), G.value = null;
208
208
  });
209
- let V = null, Z = null, se = () => {
210
- }, ue = () => {
211
- }, ee = () => null, N = () => ({ getModel: () => ({ getLineCount: () => 1 }), getOption: () => 14, updateOptions: () => {
212
- } }), P = () => ({ getModel: () => ({ getLineCount: () => 1 }), getOption: () => 14, updateOptions: () => {
213
- } }), te = () => {
209
+ let R = null, ee = null, ue = () => {
214
210
  }, ce = () => {
215
- }, G = null, Me = () => {
211
+ }, te = () => null, N = () => ({ getModel: () => ({ getLineCount: () => 1 }), getOption: () => 14, updateOptions: () => {
212
+ } }), L = () => ({ getModel: () => ({ getLineCount: () => 1 }), getOption: () => 14, updateOptions: () => {
213
+ } }), oe = () => {
214
+ }, de = () => {
215
+ }, K = null, Se = () => {
216
216
  var t;
217
217
  return String((t = i.node.language) != null ? t : "plaintext");
218
- }, de = () => R(null, null, function* () {
218
+ }, fe = () => _(null, null, function* () {
219
219
  });
220
- const L = _(() => i.node.diff), fe = B(!1), oe = B(!1);
221
- typeof window != "undefined" && R(null, null, function* () {
220
+ const H = z(() => i.node.diff), ve = B(!1), ne = B(!1);
221
+ typeof window != "undefined" && _(null, null, function* () {
222
222
  try {
223
- const t = yield Vt();
223
+ const t = yield Yt();
224
224
  if (!t) {
225
- fe.value = !0;
225
+ ve.value = !0;
226
226
  return;
227
227
  }
228
228
  const e = t.useMonaco, o = t.detectLanguage;
229
- if (typeof o == "function" && (Me = o), typeof e == "function") {
230
- const n = Le();
229
+ if (typeof o == "function" && (Se = o), typeof e == "function") {
230
+ const n = Pe();
231
231
  if (n && i.themes && Array.isArray(i.themes) && !i.themes.includes(n))
232
232
  throw new Error("Preferred theme not in provided themes array");
233
- const l = e(_e(Re({
233
+ const l = e(Ye(_e({
234
234
  wordWrap: "on",
235
235
  wrappingIndent: "same",
236
236
  themes: i.themes,
237
237
  theme: n
238
238
  }, i.monacoOptions || {}), {
239
239
  onThemeChange() {
240
- at();
240
+ ut();
241
241
  }
242
242
  }));
243
- V = l.createEditor || V, Z = l.createDiffEditor || Z, se = l.updateCode || se, ue = l.updateDiff || ue, ee = l.getEditor || ee, N = l.getEditorView || N, P = l.getDiffEditorView || P, te = l.cleanupEditor || te, ce = l.safeClean || l.cleanupEditor || ce, de = l.setTheme || de, Ce.value = !0, m.value && (yield ge(m.value));
243
+ R = l.createEditor || R, ee = l.createDiffEditor || ee, ue = l.updateCode || ue, ce = l.updateDiff || ce, te = l.getEditor || te, N = l.getEditorView || N, L = l.getDiffEditorView || L, oe = l.cleanupEditor || oe, de = l.safeClean || l.cleanupEditor || de, fe = l.setTheme || fe, Be.value = !0, m.value && (yield pe(m.value));
244
244
  }
245
245
  } catch (t) {
246
- fe.value = !0;
246
+ ve.value = !0;
247
247
  }
248
248
  });
249
- const D = B(
250
- typeof ((Te = i.monacoOptions) == null ? void 0 : Te.fontSize) == "number" ? i.monacoOptions.fontSize : Number.NaN
251
- ), v = B(D.value), ot = _(() => {
252
- const t = D.value, e = v.value;
249
+ const T = B(
250
+ typeof ((Le = i.monacoOptions) == null ? void 0 : Le.fontSize) == "number" ? i.monacoOptions.fontSize : Number.NaN
251
+ ), v = B(T.value), it = z(() => {
252
+ const t = T.value, e = v.value;
253
253
  return typeof t == "number" && Number.isFinite(t) && t > 0 && typeof e == "number" && Number.isFinite(e) && e > 0;
254
254
  });
255
- function nt() {
255
+ function lt() {
256
256
  try {
257
257
  const t = m.value;
258
258
  if (!t)
@@ -267,10 +267,10 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
267
267
  }
268
268
  return null;
269
269
  }
270
- function Be() {
270
+ function Ee() {
271
271
  var t, e, o, n, l;
272
272
  try {
273
- const s = L.value ? (o = (e = (t = P()) == null ? void 0 : t.getModifiedEditor) == null ? void 0 : e.call(t)) != null ? o : P() : N(), w = ee(), p = (n = w == null ? void 0 : w.EditorOption) == null ? void 0 : n.fontInfo;
273
+ const s = H.value ? (o = (e = (t = L()) == null ? void 0 : t.getModifiedEditor) == null ? void 0 : e.call(t)) != null ? o : L() : N(), w = te(), p = (n = w == null ? void 0 : w.EditorOption) == null ? void 0 : n.fontInfo;
274
274
  if (s && p != null) {
275
275
  const k = (l = s.getOption) == null ? void 0 : l.call(s, p), d = k == null ? void 0 : k.fontSize;
276
276
  if (typeof d == "number" && Number.isFinite(d) && d > 0)
@@ -296,10 +296,10 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
296
296
  }
297
297
  return null;
298
298
  }
299
- function ve(t) {
299
+ function me(t) {
300
300
  var n, l;
301
301
  try {
302
- const s = ee(), w = (n = s == null ? void 0 : s.EditorOption) == null ? void 0 : n.lineHeight;
302
+ const s = te(), w = (n = s == null ? void 0 : s.EditorOption) == null ? void 0 : n.lineHeight;
303
303
  if (w != null) {
304
304
  const p = (l = t == null ? void 0 : t.getOption) == null ? void 0 : l.call(t, w);
305
305
  if (typeof p == "number" && p > 0)
@@ -307,60 +307,60 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
307
307
  }
308
308
  } catch (s) {
309
309
  }
310
- const e = nt();
310
+ const e = lt();
311
311
  if (e && e > 0)
312
312
  return e;
313
313
  const o = Number.isFinite(v.value) && v.value > 0 ? v.value : 12;
314
314
  return Math.max(12, Math.round(o * 1.35));
315
315
  }
316
- function me() {
316
+ function he() {
317
317
  var e;
318
- if (Number.isFinite(v.value) && v.value > 0 && Number.isFinite(D.value))
318
+ if (Number.isFinite(v.value) && v.value > 0 && Number.isFinite(T.value))
319
319
  return v.value;
320
- const t = Be();
321
- return typeof ((e = i.monacoOptions) == null ? void 0 : e.fontSize) == "number" ? (D.value = i.monacoOptions.fontSize, v.value = i.monacoOptions.fontSize, v.value) : t && t > 0 ? (D.value = t, v.value = t, t) : (D.value = 12, v.value = 12, 12);
320
+ const t = Ee();
321
+ return typeof ((e = i.monacoOptions) == null ? void 0 : e.fontSize) == "number" ? (T.value = i.monacoOptions.fontSize, v.value = i.monacoOptions.fontSize, v.value) : t && t > 0 ? (T.value = t, v.value = t, t) : (T.value = 12, v.value = 12, 12);
322
322
  }
323
- function it() {
324
- const t = me(), e = Math.min(Xe, t + Ue);
323
+ function at() {
324
+ const t = he(), e = Math.min(Ge, t + Ke);
325
325
  v.value = e;
326
326
  }
327
- function lt() {
328
- const t = me(), e = Math.max(qe, t - Ue);
327
+ function rt() {
328
+ const t = he(), e = Math.max(Ue, t - Ke);
329
329
  v.value = e;
330
330
  }
331
- function rt() {
332
- me(), Number.isFinite(D.value) && (v.value = D.value);
331
+ function st() {
332
+ he(), Number.isFinite(T.value) && (v.value = T.value);
333
333
  }
334
- function Se() {
335
- var t, e, o, n, l, s, w, p, k, d, h, Pe, Oe, $e;
334
+ function Fe() {
335
+ var t, e, o, n, l, s, w, p, k, d, h, Oe, $e, Ne;
336
336
  try {
337
- const c = L.value ? P() : N();
337
+ const c = H.value ? L() : N();
338
338
  if (!c)
339
339
  return null;
340
- if (L.value && (c != null && c.getOriginalEditor) && (c != null && c.getModifiedEditor)) {
340
+ if (H.value && (c != null && c.getOriginalEditor) && (c != null && c.getModifiedEditor)) {
341
341
  const x = (t = c.getOriginalEditor) == null ? void 0 : t.call(c), b = (e = c.getModifiedEditor) == null ? void 0 : e.call(c);
342
342
  (o = x == null ? void 0 : x.layout) == null || o.call(x), (n = b == null ? void 0 : b.layout) == null || n.call(b);
343
- const xt = ((l = x == null ? void 0 : x.getContentHeight) == null ? void 0 : l.call(x)) || 0, bt = ((s = b == null ? void 0 : b.getContentHeight) == null ? void 0 : s.call(b)) || 0, ze = Math.max(xt, bt);
344
- if (ze > 0)
345
- return Math.ceil(ze + re);
346
- const Ct = ((k = (p = (w = x == null ? void 0 : x.getModel) == null ? void 0 : w.call(x)) == null ? void 0 : p.getLineCount) == null ? void 0 : k.call(p)) || 1, Mt = ((Pe = (h = (d = b == null ? void 0 : b.getModel) == null ? void 0 : d.call(b)) == null ? void 0 : h.getLineCount) == null ? void 0 : Pe.call(h)) || 1, Bt = Math.max(Ct, Mt), St = Math.max(ve(x), ve(b));
347
- return Math.ceil(Bt * (St + Ke) + Ge + re);
343
+ const Ct = ((l = x == null ? void 0 : x.getContentHeight) == null ? void 0 : l.call(x)) || 0, Mt = ((s = b == null ? void 0 : b.getContentHeight) == null ? void 0 : s.call(b)) || 0, Ie = Math.max(Ct, Mt);
344
+ if (Ie > 0)
345
+ return Math.ceil(Ie + re);
346
+ const Bt = ((k = (p = (w = x == null ? void 0 : x.getModel) == null ? void 0 : w.call(x)) == null ? void 0 : p.getLineCount) == null ? void 0 : k.call(p)) || 1, St = ((Oe = (h = (d = b == null ? void 0 : b.getModel) == null ? void 0 : d.call(b)) == null ? void 0 : h.getLineCount) == null ? void 0 : Oe.call(h)) || 1, Et = Math.max(Bt, St), Ft = Math.max(me(x), me(b));
347
+ return Math.ceil(Et * (Ft + Qe) + Je + re);
348
348
  } else if (c != null && c.getContentHeight) {
349
- (Oe = c == null ? void 0 : c.layout) == null || Oe.call(c);
349
+ ($e = c == null ? void 0 : c.layout) == null || $e.call(c);
350
350
  const x = c.getContentHeight();
351
351
  if (x > 0)
352
352
  return Math.ceil(x + re);
353
353
  }
354
- const pe = ($e = c == null ? void 0 : c.getModel) == null ? void 0 : $e.call(c);
355
- let Ne = 1;
356
- pe && typeof pe.getLineCount == "function" && (Ne = pe.getLineCount());
357
- const kt = ve(c);
358
- return Math.ceil(Ne * (kt + Ke) + Ge + re);
354
+ const we = (Ne = c == null ? void 0 : c.getModel) == null ? void 0 : Ne.call(c);
355
+ let ze = 1;
356
+ we && typeof we.getLineCount == "function" && (ze = we.getLineCount());
357
+ const bt = me(c);
358
+ return Math.ceil(ze * (bt + Qe) + Je + re);
359
359
  } catch (c) {
360
360
  return null;
361
361
  }
362
362
  }
363
- function at() {
363
+ function ut() {
364
364
  var p, k, d;
365
365
  const t = m.value, e = y.value;
366
366
  if (!t || !e)
@@ -381,7 +381,7 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
381
381
  const t = m.value;
382
382
  if (!t)
383
383
  return;
384
- const e = t.getBoundingClientRect(), o = window.scrollY + e.top, n = Se();
384
+ const e = t.getBoundingClientRect(), o = window.scrollY + e.top, n = Fe();
385
385
  if (n != null && n > 0) {
386
386
  const l = e.height;
387
387
  t.style.height = `${Math.ceil(n)}px`, t.style.maxHeight = "none";
@@ -397,15 +397,15 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
397
397
  const e = m.value;
398
398
  if (!e)
399
399
  return;
400
- const o = e.getBoundingClientRect(), n = window.scrollY + o.top, l = o.height, s = st();
401
- if (ae > 0 && (ae--, A.value != null)) {
400
+ const o = e.getBoundingClientRect(), n = window.scrollY + o.top, l = o.height, s = ct();
401
+ if (se > 0 && (se--, A.value != null)) {
402
402
  const d = Math.min(A.value, s);
403
403
  e.style.height = `${Math.ceil(d)}px`, e.style.maxHeight = `${Math.ceil(s)}px`, e.style.overflow = "auto";
404
404
  const h = Math.ceil(d) - l;
405
405
  h !== 0 && n < window.scrollY && window.scrollBy(0, h);
406
406
  return;
407
407
  }
408
- const w = Se();
408
+ const w = Fe();
409
409
  if (w != null && w > 0) {
410
410
  const d = Math.min(w, s);
411
411
  e.style.height = `${Math.ceil(d)}px`, e.style.maxHeight = `${Math.ceil(s)}px`, e.style.overflow = "auto";
@@ -444,7 +444,7 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
444
444
  } catch (e) {
445
445
  }
446
446
  }
447
- function st() {
447
+ function ct() {
448
448
  var o, n;
449
449
  const t = (n = (o = i.monacoOptions) == null ? void 0 : o.MAX_HEIGHT) != null ? n : 500;
450
450
  if (typeof t == "number")
@@ -452,46 +452,38 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
452
452
  const e = String(t).match(/^(\d+(?:\.\d+)?)/);
453
453
  return e ? Number.parseFloat(e[1]) : 500;
454
454
  }
455
- const he = _(() => {
456
- const t = S.value.trim().toLowerCase();
457
- return i.isShowPreview && (t === "html" || t === "svg");
458
- }), K = _(
459
- () => S.value.trim().toLowerCase() === "mermaid"
460
- );
455
+ const ge = z(() => i.isShowPreview && (P.value === "html" || P.value === "svg")), J = z(() => P.value === "mermaid");
461
456
  Y(
462
457
  () => i.node.language,
463
458
  (t) => {
464
- S.value = t;
459
+ P.value = xe(t);
465
460
  }
466
461
  ), Y(
467
462
  () => i.node.code,
468
- (t) => R(null, null, function* () {
463
+ (t) => _(null, null, function* () {
469
464
  var e, o;
470
465
  if (i.stream !== !1) {
471
- if (S.value || (S.value = Me(t)), V && !Q.value && m.value)
466
+ if (P.value || (P.value = xe(Se(t))), R && !Z.value && m.value)
472
467
  try {
473
- yield ge(m.value);
468
+ yield pe(m.value);
474
469
  } catch (n) {
475
470
  }
476
- L.value ? ue(String((e = i.node.originalCode) != null ? e : ""), String((o = i.node.updatedCode) != null ? o : ""), S.value) : se(t, S.value), C.value && le(() => W());
471
+ H.value ? ce(String((e = i.node.originalCode) != null ? e : ""), String((o = i.node.updatedCode) != null ? o : ""), U.value) : ue(t, U.value), C.value && ae(() => W());
477
472
  }
478
473
  })
479
474
  );
480
- const ut = _(() => {
481
- const t = S.value.trim().toLowerCase();
482
- return Rt[t] || t.charAt(0).toUpperCase() + t.slice(1);
483
- }), ct = _(() => {
484
- const t = S.value.trim().toLowerCase();
485
- return _t(t.split(":")[0]);
486
- }), dt = _(() => {
475
+ const dt = z(() => {
476
+ const t = P.value;
477
+ return t ? qe[t] || t.charAt(0).toUpperCase() + t.slice(1) : qe[""] || "Plain Text";
478
+ }), ft = z(() => At(P.value || "")), vt = z(() => {
487
479
  const t = {}, e = (l) => {
488
480
  if (l != null)
489
481
  return typeof l == "number" ? `${l}px` : String(l);
490
482
  }, o = e(i.minWidth), n = e(i.maxWidth);
491
483
  return o && (t.minWidth = o), n && (t.maxWidth = n), t;
492
484
  });
493
- function ft() {
494
- return R(this, null, function* () {
485
+ function mt() {
486
+ return _(this, null, function* () {
495
487
  try {
496
488
  typeof navigator != "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText == "function" && (yield navigator.clipboard.writeText(i.node.code)), $.value = !0, j("copy", i.node.code), setTimeout(() => {
497
489
  $.value = !1;
@@ -501,46 +493,46 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
501
493
  }
502
494
  });
503
495
  }
504
- function Ee(t) {
496
+ function He(t) {
505
497
  const e = t;
506
498
  return !e || e.disabled;
507
499
  }
508
- function T(t, e, o = "top") {
509
- if (Ee(t.currentTarget))
500
+ function D(t, e, o = "top") {
501
+ if (He(t.currentTarget))
510
502
  return;
511
503
  const n = t, l = (n == null ? void 0 : n.clientX) != null && (n == null ? void 0 : n.clientY) != null ? { x: n.clientX, y: n.clientY } : void 0;
512
- je(t.currentTarget, e, o, !1, l, i.isDark);
504
+ Xe(t.currentTarget, e, o, !1, l, i.isDark);
513
505
  }
514
- function E() {
515
- At();
506
+ function S() {
507
+ jt();
516
508
  }
517
- function Fe(t) {
518
- if (Ee(t.currentTarget))
509
+ function Te(t) {
510
+ if (He(t.currentTarget))
519
511
  return;
520
- const e = $.value ? r("common.copied") || "Copied" : r("common.copy") || "Copy", o = t, n = (o == null ? void 0 : o.clientX) != null && (o == null ? void 0 : o.clientY) != null ? { x: o.clientX, y: o.clientY } : void 0;
521
- je(t.currentTarget, e, "top", !1, n, i.isDark);
512
+ const e = $.value ? a("common.copied") || "Copied" : a("common.copy") || "Copy", o = t, n = (o == null ? void 0 : o.clientX) != null && (o == null ? void 0 : o.clientY) != null ? { x: o.clientX, y: o.clientY } : void 0;
513
+ Xe(t.currentTarget, e, "top", !1, n, i.isDark);
522
514
  }
523
- function vt() {
515
+ function ht() {
524
516
  C.value = !C.value;
525
- const t = L.value ? P() : N(), e = m.value;
526
- !t || !e || (C.value ? (ne(!0), e.style.maxHeight = "none", e.style.overflow = "visible", W()) : (ne(!1), e.style.overflow = "auto", q()));
517
+ const t = H.value ? L() : N(), e = m.value;
518
+ !t || !e || (C.value ? (ie(!0), e.style.maxHeight = "none", e.style.overflow = "visible", W()) : (ie(!1), e.style.overflow = "auto", q()));
527
519
  }
528
- function mt() {
520
+ function gt() {
529
521
  var t, e, o;
530
522
  if (M.value = !M.value, M.value) {
531
523
  if (m.value) {
532
524
  const n = Math.ceil(((e = (t = m.value).getBoundingClientRect) == null ? void 0 : e.call(t).height) || 0);
533
525
  n > 0 && (A.value = n);
534
526
  }
535
- ne(!1);
527
+ ie(!1);
536
528
  } else {
537
- C.value && ne(!0), m.value && A.value != null && (m.value.style.height = `${A.value}px`);
538
- const n = L.value ? P() : N();
529
+ C.value && ie(!0), m.value && A.value != null && (m.value.style.height = `${A.value}px`);
530
+ const n = H.value ? L() : N();
539
531
  try {
540
532
  (o = n == null ? void 0 : n.layout) == null || o.call(n);
541
533
  } catch (l) {
542
534
  }
543
- ae = 2, le(() => {
535
+ se = 2, ae(() => {
544
536
  C.value ? W() : q();
545
537
  });
546
538
  }
@@ -548,17 +540,17 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
548
540
  Y(
549
541
  () => v.value,
550
542
  (t, e) => {
551
- const o = L.value ? P() : N();
543
+ const o = H.value ? L() : N();
552
544
  o && typeof t == "number" && Number.isFinite(t) && t > 0 && (o.updateOptions({ fontSize: t }), C.value && !M.value && W());
553
545
  },
554
546
  { flush: "post", immediate: !1 }
555
547
  );
556
- function ht() {
557
- if (!he.value)
548
+ function pt() {
549
+ if (!ge.value)
558
550
  return;
559
- const t = (S.value || i.node.language).toLowerCase();
560
- if (H.value) {
561
- const e = t === "html" ? "text/html" : "image/svg+xml", o = t === "html" ? r("artifacts.htmlPreviewTitle") || "HTML Preview" : r("artifacts.svgPreviewTitle") || "SVG Preview";
551
+ const t = P.value;
552
+ if (F.value) {
553
+ const e = t === "html" ? "text/html" : "image/svg+xml", o = t === "html" ? a("artifacts.htmlPreviewTitle") || "HTML Preview" : a("artifacts.svgPreviewTitle") || "SVG Preview";
562
554
  j("previewCode", {
563
555
  node: i.node,
564
556
  artifactType: e,
@@ -567,13 +559,13 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
567
559
  });
568
560
  return;
569
561
  }
570
- t === "html" && (oe.value = !oe.value);
562
+ t === "html" && (ne.value = !ne.value);
571
563
  }
572
- function ne(t) {
564
+ function ie(t) {
573
565
  var e, o;
574
566
  try {
575
- if (L.value) {
576
- const n = P();
567
+ if (H.value) {
568
+ const n = L();
577
569
  (e = n == null ? void 0 : n.updateOptions) == null || e.call(n, { automaticLayout: t });
578
570
  } else {
579
571
  const n = N();
@@ -582,129 +574,129 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
582
574
  } catch (n) {
583
575
  }
584
576
  }
585
- function gt(t) {
586
- return R(this, null, function* () {
577
+ function wt(t) {
578
+ return _(this, null, function* () {
587
579
  var o, n, l;
588
- if (!V)
580
+ if (!R)
589
581
  return;
590
- L.value ? (ce(), Z ? yield Z(t, String((o = i.node.originalCode) != null ? o : ""), String((n = i.node.updatedCode) != null ? n : ""), S.value) : yield V(t, i.node.code, S.value)) : yield V(t, i.node.code, S.value);
591
- const e = L.value ? P() : N();
582
+ H.value ? (de(), ee ? yield ee(t, String((o = i.node.originalCode) != null ? o : ""), String((n = i.node.updatedCode) != null ? n : ""), U.value) : yield R(t, i.node.code, U.value)) : yield R(t, i.node.code, U.value);
583
+ const e = H.value ? L() : N();
592
584
  if (typeof ((l = i.monacoOptions) == null ? void 0 : l.fontSize) == "number")
593
- e == null || e.updateOptions({ fontSize: i.monacoOptions.fontSize, automaticLayout: !1 }), D.value = i.monacoOptions.fontSize, v.value = i.monacoOptions.fontSize;
585
+ e == null || e.updateOptions({ fontSize: i.monacoOptions.fontSize, automaticLayout: !1 }), T.value = i.monacoOptions.fontSize, v.value = i.monacoOptions.fontSize;
594
586
  else {
595
- const s = Be();
596
- s && s > 0 ? (D.value = s, v.value = s) : (D.value = 12, v.value = 12);
587
+ const s = Ee();
588
+ s && s > 0 ? (T.value = s, v.value = s) : (T.value = 12, v.value = 12);
597
589
  }
598
- !C.value && !M.value && q(), i.loading === !1 && (yield we(), le(() => {
590
+ !C.value && !M.value && q(), i.loading === !1 && (yield ye(), ae(() => {
599
591
  C.value && !M.value ? W() : M.value || q();
600
592
  }));
601
593
  });
602
594
  }
603
- function ge(t) {
604
- return V ? G || (Q.value = !0, G = R(null, null, function* () {
605
- yield gt(t);
595
+ function pe(t) {
596
+ return R ? K || (Z.value = !0, K = _(null, null, function* () {
597
+ yield wt(t);
606
598
  }).finally(() => {
607
- G = null;
608
- }), G) : null;
599
+ K = null;
600
+ }), K) : null;
609
601
  }
610
- const He = Y(
611
- () => [m.value, K.value, L.value, i.stream, i.loading, Ce.value, I.value],
612
- (p) => R(null, [p], function* ([t, e, o, n, l, s, w]) {
613
- if (!t || !V || !w || n === !1 && l !== !1)
602
+ const De = Y(
603
+ () => [m.value, J.value, H.value, i.stream, i.loading, Be.value, V.value],
604
+ (p) => _(null, [p], function* ([t, e, o, n, l, s, w]) {
605
+ if (!t || !R || !w || n === !1 && l !== !1)
614
606
  return;
615
- if (K.value) {
616
- te(), He();
607
+ if (J.value) {
608
+ oe(), De();
617
609
  return;
618
610
  }
619
- const k = ge(t);
620
- k && (yield k, He());
611
+ const k = pe(t);
612
+ k && (yield k, De());
621
613
  })
622
- ), pt = Y(
623
- () => [i.darkTheme, i.lightTheme, Q.value, I.value],
614
+ ), yt = Y(
615
+ () => [i.darkTheme, i.lightTheme, Z.value, V.value],
624
616
  () => {
625
- if (!(!Q.value || !I.value)) {
626
- if (K.value)
627
- return pt();
628
- wt();
617
+ if (!(!Z.value || !V.value)) {
618
+ if (J.value)
619
+ return yt();
620
+ kt();
629
621
  }
630
622
  }
631
623
  );
632
- function Le() {
624
+ function Pe() {
633
625
  return i.isDark ? i.darkTheme : i.lightTheme;
634
626
  }
635
- function wt() {
636
- const t = Le();
637
- t && de(t);
627
+ function kt() {
628
+ const t = Pe();
629
+ t && fe(t);
638
630
  }
639
- const yt = Y(
640
- () => [i.monacoOptions, I.value],
631
+ const xt = Y(
632
+ () => [i.monacoOptions, V.value],
641
633
  () => {
642
634
  var o, n;
643
- if (!V || !I.value)
635
+ if (!R || !V.value)
644
636
  return;
645
- if (K.value)
646
- return yt();
647
- const t = L.value ? P() : N(), e = typeof ((o = i.monacoOptions) == null ? void 0 : o.fontSize) == "number" ? i.monacoOptions.fontSize : Number.isFinite(v.value) ? v.value : void 0;
637
+ if (J.value)
638
+ return xt();
639
+ const t = H.value ? L() : N(), e = typeof ((o = i.monacoOptions) == null ? void 0 : o.fontSize) == "number" ? i.monacoOptions.fontSize : Number.isFinite(v.value) ? v.value : void 0;
648
640
  typeof e == "number" && Number.isFinite(e) && e > 0 && ((n = t == null ? void 0 : t.updateOptions) == null || n.call(t, { fontSize: e })), C.value && !M.value ? W() : M.value || q();
649
641
  },
650
642
  { deep: !0 }
651
- ), ie = Y(
652
- () => [i.loading, I.value],
653
- (o) => R(null, [o], function* ([t, e]) {
643
+ ), le = Y(
644
+ () => [i.loading, V.value],
645
+ (o) => _(null, [o], function* ([t, e]) {
654
646
  if (e) {
655
- if (K.value) {
656
- we(() => {
657
- ie == null || ie();
647
+ if (J.value) {
648
+ ye(() => {
649
+ le == null || le();
658
650
  });
659
651
  return;
660
652
  }
661
- t || (yield we(), le(() => {
662
- M.value || (C.value ? W() : q()), ie();
653
+ t || (yield ye(), ae(() => {
654
+ M.value || (C.value ? W() : q()), le();
663
655
  }));
664
656
  }
665
657
  }),
666
658
  { immediate: !0, flush: "post" }
667
659
  );
668
- return Qe(() => {
669
- te();
670
- }), (t, e) => fe.value ? (F(), xe(g(Yt), {
660
+ return et(() => {
661
+ oe();
662
+ }), (t, e) => ve.value ? (E(), Ce(g(Wt), {
671
663
  key: 0,
672
664
  node: f.node,
673
665
  loading: i.loading
674
- }, null, 8, ["node", "loading"])) : (F(), O("div", {
666
+ }, null, 8, ["node", "loading"])) : (E(), O("div", {
675
667
  key: 1,
676
668
  ref_key: "container",
677
669
  ref: y,
678
- style: Ye(dt.value),
679
- class: J(["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm", [
670
+ style: Ae(vt.value),
671
+ class: Q(["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm", [
680
672
  i.isDark ? "border-gray-700/30 bg-gray-900" : "border-gray-200 bg-white",
681
673
  { "is-rendering": i.loading, "is-dark": i.isDark }
682
674
  ]])
683
675
  }, [
684
- i.showHeader ? (F(), O("div", Kt, [
685
- ye(t.$slots, "header-left", {}, () => [
686
- a("div", Jt, [
687
- a("span", {
676
+ i.showHeader ? (E(), O("div", Qt, [
677
+ ke(t.$slots, "header-left", {}, () => [
678
+ r("div", Zt, [
679
+ r("span", {
688
680
  class: "icon-slot h-4 w-4 flex-shrink-0",
689
- innerHTML: ct.value
690
- }, null, 8, Qt),
691
- a("span", Zt, be(ut.value), 1)
681
+ innerHTML: ft.value
682
+ }, null, 8, eo),
683
+ r("span", to, Me(dt.value), 1)
692
684
  ])
693
685
  ], !0),
694
- ye(t.$slots, "header-right", {}, () => [
695
- a("div", eo, [
696
- a("button", {
686
+ ke(t.$slots, "header-right", {}, () => [
687
+ r("div", oo, [
688
+ r("button", {
697
689
  type: "button",
698
690
  class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
699
691
  "aria-pressed": M.value,
700
- onClick: mt,
701
- onMouseenter: e[0] || (e[0] = (o) => T(o, M.value ? g(r)("common.expand") || "Expand" : g(r)("common.collapse") || "Collapse")),
702
- onFocus: e[1] || (e[1] = (o) => T(o, M.value ? g(r)("common.expand") || "Expand" : g(r)("common.collapse") || "Collapse")),
703
- onMouseleave: E,
704
- onBlur: E
692
+ onClick: gt,
693
+ onMouseenter: e[0] || (e[0] = (o) => D(o, M.value ? g(a)("common.expand") || "Expand" : g(a)("common.collapse") || "Collapse")),
694
+ onFocus: e[1] || (e[1] = (o) => D(o, M.value ? g(a)("common.expand") || "Expand" : g(a)("common.collapse") || "Collapse")),
695
+ onMouseleave: S,
696
+ onBlur: S
705
697
  }, [
706
- (F(), O("svg", {
707
- style: Ye({ rotate: M.value ? "0deg" : "90deg" }),
698
+ (E(), O("svg", {
699
+ style: Ae({ rotate: M.value ? "0deg" : "90deg" }),
708
700
  xmlns: "http://www.w3.org/2000/svg",
709
701
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
710
702
  "aria-hidden": "true",
@@ -714,7 +706,7 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
714
706
  viewBox: "0 0 24 24",
715
707
  class: "w-3 h-3"
716
708
  }, [...e[17] || (e[17] = [
717
- a("path", {
709
+ r("path", {
718
710
  fill: "none",
719
711
  stroke: "currentColor",
720
712
  "stroke-linecap": "round",
@@ -723,19 +715,19 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
723
715
  d: "m9 18l6-6l-6-6"
724
716
  }, null, -1)
725
717
  ])], 4))
726
- ], 40, to),
727
- i.showFontSizeButtons && i.enableFontSizeControl ? (F(), O(zt, { key: 0 }, [
728
- a("button", {
718
+ ], 40, no),
719
+ i.showFontSizeButtons && i.enableFontSizeControl ? (E(), O(Vt, { key: 0 }, [
720
+ r("button", {
729
721
  type: "button",
730
722
  class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
731
- disabled: Number.isFinite(v.value) ? v.value <= qe : !1,
732
- onClick: e[2] || (e[2] = (o) => lt()),
733
- onMouseenter: e[3] || (e[3] = (o) => T(o, g(r)("common.decrease") || "Decrease")),
734
- onFocus: e[4] || (e[4] = (o) => T(o, g(r)("common.decrease") || "Decrease")),
735
- onMouseleave: E,
736
- onBlur: E
723
+ disabled: Number.isFinite(v.value) ? v.value <= Ue : !1,
724
+ onClick: e[2] || (e[2] = (o) => rt()),
725
+ onMouseenter: e[3] || (e[3] = (o) => D(o, g(a)("common.decrease") || "Decrease")),
726
+ onFocus: e[4] || (e[4] = (o) => D(o, g(a)("common.decrease") || "Decrease")),
727
+ onMouseleave: S,
728
+ onBlur: S
737
729
  }, [...e[18] || (e[18] = [
738
- a("svg", {
730
+ r("svg", {
739
731
  xmlns: "http://www.w3.org/2000/svg",
740
732
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
741
733
  "aria-hidden": "true",
@@ -745,7 +737,7 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
745
737
  viewBox: "0 0 24 24",
746
738
  class: "w-3 h-3"
747
739
  }, [
748
- a("path", {
740
+ r("path", {
749
741
  fill: "none",
750
742
  stroke: "currentColor",
751
743
  "stroke-linecap": "round",
@@ -754,18 +746,18 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
754
746
  d: "M5 12h14"
755
747
  })
756
748
  ], -1)
757
- ])], 40, oo),
758
- a("button", {
749
+ ])], 40, io),
750
+ r("button", {
759
751
  type: "button",
760
752
  class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
761
- disabled: !ot.value || v.value === D.value,
762
- onClick: e[5] || (e[5] = (o) => rt()),
763
- onMouseenter: e[6] || (e[6] = (o) => T(o, g(r)("common.reset") || "Reset")),
764
- onFocus: e[7] || (e[7] = (o) => T(o, g(r)("common.reset") || "Reset")),
765
- onMouseleave: E,
766
- onBlur: E
753
+ disabled: !it.value || v.value === T.value,
754
+ onClick: e[5] || (e[5] = (o) => st()),
755
+ onMouseenter: e[6] || (e[6] = (o) => D(o, g(a)("common.reset") || "Reset")),
756
+ onFocus: e[7] || (e[7] = (o) => D(o, g(a)("common.reset") || "Reset")),
757
+ onMouseleave: S,
758
+ onBlur: S
767
759
  }, [...e[19] || (e[19] = [
768
- a("svg", {
760
+ r("svg", {
769
761
  xmlns: "http://www.w3.org/2000/svg",
770
762
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
771
763
  "aria-hidden": "true",
@@ -775,29 +767,29 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
775
767
  viewBox: "0 0 24 24",
776
768
  class: "w-3 h-3"
777
769
  }, [
778
- a("g", {
770
+ r("g", {
779
771
  fill: "none",
780
772
  stroke: "currentColor",
781
773
  "stroke-linecap": "round",
782
774
  "stroke-linejoin": "round",
783
775
  "stroke-width": "2"
784
776
  }, [
785
- a("path", { d: "M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8" }),
786
- a("path", { d: "M3 3v5h5" })
777
+ r("path", { d: "M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8" }),
778
+ r("path", { d: "M3 3v5h5" })
787
779
  ])
788
780
  ], -1)
789
- ])], 40, no),
790
- a("button", {
781
+ ])], 40, lo),
782
+ r("button", {
791
783
  type: "button",
792
784
  class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
793
- disabled: Number.isFinite(v.value) ? v.value >= Xe : !1,
794
- onClick: e[8] || (e[8] = (o) => it()),
795
- onMouseenter: e[9] || (e[9] = (o) => T(o, g(r)("common.increase") || "Increase")),
796
- onFocus: e[10] || (e[10] = (o) => T(o, g(r)("common.increase") || "Increase")),
797
- onMouseleave: E,
798
- onBlur: E
785
+ disabled: Number.isFinite(v.value) ? v.value >= Ge : !1,
786
+ onClick: e[8] || (e[8] = (o) => at()),
787
+ onMouseenter: e[9] || (e[9] = (o) => D(o, g(a)("common.increase") || "Increase")),
788
+ onFocus: e[10] || (e[10] = (o) => D(o, g(a)("common.increase") || "Increase")),
789
+ onMouseleave: S,
790
+ onBlur: S
799
791
  }, [...e[20] || (e[20] = [
800
- a("svg", {
792
+ r("svg", {
801
793
  xmlns: "http://www.w3.org/2000/svg",
802
794
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
803
795
  "aria-hidden": "true",
@@ -807,7 +799,7 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
807
799
  viewBox: "0 0 24 24",
808
800
  class: "w-3 h-3"
809
801
  }, [
810
- a("path", {
802
+ r("path", {
811
803
  fill: "none",
812
804
  stroke: "currentColor",
813
805
  "stroke-linecap": "round",
@@ -816,21 +808,21 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
816
808
  d: "M5 12h14m-7-7v14"
817
809
  })
818
810
  ], -1)
819
- ])], 40, io)
811
+ ])], 40, ao)
820
812
  ], 64)) : X("", !0),
821
- i.showCopyButton ? (F(), O("button", {
813
+ i.showCopyButton ? (E(), O("button", {
822
814
  key: 1,
823
815
  type: "button",
824
816
  class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
825
- "aria-label": $.value ? g(r)("common.copied") || "Copied" : g(r)("common.copy") || "Copy",
826
- onClick: ft,
827
- onMouseenter: e[11] || (e[11] = (o) => Fe(o)),
828
- onFocus: e[12] || (e[12] = (o) => Fe(o)),
829
- onMouseleave: E,
830
- onBlur: E
817
+ "aria-label": $.value ? g(a)("common.copied") || "Copied" : g(a)("common.copy") || "Copy",
818
+ onClick: mt,
819
+ onMouseenter: e[11] || (e[11] = (o) => Te(o)),
820
+ onFocus: e[12] || (e[12] = (o) => Te(o)),
821
+ onMouseleave: S,
822
+ onBlur: S
831
823
  }, [
832
- $.value ? (F(), O("svg", ao, [...e[22] || (e[22] = [
833
- a("path", {
824
+ $.value ? (E(), O("svg", uo, [...e[22] || (e[22] = [
825
+ r("path", {
834
826
  fill: "none",
835
827
  stroke: "currentColor",
836
828
  "stroke-linecap": "round",
@@ -838,15 +830,15 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
838
830
  "stroke-width": "2",
839
831
  d: "M20 6L9 17l-5-5"
840
832
  }, null, -1)
841
- ])])) : (F(), O("svg", ro, [...e[21] || (e[21] = [
842
- a("g", {
833
+ ])])) : (E(), O("svg", so, [...e[21] || (e[21] = [
834
+ r("g", {
843
835
  fill: "none",
844
836
  stroke: "currentColor",
845
837
  "stroke-linecap": "round",
846
838
  "stroke-linejoin": "round",
847
839
  "stroke-width": "2"
848
840
  }, [
849
- a("rect", {
841
+ r("rect", {
850
842
  width: "14",
851
843
  height: "14",
852
844
  x: "8",
@@ -854,23 +846,23 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
854
846
  rx: "2",
855
847
  ry: "2"
856
848
  }),
857
- a("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
849
+ r("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
858
850
  ], -1)
859
851
  ])]))
860
- ], 40, lo)) : X("", !0),
861
- i.showExpandButton ? (F(), O("button", {
852
+ ], 40, ro)) : X("", !0),
853
+ i.showExpandButton ? (E(), O("button", {
862
854
  key: 2,
863
855
  type: "button",
864
856
  class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
865
857
  "aria-pressed": C.value,
866
- onClick: vt,
867
- onMouseenter: e[13] || (e[13] = (o) => T(o, C.value ? g(r)("common.collapse") || "Collapse" : g(r)("common.expand") || "Expand")),
868
- onFocus: e[14] || (e[14] = (o) => T(o, C.value ? g(r)("common.collapse") || "Collapse" : g(r)("common.expand") || "Expand")),
869
- onMouseleave: E,
870
- onBlur: E
858
+ onClick: ht,
859
+ onMouseenter: e[13] || (e[13] = (o) => D(o, C.value ? g(a)("common.collapse") || "Collapse" : g(a)("common.expand") || "Expand")),
860
+ onFocus: e[14] || (e[14] = (o) => D(o, C.value ? g(a)("common.collapse") || "Collapse" : g(a)("common.expand") || "Expand")),
861
+ onMouseleave: S,
862
+ onBlur: S
871
863
  }, [
872
- C.value ? (F(), O("svg", uo, [...e[23] || (e[23] = [
873
- a("path", {
864
+ C.value ? (E(), O("svg", fo, [...e[23] || (e[23] = [
865
+ r("path", {
874
866
  fill: "none",
875
867
  stroke: "currentColor",
876
868
  "stroke-linecap": "round",
@@ -878,8 +870,8 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
878
870
  "stroke-width": "2",
879
871
  d: "M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"
880
872
  }, null, -1)
881
- ])])) : (F(), O("svg", co, [...e[24] || (e[24] = [
882
- a("path", {
873
+ ])])) : (E(), O("svg", vo, [...e[24] || (e[24] = [
874
+ r("path", {
883
875
  fill: "none",
884
876
  stroke: "currentColor",
885
877
  "stroke-linecap": "round",
@@ -888,71 +880,71 @@ const Wt = { class: "html-preview-frame__header" }, jt = { class: "html-preview-
888
880
  d: "m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"
889
881
  }, null, -1)
890
882
  ])]))
891
- ], 40, so)) : X("", !0),
892
- he.value && i.showPreviewButton ? (F(), O("button", {
883
+ ], 40, co)) : X("", !0),
884
+ ge.value && i.showPreviewButton ? (E(), O("button", {
893
885
  key: 3,
894
886
  type: "button",
895
887
  class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
896
- "aria-label": g(r)("common.preview") || "Preview",
897
- onClick: ht,
898
- onMouseenter: e[15] || (e[15] = (o) => T(o, g(r)("common.preview") || "Preview")),
899
- onFocus: e[16] || (e[16] = (o) => T(o, g(r)("common.preview") || "Preview")),
900
- onMouseleave: E,
901
- onBlur: E
888
+ "aria-label": g(a)("common.preview") || "Preview",
889
+ onClick: pt,
890
+ onMouseenter: e[15] || (e[15] = (o) => D(o, g(a)("common.preview") || "Preview")),
891
+ onFocus: e[16] || (e[16] = (o) => D(o, g(a)("common.preview") || "Preview")),
892
+ onMouseleave: S,
893
+ onBlur: S
902
894
  }, [...e[25] || (e[25] = [
903
- a("svg", {
895
+ r("svg", {
904
896
  xmlns: "http://www.w3.org/2000/svg",
905
897
  width: "12",
906
898
  height: "12",
907
899
  viewBox: "0 0 24 24"
908
900
  }, [
909
- a("g", {
901
+ r("g", {
910
902
  fill: "currentColor",
911
903
  "fill-rule": "evenodd",
912
904
  "clip-rule": "evenodd"
913
905
  }, [
914
- a("path", { d: "M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496" }),
915
- a("path", { d: "M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23" })
906
+ r("path", { d: "M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496" }),
907
+ r("path", { d: "M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23" })
916
908
  ])
917
909
  ], -1)
918
- ])], 40, fo)) : X("", !0)
910
+ ])], 40, mo)) : X("", !0)
919
911
  ])
920
912
  ], !0)
921
913
  ])) : X("", !0),
922
- Ae(a("div", {
914
+ We(r("div", {
923
915
  ref_key: "codeEditor",
924
916
  ref: m,
925
- class: J(["code-editor-container", [f.stream ? "" : "code-height-placeholder"]])
917
+ class: Q(["code-editor-container", [f.stream ? "" : "code-height-placeholder"]])
926
918
  }, null, 2), [
927
- [We, !M.value && (f.stream ? !0 : !f.loading)]
919
+ [je, !M.value && (f.stream ? !0 : !f.loading)]
928
920
  ]),
929
- oe.value && !H.value && he.value && S.value.trim().toLowerCase() === "html" ? (F(), xe(Gt, {
921
+ ne.value && !F.value && ge.value && P.value === "html" ? (E(), Ce(Jt, {
930
922
  key: 1,
931
923
  code: f.node.code,
932
924
  "is-dark": i.isDark,
933
- "on-close": () => oe.value = !1
925
+ "on-close": () => ne.value = !1
934
926
  }, null, 8, ["code", "is-dark", "on-close"])) : X("", !0),
935
- Ae(a("div", vo, [
936
- ye(t.$slots, "loading", {
927
+ We(r("div", ho, [
928
+ ke(t.$slots, "loading", {
937
929
  loading: f.loading,
938
930
  stream: f.stream
939
931
  }, () => [
940
- e[26] || (e[26] = a("div", { class: "loading-skeleton" }, [
941
- a("div", { class: "skeleton-line" }),
942
- a("div", { class: "skeleton-line" }),
943
- a("div", { class: "skeleton-line short" })
932
+ e[26] || (e[26] = r("div", { class: "loading-skeleton" }, [
933
+ r("div", { class: "skeleton-line" }),
934
+ r("div", { class: "skeleton-line" }),
935
+ r("div", { class: "skeleton-line short" })
944
936
  ], -1))
945
937
  ], !0)
946
938
  ], 512), [
947
- [We, !f.stream && f.loading]
939
+ [je, !f.stream && f.loading]
948
940
  ]),
949
- a("span", mo, be($.value ? g(r)("common.copied") || "Copied" : ""), 1)
941
+ r("span", go, Me($.value ? g(a)("common.copied") || "Copied" : ""), 1)
950
942
  ], 6));
951
943
  }
952
- }), ke = /* @__PURE__ */ et(ho, [["__scopeId", "data-v-d44250c0"]]);
953
- ke.install = (f) => {
954
- f.component(ke.__name, ke);
944
+ }), be = /* @__PURE__ */ ot(po, [["__scopeId", "data-v-f37961ae"]]);
945
+ be.install = (f) => {
946
+ f.component(be.__name, be);
955
947
  };
956
948
  export {
957
- ke as default
949
+ be as default
958
950
  };