@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.
Files changed (169) hide show
  1. package/dist/api-playground/ApiPlayground/Response/DownloadFileButton.js +6 -5
  2. package/dist/api-playground/ApiPlayground/Response/ResponseBody/CodeResponseContent.js +13 -12
  3. package/dist/api-playground/ApiPlayground/Response/ResponsePlaceholder.js +8 -7
  4. package/dist/api-playground/ApiPlayground/Response/ResponseTable.js +3 -2
  5. package/dist/api-playground/ApiPlayground/Response/ResponseTopbar.js +9 -8
  6. package/dist/api-playground/ApiPlayground/Response/index.js +4 -3
  7. package/dist/api-playground/ApiPlayground/components/AdditionalPropertyButton.js +42 -21
  8. package/dist/api-playground/ApiPlayground/components/ParamFieldWrapper.js +13 -9
  9. package/dist/api-playground/ApiPlayground/components/PlaygroundModalWrapper.js +7 -6
  10. package/dist/api-playground/ApiPlayground/components/SendPill.js +3 -2
  11. package/dist/api-playground/ApiPlayground/components/TypeDropdown.js +6 -5
  12. package/dist/api-playground/EndpointFields/ParamFields/ExampleDescription.js +3 -2
  13. package/dist/api-playground/EndpointFields/components/Description.js +6 -5
  14. package/dist/api-playground/EndpointFields/components/OptionDropdown.js +9 -8
  15. package/dist/api-playground/EndpointFields/components/SectionHeading.js +8 -7
  16. package/dist/api-playground-2/ApiExamples.js +19 -20
  17. package/dist/api-playground-2/ApiFields.js +20 -247
  18. package/dist/api-playground-2/EndpointHeader.js +59 -47
  19. package/dist/api-playground-2/OperationPage.js +70 -67
  20. package/dist/api-playground-2/Playground.js +67 -83
  21. package/dist/api-playground-2/SchemaPage.js +22 -9
  22. package/dist/api-playground-2/components/EndpointFields/Body.js +40 -0
  23. package/dist/api-playground-2/components/EndpointFields/Parameters.js +90 -0
  24. package/dist/api-playground-2/components/EndpointFields/Response.js +146 -0
  25. package/dist/api-playground-2/components/EndpointFields/Security.js +88 -0
  26. package/dist/api-playground-2/components/EndpointFields/fields/ArrayParamField.js +93 -0
  27. package/dist/api-playground-2/components/EndpointFields/fields/Enum.js +29 -11
  28. package/dist/api-playground-2/components/EndpointFields/fields/ObjectParamField.js +145 -0
  29. package/dist/api-playground-2/components/EndpointFields/fields/PrimitiveParamField.js +60 -48
  30. package/dist/api-playground-2/components/EndpointFields/fields/SchemaField.js +230 -0
  31. package/dist/api-playground-2/components/Example/GeneratedRequestExample.js +93 -89
  32. package/dist/api-playground-2/components/Example/GeneratedResponseExample.js +18 -17
  33. package/dist/api-playground-2/components/Example/RequestExample.js +92 -93
  34. package/dist/api-playground-2/components/Example/ResponseExample.js +19 -15
  35. package/dist/api-playground-2/components/Request/ParameterSection.js +20 -18
  36. package/dist/api-playground-2/components/Request/SecuritySection.js +53 -43
  37. package/dist/api-playground-2/components/Request/inputs/ArrayInput.js +89 -40
  38. package/dist/api-playground-2/components/Request/inputs/DifferentiatedInput.js +12 -12
  39. package/dist/api-playground-2/components/Request/inputs/FileInput.js +16 -15
  40. package/dist/api-playground-2/components/Request/inputs/InputContainer.js +76 -57
  41. package/dist/api-playground-2/components/Request/inputs/NumberInput.js +10 -9
  42. package/dist/api-playground-2/components/Request/inputs/ObjectInput.js +98 -80
  43. package/dist/api-playground-2/components/Request/inputs/OneOfInput.js +55 -47
  44. package/dist/api-playground-2/components/Request/inputs/SelectInput.js +18 -17
  45. package/dist/api-playground-2/components/Request/inputs/StringInput.js +19 -18
  46. package/dist/api-playground-2/components/Request/inputs/TextInput.js +12 -11
  47. package/dist/api-playground-2/components/SendPillWrapper.js +35 -0
  48. package/dist/api-playground-2/contexts/ApiPlaygroundContext.js +3 -5
  49. package/dist/api-playground-2/generators/createCookies.js +23 -0
  50. package/dist/api-playground-2/generators/createHeaders.js +53 -36
  51. package/dist/api-playground-2/generators/createQueryString.js +30 -0
  52. package/dist/api-playground-2/generators/generateAuthPlaceholder.js +14 -0
  53. package/dist/api-playground-2/generators/generateInteractiveCodeSample.js +27 -25
  54. package/dist/api-playground-2/generators/generateRequest.js +47 -51
  55. package/dist/api-playground-2/generators/generateResponseExampleMap.js +15 -11
  56. package/dist/api-playground-2/generators/generateSnippetMap.js +13 -11
  57. package/dist/api-playground-2/hooks/useCopyPathWithInputs.js +11 -11
  58. package/dist/api-playground-2/hooks/useInitializeInputs.js +185 -88
  59. package/dist/api-playground-2/hooks/usePlaygroundInputsStore.js +70 -25
  60. package/dist/api-playground-2/hooks/useSelectedBaseUrl.js +13 -0
  61. package/dist/api-playground-2/hooks/useSelectedExample.js +10 -0
  62. package/dist/api-playground-2/hooks/useSelectedRequestBodyContentType.js +12 -0
  63. package/dist/api-playground-2/hooks/useSelectedResponseContentType.js +12 -0
  64. package/dist/api-playground-2/hooks/useSelectedSecurityOption.js +31 -0
  65. package/dist/api-playground-2/hooks/useSendPlaygroundRequest.js +114 -101
  66. package/dist/api-playground-2/schemaGraph/addApiReferenceDataFromMdxAndDocsConfig.js +23 -32
  67. package/dist/api-playground-2/schemaGraph/addTypeLabelsToSchema.js +50 -0
  68. package/dist/api-playground-2/schemaGraph/addUniqueKeysToSchema.js +40 -24
  69. package/dist/api-playground-2/schemaGraph/getExampleBodyInputs.js +94 -0
  70. package/dist/api-playground-2/schemaGraph/getSchemaGraphOperationData.js +56 -50
  71. package/dist/api-playground-2/schemaGraph/processExamples.js +117 -52
  72. package/dist/api-playground-2/schemaGraph/processSchema.js +10 -0
  73. package/dist/api-playground-2/schemaGraph/processSecurityOptions.js +58 -28
  74. package/dist/api-playground-2/schemaGraph/reduceCompositions.js +220 -181
  75. package/dist/api-playground-2/schemaGraph/resolveOperationWithDependencies.js +128 -89
  76. package/dist/api-playground-2/schemaGraph/resolveSchemaWithDependencies.js +15 -16
  77. package/dist/api-playground-2/schemaGraph/sortSchemaByRequired.js +14 -12
  78. package/dist/api-playground-2/schemaGraph/utils.js +185 -147
  79. package/dist/common/guards.js +11 -19
  80. package/dist/components/Api/Expandable.js +10 -9
  81. package/dist/components/Api/Param.js +11 -13
  82. package/dist/components/Api/dropdown-menu.js +10 -9
  83. package/dist/components/apiPage.js +125 -0
  84. package/dist/components/content-components/code-group.js +4 -4
  85. package/dist/components/docsPage.js +54 -56
  86. package/dist/contexts/EndpointLocationContext.js +3 -3
  87. package/dist/hooks/useApiParamFieldOption.js +10 -0
  88. package/dist/hooks/useEndpoint.js +3 -3
  89. package/dist/hooks/useKeyboardShortcut.js +13 -13
  90. package/dist/hooks/useSendPlaygroundRequest.js +14 -146
  91. package/dist/index.d.ts +80 -60
  92. package/dist/index.js +99 -101
  93. package/dist/openapi/generateTypeStringFromSchema.js +2 -31
  94. package/dist/plugins/sanitize/rehype-pre-to-mdx-fence.js +13 -13
  95. package/dist/styles.css +1 -1
  96. package/package.json +1 -1
  97. package/dist/api-playground/ApiPlayground/Request/BodySection.js +0 -64
  98. package/dist/api-playground/ApiPlayground/Request/ParameterSection.js +0 -32
  99. package/dist/api-playground/ApiPlayground/Request/PlaygroundModal.js +0 -201
  100. package/dist/api-playground/ApiPlayground/Request/SecuritySection.js +0 -146
  101. package/dist/api-playground/ApiPlayground/Request/ServerSection.js +0 -30
  102. package/dist/api-playground/ApiPlayground/Request/index.js +0 -43
  103. package/dist/api-playground/ApiPlayground/Request/inputs/ArrayInput.js +0 -93
  104. package/dist/api-playground/ApiPlayground/Request/inputs/DifferentiatedInput.js +0 -90
  105. package/dist/api-playground/ApiPlayground/Request/inputs/FileInput.js +0 -62
  106. package/dist/api-playground/ApiPlayground/Request/inputs/NullInput.js +0 -33
  107. package/dist/api-playground/ApiPlayground/Request/inputs/NumberInput.js +0 -61
  108. package/dist/api-playground/ApiPlayground/Request/inputs/ObjectChildren.js +0 -109
  109. package/dist/api-playground/ApiPlayground/Request/inputs/ObjectInput.js +0 -87
  110. package/dist/api-playground/ApiPlayground/Request/inputs/RecursiveInput.js +0 -61
  111. package/dist/api-playground/ApiPlayground/Request/inputs/SelectInput.js +0 -54
  112. package/dist/api-playground/ApiPlayground/Request/inputs/StringInput.js +0 -67
  113. package/dist/api-playground/ApiPlayground/Request/inputs/TextInput.js +0 -44
  114. package/dist/api-playground/ApiPlayground/components/EndpointsMenu.js +0 -42
  115. package/dist/api-playground/ApiPlayground/components/EndpointsMenuLink.js +0 -43
  116. package/dist/api-playground/ApiPlayground/components/EndpointsMenuSearch.js +0 -38
  117. package/dist/api-playground/ApiPlayground/components/InputContainer.js +0 -128
  118. package/dist/api-playground/ApiPlayground/components/InputSectionContainer.js +0 -59
  119. package/dist/api-playground/ApiPlayground/components/PathHeader.js +0 -162
  120. package/dist/api-playground/ApiPlayground/components/TrashButton.js +0 -26
  121. package/dist/api-playground/ApiPlayground/index.js +0 -67
  122. package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/Enum.js +0 -19
  123. package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/NumberMetadata.js +0 -18
  124. package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/StringMetadata.js +0 -28
  125. package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/index.js +0 -5
  126. package/dist/api-playground/EndpointFields/ParamFields/RecursiveParamField.js +0 -13
  127. package/dist/api-playground/EndpointFields/index.js +0 -7
  128. package/dist/api-playground-2/components/EndpointFields/EndpointSecurity.js +0 -87
  129. package/dist/api-playground-2/components/EndpointFields/fields/SimpleArrayParamField.js +0 -89
  130. package/dist/api-playground-2/components/EndpointFields/fields/SimpleObjectParamField.js +0 -121
  131. package/dist/api-playground-2/components/EndpointFields/fields/SimplePrimitiveParamField.js +0 -74
  132. package/dist/api-playground-2/components/EndpointFields/fields/SimpleSchemaField.js +0 -252
  133. package/dist/common/potentiallyParseOpenApiString.js +0 -24
  134. package/dist/common/replaceSlashIndex.js +0 -6
  135. package/dist/common/slugToTitle.js +0 -10
  136. package/dist/constants/prism-languages.js +0 -19
  137. package/dist/contexts/ApiPlaygroundInputsContext.js +0 -17
  138. package/dist/contexts/MDXContentContext.js +0 -17
  139. package/dist/hooks/useApiPlaygroundInputs.js +0 -6
  140. package/dist/hooks/useApiPlaygroundPrefillExamples.js +0 -39
  141. package/dist/hooks/useBaseUrlOptions.js +0 -18
  142. package/dist/hooks/useComponentSchemas.js +0 -9
  143. package/dist/hooks/useGenerateNextAdditionalProperties.js +0 -11
  144. package/dist/hooks/useGenerateNextItems.js +0 -11
  145. package/dist/hooks/useGenerateNextProperties.js +0 -11
  146. package/dist/hooks/useMDXContent.js +0 -6
  147. package/dist/hooks/useMDXContentController/useApiPlaygroundInputs.js +0 -9
  148. package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiBaseIndexCallback.js +0 -15
  149. package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiPlaygroundInputsCallback.js +0 -15
  150. package/dist/hooks/usePlaygroundSchemaOptions.js +0 -42
  151. package/dist/hooks/usePrefilledInputs/index.js +0 -65
  152. package/dist/hooks/usePrefilledInputs/storedServerVariables.js +0 -29
  153. package/dist/hooks/useSecurityOption.js +0 -10
  154. package/dist/hooks/useSetDefaultValue.js +0 -63
  155. package/dist/openapi/filterEnums.js +0 -20
  156. package/dist/openapi/generateNextAdditionalProperties.js +0 -7
  157. package/dist/openapi/generateNextItems.js +0 -7
  158. package/dist/openapi/generateNextProperties.js +0 -23
  159. package/dist/openapi/generateOptionLabels.js +0 -20
  160. package/dist/openapi/generateSimpleLabels.js +0 -4
  161. package/dist/openapi/getAuthFilteredSchemaArray.js +0 -18
  162. package/dist/paths/isEqualIgnoringLeadingSlash.js +0 -21
  163. package/dist/paths/optionallyRemoveLeadingSlash.js +0 -6
  164. package/dist/paths/optionallyRemoveTrailingSlash.js +0 -6
  165. package/dist/utils/api-playground/defaults.js +0 -15
  166. package/dist/utils/api-playground/paramFieldDefaults.js +0 -10
  167. package/dist/utils/api-reference/getFilteredSecurityOptions.js +0 -4
  168. package/dist/utils/api-reference/getNextPropertiesByType.js +0 -5
  169. package/dist/utils/flattenObject.js +0 -10
