@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.
@@ -1,62 +1,67 @@
1
- import { jsx as t, jsxs as e } from "react/jsx-runtime";
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";
1
+ import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
+ import { TextAlignLeftFilled as O } from "@fluentui/react-icons";
3
+ import { useEffect as S } from "react";
4
+ import { ComponentsProvider as j } from "../context/components-context.js";
5
5
  /* empty css */
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";
6
+ import { cn as d } from "../utils/cn.js";
7
+ import { MDXRenderer as A } from "./mdx-renderer.js";
8
+ import { PageContextMenu as G } from "./page-context-menu.js";
9
9
  import { TableOfContents as H } from "./toc/index.js";
10
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({
11
+ import { ApiExamples as U } from "../api-playground-2/ApiExamples.js";
12
+ import { ApiReferenceProvider2 as Z } from "../contexts/ConfigContext.js";
13
+ import { ZonePivotProvider as _ } from "./content-components/zone-pivots/zone-pivot-context.js";
14
+ import { ZonePivotSelector as M } from "./content-components/zone-pivots/zone-pivot-selector.js";
15
+ function dt({
14
16
  payload: i,
15
- toc: o,
16
- navTree: G,
17
- activeHref: Z,
18
- theme: b,
19
- className: p = "",
20
- pathname: l,
21
- markdownContent: x,
22
- allPages: w,
17
+ toc: r,
18
+ navTree: W,
19
+ activeHref: X,
20
+ theme: p,
21
+ className: x = "",
22
+ pathname: s,
23
+ markdownContent: w,
24
+ allPages: v,
23
25
  baseUrl: u,
24
- bottomLinks: _,
25
- LinkComponent: v,
26
- localization: k,
27
- telemetry: W,
28
- contextMenu: n
26
+ bottomLinks: q,
27
+ LinkComponent: k,
28
+ localization: N,
29
+ telemetry: J,
30
+ contextMenu: e,
31
+ apiReferenceData: n
29
32
  }) {
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 = { ...{
33
+ var h, f;
34
+ const T = i.serializedContent, c = ((h = i.mdxExtracts) == null ? void 0 : h.zonePivotGroups) || [], a = (f = i.mdxExtracts) == null ? void 0 : f.pivotTocItems, P = !i.title;
35
+ console.log("[DEBUG] DocsPage - apiReferenceData from props:", n), console.log("[DEBUG] DocsPage - Has operation:", !!(n != null && n.operation));
36
+ const C = { ...{
32
37
  onThisPage: "On this page",
33
38
  loading: "Loading...",
34
39
  errorTitle: "Error",
35
40
  errorMessage: "Something went wrong",
36
41
  notFoundTitle: "Page not found",
37
42
  notFoundMessage: "The page you're looking for doesn't exist"
38
- }, ...k };
39
- return O(() => {
43
+ }, ...N };
44
+ return S(() => {
40
45
  const { hash: m } = window.location;
41
46
  if (!m) return;
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;
46
- r.scrollTo({
47
- top: I,
47
+ const E = setTimeout(() => {
48
+ const y = m.substring(1), l = document.getElementById("main-content"), g = document.getElementById(y);
49
+ if (l && g) {
50
+ const b = window.getComputedStyle(document.documentElement), z = parseFloat(b.getPropertyValue("--scroll-mt") || "0"), I = parseFloat(b.fontSize), B = z * I, F = l.getBoundingClientRect(), L = g.getBoundingClientRect().top - F.top + l.scrollTop - B;
51
+ l.scrollTo({
52
+ top: L,
48
53
  behavior: "instant"
49
54
  });
50
55
  }
51
56
  }, 100);
52
- return () => clearTimeout(C);
53
- }, [l]), /* @__PURE__ */ t(S, { LinkComponent: v, children: /* @__PURE__ */ t(
57
+ return () => clearTimeout(E);
58
+ }, [s]), /* @__PURE__ */ t(j, { LinkComponent: k, children: /* @__PURE__ */ t(
54
59
  "div",
55
60
  {
56
- className: c(
61
+ className: d(
57
62
  "mintlify-docs",
58
- b === "dark" && "dark",
59
- p,
63
+ p === "dark" && "dark",
64
+ x,
60
65
  "mint:flex mint:flex-col mint:flex-1 mint:min-h-0 mint:h-full mint:overflow-hidden"
61
66
  ),
62
67
  children: /* @__PURE__ */ t(
@@ -73,57 +78,66 @@ function rt({
73
78
  "div",
74
79
  {
75
80
  id: "main-content",
76
- className: c(
81
+ className: d(
77
82
  "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"
78
83
  ),
79
- children: /* @__PURE__ */ t(A, { groups: s, children: /* @__PURE__ */ e(
84
+ children: /* @__PURE__ */ t(_, { groups: c, children: /* @__PURE__ */ o(
80
85
  "div",
81
86
  {
82
87
  className: "mint:flex mint:flex-row-reverse mint:gap-12 mint:justify-center mint:mx-auto mint:w-full",
83
88
  id: "content-layout-container",
84
89
  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: [
86
- /* @__PURE__ */ e("div", { className: "mint:flex mint:items-center mint:gap-2 mint:mb-4", 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 })
90
+ n != null && n.operation ? /* @__PURE__ */ t("aside", { className: "mint:w-[448px] mint:shrink-0 mint:ml-8 mint:hidden mint:lg:block", children: /* @__PURE__ */ t("div", { className: "mint:sticky mint:top-4 mint:flex mint:flex-col mint:gap-6", children: /* @__PURE__ */ t(
91
+ Z,
92
+ {
93
+ pageMetadata: { title: i.title, description: i.description },
94
+ docsConfig: void 0,
95
+ mdxExtracts: void 0,
96
+ apiReferenceData2: n,
97
+ children: /* @__PURE__ */ t(U, { noInputs: !0 })
98
+ }
99
+ ) }) }) : r && r.length > 0 ? /* @__PURE__ */ t("aside", { className: "mint:w-68 mint:shrink-0 mint:ml-8 mint:max-xl:hidden mint:xl:block", children: /* @__PURE__ */ o("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: [
100
+ /* @__PURE__ */ o("div", { className: "mint:flex mint:items-center mint:gap-2 mint:mb-4", children: [
101
+ /* @__PURE__ */ t(O, { className: "mint:w-4 mint:h-4 mint:text-[#4b5563] mint:dark:text-[#adadad]" }),
102
+ /* @__PURE__ */ t("h2", { className: "mint:text-sm mint:font-semibold mint:text-[#141414] mint:dark:text-white", children: C.onThisPage })
89
103
  ] }),
90
- a && Object.keys(a).length > 0 ? /* @__PURE__ */ t(V, { baseToc: o, pivotTocItems: a }) : /* @__PURE__ */ t(H, { toc: o })
104
+ a && Object.keys(a).length > 0 ? /* @__PURE__ */ t(V, { baseToc: r, pivotTocItems: a }) : /* @__PURE__ */ t(H, { toc: r })
91
105
  ] }) }) : null,
92
- /* @__PURE__ */ e(
106
+ /* @__PURE__ */ o(
93
107
  "div",
94
108
  {
95
- className: c(
109
+ className: d(
96
110
  "mint:w-full mint:overflow-x-visible mint:max-w-[730px]",
97
- T && "mint:max-w-none!"
111
+ P && "mint:max-w-none!"
98
112
  ),
99
113
  children: [
100
- i.title && /* @__PURE__ */ t("header", { className: "mint:mb-6", children: /* @__PURE__ */ e("div", { className: "mint:flex mint:flex-col mint:gap-5", children: [
101
- /* @__PURE__ */ e("div", { className: "mint:flex mint:flex-col mint:gap-2 mint:items-start", children: [
114
+ i.title && /* @__PURE__ */ t("header", { className: "mint:mb-6", children: /* @__PURE__ */ o("div", { className: "mint:flex mint:flex-col mint:gap-5", children: [
115
+ /* @__PURE__ */ o("div", { className: "mint:flex mint:flex-col mint:gap-2 mint:items-start", children: [
102
116
  /* @__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 }),
103
117
  i.description && /* @__PURE__ */ t("p", { className: "mint:text-lg mint:text-[#4b5563] mint:dark:text-[#d1d5db] mint:m-0", children: i.description })
104
118
  ] }),
105
- l && /* @__PURE__ */ t(
106
- B,
119
+ s && /* @__PURE__ */ t(
120
+ G,
107
121
  {
108
122
  className: "mint:shrink-0",
109
- pathname: l,
110
- markdownContent: x,
111
- allPages: w,
123
+ pathname: s,
124
+ markdownContent: w,
125
+ allPages: v,
112
126
  baseUrl: u,
113
- onCopyMarkdown: n == null ? void 0 : n.onCopyMarkdown,
114
- onViewMarkdown: n == null ? void 0 : n.onViewMarkdown
127
+ onCopyMarkdown: e == null ? void 0 : e.onCopyMarkdown,
128
+ onViewMarkdown: e == null ? void 0 : e.onViewMarkdown
115
129
  }
116
130
  )
117
131
  ] }) }),
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,
132
+ c.length > 0 && /* @__PURE__ */ t("div", { className: "mint:mb-6 mint:flex mint:flex-wrap mint:gap-4", children: c.map((m) => /* @__PURE__ */ t(
133
+ M,
120
134
  {
121
135
  group: m,
122
136
  className: "mint:flex mint:items-center mint:gap-2 mint:text-sm"
123
137
  },
124
138
  m.id
125
139
  )) }),
126
- /* @__PURE__ */ t("div", { className: "mint:pt-4", children: /* @__PURE__ */ t(j, { children: /* @__PURE__ */ t(N, {}) }) })
140
+ /* @__PURE__ */ t("div", { className: "mint:pt-4", children: /* @__PURE__ */ t(A, { children: /* @__PURE__ */ t(T, {}) }) })
127
141
  ]
128
142
  }
129
143
  )
@@ -140,5 +154,5 @@ function rt({
140
154
  ) });
141
155
  }
142
156
  export {
143
- rt as DocsPage
157
+ dt as DocsPage
144
158
  };
@@ -135,12 +135,12 @@ function $({ item: e, activeId: g, level: u = 0, activeHref: c }) {
135
135
  href: e.href,
136
136
  "aria-current": l ? "page" : void 0,
137
137
  className: h(
138
- "mint:relative mint:flex mint:items-center mint:gap-2 mint:py-1 mint:px-3 mint:text-[14px] mint:font-normal mint:rounded-lg mint:no-underline mint:text-[#707070] mint:dark:text-[#999999] mint:focus-visible:outline-2 mint:focus-visible:outline-[#643fb2] mint:focus-visible:outline-offset-2 mint:[&_span]:flex-1 mint:leading-[1.375rem]",
138
+ "mint:relative mint:flex mint:items-center mint:gap-2 mint:py-1 mint:px-3 mint:text-[14px] mint:font-normal mint:rounded-lg mint:no-underline mint:text-[#707070] mint:dark:text-[#999999] mint:focus-visible:outline-2 mint:focus-visible:outline-[#643fb2] mint:focus-visible:outline-offset-2 mint:leading-[1.375rem]",
139
139
  l ? S : "mint:hover:bg-[rgba(0,0,0,0.06)] mint:hover:text-[#242424] mint:dark:hover:bg-[rgba(128,128,128,0.05)] mint:dark:hover:text-[#ffffff]"
140
140
  ),
141
141
  children: [
142
142
  e.method && /* @__PURE__ */ i(j, { isActive: !!l, method: e.method, shortMethod: !0 }),
143
- e.toc_title
143
+ /* @__PURE__ */ i("span", { className: "mint:flex-1", children: e.toc_title })
144
144
  ]
145
145
  }
146
146
  ) });
@@ -1,11 +1,12 @@
1
- const c = {
1
+ const o = {
2
2
  curl: "bash",
3
3
  golang: "go",
4
4
  js: "javascript",
5
5
  sh: "bash",
6
6
  ts: "typescript",
7
- rb: "ruby"
8
- }, g = {
7
+ rb: "ruby",
8
+ java: "java"
9
+ }, c = {
9
10
  bash: "cURL",
10
11
  c: "C",
11
12
  "c#": "C#",
@@ -13,79 +14,69 @@ const c = {
13
14
  go: "Go",
14
15
  java: "Java",
15
16
  javascript: "JavaScript",
16
- php: "PHP",
17
17
  python: "Python",
18
18
  typescript: "TypeScript",
19
19
  ruby: "Ruby"
20
- }, e = {
20
+ }, t = {
21
21
  filename: "cURL",
22
22
  snippet: {
23
23
  target: "shell"
24
24
  },
25
25
  language: "bash"
26
- }, a = {
26
+ }, e = {
27
27
  filename: "Python",
28
28
  snippet: {
29
29
  target: "python",
30
30
  client: "requests"
31
31
  },
32
32
  language: "python"
33
- }, p = {
33
+ }, n = {
34
34
  filename: "JavaScript",
35
35
  snippet: {
36
36
  target: "javascript",
37
37
  client: "fetch"
38
38
  },
39
39
  language: "javascript"
40
- }, n = {
41
- filename: "PHP",
42
- snippet: {
43
- target: "php",
44
- client: "curl"
45
- },
46
- language: "php"
47
40
  }, s = {
48
41
  filename: "Go",
49
42
  snippet: {
50
43
  target: "go"
51
44
  },
52
45
  language: "go"
53
- }, r = {
46
+ }, p = {
54
47
  filename: "Java",
55
48
  snippet: {
56
49
  target: "java"
57
50
  },
58
51
  language: "java"
59
- }, i = {
52
+ }, r = {
60
53
  filename: "Ruby",
61
54
  snippet: {
62
55
  target: "ruby"
63
56
  },
64
57
  language: "ruby"
65
- }, l = [
58
+ }, g = [
59
+ t,
66
60
  e,
67
- a,
68
- p,
69
61
  n,
70
62
  s,
71
- r,
72
- i
73
- ], h = {
74
- bash: e,
75
- python: a,
76
- javascript: p,
77
- php: n,
63
+ p,
64
+ r
65
+ ], l = {
66
+ bash: t,
67
+ python: e,
68
+ javascript: n,
78
69
  go: s,
79
- java: r,
80
- ruby: i
81
- }, u = (o) => {
82
- const t = o.toLowerCase();
83
- return c[t] ?? t;
70
+ java: p,
71
+ ruby: r
72
+ }, u = (i) => {
73
+ const a = i.toLowerCase();
74
+ return o[a] ?? a;
84
75
  };
85
76
  export {
86
- h as langToPresetMap,
87
- g as shikiLangToDisplayLang,
88
- l as snippetPresets,
77
+ l as langToPresetMap,
78
+ c as shikiLangToDisplayLang,
79
+ g as snippetPresets,
89
80
  u as toShikiLang,
90
- c as userLangToShikiLang
81
+ o as userLangToShikiLang
91
82
  };
package/dist/index.d.ts CHANGED
@@ -442,7 +442,7 @@ export declare interface DocsLayoutTelemetry {
442
442
  * />
443
443
  * ```
444
444
  */
445
- export declare function DocsPage({ payload, toc, navTree, activeHref, theme, className, pathname, markdownContent, allPages, baseUrl, bottomLinks, LinkComponent, localization, telemetry, contextMenu, }: DocsPagePropsWithCustomization): JSX_2.Element;
445
+ export declare function DocsPage({ payload, toc, navTree, activeHref, theme, className, pathname, markdownContent, allPages, baseUrl, bottomLinks, LinkComponent, localization, telemetry, contextMenu, apiReferenceData, }: DocsPagePropsWithCustomization): JSX_2.Element;
446
446
 
447
447
  /**
448
448
  * Localization strings for DocsPage component
@@ -475,6 +475,7 @@ export declare interface DocsPageProps {
475
475
  baseUrl?: string;
476
476
  bottomLinks?: BottomLinkConfig[];
477
477
  LinkComponent?: LinkComponent;
478
+ apiReferenceData?: ApiReferenceDataV2;
478
479
  }
479
480
 
480
481
  /**