@mintlify/msft-sdk 1.1.64 → 1.1.66
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/ApiExamples.js +21 -19
- package/dist/api-playground-2/OperationPage.js +64 -68
- package/dist/api-playground-2/Playground.js +5 -5
- package/dist/api-playground-2/components/Example/GeneratedRequestExample.js +105 -104
- package/dist/api-playground-2/components/Example/GeneratedResponseExample.js +6 -6
- package/dist/api-playground-2/components/Example/RequestExample.js +37 -37
- package/dist/api-playground-2/components/Request/InputSectionContainer.js +2 -2
- package/dist/api-playground-2/components/TypeDropdown.js +1 -1
- package/dist/components/Api/MethodPill.js +9 -8
- package/dist/components/apiPage.js +51 -40
- package/dist/components/content-components/code-block.js +9 -6
- package/dist/components/content-components/code-snippet.js +9 -6
- package/dist/components/docsPage.js +75 -61
- package/dist/components/nav-tree/index.js +2 -2
- package/dist/constants/snippetPresets.js +26 -35
- package/dist/index.d.ts +2 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { generateResponseExampleMap as i } from "../../generators/generateResponseExampleMap.js";
|
|
3
3
|
import { useSelectedResponseContentType as u } from "../../hooks/useSelectedResponseContentType.js";
|
|
4
4
|
import { mapResponseExamples as d } from "../../schemaGraph/utils.js";
|
|
5
|
-
import { CodeGroupSelect as
|
|
6
|
-
import { CodeSnippets as
|
|
7
|
-
const
|
|
5
|
+
import { CodeGroupSelect as f } from "../../../components/content-components/CodeGroupSelect/index.js";
|
|
6
|
+
import { CodeSnippets as j } from "../../../components/content-components/code-snippets.js";
|
|
7
|
+
const x = ({
|
|
8
8
|
apiReferenceData: t,
|
|
9
9
|
maxHeight: n
|
|
10
10
|
}) => {
|
|
@@ -20,10 +20,10 @@ const C = ({
|
|
|
20
20
|
const a = Object.values(s).flatMap(
|
|
21
21
|
(m) => Object.values(m)
|
|
22
22
|
);
|
|
23
|
-
return /* @__PURE__ */ r(
|
|
23
|
+
return /* @__PURE__ */ r(j, { snippets: a, maxHeight: n, showCopyButton: !1, noMargins: !0 });
|
|
24
24
|
}
|
|
25
|
-
return /* @__PURE__ */ r(
|
|
25
|
+
return /* @__PURE__ */ r(f, { snippets: s, maxHeight: n });
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
x as GeneratedResponseExample
|
|
29
29
|
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { memo as O } from "react";
|
|
3
|
-
import { initialApiPlaygroundInputs as
|
|
4
|
-
import { generateSnippetMap as
|
|
5
|
-
import { useSelectedBaseUrl as
|
|
6
|
-
import { useSelectedRequestBodyContentType as
|
|
7
|
-
import { useSelectedSecurityOption as
|
|
8
|
-
import { CodeGroupSelect as
|
|
9
|
-
import { CodeSnippet as
|
|
10
|
-
import { CodeSnippets as
|
|
11
|
-
import { CodeBlock as
|
|
12
|
-
import { CodeGroup as
|
|
13
|
-
import { shikiLangToDisplayLang as
|
|
3
|
+
import { initialApiPlaygroundInputs as T } from "../../constants/index.js";
|
|
4
|
+
import { generateSnippetMap as j } from "../../generators/generateSnippetMap.js";
|
|
5
|
+
import { useSelectedBaseUrl as w } from "../../hooks/useSelectedBaseUrl.js";
|
|
6
|
+
import { useSelectedRequestBodyContentType as G } from "../../hooks/useSelectedRequestBodyContentType.js";
|
|
7
|
+
import { useSelectedSecurityOption as L } from "../../hooks/useSelectedSecurityOption.js";
|
|
8
|
+
import { CodeGroupSelect as U } from "../../../components/content-components/CodeGroupSelect/index.js";
|
|
9
|
+
import { CodeSnippet as k } from "../../../components/content-components/code-snippet.js";
|
|
10
|
+
import { CodeSnippets as P } from "../../../components/content-components/code-snippets.js";
|
|
11
|
+
import { CodeBlock as b } from "../../../components/content-components/code-block.js";
|
|
12
|
+
import { CodeGroup as h } from "../../../components/content-components/code-group.js";
|
|
13
|
+
import { shikiLangToDisplayLang as v } from "../../../constants/snippetPresets.js";
|
|
14
14
|
import { useApiPlaygroundDisplay as I } from "../../../hooks/useApiPlaygroundDisplay.js";
|
|
15
|
-
import { GeneratedRequestExample as
|
|
15
|
+
import { GeneratedRequestExample as B } from "./GeneratedRequestExample.js";
|
|
16
16
|
const N = O(
|
|
17
17
|
({
|
|
18
18
|
apiReferenceData: e,
|
|
19
|
-
inputs:
|
|
20
|
-
maxHeight:
|
|
19
|
+
inputs: p = T,
|
|
20
|
+
maxHeight: u
|
|
21
21
|
}) => {
|
|
22
|
-
var g,
|
|
23
|
-
const n = (g = e.operation) == null ? void 0 : g.requestExamples, { selectedRequestBodyContentTypeIndex:
|
|
24
|
-
switch ((S = e.operation) == null ? void 0 : S.requestExampleType) {
|
|
22
|
+
var g, y, f, S, q, E, x;
|
|
23
|
+
const n = (g = e.operation) == null ? void 0 : g.requestExamples, { selectedRequestBodyContentTypeIndex: a } = G(), { selectedSecurityOptionIndex: i } = L(), M = I(), m = (y = e.operation) == null ? void 0 : y.requestExampleLanguages, d = (f = e.operation) == null ? void 0 : f.requiredOnlyExamples, { baseUrl: s } = w();
|
|
24
|
+
switch (console.log("[DEBUG] RequestExample - requestExampleType:", (S = e.operation) == null ? void 0 : S.requestExampleType), console.log("[DEBUG] RequestExample - baseUrl:", s), console.log("[DEBUG] RequestExample - apiReferenceData.operation:", e.operation), (q = e.operation) == null ? void 0 : q.requestExampleType) {
|
|
25
25
|
case "mdx":
|
|
26
26
|
if (!n) return null;
|
|
27
27
|
const C = n.some((o) => o.dropdown ?? !1);
|
|
28
|
-
return /* @__PURE__ */ r(
|
|
29
|
-
|
|
28
|
+
return /* @__PURE__ */ r(h, { isSmallText: !0, dropdown: C, noMargins: !0, className: u, children: n.map((o, t) => /* @__PURE__ */ r(
|
|
29
|
+
b,
|
|
30
30
|
{
|
|
31
31
|
language: o.language,
|
|
32
32
|
fileName: o.filename,
|
|
@@ -35,54 +35,54 @@ const N = O(
|
|
|
35
35
|
`${o.filename}-${o.language}-${t}`
|
|
36
36
|
)) });
|
|
37
37
|
case "webhook":
|
|
38
|
-
return (
|
|
38
|
+
return (E = n == null ? void 0 : n[0]) != null && E.code ? /* @__PURE__ */ r(h, { isSmallText: !0, noMargins: !0, hideCodeSnippetFeedbackButton: !0, children: /* @__PURE__ */ r(b, { language: "json", filename: "Example Request Body", children: /* @__PURE__ */ r(k, { language: "json", children: (x = n[0]) == null ? void 0 : x.code }) }) }) : null;
|
|
39
39
|
case "codeSamples":
|
|
40
40
|
if (!e.operation.codeSamples) return null;
|
|
41
|
-
const c =
|
|
41
|
+
const c = j({
|
|
42
42
|
apiReferenceData: e,
|
|
43
43
|
codeSamples: e.operation.codeSamples,
|
|
44
44
|
baseUrl: s,
|
|
45
45
|
apiPlaygroundMode: M,
|
|
46
46
|
requestExampleLanguages: m,
|
|
47
47
|
requiredOnly: d,
|
|
48
|
-
inputs:
|
|
49
|
-
selectedSecurityOptionIndex:
|
|
50
|
-
selectedRequestBodyContentTypeIndex:
|
|
48
|
+
inputs: p,
|
|
49
|
+
selectedSecurityOptionIndex: i,
|
|
50
|
+
selectedRequestBodyContentTypeIndex: a
|
|
51
51
|
});
|
|
52
52
|
if (Object.values(c).every((o) => Object.keys(o).length <= 1)) {
|
|
53
53
|
let t = Object.values(c).flatMap((l) => Object.values(l));
|
|
54
54
|
return new Set(t.map((l) => l.filename)).size !== t.length && (t = t.map((l) => ({
|
|
55
55
|
...l,
|
|
56
|
-
filename:
|
|
57
|
-
}))), /* @__PURE__ */ r(
|
|
56
|
+
filename: v[l.language] ?? l.language
|
|
57
|
+
}))), /* @__PURE__ */ r(P, { snippets: t, noMargins: !0, dropdown: !0 });
|
|
58
58
|
}
|
|
59
|
-
return /* @__PURE__ */ r(
|
|
59
|
+
return /* @__PURE__ */ r(U, { snippets: c });
|
|
60
60
|
case "generated":
|
|
61
61
|
return s ? /* @__PURE__ */ r(
|
|
62
|
-
|
|
62
|
+
B,
|
|
63
63
|
{
|
|
64
64
|
apiReferenceData: e,
|
|
65
65
|
baseUrl: s,
|
|
66
|
-
inputs:
|
|
67
|
-
selectedSecurityOptionIndex:
|
|
66
|
+
inputs: p,
|
|
67
|
+
selectedSecurityOptionIndex: i,
|
|
68
68
|
requestExampleLanguages: m,
|
|
69
69
|
requiredOnly: d,
|
|
70
|
-
selectedRequestBodyContentTypeIndex:
|
|
71
|
-
maxHeight:
|
|
70
|
+
selectedRequestBodyContentTypeIndex: a,
|
|
71
|
+
maxHeight: u
|
|
72
72
|
}
|
|
73
73
|
) : null;
|
|
74
74
|
case "examples":
|
|
75
75
|
return !e.operation.prefillPlaygroundExamples || !s ? null : /* @__PURE__ */ r(
|
|
76
|
-
|
|
76
|
+
B,
|
|
77
77
|
{
|
|
78
78
|
apiReferenceData: e,
|
|
79
79
|
baseUrl: s,
|
|
80
|
-
inputs:
|
|
81
|
-
selectedSecurityOptionIndex:
|
|
80
|
+
inputs: p,
|
|
81
|
+
selectedSecurityOptionIndex: i,
|
|
82
82
|
requestExampleLanguages: m,
|
|
83
83
|
requiredOnly: d,
|
|
84
|
-
selectedRequestBodyContentTypeIndex:
|
|
85
|
-
maxHeight:
|
|
84
|
+
selectedRequestBodyContentTypeIndex: a,
|
|
85
|
+
maxHeight: u
|
|
86
86
|
}
|
|
87
87
|
);
|
|
88
88
|
default:
|
|
@@ -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: [
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import { getShortenedMethodName as s, getMethodColor as c } from "./colors.js";
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
5
|
-
const i = t.toUpperCase(),
|
|
3
|
+
import { cn as x } from "../../utils/cn.js";
|
|
4
|
+
const v = ({ isActive: n = !1, method: t, shortMethod: e = !1, className: m }) => {
|
|
5
|
+
const i = t.toUpperCase(), o = s(i), { activeNavPillBg: l, activeNavPillText: r, inactiveNavPillText: a, inactiveNavPillBg: d } = c(t);
|
|
6
6
|
return /* @__PURE__ */ p(
|
|
7
7
|
"span",
|
|
8
8
|
{
|
|
9
|
-
className:
|
|
9
|
+
className: x(
|
|
10
|
+
"mint:flex-shrink-0 mint:flex-grow-0",
|
|
10
11
|
e ? "mint:px-1 mint:py-0.5 mint:rounded-md mint:text-[0.55rem] mint:leading-tight mint:font-bold" : "mint:px-2 mint:py-0.5 mint:rounded-md mint:text-sm mint:leading-tight mint:font-bold",
|
|
11
|
-
n ? `${l} ${
|
|
12
|
-
|
|
12
|
+
n ? `${l} ${r}` : `${d} ${a}`,
|
|
13
|
+
m
|
|
13
14
|
),
|
|
14
|
-
children: e ?
|
|
15
|
+
children: e ? o : i
|
|
15
16
|
}
|
|
16
17
|
);
|
|
17
18
|
};
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
v as MethodPill
|
|
20
21
|
};
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { ApiExamples as
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as E } from "react";
|
|
3
|
+
import { ApiExamples as C } from "../api-playground-2/ApiExamples.js";
|
|
4
4
|
import { ComponentsProvider as P } from "../context/components-context.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
import { cn as e } from "../utils/cn.js";
|
|
7
|
-
import { MDXRenderer as
|
|
8
|
-
import { PageContextMenu as
|
|
9
|
-
import { Api as
|
|
10
|
-
import { PageProvider as
|
|
7
|
+
import { MDXRenderer as B } from "./mdx-renderer.js";
|
|
8
|
+
import { PageContextMenu as I } from "./page-context-menu.js";
|
|
9
|
+
import { Api as T } from "../api-playground-2/Api.js";
|
|
10
|
+
import { PageProvider as S, ApiReferenceProvider2 as A } from "../contexts/ConfigContext.js";
|
|
11
11
|
function K({
|
|
12
12
|
theme: a,
|
|
13
|
-
className:
|
|
13
|
+
className: h = "",
|
|
14
14
|
pathname: r,
|
|
15
|
-
markdownContent:
|
|
15
|
+
markdownContent: f,
|
|
16
16
|
allPages: b,
|
|
17
|
-
baseUrl:
|
|
18
|
-
LinkComponent:
|
|
19
|
-
contextMenu:
|
|
20
|
-
apiReferenceData:
|
|
21
|
-
pageMetadata:
|
|
17
|
+
baseUrl: g,
|
|
18
|
+
LinkComponent: p,
|
|
19
|
+
contextMenu: n,
|
|
20
|
+
apiReferenceData: i,
|
|
21
|
+
pageMetadata: o
|
|
22
22
|
}) {
|
|
23
|
-
return
|
|
23
|
+
return E(() => {
|
|
24
24
|
const { hash: s } = window.location;
|
|
25
25
|
if (!s) return;
|
|
26
|
-
const
|
|
27
|
-
const x = s.substring(1), m = document.getElementById("main-content"),
|
|
28
|
-
if (m &&
|
|
29
|
-
const
|
|
26
|
+
const w = setTimeout(() => {
|
|
27
|
+
const x = s.substring(1), m = document.getElementById("main-content"), d = document.getElementById(x);
|
|
28
|
+
if (m && d) {
|
|
29
|
+
const c = window.getComputedStyle(document.documentElement), u = parseFloat(c.getPropertyValue("--scroll-mt") || "0"), v = parseFloat(c.fontSize), k = u * v, N = m.getBoundingClientRect(), y = d.getBoundingClientRect().top - N.top + m.scrollTop - k;
|
|
30
30
|
m.scrollTo({
|
|
31
31
|
top: y,
|
|
32
32
|
behavior: "instant"
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
}, 100);
|
|
36
|
-
return () => clearTimeout(
|
|
37
|
-
}, [r]), /* @__PURE__ */ t(P, { LinkComponent:
|
|
36
|
+
return () => clearTimeout(w);
|
|
37
|
+
}, [r]), /* @__PURE__ */ t(P, { LinkComponent: p, children: /* @__PURE__ */ t(
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
40
|
className: e(
|
|
41
41
|
"mintlify-docs",
|
|
42
42
|
a === "dark" && "dark",
|
|
43
|
-
|
|
43
|
+
h,
|
|
44
44
|
"mint:flex mint:flex-col mint:flex-1 mint:min-h-0 mint:h-full mint:overflow-hidden"
|
|
45
45
|
),
|
|
46
46
|
children: /* @__PURE__ */ t(
|
|
@@ -60,49 +60,60 @@ function K({
|
|
|
60
60
|
className: e(
|
|
61
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
62
|
),
|
|
63
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ l(
|
|
64
64
|
"div",
|
|
65
65
|
{
|
|
66
66
|
className: "mint:flex mint:flex-row-reverse mint:gap-12 mint:justify-center mint:mx-auto mint:w-full",
|
|
67
67
|
id: "content-layout-container",
|
|
68
68
|
children: [
|
|
69
|
-
|
|
70
|
-
/* @__PURE__ */
|
|
69
|
+
(console.log("[DEBUG] apiPage.tsx - apiReferenceData:", i), console.log("[DEBUG] apiPage.tsx - apiReferenceData?.operation:", i == null ? void 0 : i.operation), console.log("[DEBUG] apiPage.tsx - Should render sidebar:", !!(i != null && i.operation)), null),
|
|
70
|
+
(i == null ? void 0 : i.operation) && /* @__PURE__ */ l(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
className: "mint:self-start mint:sticky mint:flex-col mint:w-[448px] mint:top-4 mint:gap-6 mint:hidden mint:lg:flex",
|
|
74
|
+
style: { backgroundColor: "red", minHeight: "200px" },
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ t("div", { style: { color: "white", padding: "10px" }, children: "SIDEBAR IS RENDERING" }),
|
|
77
|
+
/* @__PURE__ */ t(C, { apiReferenceData: i, noInputs: !0 })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ l(
|
|
71
82
|
"div",
|
|
72
83
|
{
|
|
73
84
|
className: e(
|
|
74
85
|
"mint:w-full mint:overflow-x-visible mint:max-w-[730px]"
|
|
75
86
|
),
|
|
76
87
|
children: [
|
|
77
|
-
|
|
78
|
-
/* @__PURE__ */
|
|
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:
|
|
80
|
-
|
|
88
|
+
o.title && /* @__PURE__ */ t("header", { className: "mint:mb-6", children: /* @__PURE__ */ l("div", { className: "mint:flex mint:flex-col mint:gap-5", children: [
|
|
89
|
+
/* @__PURE__ */ l("div", { className: "mint:flex mint:flex-col mint:gap-2 mint:items-start", children: [
|
|
90
|
+
/* @__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: o.title }),
|
|
91
|
+
o.description && /* @__PURE__ */ t("p", { className: "mint:text-lg mint:text-[#4b5563] mint:dark:text-[#d1d5db] mint:m-0", children: o.description })
|
|
81
92
|
] }),
|
|
82
93
|
r && /* @__PURE__ */ t(
|
|
83
|
-
|
|
94
|
+
I,
|
|
84
95
|
{
|
|
85
96
|
className: "mint:shrink-0",
|
|
86
97
|
pathname: r,
|
|
87
|
-
markdownContent:
|
|
98
|
+
markdownContent: f,
|
|
88
99
|
allPages: b,
|
|
89
|
-
baseUrl:
|
|
90
|
-
onCopyMarkdown:
|
|
91
|
-
onViewMarkdown:
|
|
100
|
+
baseUrl: g,
|
|
101
|
+
onCopyMarkdown: n == null ? void 0 : n.onCopyMarkdown,
|
|
102
|
+
onViewMarkdown: n == null ? void 0 : n.onViewMarkdown
|
|
92
103
|
}
|
|
93
104
|
)
|
|
94
105
|
] }) }),
|
|
95
|
-
/* @__PURE__ */ t("div", { className: "mint:pt-4", children: /* @__PURE__ */ t(
|
|
96
|
-
pageMetadata:
|
|
106
|
+
/* @__PURE__ */ t("div", { className: "mint:pt-4", children: /* @__PURE__ */ t(B, { children: /* @__PURE__ */ t(S, { value: {
|
|
107
|
+
pageMetadata: o,
|
|
97
108
|
pathname: r
|
|
98
109
|
}, children: /* @__PURE__ */ t(
|
|
99
|
-
|
|
110
|
+
A,
|
|
100
111
|
{
|
|
101
|
-
pageMetadata:
|
|
112
|
+
pageMetadata: o,
|
|
102
113
|
docsConfig: void 0,
|
|
103
114
|
mdxExtracts: void 0,
|
|
104
|
-
apiReferenceData2:
|
|
105
|
-
children: /* @__PURE__ */ t(
|
|
115
|
+
apiReferenceData2: i,
|
|
116
|
+
children: /* @__PURE__ */ t(T, {})
|
|
106
117
|
}
|
|
107
118
|
) }) }) })
|
|
108
119
|
]
|
|
@@ -9,6 +9,9 @@ import "prismjs/components/prism-markdown.js";
|
|
|
9
9
|
import "prismjs/components/prism-powershell.js";
|
|
10
10
|
import "prismjs/components/prism-python.js";
|
|
11
11
|
import "prismjs/components/prism-typescript.js";
|
|
12
|
+
import "prismjs/components/prism-java.js";
|
|
13
|
+
import "prismjs/components/prism-ruby.js";
|
|
14
|
+
import "prismjs/components/prism-go.js";
|
|
12
15
|
import z, { useState as v, useEffect as F } from "react";
|
|
13
16
|
import { cn as p } from "../../utils/cn.js";
|
|
14
17
|
import { getNodeText as D } from "../../utils/get-node-text.js";
|
|
@@ -58,7 +61,7 @@ function C({ onClick: t, isCopied: e, showTooltip: r = !0 }) {
|
|
|
58
61
|
)
|
|
59
62
|
] });
|
|
60
63
|
}
|
|
61
|
-
function
|
|
64
|
+
function rt({
|
|
62
65
|
textToCopy: t,
|
|
63
66
|
showTooltip: e = !0
|
|
64
67
|
}) {
|
|
@@ -67,7 +70,7 @@ function tt({
|
|
|
67
70
|
c(t);
|
|
68
71
|
}, isCopied: r, showTooltip: e });
|
|
69
72
|
}
|
|
70
|
-
function
|
|
73
|
+
function nt({
|
|
71
74
|
data: t,
|
|
72
75
|
showTooltip: e = !0
|
|
73
76
|
}) {
|
|
@@ -76,7 +79,7 @@ function et({
|
|
|
76
79
|
t.contentType && T.includes(t.contentType) ? n(t.blob, t.contentType) : t.type === "other" && t.content ? c(t.content) : console.error("Unsupported content type for clipboard");
|
|
77
80
|
}, isCopied: r, showTooltip: e });
|
|
78
81
|
}
|
|
79
|
-
function
|
|
82
|
+
function it({
|
|
80
83
|
children: t,
|
|
81
84
|
className: e,
|
|
82
85
|
fileName: r,
|
|
@@ -174,9 +177,9 @@ function ot({
|
|
|
174
177
|
);
|
|
175
178
|
}
|
|
176
179
|
export {
|
|
177
|
-
|
|
178
|
-
|
|
180
|
+
it as CodeBlock,
|
|
181
|
+
nt as CopyDataToClipboardButton,
|
|
179
182
|
C as CopyIconButton,
|
|
180
|
-
|
|
183
|
+
rt as CopyToClipboardButton,
|
|
181
184
|
y as useCopyToClipboard
|
|
182
185
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import p from "prismjs";
|
|
3
3
|
import "prismjs/components/prism-javascript.js";
|
|
4
4
|
import "prismjs/components/prism-typescript.js";
|
|
@@ -8,19 +8,22 @@ import "prismjs/components/prism-json.js";
|
|
|
8
8
|
import "prismjs/components/prism-markdown.js";
|
|
9
9
|
import "prismjs/components/prism-csharp.js";
|
|
10
10
|
import "prismjs/components/prism-powershell.js";
|
|
11
|
-
|
|
11
|
+
import "prismjs/components/prism-java.js";
|
|
12
|
+
require("prismjs/components/prism-ruby.js");
|
|
13
|
+
require("prismjs/components/prism-go.js");
|
|
14
|
+
function H({ language: r, children: t }) {
|
|
12
15
|
const n = typeof t == "string" ? t : "";
|
|
13
16
|
r = r ?? "text";
|
|
14
|
-
let
|
|
17
|
+
let o = "";
|
|
15
18
|
if (n)
|
|
16
19
|
try {
|
|
17
20
|
const e = p.languages[r] || p.languages.plaintext;
|
|
18
|
-
|
|
21
|
+
o = p.highlight(n, e, r);
|
|
19
22
|
} catch (e) {
|
|
20
23
|
console.error("Failed to highlight code:", e);
|
|
21
24
|
}
|
|
22
|
-
return typeof t == "string" && r &&
|
|
25
|
+
return typeof t == "string" && r && o ? /* @__PURE__ */ i("pre", { suppressHydrationWarning: !0, children: /* @__PURE__ */ i("code", { suppressHydrationWarning: !0, dangerouslySetInnerHTML: { __html: o } }) }) : /* @__PURE__ */ i("pre", { suppressHydrationWarning: !0, children: /* @__PURE__ */ i("code", { suppressHydrationWarning: !0, children: t }) });
|
|
23
26
|
}
|
|
24
27
|
export {
|
|
25
|
-
|
|
28
|
+
H as CodeSnippet
|
|
26
29
|
};
|