@stainless-api/docs-ui 0.1.0-beta.63 → 0.1.0-beta.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/dist/{breadcrumbs-hzZqGExJ.js → breadcrumbs-C22Eos5U.js} +3 -3
  2. package/dist/{breadcrumbs-DwldC63b.d.ts → breadcrumbs-Cvm5Ifm7.d.ts} +1 -1
  3. package/dist/{cli-BAhN1pvm.js → cli-C9b02R53.js} +2 -2
  4. package/dist/{component-Bf-__z99.js → component-B5j-H4cO.js} +2 -2
  5. package/dist/{component-generics-uYXTXWFi.d.ts → component-generics-DBuEnCtJ.d.ts} +2 -2
  6. package/dist/components/MaskedInput.d.ts +3 -3
  7. package/dist/components/MaskedInput.js +1 -1
  8. package/dist/components/breadcrumbs.d.ts +1 -1
  9. package/dist/components/breadcrumbs.js +2 -2
  10. package/dist/components/icons.d.ts +12 -12
  11. package/dist/components/index.d.ts +11 -11
  12. package/dist/components/index.js +10 -10
  13. package/dist/components/method.d.ts +1 -1
  14. package/dist/components/method.js +2 -2
  15. package/dist/components/overview.d.ts +1 -1
  16. package/dist/components/overview.js +3 -3
  17. package/dist/components/primitives.d.ts +1 -1
  18. package/dist/components/primitives.js +1 -1
  19. package/dist/components/properties.d.ts +1 -1
  20. package/dist/components/properties.js +1 -1
  21. package/dist/components/sdk-sidebar.d.ts +1 -1
  22. package/dist/components/sdk-sidebar.js +2 -2
  23. package/dist/components/sdk.d.ts +1 -1
  24. package/dist/components/sdk.js +1 -1
  25. package/dist/components/snippets.d.ts +2 -2
  26. package/dist/components/snippets.js +1 -1
  27. package/dist/components/stl-sidebar.d.ts +2 -2
  28. package/dist/components/stl-sidebar.js +1 -1
  29. package/dist/{components-CwIKWfid.js → components-C4bGzXqr.js} +9 -9
  30. package/dist/contexts/component-generics.d.ts +1 -1
  31. package/dist/contexts/component-types.d.ts +11 -11
  32. package/dist/contexts/component.d.ts +14 -14
  33. package/dist/contexts/component.js +21 -20
  34. package/dist/contexts/docs.d.ts +1 -1
  35. package/dist/contexts/index.d.ts +15 -15
  36. package/dist/contexts/markdown.d.ts +1 -1
  37. package/dist/contexts/navigation.d.ts +1 -1
  38. package/dist/contexts/use-components.d.ts +10 -10
  39. package/dist/{csharp-BD37FKH6.js → csharp-Ckuihkec.js} +1 -1
  40. package/dist/{docs-Chc8A7zc.d.ts → docs-CMkfabi3.d.ts} +3 -3
  41. package/dist/{go-v-i4WDzK.js → go-DrZxKwGv.js} +1 -1
  42. package/dist/{http-BKoVLcpv.js → http-BoZv04yo.js} +33 -4
  43. package/dist/{index-Dz6SFEud.d.ts → index-BYTDY59Z.d.ts} +10 -10
  44. package/dist/{index-DuHyTVVD.d.ts → index-CwjGm9zX.d.ts} +33 -2
  45. package/dist/index-DCqDybi3.d.ts +345 -0
  46. package/dist/index.d.ts +16 -16
  47. package/dist/index.js +23 -22
  48. package/dist/{java-A6j1NMJ7.js → java-DB33acTL.js} +1 -1
  49. package/dist/languages/cli.d.ts +11 -11
  50. package/dist/languages/cli.js +12 -12
  51. package/dist/languages/csharp.d.ts +11 -11
  52. package/dist/languages/csharp.js +1 -1
  53. package/dist/languages/go.d.ts +11 -11
  54. package/dist/languages/go.js +1 -1
  55. package/dist/languages/http.d.ts +11 -11
  56. package/dist/languages/http.js +11 -11
  57. package/dist/languages/index.d.ts +12 -12
  58. package/dist/languages/index.js +21 -20
  59. package/dist/languages/java.d.ts +11 -11
  60. package/dist/languages/java.js +1 -1
  61. package/dist/languages/python.d.ts +11 -11
  62. package/dist/languages/python.js +1 -1
  63. package/dist/languages/ruby.d.ts +11 -11
  64. package/dist/languages/ruby.js +1 -1
  65. package/dist/languages/terraform.d.ts +12 -0
  66. package/dist/languages/terraform.js +9 -0
  67. package/dist/languages/typescript.d.ts +11 -11
  68. package/dist/languages/typescript.js +1 -1
  69. package/dist/languages-ZaloBYTK.js +30 -0
  70. package/dist/markdown/index.d.ts +2 -2
  71. package/dist/markdown/index.js +21 -20
  72. package/dist/markdown/printer.d.ts +2 -2
  73. package/dist/markdown/printer.js +22 -21
  74. package/dist/markdown/utils.d.ts +3 -3
  75. package/dist/{markdown-CoIy7fea.d.ts → markdown-9xLfF9XX.d.ts} +2 -2
  76. package/dist/{method-Bt3V4B4q.d.ts → method-BwXzL3P1.d.ts} +6 -6
  77. package/dist/{method-mosT_h9v.js → method-DuiknwGt.js} +9 -3
  78. package/dist/{navigation-CHVw_t5x.d.ts → navigation-C7KdkOOQ.d.ts} +3 -3
  79. package/dist/{overview-9J_EJ4Uv.d.ts → overview-Bgw9OG4s.d.ts} +7 -7
  80. package/dist/{overview-dG8i3EyZ.js → overview-CcVRPEBm.js} +10 -11
  81. package/dist/{primitives-B6nufz49.js → primitives-B6y6nqBK.js} +2 -2
  82. package/dist/{primitives-BkenBSev.d.ts → primitives-BFT7Ya7M.d.ts} +11 -11
  83. package/dist/{properties-4w8hy0hf.js → properties-D2J5gvC-.js} +1 -1
  84. package/dist/{python-CtQJaLw5.js → python-CU3scKKD.js} +1 -1
  85. package/dist/{routing-CLgL--x1.js → routing-B7QoUwlD.js} +1 -1
  86. package/dist/{routing-CqnhQY4G.d.ts → routing-Cm_9XJiQ.d.ts} +1 -1
  87. package/dist/routing.d.ts +1 -1
  88. package/dist/routing.js +1 -1
  89. package/dist/{ruby-DJqEHgOw.js → ruby-DGRZDnHB.js} +1 -1
  90. package/dist/{sdk-BDzHdl2y.d.ts → sdk-AjblXmHS.d.ts} +3 -3
  91. package/dist/{sdk-afI6c7Wd.js → sdk-CR-rCp9e.js} +4 -4
  92. package/dist/{sdk-sidebar-CoVgP38f.d.ts → sdk-sidebar-D0TtSeoG.d.ts} +1 -1
  93. package/dist/{sdk-sidebar-ZaXTw63C.js → sdk-sidebar-FL7e7_BM.js} +24 -10
  94. package/dist/{snippets-Dfd3zU_j.d.ts → snippets-Cp1UqKR_.d.ts} +11 -11
  95. package/dist/{snippets-bh8lfniq.js → snippets-Us8YSl3A.js} +2 -2
  96. package/dist/spec.d.ts +4 -4
  97. package/dist/spec.js +2 -2
  98. package/dist/{stl-sidebar-D6OGr1Gl.d.ts → stl-sidebar-GAhLy2ST.d.ts} +22 -9
  99. package/dist/stl-sidebar-WtimNrk1.js +106 -0
  100. package/dist/{style-Bxr5gqcM.js → style-HpXpcJ9v.js} +2 -0
  101. package/dist/style.d.ts +2 -0
  102. package/dist/style.js +1 -1
  103. package/dist/styles/main.css +20 -3
  104. package/dist/styles/sidebar.css +45 -109
  105. package/dist/styles.css +67 -115
  106. package/dist/terraform-BD7o7zbh.js +243 -0
  107. package/dist/{typescript-DA7mcN1t.js → typescript-CEVQ6kS_.js} +1 -1
  108. package/dist/{utils-36jzmKxv.js → utils-KWHcUI-r.js} +1 -1
  109. package/dist/utils.d.ts +1 -1
  110. package/dist/utils.js +1 -1
  111. package/package.json +3 -3
  112. package/dist/breadcrumbs-CpdCGzeH.d.ts +0 -25
  113. package/dist/component-generics-Bs9VsgxB.d.ts +0 -30
  114. package/dist/docs-FJV1-6V2.d.ts +0 -47
  115. package/dist/index-C9bUFWfw.d.ts +0 -302
  116. package/dist/index-WHKRwqwo.d.ts +0 -302
  117. package/dist/index-_wZU78e1.d.ts +0 -16
  118. package/dist/languages-BPVYg1lj.js +0 -28
  119. package/dist/markdown-IA9nH38V.d.ts +0 -22
  120. package/dist/method-CZDrcjKP.d.ts +0 -59
  121. package/dist/navigation-CIQImbWI.d.ts +0 -29
  122. package/dist/overview-DVklHrbY.d.ts +0 -39
  123. package/dist/primitives-Bmr19wBU.d.ts +0 -105
  124. package/dist/properties-NrkX1jGk.d.ts +0 -54
  125. package/dist/sdk-hDAzjotL.d.ts +0 -122
  126. package/dist/sdk-sidebar-ByMsvpUm.d.ts +0 -15
  127. package/dist/snippets-BqKFOZfY.d.ts +0 -53
  128. package/dist/stl-sidebar-DdxZx2KK.js +0 -82
  129. package/dist/stl-sidebar-nQWQbRVM.d.ts +0 -45
  130. /package/dist/{properties-Dx6tQNus.d.ts → properties-Dw7HWUj0.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  import * as React$1 from "react";
2
2
  import { ReactNode } from "react";
3
- import * as react_jsx_runtime24 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime49 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/components/method.d.ts
6
6
  type MethodHeaderProps = {
@@ -16,7 +16,7 @@ declare function MethodHeader({
16
16
  signature,
17
17
  children,
18
18
  level
19
- }: MethodHeaderProps): react_jsx_runtime24.JSX.Element;
19
+ }: MethodHeaderProps): react_jsx_runtime49.JSX.Element;
20
20
  type MethodRouteProps = {
21
21
  httpMethod?: string;
22
22
  endpoint?: string | ReactNode;
@@ -26,13 +26,13 @@ declare function MethodRoute({
26
26
  httpMethod,
27
27
  endpoint,
28
28
  iconOnly
29
- }: MethodRouteProps): react_jsx_runtime24.JSX.Element;
29
+ }: MethodRouteProps): react_jsx_runtime49.JSX.Element;
30
30
  type MethodDescriptionProps = {
31
31
  description?: string;
32
32
  };
