react-docs-ui 0.7.5 → 0.7.6
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/{DocsApp-B-VaP4ms.js → DocsApp-CCFHuucK.js} +138 -124
- package/dist/{MdxContent-CZLqZlNp.js → MdxContent-CJydH4kW.js} +1 -1
- package/dist/{MdxContent.lazy-i9phqEH3.js → MdxContent.lazy-ChT4eAlU.js} +1 -1
- package/dist/{SearchDialog-DWVre6R9.js → SearchDialog-Dh1RvEgs.js} +87 -85
- package/dist/{SearchRuntime-D0rSMKV3.js → SearchRuntime-wdAGDBv4.js} +5 -4
- package/dist/{architectureDiagram-2XIMDMQ5-DmhcSwl7.js → architectureDiagram-2XIMDMQ5-D5B3Bc8w.js} +1 -1
- package/dist/{chunk-GLR3WWYH-ShSppUzV.js → chunk-GLR3WWYH-C7t8eN-i.js} +1 -1
- package/dist/{chunk-NQ4KR5QH-BWRGvKed.js → chunk-NQ4KR5QH-ygKrPhgw.js} +1 -1
- package/dist/{chunk-WL4C6EOR-DLbU3P3W.js → chunk-WL4C6EOR-BX4P121X.js} +1 -1
- package/dist/{classDiagram-VBA2DB6C-D4y64v83.js → classDiagram-VBA2DB6C-CWWKW2ZN.js} +2 -2
- package/dist/{classDiagram-v2-RAHNMMFH-DXkt0Wd4.js → classDiagram-v2-RAHNMMFH-9SKKaVzh.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-BX63fiTJ.js → cose-bilkent-S5V4N54A-DCXUWrka.js} +1 -1
- package/dist/docs-app.es.js +1 -1
- package/dist/{erDiagram-INFDFZHY-DjNq2UqZ.js → erDiagram-INFDFZHY-DdivnAXH.js} +1 -1
- package/dist/{flowDiagram-PKNHOUZH-AUeVhXRc.js → flowDiagram-PKNHOUZH-CgCGjn11.js} +1 -1
- package/dist/{mdx-components-m1cGPhc8.js → mdx-components-BLq-Umts.js} +1 -1
- package/dist/{mermaid.core-CtkJeRVj.js → mermaid.core-Dg_svxvF.js} +12 -12
- package/dist/{mindmap-definition-YRQLILUH-Cnl-qPDR.js → mindmap-definition-YRQLILUH-3st_5tCe.js} +1 -1
- package/dist/react-docs-ui.es.js +4 -4
- package/dist/{requirementDiagram-Z7DCOOCP-Bx6NAgqy.js → requirementDiagram-Z7DCOOCP-ClKKAQ0C.js} +1 -1
- package/dist/{stateDiagram-RAJIS63D-DFmbSHPX.js → stateDiagram-RAJIS63D-C8Ab__vp.js} +2 -2
- package/dist/{stateDiagram-v2-FVOUBMTO-TjYtTjLB.js → stateDiagram-v2-FVOUBMTO-BhQBkYI5.js} +2 -2
- package/dist/types/components/DocsLayout.d.ts.map +1 -1
- package/dist/types/components/ExportToolbar.d.ts +8 -1
- package/dist/types/components/ExportToolbar.d.ts.map +1 -1
- package/dist/types/components/HeaderNav.d.ts.map +1 -1
- package/dist/types/components/MobileSidebar.d.ts +2 -7
- package/dist/types/components/MobileSidebar.d.ts.map +1 -1
- package/dist/types/components/SearchLauncher.d.ts +2 -1
- package/dist/types/components/SearchLauncher.d.ts.map +1 -1
- package/dist/types/components/search/SearchProvider.d.ts +2 -1
- package/dist/types/components/search/SearchProvider.d.ts.map +1 -1
- package/dist/types/components/search/SearchRuntime.d.ts +2 -1
- package/dist/types/components/search/SearchRuntime.d.ts.map +1 -1
- package/dist/types/hooks/useScrollPosition.d.ts.map +1 -1
- package/dist/types/lib/config.d.ts +1 -0
- package/dist/types/lib/config.d.ts.map +1 -1
- package/dist/types/lib/search/runtime/search-engine.d.ts.map +1 -1
- package/dist/types/lib/search/runtime/types.d.ts +1 -0
- package/dist/types/lib/search/runtime/types.d.ts.map +1 -1
- package/package.json +143 -136
- package/scripts/cli.mjs +18 -0
- package/scripts/generate-changelog-index.mjs +89 -0
- package/scripts/generate-doc-git-meta.mjs +63 -0
- package/scripts/generate-llms-files.mjs +34 -0
- package/scripts/generate-search-index.mjs +236 -0
- package/scripts/generate-shiki-bundle.mjs +80 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e, r as t, s as n, t as r } from "./chunk-NBPlniwU.js";
|
|
2
2
|
import { n as i, t as a } from "./theme-provider-fNhx9xK0.js";
|
|
3
3
|
import { t as o } from "./utils-Ct96Mtjw.js";
|
|
4
|
-
import { C as s, S as c, _ as l, a as u, b as d, f, g as p, h as m, i as h, m as g, n as _, o as v, r as y, t as b, u as x, v as S, x as C, y as w } from "./mdx-components-
|
|
4
|
+
import { C as s, S as c, _ as l, a as u, b as d, f, g as p, h as m, i as h, m as g, n as _, o as v, r as y, t as b, u as x, v as S, x as C, y as w } from "./mdx-components-BLq-Umts.js";
|
|
5
5
|
import { n as T } from "./use-toast-DK69oadB.js";
|
|
6
6
|
import { a as E, i as D, o as O, r as k, s as A, t as j } from "./dialog-D8otbqQL.js";
|
|
7
7
|
import { t as M } from "./AIProvider-niZNPSGi.js";
|
|
@@ -22,29 +22,30 @@ import { visit as rt } from "unist-util-visit";
|
|
|
22
22
|
import * as it from "react-dom";
|
|
23
23
|
import at from "react-dom";
|
|
24
24
|
//#region src/components/SearchLauncher.tsx
|
|
25
|
-
var ot = L(() => import("./SearchRuntime-
|
|
26
|
-
function ct({ children: e, lang: t, version: n, enabled: r = !0, maxResults: i,
|
|
27
|
-
let [
|
|
28
|
-
r && (
|
|
25
|
+
var ot = L(() => import("./SearchRuntime-wdAGDBv4.js")), st = I({ openSearch: () => {} });
|
|
26
|
+
function ct({ children: e, lang: t, version: n, enabled: r = !0, maxResults: i, snippetLength: a, placeholder: o }) {
|
|
27
|
+
let [s, c] = H(!1), [l, u] = H(0), d = R(() => {
|
|
28
|
+
r && (c(!0), u((e) => e + 1));
|
|
29
29
|
}, [r]);
|
|
30
30
|
B(() => {
|
|
31
31
|
if (!r) return;
|
|
32
32
|
let e = (e) => {
|
|
33
|
-
(e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(),
|
|
33
|
+
(e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(), d());
|
|
34
34
|
};
|
|
35
35
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
36
|
-
}, [r,
|
|
37
|
-
let
|
|
36
|
+
}, [r, d]);
|
|
37
|
+
let f = V(() => ({ openSearch: d }), [d]);
|
|
38
38
|
return /* @__PURE__ */ W(st.Provider, {
|
|
39
|
-
value:
|
|
40
|
-
children: [e,
|
|
39
|
+
value: f,
|
|
40
|
+
children: [e, s && r && /* @__PURE__ */ U(F, {
|
|
41
41
|
fallback: null,
|
|
42
42
|
children: /* @__PURE__ */ U(ot, {
|
|
43
43
|
lang: t,
|
|
44
44
|
version: n,
|
|
45
45
|
maxResults: i,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
snippetLength: a,
|
|
47
|
+
placeholder: o,
|
|
48
|
+
openSignal: l
|
|
48
49
|
})
|
|
49
50
|
})]
|
|
50
51
|
});
|
|
@@ -372,11 +373,6 @@ function Bt({ lang: e, version: t, site: n, navbar: r, announcement: a, versions
|
|
|
372
373
|
let e = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
373
374
|
b(e ? "dark" : "light");
|
|
374
375
|
} else b(g);
|
|
375
|
-
}, [g]), B(() => {
|
|
376
|
-
if (g === "system") {
|
|
377
|
-
let e = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
378
|
-
b(e ? "dark" : "light");
|
|
379
|
-
} else b(g);
|
|
380
376
|
}, [g]);
|
|
381
377
|
let M = (e) => e.startsWith("http") ? e : `/${e.replace(/^\//, "")}`, { light: N, dark: P } = typeof n.logo == "string" ? {
|
|
382
378
|
light: M(n.logo),
|
|
@@ -22186,85 +22182,85 @@ var Gb = {
|
|
|
22186
22182
|
wordExportFailed: "Word export failed. Please try again."
|
|
22187
22183
|
}
|
|
22188
22184
|
};
|
|
22189
|
-
function Kb({ content: e, title: t, lang: n, availableLangs: r = [n],
|
|
22190
|
-
let
|
|
22185
|
+
function Kb({ content: e, title: t, lang: n, availableLangs: r = [n], exportConfig: i, pdfServerConfig: a }) {
|
|
22186
|
+
let o = Gb[n] || Gb.en, { toast: s } = T(), [l, u] = H(!1), [d, f] = H(!1), p = ee(null), m = ee(!1), h = i?.markdown !== !1, g = i?.pdf !== !1, _ = i?.word !== !1, v = i?.allDocs !== !1, y = h || g || _ || v, b = R(async () => {
|
|
22191
22187
|
try {
|
|
22192
22188
|
if (!await Pb(e)) {
|
|
22193
|
-
|
|
22189
|
+
s({
|
|
22194
22190
|
variant: "destructive",
|
|
22195
|
-
description:
|
|
22191
|
+
description: o.copyFailed
|
|
22196
22192
|
});
|
|
22197
22193
|
return;
|
|
22198
22194
|
}
|
|
22199
|
-
|
|
22195
|
+
s({ description: o.copied }), u(!1);
|
|
22200
22196
|
} catch (e) {
|
|
22201
|
-
console.error("Failed to copy markdown:", e),
|
|
22197
|
+
console.error("Failed to copy markdown:", e), s({
|
|
22202
22198
|
variant: "destructive",
|
|
22203
|
-
description:
|
|
22199
|
+
description: o.copyFailed
|
|
22204
22200
|
});
|
|
22205
22201
|
}
|
|
22206
22202
|
}, [
|
|
22207
22203
|
e,
|
|
22208
|
-
|
|
22209
|
-
|
|
22210
|
-
|
|
22211
|
-
]),
|
|
22204
|
+
o.copyFailed,
|
|
22205
|
+
o.copied,
|
|
22206
|
+
s
|
|
22207
|
+
]), x = R(() => {
|
|
22212
22208
|
try {
|
|
22213
22209
|
Fb(e, {
|
|
22214
22210
|
filename: t ? `${t}.md` : "document.md",
|
|
22215
22211
|
title: t
|
|
22216
|
-
}),
|
|
22212
|
+
}), s({ description: o.markdownExported }), u(!1);
|
|
22217
22213
|
} catch (e) {
|
|
22218
|
-
console.error("Failed to export markdown:", e),
|
|
22214
|
+
console.error("Failed to export markdown:", e), s({
|
|
22219
22215
|
variant: "destructive",
|
|
22220
|
-
description:
|
|
22216
|
+
description: o.markdownExportFailed
|
|
22221
22217
|
});
|
|
22222
22218
|
}
|
|
22223
22219
|
}, [
|
|
22224
22220
|
e,
|
|
22225
22221
|
t,
|
|
22226
|
-
|
|
22227
|
-
|
|
22228
|
-
|
|
22229
|
-
]),
|
|
22222
|
+
o.markdownExportFailed,
|
|
22223
|
+
o.markdownExported,
|
|
22224
|
+
s
|
|
22225
|
+
]), S = R(async () => {
|
|
22230
22226
|
try {
|
|
22231
|
-
|
|
22227
|
+
s({ description: (await Rb(a, t ? `${t}.pdf` : "document.pdf")).mode === "print" ? o.pdfPrintOpened : o.pdfExported }), u(!1);
|
|
22232
22228
|
} catch (e) {
|
|
22233
|
-
console.error("Failed to export PDF:", e),
|
|
22229
|
+
console.error("Failed to export PDF:", e), s({
|
|
22234
22230
|
variant: "destructive",
|
|
22235
|
-
description:
|
|
22231
|
+
description: o.pdfExportFailed
|
|
22236
22232
|
});
|
|
22237
22233
|
}
|
|
22238
22234
|
}, [
|
|
22239
22235
|
t,
|
|
22240
|
-
|
|
22241
|
-
|
|
22242
|
-
|
|
22243
|
-
|
|
22244
|
-
|
|
22245
|
-
]),
|
|
22236
|
+
a,
|
|
22237
|
+
o.pdfExportFailed,
|
|
22238
|
+
o.pdfExported,
|
|
22239
|
+
o.pdfPrintOpened,
|
|
22240
|
+
s
|
|
22241
|
+
]), C = R(async () => {
|
|
22246
22242
|
try {
|
|
22247
22243
|
await zb(e, {
|
|
22248
22244
|
filename: t ? `${t}.docx` : "document.docx",
|
|
22249
22245
|
title: t
|
|
22250
|
-
}),
|
|
22246
|
+
}), s({ description: o.wordExported }), u(!1);
|
|
22251
22247
|
} catch (e) {
|
|
22252
|
-
console.error("Failed to export Word:", e),
|
|
22248
|
+
console.error("Failed to export Word:", e), s({
|
|
22253
22249
|
variant: "destructive",
|
|
22254
|
-
description:
|
|
22250
|
+
description: o.wordExportFailed
|
|
22255
22251
|
});
|
|
22256
22252
|
}
|
|
22257
22253
|
}, [
|
|
22258
22254
|
e,
|
|
22259
22255
|
t,
|
|
22260
|
-
|
|
22261
|
-
|
|
22262
|
-
|
|
22256
|
+
o.wordExportFailed,
|
|
22257
|
+
o.wordExported,
|
|
22258
|
+
s
|
|
22263
22259
|
]);
|
|
22264
|
-
return /* @__PURE__ */ W(Je, { children: [
|
|
22260
|
+
return i?.enabled === !1 || !y ? null : /* @__PURE__ */ W(Je, { children: [
|
|
22265
22261
|
/* @__PURE__ */ W(dt, {
|
|
22266
|
-
open:
|
|
22267
|
-
onOpenChange:
|
|
22262
|
+
open: l,
|
|
22263
|
+
onOpenChange: u,
|
|
22268
22264
|
children: [/* @__PURE__ */ U(ft, {
|
|
22269
22265
|
asChild: !0,
|
|
22270
22266
|
children: /* @__PURE__ */ W(c, {
|
|
@@ -22274,56 +22270,54 @@ function Kb({ content: e, title: t, lang: n, availableLangs: r = [n], pdfServerC
|
|
|
22274
22270
|
"data-export-exclude": !0,
|
|
22275
22271
|
children: [/* @__PURE__ */ U(he, { className: "h-4 w-4" }), /* @__PURE__ */ U("span", {
|
|
22276
22272
|
className: "hidden sm:inline",
|
|
22277
|
-
children:
|
|
22273
|
+
children: o.export
|
|
22278
22274
|
})]
|
|
22279
22275
|
})
|
|
22280
22276
|
}), /* @__PURE__ */ W(yt, {
|
|
22281
22277
|
align: "end",
|
|
22282
22278
|
className: "w-48",
|
|
22283
22279
|
children: [
|
|
22284
|
-
/* @__PURE__ */ W(bt, {
|
|
22280
|
+
h && /* @__PURE__ */ W(Je, { children: [/* @__PURE__ */ W(bt, {
|
|
22285
22281
|
onPointerDown: (e) => {
|
|
22286
|
-
e.preventDefault(), !
|
|
22282
|
+
e.preventDefault(), !m.current && (m.current = !0, b().finally(() => {
|
|
22287
22283
|
window.setTimeout(() => {
|
|
22288
|
-
|
|
22284
|
+
m.current = !1;
|
|
22289
22285
|
}, 0);
|
|
22290
22286
|
}));
|
|
22291
22287
|
},
|
|
22292
22288
|
onClick: () => {
|
|
22293
|
-
|
|
22289
|
+
m.current || b();
|
|
22294
22290
|
},
|
|
22295
22291
|
onSelect: (e) => {
|
|
22296
|
-
e.preventDefault(), !
|
|
22292
|
+
e.preventDefault(), !m.current && b();
|
|
22297
22293
|
},
|
|
22298
|
-
children: [/* @__PURE__ */ U(fe, { className: "mr-2 h-4 w-4" }),
|
|
22299
|
-
}),
|
|
22300
|
-
|
|
22301
|
-
|
|
22302
|
-
|
|
22294
|
+
children: [/* @__PURE__ */ U(fe, { className: "mr-2 h-4 w-4" }), o.copyAsMarkdown]
|
|
22295
|
+
}), /* @__PURE__ */ W(bt, {
|
|
22296
|
+
onSelect: x,
|
|
22297
|
+
children: [/* @__PURE__ */ U(_e, { className: "mr-2 h-4 w-4" }), o.exportAsMarkdown]
|
|
22298
|
+
})] }),
|
|
22299
|
+
g && /* @__PURE__ */ W(bt, {
|
|
22300
|
+
onSelect: S,
|
|
22301
|
+
children: [/* @__PURE__ */ U(ve, { className: "mr-2 h-4 w-4" }), o.exportAsPDF]
|
|
22303
22302
|
}),
|
|
22304
|
-
/* @__PURE__ */ W(bt, {
|
|
22305
|
-
onSelect:
|
|
22306
|
-
children: [/* @__PURE__ */ U(
|
|
22303
|
+
_ && /* @__PURE__ */ W(bt, {
|
|
22304
|
+
onSelect: C,
|
|
22305
|
+
children: [/* @__PURE__ */ U(he, { className: "mr-2 h-4 w-4" }), o.exportAsWord]
|
|
22307
22306
|
}),
|
|
22308
|
-
/* @__PURE__ */ W(bt, {
|
|
22309
|
-
onSelect:
|
|
22310
|
-
children: [/* @__PURE__ */ U(
|
|
22311
|
-
})
|
|
22312
|
-
/* @__PURE__ */ U(wt, {}),
|
|
22313
|
-
/* @__PURE__ */ W(bt, {
|
|
22314
|
-
onSelect: () => d(!0),
|
|
22315
|
-
children: [/* @__PURE__ */ U(Ae, { className: "mr-2 h-4 w-4" }), a.exportAllDocs]
|
|
22316
|
-
})
|
|
22307
|
+
v && /* @__PURE__ */ W(Je, { children: [(h || g || _) && /* @__PURE__ */ U(wt, {}), /* @__PURE__ */ W(bt, {
|
|
22308
|
+
onSelect: () => f(!0),
|
|
22309
|
+
children: [/* @__PURE__ */ U(Ae, { className: "mr-2 h-4 w-4" }), o.exportAllDocs]
|
|
22310
|
+
})] })
|
|
22317
22311
|
]
|
|
22318
22312
|
})]
|
|
22319
22313
|
}),
|
|
22320
22314
|
/* @__PURE__ */ U("div", {
|
|
22321
|
-
ref:
|
|
22315
|
+
ref: p,
|
|
22322
22316
|
className: "hidden"
|
|
22323
22317
|
}),
|
|
22324
22318
|
/* @__PURE__ */ U(Wb, {
|
|
22325
|
-
open:
|
|
22326
|
-
onOpenChange:
|
|
22319
|
+
open: d,
|
|
22320
|
+
onOpenChange: f,
|
|
22327
22321
|
lang: n,
|
|
22328
22322
|
availableLangs: r
|
|
22329
22323
|
})
|
|
@@ -22332,18 +22326,18 @@ function Kb({ content: e, title: t, lang: n, availableLangs: r = [n], pdfServerC
|
|
|
22332
22326
|
//#endregion
|
|
22333
22327
|
//#region src/hooks/useScrollPosition.ts
|
|
22334
22328
|
function qb() {
|
|
22335
|
-
let e = We(), t = ee(/* @__PURE__ */ new Map()), n = ee(!1), r = ee(/* @__PURE__ */ new Set()), i = (e) => {
|
|
22329
|
+
let e = We(), t = ee(/* @__PURE__ */ new Map()), n = ee(!1), r = ee(/* @__PURE__ */ new Set()), i = R((e) => {
|
|
22336
22330
|
let n = t.current.get(e);
|
|
22337
22331
|
if (n === void 0) try {
|
|
22338
22332
|
let r = sessionStorage.getItem("scroll-positions");
|
|
22339
22333
|
r && (n = JSON.parse(r)[e], n !== void 0 && t.current.set(e, n));
|
|
22340
22334
|
} catch {}
|
|
22341
22335
|
return n;
|
|
22342
|
-
}, a = () => {
|
|
22336
|
+
}, []), a = R(() => {
|
|
22343
22337
|
if (n.current) return;
|
|
22344
22338
|
let i = window.scrollY, a = e.pathname + e.search;
|
|
22345
22339
|
i > 0 && (t.current.set(a, i), r.current.add(a), sessionStorage.setItem("scroll-positions", JSON.stringify(Object.fromEntries(t.current))));
|
|
22346
|
-
}, o = () => {
|
|
22340
|
+
}, [e.pathname, e.search]), o = R(() => {
|
|
22347
22341
|
let t = i(e.pathname + e.search);
|
|
22348
22342
|
t !== void 0 && t > 0 ? (n.current = !0, requestAnimationFrame(() => {
|
|
22349
22343
|
window.scrollTo(0, t), setTimeout(() => {
|
|
@@ -22352,7 +22346,11 @@ function qb() {
|
|
|
22352
22346
|
})) : requestAnimationFrame(() => {
|
|
22353
22347
|
window.scrollY > 0 && window.scrollTo(0, 0);
|
|
22354
22348
|
});
|
|
22355
|
-
}
|
|
22349
|
+
}, [
|
|
22350
|
+
i,
|
|
22351
|
+
e.pathname,
|
|
22352
|
+
e.search
|
|
22353
|
+
]);
|
|
22356
22354
|
return B(() => {
|
|
22357
22355
|
try {
|
|
22358
22356
|
let e = sessionStorage.getItem("scroll-positions");
|
|
@@ -22373,17 +22371,22 @@ function qb() {
|
|
|
22373
22371
|
return () => {
|
|
22374
22372
|
n && clearTimeout(n), clearTimeout(i), window.removeEventListener("scroll", r), a();
|
|
22375
22373
|
};
|
|
22376
|
-
}, [
|
|
22374
|
+
}, [
|
|
22375
|
+
e.pathname,
|
|
22376
|
+
e.search,
|
|
22377
|
+
o,
|
|
22378
|
+
a
|
|
22379
|
+
]), {
|
|
22377
22380
|
saveScrollPosition: a,
|
|
22378
22381
|
restoreScrollPosition: o,
|
|
22379
|
-
clearScrollPosition: (e) => {
|
|
22382
|
+
clearScrollPosition: R((e) => {
|
|
22380
22383
|
let n = e + window.location.search;
|
|
22381
22384
|
t.current.delete(n), r.current.delete(n);
|
|
22382
22385
|
try {
|
|
22383
22386
|
let e = Object.fromEntries(t.current);
|
|
22384
22387
|
sessionStorage.setItem("scroll-positions", JSON.stringify(e));
|
|
22385
22388
|
} catch {}
|
|
22386
|
-
}
|
|
22389
|
+
}, [])
|
|
22387
22390
|
};
|
|
22388
22391
|
}
|
|
22389
22392
|
//#endregion
|
|
@@ -22396,37 +22399,41 @@ function Yb(e, t, n) {
|
|
|
22396
22399
|
r || (r = t(), document.head.appendChild(r)), n(r);
|
|
22397
22400
|
}
|
|
22398
22401
|
function Xb({ lang: e, config: t, frontmatter: n, slug: r, version: i, lastUpdated: a, editUrl: o, docFilePath: s, children: c, prev: l, next: u, content: d = "", availableLangs: f }) {
|
|
22399
|
-
let { site: p, navbar: m, sidebar: h, theme: g } = t, _ =
|
|
22402
|
+
let { site: p, navbar: m, sidebar: h, theme: g } = t, _ = N.useMemo(() => {
|
|
22403
|
+
if (!h || h.enabled === !1) return !1;
|
|
22404
|
+
let e = !!h.sections?.length, t = !!(h.collections && Object.values(h.collections).some((e) => e.sections?.length));
|
|
22405
|
+
return e || t;
|
|
22406
|
+
}, [h]), v = n?.authors?.length ? n.authors : n?.author ? [n.author] : [], y = t.pageMeta?.showAuthors !== !1 && v.length > 0, b = !!r?.startsWith("changelog/"), x = n?.createdAt, S = x ? new Date(x).toString() === "Invalid Date" ? String(x) : new Date(x).toLocaleDateString(e === "en" ? "en-US" : "zh-CN") : void 0, C = n?.title || n?.firstH1 || t.seo?.defaultTitle || p?.title || "Docs", w = t.seo?.titleTemplate && C ? t.seo.titleTemplate.replace(/\{title\}/g, C).replace(/\{siteTitle\}/g, p?.title || "Docs") : C, T = n?.description || t.seo?.defaultDescription || p?.description, E = p?.url?.replace(/\/+$/, ""), D = i ? `/${e}/v/${i}${r ? `/${r}` : ""}` : `/${e}${r ? `/${r}` : ""}`;
|
|
22400
22407
|
B(() => {
|
|
22401
|
-
document.title =
|
|
22402
|
-
}, [
|
|
22408
|
+
document.title = w;
|
|
22409
|
+
}, [w]), B(() => {
|
|
22403
22410
|
if (t.seo?.enabled === !1) return;
|
|
22404
|
-
let e = n?.noindex ? "noindex, nofollow" : t.seo?.robots || "index, follow", a = n?.noindex ? void 0 : typeof n?.canonical == "string" ? n.canonical :
|
|
22411
|
+
let e = n?.noindex ? "noindex, nofollow" : t.seo?.robots || "index, follow", a = n?.noindex ? void 0 : typeof n?.canonical == "string" ? n.canonical : E ? Jb(E, D) : void 0, o = n?.noindex || !E ? [] : [
|
|
22405
22412
|
{
|
|
22406
22413
|
hreflang: "zh-CN",
|
|
22407
|
-
href: Jb(
|
|
22414
|
+
href: Jb(E, i ? `/zh-cn/v/${i}${r ? `/${r}` : ""}` : `/zh-cn${r ? `/${r}` : ""}`)
|
|
22408
22415
|
},
|
|
22409
22416
|
{
|
|
22410
22417
|
hreflang: "en",
|
|
22411
|
-
href: Jb(
|
|
22418
|
+
href: Jb(E, i ? `/en/v/${i}${r ? `/${r}` : ""}` : `/en${r ? `/${r}` : ""}`)
|
|
22412
22419
|
},
|
|
22413
22420
|
{
|
|
22414
22421
|
hreflang: "x-default",
|
|
22415
|
-
href: Jb(
|
|
22422
|
+
href: Jb(E, i ? `/zh-cn/v/${i}${r ? `/${r}` : ""}` : `/zh-cn${r ? `/${r}` : ""}`)
|
|
22416
22423
|
}
|
|
22417
22424
|
];
|
|
22418
22425
|
Yb("meta[name=\"description\"]", () => document.createElement("meta"), (e) => {
|
|
22419
|
-
e.setAttribute("name", "description"), e.setAttribute("content",
|
|
22426
|
+
e.setAttribute("name", "description"), e.setAttribute("content", T || "");
|
|
22420
22427
|
}), Yb("meta[name=\"robots\"]", () => document.createElement("meta"), (t) => {
|
|
22421
22428
|
t.setAttribute("name", "robots"), t.setAttribute("content", e);
|
|
22422
22429
|
}), [
|
|
22423
22430
|
{
|
|
22424
22431
|
key: "og:title",
|
|
22425
|
-
value:
|
|
22432
|
+
value: w
|
|
22426
22433
|
},
|
|
22427
22434
|
{
|
|
22428
22435
|
key: "og:description",
|
|
22429
|
-
value:
|
|
22436
|
+
value: T || ""
|
|
22430
22437
|
},
|
|
22431
22438
|
{
|
|
22432
22439
|
key: "og:type",
|
|
@@ -22449,11 +22456,11 @@ function Xb({ lang: e, config: t, frontmatter: n, slug: r, version: i, lastUpdat
|
|
|
22449
22456
|
},
|
|
22450
22457
|
{
|
|
22451
22458
|
key: "twitter:title",
|
|
22452
|
-
value:
|
|
22459
|
+
value: w
|
|
22453
22460
|
},
|
|
22454
22461
|
{
|
|
22455
22462
|
key: "twitter:description",
|
|
22456
|
-
value:
|
|
22463
|
+
value: T || ""
|
|
22457
22464
|
},
|
|
22458
22465
|
{
|
|
22459
22466
|
key: "twitter:image",
|
|
@@ -22473,14 +22480,14 @@ function Xb({ lang: e, config: t, frontmatter: n, slug: r, version: i, lastUpdat
|
|
|
22473
22480
|
n?.canonical,
|
|
22474
22481
|
n?.noindex,
|
|
22475
22482
|
e,
|
|
22483
|
+
T,
|
|
22484
|
+
D,
|
|
22476
22485
|
w,
|
|
22477
22486
|
E,
|
|
22478
|
-
C,
|
|
22479
|
-
T,
|
|
22480
22487
|
r,
|
|
22481
22488
|
i
|
|
22482
22489
|
]);
|
|
22483
|
-
let
|
|
22490
|
+
let O = t.toc?.enabled === !1 ? [] : n?.toc || [], { openSearch: k } = lt(), [A, j] = H(!1);
|
|
22484
22491
|
return qb(), /* @__PURE__ */ W("div", {
|
|
22485
22492
|
className: "relative flex min-h-screen flex-col",
|
|
22486
22493
|
children: [
|
|
@@ -22494,26 +22501,26 @@ function Xb({ lang: e, config: t, frontmatter: n, slug: r, version: i, lastUpdat
|
|
|
22494
22501
|
searchConfig: t.search,
|
|
22495
22502
|
versions: t.versions
|
|
22496
22503
|
}),
|
|
22497
|
-
h && /* @__PURE__ */ U(qt, {
|
|
22504
|
+
_ && h && /* @__PURE__ */ U(qt, {
|
|
22498
22505
|
lang: e,
|
|
22499
22506
|
version: i,
|
|
22500
22507
|
sidebar: h,
|
|
22501
|
-
open:
|
|
22502
|
-
onOpenChange:
|
|
22508
|
+
open: A,
|
|
22509
|
+
onOpenChange: j
|
|
22503
22510
|
}),
|
|
22504
22511
|
/* @__PURE__ */ U($t, {
|
|
22505
22512
|
lang: e,
|
|
22506
22513
|
navItems: m.items || [],
|
|
22507
|
-
toc:
|
|
22508
|
-
showSidebar:
|
|
22514
|
+
toc: O,
|
|
22515
|
+
showSidebar: _,
|
|
22509
22516
|
showSearch: t.search?.enabled !== !1,
|
|
22510
|
-
onOpenSidebar: () =>
|
|
22511
|
-
onOpenSearch:
|
|
22517
|
+
onOpenSidebar: () => j(!0),
|
|
22518
|
+
onOpenSearch: k
|
|
22512
22519
|
}),
|
|
22513
22520
|
/* @__PURE__ */ W("div", {
|
|
22514
|
-
className: `flex-1 items-start md:grid md:grid-cols-[220px_1fr] md:gap-6 lg:grid-cols-[240px_1fr] lg:gap-10
|
|
22521
|
+
className: `flex-1 items-start px-4 md:px-8 ${_ ? "md:grid md:grid-cols-[220px_1fr] md:gap-6 lg:grid-cols-[240px_1fr] lg:gap-10" : ""} ${O && O.length > 0 ? "container lg:max-w-[calc(100vw-280px)]" : "container"}`,
|
|
22515
22522
|
children: [
|
|
22516
|
-
h && /* @__PURE__ */ U("aside", {
|
|
22523
|
+
_ && h && /* @__PURE__ */ U("aside", {
|
|
22517
22524
|
className: "fixed top-14 z-30 -ml-2 hidden h-[calc(100vh-3.5rem)] w-full shrink-0 md:sticky md:block",
|
|
22518
22525
|
children: /* @__PURE__ */ U(Gt, {
|
|
22519
22526
|
className: "h-full py-6 pr-6 lg:py-8",
|
|
@@ -22525,11 +22532,11 @@ function Xb({ lang: e, config: t, frontmatter: n, slug: r, version: i, lastUpdat
|
|
|
22525
22532
|
})
|
|
22526
22533
|
}),
|
|
22527
22534
|
/* @__PURE__ */ U("div", {
|
|
22528
|
-
className:
|
|
22535
|
+
className: `relative flex min-w-0 overflow-hidden ${_ ? "md:col-start-2" : ""}`,
|
|
22529
22536
|
children: /* @__PURE__ */ W("main", {
|
|
22530
22537
|
className: "relative py-6 lg:py-8 flex-auto w-full",
|
|
22531
22538
|
children: [
|
|
22532
|
-
n && (n.title || n.description ||
|
|
22539
|
+
n && (n.title || n.description || y || S || a || o) && /* @__PURE__ */ W("header", {
|
|
22533
22540
|
className: "mb-8 pb-6 border-b border-border",
|
|
22534
22541
|
children: [
|
|
22535
22542
|
n.title ? /* @__PURE__ */ W("div", {
|
|
@@ -22542,6 +22549,7 @@ function Xb({ lang: e, config: t, frontmatter: n, slug: r, version: i, lastUpdat
|
|
|
22542
22549
|
title: n.title,
|
|
22543
22550
|
lang: e,
|
|
22544
22551
|
availableLangs: f,
|
|
22552
|
+
exportConfig: t.export,
|
|
22545
22553
|
pdfServerConfig: t.export?.pdfServer
|
|
22546
22554
|
})]
|
|
22547
22555
|
}) : /* @__PURE__ */ U("div", {
|
|
@@ -22551,6 +22559,7 @@ function Xb({ lang: e, config: t, frontmatter: n, slug: r, version: i, lastUpdat
|
|
|
22551
22559
|
title: n.firstH1,
|
|
22552
22560
|
lang: e,
|
|
22553
22561
|
availableLangs: f,
|
|
22562
|
+
exportConfig: t.export,
|
|
22554
22563
|
pdfServerConfig: t.export?.pdfServer
|
|
22555
22564
|
})
|
|
22556
22565
|
}),
|
|
@@ -22558,24 +22567,24 @@ function Xb({ lang: e, config: t, frontmatter: n, slug: r, version: i, lastUpdat
|
|
|
22558
22567
|
className: "text-lg text-muted-foreground mb-4",
|
|
22559
22568
|
children: n.description
|
|
22560
22569
|
}),
|
|
22561
|
-
(
|
|
22570
|
+
(y || S) && /* @__PURE__ */ W("div", {
|
|
22562
22571
|
className: "flex flex-wrap items-center gap-4 text-sm text-muted-foreground",
|
|
22563
|
-
children: [
|
|
22572
|
+
children: [y && /* @__PURE__ */ W("span", {
|
|
22564
22573
|
className: "flex items-center gap-1.5",
|
|
22565
|
-
children: [/* @__PURE__ */ U(Le, { className: "h-4 w-4" }),
|
|
22566
|
-
}),
|
|
22574
|
+
children: [/* @__PURE__ */ U(Le, { className: "h-4 w-4" }), v.join("、")]
|
|
22575
|
+
}), S && /* @__PURE__ */ W("span", {
|
|
22567
22576
|
className: "flex items-center gap-1.5",
|
|
22568
22577
|
children: [
|
|
22569
22578
|
/* @__PURE__ */ U(ie, { className: "h-4 w-4" }),
|
|
22570
22579
|
e === "en" ? "Created" : "创建时间",
|
|
22571
22580
|
" ",
|
|
22572
|
-
|
|
22581
|
+
S
|
|
22573
22582
|
]
|
|
22574
22583
|
})]
|
|
22575
22584
|
})
|
|
22576
22585
|
]
|
|
22577
22586
|
}),
|
|
22578
|
-
(!n || !n.title && !n.description && !
|
|
22587
|
+
(!n || !n.title && !n.description && !y && !S && !a && !o) && /* @__PURE__ */ U("div", {
|
|
22579
22588
|
className: "mb-4",
|
|
22580
22589
|
children: /* @__PURE__ */ U("div", {
|
|
22581
22590
|
className: "flex justify-end",
|
|
@@ -22584,11 +22593,12 @@ function Xb({ lang: e, config: t, frontmatter: n, slug: r, version: i, lastUpdat
|
|
|
22584
22593
|
title: n?.firstH1,
|
|
22585
22594
|
lang: e,
|
|
22586
22595
|
availableLangs: f,
|
|
22596
|
+
exportConfig: t.export,
|
|
22587
22597
|
pdfServerConfig: t.export?.pdfServer
|
|
22588
22598
|
})
|
|
22589
22599
|
})
|
|
22590
22600
|
}),
|
|
22591
|
-
|
|
22601
|
+
b && /* @__PURE__ */ U(cn, {
|
|
22592
22602
|
lang: e,
|
|
22593
22603
|
version: typeof n?.version == "string" ? n.version : void 0,
|
|
22594
22604
|
date: typeof n?.date == "string" ? n.date : void 0,
|
|
@@ -22623,7 +22633,7 @@ function Xb({ lang: e, config: t, frontmatter: n, slug: r, version: i, lastUpdat
|
|
|
22623
22633
|
})
|
|
22624
22634
|
}),
|
|
22625
22635
|
/* @__PURE__ */ U("div", {
|
|
22626
|
-
className: "md:col-start-2",
|
|
22636
|
+
className: _ ? "md:col-start-2" : void 0,
|
|
22627
22637
|
children: t.footer?.enabled !== !1 && /* @__PURE__ */ U(vn, {
|
|
22628
22638
|
footer: t.footer,
|
|
22629
22639
|
lang: e
|
|
@@ -22631,11 +22641,11 @@ function Xb({ lang: e, config: t, frontmatter: n, slug: r, version: i, lastUpdat
|
|
|
22631
22641
|
})
|
|
22632
22642
|
]
|
|
22633
22643
|
}),
|
|
22634
|
-
|
|
22644
|
+
O && O.length > 0 && /* @__PURE__ */ U("aside", {
|
|
22635
22645
|
className: "fixed top-14 right-0 z-30 hidden lg:block h-[calc(100vh-3.5rem)] w-[280px] shrink-0 border-l border-border bg-background/50 backdrop-blur-sm",
|
|
22636
22646
|
children: /* @__PURE__ */ U(Gt, {
|
|
22637
22647
|
className: "h-full py-6 pr-4 lg:py-8 pl-6",
|
|
22638
|
-
children: /* @__PURE__ */ U(un, { toc:
|
|
22648
|
+
children: /* @__PURE__ */ U(un, { toc: O })
|
|
22639
22649
|
})
|
|
22640
22650
|
})
|
|
22641
22651
|
]
|
|
@@ -23908,9 +23918,9 @@ function _C(e = {}) {
|
|
|
23908
23918
|
}
|
|
23909
23919
|
//#endregion
|
|
23910
23920
|
//#region src/app/DocsApp.tsx
|
|
23911
|
-
var vC = L(() => import("./GlobalContextMenu-BtVjQk0v.js").then((e) => ({ default: e.GlobalContextMenu }))), yC = L(() => import("./MdxContent.lazy-
|
|
23921
|
+
var vC = L(() => import("./GlobalContextMenu-BtVjQk0v.js").then((e) => ({ default: e.GlobalContextMenu }))), yC = L(() => import("./MdxContent.lazy-ChT4eAlU.js"));
|
|
23912
23922
|
function bC() {
|
|
23913
|
-
import("./MdxContent.lazy-
|
|
23923
|
+
import("./MdxContent.lazy-ChT4eAlU.js");
|
|
23914
23924
|
}
|
|
23915
23925
|
function xC() {
|
|
23916
23926
|
globalThis.dispatchEvent(new Event("react-docs-ui:content-ready"));
|
|
@@ -23933,6 +23943,7 @@ function DC({ children: e }) {
|
|
|
23933
23943
|
version: r,
|
|
23934
23944
|
enabled: i?.search?.enabled !== !1,
|
|
23935
23945
|
maxResults: i?.search?.maxResults,
|
|
23946
|
+
snippetLength: i?.search?.snippetLength,
|
|
23936
23947
|
placeholder: i?.search?.placeholder,
|
|
23937
23948
|
children: e
|
|
23938
23949
|
});
|
|
@@ -24070,9 +24081,12 @@ function kC({ shikiBundle: e }) {
|
|
|
24070
24081
|
t = !0;
|
|
24071
24082
|
};
|
|
24072
24083
|
}, [
|
|
24084
|
+
s?.codeHighlight,
|
|
24085
|
+
s?.toc?.maxLevel,
|
|
24073
24086
|
o,
|
|
24074
24087
|
D,
|
|
24075
24088
|
a,
|
|
24089
|
+
e,
|
|
24076
24090
|
i
|
|
24077
24091
|
]), B(() => {
|
|
24078
24092
|
let e = !1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./utils-Ct96Mtjw.js";
|
|
2
|
-
import { S as t, b as n, c as r, d as i, h as a, l as o, p as s, s as c, t as l, v as u, x as d, y as f } from "./mdx-components-
|
|
2
|
+
import { S as t, b as n, c as r, d as i, h as a, l as o, p as s, s as c, t as l, v as u, x as d, y as f } from "./mdx-components-BLq-Umts.js";
|
|
3
3
|
import { t as p } from "./use-toast-DK69oadB.js";
|
|
4
4
|
import { l as m, r as h, t as g, u as _ } from "./dialog-D8otbqQL.js";
|
|
5
5
|
import * as v from "react";
|