@deot/docs-client 1.1.4 → 1.1.5
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 +86 -1
- package/dist/chunks/{cdn-DEvdGJu2-bmlgKy4E.js → cdn-DQoETju_-DS-873Vi.js} +3 -3
- package/dist/chunks/{compile-Bw7v7QE--Dd1-R95H.js → compile-BHD98Ttf-BJaenUUQ.js} +1103 -1108
- package/dist/chunks/{dist-Bm7SK-km.js → dist-9UPCn_ag.js} +8347 -8263
- package/dist/chunks/{dist-DlmO7OlF.js → dist-B44jICwZ.js} +1 -1
- package/dist/chunks/{dist-CuJyl-ef.js → dist-BQyOK8Qy.js} +6 -6
- package/dist/chunks/dist-DWn6r6un.js +76 -0
- package/dist/chunks/files-BqucFldk-B-hTQ-ip.js +148 -0
- package/dist/chunks/{linker-JHdz37DK-CWgUtxZ5.js → linker-xqjVl0X0-CWWI367H.js} +10 -10
- package/dist/chunks/{local-sandbox-B8IJ5jWb-BgfU3iQ4.js → local-sandbox-DvcgaBOa-CzJxrdVx.js} +91 -93
- package/dist/chunks/{modules-DlLJF_vd-DcNdL6sc.js → modules-BGzPcoRR-C9BWX8hC.js} +49 -48
- package/dist/chunks/remote-mq4zvrI1-Bib9tTkb.js +104 -0
- package/dist/chunks/{script-xKUjE8pf-oF69rg-w.js → script-DjUf9uWK-Cu5Kla_E.js} +2664 -2550
- package/dist/chunks/{store-D8vwi-HV-RFStijWr.js → store-BOyC8F2y-CbodPye0.js} +2913 -2812
- package/dist/index.cjs +980 -323
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7962 -7545
- package/dist/index.style.css +2 -2
- package/package.json +8 -8
- package/dist/chunks/dist-DN0sqx7H.js +0 -39
- package/dist/chunks/files-C5UMzYxA-q9oJ4PrI.js +0 -110
- package/dist/chunks/remote-DfXAsO9n-C_MtPVYr.js +0 -75
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
globalThis.process;
|
|
2
2
|
import { r as e } from "./dist-C3V7reR4.js";
|
|
3
3
|
import { i as t } from "./dist-va7FmnW4.js";
|
|
4
|
-
import { t as n } from "./dist-
|
|
4
|
+
import { t as n } from "./dist-DWn6r6un.js";
|
|
5
5
|
import { t as r } from "./dist-CI9Lp9Cj.js";
|
|
6
6
|
import { t as i } from "./dist-D_Uqh6m9.js";
|
|
7
7
|
import { i as a, r as o, t as s } from "./dist-DcIU51zW.js";
|
|
@@ -10,8 +10,8 @@ import { i as l, n as u, r as d, t as f } from "./dist-COjpr4FU.js";
|
|
|
10
10
|
import { t as p } from "./dist-C8z9l0mA.js";
|
|
11
11
|
import { i as m, n as h, r as g, t as _ } from "./dist-CQir6D4y.js";
|
|
12
12
|
import { o as v } from "./dist-DLj8yJdm.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { t as x } from "./dist-
|
|
16
|
-
import { t as S } from "./dist-
|
|
17
|
-
export { t as $, _ as Cookie,
|
|
13
|
+
import { n as y } from "./dist-B44jICwZ.js";
|
|
14
|
+
import { Device as b } from "./dist-kiZUqqzR.js";
|
|
15
|
+
import { t as x } from "./dist-DF4kisl2.js";
|
|
16
|
+
import { t as S } from "./dist-oZ12SGqg.js";
|
|
17
|
+
export { t as $, _ as Cookie, b as Device, c as Emitter, l as FP, h as IndexedDB, g as IndexedDBStore, p as Interrupter, v as Is, f as Job, i as Load, u as Parallel, a as RegExps, n as Resize, x as Route, o as RuleHelper, S as Shared, m as Storage, d as Task, y as Unicode, e as Utils, s as Validator, r as Wheel };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
globalThis.process;
|
|
2
|
+
import { n as e } from "./rolldown-runtime-Ce3zPWPd.js";
|
|
3
|
+
//#region node_modules/.pnpm/@deot+helper-resize@1.1.6/node_modules/@deot/helper-resize/dist/index.js
|
|
4
|
+
var t = /* @__PURE__ */ e({ Resize: () => r }), n = class e {
|
|
5
|
+
static listeners = /* @__PURE__ */ new WeakMap();
|
|
6
|
+
static observers = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
static observerOf(t) {
|
|
8
|
+
let n = e.observers.get(t);
|
|
9
|
+
return n || (n = {
|
|
10
|
+
ro: new ResizeObserver((n) => {
|
|
11
|
+
let r = n.filter((n) => e.listeners.get(n.target)?.has(t));
|
|
12
|
+
r.length && t(r);
|
|
13
|
+
}),
|
|
14
|
+
els: /* @__PURE__ */ new Set()
|
|
15
|
+
}, e.observers.set(t, n)), n;
|
|
16
|
+
}
|
|
17
|
+
static on(t, n) {
|
|
18
|
+
if (typeof ResizeObserver > "u") return () => {};
|
|
19
|
+
let r = e.listeners.get(t);
|
|
20
|
+
if (r || (r = /* @__PURE__ */ new Set(), e.listeners.set(t, r)), !r.has(n)) {
|
|
21
|
+
r.add(n);
|
|
22
|
+
let i = e.observerOf(n);
|
|
23
|
+
i.els.add(t), i.ro.observe(t);
|
|
24
|
+
}
|
|
25
|
+
return () => e.off(t, n);
|
|
26
|
+
}
|
|
27
|
+
static off(t, n) {
|
|
28
|
+
let r = e.listeners.get(t);
|
|
29
|
+
r && ((n ? [n] : [...r]).forEach((n) => {
|
|
30
|
+
if (!r.delete(n)) return;
|
|
31
|
+
let i = e.observers.get(n);
|
|
32
|
+
i.els.delete(t), i.ro.unobserve(t);
|
|
33
|
+
}), r.size || e.listeners.delete(t));
|
|
34
|
+
}
|
|
35
|
+
static disconnect(t) {
|
|
36
|
+
e.observers.get(t)?.els.forEach((n) => e.off(n, t));
|
|
37
|
+
}
|
|
38
|
+
}, r = class e {
|
|
39
|
+
el;
|
|
40
|
+
static of(t) {
|
|
41
|
+
return new e(t);
|
|
42
|
+
}
|
|
43
|
+
static on(t, r, i) {
|
|
44
|
+
return i?.shared ? n.on(t, r) : new e(t).on(r);
|
|
45
|
+
}
|
|
46
|
+
static off(t, r, i) {
|
|
47
|
+
return i?.shared ? n.off(t, r) : new e(t).off(r);
|
|
48
|
+
}
|
|
49
|
+
static disconnect(e) {
|
|
50
|
+
return n.disconnect(e);
|
|
51
|
+
}
|
|
52
|
+
listeners = [];
|
|
53
|
+
ro = null;
|
|
54
|
+
constructor(t) {
|
|
55
|
+
this.el = t;
|
|
56
|
+
let n = t.__rz__;
|
|
57
|
+
n && n instanceof e && (this.listeners = n.listeners, this.ro = n.ro);
|
|
58
|
+
}
|
|
59
|
+
handleResize = (e) => {
|
|
60
|
+
/* istanbul ignore else -- @preserve */
|
|
61
|
+
e.some((e) => e.target === this.el) && this.listeners?.forEach((e) => e());
|
|
62
|
+
};
|
|
63
|
+
on(e) {
|
|
64
|
+
return typeof ResizeObserver > "u" ? () => {} : (this.listeners.length || (this.ro = this.ro || new ResizeObserver(this.handleResize), this.ro.observe(this.el), this.el.__rz__ = this), this.listeners.push(e), () => this.off(e));
|
|
65
|
+
}
|
|
66
|
+
off(e) {
|
|
67
|
+
if (e) {
|
|
68
|
+
let t = this.listeners.indexOf(e);
|
|
69
|
+
if (t === -1) return;
|
|
70
|
+
this.listeners.splice(t, 1);
|
|
71
|
+
} else this.listeners.length = 0;
|
|
72
|
+
!this.listeners.length && this.ro && this.ro.disconnect();
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
//#endregion
|
|
76
|
+
export { t as n, r as t };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
globalThis.process;
|
|
2
|
+
import { n as e } from "./rolldown-runtime-Ce3zPWPd.js";
|
|
3
|
+
//#region packages/playground/dist/files-BqucFldk.js
|
|
4
|
+
var t = /* @__PURE__ */ e({
|
|
5
|
+
a: () => g,
|
|
6
|
+
c: () => _,
|
|
7
|
+
d: () => p,
|
|
8
|
+
f: () => h,
|
|
9
|
+
i: () => a,
|
|
10
|
+
l: () => y,
|
|
11
|
+
n: () => b,
|
|
12
|
+
o: () => u,
|
|
13
|
+
p: () => r,
|
|
14
|
+
r: () => f,
|
|
15
|
+
s: () => d,
|
|
16
|
+
t: () => x,
|
|
17
|
+
u: () => o
|
|
18
|
+
}), n = Object.defineProperty, r = (e, t) => {
|
|
19
|
+
let r = {};
|
|
20
|
+
for (var i in e) n(r, i, {
|
|
21
|
+
get: e[i],
|
|
22
|
+
enumerable: !0
|
|
23
|
+
});
|
|
24
|
+
return t || n(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
25
|
+
}, i = /* @__PURE__ */ new Set(["import-map.json", "tsconfig.json"]), a = /* @__PURE__ */ r({
|
|
26
|
+
basename: () => c,
|
|
27
|
+
collectBareSpecifiers: () => x,
|
|
28
|
+
collectReachableFilenames: () => b,
|
|
29
|
+
createFileIndex: () => f,
|
|
30
|
+
dirname: () => s,
|
|
31
|
+
getCommonRoot: () => g,
|
|
32
|
+
getExtension: () => u,
|
|
33
|
+
isIgnoredFilename: () => d,
|
|
34
|
+
isInsideRoot: () => _,
|
|
35
|
+
isRelativeSpecifier: () => y,
|
|
36
|
+
joinVirtualPath: () => l,
|
|
37
|
+
listImportSpecifiers: () => v,
|
|
38
|
+
normalizeVirtualPath: () => o,
|
|
39
|
+
resolveEntry: () => p,
|
|
40
|
+
resolveModulePath: () => h
|
|
41
|
+
}), o = (e) => {
|
|
42
|
+
let t = String(e || "").replace(/\\/gu, "/").trim();
|
|
43
|
+
if (!t) return "/";
|
|
44
|
+
let n = (t.startsWith("/") ? t : `/${t}`).split("/"), r = [];
|
|
45
|
+
for (let e of n) if (e && e !== ".") {
|
|
46
|
+
if (e === "..") {
|
|
47
|
+
r.length && r.pop();
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
r.push(e);
|
|
51
|
+
}
|
|
52
|
+
return `/${r.join("/")}`;
|
|
53
|
+
}, s = (e) => {
|
|
54
|
+
let t = o(e), n = t.lastIndexOf("/");
|
|
55
|
+
return n <= 0 ? "/" : t.slice(0, n) || "/";
|
|
56
|
+
}, c = (e) => {
|
|
57
|
+
let t = o(e), n = t.lastIndexOf("/");
|
|
58
|
+
return n === -1 ? t : t.slice(n + 1);
|
|
59
|
+
}, l = (e, t) => {
|
|
60
|
+
let n = String(t || "").replace(/\\/gu, "/");
|
|
61
|
+
if (n.startsWith("/")) return o(n);
|
|
62
|
+
let r = o(e);
|
|
63
|
+
return o(`${r === "/" ? "" : r}/${n}`);
|
|
64
|
+
}, u = (e) => {
|
|
65
|
+
let t = c(e), n = t.lastIndexOf(".");
|
|
66
|
+
return n <= 0 ? "" : t.slice(n).toLowerCase();
|
|
67
|
+
}, d = (e) => i.has(c(e)), f = (e) => {
|
|
68
|
+
let t = /* @__PURE__ */ new Map();
|
|
69
|
+
return Object.entries(e || {}).forEach(([e, n]) => {
|
|
70
|
+
let r = o(e);
|
|
71
|
+
d(r) || t.set(r, n);
|
|
72
|
+
}), t;
|
|
73
|
+
}, p = (e, t) => {
|
|
74
|
+
let n = f(e);
|
|
75
|
+
if (!n.size) throw Error("[Playground] files 为空,无法确定入口");
|
|
76
|
+
if (t) {
|
|
77
|
+
let e = o(t);
|
|
78
|
+
if (d(e)) throw Error(`[Playground] entry 不能是 ${c(e)}`);
|
|
79
|
+
if (!n.has(e)) throw Error(`[Playground] entry 不在 files 中: ${t}`);
|
|
80
|
+
return e;
|
|
81
|
+
}
|
|
82
|
+
for (let t of Object.keys(e || {})) {
|
|
83
|
+
let e = o(t);
|
|
84
|
+
if (!d(e) && n.has(e)) return e;
|
|
85
|
+
}
|
|
86
|
+
/* istanbul ignore next -- 忽略文件已在前面排除,正常 files 不会走到这里 */
|
|
87
|
+
throw Error("[Playground] files 中没有可用的入口文件");
|
|
88
|
+
}, m = [
|
|
89
|
+
".vue",
|
|
90
|
+
".ts",
|
|
91
|
+
".js",
|
|
92
|
+
".tsx",
|
|
93
|
+
".jsx",
|
|
94
|
+
".json",
|
|
95
|
+
".css",
|
|
96
|
+
".scss",
|
|
97
|
+
".sass"
|
|
98
|
+
], h = (e, t, n) => {
|
|
99
|
+
if (!t || !(t === "." || t === ".." || t.startsWith("./") || t.startsWith("../") || t.startsWith("/"))) return null;
|
|
100
|
+
let r = l(s(e), t);
|
|
101
|
+
if (n.has(r)) return r;
|
|
102
|
+
for (let e of m) {
|
|
103
|
+
let t = `${r}${e}`;
|
|
104
|
+
if (n.has(t)) return t;
|
|
105
|
+
}
|
|
106
|
+
for (let e of m) {
|
|
107
|
+
let t = `${r}/index${e}`;
|
|
108
|
+
if (n.has(t)) return t;
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}, g = (e) => {
|
|
112
|
+
let t = e.map(o);
|
|
113
|
+
if (!t.length) return "/";
|
|
114
|
+
let n = t.map((e) => e.split("/").filter(Boolean)), r = n[0], i = r.length;
|
|
115
|
+
for (let e = 1; e < n.length; e += 1) {
|
|
116
|
+
let t = 0;
|
|
117
|
+
for (; t < i && t < n[e].length && r[t] === n[e][t];) t += 1;
|
|
118
|
+
i = t;
|
|
119
|
+
}
|
|
120
|
+
if (!i) return "/";
|
|
121
|
+
let a = `/${r.slice(0, i).join("/")}`;
|
|
122
|
+
return t.some((e) => e === a) ? s(a) : a;
|
|
123
|
+
}, _ = (e, t) => {
|
|
124
|
+
let n = o(e), r = o(t);
|
|
125
|
+
return r === "/" || n === r || n.startsWith(`${r}/`);
|
|
126
|
+
}, v = (e) => {
|
|
127
|
+
let t = [], n = String(e || "");
|
|
128
|
+
for (let e of n.matchAll(/(?:\bfrom\s+|import\s*\(\s*|import\s+)['"]([^'"]+)['"]/gu)) e[1] && t.push(e[1]);
|
|
129
|
+
return t;
|
|
130
|
+
}, y = (e) => e === "." || e === ".." || e.startsWith("./") || e.startsWith("../") || e.startsWith("/"), b = (e, t) => {
|
|
131
|
+
let n = f(e), r = [], i = /* @__PURE__ */ new Set(), a = (e) => {
|
|
132
|
+
let t = o(e);
|
|
133
|
+
!i.has(t) && n.has(t) && (i.add(t), r.push(t), v(n.get(t) || "").forEach((e) => {
|
|
134
|
+
let r = h(t, e, n);
|
|
135
|
+
r && a(r);
|
|
136
|
+
}));
|
|
137
|
+
};
|
|
138
|
+
return a(t), r;
|
|
139
|
+
}, x = (e, t) => {
|
|
140
|
+
let n = f(e), r = [], i = /* @__PURE__ */ new Set();
|
|
141
|
+
return t.forEach((e) => {
|
|
142
|
+
v(n.get(o(e)) || "").forEach((e) => {
|
|
143
|
+
!e || y(e) || i.has(e) || /\.(?:css|scss|sass)(?:[?#]|$)/.test(e) || (i.add(e), r.push(e));
|
|
144
|
+
});
|
|
145
|
+
}), r;
|
|
146
|
+
};
|
|
147
|
+
//#endregion
|
|
148
|
+
export { t as a, d as c, o as d, p as f, f as i, _ as l, x as n, g as o, h as p, b as r, u as s, r as t, y as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
globalThis.process;
|
|
2
2
|
import { S as e, t, w as n, z as r } from "./vue.runtime.esm-bundler-XxHGOLq2.js";
|
|
3
|
-
import {
|
|
4
|
-
import { resolveHostModule as u } from "./modules-
|
|
5
|
-
//#region packages/playground/dist/linker-
|
|
3
|
+
import { d as i, i as a, l as o, o as s, p as c, u as l } from "./files-BqucFldk-B-hTQ-ip.js";
|
|
4
|
+
import { resolveHostModule as u } from "./modules-BGzPcoRR-C9BWX8hC.js";
|
|
5
|
+
//#region packages/playground/dist/linker-xqjVl0X0.js
|
|
6
6
|
var d = (i) => {
|
|
7
7
|
let a = (t, a) => {
|
|
8
8
|
let o = {
|
|
@@ -68,9 +68,9 @@ var d = (i) => {
|
|
|
68
68
|
provides: {}
|
|
69
69
|
}, m = { ...r.modules || {} };
|
|
70
70
|
(m.vue == null || m.vue === t) && (m.vue = d(p));
|
|
71
|
-
let h =
|
|
72
|
-
if (
|
|
73
|
-
let n =
|
|
71
|
+
let h = a(n), g = s([...h.keys()]), _ = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Set(), y = (e) => (t) => {
|
|
72
|
+
if (l(t)) {
|
|
73
|
+
let n = c(e, t, h);
|
|
74
74
|
if (!n) throw Error(`[Playground] 无法解析相对模块 "${t}"(来自 ${e})`);
|
|
75
75
|
/* istanbul ignore if -- 公共根已包含全部 files,正常解析不会逃出 */
|
|
76
76
|
if (!o(n, g)) throw Error(`[Playground] 模块逃出虚拟根: ${n}`);
|
|
@@ -80,14 +80,14 @@ var d = (i) => {
|
|
|
80
80
|
if (n) return n;
|
|
81
81
|
throw Error(`[Playground] 未注册的模块 "${t}"。请在 import map 中提供可加载的地址。`);
|
|
82
82
|
}, b = (t) => {
|
|
83
|
-
let n =
|
|
83
|
+
let n = i(t);
|
|
84
84
|
if (_.has(n) || v.has(n)) return _.get(n);
|
|
85
85
|
let r = e.modules[n];
|
|
86
86
|
if (!r) throw Error(`[Playground] 缺少编译模块: ${n}`);
|
|
87
|
-
let
|
|
88
|
-
_.set(n,
|
|
87
|
+
let a = { exports: {} };
|
|
88
|
+
_.set(n, a.exports), v.add(n);
|
|
89
89
|
try {
|
|
90
|
-
return Function("require", "module", "exports", r.js)(y(n),
|
|
90
|
+
return Function("require", "module", "exports", r.js)(y(n), a, a.exports), _.set(n, a.exports), a.exports;
|
|
91
91
|
} catch (e) {
|
|
92
92
|
let t = e instanceof Error ? e.message : String(e);
|
|
93
93
|
throw f.push(`[Playground] 执行失败 ${n}: ${t}`), e;
|
package/dist/chunks/{local-sandbox-B8IJ5jWb-BgfU3iQ4.js → local-sandbox-DvcgaBOa-CzJxrdVx.js}
RENAMED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
globalThis.process;
|
|
2
|
-
import { F as e, M as t, P as n, R as r, S as i, at as a, dt as o, g as s, i as c, k as l, p as u,
|
|
3
|
-
import { gr as
|
|
4
|
-
import { o as
|
|
5
|
-
import {
|
|
2
|
+
import { F as e, M as t, P as n, R as r, S as i, at as a, dt as o, g as s, i as c, k as l, p as u, pt as d, q as f, st as p, t as m, w as h, z as g } from "./vue.runtime.esm-bundler-XxHGOLq2.js";
|
|
3
|
+
import { gr as _ } from "./dist-9UPCn_ag.js";
|
|
4
|
+
import { o as v } from "./vue-router-C0mj8Ot5.js";
|
|
5
|
+
import { t as y } from "./files-BqucFldk-B-hTQ-ip.js";
|
|
6
|
+
import { f as b, i as x } from "./store-BOyC8F2y-CbodPye0.js";
|
|
6
7
|
import "../index.js";
|
|
7
|
-
//#region packages/playground/dist/local-sandbox-
|
|
8
|
-
var
|
|
9
|
-
let n = {};
|
|
10
|
-
for (var r in e) b(n, r, {
|
|
11
|
-
get: e[r],
|
|
12
|
-
enumerable: !0
|
|
13
|
-
});
|
|
14
|
-
return t || b(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
15
|
-
}, S = (e) => {
|
|
8
|
+
//#region packages/playground/dist/local-sandbox-DvcgaBOa.js
|
|
9
|
+
var S = (e) => {
|
|
16
10
|
let t = [];
|
|
17
11
|
return e.forEach((e) => {
|
|
18
12
|
let n = String(e || "").trim();
|
|
@@ -129,25 +123,29 @@ if (!window.__docsLocalBridge) {
|
|
|
129
123
|
clearConsole: {
|
|
130
124
|
type: Boolean,
|
|
131
125
|
default: !1
|
|
126
|
+
},
|
|
127
|
+
autoHeight: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: !1
|
|
132
130
|
}
|
|
133
131
|
},
|
|
134
132
|
emits: ["error"],
|
|
135
|
-
setup(
|
|
136
|
-
let
|
|
137
|
-
|
|
138
|
-
compile:
|
|
139
|
-
runtime:
|
|
133
|
+
setup(y, { expose: S, emit: E }) {
|
|
134
|
+
let D = y, N = E, P = O, F = a(null), I = a(null), L = a(null), R = a(""), z = a(""), B = p(null), V = null, H = null, U = 0, W = null, G = `docs-local-${Math.random().toString(36).slice(2, 10)}`, K = () => {
|
|
135
|
+
N("error", {
|
|
136
|
+
compile: R.value,
|
|
137
|
+
runtime: z.value
|
|
140
138
|
});
|
|
141
139
|
};
|
|
142
|
-
|
|
143
|
-
let
|
|
140
|
+
f([R, z], K);
|
|
141
|
+
let q = (e) => i({
|
|
144
142
|
name: "DocsLink",
|
|
145
143
|
props: { to: {
|
|
146
144
|
type: String,
|
|
147
145
|
default: ""
|
|
148
146
|
} },
|
|
149
147
|
setup(t, { slots: n }) {
|
|
150
|
-
return () =>
|
|
148
|
+
return () => h("a", {
|
|
151
149
|
href: t.to,
|
|
152
150
|
style: {
|
|
153
151
|
color: "inherit",
|
|
@@ -161,140 +159,140 @@ if (!window.__docsLocalBridge) {
|
|
|
161
159
|
}
|
|
162
160
|
}, n.default?.());
|
|
163
161
|
}
|
|
164
|
-
}),
|
|
165
|
-
|
|
166
|
-
},
|
|
167
|
-
if (!
|
|
168
|
-
|
|
169
|
-
let a =
|
|
162
|
+
}), J = () => {
|
|
163
|
+
H?.unmount(), H = null, w(G);
|
|
164
|
+
}, Y = (e, r, i) => {
|
|
165
|
+
if (!L.value) return;
|
|
166
|
+
J(), C(G, i), D.clearConsole && console.clear();
|
|
167
|
+
let a = D.previewScroller === !0, o = c({
|
|
170
168
|
name: "LocalSandboxRoot",
|
|
171
169
|
setup() {
|
|
172
|
-
let r = T(
|
|
173
|
-
return
|
|
170
|
+
let r = T(m);
|
|
171
|
+
return g("docs:playground", r), n((e) => {
|
|
174
172
|
let t = j(e);
|
|
175
|
-
return t && (
|
|
173
|
+
return t && (z.value = t), !1;
|
|
176
174
|
}), t(() => r.dispose()), () => {
|
|
177
|
-
let t =
|
|
178
|
-
return a ?
|
|
175
|
+
let t = h(e);
|
|
176
|
+
return a ? h(_, {
|
|
179
177
|
height: "100%",
|
|
180
178
|
native: !1,
|
|
181
179
|
autoResize: !0,
|
|
182
180
|
showBar: !0,
|
|
183
|
-
contentClass:
|
|
181
|
+
contentClass: x
|
|
184
182
|
}, { default: () => t }) : t;
|
|
185
183
|
};
|
|
186
184
|
}
|
|
187
185
|
});
|
|
188
|
-
o.component("DocsLink",
|
|
186
|
+
o.component("DocsLink", q(r)), o.config.errorHandler = (e) => {
|
|
189
187
|
let t = j(e);
|
|
190
|
-
t && (
|
|
191
|
-
}, o.mount(
|
|
192
|
-
},
|
|
193
|
-
let e =
|
|
188
|
+
t && (z.value = t);
|
|
189
|
+
}, o.mount(L.value), H = o;
|
|
190
|
+
}, X = () => {
|
|
191
|
+
let e = I.value;
|
|
194
192
|
if (!e?.contentWindow) return null;
|
|
195
193
|
try {
|
|
196
194
|
if (!k(e)) return null;
|
|
197
195
|
} catch {
|
|
198
196
|
return null;
|
|
199
197
|
}
|
|
200
|
-
return
|
|
201
|
-
},
|
|
202
|
-
let e =
|
|
198
|
+
return V ??= new A(e), B.value = e.contentWindow, V;
|
|
199
|
+
}, Z = async () => {
|
|
200
|
+
let e = W;
|
|
203
201
|
/* istanbul ignore if -- 桥接 iframe 尚未就绪或编译已被取代 */
|
|
204
|
-
if (!e || e.version !==
|
|
205
|
-
let t =
|
|
202
|
+
if (!e || e.version !== U) return;
|
|
203
|
+
let t = X();
|
|
206
204
|
/* istanbul ignore if -- 挂载点在编译完成时已经存在 */
|
|
207
|
-
t &&
|
|
208
|
-
},
|
|
209
|
-
let e = ++
|
|
210
|
-
|
|
205
|
+
t && L.value && (await l(), W === e && L.value && (W = null, Y(e.component, t, e.css)));
|
|
206
|
+
}, Q = async () => {
|
|
207
|
+
let e = ++U;
|
|
208
|
+
W = null, R.value = "", z.value = "", K(), J();
|
|
211
209
|
try {
|
|
212
210
|
let [{ compilePlayground: t }, { linkPlayground: n }, r, i] = await Promise.all([
|
|
213
|
-
import("./compile-
|
|
214
|
-
import("./linker-
|
|
215
|
-
import("./modules-
|
|
216
|
-
import("./files-
|
|
211
|
+
import("./compile-BHD98Ttf-BJaenUUQ.js"),
|
|
212
|
+
import("./linker-xqjVl0X0-CWWI367H.js"),
|
|
213
|
+
import("./modules-BGzPcoRR-C9BWX8hC.js"),
|
|
214
|
+
import("./files-BqucFldk-B-hTQ-ip.js").then((e) => e.a).then((e) => e.i)
|
|
217
215
|
]);
|
|
218
216
|
/* istanbul ignore if -- 并发编译时只保留最后一次 */
|
|
219
|
-
if (e !==
|
|
220
|
-
let a = await t(
|
|
217
|
+
if (e !== U) return;
|
|
218
|
+
let a = await t(D.files, { entry: D.entry });
|
|
221
219
|
/* istanbul ignore if -- 并发编译时只保留最后一次 */
|
|
222
|
-
if (e !==
|
|
220
|
+
if (e !== U) return;
|
|
223
221
|
if (a.errors.length || !a.entry) {
|
|
224
|
-
|
|
222
|
+
R.value = a.errors.join("\n") || "[Playground] 未能确定入口", K();
|
|
225
223
|
return;
|
|
226
224
|
}
|
|
227
|
-
let o =
|
|
228
|
-
vue:
|
|
229
|
-
vueRouter:
|
|
230
|
-
},
|
|
231
|
-
vue:
|
|
232
|
-
vueRouter:
|
|
233
|
-
}, (e) => l.load(e),
|
|
225
|
+
let o = b(D.options.cdnURL, D.options.builtinImportMap), s = i.collectBareSpecifiers(D.files, i.collectReachableFilenames(D.files, a.entry)), { createRemoteLoader: c } = await import("./remote-mq4zvrI1-Bib9tTkb.js"), l = c(o, {
|
|
226
|
+
vue: m,
|
|
227
|
+
vueRouter: v
|
|
228
|
+
}, D.options.cdnURL), u = await r.loadLocalModules(s, o, {
|
|
229
|
+
vue: m,
|
|
230
|
+
vueRouter: v
|
|
231
|
+
}, (e) => l.load(e), D.options.cdnURL);
|
|
234
232
|
/* istanbul ignore if -- 并发编译时只保留最后一次 */
|
|
235
|
-
if (e !==
|
|
233
|
+
if (e !== U) return;
|
|
236
234
|
if (u.errors.length) {
|
|
237
|
-
|
|
235
|
+
R.value = u.errors.join("\n"), K();
|
|
238
236
|
return;
|
|
239
237
|
}
|
|
240
|
-
let d = n(a,
|
|
238
|
+
let d = n(a, D.files, { modules: u.modules });
|
|
241
239
|
/* istanbul ignore if -- 并发编译时只保留最后一次 */
|
|
242
|
-
if (e !==
|
|
240
|
+
if (e !== U) return;
|
|
243
241
|
if (d.errors.length || !d.component) {
|
|
244
|
-
|
|
242
|
+
R.value = (d.errors.length ? d.errors : ["[Playground] 未能解析入口组件"]).join("\n"), K();
|
|
245
243
|
return;
|
|
246
244
|
}
|
|
247
|
-
|
|
245
|
+
W = {
|
|
248
246
|
component: d.component,
|
|
249
247
|
css: d.css,
|
|
250
248
|
version: e
|
|
251
|
-
}, await
|
|
249
|
+
}, await Z();
|
|
252
250
|
} catch (t) {
|
|
253
251
|
/* istanbul ignore next -- 编译器自身异常才进入,普通错误走结果里的 errors */
|
|
254
|
-
if (e !==
|
|
252
|
+
if (e !== U) return;
|
|
255
253
|
/* istanbul ignore next -- 同上,只兜底编译器抛错 */
|
|
256
|
-
|
|
254
|
+
R.value = t instanceof Error ? t.message : String(t), K();
|
|
257
255
|
}
|
|
258
|
-
},
|
|
259
|
-
|
|
256
|
+
}, $ = () => {
|
|
257
|
+
Z();
|
|
260
258
|
};
|
|
261
259
|
return e(() => {
|
|
262
|
-
|
|
263
|
-
}),
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
260
|
+
Q();
|
|
261
|
+
}), f(() => [
|
|
262
|
+
D.files,
|
|
263
|
+
D.entry,
|
|
264
|
+
D.options,
|
|
265
|
+
D.previewScroller
|
|
268
266
|
], () => {
|
|
269
|
-
|
|
267
|
+
F.value && Q();
|
|
270
268
|
}, { deep: !0 }), t(() => {
|
|
271
|
-
|
|
272
|
-
}),
|
|
273
|
-
container:
|
|
274
|
-
messageSource:
|
|
269
|
+
U += 1, W = null, J();
|
|
270
|
+
}), S({
|
|
271
|
+
container: F,
|
|
272
|
+
messageSource: B,
|
|
275
273
|
local: !0,
|
|
276
274
|
refresh: () => {
|
|
277
|
-
|
|
275
|
+
Q();
|
|
278
276
|
}
|
|
279
277
|
}), (e, t) => (r(), s("div", {
|
|
280
278
|
ref_key: "containerEl",
|
|
281
|
-
ref:
|
|
279
|
+
ref: F,
|
|
282
280
|
class: "docs-playground-local"
|
|
283
281
|
}, [u("iframe", {
|
|
284
282
|
ref_key: "bridgeEl",
|
|
285
|
-
ref:
|
|
283
|
+
ref: I,
|
|
286
284
|
class: "docs-playground-local__bridge",
|
|
287
285
|
tabindex: "-1",
|
|
288
286
|
"aria-hidden": "true",
|
|
289
287
|
title: "",
|
|
290
|
-
srcdoc: o(
|
|
291
|
-
onLoad:
|
|
288
|
+
srcdoc: o(P),
|
|
289
|
+
onLoad: $
|
|
292
290
|
}, null, 40, M), u("div", {
|
|
293
291
|
ref_key: "mountEl",
|
|
294
|
-
ref:
|
|
295
|
-
class: "docs-playground-local__mount"
|
|
296
|
-
}, null,
|
|
292
|
+
ref: L,
|
|
293
|
+
class: d(["docs-playground-local__mount", { "docs-playground-local__mount--auto": y.autoHeight }])
|
|
294
|
+
}, null, 2)], 512));
|
|
297
295
|
}
|
|
298
|
-
}), P = /* @__PURE__ */
|
|
296
|
+
}), P = /* @__PURE__ */ y({ default: () => F }), F = N;
|
|
299
297
|
//#endregion
|
|
300
298
|
export { S as n, P as t };
|