33
33
  declare function MethodDescription({
34
34
  description
35
- }: MethodDescriptionProps): react_jsx_runtime24.JSX.Element | undefined;
35
+ }: MethodDescriptionProps): react_jsx_runtime49.JSX.Element | undefined;
36
36
  type MethodInfoProps = {
37
37
  children?: ReactNode;
38
38
  parameters?: ReactNode;
@@ -42,7 +42,7 @@ declare function MethodInfo({
42
42
  children,
43
43
  parameters,
44
44
  returns
45
- }: MethodInfoProps): react_jsx_runtime24.JSX.Element;
45
+ }: MethodInfoProps): react_jsx_runtime49.JSX.Element;
46
46
  type MethodProps = {
47
47
  id?: string;
48
48
  header?: ReactNode;
@@ -54,6 +54,6 @@ declare function Method({
54
54
  children,
55
55
  className,
56
56
  ...props
57
- }: MethodProps): react_jsx_runtime24.JSX.Element;
57
+ }: MethodProps): react_jsx_runtime49.JSX.Element;
58
58
  //#endregion
59
59
  export { MethodHeaderProps as a, MethodProps as c, MethodHeader as i, MethodRoute as l, MethodDescription as n, MethodInfo as o, MethodDescriptionProps as r, MethodInfoProps as s, Method as t, MethodRouteProps as u };
