@mintlify/msft-sdk 1.1.62 → 1.1.64
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/Response/DownloadFileButton.js +6 -5
- package/dist/api-playground/ApiPlayground/Response/ResponseBody/CodeResponseContent.js +13 -12
- package/dist/api-playground/ApiPlayground/Response/ResponsePlaceholder.js +8 -7
- package/dist/api-playground/ApiPlayground/Response/ResponseTable.js +3 -2
- package/dist/api-playground/ApiPlayground/Response/ResponseTopbar.js +9 -8
- package/dist/api-playground/ApiPlayground/Response/index.js +4 -3
- package/dist/api-playground/ApiPlayground/components/AdditionalPropertyButton.js +42 -21
- package/dist/api-playground/ApiPlayground/components/ParamFieldWrapper.js +13 -9
- package/dist/api-playground/ApiPlayground/components/PlaygroundModalWrapper.js +7 -6
- package/dist/api-playground/ApiPlayground/components/SendPill.js +3 -2
- package/dist/api-playground/ApiPlayground/components/TypeDropdown.js +6 -5
- package/dist/api-playground/EndpointFields/ParamFields/ExampleDescription.js +3 -2
- package/dist/api-playground/EndpointFields/components/Description.js +6 -5
- package/dist/api-playground/EndpointFields/components/OptionDropdown.js +9 -8
- package/dist/api-playground/EndpointFields/components/SectionHeading.js +8 -7
- package/dist/api-playground-2/ApiExamples.js +19 -20
- package/dist/api-playground-2/ApiFields.js +20 -247
- package/dist/api-playground-2/EndpointHeader.js +59 -47
- package/dist/api-playground-2/OperationPage.js +70 -67
- package/dist/api-playground-2/Playground.js +67 -83
- package/dist/api-playground-2/SchemaPage.js +22 -9
- package/dist/api-playground-2/components/EndpointFields/Body.js +40 -0
- package/dist/api-playground-2/components/EndpointFields/Parameters.js +90 -0
- package/dist/api-playground-2/components/EndpointFields/Response.js +146 -0
- package/dist/api-playground-2/components/EndpointFields/Security.js +88 -0
- package/dist/api-playground-2/components/EndpointFields/fields/ArrayParamField.js +93 -0
- package/dist/api-playground-2/components/EndpointFields/fields/Enum.js +29 -11
- package/dist/api-playground-2/components/EndpointFields/fields/ObjectParamField.js +145 -0
- package/dist/api-playground-2/components/EndpointFields/fields/PrimitiveParamField.js +60 -48
- package/dist/api-playground-2/components/EndpointFields/fields/SchemaField.js +230 -0
- package/dist/api-playground-2/components/Example/GeneratedRequestExample.js +93 -89
- package/dist/api-playground-2/components/Example/GeneratedResponseExample.js +18 -17
- package/dist/api-playground-2/components/Example/RequestExample.js +92 -93
- package/dist/api-playground-2/components/Example/ResponseExample.js +19 -15
- package/dist/api-playground-2/components/Request/ParameterSection.js +20 -18
- package/dist/api-playground-2/components/Request/SecuritySection.js +53 -43
- package/dist/api-playground-2/components/Request/inputs/ArrayInput.js +89 -40
- package/dist/api-playground-2/components/Request/inputs/DifferentiatedInput.js +12 -12
- package/dist/api-playground-2/components/Request/inputs/FileInput.js +16 -15
- package/dist/api-playground-2/components/Request/inputs/InputContainer.js +76 -57
- package/dist/api-playground-2/components/Request/inputs/NumberInput.js +10 -9
- package/dist/api-playground-2/components/Request/inputs/ObjectInput.js +98 -80
- package/dist/api-playground-2/components/Request/inputs/OneOfInput.js +55 -47
- package/dist/api-playground-2/components/Request/inputs/SelectInput.js +18 -17
- package/dist/api-playground-2/components/Request/inputs/StringInput.js +19 -18
- package/dist/api-playground-2/components/Request/inputs/TextInput.js +12 -11
- package/dist/api-playground-2/components/SendPillWrapper.js +35 -0
- package/dist/api-playground-2/contexts/ApiPlaygroundContext.js +3 -5
- package/dist/api-playground-2/generators/createCookies.js +23 -0
- package/dist/api-playground-2/generators/createHeaders.js +53 -36
- package/dist/api-playground-2/generators/createQueryString.js +30 -0
- package/dist/api-playground-2/generators/generateAuthPlaceholder.js +14 -0
- package/dist/api-playground-2/generators/generateInteractiveCodeSample.js +27 -25
- package/dist/api-playground-2/generators/generateRequest.js +47 -51
- package/dist/api-playground-2/generators/generateResponseExampleMap.js +15 -11
- package/dist/api-playground-2/generators/generateSnippetMap.js +13 -11
- package/dist/api-playground-2/hooks/useCopyPathWithInputs.js +11 -11
- package/dist/api-playground-2/hooks/useInitializeInputs.js +185 -88
- package/dist/api-playground-2/hooks/usePlaygroundInputsStore.js +70 -25
- package/dist/api-playground-2/hooks/useSelectedBaseUrl.js +13 -0
- package/dist/api-playground-2/hooks/useSelectedExample.js +10 -0
- package/dist/api-playground-2/hooks/useSelectedRequestBodyContentType.js +12 -0
- package/dist/api-playground-2/hooks/useSelectedResponseContentType.js +12 -0
- package/dist/api-playground-2/hooks/useSelectedSecurityOption.js +31 -0
- package/dist/api-playground-2/hooks/useSendPlaygroundRequest.js +114 -101
- package/dist/api-playground-2/schemaGraph/addApiReferenceDataFromMdxAndDocsConfig.js +23 -32
- package/dist/api-playground-2/schemaGraph/addTypeLabelsToSchema.js +50 -0
- package/dist/api-playground-2/schemaGraph/addUniqueKeysToSchema.js +40 -24
- package/dist/api-playground-2/schemaGraph/getExampleBodyInputs.js +94 -0
- package/dist/api-playground-2/schemaGraph/getSchemaGraphOperationData.js +56 -50
- package/dist/api-playground-2/schemaGraph/processExamples.js +117 -52
- package/dist/api-playground-2/schemaGraph/processSchema.js +10 -0
- package/dist/api-playground-2/schemaGraph/processSecurityOptions.js +58 -28
- package/dist/api-playground-2/schemaGraph/reduceCompositions.js +220 -181
- package/dist/api-playground-2/schemaGraph/resolveOperationWithDependencies.js +128 -89
- package/dist/api-playground-2/schemaGraph/resolveSchemaWithDependencies.js +15 -16
- package/dist/api-playground-2/schemaGraph/sortSchemaByRequired.js +14 -12
- package/dist/api-playground-2/schemaGraph/utils.js +185 -147
- package/dist/common/guards.js +11 -19
- package/dist/components/Api/Expandable.js +10 -9
- package/dist/components/Api/Param.js +11 -13
- package/dist/components/Api/dropdown-menu.js +10 -9
- package/dist/components/apiPage.js +125 -0
- package/dist/components/content-components/code-group.js +4 -4
- package/dist/components/docsPage.js +54 -56
- package/dist/contexts/EndpointLocationContext.js +3 -3
- package/dist/hooks/useApiParamFieldOption.js +10 -0
- package/dist/hooks/useEndpoint.js +3 -3
- package/dist/hooks/useKeyboardShortcut.js +13 -13
- package/dist/hooks/useSendPlaygroundRequest.js +14 -146
- package/dist/index.d.ts +80 -60
- package/dist/index.js +99 -101
- package/dist/openapi/generateTypeStringFromSchema.js +2 -31
- package/dist/plugins/sanitize/rehype-pre-to-mdx-fence.js +13 -13
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/api-playground/ApiPlayground/Request/BodySection.js +0 -64
- package/dist/api-playground/ApiPlayground/Request/ParameterSection.js +0 -32
- package/dist/api-playground/ApiPlayground/Request/PlaygroundModal.js +0 -201
- package/dist/api-playground/ApiPlayground/Request/SecuritySection.js +0 -146
- package/dist/api-playground/ApiPlayground/Request/ServerSection.js +0 -30
- package/dist/api-playground/ApiPlayground/Request/index.js +0 -43
- package/dist/api-playground/ApiPlayground/Request/inputs/ArrayInput.js +0 -93
- package/dist/api-playground/ApiPlayground/Request/inputs/DifferentiatedInput.js +0 -90
- package/dist/api-playground/ApiPlayground/Request/inputs/FileInput.js +0 -62
- package/dist/api-playground/ApiPlayground/Request/inputs/NullInput.js +0 -33
- package/dist/api-playground/ApiPlayground/Request/inputs/NumberInput.js +0 -61
- package/dist/api-playground/ApiPlayground/Request/inputs/ObjectChildren.js +0 -109
- package/dist/api-playground/ApiPlayground/Request/inputs/ObjectInput.js +0 -87
- package/dist/api-playground/ApiPlayground/Request/inputs/RecursiveInput.js +0 -61
- package/dist/api-playground/ApiPlayground/Request/inputs/SelectInput.js +0 -54
- package/dist/api-playground/ApiPlayground/Request/inputs/StringInput.js +0 -67
- package/dist/api-playground/ApiPlayground/Request/inputs/TextInput.js +0 -44
- package/dist/api-playground/ApiPlayground/components/EndpointsMenu.js +0 -42
- package/dist/api-playground/ApiPlayground/components/EndpointsMenuLink.js +0 -43
- package/dist/api-playground/ApiPlayground/components/EndpointsMenuSearch.js +0 -38
- package/dist/api-playground/ApiPlayground/components/InputContainer.js +0 -128
- package/dist/api-playground/ApiPlayground/components/InputSectionContainer.js +0 -59
- package/dist/api-playground/ApiPlayground/components/PathHeader.js +0 -162
- package/dist/api-playground/ApiPlayground/components/TrashButton.js +0 -26
- package/dist/api-playground/ApiPlayground/index.js +0 -67
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/Enum.js +0 -19
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/NumberMetadata.js +0 -18
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/StringMetadata.js +0 -28
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/index.js +0 -5
- package/dist/api-playground/EndpointFields/ParamFields/RecursiveParamField.js +0 -13
- package/dist/api-playground/EndpointFields/index.js +0 -7
- package/dist/api-playground-2/components/EndpointFields/EndpointSecurity.js +0 -87
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleArrayParamField.js +0 -89
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleObjectParamField.js +0 -121
- package/dist/api-playground-2/components/EndpointFields/fields/SimplePrimitiveParamField.js +0 -74
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleSchemaField.js +0 -252
- package/dist/common/potentiallyParseOpenApiString.js +0 -24
- package/dist/common/replaceSlashIndex.js +0 -6
- package/dist/common/slugToTitle.js +0 -10
- package/dist/constants/prism-languages.js +0 -19
- package/dist/contexts/ApiPlaygroundInputsContext.js +0 -17
- package/dist/contexts/MDXContentContext.js +0 -17
- package/dist/hooks/useApiPlaygroundInputs.js +0 -6
- package/dist/hooks/useApiPlaygroundPrefillExamples.js +0 -39
- package/dist/hooks/useBaseUrlOptions.js +0 -18
- package/dist/hooks/useComponentSchemas.js +0 -9
- package/dist/hooks/useGenerateNextAdditionalProperties.js +0 -11
- package/dist/hooks/useGenerateNextItems.js +0 -11
- package/dist/hooks/useGenerateNextProperties.js +0 -11
- package/dist/hooks/useMDXContent.js +0 -6
- package/dist/hooks/useMDXContentController/useApiPlaygroundInputs.js +0 -9
- package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiBaseIndexCallback.js +0 -15
- package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiPlaygroundInputsCallback.js +0 -15
- package/dist/hooks/usePlaygroundSchemaOptions.js +0 -42
- package/dist/hooks/usePrefilledInputs/index.js +0 -65
- package/dist/hooks/usePrefilledInputs/storedServerVariables.js +0 -29
- package/dist/hooks/useSecurityOption.js +0 -10
- package/dist/hooks/useSetDefaultValue.js +0 -63
- package/dist/openapi/filterEnums.js +0 -20
- package/dist/openapi/generateNextAdditionalProperties.js +0 -7
- package/dist/openapi/generateNextItems.js +0 -7
- package/dist/openapi/generateNextProperties.js +0 -23
- package/dist/openapi/generateOptionLabels.js +0 -20
- package/dist/openapi/generateSimpleLabels.js +0 -4
- package/dist/openapi/getAuthFilteredSchemaArray.js +0 -18
- package/dist/paths/isEqualIgnoringLeadingSlash.js +0 -21
- package/dist/paths/optionallyRemoveLeadingSlash.js +0 -6
- package/dist/paths/optionallyRemoveTrailingSlash.js +0 -6
- package/dist/utils/api-playground/defaults.js +0 -15
- package/dist/utils/api-playground/paramFieldDefaults.js +0 -10
- package/dist/utils/api-reference/getFilteredSecurityOptions.js +0 -4
- package/dist/utils/api-reference/getNextPropertiesByType.js +0 -5
- package/dist/utils/flattenObject.js +0 -10
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsx as m, jsxs as
|
|
1
|
+
import { jsx as m, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import "@mintlify/validation";
|
|
3
|
+
import "@sindresorhus/slugify";
|
|
3
4
|
import { cn as d } from "../../utils/cn.js";
|
|
4
5
|
import * as t from "@radix-ui/react-dropdown-menu";
|
|
5
6
|
import { ChevronRightFilled as l, CheckmarkCircleRegular as c, CircleRegular as p } from "@fluentui/react-icons";
|
|
6
7
|
import * as o from "react";
|
|
7
8
|
const f = o.forwardRef((n, e) => /* @__PURE__ */ m(t.Root, { modal: !1, ...n }));
|
|
8
9
|
f.displayName = t.Root.displayName;
|
|
9
|
-
const
|
|
10
|
+
const k = t.Trigger, u = o.forwardRef(({ className: n, inset: e, children: i, ...a }, r) => /* @__PURE__ */ s(
|
|
10
11
|
t.SubTrigger,
|
|
11
12
|
{
|
|
12
|
-
ref:
|
|
13
|
+
ref: r,
|
|
13
14
|
className: d(
|
|
14
15
|
"mint:flex mint:cursor-default mint:select-none mint:items-center mint:rounded-md mint:px-2 mint:py-1.5 mint:text-sm mint:outline-none mint:focus:bg-accent mint:data-[state=open]:bg-accent",
|
|
15
16
|
e && "mint:pl-8",
|
|
@@ -48,10 +49,10 @@ const g = o.forwardRef(({ className: n, sideOffset: e = 8, ...i }, a) => /* @__P
|
|
|
48
49
|
}
|
|
49
50
|
) }));
|
|
50
51
|
g.displayName = t.Content.displayName;
|
|
51
|
-
const w = o.forwardRef(({ className: n, inset: e, isSelected: i, ...a },
|
|
52
|
+
const w = o.forwardRef(({ className: n, inset: e, isSelected: i, ...a }, r) => /* @__PURE__ */ m(
|
|
52
53
|
t.Item,
|
|
53
54
|
{
|
|
54
|
-
ref:
|
|
55
|
+
ref: r,
|
|
55
56
|
className: d(
|
|
56
57
|
"mint:relative mint:flex mint:cursor-pointer mint:select-none mint:items-center mint:rounded-lg mint:px-2 mint:py-1.5 mint:text-sm mint:outline-none mint:focus:bg-accent mint:focus:text-accent-foreground mint:data-[disabled]:pointer-events-none mint:data-[disabled]:opacity-50 mint:hover:bg-zinc-950/5 mint:dark:hover:bg-white/5",
|
|
57
58
|
e && "mint:pl-8",
|
|
@@ -62,10 +63,10 @@ const w = o.forwardRef(({ className: n, inset: e, isSelected: i, ...a }, s) => /
|
|
|
62
63
|
}
|
|
63
64
|
));
|
|
64
65
|
w.displayName = t.Item.displayName;
|
|
65
|
-
const h = o.forwardRef(({ className: n, children: e, checked: i, ...a },
|
|
66
|
+
const h = o.forwardRef(({ className: n, children: e, checked: i, ...a }, r) => /* @__PURE__ */ s(
|
|
66
67
|
t.CheckboxItem,
|
|
67
68
|
{
|
|
68
|
-
ref:
|
|
69
|
+
ref: r,
|
|
69
70
|
className: d(
|
|
70
71
|
"mint:relative mint:flex mint:cursor-default mint:select-none mint:items-center mint:rounded-sm mint:py-1.5 mint:pl-8 mint:pr-2 mint:text-sm mint:outline-none mint:transition-colors mint:focus:bg-accent mint:focus:text-accent-foreground mint:data-[disabled]:pointer-events-none mint:data-[disabled]:opacity-50",
|
|
71
72
|
n
|
|
@@ -79,7 +80,7 @@ const h = o.forwardRef(({ className: n, children: e, checked: i, ...a }, s) => /
|
|
|
79
80
|
}
|
|
80
81
|
));
|
|
81
82
|
h.displayName = t.CheckboxItem.displayName;
|
|
82
|
-
const N = o.forwardRef(({ className: n, children: e, ...i }, a) => /* @__PURE__ */
|
|
83
|
+
const N = o.forwardRef(({ className: n, children: e, ...i }, a) => /* @__PURE__ */ s(
|
|
83
84
|
t.RadioItem,
|
|
84
85
|
{
|
|
85
86
|
ref: a,
|
|
@@ -123,5 +124,5 @@ export {
|
|
|
123
124
|
x as DropdownMenuSeparator,
|
|
124
125
|
b as DropdownMenuSubContent,
|
|
125
126
|
u as DropdownMenuSubTrigger,
|
|
126
|
-
|
|
127
|
+
k as DropdownMenuTrigger
|
|
127
128
|
};
|
|
@@ -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
|
+
};
|
|
@@ -6,7 +6,7 @@ import { cn as g } from "../../utils/cn.js";
|
|
|
6
6
|
import { CopyToClipboardButton as B } from "./code-block.js";
|
|
7
7
|
import { getNodeText as G } from "../../utils/get-node-text.js";
|
|
8
8
|
import { capitalize as D } from "../../utils/string.js";
|
|
9
|
-
const
|
|
9
|
+
const Q = y(function({ children: r, onChange: a, className: o, dropdown: l, noMargins: h, isSmallText: q, ...T }, C) {
|
|
10
10
|
var k, N;
|
|
11
11
|
const { defaultValue: u, ...S } = T, x = z(/* @__PURE__ */ new Map()), i = Array.isArray(r) ? r : j.Children.toArray(r), [v, A] = F(0), w = L(
|
|
12
12
|
(n) => {
|
|
@@ -133,7 +133,7 @@ const K = y(function({ children: r, onChange: a, className: o, dropdown: l, noMa
|
|
|
133
133
|
}
|
|
134
134
|
);
|
|
135
135
|
});
|
|
136
|
-
function
|
|
136
|
+
function U({ text: b }) {
|
|
137
137
|
return /* @__PURE__ */ e(
|
|
138
138
|
"div",
|
|
139
139
|
{
|
|
@@ -144,6 +144,6 @@ function Q({ text: b }) {
|
|
|
144
144
|
);
|
|
145
145
|
}
|
|
146
146
|
export {
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
U as CodeBlockTooltip,
|
|
148
|
+
Q as CodeGroup
|
|
149
149
|
};
|
|
@@ -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
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useContext as c, useRef as s, createContext as a } from "react";
|
|
3
3
|
import { useCheckHash as p } from "../hooks/useCheckHash.js";
|
|
4
|
-
const o =
|
|
4
|
+
const o = a({}), u = () => c(o);
|
|
5
5
|
function x({
|
|
6
6
|
location: t,
|
|
7
7
|
children: n
|
|
8
8
|
}) {
|
|
9
|
-
const e =
|
|
9
|
+
const e = s(!1), r = p();
|
|
10
10
|
return /* @__PURE__ */ i(o.Provider, { value: { location: t, anchor: r, hasScrolledToAnchorRef: e }, children: n });
|
|
11
11
|
}
|
|
12
12
|
o.displayName = "EndpointLocationContext";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useContext as r } from "react";
|
|
2
|
+
import { DocsConfigContext as d } from "../contexts/ConfigContext.js";
|
|
3
|
+
const F = () => {
|
|
4
|
+
var o, p, t, n;
|
|
5
|
+
const { mintConfig: i, docsConfig: a } = r(d), e = (p = (o = i == null ? void 0 : i.api) == null ? void 0 : o.paramFields) == null ? void 0 : p.expanded;
|
|
6
|
+
return ((n = (t = a == null ? void 0 : a.api) == null ? void 0 : t.params) == null ? void 0 : n.expanded) ?? e;
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
F as useApiParamFieldOption
|
|
10
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useMemo as n, useContext as t } from "react";
|
|
2
2
|
import { ApiReferenceContext as o } from "../contexts/ConfigContext.js";
|
|
3
3
|
const p = () => {
|
|
4
4
|
const {
|
|
5
5
|
apiReferenceData: { endpoint: e }
|
|
6
|
-
} =
|
|
6
|
+
} = t(o);
|
|
7
7
|
return e;
|
|
8
8
|
}, s = () => {
|
|
9
9
|
const e = p();
|
|
10
|
-
return
|
|
10
|
+
return n(() => e, [e]);
|
|
11
11
|
};
|
|
12
12
|
export {
|
|
13
13
|
s as useEndpoint,
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { useCallback as
|
|
2
|
-
const
|
|
3
|
-
key:
|
|
1
|
+
import { useCallback as w, useEffect as y } from "react";
|
|
2
|
+
const C = ({
|
|
3
|
+
key: n,
|
|
4
4
|
callback: r,
|
|
5
5
|
isSingleKey: h,
|
|
6
|
-
excludedActiveElementId:
|
|
7
|
-
excludedActiveElements:
|
|
6
|
+
excludedActiveElementId: t,
|
|
7
|
+
excludedActiveElements: u,
|
|
8
8
|
isDisabled: i
|
|
9
9
|
}) => {
|
|
10
|
-
const
|
|
11
|
-
(
|
|
10
|
+
const f = w(
|
|
11
|
+
(p) => {
|
|
12
12
|
if (i) return;
|
|
13
|
-
let
|
|
13
|
+
let s = !1;
|
|
14
14
|
const o = document.activeElement;
|
|
15
|
-
|
|
15
|
+
t && (s = !!(o != null && o.id) && t.includes(o.id)), u && !s && (s = u.includes(
|
|
16
16
|
o == null ? void 0 : o.tagName.toLowerCase()
|
|
17
|
-
)),
|
|
17
|
+
)), p.key === n && h && !s && (p.preventDefault(), r == null || r());
|
|
18
18
|
},
|
|
19
|
-
[r,
|
|
19
|
+
[r, n, h, t, u, i]
|
|
20
20
|
);
|
|
21
|
-
|
|
21
|
+
y(() => (addEventListener("keydown", f), () => removeEventListener("keydown", f)), [f]);
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
C as useKeyboardShortcut
|
|
25
25
|
};
|
|
@@ -1,148 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}) =>
|
|
12
|
-
var f, p;
|
|
13
|
-
const e = j(), { docsConfig: a } = b(g), d = ((p = (f = a == null ? void 0 : a.api) == null ? void 0 : f.playground) == null ? void 0 : p.proxy) === !1;
|
|
14
|
-
return S(async () => {
|
|
15
|
-
o(!0);
|
|
16
|
-
const y = await import("axios").then((i) => i.default), u = w(t.path, e.path), h = O(
|
|
17
|
-
x(n, e.server),
|
|
18
|
-
u
|
|
19
|
-
), m = A(e.header, r), c = {
|
|
20
|
-
method: t.method,
|
|
21
|
-
url: h,
|
|
22
|
-
header: m,
|
|
23
|
-
body: e.body,
|
|
24
|
-
cookie: e.cookie,
|
|
25
|
-
query: e.query
|
|
26
|
-
};
|
|
27
|
-
try {
|
|
28
|
-
if (d) {
|
|
29
|
-
const i = await C(c);
|
|
30
|
-
s({
|
|
31
|
-
error: !1,
|
|
32
|
-
response: {
|
|
33
|
-
status: i.status,
|
|
34
|
-
statusText: i.statusText,
|
|
35
|
-
headers: i.headers,
|
|
36
|
-
data: i.data
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
} else if (r.includes("multipart/form-data")) {
|
|
40
|
-
const i = await D(c);
|
|
41
|
-
s(i);
|
|
42
|
-
} else {
|
|
43
|
-
const { data: i } = await y.post(`${l.BASE_PATH}/_mintlify/api/request`, c);
|
|
44
|
-
s(i);
|
|
45
|
-
}
|
|
46
|
-
} catch (i) {
|
|
47
|
-
s({
|
|
48
|
-
error: !0,
|
|
49
|
-
errorMessage: "unable to complete request"
|
|
50
|
-
}), console.error(i);
|
|
51
|
-
}
|
|
52
|
-
o(!1);
|
|
53
|
-
}, [
|
|
54
|
-
o,
|
|
55
|
-
t,
|
|
56
|
-
e,
|
|
57
|
-
n,
|
|
58
|
-
r,
|
|
59
|
-
d,
|
|
60
|
-
s
|
|
61
|
-
]);
|
|
62
|
-
}, w = (t, n) => Object.entries(n).reduce((r, [s, o]) => o == null ? r : r.replace(
|
|
63
|
-
`{${s}}`,
|
|
64
|
-
encodeURIComponent(o.toString())
|
|
65
|
-
), t), x = (t, n) => {
|
|
66
|
-
let r = t;
|
|
67
|
-
return Object.entries(n).forEach(([s, o]) => {
|
|
68
|
-
o && (r = r.replace(`{${s}}`, o));
|
|
69
|
-
}), r;
|
|
70
|
-
}, O = (t, n) => t.replace(/\/$/, "") + "/" + n.replace(/^\//, ""), A = (t, n) => Object.keys(t).some((r) => r.toLowerCase() === "content-type") ? t : {
|
|
71
|
-
...t,
|
|
72
|
-
"content-type": n
|
|
73
|
-
}, C = async (t) => {
|
|
74
|
-
const n = await import("axios").then((e) => e.default), r = Object.keys(t.header).find(
|
|
75
|
-
(e) => e.toLowerCase() === "content-type"
|
|
76
|
-
);
|
|
77
|
-
let s = t.body, o = t.header;
|
|
78
|
-
if (r != null && r.includes("multipart/form-data")) {
|
|
79
|
-
const { data: e, headers: a } = E(t);
|
|
80
|
-
s = e, o = a;
|
|
81
|
-
}
|
|
82
|
-
return n({
|
|
83
|
-
url: t.url,
|
|
84
|
-
method: t.method,
|
|
85
|
-
params: t.query,
|
|
86
|
-
data: s,
|
|
87
|
-
headers: o,
|
|
88
|
-
// prevent axios from adding [] after array query params
|
|
89
|
-
paramsSerializer: {
|
|
90
|
-
indexes: null
|
|
91
|
-
},
|
|
92
|
-
responseType: "arraybuffer",
|
|
93
|
-
// prevent axios from erroring on bad status codes
|
|
94
|
-
validateStatus: () => !0,
|
|
95
|
-
// prevent axios from parsing json, losing whitespace information, and using default utf-8 encoding
|
|
96
|
-
// we can't use `responseEncoding` as it's ignored client-side
|
|
97
|
-
transformResponse: (e) => Buffer.from(e).toString("base64")
|
|
98
|
-
});
|
|
99
|
-
}, D = async (t) => {
|
|
100
|
-
const n = await import("axios").then((o) => o.default), r = new FormData();
|
|
101
|
-
r.append(
|
|
102
|
-
"requestInfo",
|
|
103
|
-
JSON.stringify({
|
|
104
|
-
method: t.method,
|
|
105
|
-
url: t.url,
|
|
106
|
-
header: t.header,
|
|
107
|
-
query: t.query,
|
|
108
|
-
cookie: t.cookie
|
|
109
|
-
})
|
|
110
|
-
), typeof t.body == "object" && t.body !== null && Object.entries(t.body).forEach(([o, e]) => {
|
|
111
|
-
e instanceof File ? r.append(o, e) : Array.isArray(e) ? e.forEach((a) => {
|
|
112
|
-
a instanceof File ? r.append(o, a) : a != null && r.append(
|
|
113
|
-
o,
|
|
114
|
-
typeof a == "object" ? JSON.stringify(a) : a.toString()
|
|
115
|
-
);
|
|
116
|
-
}) : e != null && r.append(
|
|
117
|
-
o,
|
|
118
|
-
typeof e == "object" ? JSON.stringify(e) : e.toString()
|
|
119
|
-
);
|
|
120
|
-
});
|
|
121
|
-
const { data: s } = await n.post(`${l.BASE_PATH}/_mintlify/api/file-request`, r);
|
|
122
|
-
return s;
|
|
123
|
-
}, E = (t) => {
|
|
124
|
-
var s;
|
|
125
|
-
let n = t.body;
|
|
126
|
-
const r = t.header;
|
|
127
|
-
if ((s = r["content-type"]) != null && s.includes("multipart/form-data")) {
|
|
128
|
-
const o = new FormData();
|
|
129
|
-
typeof n == "object" && n !== null && (Object.entries(n).forEach(([e, a]) => {
|
|
130
|
-
a instanceof File ? o.append(e, a) : Array.isArray(a) ? a.forEach((d) => {
|
|
131
|
-
d instanceof File ? o.append(e, d) : d != null && o.append(
|
|
132
|
-
e,
|
|
133
|
-
typeof d == "object" ? JSON.stringify(d) : d.toString()
|
|
134
|
-
);
|
|
135
|
-
}) : a != null && o.append(
|
|
136
|
-
e,
|
|
137
|
-
typeof a == "object" ? JSON.stringify(a) : a.toString()
|
|
138
|
-
);
|
|
139
|
-
}), n = o, delete r["content-type"]);
|
|
140
|
-
}
|
|
141
|
-
return { data: n, headers: r };
|
|
142
|
-
};
|
|
1
|
+
import "react";
|
|
2
|
+
import "../env.js";
|
|
3
|
+
const i = (r, t) => Object.entries(t).reduce((e, [o, n]) => n == null ? e : e.replace(
|
|
4
|
+
`{${o}}`,
|
|
5
|
+
encodeURIComponent(n.toString())
|
|
6
|
+
), r), l = (r, t) => {
|
|
7
|
+
let e = r;
|
|
8
|
+
return Object.entries(t).forEach(([o, n]) => {
|
|
9
|
+
n && (e = e.replace(`{${o}}`, n));
|
|
10
|
+
}), e;
|
|
11
|
+
}, s = (r, t) => r.replace(/\/$/, "") + "/" + t.replace(/^\//, "");
|
|
143
12
|
export {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
_ as useSendPlaygroundRequest
|
|
13
|
+
i as addPathParams,
|
|
14
|
+
l as addServerVariables,
|
|
15
|
+
s as joinWithSingleSlash
|
|
148
16
|
};
|