@@ -1,15 +1,16 @@
1
- import { jsx as m, jsxs as r } from "react/jsx-runtime";
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 I = t.Trigger, u = o.forwardRef(({ className: n, inset: e, children: i, ...a }, s) => /* @__PURE__ */ r(
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: s,
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 }, s) => /* @__PURE__ */ m(
52
+ const w = o.forwardRef(({ className: n, inset: e, isSelected: i, ...a }, r) => /* @__PURE__ */ m(
52
53
  t.Item,
53
54
  {
54
- ref: s,
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 }, s) => /* @__PURE__ */ r(
66
+ const h = o.forwardRef(({ className: n, children: e, checked: i, ...a }, r) => /* @__PURE__ */ s(
66
67
  t.CheckboxItem,
67
68
  {
68
- ref: s,
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__ */ r(
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
- I as DropdownMenuTrigger
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 K = y(function({ children: r, onChange: a, className: o, dropdown: l, noMargins: h, ...T }, C) {
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 Q({ text: b }) {
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
- Q as CodeBlockTooltip,
148
- K as CodeGroup
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 S } from "@fluentui/react-icons";
3
- import { useEffect as j } from "react";
4
- import { ApiExamples as B } from "../api-playground-2/ApiExamples.js";
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 d } from "../utils/cn.js";
8
- import { MDXRenderer as H } from "./mdx-renderer.js";
9
- import { PageContextMenu as R } from "./page-context-menu.js";
10
- import { TableOfContents as V } from "./toc/index.js";
11
- import { PivotAwareTOC as G } from "./toc/pivot-aware-toc.js";
12
- import { ZonePivotProvider as Z } from "./content-components/zone-pivots/zone-pivot-context.js";
13
- import { ZonePivotSelector as _ } from "./content-components/zone-pivots/zone-pivot-selector.js";
14
- function at({
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: W,
18
- activeHref: X,
19
- theme: p,
20
- className: x = "",
21
- pathname: s,
22
- markdownContent: w,
23
- allPages: v,
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: q,
26
- LinkComponent: k,
27
- localization: N,
28
- telemetry: J,
29
- contextMenu: n,
30
- apiReferenceData2: l
24
+ bottomLinks: _,
25
+ LinkComponent: v,
26
+ localization: k,
27
+ telemetry: W,
28
+ contextMenu: n
31
29
  }) {
32
- var f, h;
33
- const T = i.serializedContent, a = ((f = i.mdxExtracts) == null ? void 0 : f.zonePivotGroups) || [], c = (h = i.mdxExtracts) == null ? void 0 : h.pivotTocItems, P = !i.title, C = { ...{
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
- }, ...N };
41
- return j(() => {
38
+ }, ...k };
39
+ return O(() => {
42
40
  const { hash: m } = window.location;
43
41
  if (!m) return;
44
- const y = setTimeout(() => {
45
- const E = m.substring(1), r = document.getElementById("main-content"), g = document.getElementById(E);
46
- if (r && g) {
47
- const b = window.getComputedStyle(document.documentElement), z = parseFloat(b.getPropertyValue("--scroll-mt") || "0"), F = parseFloat(b.fontSize), I = z * F, L = r.getBoundingClientRect(), O = g.getBoundingClientRect().top - L.top + r.scrollTop - I;
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: O,
47
+ top: I,
50
48
  behavior: "instant"
51
49
  });
52
50
  }
53
51
  }, 100);
54
- return () => clearTimeout(y);
55
- }, [s]), /* @__PURE__ */ t(A, { LinkComponent: k, children: /* @__PURE__ */ t(
52
+ return () => clearTimeout(C);
53
+ }, [l]), /* @__PURE__ */ t(S, { LinkComponent: v, children: /* @__PURE__ */ t(
56
54
  "div",
57
55
  {
58
- className: d(
56
+ className: c(
59
57
  "mintlify-docs",
60
- p === "dark" && "dark",
61
- x,
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: d(
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(Z, { groups: a, children: /* @__PURE__ */ e(
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
- 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(B, { apiReferenceData: l }) }) : 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: [
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(S, { className: "mint:w-4 mint:h-4 mint:text-[#4b5563] mint:dark:text-[#adadad]" }),
90
- /* @__PURE__ */ t("h2", { className: "mint:text-sm mint:font-semibold mint:text-[#141414] mint:dark:text-white", children: C.onThisPage })
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
- c && Object.keys(c).length > 0 ? /* @__PURE__ */ t(G, { baseToc: o, pivotTocItems: c }) : /* @__PURE__ */ t(V, { toc: o })
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: d(
95
+ className: c(
98
96
  "mint:w-full mint:overflow-x-visible mint:max-w-[730px]",
99
- P && "mint:max-w-none!"
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
- s && /* @__PURE__ */ t(
108
- R,
105
+ l && /* @__PURE__ */ t(
106
+ B,
109
107
  {
110
108
  className: "mint:shrink-0",
111
- pathname: s,
112
- markdownContent: w,
113
- allPages: v,
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
- a.length > 0 && /* @__PURE__ */ t("div", { className: "mint:mb-6 mint:flex mint:flex-wrap mint:gap-4", children: a.map((m) => /* @__PURE__ */ t(
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(H, { children: /* @__PURE__ */ t(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
- at as DocsPage
143
+ rt as DocsPage
146
144
  };
@@ -1,12 +1,12 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { useRef as c, createContext as s, useContext as a } from "react";
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 = s({}), u = () => a(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 = c(!1), r = p();
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 { useContext as n, useMemo as t } from "react";
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
- } = n(o);
6
+ } = t(o);
7
7
  return e;
8
8
  }, s = () => {
9
9
  const e = p();
10
- return t(() => e, [e]);
10
+ return n(() => e, [e]);
11
11
  };
12
12
  export {
13
13
  s as useEndpoint,
@@ -1,25 +1,25 @@
1
- import { useCallback as p, useEffect as w } from "react";
2
- const d = ({
3
- key: y,
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: u,
7
- excludedActiveElements: f,
6
+ excludedActiveElementId: t,
7
+ excludedActiveElements: u,
8
8
  isDisabled: i
9
9
  }) => {
10
- const n = p(
11
- (s) => {
10
+ const f = w(
11
+ (p) => {
12
12
  if (i) return;
13
- let t = !1;
13
+ let s = !1;
14
14
  const o = document.activeElement;
15
- u && (t = !!(o != null && o.id) && u.includes(o.id)), f && !t && (t = f.includes(
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
- )), s.key === y && (h || s.metaKey || s.ctrlKey) && !t && (s.preventDefault(), r == null || r());
17
+ )), p.key === n && h && !s && (p.preventDefault(), r == null || r());
18
18
  },
19
- [r, y, h, u, f, i]
19
+ [r, n, h, t, u, i]
20
20
  );
21
- w(() => (addEventListener("keydown", n), () => removeEventListener("keydown", n)), [n]);
21
+ y(() => (addEventListener("keydown", f), () => removeEventListener("keydown", f)), [f]);
22
22
  };
23
23
  export {
24
- d as useKeyboardShortcut
24
+ C as useKeyboardShortcut
25
25
  };
@@ -1,148 +1,16 @@
1
- import { useContext as b, useCallback as S } from "react";
2
- import { DocsConfigContext as g } from "../contexts/ConfigContext.js";
3
- import { NEXT_PUBLIC as l } from "../env.js";
4
- import { useApiPlaygroundInputs as j } from "./useMDXContentController/useApiPlaygroundInputs.js";
5
- const _ = ({
6
- endpoint: t,
7
- baseUrl: n,
8
- contentType: r,
9
- setResult: s,
10
- setIsFetching: o
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
- w as addPathParams,
145
- x as addServerVariables,
146
- O as joinWithSingleSlash,
147
- _ as useSendPlaygroundRequest
13
+ i as addPathParams,
14
+ l as addServerVariables,
15
+ s as joinWithSingleSlash
148
16
  };