@@ -1,10 +1,11 @@
1
1
  import { t as useComponents } from "./use-components-BUz3GbO4.js";
2
- import { t as style_default } from "./style-Bxr5gqcM.js";
3
- import { i as PropertyToggle } from "./properties-4w8hy0hf.js";
2
+ import { t as style_default } from "./style-HpXpcJ9v.js";
3
+ import { i as PropertyToggle } from "./properties-D2J5gvC-.js";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import clsx from "clsx";
7
7
  import { Badge, getHttpMethod } from "@stainless-api/ui-primitives";
8
+ import { FunctionIcon } from "@stainless-api/ui-primitives/icons";
8
9
 
9
10
  //#region src/components/method.tsx
10
11
  function MethodHeader({ title, badges, signature, children, level }) {
@@ -29,10 +30,15 @@ function MethodRoute({ httpMethod, endpoint, iconOnly }) {
29
30
  const httpMethodTyped = getHttpMethod(httpMethod);
30
31
  return /* @__PURE__ */ jsxs("div", {
31
32
  className: style_default.MethodRoute,
32
- children: [httpMethodTyped && /* @__PURE__ */ jsx(Badge.HTTP, {
33
+ children: [httpMethod ? httpMethodTyped && /* @__PURE__ */ jsx(Badge.HTTP, {
33
34
  method: httpMethodTyped,
34
35
  iconOnly,
35
36
  size: "sm"
37
+ }) : /* @__PURE__ */ jsx(Badge, {
38
+ size: "sm",
39
+ icon: /* @__PURE__ */ jsx(FunctionIcon, {}),
40
+ intent: "info",
41
+ children: !iconOnly && "Function"
36
42
  }), endpoint && /* @__PURE__ */ jsx("span", {
37
43
  className: style_default.MethodRouteEndpoint,
38
44
  children: endpoint
@@ -1,6 +1,6 @@
1
- import { t as DocsLanguage } from "./routing-CqnhQY4G.js";
1
+ import { t as DocsLanguage } from "./routing-Cm_9XJiQ.js";
2
2
  import * as React$1 from "react";
3
- import * as react_jsx_runtime89 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime98 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/contexts/navigation.d.ts
6
6
  type NavigationHandler = (ev: React$1.MouseEvent | null, opts: {
@@ -24,6 +24,6 @@ declare function NavigationProvider({
24
24
  selectedPath,
25
25
  onNavigate,
26
26
  children
27
- }: NavigationProviderProps): react_jsx_runtime89.JSX.Element;
27
+ }: NavigationProviderProps): react_jsx_runtime98.JSX.Element;
28
28
  //#endregion
29
29
  export { useNavigation as a, NavigationProviderProps as i, NavigationHandler as n, NavigationProvider as r, NavigationContextType as t };
@@ -1,5 +1,5 @@
1
- import { p as Resource, u as Method } from "./index-DuHyTVVD.js";
2
- import * as react_jsx_runtime33 from "react/jsx-runtime";
1
+ import { d as Method, m as Resource } from "./index-CwjGm9zX.js";
2
+ import * as react_jsx_runtime54 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/overview.d.ts
5
5
  type SDKResourceProps = {
@@ -9,31 +9,31 @@ type SDKResourceProps = {
9
9
  declare function SDKResourceHeader({
10
10
  resource,
11
11
  parents
12
- }: SDKResourceProps): react_jsx_runtime33.JSX.Element | null;
12
+ }: SDKResourceProps): react_jsx_runtime54.JSX.Element | null;
13
13
  type SDKMethodSummaryProps = {
14
14
  method: Method;
15
15
  };
16
16
  declare function SDKMethodSummary({
17
17
  method
18
- }: SDKMethodSummaryProps): react_jsx_runtime33.JSX.Element;
18
+ }: SDKMethodSummaryProps): react_jsx_runtime54.JSX.Element;
19
19
  declare function SDKResource({
20
20
  resource,
21
21
  parents,
22
22
  showModels
23
23
  }: SDKResourceProps & {
24
24
  showModels?: boolean;
25
- }): react_jsx_runtime33.JSX.Element;
25
+ }): react_jsx_runtime54.JSX.Element;
26
26
  type SDKOverviewProps = {
27
27
  resource: Resource;
28
28
  };
29
29
  declare function SDKOverview({
30
30
  resource
31
- }: SDKOverviewProps): react_jsx_runtime33.JSX.Element;
31
+ }: SDKOverviewProps): react_jsx_runtime54.JSX.Element;
32
32
  type SDKRootProps = {
33
33
  stainlessPath: string;
34
34
  };
35
35
  declare function SDKRoot({
36
36
  stainlessPath
37
- }: SDKRootProps): react_jsx_runtime33.JSX.Element | null;
37
+ }: SDKRootProps): react_jsx_runtime54.JSX.Element | null;
38
38
  //#endregion
39
39
  export { SDKResource as a, SDKRoot as c, SDKOverviewProps as i, SDKRootProps as l, SDKMethodSummaryProps as n, SDKResourceHeader as o, SDKOverview as r, SDKResourceProps as s, SDKMethodSummary as t };
@@ -1,13 +1,12 @@
1
1
  import { i as useDeclaration, o as useLanguage, u as useSpec } from "./docs-6PYi1eEV.js";
2
2
  import { n as useLanguageComponents } from "./contexts-DMjqoc7S.js";
3
3
  import { t as useComponents } from "./use-components-BUz3GbO4.js";
4
- import { t as style_default } from "./style-Bxr5gqcM.js";
5
- import { i as PropertyToggle } from "./properties-4w8hy0hf.js";
6
- import { p as parseStainlessPath } from "./routing-CLgL--x1.js";
7
- import { s as Markdown } from "./primitives-B6nufz49.js";
8
- import { n as getResourceFromSpec, t as flatResources } from "./utils-36jzmKxv.js";
4
+ import { t as style_default } from "./style-HpXpcJ9v.js";
5
+ import { i as PropertyToggle } from "./properties-D2J5gvC-.js";
6
+ import { p as parseStainlessPath } from "./routing-B7QoUwlD.js";
7
+ import { s as Markdown } from "./primitives-B6y6nqBK.js";
8
+ import { n as getResourceFromSpec, t as flatResources } from "./utils-KWHcUI-r.js";
9
9
  import * as React$1 from "react";
10
- import { createElement } from "react";
11
10
  import { jsx, jsxs } from "react/jsx-runtime";
12
11
  import { ChevronRight } from "lucide-react";
13
12
 
@@ -44,7 +43,7 @@ function SDKMethodSummary({ method }) {
44
43
  level: "h5",
45
44
  title: /* @__PURE__ */ jsx(Docs.Link, {
46
45
  stainlessPath: method.stainlessPath,
47
- children: method.summary ?? method.title
46
+ children: method.summary || method.title
48
47
  }),
49
48
  signature: /* @__PURE__ */ jsx(Lang.MethodSignature, { decl }),
50
49
  badges: method.deprecated && /* @__PURE__ */ jsx(Docs.Badge, {
@@ -59,12 +58,14 @@ function SDKMethodSummary({ method }) {
59
58
  }
60
59
  function SDKResource({ resource, parents, showModels }) {
61
60
  const Docs = useComponents();
61
+ const Lang = useLanguageComponents();
62
62
  const language = useLanguage();
63
63
  const spec = useSpec();
64
64
  const methods = Object.values(resource.methods).filter((method) => spec?.decls?.[language]?.[method.stainlessPath]);
65
65
  const models = Object.values(resource.models).filter((model) => spec?.decls?.[language]?.[`${model.stainlessPath} > (schema)`]);
66
66
  return /* @__PURE__ */ jsx("div", {
67
67
  className: style_default.Resource,
68
+ "data-stl-resource-language": language,
68
69
  children: /* @__PURE__ */ jsxs("div", {
69
70
  className: style_default.ResourceContent,
70
71
  children: [
@@ -72,6 +73,7 @@ function SDKResource({ resource, parents, showModels }) {
72
73
  resource,
73
74
  parents
74
75
  }),
76
+ Lang.Resource && /* @__PURE__ */ jsx(Lang.Resource, { resource }),
75
77
  methods.length > 0 && /* @__PURE__ */ jsx("div", {
76
78
  className: style_default.ResourceContentGroup,
77
79
  children: methods.map((method) => /* @__PURE__ */ jsx("div", {
@@ -102,10 +104,7 @@ function SDKOverview({ resource }) {
102
104
  children: /* @__PURE__ */ jsx("h1", { children: resource.title })
103
105
  }),
104
106
  /* @__PURE__ */ jsx(SDKResource, { resource }),
105
- nested.map((props, index) => /* @__PURE__ */ createElement(SDKResource, {
106
- ...props,
107
- key: index
108
- }))
107
+ nested.map((props, index) => /* @__PURE__ */ jsx(SDKResource, { ...props }, index))
109
108
  ]
110
109
  });
111
110
  }
@@ -1,8 +1,8 @@
1
1
  import { c as useSettings, o as useLanguage } from "./docs-6PYi1eEV.js";
2
2
  import { n as useNavigation } from "./navigation-aoYZ_tl4.js";
3
3
  import { a as useRenderMarkdown } from "./markdown-DHjcD13O.js";
4
- import { t as style_default } from "./style-Bxr5gqcM.js";
5
- import { s as generateRoute } from "./routing-CLgL--x1.js";
4
+ import { t as style_default } from "./style-HpXpcJ9v.js";
5
+ import { s as generateRoute } from "./routing-B7QoUwlD.js";
6
6
  import { Fragment, createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import clsx from "clsx";
@@ -1,6 +1,6 @@
1
1
  import * as react0 from "react";
2
2
  import { ReactNode } from "react";
3
- import * as react_jsx_runtime46 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime59 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/components/primitives.d.ts
6
6
  type JoinProps = {
@@ -12,7 +12,7 @@ declare function Join({
12
12
  items,
13
13
  limit,
14
14
  children
15
- }: JoinProps): react_jsx_runtime46.JSX.Element[];
15
+ }: JoinProps): react_jsx_runtime59.JSX.Element[];
16
16
  type ExpanderProps = {
17
17
  id?: string;
18
18
  open?: boolean;
@@ -28,19 +28,19 @@ declare function Expander({
28
28
  virtual,
29
29
  muted,
30
30
  children
31
- }: ExpanderProps): react_jsx_runtime46.JSX.Element;
31
+ }: ExpanderProps): react_jsx_runtime59.JSX.Element;
32
32
  declare function VirtualExpander({
33
33
  id,
34
34
  open: isOpen,
35
35
  muted,
36
36
  summary,
37
37
  children
38
- }: Omit<ExpanderProps, 'virtual'>): react_jsx_runtime46.JSX.Element;
38
+ }: Omit<ExpanderProps, 'virtual'>): react_jsx_runtime59.JSX.Element;
39
39
  declare function Markdown({
40
40
  content
41
41
  }: {
42
42
  content: string;
43
- }): "" | react_jsx_runtime46.JSX.Element | undefined;
43
+ }): "" | react_jsx_runtime59.JSX.Element | undefined;
44
44
  type BadgeProps = {
45
45
  id: string;
46
46
  children?: ReactNode;
@@ -48,7 +48,7 @@ type BadgeProps = {
48
48
  declare function Badge({
49
49
  id,
50
50
  children
51
- }: BadgeProps): react_jsx_runtime46.JSX.Element;
51
+ }: BadgeProps): react_jsx_runtime59.JSX.Element;
52
52
  type TooltipProps = {
53
53
  content: ReactNode;
54
54
  children: ReactNode;
@@ -56,7 +56,7 @@ type TooltipProps = {
56
56
  declare function Tooltip({
57
57
  content,
58
58
  children
59
- }: TooltipProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react0.ReactPortal | react0.ReactElement<unknown, string | react0.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime46.JSX.Element | null | undefined;
59
+ }: TooltipProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react0.ReactPortal | react0.ReactElement<unknown, string | react0.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime59.JSX.Element | null | undefined;
60
60
  type LinkProps = {
61
61
  stainlessPath?: string;
62
62
  scroll?: boolean;
@@ -67,7 +67,7 @@ declare function Link({
67
67
  scroll,
68
68
  children,
69
69
  ...props
70
- }: LinkProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react0.ReactPortal | react0.ReactElement<unknown, string | react0.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime46.JSX.Element | null | undefined;
70
+ }: LinkProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react0.ReactPortal | react0.ReactElement<unknown, string | react0.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime59.JSX.Element | null | undefined;
71
71
  type InputProps = {
72
72
  left?: ReactNode;
73
73
  right?: ReactNode;
@@ -79,7 +79,7 @@ declare function Input({
79
79
  ref,
80
80
  className,
81
81
  ...props
82
- }: InputProps): react_jsx_runtime46.JSX.Element;
82
+ }: InputProps): react_jsx_runtime59.JSX.Element;
83
83
  type ToggleButtonProps = {
84
84
  children?: ReactNode;
85
85
  selected?: boolean;
@@ -89,7 +89,7 @@ declare function ToggleButton({
89
89
  selected,
90
90
  ref,
91
91
  ...props
92
- }: ToggleButtonProps): react_jsx_runtime46.JSX.Element;
92
+ }: ToggleButtonProps): react_jsx_runtime59.JSX.Element;
93
93
  type ListViewProps<TItem> = {
94
94
  items: Array<TItem>;
95
95
  itemDelegate: (item: TItem, selected: boolean) => React.ReactNode;
@@ -100,6 +100,6 @@ declare function ListView<TItem>({
100
100
  itemDelegate,
101
101
  onSelectListItem,
102
102
  ...rest
103
- }: ListViewProps<TItem>): react_jsx_runtime46.JSX.Element;
103
+ }: ListViewProps<TItem>): react_jsx_runtime59.JSX.Element;
104
104
  //#endregion
105
105
  export { Join as a, ListViewProps as c, ToggleButtonProps as d, Tooltip as f, InputProps as i, Markdown as l, Expander as n, Link as o, VirtualExpander as p, Input as r, ListView as s, Badge as t, ToggleButton as u };
@@ -1,6 +1,6 @@
1
1
  import { c as useSettings, o as useLanguage } from "./docs-6PYi1eEV.js";
2
2
  import { t as useComponents } from "./use-components-BUz3GbO4.js";
3
- import { t as style_default } from "./style-Bxr5gqcM.js";
3
+ import { t as style_default } from "./style-HpXpcJ9v.js";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { ArrowDownWideNarrowIcon, ArrowUpNarrowWideIcon } from "lucide-react";
6
6
 
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./chunk-BN_g-Awi.js";
2
2
  import { n as useLanguageComponents } from "./contexts-DMjqoc7S.js";
3
3
  import { t as useComponents } from "./use-components-BUz3GbO4.js";
4
- import { t as style_default } from "./style-Bxr5gqcM.js";
4
+ import { t as style_default } from "./style-HpXpcJ9v.js";
5
5
  import * as React$1 from "react";
6
6
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
7
 
@@ -157,7 +157,7 @@ function* walkTree(spec, includeModels) {
157
157
  }
158
158
  function generateRouteList({ spec, languages, excludeLanguages = [] }) {
159
159
  const entries = Array.from(walkTree(spec));
160
- return (languages ?? spec.docs?.languages ?? ["http"]).filter((lang) => Languages.includes(lang) && lang !== "terraform").filter((lang) => !excludeLanguages?.includes(lang)).flatMap((language) => entries.map(({ path, data: { title, kind, stainlessPath } }) => ({
160
+ return (languages ?? spec.docs?.languages ?? ["http"]).filter((lang) => Languages.includes(lang)).filter((lang) => !excludeLanguages?.includes(lang)).flatMap((language) => entries.map(({ path, data: { title, kind, stainlessPath } }) => ({
161
161
  title,
162
162
  kind,
163
163
  language,
@@ -1,4 +1,4 @@
1
- import { d as Model, g as Spec, p as Resource, u as Method } from "./index-DuHyTVVD.js";
1
+ import { _ as Spec, d as Method, f as Model, m as Resource } from "./index-CwjGm9zX.js";
2
2
 
3
3
  //#region src/routing.d.ts
4
4
  declare namespace routing_d_exports {
package/dist/routing.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { S as walkTree, _ as parseStainlessPath, a as RouteEntry, b as trimStainlessPath, c as expandToElement, d as generateRoute, f as generateRouteList, g as parseRoute, h as isSupportedLanguage, i as ParsedStainlessPath, l as findNavigationPath, m as getResource, n as LanguageNames, o as SpecTreeEntry, p as getLanguageSnippet, r as Languages, s as SupportedLanguageSyntaxes, t as DocsLanguage, u as generateMissingRouteList, x as updateHistory, y as scrollToPath } from "./routing-CqnhQY4G.js";
1
+ import { S as walkTree, _ as parseStainlessPath, a as RouteEntry, b as trimStainlessPath, c as expandToElement, d as generateRoute, f as generateRouteList, g as parseRoute, h as isSupportedLanguage, i as ParsedStainlessPath, l as findNavigationPath, m as getResource, n as LanguageNames, o as SpecTreeEntry, p as getLanguageSnippet, r as Languages, s as SupportedLanguageSyntaxes, t as DocsLanguage, u as generateMissingRouteList, x as updateHistory, y as scrollToPath } from "./routing-Cm_9XJiQ.js";
2
2
  export { DocsLanguage, LanguageNames, Languages, ParsedStainlessPath, RouteEntry, SpecTreeEntry, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateMissingRouteList, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };
package/dist/routing.js CHANGED
@@ -1,3 +1,3 @@
1
- import { _ as updateHistory, a as findNavigationPath, c as generateRouteList, d as isSupportedLanguage, f as parseRoute, g as trimStainlessPath, h as scrollToPath, i as expandToElement, l as getLanguageSnippet, n as Languages, o as generateMissingRouteList, p as parseStainlessPath, r as SupportedLanguageSyntaxes, s as generateRoute, t as LanguageNames, u as getResource, v as walkTree } from "./routing-CLgL--x1.js";
1
+ import { _ as updateHistory, a as findNavigationPath, c as generateRouteList, d as isSupportedLanguage, f as parseRoute, g as trimStainlessPath, h as scrollToPath, i as expandToElement, l as getLanguageSnippet, n as Languages, o as generateMissingRouteList, p as parseStainlessPath, r as SupportedLanguageSyntaxes, s as generateRoute, t as LanguageNames, u as getResource, v as walkTree } from "./routing-B7QoUwlD.js";
2
2
 
3
3
  export { LanguageNames, Languages, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateMissingRouteList, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./chunk-BN_g-Awi.js";
2
2
  import { i as useDeclaration, o as useLanguage, u as useSpec } from "./docs-6PYi1eEV.js";
3
3
  import { n as useLanguageComponents } from "./contexts-DMjqoc7S.js";
4
4
  import { t as useComponents } from "./use-components-BUz3GbO4.js";
5
- import { t as style_default } from "./style-Bxr5gqcM.js";
5
+ import { t as style_default } from "./style-HpXpcJ9v.js";
6
6
  import * as React$1 from "react";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
 
@@ -1,5 +1,5 @@
1
- import { d as Model, h as SnippetLanguage, s as ID, t as BaseDeclaration, u as Method } from "./index-DuHyTVVD.js";
2
- import { t as DocsLanguage } from "./routing-CqnhQY4G.js";
1
+ import { c as ID, d as Method, f as Model, g as SnippetLanguage, o as HasStainlessPath, t as BaseDeclaration } from "./index-CwjGm9zX.js";
2
+ import { t as DocsLanguage } from "./routing-Cm_9XJiQ.js";
3
3
  import * as React$1 from "react";
4
4
  import * as react_jsx_runtime75 from "react/jsx-runtime";
5
5
 
@@ -64,7 +64,7 @@ declare function SDKRequestTitle({
64
64
  snippetLanguage
65
65
  }: SDKRequestTitleProps): react_jsx_runtime75.JSX.Element;
66
66
  type SDKExampleProps = {
67
- method: Method;
67
+ method: Partial<Method> & HasStainlessPath;
68
68
  transformRequestSnippet?: TransformRequestSnippetFn;
69
69
  };
70
70
  declare function SDKExample({
@@ -2,8 +2,8 @@ import { c as useSettings, i as useDeclaration, n as useAvailableLanguages, o as
2
2
  import { n as useNavigation } from "./navigation-aoYZ_tl4.js";
3
3
  import { n as useLanguageComponents } from "./contexts-DMjqoc7S.js";
4
4
  import { t as useComponents } from "./use-components-BUz3GbO4.js";
5
- import { t as style_default } from "./style-Bxr5gqcM.js";
6
- import { l as getLanguageSnippet, s as generateRoute, t as LanguageNames } from "./routing-CLgL--x1.js";
5
+ import { t as style_default } from "./style-HpXpcJ9v.js";
6
+ import { l as getLanguageSnippet, s as generateRoute, t as LanguageNames } from "./routing-B7QoUwlD.js";
7
7
  import { a as JavaIcon, c as PythonIcon, d as TypescriptIcon, i as GoIcon, l as RubyIcon, n as CSharpIcon, o as KotlinIcon, r as CurlIcon, s as PowershellIcon, t as CLIIcon, u as TerraformIcon } from "./icons-BYKn5X8E.js";
8
8
  import * as React$1 from "react";
9
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -162,7 +162,7 @@ function SDKMethodHeader({ method }) {
162
162
  const decl = useDeclaration(method.stainlessPath, true);
163
163
  return /* @__PURE__ */ jsx(Docs.MethodHeader, {
164
164
  level: "h1",
165
- title: method.summary ?? method.title,
165
+ title: method.summary || method.title,
166
166
  signature: /* @__PURE__ */ jsx(Lang.MethodSignature, { decl }),
167
167
  badges: method.deprecated && /* @__PURE__ */ jsx(Docs.Badge, {
168
168
  id: "deprecated",
@@ -227,7 +227,7 @@ function SDKMethodNotImplemented({ method }) {
227
227
  className: style_default.Method,
228
228
  children: [/* @__PURE__ */ jsx(Docs.MethodHeader, {
229
229
  level: "h1",
230
- title: method.summary ?? method.title,
230
+ title: method.summary || method.title,
231
231
  children: /* @__PURE__ */ jsx(Docs.MethodRoute, {
232
232
  httpMethod: method.httpMethod,
233
233
  endpoint: method.endpoint.split(" ", 2).at(-1)
@@ -1,4 +1,4 @@
1
- import { p as Resource } from "./index-DuHyTVVD.js";
1
+ import { m as Resource } from "./index-CwjGm9zX.js";
2
2
  import * as react_jsx_runtime74 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/sdk-sidebar.d.ts
@@ -1,8 +1,9 @@
1
1
  import { n as useNavigation } from "./navigation-aoYZ_tl4.js";
2
- import { r as isResourceEmpty } from "./utils-36jzmKxv.js";
3
- import { t as StlSidebar } from "./stl-sidebar-DdxZx2KK.js";
2
+ import { r as isResourceEmpty } from "./utils-KWHcUI-r.js";
3
+ import { t as StlSidebar } from "./stl-sidebar-WtimNrk1.js";
4
4
  import * as React$1 from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
+ import { Badge, getHttpMethod } from "@stainless-api/ui-primitives";
6
7
 
7
8
  //#region src/components/sdk-sidebar.tsx
8
9
  function resourceToEntry(resource, selectedPath) {
@@ -11,16 +12,29 @@ function resourceToEntry(resource, selectedPath) {
11
12
  collapsed: false,
12
13
  label: resource.title,
13
14
  entries: [],
14
- stainlessPath: resource.stainlessPath,
15
+ target: {
16
+ type: "stainlessPath",
17
+ stainlessPath: resource.stainlessPath
18
+ },
15
19
  isCurrent: selectedPath === resource.stainlessPath
16
20
  };
17
- for (const method of Object.values(resource.methods)) result.entries.push({
18
- type: "link",
19
- attrs: { "data-stldocs-method": method.httpMethod },
20
- stainlessPath: method.stainlessPath,
21
- label: method.title,
22
- isCurrent: selectedPath === method.stainlessPath
23
- });
21
+ for (const method of Object.values(resource.methods)) {
22
+ const httpMethod = getHttpMethod(method.httpMethod);
23
+ result.entries.push({
24
+ type: "link",
25
+ target: {
26
+ type: "stainlessPath",
27
+ stainlessPath: method.stainlessPath
28
+ },
29
+ label: method.title,
30
+ isCurrent: selectedPath === method.stainlessPath,
31
+ icon: httpMethod ? /* @__PURE__ */ jsx(Badge.HTTP, {
32
+ method: httpMethod,
33
+ iconOnly: true,
34
+ size: "sm"
35
+ }) : void 0
36
+ });
37
+ }
24
38
  for (const subresource of Object.values(resource.subresources ?? {})) result.entries.push(resourceToEntry(subresource, selectedPath));
25
39
  return result;
26
40
  }
@@ -1,7 +1,7 @@
1
- import { u as Method } from "./index-DuHyTVVD.js";
2
- import { w as TransformRequestSnippetFn } from "./sdk-BDzHdl2y.js";
1
+ import { d as Method, o as HasStainlessPath } from "./index-CwjGm9zX.js";
2
+ import { w as TransformRequestSnippetFn } from "./sdk-AjblXmHS.js";
3
3
  import * as React$1 from "react";
4
- import * as react_jsx_runtime88 from "react/jsx-runtime";
4
+ import * as react_jsx_runtime89 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/snippets.d.ts
7
7
  type SnippetCodeProps = {
@@ -12,42 +12,42 @@ type SnippetCodeProps = {
12
12
  declare function SnippetCode({
13
13
  content,
14
14
  language
15
- }: SnippetCodeProps): react_jsx_runtime88.JSX.Element;
15
+ }: SnippetCodeProps): react_jsx_runtime89.JSX.Element;
16
16
  type SnippetProps = {
17
- method: Method;
17
+ method: Partial<Method> & HasStainlessPath;
18
18
  requestTitle?: React$1.ReactNode;
19
19
  transformRequestSnippet?: TransformRequestSnippetFn;
20
20
  };
21
21
  type SnippetContainerProps = {
22
- method: Method;
22
+ method: Partial<Method> & HasStainlessPath;
23
23
  children: React$1.ReactNode;
24
24
  signature?: string;
25
25
  };
26
26
  declare function SnippetContainer({
27
27
  children
28
- }: SnippetContainerProps): react_jsx_runtime88.JSX.Element;
28
+ }: SnippetContainerProps): react_jsx_runtime89.JSX.Element;
29
29
  type SnippetRequestContainerProps = {
30
30
  children?: React$1.ReactNode;
31
31
  signature?: string;
32
32
  };
33
33
  declare function SnippetRequestContainer({
34
34
  children
35
- }: SnippetRequestContainerProps): react_jsx_runtime88.JSX.Element;
35
+ }: SnippetRequestContainerProps): react_jsx_runtime89.JSX.Element;
36
36
  declare function Snippet({
37
37
  requestTitle,
38
38
  method,
39
39
  transformRequestSnippet
40
- }: SnippetProps): react_jsx_runtime88.JSX.Element | null;
40
+ }: SnippetProps): react_jsx_runtime89.JSX.Element | null;
41
41
  declare function SnippetButtons({
42
42
  content
43
43
  }: {
44
44
  content: string;
45
- }): react_jsx_runtime88.JSX.Element;
45
+ }): react_jsx_runtime89.JSX.Element;
46
46
  declare function SnippetFooter(): React$1.ReactNode;
47
47
  declare function SnippetResponse({
48
48
  responses
49
49
  }: {
50
50
  responses: Method['exampleResponses'];
51
- }): react_jsx_runtime88.JSX.Element | null;
51
+ }): react_jsx_runtime89.JSX.Element | null;
52
52
  //#endregion
53
53
  export { SnippetContainer as a, SnippetProps as c, SnippetResponse as d, SnippetCodeProps as i, SnippetRequestContainer as l, SnippetButtons as n, SnippetContainerProps as o, SnippetCode as r, SnippetFooter as s, Snippet as t, SnippetRequestContainerProps as u };
@@ -1,7 +1,7 @@
1
1
  import { i as useDeclaration, l as useSnippet, o as useLanguage } from "./docs-6PYi1eEV.js";
2
2
  import { r as useHighlight } from "./markdown-DHjcD13O.js";
3
3
  import { t as useComponents } from "./use-components-BUz3GbO4.js";
4
- import { t as style_default } from "./style-Bxr5gqcM.js";
4
+ import { t as style_default } from "./style-HpXpcJ9v.js";
5
5
  import * as React$1 from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import clsx from "clsx";
@@ -60,7 +60,7 @@ function Snippet({ requestTitle, method, transformRequestSnippet }) {
60
60
  children: [httpMethod && /* @__PURE__ */ jsx(Badge.HTTP, {
61
61
  method: httpMethod,
62
62
  iconOnly: true
63
- }), /* @__PURE__ */ jsx("h3", { children: method.summary ?? method.title })]
63
+ }), /* @__PURE__ */ jsx("h3", { children: method.summary || method.title })]
64
64
  }),
65
65
  /* @__PURE__ */ jsx("div", {
66
66
  className: style_default.SnippetRequestTitleContent,
package/dist/spec.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as SpecLanguage, d as Model, g as Spec, i as DeclarationNode, p as Resource, u as Method } from "./index-DuHyTVVD.js";
2
- import { t as DocsLanguage } from "./routing-CqnhQY4G.js";
1
+ import { _ as Spec, d as Method, f as Model, i as DeclarationNode, m as Resource, v as SpecLanguage } from "./index-CwjGm9zX.js";
2
+ import { t as DocsLanguage } from "./routing-Cm_9XJiQ.js";
3
3
 
4
4
  //#region src/spec.d.ts
5
5
  type SecurityScheme = Spec['security_schemes'][number];
@@ -36,13 +36,13 @@ declare function generateNavigation(resource: Partial<Resource>): {
36
36
  declare function generateSpecForResource(spec: Spec, name: string, lang: DocsLanguage, transforms: SpecTransforms): Partial<Spec>;
37
37
  declare function transform(spec: Spec, transforms: SpecTransforms): {
38
38
  name: string;
39
- lang: "cli" | "csharp" | "go" | "http" | "java" | "kotlin" | "node" | "php" | "python" | "ruby" | "terraform" | "typescript";
39
+ lang: "http" | "node" | "python" | "go" | "typescript" | "terraform" | "ruby" | "java" | "kotlin" | "csharp" | "php" | "cli";
40
40
  spec: Partial<Spec>;
41
41
  }[];
42
42
  declare function split(spec: Spec, transforms?: SpecTransforms): {
43
43
  resources: ReturnType<typeof transform>;
44
44
  navigation: {
45
- languages: ("go" | "http" | "java" | "kotlin" | "node" | "python" | "ruby" | "terraform" | "typescript")[] | undefined;
45
+ languages: ("http" | "node" | "python" | "go" | "typescript" | "terraform" | "ruby" | "java" | "kotlin")[] | undefined;
46
46
  resources: {
47
47
  [k: string]: {
48
48
  title: string | undefined;
package/dist/spec.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as Languages } from "./routing-CLgL--x1.js";
2
- import { r as isResourceEmpty } from "./utils-36jzmKxv.js";
1
+ import { n as Languages } from "./routing-B7QoUwlD.js";
2
+ import { r as isResourceEmpty } from "./utils-KWHcUI-r.js";
3
3
 
4
4
  //#region src/spec.ts
5
5
  const defaultTransforms = {