@braydenyang/fdoc 0.1.14 → 0.1.15
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/dist/lib/fdoc.iife.js +7 -7
- package/dist/lib/fdoc.js +14 -4
- package/package.json +1 -1
package/dist/lib/fdoc.js
CHANGED
|
@@ -6492,7 +6492,7 @@ const y2 = "n", Kl = `.${y2}-`, C2 = "__", w2 = "--", Ym = Xm(), Jm = o2({
|
|
|
6492
6492
|
Ym.use(Jm);
|
|
6493
6493
|
const {
|
|
6494
6494
|
c: V,
|
|
6495
|
-
find:
|
|
6495
|
+
find: pH
|
|
6496
6496
|
} = Ym, {
|
|
6497
6497
|
cB: $,
|
|
6498
6498
|
cE: q,
|
|
@@ -47754,14 +47754,24 @@ const YL = { class: "toolbar" }, JL = { class: "lang-label" }, ZL = { class: "hl
|
|
|
47754
47754
|
}, 8, ["theme", "theme-overrides"]));
|
|
47755
47755
|
}
|
|
47756
47756
|
}), fH = /* @__PURE__ */ Ot(uH, [["__scopeId", "data-v-b5984c8a"]]);
|
|
47757
|
-
function
|
|
47757
|
+
function hH() {
|
|
47758
|
+
const e = new URLSearchParams(window.location.search).get("ep");
|
|
47759
|
+
if (e) return e;
|
|
47760
|
+
const t = window.location.hash, o = t.includes("?") ? t.slice(t.indexOf("?")) : "";
|
|
47761
|
+
return new URLSearchParams(o).get("ep");
|
|
47762
|
+
}
|
|
47763
|
+
function vH(e, t) {
|
|
47758
47764
|
const o = typeof e == "string" ? document.querySelector(e) : e;
|
|
47759
47765
|
if (!o) throw new Error(`[fdoc] mount: cannot find element "${String(e)}"`);
|
|
47760
47766
|
const n = Uw(), r = e2({
|
|
47761
47767
|
history: OS(),
|
|
47762
47768
|
routes: [{ path: "/", component: { template: "<div/>" } }]
|
|
47763
47769
|
}), i = $m(fH);
|
|
47764
|
-
if (i.use(n), i.use(r), r.isReady().then(() =>
|
|
47770
|
+
if (i.use(n), i.use(r), r.isReady().then(() => {
|
|
47771
|
+
i.mount(o);
|
|
47772
|
+
const l = (t == null ? void 0 : t.ep) ?? hH();
|
|
47773
|
+
l && r.push({ query: { ep: l } });
|
|
47774
|
+
}), t != null && t.url) {
|
|
47765
47775
|
const l = Er(n);
|
|
47766
47776
|
fetch(t.url).then((a) => a.json()).then((a) => {
|
|
47767
47777
|
l.loadSpec(a), l.setSourceUrl(t.url);
|
|
@@ -47770,5 +47780,5 @@ function pH(e, t) {
|
|
|
47770
47780
|
return () => i.unmount();
|
|
47771
47781
|
}
|
|
47772
47782
|
export {
|
|
47773
|
-
|
|
47783
|
+
vH as mount
|
|
47774
47784
|
};
|