@stainless-api/docs-ui 0.1.0-beta.73 → 0.1.0-beta.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-BN_g-Awi.js → chunk-BYypO7fO.js} +3 -3
- package/dist/components/MaskedInput.d.ts +3 -3
- package/dist/components/MaskedInput.js +1 -1
- package/dist/components/breadcrumbs.d.ts +24 -1
- package/dist/components/breadcrumbs.js +62 -7
- package/dist/components/icons.d.ts +18 -13
- package/dist/components/icons.js +940 -2
- package/dist/components/index.d.ts +16 -14
- package/dist/components/index.js +72 -18
- package/dist/components/method.d.ts +58 -1
- package/dist/components/method.js +95 -8
- package/dist/components/overview.d.ts +38 -1
- package/dist/components/overview.js +137 -9
- package/dist/components/primitives.d.ts +104 -1
- package/dist/components/primitives.js +250 -6
- package/dist/components/properties.d.ts +53 -1
- package/dist/components/properties.js +138 -7
- package/dist/components/sdk-sidebar.d.ts +14 -1
- package/dist/components/sdk-sidebar.js +50 -8
- package/dist/components/sdk.d.ts +121 -1
- package/dist/components/sdk.js +405 -8
- package/dist/components/snippets.d.ts +70 -13
- package/dist/components/snippets.js +182 -7
- package/dist/components/stl-sidebar.d.ts +57 -1
- package/dist/components/stl-sidebar.js +105 -3
- package/dist/contexts/component-generics.d.ts +29 -1
- package/dist/contexts/component-generics.js +31 -1
- package/dist/contexts/component-types.d.ts +4 -15
- package/dist/contexts/component.d.ts +7 -17
- package/dist/contexts/component.js +22 -28
- package/dist/contexts/docs.d.ts +61 -1
- package/dist/contexts/docs.js +89 -1
- package/dist/contexts/index.d.ts +13 -14
- package/dist/contexts/index.js +44 -6
- package/dist/contexts/markdown.d.ts +21 -1
- package/dist/contexts/markdown.js +47 -2
- package/dist/contexts/navigation.d.ts +28 -1
- package/dist/contexts/navigation.js +22 -1
- package/dist/contexts/use-components.d.ts +1 -13
- package/dist/contexts/use-components.js +6 -2
- package/dist/{index-HDt5wRiR.d.ts → index-Cl6Gny0o.d.ts} +37 -2
- package/dist/index.d.ts +4 -14
- package/dist/index.js +7 -30
- package/dist/languages/cli.d.ts +38 -14
- package/dist/languages/cli.js +166 -20
- package/dist/languages/csharp.d.ts +42 -14
- package/dist/languages/csharp.js +283 -8
- package/dist/languages/go.d.ts +40 -14
- package/dist/languages/go.js +303 -8
- package/dist/languages/http.d.ts +46 -14
- package/dist/languages/http.js +390 -19
- package/dist/languages/index.d.ts +51 -14
- package/dist/languages/index.js +32 -28
- package/dist/languages/java.d.ts +43 -14
- package/dist/languages/java.js +403 -8
- package/dist/languages/php.d.ts +40 -0
- package/dist/languages/php.js +313 -0
- package/dist/languages/python.d.ts +40 -14
- package/dist/languages/python.js +269 -8
- package/dist/languages/ruby.d.ts +40 -14
- package/dist/languages/ruby.js +387 -8
- package/dist/languages/terraform.d.ts +48 -14
- package/dist/languages/terraform.js +243 -8
- package/dist/languages/typescript.d.ts +40 -14
- package/dist/languages/typescript.js +449 -8
- package/dist/markdown/index.d.ts +1 -2
- package/dist/markdown/index.js +1 -28
- package/dist/markdown/printer.d.ts +2 -2
- package/dist/markdown/printer.js +6 -30
- package/dist/markdown/utils.d.ts +3 -3
- package/dist/routing.d.ts +61 -2
- package/dist/routing.js +205 -2
- package/dist/spec.d.ts +2 -2
- package/dist/spec.js +2 -2
- package/dist/style.js +176 -1
- package/dist/use-strict-context-L0c8JKg4.js +16 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +53 -2
- package/package.json +3 -3
- package/dist/breadcrumbs-Dei_5sHd.d.ts +0 -25
- package/dist/breadcrumbs-oUp-6oJK.js +0 -63
- package/dist/cli-BX9ofVCR.js +0 -166
- package/dist/component-Dl5ZEHxB.js +0 -23
- package/dist/component-generics-C9ALAcZI.d.ts +0 -30
- package/dist/component-generics-POFirVVb.js +0 -45
- package/dist/components-DQPlXEwE.js +0 -72
- package/dist/contexts-_NNW5yqC.js +0 -44
- package/dist/csharp-sn5CJu9t.js +0 -283
- package/dist/docs-YgoQ3bzY.js +0 -81
- package/dist/docs-x-kfjRMc.d.ts +0 -66
- package/dist/go-BoaAVmP0.js +0 -303
- package/dist/http-Ccj1dOvE.js +0 -389
- package/dist/icons-BYKn5X8E.js +0 -885
- package/dist/index-OCM-LZIo.d.ts +0 -428
- package/dist/java-BiLRuLuD.js +0 -403
- package/dist/languages-COjc0Nwx.js +0 -30
- package/dist/markdown-BszOPZhh.d.ts +0 -22
- package/dist/markdown-Cq3XEhrR.js +0 -49
- package/dist/method-DjzVBzZe.js +0 -96
- package/dist/method-KkWyhvKa.d.ts +0 -59
- package/dist/navigation-BZjwfN2P.d.ts +0 -29
- package/dist/navigation-aoYZ_tl4.js +0 -24
- package/dist/overview-BNmMeDUE.d.ts +0 -39
- package/dist/overview-Clq5psZe.js +0 -138
- package/dist/primitives-B8OnSXRP.d.ts +0 -105
- package/dist/primitives-BBUs_flm.js +0 -250
- package/dist/properties-BhlRtWo4.d.ts +0 -54
- package/dist/properties-DQU0NBzb.js +0 -138
- package/dist/python-nqOBH7GS.js +0 -269
- package/dist/routing-GvhEMw6E.js +0 -205
- package/dist/routing-qJMPICGo.d.ts +0 -61
- package/dist/ruby-BBc8HdIt.js +0 -387
- package/dist/sdk-C8C6IRQp.d.ts +0 -122
- package/dist/sdk-DzCHhEoX.js +0 -405
- package/dist/sdk-sidebar-CkjSLggl.js +0 -50
- package/dist/sdk-sidebar-lgNmf-ns.d.ts +0 -15
- package/dist/snippets-CLpNVNlA.js +0 -181
- package/dist/stl-sidebar-8jF9cdnn.d.ts +0 -58
- package/dist/stl-sidebar-DC5UOJiT.js +0 -106
- package/dist/style-DJIYkFhO.js +0 -178
- package/dist/terraform-DVx2ea2h.js +0 -243
- package/dist/typescript-Cmk-jBBw.js +0 -449
- package/dist/use-components-BUz3GbO4.js +0 -7
- package/dist/utils-D6zJxUZ9.js +0 -54
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { Badge, Expander, Input, InputProps, Join, Link, ListView, ListViewProps, Markdown, ToggleButton, ToggleButtonProps, Tooltip, VirtualExpander } from "./primitives.js";
|
|
2
|
+
import { SDKBreadcrumbs, generateApiBreadcrumbs } from "./breadcrumbs.js";
|
|
3
|
+
import { Method, MethodDescription, MethodDescriptionProps, MethodHeader, MethodHeaderProps, MethodInfo, MethodInfoProps, MethodProps, MethodRoute, MethodRouteProps } from "./method.js";
|
|
4
|
+
import { Property, PropertyDescription, PropertyDescriptionProps, PropertyProps, PropertyTitle, PropertyTitleProps, PropertyToggle, PropertyToggleProps } from "./properties.js";
|
|
5
|
+
import { PropertyModelContext, PropertyModelContextType, ReferenceNestingContext, ReferenceNestingContextType, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodProps, SDKModel, SDKModelProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKSnippetLanguages, SDKSnippetLanguagesType, TransformRequestSnippetFn, usePropertyModel, useReferenceNesting, useStreamingResponse } from "./sdk.js";
|
|
6
|
+
import { MultiSnippets, MultiSnippetsProps, Snippet, SnippetButtons, SnippetCode, SnippetCodeProps, SnippetContainer, SnippetContainerProps, SnippetFooter, SnippetProps, SnippetRequestContainer, SnippetRequestContainerProps, SnippetResponse } from "./snippets.js";
|
|
7
|
+
import { SDKMethodSummary, SDKMethodSummaryProps, SDKOverview, SDKOverviewProps, SDKResource, SDKResourceHeader, SDKResourceProps, SDKRoot, SDKRootProps } from "./overview.js";
|
|
8
|
+
import { SDKSidebar, SDKSidebarProps } from "./sdk-sidebar.js";
|
|
9
|
+
import { StlSidebar, StlSidebarEntry, StlSidebarGroup, StlSidebarLink, StlSidebarProps, StlSidebarTarget } from "./stl-sidebar.js";
|
|
10
|
+
|
|
11
|
+
//#region src/components/index.d.ts
|
|
12
|
+
declare namespace index_d_exports {
|
|
13
|
+
export { Badge, Expander, Input, InputProps, Join, Link, ListView, ListViewProps, Markdown, Method, MethodDescription, MethodDescriptionProps, MethodHeader, MethodHeaderProps, MethodInfo, MethodInfoProps, MethodProps, MethodRoute, MethodRouteProps, MultiSnippets, MultiSnippetsProps, Property, PropertyDescription, PropertyDescriptionProps, PropertyModelContext, PropertyModelContextType, PropertyProps, PropertyTitle, PropertyTitleProps, PropertyToggle, PropertyToggleProps, ReferenceNestingContext, ReferenceNestingContextType, SDKBreadcrumbs, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodProps, SDKMethodSummary, SDKMethodSummaryProps, SDKModel, SDKModelProps, SDKOverview, SDKOverviewProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKResource, SDKResourceHeader, SDKResourceProps, SDKRoot, SDKRootProps, SDKSidebar, SDKSidebarProps, SDKSnippetLanguages, SDKSnippetLanguagesType, Snippet, SnippetButtons, SnippetCode, SnippetCodeProps, SnippetContainer, SnippetContainerProps, SnippetFooter, SnippetProps, SnippetRequestContainer, SnippetRequestContainerProps, SnippetResponse, StlSidebar, StlSidebarEntry, StlSidebarGroup, StlSidebarLink, StlSidebarProps, StlSidebarTarget, ToggleButton, ToggleButtonProps, Tooltip, TransformRequestSnippetFn, VirtualExpander, generateApiBreadcrumbs, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Badge, Expander, Input, InputProps, Join, Link, ListView, ListViewProps, Markdown, Method, MethodDescription, MethodDescriptionProps, MethodHeader, MethodHeaderProps, MethodInfo, MethodInfoProps, MethodProps, MethodRoute, MethodRouteProps, MultiSnippets, MultiSnippetsProps, Property, PropertyDescription, PropertyDescriptionProps, PropertyModelContext, PropertyModelContextType, PropertyProps, PropertyTitle, PropertyTitleProps, PropertyToggle, PropertyToggleProps, ReferenceNestingContext, ReferenceNestingContextType, SDKBreadcrumbs, SDKChildren, SDKConstraints, SDKConstraintsProps, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodProps, SDKMethodSummary, SDKMethodSummaryProps, SDKModel, SDKModelProps, SDKOverview, SDKOverviewProps, SDKReference, SDKRequestTitle, SDKRequestTitleProps, SDKResource, SDKResourceHeader, SDKResourceProps, SDKRoot, SDKRootProps, SDKSidebar, SDKSidebarProps, SDKSnippetLanguages, SDKSnippetLanguagesType, Snippet, SnippetButtons, SnippetCode, SnippetCodeProps, SnippetContainer, SnippetContainerProps, SnippetFooter, SnippetProps, SnippetRequestContainer, SnippetRequestContainerProps, SnippetResponse, StlSidebar, StlSidebarEntry, StlSidebarGroup, StlSidebarLink, StlSidebarProps, StlSidebarTarget, ToggleButton, ToggleButtonProps, Tooltip, TransformRequestSnippetFn, VirtualExpander, generateApiBreadcrumbs, index_d_exports as t, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
package/dist/components/index.js
CHANGED
|
@@ -1,19 +1,73 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import "
|
|
11
|
-
import {
|
|
12
|
-
import { a as SnippetContainer, c as SnippetResponse, i as SnippetCode, n as Snippet, o as SnippetFooter, r as SnippetButtons, s as SnippetRequestContainer, t as MultiSnippets } from "../snippets-CLpNVNlA.js";
|
|
13
|
-
import { a as SDKRoot, i as SDKResourceHeader, n as SDKOverview, r as SDKResource, t as SDKMethodSummary } from "../overview-Clq5psZe.js";
|
|
14
|
-
import { n as generateApiBreadcrumbs, t as SDKBreadcrumbs } from "../breadcrumbs-oUp-6oJK.js";
|
|
15
|
-
import { t as StlSidebar } from "../stl-sidebar-DC5UOJiT.js";
|
|
16
|
-
import { t as SDKSidebar } from "../sdk-sidebar-CkjSLggl.js";
|
|
17
|
-
import "../components-DQPlXEwE.js";
|
|
1
|
+
import { t as __exportAll } from "../chunk-BYypO7fO.js";
|
|
2
|
+
import "../use-strict-context-L0c8JKg4.js";
|
|
3
|
+
import { Property, PropertyDescription, PropertyTitle, PropertyToggle } from "./properties.js";
|
|
4
|
+
import { Method, MethodDescription, MethodHeader, MethodInfo, MethodRoute } from "./method.js";
|
|
5
|
+
import { Badge, Expander, Input, Join, Link, ListView, Markdown, ToggleButton, Tooltip, VirtualExpander } from "./primitives.js";
|
|
6
|
+
import { PropertyModelContext, ReferenceNestingContext, SDKChildren, SDKConstraints, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKModel, SDKReference, SDKRequestTitle, SDKSnippetLanguages, usePropertyModel, useReferenceNesting, useStreamingResponse } from "./sdk.js";
|
|
7
|
+
import { MultiSnippets, Snippet, SnippetButtons, SnippetCode, SnippetContainer, SnippetFooter, SnippetRequestContainer, SnippetResponse } from "./snippets.js";
|
|
8
|
+
import { SDKMethodSummary, SDKOverview, SDKResource, SDKResourceHeader, SDKRoot } from "./overview.js";
|
|
9
|
+
import { SDKBreadcrumbs, generateApiBreadcrumbs } from "./breadcrumbs.js";
|
|
10
|
+
import { StlSidebar } from "./stl-sidebar.js";
|
|
11
|
+
import { SDKSidebar } from "./sdk-sidebar.js";
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
//#region src/components/index.ts
|
|
14
|
+
var components_exports = /* @__PURE__ */ __exportAll({
|
|
15
|
+
Badge: () => Badge,
|
|
16
|
+
Expander: () => Expander,
|
|
17
|
+
Input: () => Input,
|
|
18
|
+
Join: () => Join,
|
|
19
|
+
Link: () => Link,
|
|
20
|
+
ListView: () => ListView,
|
|
21
|
+
Markdown: () => Markdown,
|
|
22
|
+
Method: () => Method,
|
|
23
|
+
MethodDescription: () => MethodDescription,
|
|
24
|
+
MethodHeader: () => MethodHeader,
|
|
25
|
+
MethodInfo: () => MethodInfo,
|
|
26
|
+
MethodRoute: () => MethodRoute,
|
|
27
|
+
MultiSnippets: () => MultiSnippets,
|
|
28
|
+
Property: () => Property,
|
|
29
|
+
PropertyDescription: () => PropertyDescription,
|
|
30
|
+
PropertyModelContext: () => PropertyModelContext,
|
|
31
|
+
PropertyTitle: () => PropertyTitle,
|
|
32
|
+
PropertyToggle: () => PropertyToggle,
|
|
33
|
+
ReferenceNestingContext: () => ReferenceNestingContext,
|
|
34
|
+
SDKBreadcrumbs: () => SDKBreadcrumbs,
|
|
35
|
+
SDKChildren: () => SDKChildren,
|
|
36
|
+
SDKConstraints: () => SDKConstraints,
|
|
37
|
+
SDKDeclaration: () => SDKDeclaration,
|
|
38
|
+
SDKExample: () => SDKExample,
|
|
39
|
+
SDKIcon: () => SDKIcon,
|
|
40
|
+
SDKLanguageBlock: () => SDKLanguageBlock,
|
|
41
|
+
SDKMethod: () => SDKMethod,
|
|
42
|
+
SDKMethodHeader: () => SDKMethodHeader,
|
|
43
|
+
SDKMethodInfo: () => SDKMethodInfo,
|
|
44
|
+
SDKMethodNotImplemented: () => SDKMethodNotImplemented,
|
|
45
|
+
SDKMethodSummary: () => SDKMethodSummary,
|
|
46
|
+
SDKModel: () => SDKModel,
|
|
47
|
+
SDKOverview: () => SDKOverview,
|
|
48
|
+
SDKReference: () => SDKReference,
|
|
49
|
+
SDKRequestTitle: () => SDKRequestTitle,
|
|
50
|
+
SDKResource: () => SDKResource,
|
|
51
|
+
SDKResourceHeader: () => SDKResourceHeader,
|
|
52
|
+
SDKRoot: () => SDKRoot,
|
|
53
|
+
SDKSidebar: () => SDKSidebar,
|
|
54
|
+
SDKSnippetLanguages: () => SDKSnippetLanguages,
|
|
55
|
+
Snippet: () => Snippet,
|
|
56
|
+
SnippetButtons: () => SnippetButtons,
|
|
57
|
+
SnippetCode: () => SnippetCode,
|
|
58
|
+
SnippetContainer: () => SnippetContainer,
|
|
59
|
+
SnippetFooter: () => SnippetFooter,
|
|
60
|
+
SnippetRequestContainer: () => SnippetRequestContainer,
|
|
61
|
+
SnippetResponse: () => SnippetResponse,
|
|
62
|
+
StlSidebar: () => StlSidebar,
|
|
63
|
+
ToggleButton: () => ToggleButton,
|
|
64
|
+
Tooltip: () => Tooltip,
|
|
65
|
+
VirtualExpander: () => VirtualExpander,
|
|
66
|
+
generateApiBreadcrumbs: () => generateApiBreadcrumbs,
|
|
67
|
+
usePropertyModel: () => usePropertyModel,
|
|
68
|
+
useReferenceNesting: () => useReferenceNesting,
|
|
69
|
+
useStreamingResponse: () => useStreamingResponse
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
export { Badge, Expander, Input, Join, Link, ListView, Markdown, Method, MethodDescription, MethodHeader, MethodInfo, MethodRoute, MultiSnippets, Property, PropertyDescription, PropertyModelContext, PropertyTitle, PropertyToggle, ReferenceNestingContext, SDKBreadcrumbs, SDKChildren, SDKConstraints, SDKDeclaration, SDKExample, SDKIcon, SDKLanguageBlock, SDKMethod, SDKMethodHeader, SDKMethodInfo, SDKMethodNotImplemented, SDKMethodSummary, SDKModel, SDKOverview, SDKReference, SDKRequestTitle, SDKResource, SDKResourceHeader, SDKRoot, SDKSidebar, SDKSnippetLanguages, Snippet, SnippetButtons, SnippetCode, SnippetContainer, SnippetFooter, SnippetRequestContainer, SnippetResponse, StlSidebar, ToggleButton, Tooltip, VirtualExpander, generateApiBreadcrumbs, components_exports as t, usePropertyModel, useReferenceNesting, useStreamingResponse };
|
|
@@ -1,2 +1,59 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/method.d.ts
|
|
6
|
+
type MethodHeaderProps = {
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
level?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5';
|
|
9
|
+
signature?: ReactNode;
|
|
10
|
+
badges?: ReactNode;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
declare function MethodHeader({
|
|
14
|
+
title,
|
|
15
|
+
badges,
|
|
16
|
+
signature,
|
|
17
|
+
children,
|
|
18
|
+
level
|
|
19
|
+
}: MethodHeaderProps): react_jsx_runtime0.JSX.Element;
|
|
20
|
+
type MethodRouteProps = {
|
|
21
|
+
httpMethod?: string;
|
|
22
|
+
endpoint?: string | ReactNode;
|
|
23
|
+
iconOnly?: boolean;
|
|
24
|
+
};
|
|
25
|
+
declare function MethodRoute({
|
|
26
|
+
httpMethod,
|
|
27
|
+
endpoint,
|
|
28
|
+
iconOnly
|
|
29
|
+
}: MethodRouteProps): react_jsx_runtime0.JSX.Element;
|
|
30
|
+
type MethodDescriptionProps = {
|
|
31
|
+
description?: string;
|
|
32
|
+
};
|
|
33
|
+
declare function MethodDescription({
|
|
34
|
+
description
|
|
35
|
+
}: MethodDescriptionProps): react_jsx_runtime0.JSX.Element | undefined;
|
|
36
|
+
type MethodInfoProps = {
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
parameters?: ReactNode;
|
|
39
|
+
returns?: ReactNode;
|
|
40
|
+
};
|
|
41
|
+
declare function MethodInfo({
|
|
42
|
+
children,
|
|
43
|
+
parameters,
|
|
44
|
+
returns
|
|
45
|
+
}: MethodInfoProps): react_jsx_runtime0.JSX.Element;
|
|
46
|
+
type MethodProps = {
|
|
47
|
+
id?: string;
|
|
48
|
+
header?: ReactNode;
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
} & React$1.HTMLProps<HTMLDivElement>;
|
|
51
|
+
declare function Method({
|
|
52
|
+
id,
|
|
53
|
+
header,
|
|
54
|
+
children,
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: MethodProps): react_jsx_runtime0.JSX.Element;
|
|
58
|
+
//#endregion
|
|
2
59
|
export { Method, MethodDescription, MethodDescriptionProps, MethodHeader, MethodHeaderProps, MethodInfo, MethodInfoProps, MethodProps, MethodRoute, MethodRouteProps };
|
|
@@ -1,10 +1,97 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import "../
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import {
|
|
1
|
+
import "../use-strict-context-L0c8JKg4.js";
|
|
2
|
+
import { useComponents } from "../contexts/use-components.js";
|
|
3
|
+
import style_default from "../style.js";
|
|
4
|
+
import { PropertyToggle } from "./properties.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import clsx from "clsx";
|
|
8
|
+
import { Badge, getHttpMethod } from "@stainless-api/ui-primitives";
|
|
9
|
+
import { FunctionIcon } from "@stainless-api/ui-primitives/icons";
|
|
9
10
|
|
|
11
|
+
//#region src/components/method.tsx
|
|
12
|
+
function MethodHeader({ title, badges, signature, children, level }) {
|
|
13
|
+
const Heading = level ?? "h5";
|
|
14
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
15
|
+
className: style_default.MethodHeader,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Heading, {
|
|
18
|
+
className: style_default.MethodTitle,
|
|
19
|
+
children: title
|
|
20
|
+
}),
|
|
21
|
+
badges && /* @__PURE__ */ jsx("div", {
|
|
22
|
+
className: style_default.MethodBadges,
|
|
23
|
+
children: badges
|
|
24
|
+
}),
|
|
25
|
+
signature,
|
|
26
|
+
children
|
|
27
|
+
]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function MethodRoute({ httpMethod, endpoint, iconOnly }) {
|
|
31
|
+
const httpMethodTyped = getHttpMethod(httpMethod);
|
|
32
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: style_default.MethodRoute,
|
|
34
|
+
children: [httpMethod ? httpMethodTyped && /* @__PURE__ */ jsx(Badge.HTTP, {
|
|
35
|
+
method: httpMethodTyped,
|
|
36
|
+
iconOnly,
|
|
37
|
+
size: "sm"
|
|
38
|
+
}) : /* @__PURE__ */ jsx(Badge, {
|
|
39
|
+
size: "sm",
|
|
40
|
+
icon: /* @__PURE__ */ jsx(FunctionIcon, {}),
|
|
41
|
+
intent: "info",
|
|
42
|
+
children: !iconOnly && "Function"
|
|
43
|
+
}), endpoint && /* @__PURE__ */ jsx("span", {
|
|
44
|
+
className: style_default.MethodRouteEndpoint,
|
|
45
|
+
children: endpoint
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function MethodDescription({ description }) {
|
|
50
|
+
const { Markdown } = useComponents();
|
|
51
|
+
if (description) return /* @__PURE__ */ jsx("div", {
|
|
52
|
+
className: style_default.MethodDescription,
|
|
53
|
+
children: /* @__PURE__ */ jsx(Markdown, { content: description })
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function MethodInfo({ children, parameters, returns }) {
|
|
57
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
58
|
+
className: style_default.MethodInfo,
|
|
59
|
+
children: [
|
|
60
|
+
children && /* @__PURE__ */ jsx("div", {
|
|
61
|
+
className: style_default.MethodContent,
|
|
62
|
+
children
|
|
63
|
+
}),
|
|
64
|
+
parameters && /* @__PURE__ */ jsxs("div", {
|
|
65
|
+
className: style_default.MethodInfoSection,
|
|
66
|
+
children: [/* @__PURE__ */ jsxs("h5", { children: ["Parameters", /* @__PURE__ */ jsx(PropertyToggle, { target: "parameters" })] }), /* @__PURE__ */ jsx("div", {
|
|
67
|
+
className: style_default.MethodParameters,
|
|
68
|
+
"data-stldocs-property-group": "parameters",
|
|
69
|
+
children: parameters
|
|
70
|
+
})]
|
|
71
|
+
}),
|
|
72
|
+
returns && /* @__PURE__ */ jsxs("div", {
|
|
73
|
+
className: style_default.MethodInfoSection,
|
|
74
|
+
children: [/* @__PURE__ */ jsxs("h5", { children: ["Returns", /* @__PURE__ */ jsx(PropertyToggle, { target: "returns" })] }), /* @__PURE__ */ jsx("div", {
|
|
75
|
+
className: style_default.MethodReturns,
|
|
76
|
+
"data-stldocs-property-group": "returns",
|
|
77
|
+
children: returns
|
|
78
|
+
})]
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function Method({ id, header, children, className, ...props }) {
|
|
84
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
85
|
+
id,
|
|
86
|
+
className: clsx(style_default.Method, className),
|
|
87
|
+
tabIndex: 0,
|
|
88
|
+
...props,
|
|
89
|
+
children: [header, /* @__PURE__ */ jsx("div", {
|
|
90
|
+
className: style_default.MethodBody,
|
|
91
|
+
children
|
|
92
|
+
})]
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
10
97
|
export { Method, MethodDescription, MethodHeader, MethodInfo, MethodRoute };
|
|
@@ -1,2 +1,39 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as Method, h as Resource } from "../index-Cl6Gny0o.js";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/overview.d.ts
|
|
5
|
+
type SDKResourceProps = {
|
|
6
|
+
resource: Resource;
|
|
7
|
+
parents?: Resource[];
|
|
8
|
+
};
|
|
9
|
+
declare function SDKResourceHeader({
|
|
10
|
+
resource,
|
|
11
|
+
parents
|
|
12
|
+
}: SDKResourceProps): react_jsx_runtime0.JSX.Element | null;
|
|
13
|
+
type SDKMethodSummaryProps = {
|
|
14
|
+
method: Method;
|
|
15
|
+
};
|
|
16
|
+
declare function SDKMethodSummary({
|
|
17
|
+
method
|
|
18
|
+
}: SDKMethodSummaryProps): react_jsx_runtime0.JSX.Element;
|
|
19
|
+
declare function SDKResource({
|
|
20
|
+
resource,
|
|
21
|
+
parents,
|
|
22
|
+
showModels
|
|
23
|
+
}: SDKResourceProps & {
|
|
24
|
+
showModels?: boolean;
|
|
25
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
26
|
+
type SDKOverviewProps = {
|
|
27
|
+
resource: Resource;
|
|
28
|
+
};
|
|
29
|
+
declare function SDKOverview({
|
|
30
|
+
resource
|
|
31
|
+
}: SDKOverviewProps): react_jsx_runtime0.JSX.Element;
|
|
32
|
+
type SDKRootProps = {
|
|
33
|
+
stainlessPath: string;
|
|
34
|
+
};
|
|
35
|
+
declare function SDKRoot({
|
|
36
|
+
stainlessPath
|
|
37
|
+
}: SDKRootProps): react_jsx_runtime0.JSX.Element | null;
|
|
38
|
+
//#endregion
|
|
2
39
|
export { SDKMethodSummary, SDKMethodSummaryProps, SDKOverview, SDKOverviewProps, SDKResource, SDKResourceHeader, SDKResourceProps, SDKRoot, SDKRootProps };
|
|
@@ -1,11 +1,139 @@
|
|
|
1
|
-
import "../docs
|
|
2
|
-
import "../
|
|
3
|
-
import "../
|
|
4
|
-
import "../
|
|
5
|
-
import "../
|
|
6
|
-
import "
|
|
7
|
-
import "../
|
|
8
|
-
import "
|
|
9
|
-
import {
|
|
1
|
+
import { useDeclaration, useLanguage, useSpec } from "../contexts/docs.js";
|
|
2
|
+
import "../use-strict-context-L0c8JKg4.js";
|
|
3
|
+
import { useLanguageComponents } from "../contexts/index.js";
|
|
4
|
+
import { useComponents } from "../contexts/use-components.js";
|
|
5
|
+
import style_default from "../style.js";
|
|
6
|
+
import { PropertyToggle } from "./properties.js";
|
|
7
|
+
import { parseStainlessPath } from "../routing.js";
|
|
8
|
+
import { Markdown } from "./primitives.js";
|
|
9
|
+
import { flatResources, getResourceFromSpec } from "../utils.js";
|
|
10
|
+
import * as React$1 from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { ChevronRight } from "lucide-react";
|
|
10
13
|
|
|
14
|
+
//#region src/components/overview.tsx
|
|
15
|
+
function SDKResourceHeader({ resource, parents }) {
|
|
16
|
+
const segments = parents?.map((parent, index) => /* @__PURE__ */ jsxs("span", {
|
|
17
|
+
className: style_default.ResourceTitleSegment,
|
|
18
|
+
children: [parent.title, index < parents.length && /* @__PURE__ */ jsx(ChevronRight, {
|
|
19
|
+
size: 16,
|
|
20
|
+
className: style_default.Icon
|
|
21
|
+
})]
|
|
22
|
+
}, parent.stainlessPath));
|
|
23
|
+
if (!segments && !resource.description) return null;
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: style_default.ResourceHeader,
|
|
26
|
+
children: [segments && /* @__PURE__ */ jsxs("h4", {
|
|
27
|
+
id: resource.stainlessPath,
|
|
28
|
+
className: style_default.ResourceTitle,
|
|
29
|
+
children: [segments, /* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: style_default.ResourceTitleSegment,
|
|
31
|
+
children: resource.title
|
|
32
|
+
})]
|
|
33
|
+
}), resource.description && /* @__PURE__ */ jsx("div", {
|
|
34
|
+
className: style_default.ResourceDescription,
|
|
35
|
+
children: /* @__PURE__ */ jsx(Markdown, { content: resource.description })
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function SDKMethodSummary({ method }) {
|
|
40
|
+
const Docs = useComponents();
|
|
41
|
+
const Lang = useLanguageComponents();
|
|
42
|
+
const decl = useDeclaration(method.stainlessPath, true);
|
|
43
|
+
return /* @__PURE__ */ jsx(Docs.MethodHeader, {
|
|
44
|
+
level: "h5",
|
|
45
|
+
title: /* @__PURE__ */ jsx(Docs.Link, {
|
|
46
|
+
stainlessPath: method.stainlessPath,
|
|
47
|
+
children: method.summary || method.title
|
|
48
|
+
}),
|
|
49
|
+
signature: /* @__PURE__ */ jsx(Lang.MethodSignature, { decl }),
|
|
50
|
+
badges: method.deprecated && /* @__PURE__ */ jsx(Docs.Badge, {
|
|
51
|
+
id: "deprecated",
|
|
52
|
+
children: "Deprecated"
|
|
53
|
+
}),
|
|
54
|
+
children: /* @__PURE__ */ jsx(Docs.MethodRoute, {
|
|
55
|
+
httpMethod: method.httpMethod,
|
|
56
|
+
endpoint: method.endpoint.split(" ", 2).at(-1)
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function SDKResource({ resource, parents, showModels }) {
|
|
61
|
+
const Docs = useComponents();
|
|
62
|
+
const Lang = useLanguageComponents();
|
|
63
|
+
const language = useLanguage();
|
|
64
|
+
const spec = useSpec();
|
|
65
|
+
const methods = Object.values(resource.methods).filter((method) => spec?.decls?.[language]?.[method.stainlessPath]);
|
|
66
|
+
const models = Object.values(resource.models).filter((model) => spec?.decls?.[language]?.[`${model.stainlessPath} > (schema)`]);
|
|
67
|
+
return /* @__PURE__ */ jsx("div", {
|
|
68
|
+
className: style_default.Resource,
|
|
69
|
+
"data-stl-resource-language": language,
|
|
70
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
71
|
+
className: style_default.ResourceContent,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ jsx(Docs.SDKResourceHeader, {
|
|
74
|
+
resource,
|
|
75
|
+
parents
|
|
76
|
+
}),
|
|
77
|
+
Lang.Resource && /* @__PURE__ */ jsx(Lang.Resource, { resource }),
|
|
78
|
+
methods.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
79
|
+
className: style_default.ResourceContentGroup,
|
|
80
|
+
children: methods.map((method) => /* @__PURE__ */ jsx("div", {
|
|
81
|
+
className: style_default.MethodSummary,
|
|
82
|
+
children: /* @__PURE__ */ jsx(Docs.SDKMethodSummary, { method })
|
|
83
|
+
}, method.stainlessPath))
|
|
84
|
+
}),
|
|
85
|
+
showModels !== false && models.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: style_default.ResourceContentGroup,
|
|
87
|
+
"data-stldocs-property-group": "models",
|
|
88
|
+
children: [/* @__PURE__ */ jsxs("h5", {
|
|
89
|
+
className: style_default.ResourceContentGroupModelTitle,
|
|
90
|
+
children: ["Models", /* @__PURE__ */ jsx(PropertyToggle, { target: "models" })]
|
|
91
|
+
}), models.map((model) => /* @__PURE__ */ jsx(Docs.SDKModel, { model }, model.stainlessPath))]
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
})
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function SDKOverview({ resource }) {
|
|
98
|
+
const { SDKResource } = useComponents();
|
|
99
|
+
const nested = React$1.useMemo(() => flatResources(resource.subresources, [resource]), [resource]);
|
|
100
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
101
|
+
className: style_default.Overview,
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ jsx("div", {
|
|
104
|
+
className: style_default.OverviewHeader,
|
|
105
|
+
children: /* @__PURE__ */ jsx("h1", { children: resource.title })
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ jsx(SDKResource, { resource }),
|
|
108
|
+
nested.map((props, index) => /* @__PURE__ */ jsx(SDKResource, { ...props }, index))
|
|
109
|
+
]
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function SDKRoot({ stainlessPath }) {
|
|
113
|
+
const spec = useSpec();
|
|
114
|
+
const Docs = useComponents();
|
|
115
|
+
const parsed = parseStainlessPath(stainlessPath);
|
|
116
|
+
const resource = spec && getResourceFromSpec(stainlessPath, spec);
|
|
117
|
+
if (!resource || !parsed) {
|
|
118
|
+
console.warn(`Could not find resource or parsed path for '${stainlessPath}'`);
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
if (parsed.method) {
|
|
122
|
+
const method = resource.methods[parsed.method];
|
|
123
|
+
if (!method) {
|
|
124
|
+
console.warn(`Method '${parsed.method}' not found in resource '${resource.stainlessPath}'`);
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
return /* @__PURE__ */ jsx("div", {
|
|
128
|
+
className: style_default.Root,
|
|
129
|
+
children: /* @__PURE__ */ jsx(Docs.SDKMethod, { method })
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return /* @__PURE__ */ jsx("div", {
|
|
133
|
+
className: style_default.Root,
|
|
134
|
+
children: /* @__PURE__ */ jsx(Docs.SDKOverview, { resource })
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//#endregion
|
|
11
139
|
export { SDKMethodSummary, SDKOverview, SDKResource, SDKResourceHeader, SDKRoot };
|
|
@@ -1,2 +1,105 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as react from "react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 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_runtime0.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_runtime0.JSX.Element;
|
|
32
|
+
declare function VirtualExpander({
|
|
33
|
+
id,
|
|
34
|
+
open: isOpen,
|
|
35
|
+
muted,
|
|
36
|
+
summary,
|
|
37
|
+
children
|
|
38
|
+
}: Omit<ExpanderProps, 'virtual'>): react_jsx_runtime0.JSX.Element;
|
|
39
|
+
declare function Markdown({
|
|
40
|
+
content
|
|
41
|
+
}: {
|
|
42
|
+
content: string;
|
|
43
|
+
}): "" | react_jsx_runtime0.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_runtime0.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 | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.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 | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.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
|
+
className,
|
|
81
|
+
...props
|
|
82
|
+
}: InputProps): react_jsx_runtime0.JSX.Element;
|
|
83
|
+
type ToggleButtonProps = {
|
|
84
|
+
children?: ReactNode;
|
|
85
|
+
selected?: boolean;
|
|
86
|
+
} & React.ComponentProps<'button'>;
|
|
87
|
+
declare function ToggleButton({
|
|
88
|
+
children,
|
|
89
|
+
selected,
|
|
90
|
+
ref,
|
|
91
|
+
...props
|
|
92
|
+
}: ToggleButtonProps): react_jsx_runtime0.JSX.Element;
|
|
93
|
+
type ListViewProps<TItem> = {
|
|
94
|
+
items: Array<TItem>;
|
|
95
|
+
itemDelegate: (item: TItem, selected: boolean) => React.ReactNode;
|
|
96
|
+
onSelectListItem?: (item: TItem) => void;
|
|
97
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|
|
98
|
+
declare function ListView<TItem>({
|
|
99
|
+
items,
|
|
100
|
+
itemDelegate,
|
|
101
|
+
onSelectListItem,
|
|
102
|
+
...rest
|
|
103
|
+
}: ListViewProps<TItem>): react_jsx_runtime0.JSX.Element;
|
|
104
|
+
//#endregion
|
|
2
105
|
export { Badge, Expander, Input, InputProps, Join, Link, ListView, ListViewProps, Markdown, ToggleButton, ToggleButtonProps, Tooltip, VirtualExpander };
|