@mintlify/msft-sdk 1.1.63 → 1.1.65
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/api-playground/ApiPlayground/components/PlaygroundModalWrapper.js +56 -52
- package/dist/api-playground-2/OperationPage.js +1 -2
- package/dist/api-playground-2/Playground.js +5 -5
- package/dist/api-playground-2/components/Request/InputSectionContainer.js +2 -2
- package/dist/api-playground-2/components/TypeDropdown.js +1 -1
- package/dist/components/apiPage.js +125 -0
- package/dist/components/docsPage.js +54 -56
- package/dist/index.d.ts +20 -7
- package/dist/index.js +28 -28
- package/dist/plugins/sanitize/rehype-pre-to-mdx-fence.js +13 -13
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,59 +1,63 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Transition as
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { Transition as c, TransitionChild as m } from "@headlessui/react";
|
|
3
3
|
import { Fragment as n } from "react";
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { zIndex as
|
|
4
|
+
import { createPortal as l } from "react-dom";
|
|
5
|
+
import { zIndex as d } from "../../../constants/zIndex.js";
|
|
6
6
|
import "@mintlify/validation";
|
|
7
7
|
import "@sindresorhus/slugify";
|
|
8
|
-
import { cn as
|
|
9
|
-
const
|
|
8
|
+
import { cn as s } from "../../../utils/cn.js";
|
|
9
|
+
const x = ({
|
|
10
10
|
isPlaygroundExpanded: e,
|
|
11
|
-
setIsPlaygroundExpanded:
|
|
11
|
+
setIsPlaygroundExpanded: i,
|
|
12
12
|
children: o
|
|
13
|
-
}) =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
)
|
|
13
|
+
}) => {
|
|
14
|
+
if (typeof window > "u") return null;
|
|
15
|
+
const r = document.querySelector(".mintlify-docs") ?? document.body;
|
|
16
|
+
return l(
|
|
17
|
+
/* @__PURE__ */ t(c, { show: e, as: n, children: /* @__PURE__ */ a("div", { className: s(d.Popup, "mint:fixed mint:z-100 mint:inset-0 mint:overflow-y-auto mint:p-4 mint:sm:p-6 mint:md:p-12"), children: [
|
|
18
|
+
/* @__PURE__ */ t(
|
|
19
|
+
m,
|
|
20
|
+
{
|
|
21
|
+
as: n,
|
|
22
|
+
enter: "mint:ease-out mint:duration-100",
|
|
23
|
+
enterFrom: "mint:opacity-0",
|
|
24
|
+
enterTo: "mint:opacity-100",
|
|
25
|
+
leave: "mint:ease-in mint:duration-50",
|
|
26
|
+
leaveFrom: "mint:opacity-100",
|
|
27
|
+
leaveTo: "mint:opacity-0",
|
|
28
|
+
children: /* @__PURE__ */ t(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
className: "mint:fixed mint:z-0 mint:inset-0 mint:bg-background-dark/20 mint:transition-opacity mint:backdrop-blur-sm",
|
|
32
|
+
onClick: () => i == null ? void 0 : i(!1)
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ t(
|
|
38
|
+
m,
|
|
39
|
+
{
|
|
40
|
+
as: n,
|
|
41
|
+
enter: "mint:ease-out mint:duration-100",
|
|
42
|
+
enterFrom: "mint:opacity-0 mint:scale-95",
|
|
43
|
+
enterTo: "mint:opacity-100 mint:scale-100",
|
|
44
|
+
leave: "mint:ease-in mint:duration-50",
|
|
45
|
+
leaveFrom: "mint:opacity-100 mint:scale-100",
|
|
46
|
+
leaveTo: "mint:opacity-0 mint:scale-95",
|
|
47
|
+
children: /* @__PURE__ */ t(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
"data-testid": "api-playground-modal",
|
|
51
|
+
className: "mint:relative mint:z-100 mint:flex mint:flex-col mint:mx-auto mint:max-w-screen-xl mint:transform mint:bg-background-light mint:dark:bg-background-dark mint:shadow-search mint:rounded-3xl mint:border-standard",
|
|
52
|
+
children: /* @__PURE__ */ t("div", { className: "mint:p-4", children: o })
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
] }) }),
|
|
58
|
+
r
|
|
59
|
+
);
|
|
60
|
+
};
|
|
57
61
|
export {
|
|
58
|
-
|
|
62
|
+
x as PlaygroundModalWrapper
|
|
59
63
|
};
|
|
@@ -14,7 +14,6 @@ import { cn as L } from "../utils/cn.js";
|
|
|
14
14
|
const J = ({
|
|
15
15
|
apiReferenceData: c,
|
|
16
16
|
operation: f,
|
|
17
|
-
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
18
17
|
children: u
|
|
19
18
|
}) => {
|
|
20
19
|
const { path: g, method: a, baseUrlOptions: o } = f, { pageMetadata: x } = w(E), d = I(), [l, m] = P(!1), s = d === "simple", { selectedBaseUrlIndex: h, setSelectedBaseUrlIndex: y, baseUrl: p } = v();
|
|
@@ -76,7 +75,7 @@ const J = ({
|
|
|
76
75
|
{
|
|
77
76
|
className: L(
|
|
78
77
|
B.Content,
|
|
79
|
-
"relative"
|
|
78
|
+
"mint:relative"
|
|
80
79
|
),
|
|
81
80
|
children: [
|
|
82
81
|
u,
|
|
@@ -6,8 +6,8 @@ import { Response as c } from "../api-playground/ApiPlayground/Response/index.js
|
|
|
6
6
|
import { ModalHeader as N } from "../api-playground/ApiPlayground/components/ModalHeader.js";
|
|
7
7
|
import { PlaygroundModalWrapper as b } from "../api-playground/ApiPlayground/components/PlaygroundModalWrapper.js";
|
|
8
8
|
import { useKeyboardShortcut as B } from "../hooks/useKeyboardShortcut.js";
|
|
9
|
-
import { ApiExamples as
|
|
10
|
-
import { EndpointHeader as
|
|
9
|
+
import { ApiExamples as k } from "./ApiExamples.js";
|
|
10
|
+
import { EndpointHeader as C } from "./EndpointHeader.js";
|
|
11
11
|
import { BodySection as w } from "./components/Request/BodySection.js";
|
|
12
12
|
import { ParameterSection as T } from "./components/Request/ParameterSection.js";
|
|
13
13
|
import { SecuritySection as q } from "./components/Request/SecuritySection.js";
|
|
@@ -44,8 +44,8 @@ const D = ({
|
|
|
44
44
|
setIsPlaygroundExpanded: r,
|
|
45
45
|
children: [
|
|
46
46
|
/* @__PURE__ */ i("div", { className: "mint:flex mint:items-center mint:justify-between mint:gap-x-2 mint:rounded-xl mint:p-1.5 mint:pr-0", children: [
|
|
47
|
-
/* @__PURE__ */ t("div", { className: "mint:flex-1 mint:bg-gray-100 dark:bg-white/5 mint:border-gray-200 mint:rounded-xl ", children: /* @__PURE__ */ t(
|
|
48
|
-
|
|
47
|
+
/* @__PURE__ */ t("div", { className: "mint:flex-1 mint:bg-gray-100 mint:dark:bg-white/5 mint:dark:border-gray-200 mint:rounded-xl ", children: /* @__PURE__ */ t(
|
|
48
|
+
C,
|
|
49
49
|
{
|
|
50
50
|
baseUrl: s,
|
|
51
51
|
baseUrlOptions: a,
|
|
@@ -105,7 +105,7 @@ const D = ({
|
|
|
105
105
|
),
|
|
106
106
|
children: [
|
|
107
107
|
n && /* @__PURE__ */ t(c, { result: n, className: "mint:hidden mint:lg:block mint:min-h-fit" }),
|
|
108
|
-
/* @__PURE__ */ t(
|
|
108
|
+
/* @__PURE__ */ t(k, { isModal: !0, "data-testid": "api-playground-request-example", className: "mint:xl:w-full" })
|
|
109
109
|
]
|
|
110
110
|
}
|
|
111
111
|
)
|
|
@@ -22,7 +22,7 @@ const N = ({
|
|
|
22
22
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), d((c) => !c));
|
|
23
23
|
},
|
|
24
24
|
className: r(
|
|
25
|
-
"mint:flex mint:w-full mint:px-4 mint:py-2.5 mint:items-center mint:justify-between mint:border-standard mint:cursor-pointer mint:hover:bg-gray-50 dark:hover:bg-white/5",
|
|
25
|
+
"mint:flex mint:w-full mint:px-4 mint:py-2.5 mint:items-center mint:justify-between mint:border-standard mint:cursor-pointer mint:hover:bg-gray-50 mint:dark:hover:bg-white/5",
|
|
26
26
|
e ? "mint:border-b-0! mint:border-t mint:border-x mint:rounded-t-2xl" : "mint:rounded-2xl"
|
|
27
27
|
),
|
|
28
28
|
children: [
|
|
@@ -49,7 +49,7 @@ const N = ({
|
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
51
|
className: r(
|
|
52
|
-
"mint:bg-background-light dark:bg-background-dark mint:flex-1 mint:px-4 mint:rounded-b-xl mint:border-standard mint:border-t-0! mint:divide-y mint:divide-gray-100 dark:divide-white/10",
|
|
52
|
+
"mint:bg-background-light mint:dark:bg-background-dark mint:flex-1 mint:px-4 mint:rounded-b-xl mint:border-standard mint:border-t-0! mint:divide-y mint:divide-gray-100 mint:dark:divide-white/10",
|
|
53
53
|
e && a ? "" : "mint:hidden"
|
|
54
54
|
),
|
|
55
55
|
children: [
|
|
@@ -13,7 +13,7 @@ const k = ({
|
|
|
13
13
|
"div",
|
|
14
14
|
{
|
|
15
15
|
className: g(
|
|
16
|
-
"mint:relative mint:flex mint:items-center mint:px-2 mint:py-0.5 mint:text-gray-600 dark:text-gray-300 mint:hover:text-gray-950 dark:hover:text-white mint:font-medium",
|
|
16
|
+
"mint:relative mint:flex mint:items-center mint:px-2 mint:py-0.5 mint:text-gray-600 mint:dark:text-gray-300 mint:hover:text-gray-950 mint:dark:hover:text-white mint:font-medium",
|
|
17
17
|
l
|
|
18
18
|
),
|
|
19
19
|
children: /* @__PURE__ */ a(c, { children: [
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as C } from "react";
|
|
3
|
+
import { ApiExamples as E } from "../api-playground-2/ApiExamples.js";
|
|
4
|
+
import { ComponentsProvider as P } from "../context/components-context.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { cn as e } from "../utils/cn.js";
|
|
7
|
+
import { MDXRenderer as T } from "./mdx-renderer.js";
|
|
8
|
+
import { PageContextMenu as A } from "./page-context-menu.js";
|
|
9
|
+
import { Api as B } from "../api-playground-2/Api.js";
|
|
10
|
+
import { PageProvider as I, ApiReferenceProvider2 as j } from "../contexts/ConfigContext.js";
|
|
11
|
+
function K({
|
|
12
|
+
theme: a,
|
|
13
|
+
className: f = "",
|
|
14
|
+
pathname: r,
|
|
15
|
+
markdownContent: h,
|
|
16
|
+
allPages: b,
|
|
17
|
+
baseUrl: p,
|
|
18
|
+
LinkComponent: w,
|
|
19
|
+
contextMenu: i,
|
|
20
|
+
apiReferenceData: l,
|
|
21
|
+
pageMetadata: n
|
|
22
|
+
}) {
|
|
23
|
+
return C(() => {
|
|
24
|
+
const { hash: s } = window.location;
|
|
25
|
+
if (!s) return;
|
|
26
|
+
const g = setTimeout(() => {
|
|
27
|
+
const x = s.substring(1), m = document.getElementById("main-content"), c = document.getElementById(x);
|
|
28
|
+
if (m && c) {
|
|
29
|
+
const d = window.getComputedStyle(document.documentElement), u = parseFloat(d.getPropertyValue("--scroll-mt") || "0"), v = parseFloat(d.fontSize), k = u * v, N = m.getBoundingClientRect(), y = c.getBoundingClientRect().top - N.top + m.scrollTop - k;
|
|
30
|
+
m.scrollTo({
|
|
31
|
+
top: y,
|
|
32
|
+
behavior: "instant"
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}, 100);
|
|
36
|
+
return () => clearTimeout(g);
|
|
37
|
+
}, [r]), /* @__PURE__ */ t(P, { LinkComponent: w, children: /* @__PURE__ */ t(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: e(
|
|
41
|
+
"mintlify-docs",
|
|
42
|
+
a === "dark" && "dark",
|
|
43
|
+
f,
|
|
44
|
+
"mint:flex mint:flex-col mint:flex-1 mint:min-h-0 mint:h-full mint:overflow-hidden"
|
|
45
|
+
),
|
|
46
|
+
children: /* @__PURE__ */ t(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
id: "page-container",
|
|
50
|
+
className: "mint:bg-[#f0f0f0] mint:dark:bg-[#0f0f0f] mint:flex-1 mint:min-h-0 mint:h-full mint:flex mint:flex-col mint:overflow-hidden",
|
|
51
|
+
children: /* @__PURE__ */ t(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
id: "page-wrapper",
|
|
55
|
+
className: "mint:flex mint:rounded-tl-2xl mint:flex-1 mint:min-h-0 mint:h-full mint:overflow-hidden",
|
|
56
|
+
children: /* @__PURE__ */ t(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
id: "main-content",
|
|
60
|
+
className: e(
|
|
61
|
+
"mint:flex-1 mint:p-8 mint:overflow-y-auto mint:overflow-x-hidden mint:rounded-tl-2xl mint:bg-white mint:dark:bg-[#1f1f1f] [scrollbar-gutter:stable] mint:overscroll-contain mint:lg:px-16 mint:lg:pt-12 [scrollbar-width:thin] [scrollbar-color:rgba(0,0,0,0.2)_transparent] dark:[scrollbar-color:rgba(255,255,255,0.2)_transparent] mint:[&::-webkit-scrollbar]:w-1 mint:[&::-webkit-scrollbar-track]:bg-transparent mint:[&::-webkit-scrollbar-thumb]:bg-black/20 mint:dark:[&::-webkit-scrollbar-thumb]:bg-white/20 mint:[&::-webkit-scrollbar-thumb]:rounded mint:[&::-webkit-scrollbar-thumb:hover]:bg-black/30 mint:dark:[&::-webkit-scrollbar-thumb:hover]:bg-white/30"
|
|
62
|
+
),
|
|
63
|
+
children: /* @__PURE__ */ o(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
className: "mint:flex mint:flex-row-reverse mint:gap-12 mint:justify-center mint:mx-auto mint:w-full",
|
|
67
|
+
id: "content-layout-container",
|
|
68
|
+
children: [
|
|
69
|
+
l != null && l.operation ? /* @__PURE__ */ t("div", { className: "mint:hidden mint:xl:flex! mint:self-start mint:sticky mint:flex-col mint:max-w-md mint:top-0 mint:gap-6", children: /* @__PURE__ */ t(E, { apiReferenceData: l }) }) : null,
|
|
70
|
+
/* @__PURE__ */ o(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
className: e(
|
|
74
|
+
"mint:w-full mint:overflow-x-visible mint:max-w-[730px]"
|
|
75
|
+
),
|
|
76
|
+
children: [
|
|
77
|
+
n.title && /* @__PURE__ */ t("header", { className: "mint:mb-6", children: /* @__PURE__ */ o("div", { className: "mint:flex mint:flex-col mint:gap-5", children: [
|
|
78
|
+
/* @__PURE__ */ o("div", { className: "mint:flex mint:flex-col mint:gap-2 mint:items-start", children: [
|
|
79
|
+
/* @__PURE__ */ t("h1", { className: "mint:text-[1.875rem] mint:font-bold mint:text-[#141414] mint:dark:text-white mint:m-0 mint:leading-[1.2] mint:pt-3", children: n.title }),
|
|
80
|
+
n.description && /* @__PURE__ */ t("p", { className: "mint:text-lg mint:text-[#4b5563] mint:dark:text-[#d1d5db] mint:m-0", children: n.description })
|
|
81
|
+
] }),
|
|
82
|
+
r && /* @__PURE__ */ t(
|
|
83
|
+
A,
|
|
84
|
+
{
|
|
85
|
+
className: "mint:shrink-0",
|
|
86
|
+
pathname: r,
|
|
87
|
+
markdownContent: h,
|
|
88
|
+
allPages: b,
|
|
89
|
+
baseUrl: p,
|
|
90
|
+
onCopyMarkdown: i == null ? void 0 : i.onCopyMarkdown,
|
|
91
|
+
onViewMarkdown: i == null ? void 0 : i.onViewMarkdown
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
] }) }),
|
|
95
|
+
/* @__PURE__ */ t("div", { className: "mint:pt-4", children: /* @__PURE__ */ t(T, { children: /* @__PURE__ */ t(I, { value: {
|
|
96
|
+
pageMetadata: n,
|
|
97
|
+
pathname: r
|
|
98
|
+
}, children: /* @__PURE__ */ t(
|
|
99
|
+
j,
|
|
100
|
+
{
|
|
101
|
+
pageMetadata: n,
|
|
102
|
+
docsConfig: void 0,
|
|
103
|
+
mdxExtracts: void 0,
|
|
104
|
+
apiReferenceData2: l,
|
|
105
|
+
children: /* @__PURE__ */ t(B, {})
|
|
106
|
+
}
|
|
107
|
+
) }) }) })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
) });
|
|
122
|
+
}
|
|
123
|
+
export {
|
|
124
|
+
K as ApiPage
|
|
125
|
+
};
|
|
@@ -1,64 +1,62 @@
|
|
|
1
1
|
import { jsx as t, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
import { TextAlignLeftFilled as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import {
|
|
5
|
-
import { ComponentsProvider as A } from "../context/components-context.js";
|
|
2
|
+
import { TextAlignLeftFilled as L } from "@fluentui/react-icons";
|
|
3
|
+
import { useEffect as O } from "react";
|
|
4
|
+
import { ComponentsProvider as S } from "../context/components-context.js";
|
|
6
5
|
/* empty css */
|
|
7
|
-
import { cn as
|
|
8
|
-
import { MDXRenderer as
|
|
9
|
-
import { PageContextMenu as
|
|
10
|
-
import { TableOfContents as
|
|
11
|
-
import { PivotAwareTOC as
|
|
12
|
-
import { ZonePivotProvider as
|
|
13
|
-
import { ZonePivotSelector as
|
|
14
|
-
function
|
|
6
|
+
import { cn as c } from "../utils/cn.js";
|
|
7
|
+
import { MDXRenderer as j } from "./mdx-renderer.js";
|
|
8
|
+
import { PageContextMenu as B } from "./page-context-menu.js";
|
|
9
|
+
import { TableOfContents as H } from "./toc/index.js";
|
|
10
|
+
import { PivotAwareTOC as V } from "./toc/pivot-aware-toc.js";
|
|
11
|
+
import { ZonePivotProvider as A } from "./content-components/zone-pivots/zone-pivot-context.js";
|
|
12
|
+
import { ZonePivotSelector as D } from "./content-components/zone-pivots/zone-pivot-selector.js";
|
|
13
|
+
function rt({
|
|
15
14
|
payload: i,
|
|
16
15
|
toc: o,
|
|
17
|
-
navTree:
|
|
18
|
-
activeHref:
|
|
19
|
-
theme:
|
|
20
|
-
className:
|
|
21
|
-
pathname:
|
|
22
|
-
markdownContent:
|
|
23
|
-
allPages:
|
|
16
|
+
navTree: G,
|
|
17
|
+
activeHref: Z,
|
|
18
|
+
theme: b,
|
|
19
|
+
className: p = "",
|
|
20
|
+
pathname: l,
|
|
21
|
+
markdownContent: x,
|
|
22
|
+
allPages: w,
|
|
24
23
|
baseUrl: u,
|
|
25
|
-
bottomLinks:
|
|
26
|
-
LinkComponent:
|
|
27
|
-
localization:
|
|
28
|
-
telemetry:
|
|
29
|
-
contextMenu: n
|
|
30
|
-
apiReferenceData2: l
|
|
24
|
+
bottomLinks: _,
|
|
25
|
+
LinkComponent: v,
|
|
26
|
+
localization: k,
|
|
27
|
+
telemetry: W,
|
|
28
|
+
contextMenu: n
|
|
31
29
|
}) {
|
|
32
|
-
var
|
|
33
|
-
const
|
|
30
|
+
var d, f;
|
|
31
|
+
const N = i.serializedContent, s = ((d = i.mdxExtracts) == null ? void 0 : d.zonePivotGroups) || [], a = (f = i.mdxExtracts) == null ? void 0 : f.pivotTocItems, T = !i.title, P = { ...{
|
|
34
32
|
onThisPage: "On this page",
|
|
35
33
|
loading: "Loading...",
|
|
36
34
|
errorTitle: "Error",
|
|
37
35
|
errorMessage: "Something went wrong",
|
|
38
36
|
notFoundTitle: "Page not found",
|
|
39
37
|
notFoundMessage: "The page you're looking for doesn't exist"
|
|
40
|
-
}, ...
|
|
41
|
-
return
|
|
38
|
+
}, ...k };
|
|
39
|
+
return O(() => {
|
|
42
40
|
const { hash: m } = window.location;
|
|
43
41
|
if (!m) return;
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
if (r &&
|
|
47
|
-
const
|
|
42
|
+
const C = setTimeout(() => {
|
|
43
|
+
const y = m.substring(1), r = document.getElementById("main-content"), h = document.getElementById(y);
|
|
44
|
+
if (r && h) {
|
|
45
|
+
const g = window.getComputedStyle(document.documentElement), E = parseFloat(g.getPropertyValue("--scroll-mt") || "0"), z = parseFloat(g.fontSize), R = E * z, F = r.getBoundingClientRect(), I = h.getBoundingClientRect().top - F.top + r.scrollTop - R;
|
|
48
46
|
r.scrollTo({
|
|
49
|
-
top:
|
|
47
|
+
top: I,
|
|
50
48
|
behavior: "instant"
|
|
51
49
|
});
|
|
52
50
|
}
|
|
53
51
|
}, 100);
|
|
54
|
-
return () => clearTimeout(
|
|
55
|
-
}, [
|
|
52
|
+
return () => clearTimeout(C);
|
|
53
|
+
}, [l]), /* @__PURE__ */ t(S, { LinkComponent: v, children: /* @__PURE__ */ t(
|
|
56
54
|
"div",
|
|
57
55
|
{
|
|
58
|
-
className:
|
|
56
|
+
className: c(
|
|
59
57
|
"mintlify-docs",
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
b === "dark" && "dark",
|
|
59
|
+
p,
|
|
62
60
|
"mint:flex mint:flex-col mint:flex-1 mint:min-h-0 mint:h-full mint:overflow-hidden"
|
|
63
61
|
),
|
|
64
62
|
children: /* @__PURE__ */ t(
|
|
@@ -75,28 +73,28 @@ function at({
|
|
|
75
73
|
"div",
|
|
76
74
|
{
|
|
77
75
|
id: "main-content",
|
|
78
|
-
className:
|
|
76
|
+
className: c(
|
|
79
77
|
"mint:flex-1 mint:p-8 mint:overflow-y-auto mint:overflow-x-hidden mint:rounded-tl-2xl mint:bg-white mint:dark:bg-[#1f1f1f] [scrollbar-gutter:stable] mint:overscroll-contain mint:lg:px-16 mint:lg:pt-12 [scrollbar-width:thin] [scrollbar-color:rgba(0,0,0,0.2)_transparent] dark:[scrollbar-color:rgba(255,255,255,0.2)_transparent] mint:[&::-webkit-scrollbar]:w-1 mint:[&::-webkit-scrollbar-track]:bg-transparent mint:[&::-webkit-scrollbar-thumb]:bg-black/20 mint:dark:[&::-webkit-scrollbar-thumb]:bg-white/20 mint:[&::-webkit-scrollbar-thumb]:rounded mint:[&::-webkit-scrollbar-thumb:hover]:bg-black/30 mint:dark:[&::-webkit-scrollbar-thumb:hover]:bg-white/30"
|
|
80
78
|
),
|
|
81
|
-
children: /* @__PURE__ */ t(
|
|
79
|
+
children: /* @__PURE__ */ t(A, { groups: s, children: /* @__PURE__ */ e(
|
|
82
80
|
"div",
|
|
83
81
|
{
|
|
84
82
|
className: "mint:flex mint:flex-row-reverse mint:gap-12 mint:justify-center mint:mx-auto mint:w-full",
|
|
85
83
|
id: "content-layout-container",
|
|
86
84
|
children: [
|
|
87
|
-
|
|
85
|
+
o && o.length > 0 ? /* @__PURE__ */ t("aside", { className: "mint:w-68 mint:shrink-0 mint:ml-8 mint:max-xl:hidden mint:xl:block", children: /* @__PURE__ */ e("div", { className: "mint:sticky mint:top-2 mint:p-2 mint:pb-6 mint:max-h-[calc(100vh-3.5rem)] mint:overflow-y-auto", children: [
|
|
88
86
|
/* @__PURE__ */ e("div", { className: "mint:flex mint:items-center mint:gap-2 mint:mb-4", children: [
|
|
89
|
-
/* @__PURE__ */ t(
|
|
90
|
-
/* @__PURE__ */ t("h2", { className: "mint:text-sm mint:font-semibold mint:text-[#141414] mint:dark:text-white", children:
|
|
87
|
+
/* @__PURE__ */ t(L, { className: "mint:w-4 mint:h-4 mint:text-[#4b5563] mint:dark:text-[#adadad]" }),
|
|
88
|
+
/* @__PURE__ */ t("h2", { className: "mint:text-sm mint:font-semibold mint:text-[#141414] mint:dark:text-white", children: P.onThisPage })
|
|
91
89
|
] }),
|
|
92
|
-
|
|
90
|
+
a && Object.keys(a).length > 0 ? /* @__PURE__ */ t(V, { baseToc: o, pivotTocItems: a }) : /* @__PURE__ */ t(H, { toc: o })
|
|
93
91
|
] }) }) : null,
|
|
94
92
|
/* @__PURE__ */ e(
|
|
95
93
|
"div",
|
|
96
94
|
{
|
|
97
|
-
className:
|
|
95
|
+
className: c(
|
|
98
96
|
"mint:w-full mint:overflow-x-visible mint:max-w-[730px]",
|
|
99
|
-
|
|
97
|
+
T && "mint:max-w-none!"
|
|
100
98
|
),
|
|
101
99
|
children: [
|
|
102
100
|
i.title && /* @__PURE__ */ t("header", { className: "mint:mb-6", children: /* @__PURE__ */ e("div", { className: "mint:flex mint:flex-col mint:gap-5", children: [
|
|
@@ -104,28 +102,28 @@ function at({
|
|
|
104
102
|
/* @__PURE__ */ t("h1", { className: "mint:text-[1.875rem] mint:font-bold mint:text-[#141414] mint:dark:text-white mint:m-0 mint:leading-[1.2] mint:pt-3", children: i.title }),
|
|
105
103
|
i.description && /* @__PURE__ */ t("p", { className: "mint:text-lg mint:text-[#4b5563] mint:dark:text-[#d1d5db] mint:m-0", children: i.description })
|
|
106
104
|
] }),
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
l && /* @__PURE__ */ t(
|
|
106
|
+
B,
|
|
109
107
|
{
|
|
110
108
|
className: "mint:shrink-0",
|
|
111
|
-
pathname:
|
|
112
|
-
markdownContent:
|
|
113
|
-
allPages:
|
|
109
|
+
pathname: l,
|
|
110
|
+
markdownContent: x,
|
|
111
|
+
allPages: w,
|
|
114
112
|
baseUrl: u,
|
|
115
113
|
onCopyMarkdown: n == null ? void 0 : n.onCopyMarkdown,
|
|
116
114
|
onViewMarkdown: n == null ? void 0 : n.onViewMarkdown
|
|
117
115
|
}
|
|
118
116
|
)
|
|
119
117
|
] }) }),
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
s.length > 0 && /* @__PURE__ */ t("div", { className: "mint:mb-6 mint:flex mint:flex-wrap mint:gap-4", children: s.map((m) => /* @__PURE__ */ t(
|
|
119
|
+
D,
|
|
122
120
|
{
|
|
123
121
|
group: m,
|
|
124
122
|
className: "mint:flex mint:items-center mint:gap-2 mint:text-sm"
|
|
125
123
|
},
|
|
126
124
|
m.id
|
|
127
125
|
)) }),
|
|
128
|
-
/* @__PURE__ */ t("div", { className: "mint:pt-4", children: /* @__PURE__ */ t(
|
|
126
|
+
/* @__PURE__ */ t("div", { className: "mint:pt-4", children: /* @__PURE__ */ t(j, { children: /* @__PURE__ */ t(N, {}) }) })
|
|
129
127
|
]
|
|
130
128
|
}
|
|
131
129
|
)
|
|
@@ -142,5 +140,5 @@ function at({
|
|
|
142
140
|
) });
|
|
143
141
|
}
|
|
144
142
|
export {
|
|
145
|
-
|
|
143
|
+
rt as DocsPage
|
|
146
144
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,6 @@ import { NamedExoticComponent } from 'react';
|
|
|
25
25
|
import { Node as Node_2 } from 'unist';
|
|
26
26
|
import { Node as Node_3 } from 'hast';
|
|
27
27
|
import { OpenApiMetadata } from '@mintlify/models';
|
|
28
|
-
import { openApiToSchemaGraph } from '@mintlify/validation';
|
|
29
28
|
import { OpenAPIV3 } from 'openapi-types';
|
|
30
29
|
import { OpenAPIV3_1 } from 'openapi-types';
|
|
31
30
|
import { Operation } from '@mintlify/validation';
|
|
@@ -84,7 +83,7 @@ export declare interface AnchorConfig {
|
|
|
84
83
|
}
|
|
85
84
|
|
|
86
85
|
export declare const Api: ({ children }: {
|
|
87
|
-
children
|
|
86
|
+
children?: ReactNode | undefined;
|
|
88
87
|
}) => JSX_2.Element | null;
|
|
89
88
|
|
|
90
89
|
export declare const ApiExamples: ({ className, isModal, apiReferenceData, noInputs }: ApiExamplesProps) => JSX_2.Element;
|
|
@@ -100,6 +99,21 @@ export declare const ApiFields: NamedExoticComponent< {
|
|
|
100
99
|
pageMetadata: PageMetaTags;
|
|
101
100
|
}>;
|
|
102
101
|
|
|
102
|
+
export declare function ApiPage({ theme, className, pathname, markdownContent, allPages, baseUrl, LinkComponent, contextMenu, apiReferenceData, pageMetadata }: ApiPageProps): JSX_2.Element;
|
|
103
|
+
|
|
104
|
+
declare interface ApiPageProps {
|
|
105
|
+
theme: 'light' | 'dark';
|
|
106
|
+
className?: string;
|
|
107
|
+
pathname: string;
|
|
108
|
+
markdownContent?: string;
|
|
109
|
+
allPages?: LlmsPageConfig[];
|
|
110
|
+
baseUrl?: string;
|
|
111
|
+
LinkComponent?: LinkComponent;
|
|
112
|
+
contextMenu?: PageContextMenuConfig;
|
|
113
|
+
apiReferenceData?: ApiReferenceDataV2;
|
|
114
|
+
pageMetadata: PageMetaTags;
|
|
115
|
+
}
|
|
116
|
+
|
|
103
117
|
declare const ApiPlaygroundContext: Context<ApiPlaygroundContextType>;
|
|
104
118
|
export { ApiPlaygroundContext }
|
|
105
119
|
export { ApiPlaygroundContext as ApiPlaygroundContextLegacy }
|
|
@@ -428,7 +442,7 @@ export declare interface DocsLayoutTelemetry {
|
|
|
428
442
|
* />
|
|
429
443
|
* ```
|
|
430
444
|
*/
|
|
431
|
-
export declare function DocsPage({ payload, toc, navTree, activeHref, theme, className, pathname, markdownContent, allPages, baseUrl, bottomLinks, LinkComponent, localization, telemetry, contextMenu,
|
|
445
|
+
export declare function DocsPage({ payload, toc, navTree, activeHref, theme, className, pathname, markdownContent, allPages, baseUrl, bottomLinks, LinkComponent, localization, telemetry, contextMenu, }: DocsPagePropsWithCustomization): JSX_2.Element;
|
|
432
446
|
|
|
433
447
|
/**
|
|
434
448
|
* Localization strings for DocsPage component
|
|
@@ -461,7 +475,6 @@ export declare interface DocsPageProps {
|
|
|
461
475
|
baseUrl?: string;
|
|
462
476
|
bottomLinks?: BottomLinkConfig[];
|
|
463
477
|
LinkComponent?: LinkComponent;
|
|
464
|
-
apiReferenceData2?: any;
|
|
465
478
|
}
|
|
466
479
|
|
|
467
480
|
/**
|
|
@@ -678,12 +691,10 @@ declare interface NavTreeProps {
|
|
|
678
691
|
anchors?: AnchorConfig[];
|
|
679
692
|
}
|
|
680
693
|
|
|
681
|
-
export { openApiToSchemaGraph }
|
|
682
|
-
|
|
683
694
|
export declare const OperationPage: ({ apiReferenceData, operation, children, }: {
|
|
684
695
|
apiReferenceData: ApiReferenceDataV2;
|
|
685
696
|
operation: OperationV2;
|
|
686
|
-
children
|
|
697
|
+
children?: ReactNode | undefined;
|
|
687
698
|
}) => JSX_2.Element;
|
|
688
699
|
|
|
689
700
|
export declare type OperationV2 = Operation & {
|
|
@@ -906,6 +917,8 @@ export declare type SchemaGeneratedExample = {
|
|
|
906
917
|
value: unknown;
|
|
907
918
|
};
|
|
908
919
|
|
|
920
|
+
export { SchemaGraphData }
|
|
921
|
+
|
|
909
922
|
export declare const SchemaPage: ({ apiReferenceData, children, }: {
|
|
910
923
|
apiReferenceData: ApiReferenceDataV2;
|
|
911
924
|
children: ReactNode;
|