@stainless-api/docs-ui 0.1.0-beta.55 → 0.1.0-beta.56

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 (79) hide show
  1. package/dist/{breadcrumbs-DbMfWbzf.d.ts → breadcrumbs-C4-bfzhR.d.ts} +2 -2
  2. package/dist/{breadcrumbs-DgN-xdoA.js → breadcrumbs-D4R5cbSw.js} +1 -1
  3. package/dist/breadcrumbs-R-MrRUAb.d.ts +25 -0
  4. package/dist/{component-CjLDkCLe.js → component-5L-iyIZ6.js} +1 -1
  5. package/dist/{component-generics-jEHMmsET.d.ts → component-generics-BXUlfDmo.d.ts} +2 -2
  6. package/dist/component-generics-DK3L_HfT.d.ts +30 -0
  7. package/dist/components/MaskedInput.d.ts +3 -3
  8. package/dist/components/breadcrumbs.d.ts +1 -1
  9. package/dist/components/breadcrumbs.js +2 -2
  10. package/dist/components/icons.d.ts +11 -11
  11. package/dist/components/index.d.ts +9 -9
  12. package/dist/components/index.js +4 -4
  13. package/dist/components/method.d.ts +1 -1
  14. package/dist/components/overview.d.ts +1 -1
  15. package/dist/components/overview.js +2 -2
  16. package/dist/components/primitives.d.ts +1 -1
  17. package/dist/components/primitives.js +1 -1
  18. package/dist/components/properties.d.ts +1 -1
  19. package/dist/components/sdk.d.ts +1 -1
  20. package/dist/components/sidebar.d.ts +1 -1
  21. package/dist/components/snippets.d.ts +2 -2
  22. package/dist/{components-oq97SH1A.js → components-DuWqBogG.js} +3 -3
  23. package/dist/contexts/component-generics.d.ts +1 -1
  24. package/dist/contexts/component-types.d.ts +10 -10
  25. package/dist/contexts/component.d.ts +13 -13
  26. package/dist/contexts/component.js +5 -5
  27. package/dist/contexts/docs.d.ts +1 -1
  28. package/dist/contexts/index.d.ts +14 -14
  29. package/dist/contexts/markdown.d.ts +1 -1
  30. package/dist/contexts/navigation.d.ts +1 -1
  31. package/dist/contexts/use-components.d.ts +9 -9
  32. package/dist/docs-Bbe2P0iM.d.ts +47 -0
  33. package/dist/{docs-B8ujUobE.d.ts → docs-DXW3HLam.d.ts} +2 -2
  34. package/dist/{index-DJSj_TkD.d.ts → index-B0GI632t.d.ts} +30 -30
  35. package/dist/{index-DhAIZ735.d.ts → index-C8y-QK_S.d.ts} +8 -8
  36. package/dist/index-CMjS_7Z-.d.ts +274 -0
  37. package/dist/index-CXNWVE3S.d.ts +15 -0
  38. package/dist/index.d.ts +14 -14
  39. package/dist/index.js +4 -4
  40. package/dist/languages/csharp.d.ts +10 -10
  41. package/dist/languages/go.d.ts +10 -10
  42. package/dist/languages/http.d.ts +10 -10
  43. package/dist/languages/http.js +4 -4
  44. package/dist/languages/index.d.ts +10 -10
  45. package/dist/languages/index.js +4 -4
  46. package/dist/languages/java.d.ts +10 -10
  47. package/dist/languages/python.d.ts +10 -10
  48. package/dist/languages/ruby.d.ts +10 -10
  49. package/dist/languages/typescript.d.ts +10 -10
  50. package/dist/markdown/index.d.ts +1 -1
  51. package/dist/markdown/index.js +5 -5
  52. package/dist/markdown/printer.js +5 -5
  53. package/dist/markdown/utils.d.ts +1 -1
  54. package/dist/{markdown-BeBRJqrt.d.ts → markdown-DlZBWMNG.d.ts} +2 -2
  55. package/dist/markdown-xEaREw5e.d.ts +22 -0
  56. package/dist/{method-cLcsCc31.d.ts → method-BRfK1KuU.d.ts} +7 -7
  57. package/dist/method-BUQRaC59.d.ts +71 -0
  58. package/dist/navigation-BO8IjmvM.d.ts +29 -0
  59. package/dist/{navigation-ULXC5uFs.d.ts → navigation-C36vzOT-.d.ts} +1 -1
  60. package/dist/{overview-5f2psBcl.d.ts → overview-BI_asPrF.d.ts} +6 -6
  61. package/dist/{overview-BQk6WvtS.js → overview-D_7o7P6l.js} +1 -1
  62. package/dist/overview-g0IyxCAY.d.ts +39 -0
  63. package/dist/{primitives-BBa2vKex.d.ts → primitives-Bm0Cm3Xo.d.ts} +28 -21
  64. package/dist/primitives-COZrZCWZ.d.ts +104 -0
  65. package/dist/{primitives-1WQd5NT-.js → primitives-Dk_RvOzh.js} +23 -31
  66. package/dist/{properties-Clv76Ne3.d.ts → properties-BGhVCqER.d.ts} +5 -5
  67. package/dist/properties-BqjMaZ-l.d.ts +54 -0
  68. package/dist/routing-o8okAfJK.d.ts +54 -0
  69. package/dist/sdk-DA3oRxHu.d.ts +118 -0
  70. package/dist/{sdk-DT9NI4cv.d.ts → sdk-tq-VoVQP.d.ts} +13 -13
  71. package/dist/{sidebar-M9RnjNtV.d.ts → sidebar-DZQPDV-z.d.ts} +5 -5
  72. package/dist/sidebar-sPFdjATU.d.ts +36 -0
  73. package/dist/{snippets-swUWTk4z.d.ts → snippets-CVckJDzp.d.ts} +8 -8
  74. package/dist/snippets-Dg6GX-e4.d.ts +51 -0
  75. package/dist/styles/primitives.css +5 -4
  76. package/dist/styles/resets.css +1 -1
  77. package/dist/styles/search.css +32 -21
  78. package/dist/styles.css +39 -27
  79. package/package.json +2 -2
