@braydenyang/fdoc 0.1.14 → 0.1.16
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 +20 -12
- 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,21 +47754,29 @@ 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
|
-
const n =
|
|
47761
|
-
history: OS(),
|
|
47766
|
+
const n = (t == null ? void 0 : t.ep) ?? hH(), r = Uw(), i = e2({
|
|
47767
|
+
history: OS(n ? `/?ep=${encodeURIComponent(n)}` : "/"),
|
|
47762
47768
|
routes: [{ path: "/", component: { template: "<div/>" } }]
|
|
47763
|
-
}),
|
|
47764
|
-
if (
|
|
47765
|
-
|
|
47766
|
-
|
|
47767
|
-
|
|
47768
|
-
|
|
47769
|
+
}), l = $m(fH);
|
|
47770
|
+
if (l.use(r), l.use(i), i.isReady().then(() => {
|
|
47771
|
+
l.mount(o);
|
|
47772
|
+
}), t != null && t.url) {
|
|
47773
|
+
const a = Er(r);
|
|
47774
|
+
fetch(t.url).then((s) => s.json()).then((s) => {
|
|
47775
|
+
a.loadSpec(s), a.setSourceUrl(t.url);
|
|
47776
|
+
}).catch((s) => console.error("[fdoc] Failed to load spec from url:", s));
|
|
47769
47777
|
}
|
|
47770
|
-
return () =>
|
|
47778
|
+
return () => l.unmount();
|
|
47771
47779
|
}
|
|
47772
47780
|
export {
|
|
47773
|
-
|
|
47781
|
+
vH as mount
|
|
47774
47782
|
};
|