markstream-vue 0.0.3-beta.1 → 0.0.3-beta.3
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.
- package/README.md +281 -7
- package/README.zh-CN.md +289 -16
- package/dist/exports-DYua_tlG.js +5323 -0
- package/dist/exports-h70Zx97z.cjs +246 -0
- package/dist/exports.js +1 -1
- package/dist/{index-ClFlwUOZ.cjs → index-3jXtLsem.cjs} +1 -1
- package/dist/{index-DGTqKnzM.js → index-9wg07cmN.js} +409 -383
- package/dist/{index-BZqRC51k.js → index-CtDwbqLS.js} +1 -1
- package/dist/{index-Cn5LHgOE.cjs → index-DgwtvqiC.cjs} +1 -1
- package/dist/index-DpjKVeoo.cjs +22 -0
- package/dist/{index-D-TkURzk.js → index-Zn32X7og.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +45 -27
- package/dist/index.js +64 -63
- package/dist/index.tailwind.css +1 -1
- package/dist/index4.js +1 -1
- package/dist/tailwind.ts +0 -0
- package/package.json +14 -5
- package/dist/exports-ByrWvfQh.cjs +0 -246
- package/dist/exports-CuW10Rlw.js +0 -4909
- package/dist/index-CapyHsmU.cjs +0 -22
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var i in
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var i of
|
|
10
|
-
|
|
1
|
+
var Ot = Object.defineProperty, Dt = Object.defineProperties;
|
|
2
|
+
var $t = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var je = Object.getOwnPropertySymbols;
|
|
4
|
+
var Nt = Object.prototype.hasOwnProperty, zt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var We = (f, s, i) => s in f ? Ot(f, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : f[s] = i, be = (f, s) => {
|
|
6
|
+
for (var i in s || (s = {}))
|
|
7
|
+
Nt.call(s, i) && We(f, i, s[i]);
|
|
8
|
+
if (je)
|
|
9
|
+
for (var i of je(s))
|
|
10
|
+
zt.call(s, i) && We(f, i, s[i]);
|
|
11
11
|
return f;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
}, Ce = (f, s) => Dt(f, $t(s));
|
|
13
|
+
var R = (f, s, i) => new Promise((q, Y) => {
|
|
14
|
+
var L = (x) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
|
|
16
|
+
O(i.next(x));
|
|
17
|
+
} catch (c) {
|
|
18
|
+
Y(c);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, w = (x) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
|
|
22
|
+
O(i.throw(x));
|
|
23
|
+
} catch (c) {
|
|
24
|
+
Y(c);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, O = (x) => x.done ? q(x.value) : Promise.resolve(x.value).then(L, w);
|
|
27
|
+
O((i = i.apply(f, s)).next());
|
|
28
28
|
});
|
|
29
|
-
import { defineComponent as
|
|
30
|
-
import { u as
|
|
31
|
-
const
|
|
29
|
+
import { defineComponent as nt, computed as _, onMounted as _t, onUnmounted as it, createBlock as Fe, openBlock as F, Teleport as It, createElementVNode as r, normalizeClass as ee, withModifiers as Vt, toDisplayString as Te, unref as p, getCurrentInstance as Rt, ref as E, watch as A, onBeforeUnmount as At, nextTick as Me, createElementBlock as N, normalizeStyle as qe, createCommentVNode as G, withDirectives as Xe, renderSlot as Be, Fragment as Yt, vShow as Ue } from "vue";
|
|
30
|
+
import { u as lt, _ as at, n as Ee, r as jt, a as Wt, g as qt, s as se, l as Ge, b as Xt, c as Ut, d as Ke, h as Gt } from "./exports-DYua_tlG.js";
|
|
31
|
+
const Kt = { class: "html-preview-frame__header" }, Jt = { class: "html-preview-frame__title" }, Qt = { class: "html-preview-frame__label" }, Zt = ["srcdoc"], eo = /* @__PURE__ */ nt({
|
|
32
32
|
__name: "HtmlPreviewFrame",
|
|
33
33
|
props: {
|
|
34
34
|
code: {},
|
|
@@ -37,11 +37,11 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
37
37
|
title: {}
|
|
38
38
|
},
|
|
39
39
|
setup(f) {
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
return
|
|
44
|
-
const
|
|
40
|
+
const s = f, { t: i } = lt(), q = _(() => {
|
|
41
|
+
const L = s.code || "", w = L.trim().toLowerCase();
|
|
42
|
+
if (w.startsWith("<!doctype") || w.startsWith("<html") || w.startsWith("<body"))
|
|
43
|
+
return L;
|
|
44
|
+
const O = s.isDark ? "#020617" : "#ffffff", x = s.isDark ? "#e5e7eb" : "#020617";
|
|
45
45
|
return `<!doctype html>
|
|
46
46
|
<html lang="en">
|
|
47
47
|
<head>
|
|
@@ -52,8 +52,8 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
52
52
|
margin: 0;
|
|
53
53
|
padding: 0;
|
|
54
54
|
height: 100%;
|
|
55
|
-
background-color: ${
|
|
56
|
-
color: ${
|
|
55
|
+
background-color: ${O};
|
|
56
|
+
color: ${x};
|
|
57
57
|
}
|
|
58
58
|
body {
|
|
59
59
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;
|
|
@@ -61,59 +61,59 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
61
61
|
</style>
|
|
62
62
|
</head>
|
|
63
63
|
<body>
|
|
64
|
-
${
|
|
64
|
+
${L}
|
|
65
65
|
</body>
|
|
66
66
|
</html>`;
|
|
67
67
|
});
|
|
68
|
-
function
|
|
69
|
-
var
|
|
70
|
-
(
|
|
68
|
+
function Y(L) {
|
|
69
|
+
var w;
|
|
70
|
+
(L.key === "Escape" || L.key === "Esc") && ((w = s.onClose) == null || w.call(s));
|
|
71
71
|
}
|
|
72
|
-
return
|
|
73
|
-
typeof window != "undefined" && window.addEventListener("keydown",
|
|
74
|
-
}),
|
|
75
|
-
typeof window != "undefined" && window.removeEventListener("keydown",
|
|
76
|
-
}), (
|
|
72
|
+
return _t(() => {
|
|
73
|
+
typeof window != "undefined" && window.addEventListener("keydown", Y);
|
|
74
|
+
}), it(() => {
|
|
75
|
+
typeof window != "undefined" && window.removeEventListener("keydown", Y);
|
|
76
|
+
}), (L, w) => (F(), Fe(It, { to: "body" }, [
|
|
77
77
|
r("div", {
|
|
78
|
-
class:
|
|
79
|
-
onClick:
|
|
80
|
-
var
|
|
81
|
-
return (
|
|
78
|
+
class: ee(["html-preview-frame__backdrop", { "html-preview-frame__backdrop--dark": s.isDark }]),
|
|
79
|
+
onClick: w[2] || (w[2] = (O) => {
|
|
80
|
+
var x;
|
|
81
|
+
return (x = s.onClose) == null ? void 0 : x.call(s);
|
|
82
82
|
})
|
|
83
83
|
}, [
|
|
84
84
|
r("div", {
|
|
85
|
-
class:
|
|
86
|
-
onClick:
|
|
85
|
+
class: ee(["html-preview-frame", { "html-preview-frame--dark": s.isDark }]),
|
|
86
|
+
onClick: w[1] || (w[1] = Vt(() => {
|
|
87
87
|
}, ["stop"]))
|
|
88
88
|
}, [
|
|
89
|
-
r("div",
|
|
90
|
-
r("div",
|
|
91
|
-
|
|
92
|
-
r("span",
|
|
89
|
+
r("div", Kt, [
|
|
90
|
+
r("div", Jt, [
|
|
91
|
+
w[3] || (w[3] = r("span", { class: "html-preview-frame__dot" }, null, -1)),
|
|
92
|
+
r("span", Qt, Te(s.title || p(i)("common.preview") || "Preview"), 1)
|
|
93
93
|
]),
|
|
94
94
|
r("button", {
|
|
95
95
|
type: "button",
|
|
96
|
-
class:
|
|
97
|
-
onClick:
|
|
98
|
-
var
|
|
99
|
-
return (
|
|
96
|
+
class: ee(["html-preview-frame__close", { "html-preview-frame__close--dark": s.isDark }]),
|
|
97
|
+
onClick: w[0] || (w[0] = (O) => {
|
|
98
|
+
var x;
|
|
99
|
+
return (x = s.onClose) == null ? void 0 : x.call(s);
|
|
100
100
|
})
|
|
101
101
|
}, " × ", 2)
|
|
102
102
|
]),
|
|
103
103
|
r("iframe", {
|
|
104
104
|
class: "html-preview-frame__iframe",
|
|
105
105
|
sandbox: "allow-scripts allow-same-origin",
|
|
106
|
-
srcdoc:
|
|
107
|
-
}, null, 8,
|
|
106
|
+
srcdoc: q.value
|
|
107
|
+
}, null, 8, Zt)
|
|
108
108
|
], 2)
|
|
109
109
|
], 2)
|
|
110
110
|
]));
|
|
111
111
|
}
|
|
112
|
-
}),
|
|
112
|
+
}), to = /* @__PURE__ */ at(eo, [["__scopeId", "data-v-3cf0ed56"]]), oo = {
|
|
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
|
-
},
|
|
116
|
+
}, no = { class: "flex items-center space-x-2 flex-1 overflow-hidden" }, io = ["innerHTML"], lo = { class: "text-sm font-medium font-mono truncate" }, ao = { class: "flex items-center space-x-2" }, ro = ["aria-pressed"], so = ["disabled"], uo = ["disabled"], co = ["disabled"], fo = ["aria-label"], vo = {
|
|
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 qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
123
123
|
height: "1em",
|
|
124
124
|
viewBox: "0 0 24 24",
|
|
125
125
|
class: "w-3 h-3"
|
|
126
|
-
},
|
|
126
|
+
}, mo = {
|
|
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 qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
133
133
|
height: "1em",
|
|
134
134
|
viewBox: "0 0 24 24",
|
|
135
135
|
class: "w-3 h-3"
|
|
136
|
-
},
|
|
136
|
+
}, ho = ["aria-pressed"], go = {
|
|
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 qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
143
143
|
height: "1em",
|
|
144
144
|
viewBox: "0 0 24 24",
|
|
145
145
|
class: "w-3 h-3"
|
|
146
|
-
},
|
|
146
|
+
}, po = {
|
|
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 qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
153
153
|
height: "1em",
|
|
154
154
|
viewBox: "0 0 24 24",
|
|
155
155
|
class: "w-3 h-3"
|
|
156
|
-
},
|
|
156
|
+
}, wo = ["aria-label"], yo = { class: "code-loading-placeholder" }, ko = {
|
|
157
157
|
class: "sr-only",
|
|
158
158
|
"aria-live": "polite",
|
|
159
159
|
role: "status"
|
|
160
|
-
},
|
|
160
|
+
}, Je = "__markstreamMonacoPassiveTouch__", Qe = 10, Ze = 36, et = 1, tt = 0, ot = 1.5, ue = 1, xo = /* @__PURE__ */ nt({
|
|
161
161
|
__name: "CodeBlockNode",
|
|
162
162
|
props: {
|
|
163
163
|
node: {},
|
|
@@ -180,81 +180,107 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
180
180
|
customId: {}
|
|
181
181
|
},
|
|
182
182
|
emits: ["previewCode", "copy"],
|
|
183
|
-
setup(f, { emit:
|
|
184
|
-
var
|
|
185
|
-
const i = f,
|
|
186
|
-
|
|
183
|
+
setup(f, { emit: s }) {
|
|
184
|
+
var _e;
|
|
185
|
+
const i = f, q = s;
|
|
186
|
+
typeof window != "undefined" && Y();
|
|
187
|
+
function Y() {
|
|
188
|
+
var t;
|
|
189
|
+
try {
|
|
190
|
+
const e = window;
|
|
191
|
+
if (e[Je])
|
|
192
|
+
return;
|
|
193
|
+
const o = (t = window.Element) == null ? void 0 : t.prototype, n = o == null ? void 0 : o.addEventListener;
|
|
194
|
+
if (!o || !n)
|
|
195
|
+
return;
|
|
196
|
+
o.addEventListener = function(a, h, m) {
|
|
197
|
+
return a === "touchstart" && L(this, m) ? n.call(this, a, h, w(m)) : n.call(this, a, h, m);
|
|
198
|
+
}, e[Je] = !0;
|
|
199
|
+
} catch (e) {
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function L(t, e) {
|
|
203
|
+
if (!t)
|
|
204
|
+
return !1;
|
|
205
|
+
const o = t;
|
|
206
|
+
return !(typeof o.closest != "function" || !o.closest(".monaco-editor, .monaco-diff-editor") || e && typeof e == "object" && "passive" in e);
|
|
207
|
+
}
|
|
208
|
+
function w(t) {
|
|
209
|
+
return t == null ? { passive: !0 } : typeof t == "boolean" ? { capture: t, passive: !0 } : typeof t == "object" ? "passive" in t ? t : Ce(be({}, t), { passive: !0 }) : { passive: !0 };
|
|
210
|
+
}
|
|
211
|
+
const O = Rt(), x = _(() => {
|
|
212
|
+
const t = O == null ? void 0 : O.vnode.props;
|
|
187
213
|
return !!(t && (t.onPreviewCode || t.onPreviewCode));
|
|
188
|
-
}), { t:
|
|
189
|
-
let
|
|
190
|
-
const
|
|
191
|
-
typeof window != "undefined" &&
|
|
192
|
-
() =>
|
|
214
|
+
}), { t: c } = lt(), b = E(null), ce = E(null), X = E(!1), D = E(Ee(i.node.language)), K = _(() => jt(D.value)), M = E(!1), B = E(!1), te = E(!1), He = E(!1), j = E(null);
|
|
215
|
+
let de = 0;
|
|
216
|
+
const rt = Wt(), J = E(null), I = E(typeof window == "undefined");
|
|
217
|
+
typeof window != "undefined" && A(
|
|
218
|
+
() => ce.value,
|
|
193
219
|
(t) => {
|
|
194
220
|
var o;
|
|
195
|
-
if ((o =
|
|
196
|
-
|
|
221
|
+
if ((o = J.value) == null || o.destroy(), J.value = null, !t) {
|
|
222
|
+
I.value = !1;
|
|
197
223
|
return;
|
|
198
224
|
}
|
|
199
|
-
const e =
|
|
200
|
-
|
|
201
|
-
|
|
225
|
+
const e = rt(t, { rootMargin: "400px" });
|
|
226
|
+
J.value = e, I.value = e.isVisible.value, e.whenVisible.then(() => {
|
|
227
|
+
I.value = !0;
|
|
202
228
|
});
|
|
203
229
|
},
|
|
204
230
|
{ immediate: !0 }
|
|
205
|
-
),
|
|
231
|
+
), At(() => {
|
|
206
232
|
var t;
|
|
207
|
-
(t =
|
|
233
|
+
(t = J.value) == null || t.destroy(), J.value = null;
|
|
208
234
|
});
|
|
209
|
-
let
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
} }),
|
|
213
|
-
} }),
|
|
214
|
-
},
|
|
215
|
-
},
|
|
235
|
+
let V = null, oe = null, fe = () => {
|
|
236
|
+
}, ve = () => {
|
|
237
|
+
}, ne = () => null, z = () => ({ getModel: () => ({ getLineCount: () => 1 }), getOption: () => 14, updateOptions: () => {
|
|
238
|
+
} }), $ = () => ({ getModel: () => ({ getLineCount: () => 1 }), getOption: () => 14, updateOptions: () => {
|
|
239
|
+
} }), ie = () => {
|
|
240
|
+
}, me = () => {
|
|
241
|
+
}, Q = null, Pe = () => {
|
|
216
242
|
var t;
|
|
217
243
|
return String((t = i.node.language) != null ? t : "plaintext");
|
|
218
|
-
},
|
|
244
|
+
}, he = () => R(null, null, function* () {
|
|
219
245
|
});
|
|
220
|
-
const
|
|
221
|
-
typeof window != "undefined" &&
|
|
246
|
+
const T = _(() => i.node.diff), ge = E(!1), le = E(!1);
|
|
247
|
+
typeof window != "undefined" && R(null, null, function* () {
|
|
222
248
|
try {
|
|
223
|
-
const t = yield
|
|
249
|
+
const t = yield qt();
|
|
224
250
|
if (!t) {
|
|
225
|
-
|
|
251
|
+
ge.value = !0;
|
|
226
252
|
return;
|
|
227
253
|
}
|
|
228
254
|
const e = t.useMonaco, o = t.detectLanguage;
|
|
229
|
-
if (typeof o == "function" && (
|
|
230
|
-
const n =
|
|
255
|
+
if (typeof o == "function" && (Pe = o), typeof e == "function") {
|
|
256
|
+
const n = ze();
|
|
231
257
|
if (n && i.themes && Array.isArray(i.themes) && !i.themes.includes(n))
|
|
232
258
|
throw new Error("Preferred theme not in provided themes array");
|
|
233
|
-
const l = e(
|
|
259
|
+
const l = e(Ce(be({
|
|
234
260
|
wordWrap: "on",
|
|
235
261
|
wrappingIndent: "same",
|
|
236
262
|
themes: i.themes,
|
|
237
263
|
theme: n
|
|
238
264
|
}, i.monacoOptions || {}), {
|
|
239
265
|
onThemeChange() {
|
|
240
|
-
|
|
266
|
+
vt();
|
|
241
267
|
}
|
|
242
268
|
}));
|
|
243
|
-
|
|
269
|
+
V = l.createEditor || V, oe = l.createDiffEditor || oe, fe = l.updateCode || fe, ve = l.updateDiff || ve, ne = l.getEditor || ne, z = l.getEditorView || z, $ = l.getDiffEditorView || $, ie = l.cleanupEditor || ie, me = l.safeClean || l.cleanupEditor || me, he = l.setTheme || he, He.value = !0, b.value && (yield ke(b.value));
|
|
244
270
|
}
|
|
245
271
|
} catch (t) {
|
|
246
|
-
|
|
272
|
+
ge.value = !0;
|
|
247
273
|
}
|
|
248
274
|
});
|
|
249
|
-
const
|
|
250
|
-
typeof ((
|
|
251
|
-
), v =
|
|
252
|
-
const t =
|
|
275
|
+
const H = E(
|
|
276
|
+
typeof ((_e = i.monacoOptions) == null ? void 0 : _e.fontSize) == "number" ? i.monacoOptions.fontSize : Number.NaN
|
|
277
|
+
), v = E(H.value), st = _(() => {
|
|
278
|
+
const t = H.value, e = v.value;
|
|
253
279
|
return typeof t == "number" && Number.isFinite(t) && t > 0 && typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
254
280
|
});
|
|
255
|
-
function
|
|
281
|
+
function ut() {
|
|
256
282
|
try {
|
|
257
|
-
const t =
|
|
283
|
+
const t = b.value;
|
|
258
284
|
if (!t)
|
|
259
285
|
return null;
|
|
260
286
|
const e = t.querySelector(".view-lines .view-line");
|
|
@@ -267,184 +293,184 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
267
293
|
}
|
|
268
294
|
return null;
|
|
269
295
|
}
|
|
270
|
-
function
|
|
296
|
+
function Le() {
|
|
271
297
|
var t, e, o, n, l;
|
|
272
298
|
try {
|
|
273
|
-
const
|
|
274
|
-
if (
|
|
275
|
-
const
|
|
299
|
+
const a = T.value ? (o = (e = (t = $()) == null ? void 0 : t.getModifiedEditor) == null ? void 0 : e.call(t)) != null ? o : $() : z(), h = ne(), m = (n = h == null ? void 0 : h.EditorOption) == null ? void 0 : n.fontInfo;
|
|
300
|
+
if (a && m != null) {
|
|
301
|
+
const y = (l = a.getOption) == null ? void 0 : l.call(a, m), d = y == null ? void 0 : y.fontSize;
|
|
276
302
|
if (typeof d == "number" && Number.isFinite(d) && d > 0)
|
|
277
303
|
return d;
|
|
278
304
|
}
|
|
279
|
-
} catch (
|
|
305
|
+
} catch (a) {
|
|
280
306
|
}
|
|
281
307
|
try {
|
|
282
|
-
const
|
|
283
|
-
if (
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
308
|
+
const a = b.value;
|
|
309
|
+
if (a) {
|
|
310
|
+
const h = a.querySelector(".view-lines .view-line");
|
|
311
|
+
if (h)
|
|
286
312
|
try {
|
|
287
313
|
if (typeof window != "undefined" && typeof window.getComputedStyle == "function") {
|
|
288
|
-
const
|
|
289
|
-
if (
|
|
290
|
-
return Number.parseFloat(
|
|
314
|
+
const m = window.getComputedStyle(h).fontSize, y = m && m.match(/^(\d+(?:\.\d+)?)/);
|
|
315
|
+
if (y)
|
|
316
|
+
return Number.parseFloat(y[1]);
|
|
291
317
|
}
|
|
292
|
-
} catch (
|
|
318
|
+
} catch (m) {
|
|
293
319
|
}
|
|
294
320
|
}
|
|
295
|
-
} catch (
|
|
321
|
+
} catch (a) {
|
|
296
322
|
}
|
|
297
323
|
return null;
|
|
298
324
|
}
|
|
299
|
-
function
|
|
325
|
+
function pe(t) {
|
|
300
326
|
var n, l;
|
|
301
327
|
try {
|
|
302
|
-
const
|
|
303
|
-
if (
|
|
304
|
-
const
|
|
305
|
-
if (typeof
|
|
306
|
-
return
|
|
328
|
+
const a = ne(), h = (n = a == null ? void 0 : a.EditorOption) == null ? void 0 : n.lineHeight;
|
|
329
|
+
if (h != null) {
|
|
330
|
+
const m = (l = t == null ? void 0 : t.getOption) == null ? void 0 : l.call(t, h);
|
|
331
|
+
if (typeof m == "number" && m > 0)
|
|
332
|
+
return m;
|
|
307
333
|
}
|
|
308
|
-
} catch (
|
|
334
|
+
} catch (a) {
|
|
309
335
|
}
|
|
310
|
-
const e =
|
|
336
|
+
const e = ut();
|
|
311
337
|
if (e && e > 0)
|
|
312
338
|
return e;
|
|
313
339
|
const o = Number.isFinite(v.value) && v.value > 0 ? v.value : 12;
|
|
314
340
|
return Math.max(12, Math.round(o * 1.35));
|
|
315
341
|
}
|
|
316
|
-
function
|
|
342
|
+
function we() {
|
|
317
343
|
var e;
|
|
318
|
-
if (Number.isFinite(v.value) && v.value > 0 && Number.isFinite(
|
|
344
|
+
if (Number.isFinite(v.value) && v.value > 0 && Number.isFinite(H.value))
|
|
319
345
|
return v.value;
|
|
320
|
-
const t =
|
|
321
|
-
return typeof ((e = i.monacoOptions) == null ? void 0 : e.fontSize) == "number" ? (
|
|
346
|
+
const t = Le();
|
|
347
|
+
return typeof ((e = i.monacoOptions) == null ? void 0 : e.fontSize) == "number" ? (H.value = i.monacoOptions.fontSize, v.value = i.monacoOptions.fontSize, v.value) : t && t > 0 ? (H.value = t, v.value = t, t) : (H.value = 12, v.value = 12, 12);
|
|
322
348
|
}
|
|
323
|
-
function
|
|
324
|
-
const t =
|
|
349
|
+
function ct() {
|
|
350
|
+
const t = we(), e = Math.min(Ze, t + et);
|
|
325
351
|
v.value = e;
|
|
326
352
|
}
|
|
327
|
-
function
|
|
328
|
-
const t =
|
|
353
|
+
function dt() {
|
|
354
|
+
const t = we(), e = Math.max(Qe, t - et);
|
|
329
355
|
v.value = e;
|
|
330
356
|
}
|
|
331
|
-
function
|
|
332
|
-
|
|
357
|
+
function ft() {
|
|
358
|
+
we(), Number.isFinite(H.value) && (v.value = H.value);
|
|
333
359
|
}
|
|
334
|
-
function
|
|
335
|
-
var t, e, o, n, l,
|
|
360
|
+
function Oe() {
|
|
361
|
+
var t, e, o, n, l, a, h, m, y, d, g, Ie, Ve, Re;
|
|
336
362
|
try {
|
|
337
|
-
const
|
|
338
|
-
if (!
|
|
363
|
+
const u = T.value ? $() : z();
|
|
364
|
+
if (!u)
|
|
339
365
|
return null;
|
|
340
|
-
if (
|
|
341
|
-
const
|
|
342
|
-
(o =
|
|
343
|
-
const
|
|
344
|
-
if (
|
|
345
|
-
return Math.ceil(
|
|
346
|
-
const
|
|
347
|
-
return Math.ceil(
|
|
348
|
-
} else if (
|
|
349
|
-
(
|
|
350
|
-
const
|
|
351
|
-
if (
|
|
352
|
-
return Math.ceil(
|
|
366
|
+
if (T.value && (u != null && u.getOriginalEditor) && (u != null && u.getModifiedEditor)) {
|
|
367
|
+
const k = (t = u.getOriginalEditor) == null ? void 0 : t.call(u), C = (e = u.getModifiedEditor) == null ? void 0 : e.call(u);
|
|
368
|
+
(o = k == null ? void 0 : k.layout) == null || o.call(k), (n = C == null ? void 0 : C.layout) == null || n.call(C);
|
|
369
|
+
const St = ((l = k == null ? void 0 : k.getContentHeight) == null ? void 0 : l.call(k)) || 0, Ft = ((a = C == null ? void 0 : C.getContentHeight) == null ? void 0 : a.call(C)) || 0, Ye = Math.max(St, Ft);
|
|
370
|
+
if (Ye > 0)
|
|
371
|
+
return Math.ceil(Ye + ue);
|
|
372
|
+
const Tt = ((y = (m = (h = k == null ? void 0 : k.getModel) == null ? void 0 : h.call(k)) == null ? void 0 : m.getLineCount) == null ? void 0 : y.call(m)) || 1, Ht = ((Ie = (g = (d = C == null ? void 0 : C.getModel) == null ? void 0 : d.call(C)) == null ? void 0 : g.getLineCount) == null ? void 0 : Ie.call(g)) || 1, Pt = Math.max(Tt, Ht), Lt = Math.max(pe(k), pe(C));
|
|
373
|
+
return Math.ceil(Pt * (Lt + ot) + tt + ue);
|
|
374
|
+
} else if (u != null && u.getContentHeight) {
|
|
375
|
+
(Ve = u == null ? void 0 : u.layout) == null || Ve.call(u);
|
|
376
|
+
const k = u.getContentHeight();
|
|
377
|
+
if (k > 0)
|
|
378
|
+
return Math.ceil(k + ue);
|
|
353
379
|
}
|
|
354
|
-
const
|
|
355
|
-
let
|
|
356
|
-
|
|
357
|
-
const
|
|
358
|
-
return Math.ceil(
|
|
359
|
-
} catch (
|
|
380
|
+
const xe = (Re = u == null ? void 0 : u.getModel) == null ? void 0 : Re.call(u);
|
|
381
|
+
let Ae = 1;
|
|
382
|
+
xe && typeof xe.getLineCount == "function" && (Ae = xe.getLineCount());
|
|
383
|
+
const Et = pe(u);
|
|
384
|
+
return Math.ceil(Ae * (Et + ot) + tt + ue);
|
|
385
|
+
} catch (u) {
|
|
360
386
|
return null;
|
|
361
387
|
}
|
|
362
388
|
}
|
|
363
|
-
function
|
|
364
|
-
var
|
|
365
|
-
const t =
|
|
389
|
+
function vt() {
|
|
390
|
+
var m, y, d;
|
|
391
|
+
const t = b.value, e = ce.value;
|
|
366
392
|
if (!t || !e)
|
|
367
393
|
return;
|
|
368
394
|
const o = t.querySelector(".monaco-editor") || t;
|
|
369
395
|
let n = null;
|
|
370
396
|
try {
|
|
371
397
|
typeof window != "undefined" && typeof window.getComputedStyle == "function" && (n = window.getComputedStyle(o));
|
|
372
|
-
} catch (
|
|
398
|
+
} catch (g) {
|
|
373
399
|
n = null;
|
|
374
400
|
}
|
|
375
|
-
const l = String((
|
|
376
|
-
if (l &&
|
|
377
|
-
return e.style.setProperty("--vscode-editor-foreground", l.trim()), e.style.setProperty("--vscode-editor-background",
|
|
401
|
+
const l = String((m = n == null ? void 0 : n.getPropertyValue("--vscode-editor-foreground")) != null ? m : ""), a = String((y = n == null ? void 0 : n.getPropertyValue("--vscode-editor-background")) != null ? y : ""), h = String((d = n == null ? void 0 : n.getPropertyValue("--vscode-editor-hoverHighlightBackground")) != null ? d : "");
|
|
402
|
+
if (l && a)
|
|
403
|
+
return e.style.setProperty("--vscode-editor-foreground", l.trim()), e.style.setProperty("--vscode-editor-background", a.trim()), e.style.setProperty("--vscode-editor-selectionBackground", h.trim()), !0;
|
|
378
404
|
}
|
|
379
405
|
function W() {
|
|
380
406
|
try {
|
|
381
|
-
const t =
|
|
407
|
+
const t = b.value;
|
|
382
408
|
if (!t)
|
|
383
409
|
return;
|
|
384
|
-
const e = t.getBoundingClientRect(), o = window.scrollY + e.top, n =
|
|
410
|
+
const e = t.getBoundingClientRect(), o = window.scrollY + e.top, n = Oe();
|
|
385
411
|
if (n != null && n > 0) {
|
|
386
412
|
const l = e.height;
|
|
387
413
|
t.style.height = `${Math.ceil(n)}px`, t.style.maxHeight = "none";
|
|
388
|
-
const
|
|
389
|
-
|
|
414
|
+
const a = Math.ceil(n) - l;
|
|
415
|
+
a !== 0 && o < window.scrollY && window.scrollBy(0, a);
|
|
390
416
|
}
|
|
391
417
|
} catch (t) {
|
|
392
418
|
}
|
|
393
419
|
}
|
|
394
|
-
function
|
|
420
|
+
function U() {
|
|
395
421
|
var t;
|
|
396
422
|
try {
|
|
397
|
-
const e =
|
|
423
|
+
const e = b.value;
|
|
398
424
|
if (!e)
|
|
399
425
|
return;
|
|
400
|
-
const o = e.getBoundingClientRect(), n = window.scrollY + o.top, l = o.height,
|
|
401
|
-
if (
|
|
402
|
-
const d = Math.min(
|
|
403
|
-
e.style.height = `${Math.ceil(d)}px`, e.style.maxHeight = `${Math.ceil(
|
|
404
|
-
const
|
|
405
|
-
|
|
426
|
+
const o = e.getBoundingClientRect(), n = window.scrollY + o.top, l = o.height, a = mt();
|
|
427
|
+
if (de > 0 && (de--, j.value != null)) {
|
|
428
|
+
const d = Math.min(j.value, a);
|
|
429
|
+
e.style.height = `${Math.ceil(d)}px`, e.style.maxHeight = `${Math.ceil(a)}px`, e.style.overflow = "auto";
|
|
430
|
+
const g = Math.ceil(d) - l;
|
|
431
|
+
g !== 0 && n < window.scrollY && window.scrollBy(0, g);
|
|
406
432
|
return;
|
|
407
433
|
}
|
|
408
|
-
const
|
|
409
|
-
if (
|
|
410
|
-
const d = Math.min(
|
|
411
|
-
e.style.height = `${Math.ceil(d)}px`, e.style.maxHeight = `${Math.ceil(
|
|
412
|
-
const
|
|
413
|
-
|
|
434
|
+
const h = Oe();
|
|
435
|
+
if (h != null && h > 0) {
|
|
436
|
+
const d = Math.min(h, a);
|
|
437
|
+
e.style.height = `${Math.ceil(d)}px`, e.style.maxHeight = `${Math.ceil(a)}px`, e.style.overflow = "auto";
|
|
438
|
+
const g = Math.ceil(d) - l;
|
|
439
|
+
g !== 0 && n < window.scrollY && window.scrollBy(0, g);
|
|
414
440
|
return;
|
|
415
441
|
}
|
|
416
|
-
if (
|
|
417
|
-
const d = Math.min(
|
|
418
|
-
e.style.height = `${Math.ceil(d)}px`, e.style.maxHeight = `${Math.ceil(
|
|
419
|
-
const
|
|
420
|
-
|
|
442
|
+
if (j.value != null) {
|
|
443
|
+
const d = Math.min(j.value, a);
|
|
444
|
+
e.style.height = `${Math.ceil(d)}px`, e.style.maxHeight = `${Math.ceil(a)}px`, e.style.overflow = "auto";
|
|
445
|
+
const g = Math.ceil(d) - l;
|
|
446
|
+
g !== 0 && n < window.scrollY && window.scrollBy(0, g);
|
|
421
447
|
return;
|
|
422
448
|
}
|
|
423
|
-
const
|
|
424
|
-
if (
|
|
425
|
-
const d = Math.min(
|
|
426
|
-
e.style.height = `${Math.ceil(d)}px`, e.style.maxHeight = `${Math.ceil(
|
|
427
|
-
const
|
|
428
|
-
|
|
449
|
+
const m = Math.ceil(((t = e.getBoundingClientRect) == null ? void 0 : t.call(e).height) || 0);
|
|
450
|
+
if (m > 0) {
|
|
451
|
+
const d = Math.min(m, a);
|
|
452
|
+
e.style.height = `${Math.ceil(d)}px`, e.style.maxHeight = `${Math.ceil(a)}px`, e.style.overflow = "auto";
|
|
453
|
+
const g = Math.ceil(d) - l;
|
|
454
|
+
g !== 0 && n < window.scrollY && window.scrollBy(0, g);
|
|
429
455
|
return;
|
|
430
456
|
}
|
|
431
|
-
const
|
|
432
|
-
if (!Number.isNaN(
|
|
433
|
-
const d = Math.ceil(Math.min(
|
|
457
|
+
const y = Number.parseFloat(e.style.height);
|
|
458
|
+
if (!Number.isNaN(y) && y > 0) {
|
|
459
|
+
const d = Math.ceil(Math.min(y, a));
|
|
434
460
|
e.style.height = `${d}px`;
|
|
435
|
-
const
|
|
436
|
-
|
|
461
|
+
const g = d - l;
|
|
462
|
+
g !== 0 && n < window.scrollY && window.scrollBy(0, g);
|
|
437
463
|
} else {
|
|
438
|
-
const d = Math.ceil(
|
|
464
|
+
const d = Math.ceil(a);
|
|
439
465
|
e.style.height = `${d}px`;
|
|
440
|
-
const
|
|
441
|
-
|
|
466
|
+
const g = d - l;
|
|
467
|
+
g !== 0 && n < window.scrollY && window.scrollBy(0, g);
|
|
442
468
|
}
|
|
443
|
-
e.style.maxHeight = `${Math.ceil(
|
|
469
|
+
e.style.maxHeight = `${Math.ceil(a)}px`, e.style.overflow = "auto";
|
|
444
470
|
} catch (e) {
|
|
445
471
|
}
|
|
446
472
|
}
|
|
447
|
-
function
|
|
473
|
+
function mt() {
|
|
448
474
|
var o, n;
|
|
449
475
|
const t = (n = (o = i.monacoOptions) == null ? void 0 : o.MAX_HEIGHT) != null ? n : 500;
|
|
450
476
|
if (typeof t == "number")
|
|
@@ -452,106 +478,106 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
452
478
|
const e = String(t).match(/^(\d+(?:\.\d+)?)/);
|
|
453
479
|
return e ? Number.parseFloat(e[1]) : 500;
|
|
454
480
|
}
|
|
455
|
-
const
|
|
456
|
-
|
|
481
|
+
const ye = _(() => i.isShowPreview && (D.value === "html" || D.value === "svg")), Z = _(() => D.value === "mermaid");
|
|
482
|
+
A(
|
|
457
483
|
() => i.node.language,
|
|
458
484
|
(t) => {
|
|
459
|
-
|
|
485
|
+
D.value = Ee(t);
|
|
460
486
|
}
|
|
461
|
-
),
|
|
487
|
+
), A(
|
|
462
488
|
() => i.node.code,
|
|
463
|
-
(t) =>
|
|
489
|
+
(t) => R(null, null, function* () {
|
|
464
490
|
var e, o;
|
|
465
491
|
if (i.stream !== !1) {
|
|
466
|
-
if (
|
|
492
|
+
if (D.value || (D.value = Ee(Pe(t))), V && !te.value && b.value)
|
|
467
493
|
try {
|
|
468
|
-
yield
|
|
494
|
+
yield ke(b.value);
|
|
469
495
|
} catch (n) {
|
|
470
496
|
}
|
|
471
|
-
|
|
497
|
+
T.value ? ve(String((e = i.node.originalCode) != null ? e : ""), String((o = i.node.updatedCode) != null ? o : ""), K.value) : fe(t, K.value), M.value && se(() => W());
|
|
472
498
|
}
|
|
473
499
|
})
|
|
474
500
|
);
|
|
475
|
-
const
|
|
476
|
-
const t =
|
|
477
|
-
return t ?
|
|
478
|
-
}),
|
|
501
|
+
const ht = _(() => {
|
|
502
|
+
const t = D.value;
|
|
503
|
+
return t ? Ge[t] || t.charAt(0).toUpperCase() + t.slice(1) : Ge[""] || "Plain Text";
|
|
504
|
+
}), gt = _(() => Xt(D.value || "")), pt = _(() => {
|
|
479
505
|
const t = {}, e = (l) => {
|
|
480
506
|
if (l != null)
|
|
481
507
|
return typeof l == "number" ? `${l}px` : String(l);
|
|
482
508
|
}, o = e(i.minWidth), n = e(i.maxWidth);
|
|
483
509
|
return o && (t.minWidth = o), n && (t.maxWidth = n), t;
|
|
484
510
|
});
|
|
485
|
-
function
|
|
486
|
-
return
|
|
511
|
+
function wt() {
|
|
512
|
+
return R(this, null, function* () {
|
|
487
513
|
try {
|
|
488
|
-
typeof navigator != "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText == "function" && (yield navigator.clipboard.writeText(i.node.code)),
|
|
489
|
-
|
|
514
|
+
typeof navigator != "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText == "function" && (yield navigator.clipboard.writeText(i.node.code)), X.value = !0, q("copy", i.node.code), setTimeout(() => {
|
|
515
|
+
X.value = !1;
|
|
490
516
|
}, 1e3);
|
|
491
517
|
} catch (t) {
|
|
492
518
|
console.error("复制失败:", t);
|
|
493
519
|
}
|
|
494
520
|
});
|
|
495
521
|
}
|
|
496
|
-
function
|
|
522
|
+
function De(t) {
|
|
497
523
|
const e = t;
|
|
498
524
|
return !e || e.disabled;
|
|
499
525
|
}
|
|
500
|
-
function
|
|
501
|
-
if (
|
|
526
|
+
function P(t, e, o = "top") {
|
|
527
|
+
if (De(t.currentTarget))
|
|
502
528
|
return;
|
|
503
529
|
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;
|
|
504
|
-
|
|
530
|
+
Ke(t.currentTarget, e, o, !1, l, i.isDark);
|
|
505
531
|
}
|
|
506
532
|
function S() {
|
|
507
|
-
|
|
533
|
+
Gt();
|
|
508
534
|
}
|
|
509
|
-
function
|
|
510
|
-
if (
|
|
535
|
+
function $e(t) {
|
|
536
|
+
if (De(t.currentTarget))
|
|
511
537
|
return;
|
|
512
|
-
const e =
|
|
513
|
-
|
|
538
|
+
const e = X.value ? c("common.copied") || "Copied" : c("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;
|
|
539
|
+
Ke(t.currentTarget, e, "top", !1, n, i.isDark);
|
|
514
540
|
}
|
|
515
|
-
function
|
|
516
|
-
|
|
517
|
-
const t =
|
|
518
|
-
!t || !e || (
|
|
541
|
+
function yt() {
|
|
542
|
+
M.value = !M.value;
|
|
543
|
+
const t = T.value ? $() : z(), e = b.value;
|
|
544
|
+
!t || !e || (M.value ? (ae(!0), e.style.maxHeight = "none", e.style.overflow = "visible", W()) : (ae(!1), e.style.overflow = "auto", U()));
|
|
519
545
|
}
|
|
520
|
-
function
|
|
546
|
+
function kt() {
|
|
521
547
|
var t, e, o;
|
|
522
|
-
if (
|
|
523
|
-
if (
|
|
524
|
-
const n = Math.ceil(((e = (t =
|
|
525
|
-
n > 0 && (
|
|
548
|
+
if (B.value = !B.value, B.value) {
|
|
549
|
+
if (b.value) {
|
|
550
|
+
const n = Math.ceil(((e = (t = b.value).getBoundingClientRect) == null ? void 0 : e.call(t).height) || 0);
|
|
551
|
+
n > 0 && (j.value = n);
|
|
526
552
|
}
|
|
527
|
-
|
|
553
|
+
ae(!1);
|
|
528
554
|
} else {
|
|
529
|
-
|
|
530
|
-
const n =
|
|
555
|
+
M.value && ae(!0), b.value && j.value != null && (b.value.style.height = `${j.value}px`);
|
|
556
|
+
const n = T.value ? $() : z();
|
|
531
557
|
try {
|
|
532
558
|
(o = n == null ? void 0 : n.layout) == null || o.call(n);
|
|
533
559
|
} catch (l) {
|
|
534
560
|
}
|
|
535
|
-
|
|
536
|
-
|
|
561
|
+
de = 2, se(() => {
|
|
562
|
+
M.value ? W() : U();
|
|
537
563
|
});
|
|
538
564
|
}
|
|
539
565
|
}
|
|
540
|
-
|
|
566
|
+
A(
|
|
541
567
|
() => v.value,
|
|
542
568
|
(t, e) => {
|
|
543
|
-
const o =
|
|
544
|
-
o && typeof t == "number" && Number.isFinite(t) && t > 0 && (o.updateOptions({ fontSize: t }),
|
|
569
|
+
const o = T.value ? $() : z();
|
|
570
|
+
o && typeof t == "number" && Number.isFinite(t) && t > 0 && (o.updateOptions({ fontSize: t }), M.value && !B.value && W());
|
|
545
571
|
},
|
|
546
572
|
{ flush: "post", immediate: !1 }
|
|
547
573
|
);
|
|
548
|
-
function
|
|
549
|
-
if (!
|
|
574
|
+
function xt() {
|
|
575
|
+
if (!ye.value)
|
|
550
576
|
return;
|
|
551
|
-
const t =
|
|
552
|
-
if (
|
|
553
|
-
const e = t === "html" ? "text/html" : "image/svg+xml", o = t === "html" ?
|
|
554
|
-
|
|
577
|
+
const t = D.value;
|
|
578
|
+
if (x.value) {
|
|
579
|
+
const e = t === "html" ? "text/html" : "image/svg+xml", o = t === "html" ? c("artifacts.htmlPreviewTitle") || "HTML Preview" : c("artifacts.svgPreviewTitle") || "SVG Preview";
|
|
580
|
+
q("previewCode", {
|
|
555
581
|
node: i.node,
|
|
556
582
|
artifactType: e,
|
|
557
583
|
artifactTitle: o,
|
|
@@ -559,144 +585,144 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
559
585
|
});
|
|
560
586
|
return;
|
|
561
587
|
}
|
|
562
|
-
t === "html" && (
|
|
588
|
+
t === "html" && (le.value = !le.value);
|
|
563
589
|
}
|
|
564
|
-
function
|
|
590
|
+
function ae(t) {
|
|
565
591
|
var e, o;
|
|
566
592
|
try {
|
|
567
|
-
if (
|
|
568
|
-
const n =
|
|
593
|
+
if (T.value) {
|
|
594
|
+
const n = $();
|
|
569
595
|
(e = n == null ? void 0 : n.updateOptions) == null || e.call(n, { automaticLayout: t });
|
|
570
596
|
} else {
|
|
571
|
-
const n =
|
|
597
|
+
const n = z();
|
|
572
598
|
(o = n == null ? void 0 : n.updateOptions) == null || o.call(n, { automaticLayout: t });
|
|
573
599
|
}
|
|
574
600
|
} catch (n) {
|
|
575
601
|
}
|
|
576
602
|
}
|
|
577
|
-
function
|
|
578
|
-
return
|
|
603
|
+
function bt(t) {
|
|
604
|
+
return R(this, null, function* () {
|
|
579
605
|
var o, n, l;
|
|
580
|
-
if (!
|
|
606
|
+
if (!V)
|
|
581
607
|
return;
|
|
582
|
-
|
|
583
|
-
const e =
|
|
608
|
+
T.value ? (me(), oe ? yield oe(t, String((o = i.node.originalCode) != null ? o : ""), String((n = i.node.updatedCode) != null ? n : ""), K.value) : yield V(t, i.node.code, K.value)) : yield V(t, i.node.code, K.value);
|
|
609
|
+
const e = T.value ? $() : z();
|
|
584
610
|
if (typeof ((l = i.monacoOptions) == null ? void 0 : l.fontSize) == "number")
|
|
585
|
-
e == null || e.updateOptions({ fontSize: i.monacoOptions.fontSize, automaticLayout: !1 }),
|
|
611
|
+
e == null || e.updateOptions({ fontSize: i.monacoOptions.fontSize, automaticLayout: !1 }), H.value = i.monacoOptions.fontSize, v.value = i.monacoOptions.fontSize;
|
|
586
612
|
else {
|
|
587
|
-
const
|
|
588
|
-
|
|
613
|
+
const a = Le();
|
|
614
|
+
a && a > 0 ? (H.value = a, v.value = a) : (H.value = 12, v.value = 12);
|
|
589
615
|
}
|
|
590
|
-
!
|
|
591
|
-
|
|
616
|
+
!M.value && !B.value && U(), i.loading === !1 && (yield Me(), se(() => {
|
|
617
|
+
M.value && !B.value ? W() : B.value || U();
|
|
592
618
|
}));
|
|
593
619
|
});
|
|
594
620
|
}
|
|
595
|
-
function
|
|
596
|
-
return
|
|
597
|
-
yield
|
|
621
|
+
function ke(t) {
|
|
622
|
+
return V ? Q || (te.value = !0, Q = R(null, null, function* () {
|
|
623
|
+
yield bt(t);
|
|
598
624
|
}).finally(() => {
|
|
599
|
-
|
|
600
|
-
}),
|
|
625
|
+
Q = null;
|
|
626
|
+
}), Q) : null;
|
|
601
627
|
}
|
|
602
|
-
const
|
|
603
|
-
() => [
|
|
604
|
-
(
|
|
605
|
-
if (!t || !
|
|
628
|
+
const Ne = A(
|
|
629
|
+
() => [b.value, Z.value, T.value, i.stream, i.loading, He.value, I.value],
|
|
630
|
+
(m) => R(null, [m], function* ([t, e, o, n, l, a, h]) {
|
|
631
|
+
if (!t || !V || !h || n === !1 && l !== !1)
|
|
606
632
|
return;
|
|
607
|
-
if (
|
|
608
|
-
|
|
633
|
+
if (Z.value) {
|
|
634
|
+
ie(), Ne();
|
|
609
635
|
return;
|
|
610
636
|
}
|
|
611
|
-
const
|
|
612
|
-
|
|
637
|
+
const y = ke(t);
|
|
638
|
+
y && (yield y, Ne());
|
|
613
639
|
})
|
|
614
|
-
),
|
|
615
|
-
() => [i.darkTheme, i.lightTheme,
|
|
640
|
+
), Ct = A(
|
|
641
|
+
() => [i.darkTheme, i.lightTheme, te.value, I.value],
|
|
616
642
|
() => {
|
|
617
|
-
if (!(!
|
|
618
|
-
if (
|
|
619
|
-
return
|
|
620
|
-
|
|
643
|
+
if (!(!te.value || !I.value)) {
|
|
644
|
+
if (Z.value)
|
|
645
|
+
return Ct();
|
|
646
|
+
Mt();
|
|
621
647
|
}
|
|
622
648
|
}
|
|
623
649
|
);
|
|
624
|
-
function
|
|
650
|
+
function ze() {
|
|
625
651
|
return i.isDark ? i.darkTheme : i.lightTheme;
|
|
626
652
|
}
|
|
627
|
-
function
|
|
628
|
-
const t =
|
|
629
|
-
t &&
|
|
653
|
+
function Mt() {
|
|
654
|
+
const t = ze();
|
|
655
|
+
t && he(t);
|
|
630
656
|
}
|
|
631
|
-
const
|
|
632
|
-
() => [i.monacoOptions,
|
|
657
|
+
const Bt = A(
|
|
658
|
+
() => [i.monacoOptions, I.value],
|
|
633
659
|
() => {
|
|
634
660
|
var o, n;
|
|
635
|
-
if (!
|
|
661
|
+
if (!V || !I.value)
|
|
636
662
|
return;
|
|
637
|
-
if (
|
|
638
|
-
return
|
|
639
|
-
const t =
|
|
640
|
-
typeof e == "number" && Number.isFinite(e) && e > 0 && ((n = t == null ? void 0 : t.updateOptions) == null || n.call(t, { fontSize: e })),
|
|
663
|
+
if (Z.value)
|
|
664
|
+
return Bt();
|
|
665
|
+
const t = T.value ? $() : z(), e = typeof ((o = i.monacoOptions) == null ? void 0 : o.fontSize) == "number" ? i.monacoOptions.fontSize : Number.isFinite(v.value) ? v.value : void 0;
|
|
666
|
+
typeof e == "number" && Number.isFinite(e) && e > 0 && ((n = t == null ? void 0 : t.updateOptions) == null || n.call(t, { fontSize: e })), M.value && !B.value ? W() : B.value || U();
|
|
641
667
|
},
|
|
642
668
|
{ deep: !0 }
|
|
643
|
-
),
|
|
644
|
-
() => [i.loading,
|
|
645
|
-
(o) =>
|
|
669
|
+
), re = A(
|
|
670
|
+
() => [i.loading, I.value],
|
|
671
|
+
(o) => R(null, [o], function* ([t, e]) {
|
|
646
672
|
if (e) {
|
|
647
|
-
if (
|
|
648
|
-
|
|
649
|
-
|
|
673
|
+
if (Z.value) {
|
|
674
|
+
Me(() => {
|
|
675
|
+
re == null || re();
|
|
650
676
|
});
|
|
651
677
|
return;
|
|
652
678
|
}
|
|
653
|
-
t || (yield
|
|
654
|
-
|
|
679
|
+
t || (yield Me(), se(() => {
|
|
680
|
+
B.value || (M.value ? W() : U()), re();
|
|
655
681
|
}));
|
|
656
682
|
}
|
|
657
683
|
}),
|
|
658
684
|
{ immediate: !0, flush: "post" }
|
|
659
685
|
);
|
|
660
|
-
return
|
|
661
|
-
|
|
662
|
-
}), (t, e) =>
|
|
686
|
+
return it(() => {
|
|
687
|
+
ie();
|
|
688
|
+
}), (t, e) => ge.value ? (F(), Fe(p(Ut), {
|
|
663
689
|
key: 0,
|
|
664
690
|
node: f.node,
|
|
665
691
|
loading: i.loading
|
|
666
|
-
}, null, 8, ["node", "loading"])) : (
|
|
692
|
+
}, null, 8, ["node", "loading"])) : (F(), N("div", {
|
|
667
693
|
key: 1,
|
|
668
694
|
ref_key: "container",
|
|
669
|
-
ref:
|
|
670
|
-
style:
|
|
671
|
-
class:
|
|
695
|
+
ref: ce,
|
|
696
|
+
style: qe(pt.value),
|
|
697
|
+
class: ee(["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm", [
|
|
672
698
|
i.isDark ? "border-gray-700/30 bg-gray-900" : "border-gray-200 bg-white",
|
|
673
699
|
{ "is-rendering": i.loading, "is-dark": i.isDark }
|
|
674
700
|
]])
|
|
675
701
|
}, [
|
|
676
|
-
i.showHeader ? (
|
|
677
|
-
|
|
678
|
-
r("div",
|
|
702
|
+
i.showHeader ? (F(), N("div", oo, [
|
|
703
|
+
Be(t.$slots, "header-left", {}, () => [
|
|
704
|
+
r("div", no, [
|
|
679
705
|
r("span", {
|
|
680
706
|
class: "icon-slot h-4 w-4 flex-shrink-0",
|
|
681
|
-
innerHTML:
|
|
682
|
-
}, null, 8,
|
|
683
|
-
r("span",
|
|
707
|
+
innerHTML: gt.value
|
|
708
|
+
}, null, 8, io),
|
|
709
|
+
r("span", lo, Te(ht.value), 1)
|
|
684
710
|
])
|
|
685
711
|
], !0),
|
|
686
|
-
|
|
687
|
-
r("div",
|
|
712
|
+
Be(t.$slots, "header-right", {}, () => [
|
|
713
|
+
r("div", ao, [
|
|
688
714
|
r("button", {
|
|
689
715
|
type: "button",
|
|
690
716
|
class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
|
|
691
|
-
"aria-pressed":
|
|
692
|
-
onClick:
|
|
693
|
-
onMouseenter: e[0] || (e[0] = (o) =>
|
|
694
|
-
onFocus: e[1] || (e[1] = (o) =>
|
|
717
|
+
"aria-pressed": B.value,
|
|
718
|
+
onClick: kt,
|
|
719
|
+
onMouseenter: e[0] || (e[0] = (o) => P(o, B.value ? p(c)("common.expand") || "Expand" : p(c)("common.collapse") || "Collapse")),
|
|
720
|
+
onFocus: e[1] || (e[1] = (o) => P(o, B.value ? p(c)("common.expand") || "Expand" : p(c)("common.collapse") || "Collapse")),
|
|
695
721
|
onMouseleave: S,
|
|
696
722
|
onBlur: S
|
|
697
723
|
}, [
|
|
698
|
-
(
|
|
699
|
-
style:
|
|
724
|
+
(F(), N("svg", {
|
|
725
|
+
style: qe({ rotate: B.value ? "0deg" : "90deg" }),
|
|
700
726
|
xmlns: "http://www.w3.org/2000/svg",
|
|
701
727
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
702
728
|
"aria-hidden": "true",
|
|
@@ -715,15 +741,15 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
715
741
|
d: "m9 18l6-6l-6-6"
|
|
716
742
|
}, null, -1)
|
|
717
743
|
])], 4))
|
|
718
|
-
], 40,
|
|
719
|
-
i.showFontSizeButtons && i.enableFontSizeControl ? (
|
|
744
|
+
], 40, ro),
|
|
745
|
+
i.showFontSizeButtons && i.enableFontSizeControl ? (F(), N(Yt, { key: 0 }, [
|
|
720
746
|
r("button", {
|
|
721
747
|
type: "button",
|
|
722
748
|
class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
|
|
723
|
-
disabled: Number.isFinite(v.value) ? v.value <=
|
|
724
|
-
onClick: e[2] || (e[2] = (o) =>
|
|
725
|
-
onMouseenter: e[3] || (e[3] = (o) =>
|
|
726
|
-
onFocus: e[4] || (e[4] = (o) =>
|
|
749
|
+
disabled: Number.isFinite(v.value) ? v.value <= Qe : !1,
|
|
750
|
+
onClick: e[2] || (e[2] = (o) => dt()),
|
|
751
|
+
onMouseenter: e[3] || (e[3] = (o) => P(o, p(c)("common.decrease") || "Decrease")),
|
|
752
|
+
onFocus: e[4] || (e[4] = (o) => P(o, p(c)("common.decrease") || "Decrease")),
|
|
727
753
|
onMouseleave: S,
|
|
728
754
|
onBlur: S
|
|
729
755
|
}, [...e[18] || (e[18] = [
|
|
@@ -746,14 +772,14 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
746
772
|
d: "M5 12h14"
|
|
747
773
|
})
|
|
748
774
|
], -1)
|
|
749
|
-
])], 40,
|
|
775
|
+
])], 40, so),
|
|
750
776
|
r("button", {
|
|
751
777
|
type: "button",
|
|
752
778
|
class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
|
|
753
|
-
disabled: !
|
|
754
|
-
onClick: e[5] || (e[5] = (o) =>
|
|
755
|
-
onMouseenter: e[6] || (e[6] = (o) =>
|
|
756
|
-
onFocus: e[7] || (e[7] = (o) =>
|
|
779
|
+
disabled: !st.value || v.value === H.value,
|
|
780
|
+
onClick: e[5] || (e[5] = (o) => ft()),
|
|
781
|
+
onMouseenter: e[6] || (e[6] = (o) => P(o, p(c)("common.reset") || "Reset")),
|
|
782
|
+
onFocus: e[7] || (e[7] = (o) => P(o, p(c)("common.reset") || "Reset")),
|
|
757
783
|
onMouseleave: S,
|
|
758
784
|
onBlur: S
|
|
759
785
|
}, [...e[19] || (e[19] = [
|
|
@@ -778,14 +804,14 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
778
804
|
r("path", { d: "M3 3v5h5" })
|
|
779
805
|
])
|
|
780
806
|
], -1)
|
|
781
|
-
])], 40,
|
|
807
|
+
])], 40, uo),
|
|
782
808
|
r("button", {
|
|
783
809
|
type: "button",
|
|
784
810
|
class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
|
|
785
|
-
disabled: Number.isFinite(v.value) ? v.value >=
|
|
786
|
-
onClick: e[8] || (e[8] = (o) =>
|
|
787
|
-
onMouseenter: e[9] || (e[9] = (o) =>
|
|
788
|
-
onFocus: e[10] || (e[10] = (o) =>
|
|
811
|
+
disabled: Number.isFinite(v.value) ? v.value >= Ze : !1,
|
|
812
|
+
onClick: e[8] || (e[8] = (o) => ct()),
|
|
813
|
+
onMouseenter: e[9] || (e[9] = (o) => P(o, p(c)("common.increase") || "Increase")),
|
|
814
|
+
onFocus: e[10] || (e[10] = (o) => P(o, p(c)("common.increase") || "Increase")),
|
|
789
815
|
onMouseleave: S,
|
|
790
816
|
onBlur: S
|
|
791
817
|
}, [...e[20] || (e[20] = [
|
|
@@ -808,20 +834,20 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
808
834
|
d: "M5 12h14m-7-7v14"
|
|
809
835
|
})
|
|
810
836
|
], -1)
|
|
811
|
-
])], 40,
|
|
812
|
-
], 64)) :
|
|
813
|
-
i.showCopyButton ? (
|
|
837
|
+
])], 40, co)
|
|
838
|
+
], 64)) : G("", !0),
|
|
839
|
+
i.showCopyButton ? (F(), N("button", {
|
|
814
840
|
key: 1,
|
|
815
841
|
type: "button",
|
|
816
842
|
class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
|
|
817
|
-
"aria-label":
|
|
818
|
-
onClick:
|
|
819
|
-
onMouseenter: e[11] || (e[11] = (o) =>
|
|
820
|
-
onFocus: e[12] || (e[12] = (o) =>
|
|
843
|
+
"aria-label": X.value ? p(c)("common.copied") || "Copied" : p(c)("common.copy") || "Copy",
|
|
844
|
+
onClick: wt,
|
|
845
|
+
onMouseenter: e[11] || (e[11] = (o) => $e(o)),
|
|
846
|
+
onFocus: e[12] || (e[12] = (o) => $e(o)),
|
|
821
847
|
onMouseleave: S,
|
|
822
848
|
onBlur: S
|
|
823
849
|
}, [
|
|
824
|
-
|
|
850
|
+
X.value ? (F(), N("svg", mo, [...e[22] || (e[22] = [
|
|
825
851
|
r("path", {
|
|
826
852
|
fill: "none",
|
|
827
853
|
stroke: "currentColor",
|
|
@@ -830,7 +856,7 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
830
856
|
"stroke-width": "2",
|
|
831
857
|
d: "M20 6L9 17l-5-5"
|
|
832
858
|
}, null, -1)
|
|
833
|
-
])])) : (
|
|
859
|
+
])])) : (F(), N("svg", vo, [...e[21] || (e[21] = [
|
|
834
860
|
r("g", {
|
|
835
861
|
fill: "none",
|
|
836
862
|
stroke: "currentColor",
|
|
@@ -849,19 +875,19 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
849
875
|
r("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
850
876
|
], -1)
|
|
851
877
|
])]))
|
|
852
|
-
], 40,
|
|
853
|
-
i.showExpandButton ? (
|
|
878
|
+
], 40, fo)) : G("", !0),
|
|
879
|
+
i.showExpandButton ? (F(), N("button", {
|
|
854
880
|
key: 2,
|
|
855
881
|
type: "button",
|
|
856
882
|
class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
|
|
857
|
-
"aria-pressed":
|
|
858
|
-
onClick:
|
|
859
|
-
onMouseenter: e[13] || (e[13] = (o) =>
|
|
860
|
-
onFocus: e[14] || (e[14] = (o) =>
|
|
883
|
+
"aria-pressed": M.value,
|
|
884
|
+
onClick: yt,
|
|
885
|
+
onMouseenter: e[13] || (e[13] = (o) => P(o, M.value ? p(c)("common.collapse") || "Collapse" : p(c)("common.expand") || "Expand")),
|
|
886
|
+
onFocus: e[14] || (e[14] = (o) => P(o, M.value ? p(c)("common.collapse") || "Collapse" : p(c)("common.expand") || "Expand")),
|
|
861
887
|
onMouseleave: S,
|
|
862
888
|
onBlur: S
|
|
863
889
|
}, [
|
|
864
|
-
|
|
890
|
+
M.value ? (F(), N("svg", go, [...e[23] || (e[23] = [
|
|
865
891
|
r("path", {
|
|
866
892
|
fill: "none",
|
|
867
893
|
stroke: "currentColor",
|
|
@@ -870,7 +896,7 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
870
896
|
"stroke-width": "2",
|
|
871
897
|
d: "M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"
|
|
872
898
|
}, null, -1)
|
|
873
|
-
])])) : (
|
|
899
|
+
])])) : (F(), N("svg", po, [...e[24] || (e[24] = [
|
|
874
900
|
r("path", {
|
|
875
901
|
fill: "none",
|
|
876
902
|
stroke: "currentColor",
|
|
@@ -880,15 +906,15 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
880
906
|
d: "m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"
|
|
881
907
|
}, null, -1)
|
|
882
908
|
])]))
|
|
883
|
-
], 40,
|
|
884
|
-
|
|
909
|
+
], 40, ho)) : G("", !0),
|
|
910
|
+
ye.value && i.showPreviewButton ? (F(), N("button", {
|
|
885
911
|
key: 3,
|
|
886
912
|
type: "button",
|
|
887
913
|
class: "code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",
|
|
888
|
-
"aria-label":
|
|
889
|
-
onClick:
|
|
890
|
-
onMouseenter: e[15] || (e[15] = (o) =>
|
|
891
|
-
onFocus: e[16] || (e[16] = (o) =>
|
|
914
|
+
"aria-label": p(c)("common.preview") || "Preview",
|
|
915
|
+
onClick: xt,
|
|
916
|
+
onMouseenter: e[15] || (e[15] = (o) => P(o, p(c)("common.preview") || "Preview")),
|
|
917
|
+
onFocus: e[16] || (e[16] = (o) => P(o, p(c)("common.preview") || "Preview")),
|
|
892
918
|
onMouseleave: S,
|
|
893
919
|
onBlur: S
|
|
894
920
|
}, [...e[25] || (e[25] = [
|
|
@@ -907,25 +933,25 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
907
933
|
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" })
|
|
908
934
|
])
|
|
909
935
|
], -1)
|
|
910
|
-
])], 40,
|
|
936
|
+
])], 40, wo)) : G("", !0)
|
|
911
937
|
])
|
|
912
938
|
], !0)
|
|
913
|
-
])) :
|
|
914
|
-
|
|
939
|
+
])) : G("", !0),
|
|
940
|
+
Xe(r("div", {
|
|
915
941
|
ref_key: "codeEditor",
|
|
916
|
-
ref:
|
|
917
|
-
class:
|
|
942
|
+
ref: b,
|
|
943
|
+
class: ee(["code-editor-container", [f.stream ? "" : "code-height-placeholder"]])
|
|
918
944
|
}, null, 2), [
|
|
919
|
-
[
|
|
945
|
+
[Ue, !B.value && (f.stream ? !0 : !f.loading)]
|
|
920
946
|
]),
|
|
921
|
-
|
|
947
|
+
le.value && !x.value && ye.value && D.value === "html" ? (F(), Fe(to, {
|
|
922
948
|
key: 1,
|
|
923
949
|
code: f.node.code,
|
|
924
950
|
"is-dark": i.isDark,
|
|
925
|
-
"on-close": () =>
|
|
926
|
-
}, null, 8, ["code", "is-dark", "on-close"])) :
|
|
927
|
-
|
|
928
|
-
|
|
951
|
+
"on-close": () => le.value = !1
|
|
952
|
+
}, null, 8, ["code", "is-dark", "on-close"])) : G("", !0),
|
|
953
|
+
Xe(r("div", yo, [
|
|
954
|
+
Be(t.$slots, "loading", {
|
|
929
955
|
loading: f.loading,
|
|
930
956
|
stream: f.stream
|
|
931
957
|
}, () => [
|
|
@@ -936,15 +962,15 @@ const qt = { class: "html-preview-frame__header" }, Xt = { class: "html-preview-
|
|
|
936
962
|
], -1))
|
|
937
963
|
], !0)
|
|
938
964
|
], 512), [
|
|
939
|
-
[
|
|
965
|
+
[Ue, !f.stream && f.loading]
|
|
940
966
|
]),
|
|
941
|
-
r("span",
|
|
967
|
+
r("span", ko, Te(X.value ? p(c)("common.copied") || "Copied" : ""), 1)
|
|
942
968
|
], 6));
|
|
943
969
|
}
|
|
944
|
-
}),
|
|
945
|
-
|
|
946
|
-
f.component(
|
|
970
|
+
}), Se = /* @__PURE__ */ at(xo, [["__scopeId", "data-v-acbbd971"]]);
|
|
971
|
+
Se.install = (f) => {
|
|
972
|
+
f.component(Se.__name, Se);
|
|
947
973
|
};
|
|
948
974
|
export {
|
|
949
|
-
|
|
975
|
+
Se as default
|
|
950
976
|
};
|