@@ -0,0 +1,104 @@
1
+ import * as react0 from "react";
2
+ import { ReactNode } from "react";
3
+ import * as react_jsx_runtime26 from "react/jsx-runtime";
4
+
5
+ //#region src/components/primitives.d.ts
6
+ type JoinProps = {
7
+ items: ReactNode[];
8
+ limit?: number;
9
+ children: ReactNode;
10
+ };
11
+ declare function Join({
12
+ items,
13
+ limit,
14
+ children
15
+ }: JoinProps): react_jsx_runtime26.JSX.Element[];
16
+ type ExpanderProps = {
17
+ id?: string;
18
+ open?: boolean;
19
+ summary: ReactNode;
20
+ virtual?: boolean;
21
+ muted?: boolean;
22
+ children?: ReactNode;
23
+ };
24
+ declare function Expander({
25
+ id,
26
+ open,
27
+ summary,
28
+ virtual,
29
+ muted,
30
+ children
31
+ }: ExpanderProps): react_jsx_runtime26.JSX.Element;
32
+ declare function VirtualExpander({
33
+ id,
34
+ open: isOpen,
35
+ muted,
36
+ summary,
37
+ children
38
+ }: Omit<ExpanderProps, 'virtual'>): react_jsx_runtime26.JSX.Element;
39
+ declare function Markdown({
40
+ content
41
+ }: {
42
+ content: string;
43
+ }): "" | react_jsx_runtime26.JSX.Element | undefined;
44
+ type BadgeProps = {
45
+ id: string;
46
+ children?: ReactNode;
47
+ };
48
+ declare function Badge({
49
+ id,
50
+ children
51
+ }: BadgeProps): react_jsx_runtime26.JSX.Element;
52
+ type TooltipProps = {
53
+ content: ReactNode;
54
+ children: ReactNode;
55
+ };
56
+ declare function Tooltip({
57
+ content,
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_runtime26.JSX.Element | null | undefined;
60
+ type LinkProps = {
61
+ stainlessPath: string;
62
+ scroll?: boolean;
63
+ children?: ReactNode;
64
+ } & React.HTMLProps<HTMLAnchorElement>;
65
+ declare function Link({
66
+ stainlessPath,
67
+ scroll,
68
+ children,
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_runtime26.JSX.Element | null | undefined;
71
+ type InputProps = {
72
+ left?: ReactNode;
73
+ right?: ReactNode;
74
+ ref?: React.Ref<HTMLInputElement>;
75
+ } & React.InputHTMLAttributes<HTMLInputElement>;
76
+ declare function Input({
77
+ left,
78
+ right,
79
+ ref,
80
+ ...props
81
+ }: InputProps): react_jsx_runtime26.JSX.Element;
82
+ type ToggleButtonProps = {
83
+ children?: ReactNode;
84
+ selected?: boolean;
85
+ } & React.ComponentProps<'button'>;
86
+ declare function ToggleButton({
87
+ children,
88
+ selected,
89
+ ref,
90
+ ...props
91
+ }: ToggleButtonProps): react_jsx_runtime26.JSX.Element;
92
+ type ListViewProps<TItem> = {
93
+ items: Array<TItem>;
94
+ itemDelegate: (item: TItem, selected: boolean) => React.ReactNode;
95
+ onSelectListItem?: (item: TItem) => void;
96
+ } & React.HTMLAttributes<HTMLDivElement>;
97
+ declare function ListView<TItem>({
98
+ items,
99
+ itemDelegate,
100
+ onSelectListItem,
101
+ ...rest
102
+ }: ListViewProps<TItem>): react_jsx_runtime26.JSX.Element;
103
+ //#endregion
104
+ 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 };
@@ -3,8 +3,7 @@ import { n as useNavigation } from "./navigation-C5TN0SgC.js";
3
3
  import { a as useRenderMarkdown } from "./markdown-CxdeWgjV.js";
4
4
  import { t as style_default } from "./style-cJZFOvnF.js";
5
5
  import { o as generateRoute } from "./routing-Dl0FprK1.js";
6
- import * as React$1 from "react";
7
- import { Fragment, useState } from "react";
6
+ import { Fragment, createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
8
7
  import { jsx, jsxs } from "react/jsx-runtime";
9
8
  import { MinusIcon, PlusIcon } from "lucide-react";
10
9
  import clsx from "clsx";
@@ -24,7 +23,7 @@ function Expander({ id, open, summary, virtual, muted, children }) {
24
23
  muted,
25
24
  id,
26
25
  children
27
- });
26
+ }, open ? "open" : "closed");
28
27
  return /* @__PURE__ */ jsxs("details", {
29
28
  className: style_default.Expander,
30
29
  open,
@@ -55,10 +54,7 @@ function Expander({ id, open, summary, virtual, muted, children }) {
55
54
  });
56
55
  }
57
56
  function VirtualExpander({ id, open: isOpen, muted, summary, children }) {
58
- const [open, setOpen] = useState(isOpen);
59
- React$1.useEffect(() => {
60
- if (isOpen) setOpen(true);
61
- }, [isOpen]);
57
+ const [open, setOpen] = useState(isOpen ?? false);
62
58
  return /* @__PURE__ */ jsxs("div", {
63
59
  className: style_default.Expander,
64
60
  "data-open": open,
@@ -101,9 +97,9 @@ function Badge({ id, children }) {
101
97
  children: children ?? id
102
98
  });
103
99
  }
104
- const TooltipNestingContext = React$1.createContext(false);
100
+ const TooltipNestingContext = createContext(false);
105
101
  function Tooltip({ content, children }) {
106
- if (React$1.useContext(TooltipNestingContext)) return children;
102
+ if (useContext(TooltipNestingContext)) return children;
107
103
  return /* @__PURE__ */ jsxs("span", {
108
104
  className: style_default.Tooltip,
109
105
  children: [/* @__PURE__ */ jsx("span", {
@@ -121,7 +117,7 @@ function Tooltip({ content, children }) {
121
117
  function Link({ stainlessPath, scroll = true, children, ...props }) {
122
118
  const { basePath, onNavigate } = useNavigation();
123
119
  const language = useLanguage();
124
- const href = React$1.useMemo(() => {
120
+ const href = useMemo(() => {
125
121
  if (props.href) return props.href;
126
122
  if (stainlessPath && basePath) return generateRoute(basePath, language, stainlessPath);
127
123
  }, [
@@ -130,7 +126,7 @@ function Link({ stainlessPath, scroll = true, children, ...props }) {
130
126
  stainlessPath,
131
127
  props.href
132
128
  ]);
133
- const handleClick = React$1.useCallback((e) => {
129
+ const handleClick = useCallback((e) => {
134
130
  if (props.onClick) props.onClick(e);
135
131
  if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
136
132
  if (href) onNavigate?.(e, {
@@ -155,7 +151,7 @@ function Link({ stainlessPath, scroll = true, children, ...props }) {
155
151
  children
156
152
  });
157
153
  }
158
- const Input = React$1.forwardRef(function Input$1({ left, right, ...props }, ref) {
154
+ function Input({ left, right, ref, ...props }) {
159
155
  return /* @__PURE__ */ jsxs("div", {
160
156
  className: clsx(style_default.Input, props.disabled && style_default.InputDisabled),
161
157
  children: [
@@ -168,8 +164,8 @@ const Input = React$1.forwardRef(function Input$1({ left, right, ...props }, ref
168
164
  right
169
165
  ]
170
166
  });
171
- });
172
- const ToggleButton = React$1.forwardRef(function ToggleButton$1({ children, selected, ...props }, ref) {
167
+ }
168
+ function ToggleButton({ children, selected, ref, ...props }) {
173
169
  return /* @__PURE__ */ jsx("button", {
174
170
  ...props,
175
171
  ref,
@@ -177,17 +173,13 @@ const ToggleButton = React$1.forwardRef(function ToggleButton$1({ children, sele
177
173
  "data-stldocs-toggle-selected": selected,
178
174
  children
179
175
  });
180
- });
176
+ }
181
177
  function ListView({ items, itemDelegate, onSelectListItem, ...rest }) {
182
- const [selectedIndex, setSelectedIndex] = React$1.useState(0);
183
- const [keyboardIndex, setKeyboardIndex] = React$1.useState(0);
184
- const listRef = React$1.useRef(null);
185
- const itemRef = React$1.useRef(null);
186
- React$1.useEffect(() => {
187
- setSelectedIndex(0);
188
- setKeyboardIndex(0);
189
- }, [items]);
190
- const handleSelect = React$1.useCallback(() => {
178
+ const [selectedIndex, setSelectedIndex] = useState(0);
179
+ const [keyboardIndex, setKeyboardIndex] = useState(0);
180
+ const listRef = useRef(null);
181
+ const itemRef = useRef(null);
182
+ const handleSelect = useCallback(() => {
191
183
  const item = items[selectedIndex];
192
184
  if (item) onSelectListItem?.(item);
193
185
  }, [
@@ -195,8 +187,9 @@ function ListView({ items, itemDelegate, onSelectListItem, ...rest }) {
195
187
  selectedIndex,
196
188
  onSelectListItem
197
189
  ]);
198
- React$1.useEffect(() => {
199
- function handleKeyPress(ev) {
190
+ useEffect(() => {
191
+ const ac = new AbortController();
192
+ document.addEventListener("keydown", (ev) => {
200
193
  switch (ev.key) {
201
194
  case "ArrowUp": {
202
195
  ev.preventDefault();
@@ -217,15 +210,14 @@ function ListView({ items, itemDelegate, onSelectListItem, ...rest }) {
217
210
  handleSelect();
218
211
  break;
219
212
  }
220
- }
221
- addEventListener("keydown", handleKeyPress);
222
- return () => removeEventListener("keydown", handleKeyPress);
213
+ }, { signal: ac.signal });
214
+ return () => ac.abort();
223
215
  }, [
224
216
  items,
225
217
  selectedIndex,
226
218
  handleSelect
227
219
  ]);
228
- React$1.useEffect(() => {
220
+ useEffect(() => {
229
221
  if (!keyboardIndex || !itemRef.current || !listRef.current) {
230
222
  listRef?.current?.scroll(0, 0);
231
223
  return;
@@ -248,7 +240,7 @@ function ListView({ items, itemDelegate, onSelectListItem, ...rest }) {
248
240
  className: style_default.ListViewItem,
249
241
  "data-stldocs-listview-selected": index === selectedIndex,
250
242
  onClick: handleSelect,
251
- onMouseMove: () => setSelectedIndex(index),
243
+ onMouseEnter: () => setSelectedIndex(index),
252
244
  children: itemDelegate(item, index === selectedIndex)
253
245
  }, index))
254
246
  });
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from "react";
2
- import * as react_jsx_runtime31 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime26 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/properties.d.ts
5
5
  type PropertyToggleProps = {
@@ -7,19 +7,19 @@ type PropertyToggleProps = {
7
7
  };
8
8
  declare function PropertyToggle({
9
9
  target
10
- }: PropertyToggleProps): react_jsx_runtime31.JSX.Element;
10
+ }: PropertyToggleProps): react_jsx_runtime26.JSX.Element;
11
11
  type PropertyDescriptionProps = {
12
12
  description?: string;
13
13
  };
14
14
  declare function PropertyDescription({
15
15
  description
16
- }: PropertyDescriptionProps): react_jsx_runtime31.JSX.Element | undefined;
16
+ }: PropertyDescriptionProps): react_jsx_runtime26.JSX.Element | undefined;
17
17
  type PropertyTitleProps = {
18
18
  title?: string;
19
19
  };
20
20
  declare function PropertyTitle({
21
21
  title
22
- }: PropertyTitleProps): react_jsx_runtime31.JSX.Element | undefined;
22
+ }: PropertyTitleProps): react_jsx_runtime26.JSX.Element | undefined;
23
23
  type PropertyProps = {
24
24
  id?: string;
25
25
  name?: ReactNode;
@@ -49,6 +49,6 @@ declare function Property({
49
49
  additional,
50
50
  constraints,
51
51
  children
52
- }: PropertyProps): react_jsx_runtime31.JSX.Element;
52
+ }: PropertyProps): react_jsx_runtime26.JSX.Element;
53
53
  //#endregion
54
54
  export { PropertyTitle as a, PropertyToggleProps as c, PropertyProps as i, PropertyDescription as n, PropertyTitleProps as o, PropertyDescriptionProps as r, PropertyToggle as s, Property as t };
@@ -0,0 +1,54 @@
1
+ import { ReactNode } from "react";
2
+ import * as react_jsx_runtime36 from "react/jsx-runtime";
3
+
4
+ //#region src/components/properties.d.ts
5
+ type PropertyToggleProps = {
6
+ target: string;
7
+ };
8
+ declare function PropertyToggle({
9
+ target
10
+ }: PropertyToggleProps): react_jsx_runtime36.JSX.Element;
11
+ type PropertyDescriptionProps = {
12
+ description?: string;
13
+ };
14
+ declare function PropertyDescription({
15
+ description
16
+ }: PropertyDescriptionProps): react_jsx_runtime36.JSX.Element | undefined;
17
+ type PropertyTitleProps = {
18
+ title?: string;
19
+ };
20
+ declare function PropertyTitle({
21
+ title
22
+ }: PropertyTitleProps): react_jsx_runtime36.JSX.Element | undefined;
23
+ type PropertyProps = {
24
+ id?: string;
25
+ name?: ReactNode;
26
+ typeName?: ReactNode;
27
+ badges?: ReactNode;
28
+ type?: ReactNode;
29
+ description?: string;
30
+ title?: string;
31
+ expand?: boolean;
32
+ deprecated?: boolean | string;
33
+ additional?: ReactNode;
34
+ declaration?: ReactNode;
35
+ constraints?: ReactNode;
36
+ children?: ReactNode;
37
+ };
38
+ declare function Property({
39
+ id,
40
+ name,
41
+ typeName,
42
+ badges,
43
+ type,
44
+ declaration,
45
+ description,
46
+ title,
47
+ deprecated,
48
+ expand,
49
+ additional,
50
+ constraints,
51
+ children
52
+ }: PropertyProps): react_jsx_runtime36.JSX.Element;
53
+ //#endregion
54
+ export { PropertyTitle as a, PropertyToggleProps as c, PropertyProps as i, PropertyDescription as n, PropertyTitleProps as o, PropertyDescriptionProps as r, PropertyToggle as s, Property as t };
@@ -0,0 +1,54 @@
1
+ import * as SDKJSON from "@stainless/sdk-json";
2
+
3
+ //#region src/routing.d.ts
4
+ declare namespace routing_d_exports {
5
+ export { DocsLanguage, LanguageNames, Languages, ParsedStainlessPath, RouteEntry, SpecTreeEntry, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };
6
+ }
7
+ declare const Languages: readonly ["http", "node", "python", "go", "typescript", "terraform", "ruby", "java", "kotlin", "csharp", "php"];
8
+ declare const SupportedLanguageSyntaxes: string[];
9
+ type DocsLanguage = (typeof Languages)[number];
10
+ declare const LanguageNames: Record<DocsLanguage, string>;
11
+ declare function getLanguageSnippet(language: DocsLanguage): "http.curl" | "node.default" | "go.default" | "python.default" | "terraform.default" | "typescript.default" | "ruby.default" | "java.default" | "kotlin.default" | "csharp.default" | "php.default";
12
+ declare function isSupportedLanguage(language: string): language is DocsLanguage;
13
+ type ParsedStainlessPath = ReturnType<typeof parseStainlessPath>;
14
+ declare function parseStainlessPath(stainlessPath: string): {
15
+ resource: string[] | null;
16
+ method: string | null;
17
+ model: string | null;
18
+ routable: string | undefined;
19
+ } | null;
20
+ declare function trimStainlessPath(stainlessPath: string): string;
21
+ declare function getResource(stainlessPath: string): string | undefined;
22
+ declare function parseRoute(basePath: string, route: string): {
23
+ stainlessPath: string;
24
+ language: DocsLanguage;
25
+ };
26
+ declare function generateRoute(basePath: string, language: string, stainlessPath: string): string | null;
27
+ type SpecTreeEntry = {
28
+ data: SDKJSON.Method | SDKJSON.Resource | SDKJSON.Model;
29
+ path: string[];
30
+ };
31
+ declare function walkTree(spec: SDKJSON.Spec, includeModels?: boolean): Generator<SpecTreeEntry, void, any>;
32
+ type RouteEntry = {
33
+ title: string;
34
+ kind: SpecTreeEntry['data']['kind'];
35
+ language: DocsLanguage;
36
+ stainlessPath: string;
37
+ slug: string;
38
+ };
39
+ declare function generateRouteList({
40
+ spec,
41
+ languages,
42
+ excludeLanguages
43
+ }: {
44
+ spec: SDKJSON.Spec;
45
+ languages?: DocsLanguage[];
46
+ excludeLanguages?: DocsLanguage[];
47
+ }): RouteEntry[];
48
+ type ResourceOrMethod = SDKJSON.Resource | SDKJSON.Method;
49
+ declare function findNavigationPath(items: ResourceOrMethod[], target: string): string[] | undefined;
50
+ declare function expandToElement(el: HTMLElement | null): void;
51
+ declare function scrollToPath(stainlessPath: string): void;
52
+ declare function updateHistory(basePath: string, language: DocsLanguage, stainlessPath: string): void;
53
+ //#endregion
54
+ export { routing_d_exports as _, RouteEntry as a, updateHistory as b, expandToElement as c, generateRouteList as d, getLanguageSnippet as f, parseStainlessPath as g, parseRoute as h, ParsedStainlessPath as i, findNavigationPath as l, isSupportedLanguage as m, LanguageNames as n, SpecTreeEntry as o, getResource as p, Languages as r, SupportedLanguageSyntaxes as s, DocsLanguage as t, generateRoute as u, scrollToPath as v, walkTree as x, trimStainlessPath as y };
@@ -0,0 +1,118 @@
1
+ import { t as DocsLanguage } from "./routing-o8okAfJK.js";
2
+ import * as React$1 from "react";
3
+ import * as react_jsx_runtime40 from "react/jsx-runtime";
4
+ import * as SDKJSON from "@stainless/sdk-json";
5
+
6
+ //#region src/components/sdk.d.ts
7
+ type PropertyModelContextType = {
8
+ modelPath?: string;
9
+ propertyPath?: string;
10
+ };
11
+ declare const PropertyModelContext: React$1.Context<PropertyModelContextType>;
12
+ declare function usePropertyModel(): PropertyModelContextType;
13
+ type ReferenceNestingContextType = string[];
14
+ declare const ReferenceNestingContext: React$1.Context<ReferenceNestingContextType>;
15
+ declare function useReferenceNesting(): ReferenceNestingContextType;
16
+ type SDKSnippetLanguagesType = Record<SDKJSON.SnippetLanguage, {
17
+ name: string;
18
+ }>;
19
+ declare const SDKSnippetLanguages: SDKSnippetLanguagesType;
20
+ type TransformRequestSnippetFn = ({
21
+ snippet,
22
+ language
23
+ }: {
24
+ snippet: string;
25
+ language: DocsLanguage;
26
+ }) => string;
27
+ type SDKChildrenProps = {
28
+ paths: SDKJSON.ID[];
29
+ expand?: boolean;
30
+ depth?: number;
31
+ };
32
+ declare function SDKChildren({
33
+ paths,
34
+ expand,
35
+ depth
36
+ }: SDKChildrenProps): react_jsx_runtime40.JSX.Element;
37
+ type SDKDeclarationProps = {
38
+ path: string;
39
+ expand?: boolean;
40
+ depth?: number;
41
+ };
42
+ declare function SDKDeclaration({
43
+ path,
44
+ expand,
45
+ depth
46
+ }: SDKDeclarationProps): react_jsx_runtime40.JSX.Element;
47
+ type SDKConstraintsProps = {
48
+ constraints?: Record<string, any>;
49
+ };
50
+ declare function SDKConstraints({
51
+ constraints
52
+ }: SDKConstraintsProps): react_jsx_runtime40.JSX.Element | undefined;
53
+ type SDKIconProps = {
54
+ language: SDKJSON.SnippetLanguage;
55
+ size?: number;
56
+ };
57
+ declare function SDKIcon({
58
+ language
59
+ }: SDKIconProps): react_jsx_runtime40.JSX.Element | null;
60
+ type SDKRequestTitleProps = {
61
+ snippetLanguage: SDKJSON.SnippetLanguage;
62
+ };
63
+ declare function SDKRequestTitle({
64
+ snippetLanguage
65
+ }: SDKRequestTitleProps): react_jsx_runtime40.JSX.Element;
66
+ type SDKExampleProps = {
67
+ method: SDKJSON.Method;
68
+ transformRequestSnippet?: TransformRequestSnippetFn;
69
+ };
70
+ declare function SDKExample({
71
+ method,
72
+ transformRequestSnippet
73
+ }: SDKExampleProps): react_jsx_runtime40.JSX.Element;
74
+ type SDKMethodProps = {
75
+ method: SDKJSON.Method;
76
+ transformRequestSnippet?: TransformRequestSnippetFn;
77
+ };
78
+ declare function SDKMethodHeader({
79
+ method
80
+ }: SDKMethodProps): react_jsx_runtime40.JSX.Element;
81
+ declare function SDKMethodInfo({
82
+ method
83
+ }: SDKMethodProps): react_jsx_runtime40.JSX.Element;
84
+ declare function SDKMethod({
85
+ method,
86
+ transformRequestSnippet
87
+ }: SDKMethodProps): react_jsx_runtime40.JSX.Element;
88
+ type SDKModelProps = {
89
+ model: SDKJSON.Model;
90
+ };
91
+ declare function SDKModel({
92
+ model
93
+ }: SDKModelProps): react_jsx_runtime40.JSX.Element | null;
94
+ type SDKReferenceProps = {
95
+ stainlessPath: string;
96
+ children?: React$1.ReactNode;
97
+ };
98
+ declare function SDKReference({
99
+ stainlessPath,
100
+ children
101
+ }: SDKReferenceProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime40.JSX.Element | null | undefined;
102
+ type SDKLanguageBlockProps = {
103
+ language: DocsLanguage;
104
+ version: string;
105
+ install: string;
106
+ links: {
107
+ repo: string;
108
+ docs: string;
109
+ };
110
+ };
111
+ declare function SDKLanguageBlock({
112
+ language,
113
+ version,
114
+ install,
115
+ links
116
+ }: SDKLanguageBlockProps): react_jsx_runtime40.JSX.Element;
117
+ //#endregion
118
+ export { TransformRequestSnippetFn as C, SDKSnippetLanguagesType as S, useReferenceNesting as T, SDKModelProps as _, SDKChildren as a, SDKRequestTitleProps as b, SDKDeclaration as c, SDKLanguageBlock as d, SDKMethod as f, SDKModel as g, SDKMethodProps as h, ReferenceNestingContextType as i, SDKExample as l, SDKMethodInfo as m, PropertyModelContextType as n, SDKConstraints as o, SDKMethodHeader as p, ReferenceNestingContext as r, SDKConstraintsProps as s, PropertyModelContext as t, SDKIcon as u, SDKReference as v, usePropertyModel as w, SDKSnippetLanguages as x, SDKRequestTitle as y };
@@ -1,6 +1,6 @@
1
1
  import { t as DocsLanguage } from "./routing-CUnVDpU-.js";
2
2
  import * as React$1 from "react";
3
- import * as react_jsx_runtime35 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime34 from "react/jsx-runtime";
4
4
  import * as SDKJSON from "@stainless/sdk-json";
5
5
 
6
6
  //#region src/components/sdk.d.ts
@@ -33,7 +33,7 @@ declare function SDKChildren({
33
33
  paths,
34
34
  expand,
35
35
  depth
36
- }: SDKChildrenProps): react_jsx_runtime35.JSX.Element;
36
+ }: SDKChildrenProps): react_jsx_runtime34.JSX.Element;
37
37
  type SDKDeclarationProps = {
38
38
  path: string;
39
39
  expand?: boolean;
@@ -43,26 +43,26 @@ declare function SDKDeclaration({
43
43
  path,
44
44
  expand,
45
45
  depth
46
- }: SDKDeclarationProps): react_jsx_runtime35.JSX.Element;
46
+ }: SDKDeclarationProps): react_jsx_runtime34.JSX.Element;
47
47
  type SDKConstraintsProps = {
48
48
  constraints?: Record<string, any>;
49
49
  };
50
50
  declare function SDKConstraints({
51
51
  constraints
52
- }: SDKConstraintsProps): react_jsx_runtime35.JSX.Element | undefined;
52
+ }: SDKConstraintsProps): react_jsx_runtime34.JSX.Element | undefined;
53
53
  type SDKIconProps = {
54
54
  language: SDKJSON.SnippetLanguage;
55
55
  size?: number;
56
56
  };
57
57
  declare function SDKIcon({
58
58
  language
59
- }: SDKIconProps): react_jsx_runtime35.JSX.Element | null;
59
+ }: SDKIconProps): react_jsx_runtime34.JSX.Element | null;
60
60
  type SDKRequestTitleProps = {
61
61
  snippetLanguage: SDKJSON.SnippetLanguage;
62
62
  };
63
63
  declare function SDKRequestTitle({
64
64
  snippetLanguage
65
- }: SDKRequestTitleProps): react_jsx_runtime35.JSX.Element;
65
+ }: SDKRequestTitleProps): react_jsx_runtime34.JSX.Element;
66
66
  type SDKExampleProps = {
67
67
  method: SDKJSON.Method;
68
68
  transformRequestSnippet?: TransformRequestSnippetFn;
@@ -70,27 +70,27 @@ type SDKExampleProps = {
70
70
  declare function SDKExample({
71
71
  method,
72
72
  transformRequestSnippet
73
- }: SDKExampleProps): react_jsx_runtime35.JSX.Element;
73
+ }: SDKExampleProps): react_jsx_runtime34.JSX.Element;
74
74
  type SDKMethodProps = {
75
75
  method: SDKJSON.Method;
76
76
  transformRequestSnippet?: TransformRequestSnippetFn;
77
77
  };
78
78
  declare function SDKMethodHeader({
79
79
  method
80
- }: SDKMethodProps): react_jsx_runtime35.JSX.Element;
80
+ }: SDKMethodProps): react_jsx_runtime34.JSX.Element;
81
81
  declare function SDKMethodInfo({
82
82
  method
83
- }: SDKMethodProps): react_jsx_runtime35.JSX.Element;
83
+ }: SDKMethodProps): react_jsx_runtime34.JSX.Element;
84
84
  declare function SDKMethod({
85
85
  method,
86
86
  transformRequestSnippet
87
- }: SDKMethodProps): react_jsx_runtime35.JSX.Element;
87
+ }: SDKMethodProps): react_jsx_runtime34.JSX.Element;
88
88
  type SDKModelProps = {
89
89
  model: SDKJSON.Model;
90
90
  };
91
91
  declare function SDKModel({
92
92
  model
93
- }: SDKModelProps): react_jsx_runtime35.JSX.Element | null;
93
+ }: SDKModelProps): react_jsx_runtime34.JSX.Element | null;
94
94
  type SDKReferenceProps = {
95
95
  stainlessPath: string;
96
96
  children?: React$1.ReactNode;
@@ -98,7 +98,7 @@ type SDKReferenceProps = {
98
98
  declare function SDKReference({
99
99
  stainlessPath,
100
100
  children
101
- }: SDKReferenceProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime35.JSX.Element | null | undefined;
101
+ }: SDKReferenceProps): string | number | bigint | boolean | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | react_jsx_runtime34.JSX.Element | null | undefined;
102
102
  type SDKLanguageBlockProps = {
103
103
  language: DocsLanguage;
104
104
  version: string;
@@ -113,6 +113,6 @@ declare function SDKLanguageBlock({
113
113
  version,
114
114
  install,
115
115
  links
116
- }: SDKLanguageBlockProps): react_jsx_runtime35.JSX.Element;
116
+ }: SDKLanguageBlockProps): react_jsx_runtime34.JSX.Element;
117
117
  //#endregion
118
118
  export { TransformRequestSnippetFn as C, SDKSnippetLanguagesType as S, useReferenceNesting as T, SDKModelProps as _, SDKChildren as a, SDKRequestTitleProps as b, SDKDeclaration as c, SDKLanguageBlock as d, SDKMethod as f, SDKModel as g, SDKMethodProps as h, ReferenceNestingContextType as i, SDKExample as l, SDKMethodInfo as m, PropertyModelContextType as n, SDKConstraints as o, SDKMethodHeader as p, ReferenceNestingContext as r, SDKConstraintsProps as s, PropertyModelContext as t, SDKIcon as u, SDKReference as v, usePropertyModel as w, SDKSnippetLanguages as x, SDKRequestTitle as y };
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from "react";
2
- import * as react_jsx_runtime47 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime50 from "react/jsx-runtime";
3
3
  import * as SDKJSON from "@stainless/sdk-json";
4
4
 
5
5
  //#region src/components/sidebar.d.ts
@@ -12,25 +12,25 @@ declare function SidebarExpander({
12
12
  open,
13
13
  summary,
14
14
  children
15
- }: SidebarExpanderProps): react_jsx_runtime47.JSX.Element;
15
+ }: SidebarExpanderProps): react_jsx_runtime50.JSX.Element;
16
16
  type SidebarMethodProps = {
17
17
  method: SDKJSON.Method;
18
18
  };
19
19
  declare function SidebarMethod({
20
20
  method
21
- }: SidebarMethodProps): react_jsx_runtime47.JSX.Element;
21
+ }: SidebarMethodProps): react_jsx_runtime50.JSX.Element;
22
22
  type SidebarResourceProps = {
23
23
  resource: SDKJSON.Resource;
24
24
  };
25
25
  declare function SidebarResource({
26
26
  resource
27
- }: SidebarResourceProps): react_jsx_runtime47.JSX.Element;
27
+ }: SidebarResourceProps): react_jsx_runtime50.JSX.Element;
28
28
  type SidebarProps = {
29
29
  resources: SDKJSON.Resource[];
30
30
  selectedPath?: string;
31
31
  };
32
32
  declare function Sidebar({
33
33
  resources
34
- }: SidebarProps): react_jsx_runtime47.JSX.Element;
34
+ }: SidebarProps): react_jsx_runtime50.JSX.Element;
35
35
  //#endregion
36
36
  export { SidebarProps as a, SidebarMethodProps as i, SidebarExpander as n, SidebarResource as o, SidebarMethod as r, SidebarResourceProps as s, Sidebar as t };
@@ -0,0 +1,36 @@
1
+ import * as React$1 from "react";
2
+ import * as react_jsx_runtime53 from "react/jsx-runtime";
3
+ import * as SDKJSON from "@stainless/sdk-json";
4
+
5
+ //#region src/components/sidebar.d.ts
6
+ type SidebarExpanderProps = {
7
+ open?: boolean;
8
+ summary: React$1.ReactNode;
9
+ children?: React$1.ReactNode;
10
+ };
11
+ declare function SidebarExpander({
12
+ open,
13
+ summary,
14
+ children
15
+ }: SidebarExpanderProps): react_jsx_runtime53.JSX.Element;
16
+ type SidebarMethodProps = {
17
+ method: SDKJSON.Method;
18
+ };
19
+ declare function SidebarMethod({
20
+ method
21
+ }: SidebarMethodProps): react_jsx_runtime53.JSX.Element;
22
+ type SidebarResourceProps = {
23
+ resource: SDKJSON.Resource;
24
+ };
25
+ declare function SidebarResource({
26
+ resource
27
+ }: SidebarResourceProps): react_jsx_runtime53.JSX.Element;
28
+ type SidebarProps = {
29
+ resources: SDKJSON.Resource[];
30
+ selectedPath?: string;
31
+ };
32
+ declare function Sidebar({
33
+ resources
34
+ }: SidebarProps): react_jsx_runtime53.JSX.Element;
35
+ //#endregion
36
+ export { SidebarProps as a, SidebarMethodProps as i, SidebarExpander as n, SidebarResource as o, SidebarMethod as r, SidebarResourceProps as s, Sidebar as t };