@stainless-api/docs-ui 0.1.0-beta.57 → 0.1.0-beta.58
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/{breadcrumbs-CCViAnPI.js → breadcrumbs-3q1o8SBZ.js} +2 -2
- package/dist/{breadcrumbs-BFCcsaL5.d.ts → breadcrumbs-Bu4Lz7cO.d.ts} +4 -4
- package/dist/{component-generics-CXfH4VNh.d.ts → component-generics-CLPqY1b3.d.ts} +2 -2
- package/dist/{component-2IFa97aV.js → component-l0Q5m3CM.js} +2 -2
- package/dist/components/MaskedInput.d.ts +3 -3
- package/dist/components/MaskedInput.js +1 -1
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +2 -2
- package/dist/components/icons.d.ts +11 -11
- package/dist/components/index.d.ts +9 -9
- package/dist/components/index.js +9 -9
- package/dist/components/method.d.ts +1 -1
- package/dist/components/method.js +2 -2
- package/dist/components/overview.d.ts +1 -1
- package/dist/components/overview.js +3 -3
- package/dist/components/primitives.d.ts +1 -1
- package/dist/components/primitives.js +1 -1
- package/dist/components/properties.d.ts +1 -1
- package/dist/components/properties.js +1 -1
- package/dist/components/sdk.d.ts +1 -1
- package/dist/components/sdk.js +1 -1
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/snippets.d.ts +2 -2
- package/dist/components/snippets.js +1 -1
- package/dist/{components-B6opXKh2.js → components-BdOXrvW2.js} +8 -8
- package/dist/contexts/component-generics.d.ts +1 -1
- package/dist/contexts/component-types.d.ts +10 -10
- package/dist/contexts/component.d.ts +13 -13
- package/dist/contexts/component.js +18 -18
- package/dist/contexts/docs.d.ts +1 -1
- package/dist/contexts/index.d.ts +14 -14
- package/dist/contexts/markdown.d.ts +1 -1
- package/dist/contexts/navigation.d.ts +1 -1
- package/dist/contexts/use-components.d.ts +9 -9
- package/dist/{csharp-Cs2V5Q49.js → csharp-ZbePFjQO.js} +7 -7
- package/dist/{docs-AUJrRqst.d.ts → docs-8bJ2Zq-a.d.ts} +4 -5
- package/dist/{go-jtKybF5f.js → go-B0LsOWv5.js} +1 -1
- package/dist/{http-ByTnZCdl.js → http-DhFmbdJn.js} +2 -2
- package/dist/{index-CBfCrZxK.d.ts → index-BON8gAFi.d.ts} +8 -8
- package/dist/index-BtmA2psc.d.ts +1587 -0
- package/dist/{index-DUvl24AZ.d.ts → index-qF_YVWCx.d.ts} +19 -19
- package/dist/index.d.ts +15 -15
- package/dist/index.js +18 -18
- package/dist/{java-CSfLt_jp.js → java-DnoViM8r.js} +1 -1
- package/dist/languages/csharp.d.ts +10 -10
- package/dist/languages/csharp.js +1 -1
- package/dist/languages/go.d.ts +10 -10
- package/dist/languages/go.js +1 -1
- package/dist/languages/http.d.ts +10 -10
- package/dist/languages/http.js +10 -10
- package/dist/languages/index.d.ts +10 -10
- package/dist/languages/index.js +17 -17
- package/dist/languages/java.d.ts +10 -10
- package/dist/languages/java.js +1 -1
- package/dist/languages/python.d.ts +10 -10
- package/dist/languages/python.js +1 -1
- package/dist/languages/ruby.d.ts +10 -10
- package/dist/languages/ruby.js +1 -1
- package/dist/languages/typescript.d.ts +10 -10
- package/dist/languages/typescript.js +1 -1
- package/dist/{languages-X8bJZjuW.js → languages-DkMjjyDN.js} +7 -7
- package/dist/markdown/index.d.ts +5 -5
- package/dist/markdown/index.js +18 -18
- package/dist/markdown/md.js +2 -2
- package/dist/markdown/printer.d.ts +6 -6
- package/dist/markdown/printer.js +33 -32
- package/dist/markdown/utils.d.ts +5 -5
- package/dist/{markdown-CqEZJJrZ.d.ts → markdown-DTp4ociY.d.ts} +2 -2
- package/dist/{method-CD_dwBsB.d.ts → method-ClPGsX68.d.ts} +6 -6
- package/dist/{method-BPsNdtwS.js → method-pJ_RhZj-.js} +2 -2
- package/dist/{navigation-BlOvTCTX.d.ts → navigation-DzgC_T1S.d.ts} +3 -3
- package/dist/{overview-CVTaIlP6.d.ts → overview-CdbaBavs.d.ts} +11 -11
- package/dist/{overview-BslKVsRE.js → overview-DYiiAHTd.js} +6 -6
- package/dist/{primitives-Da9sUCQo.d.ts → primitives-Cw5uBUQk.d.ts} +11 -11
- package/dist/{primitives-CCj2Pn-o.js → primitives-DHsRAENq.js} +1 -1
- package/dist/{properties-CEjSSMRr.d.ts → properties-Bn_hArWT.d.ts} +5 -5
- package/dist/{properties-DhttBLpf.js → properties-WqNSu-9K.js} +1 -1
- package/dist/{python-BU7eaJMy.js → python-Bj1XJ1je.js} +1 -1
- package/dist/{routing-CUnVDpU-.d.ts → routing-BHkWbZpp.d.ts} +5 -5
- package/dist/routing.d.ts +1 -1
- package/dist/{ruby-LiJ6VW-R.js → ruby-CUOmUwz-.js} +1 -1
- package/dist/{sdk-CL6r5JlK.d.ts → sdk-BiLj2q7E.d.ts} +22 -22
- package/dist/{sdk-CbNqFzOI.js → sdk-DoprvjCy.js} +1 -1
- package/dist/{sidebar-ZNWRDHyv.js → sidebar-4QeeafnE.js} +2 -2
- package/dist/{sidebar-BDwx6h14.d.ts → sidebar-DimNfsmt.d.ts} +9 -9
- package/dist/{snippets-CO4kIovz.js → snippets-BPHTjwpN.js} +6 -12
- package/dist/{snippets-DePfv2T6.d.ts → snippets-CQrk6Dfj.d.ts} +11 -11
- package/dist/spec.d.ts +24 -24
- package/dist/{style-Vk87Pfuy.js → style-WTDMMzqU.js} +0 -1
- package/dist/style.d.ts +0 -1
- package/dist/style.js +1 -1
- package/dist/styles/main.css +9 -1
- package/dist/styles.css +9 -1
- package/dist/{typescript-C8J1uyak.js → typescript-B4wuVmP1.js} +1 -1
- package/dist/utils.d.ts +6 -6
- package/package.json +3 -3
- package/dist/breadcrumbs-DTHE6aca.d.ts +0 -25
- package/dist/component-generics-Dbwqv7EL.d.ts +0 -30
- package/dist/docs-BQbH-a6R.d.ts +0 -47
- package/dist/index-Bk5AWxiZ.d.ts +0 -274
- package/dist/index-CxTvYsqI.d.ts +0 -15
- package/dist/markdown-V_bNKjle.d.ts +0 -22
- package/dist/method-CkGKALRi.d.ts +0 -59
- package/dist/navigation-CXQA2RZo.d.ts +0 -29
- package/dist/overview-DFrenwhf.d.ts +0 -39
- package/dist/primitives-DiDzLHoK.d.ts +0 -104
- package/dist/properties-CXDSYNGL.d.ts +0 -54
- package/dist/sdk-CenwRRXT.d.ts +0 -118
- package/dist/sidebar-CcX4PdH0.d.ts +0 -36
- package/dist/snippets-ykHHsG1B.d.ts +0 -51
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as ID, c as Method, l as Model, p as SnippetLanguage } from "./index-BtmA2psc.js";
|
|
2
|
+
import { t as DocsLanguage } from "./routing-BHkWbZpp.js";
|
|
2
3
|
import * as React$1 from "react";
|
|
3
|
-
import * as
|
|
4
|
-
import * as SDKJSON from "@stainless/sdk-json";
|
|
4
|
+
import * as react_jsx_runtime41 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/sdk.d.ts
|
|
7
7
|
type PropertyModelContextType = {
|
|
@@ -13,7 +13,7 @@ declare function usePropertyModel(): PropertyModelContextType;
|
|
|
13
13
|
type ReferenceNestingContextType = string[];
|
|
14
14
|
declare const ReferenceNestingContext: React$1.Context<ReferenceNestingContextType>;
|
|
15
15
|
declare function useReferenceNesting(): ReferenceNestingContextType;
|
|
16
|
-
type SDKSnippetLanguagesType = Record<
|
|
16
|
+
type SDKSnippetLanguagesType = Record<SnippetLanguage, {
|
|
17
17
|
name: string;
|
|
18
18
|
}>;
|
|
19
19
|
declare const SDKSnippetLanguages: SDKSnippetLanguagesType;
|
|
@@ -25,7 +25,7 @@ type TransformRequestSnippetFn = ({
|
|
|
25
25
|
language: DocsLanguage;
|
|
26
26
|
}) => string;
|
|
27
27
|
type SDKChildrenProps = {
|
|
28
|
-
paths:
|
|
28
|
+
paths: ID[];
|
|
29
29
|
expand?: boolean;
|
|
30
30
|
depth?: number;
|
|
31
31
|
};
|
|
@@ -33,7 +33,7 @@ declare function SDKChildren({
|
|
|
33
33
|
paths,
|
|
34
34
|
expand,
|
|
35
35
|
depth
|
|
36
|
-
}: SDKChildrenProps):
|
|
36
|
+
}: SDKChildrenProps): react_jsx_runtime41.JSX.Element;
|
|
37
37
|
type SDKDeclarationProps = {
|
|
38
38
|
path: string;
|
|
39
39
|
expand?: boolean;
|
|
@@ -43,54 +43,54 @@ declare function SDKDeclaration({
|
|
|
43
43
|
path,
|
|
44
44
|
expand,
|
|
45
45
|
depth
|
|
46
|
-
}: SDKDeclarationProps):
|
|
46
|
+
}: SDKDeclarationProps): react_jsx_runtime41.JSX.Element;
|
|
47
47
|
type SDKConstraintsProps = {
|
|
48
48
|
constraints?: Record<string, any>;
|
|
49
49
|
};
|
|
50
50
|
declare function SDKConstraints({
|
|
51
51
|
constraints
|
|
52
|
-
}: SDKConstraintsProps):
|
|
52
|
+
}: SDKConstraintsProps): react_jsx_runtime41.JSX.Element | undefined;
|
|
53
53
|
type SDKIconProps = {
|
|
54
|
-
language:
|
|
54
|
+
language: SnippetLanguage;
|
|
55
55
|
size?: number;
|
|
56
56
|
};
|
|
57
57
|
declare function SDKIcon({
|
|
58
58
|
language
|
|
59
|
-
}: SDKIconProps):
|
|
59
|
+
}: SDKIconProps): react_jsx_runtime41.JSX.Element | null;
|
|
60
60
|
type SDKRequestTitleProps = {
|
|
61
|
-
snippetLanguage:
|
|
61
|
+
snippetLanguage: SnippetLanguage;
|
|
62
62
|
};
|
|
63
63
|
declare function SDKRequestTitle({
|
|
64
64
|
snippetLanguage
|
|
65
|
-
}: SDKRequestTitleProps):
|
|
65
|
+
}: SDKRequestTitleProps): react_jsx_runtime41.JSX.Element;
|
|
66
66
|
type SDKExampleProps = {
|
|
67
|
-
method:
|
|
67
|
+
method: Method;
|
|
68
68
|
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
69
69
|
};
|
|
70
70
|
declare function SDKExample({
|
|
71
71
|
method,
|
|
72
72
|
transformRequestSnippet
|
|
73
|
-
}: SDKExampleProps):
|
|
73
|
+
}: SDKExampleProps): react_jsx_runtime41.JSX.Element;
|
|
74
74
|
type SDKMethodProps = {
|
|
75
|
-
method:
|
|
75
|
+
method: Method;
|
|
76
76
|
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
77
77
|
};
|
|
78
78
|
declare function SDKMethodHeader({
|
|
79
79
|
method
|
|
80
|
-
}: SDKMethodProps):
|
|
80
|
+
}: SDKMethodProps): react_jsx_runtime41.JSX.Element;
|
|
81
81
|
declare function SDKMethodInfo({
|
|
82
82
|
method
|
|
83
|
-
}: SDKMethodProps):
|
|
83
|
+
}: SDKMethodProps): react_jsx_runtime41.JSX.Element;
|
|
84
84
|
declare function SDKMethod({
|
|
85
85
|
method,
|
|
86
86
|
transformRequestSnippet
|
|
87
|
-
}: SDKMethodProps):
|
|
87
|
+
}: SDKMethodProps): react_jsx_runtime41.JSX.Element;
|
|
88
88
|
type SDKModelProps = {
|
|
89
|
-
model:
|
|
89
|
+
model: Model;
|
|
90
90
|
};
|
|
91
91
|
declare function SDKModel({
|
|
92
92
|
model
|
|
93
|
-
}: SDKModelProps):
|
|
93
|
+
}: SDKModelProps): react_jsx_runtime41.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 |
|
|
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_runtime41.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):
|
|
116
|
+
}: SDKLanguageBlockProps): react_jsx_runtime41.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 };
|
|
@@ -2,7 +2,7 @@ import { a as useLanguage, l as useSpec, n as useContentPanelLayout, r as useDec
|
|
|
2
2
|
import { n as useNavigation } from "./navigation-C5TN0SgC.js";
|
|
3
3
|
import { n as useLanguageComponents } from "./contexts-CLpvBI91.js";
|
|
4
4
|
import { t as useComponents } from "./use-components-DBx5LZk0.js";
|
|
5
|
-
import { t as style_default } from "./style-
|
|
5
|
+
import { t as style_default } from "./style-WTDMMzqU.js";
|
|
6
6
|
import { c as getLanguageSnippet, t as LanguageNames } from "./routing-Dl0FprK1.js";
|
|
7
7
|
import { a as KotlinIcon, c as RubyIcon, i as JavaIcon, l as TerraformIcon, n as CurlIcon, o as PowershellIcon, r as GoIcon, s as PythonIcon, t as CSharpIcon, u as TypescriptIcon } from "./icons-Ckod9aod.js";
|
|
8
8
|
import * as React$1 from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as useNavigation } from "./navigation-C5TN0SgC.js";
|
|
2
2
|
import { t as useComponents } from "./use-components-DBx5LZk0.js";
|
|
3
|
-
import { t as style_default } from "./style-
|
|
3
|
+
import { t as style_default } from "./style-WTDMMzqU.js";
|
|
4
4
|
import { r as isResourceEmpty } from "./utils-C12Fme2N.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -47,7 +47,7 @@ function SidebarMethod({ method }) {
|
|
|
47
47
|
iconOnly: true
|
|
48
48
|
}), /* @__PURE__ */ jsx(Docs.Link, {
|
|
49
49
|
stainlessPath: method.stainlessPath,
|
|
50
|
-
children: method.
|
|
50
|
+
children: method.title
|
|
51
51
|
})]
|
|
52
52
|
});
|
|
53
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { c as Method, d as Resource } from "./index-BtmA2psc.js";
|
|
1
2
|
import * as React$1 from "react";
|
|
2
|
-
import * as
|
|
3
|
-
import * as SDKJSON from "@stainless/sdk-json";
|
|
3
|
+
import * as react_jsx_runtime54 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/sidebar.d.ts
|
|
6
6
|
type SidebarExpanderProps = {
|
|
@@ -12,25 +12,25 @@ declare function SidebarExpander({
|
|
|
12
12
|
open,
|
|
13
13
|
summary,
|
|
14
14
|
children
|
|
15
|
-
}: SidebarExpanderProps):
|
|
15
|
+
}: SidebarExpanderProps): react_jsx_runtime54.JSX.Element;
|
|
16
16
|
type SidebarMethodProps = {
|
|
17
|
-
method:
|
|
17
|
+
method: Method;
|
|
18
18
|
};
|
|
19
19
|
declare function SidebarMethod({
|
|
20
20
|
method
|
|
21
|
-
}: SidebarMethodProps):
|
|
21
|
+
}: SidebarMethodProps): react_jsx_runtime54.JSX.Element;
|
|
22
22
|
type SidebarResourceProps = {
|
|
23
|
-
resource:
|
|
23
|
+
resource: Resource;
|
|
24
24
|
};
|
|
25
25
|
declare function SidebarResource({
|
|
26
26
|
resource
|
|
27
|
-
}: SidebarResourceProps):
|
|
27
|
+
}: SidebarResourceProps): react_jsx_runtime54.JSX.Element;
|
|
28
28
|
type SidebarProps = {
|
|
29
|
-
resources:
|
|
29
|
+
resources: Resource[];
|
|
30
30
|
selectedPath?: string;
|
|
31
31
|
};
|
|
32
32
|
declare function Sidebar({
|
|
33
33
|
resources
|
|
34
|
-
}: SidebarProps):
|
|
34
|
+
}: SidebarProps): react_jsx_runtime54.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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as useLanguage, c as useSnippet, r as useDeclaration } from "./docs-CXqi26jB.js";
|
|
2
2
|
import { r as useHighlight } from "./markdown-CxdeWgjV.js";
|
|
3
3
|
import { t as useComponents } from "./use-components-DBx5LZk0.js";
|
|
4
|
-
import { t as style_default } from "./style-
|
|
4
|
+
import { t as style_default } from "./style-WTDMMzqU.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import clsx from "clsx";
|
|
@@ -14,14 +14,8 @@ function SnippetCode({ content, language }) {
|
|
|
14
14
|
const highlighted = useHighlight(content, language || lang);
|
|
15
15
|
return /* @__PURE__ */ jsx("div", {
|
|
16
16
|
className: style_default.SnippetCode,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"data-stldocs-copy-content": true,
|
|
20
|
-
children: /* @__PURE__ */ jsx("code", {
|
|
21
|
-
className: language === "json" ? "snippet-json" : "snippet",
|
|
22
|
-
dangerouslySetInnerHTML: { __html: highlighted }
|
|
23
|
-
})
|
|
24
|
-
})
|
|
17
|
+
"data-stldocs-copy-content": true,
|
|
18
|
+
dangerouslySetInnerHTML: { __html: highlighted }
|
|
25
19
|
});
|
|
26
20
|
}
|
|
27
21
|
function SnippetContainer({ children }) {
|
|
@@ -92,7 +86,7 @@ function SnippetButtons({ content }) {
|
|
|
92
86
|
setTimeout(() => setCopyIcon(CopyIcon), 1e3);
|
|
93
87
|
}
|
|
94
88
|
return /* @__PURE__ */ jsx(Button, {
|
|
95
|
-
variant: "
|
|
89
|
+
variant: "outline",
|
|
96
90
|
"data-stldocs-snippet-copy": true,
|
|
97
91
|
children: /* @__PURE__ */ jsx(CopyButtonIcon, {
|
|
98
92
|
size: 16,
|
|
@@ -102,7 +96,7 @@ function SnippetButtons({ content }) {
|
|
|
102
96
|
});
|
|
103
97
|
}
|
|
104
98
|
function SnippetResponse({ responses }) {
|
|
105
|
-
const { SnippetCode
|
|
99
|
+
const { SnippetCode } = useComponents();
|
|
106
100
|
if (!responses) return null;
|
|
107
101
|
const mappedResponses = Object.keys(responses).map((key) => {
|
|
108
102
|
const responseContent = responses[key];
|
|
@@ -148,7 +142,7 @@ function SnippetResponse({ responses }) {
|
|
|
148
142
|
return /* @__PURE__ */ jsx("div", {
|
|
149
143
|
className: clsx(style_default.SnippetResponsePane, index === 0 && style_default.SnippetResponsePaneActive),
|
|
150
144
|
"data-snippet-response-pane-id": `snippet-response-tab-${responseCode}-${index}`,
|
|
151
|
-
children: /* @__PURE__ */ jsx(SnippetCode
|
|
145
|
+
children: /* @__PURE__ */ jsx(SnippetCode, {
|
|
152
146
|
content,
|
|
153
147
|
language
|
|
154
148
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as Method } from "./index-BtmA2psc.js";
|
|
2
|
+
import { C as TransformRequestSnippetFn } from "./sdk-BiLj2q7E.js";
|
|
2
3
|
import * as React$1 from "react";
|
|
3
|
-
import * as
|
|
4
|
-
import * as SDKJSON from "@stainless/sdk-json";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/snippets.d.ts
|
|
7
7
|
type SnippetCodeProps = {
|
|
@@ -12,9 +12,9 @@ type SnippetCodeProps = {
|
|
|
12
12
|
declare function SnippetCode({
|
|
13
13
|
content,
|
|
14
14
|
language
|
|
15
|
-
}: SnippetCodeProps):
|
|
15
|
+
}: SnippetCodeProps): react_jsx_runtime0.JSX.Element;
|
|
16
16
|
type SnippetProps = {
|
|
17
|
-
method:
|
|
17
|
+
method: Method;
|
|
18
18
|
requestTitle?: React$1.ReactNode;
|
|
19
19
|
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
20
20
|
};
|
|
@@ -24,28 +24,28 @@ type SnippetContainerProps = {
|
|
|
24
24
|
};
|
|
25
25
|
declare function SnippetContainer({
|
|
26
26
|
children
|
|
27
|
-
}: SnippetContainerProps):
|
|
27
|
+
}: SnippetContainerProps): react_jsx_runtime0.JSX.Element;
|
|
28
28
|
type SnippetRequestContainerProps = {
|
|
29
29
|
children?: React$1.ReactNode;
|
|
30
30
|
signature?: string;
|
|
31
31
|
};
|
|
32
32
|
declare function SnippetRequestContainer({
|
|
33
33
|
children
|
|
34
|
-
}: SnippetRequestContainerProps):
|
|
34
|
+
}: SnippetRequestContainerProps): react_jsx_runtime0.JSX.Element;
|
|
35
35
|
declare function Snippet({
|
|
36
36
|
requestTitle,
|
|
37
37
|
method,
|
|
38
38
|
transformRequestSnippet
|
|
39
|
-
}: SnippetProps):
|
|
39
|
+
}: SnippetProps): react_jsx_runtime0.JSX.Element | null;
|
|
40
40
|
declare function SnippetButtons({
|
|
41
41
|
content
|
|
42
42
|
}: {
|
|
43
43
|
content: string;
|
|
44
|
-
}):
|
|
44
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
45
45
|
declare function SnippetResponse({
|
|
46
46
|
responses
|
|
47
47
|
}: {
|
|
48
|
-
responses:
|
|
49
|
-
}):
|
|
48
|
+
responses: Method['exampleResponses'];
|
|
49
|
+
}): react_jsx_runtime0.JSX.Element | null;
|
|
50
50
|
//#endregion
|
|
51
51
|
export { SnippetContainer as a, SnippetRequestContainer as c, SnippetCodeProps as i, SnippetRequestContainerProps as l, SnippetButtons as n, SnippetContainerProps as o, SnippetCode as r, SnippetProps as s, Snippet as t, SnippetResponse as u };
|
package/dist/spec.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { c as Method, d as Resource, h as SpecLanguage, l as Model, m as Spec, n as DeclarationNode } from "./index-BtmA2psc.js";
|
|
2
|
+
import { t as DocsLanguage } from "./routing-BHkWbZpp.js";
|
|
3
3
|
|
|
4
4
|
//#region src/spec.d.ts
|
|
5
|
-
type SecurityScheme =
|
|
5
|
+
type SecurityScheme = Spec['security_schemes'][number];
|
|
6
6
|
interface SpecTransforms {
|
|
7
|
-
resource(resource:
|
|
8
|
-
method(method:
|
|
9
|
-
model(model:
|
|
10
|
-
declaration(decl:
|
|
7
|
+
resource(resource: Resource): Resource;
|
|
8
|
+
method(method: Method): Method;
|
|
9
|
+
model(model: Model): Model;
|
|
10
|
+
declaration(decl: DeclarationNode, language: SpecLanguage): DeclarationNode;
|
|
11
11
|
securityScheme(scheme: SecurityScheme): SecurityScheme;
|
|
12
12
|
snippet(snippet: string, language: string): string;
|
|
13
13
|
markdown(content?: string): string | undefined;
|
|
14
14
|
}
|
|
15
15
|
declare function defineTransforms(transforms?: Partial<SpecTransforms>): {
|
|
16
|
-
resource: (resource:
|
|
17
|
-
method: (method:
|
|
18
|
-
model: (model:
|
|
19
|
-
declaration: (decl:
|
|
16
|
+
resource: (resource: Resource) => Resource;
|
|
17
|
+
method: (method: Method) => Method;
|
|
18
|
+
model: (model: Model) => Model;
|
|
19
|
+
declaration: (decl: DeclarationNode, language: SpecLanguage) => DeclarationNode;
|
|
20
20
|
securityScheme: (scheme: SecurityScheme) => SecurityScheme;
|
|
21
21
|
snippet: (snippet: string, language: string) => string;
|
|
22
22
|
markdown: (content?: string) => string | undefined;
|
|
23
23
|
};
|
|
24
|
-
declare function generateNavigation(resource: Partial<
|
|
24
|
+
declare function generateNavigation(resource: Partial<Resource>): {
|
|
25
25
|
title: string | undefined;
|
|
26
26
|
name: string | undefined;
|
|
27
|
-
subresources: Record<string, Partial<
|
|
28
|
-
methods: Record<string, Partial<
|
|
29
|
-
models: Record<string, Partial<
|
|
27
|
+
subresources: Record<string, Partial<Resource>> | undefined;
|
|
28
|
+
methods: Record<string, Partial<Method>> | undefined;
|
|
29
|
+
models: Record<string, Partial<Model>> | undefined;
|
|
30
30
|
stainlessPath: string | undefined;
|
|
31
31
|
terraform: {
|
|
32
32
|
Name: string;
|
|
33
33
|
QualifiedName: string;
|
|
34
34
|
} | undefined;
|
|
35
35
|
};
|
|
36
|
-
declare function generateSpecForResource(spec:
|
|
37
|
-
declare function transform(spec:
|
|
36
|
+
declare function generateSpecForResource(spec: Spec, name: string, lang: DocsLanguage, transforms: SpecTransforms): Partial<Spec>;
|
|
37
|
+
declare function transform(spec: Spec, transforms: SpecTransforms): {
|
|
38
38
|
name: string;
|
|
39
39
|
lang: "http" | "node" | "python" | "go" | "typescript" | "terraform" | "ruby" | "java" | "kotlin" | "csharp" | "php";
|
|
40
|
-
spec: Partial<
|
|
40
|
+
spec: Partial<Spec>;
|
|
41
41
|
}[];
|
|
42
|
-
declare function split(spec:
|
|
42
|
+
declare function split(spec: Spec, transforms?: SpecTransforms): {
|
|
43
43
|
resources: ReturnType<typeof transform>;
|
|
44
44
|
navigation: {
|
|
45
45
|
languages: ("http" | "node" | "python" | "go" | "typescript" | "terraform" | "ruby" | "java" | "kotlin")[] | undefined;
|
|
@@ -47,9 +47,9 @@ declare function split(spec: SDKJSON.Spec, transforms?: SpecTransforms): {
|
|
|
47
47
|
[k: string]: {
|
|
48
48
|
title: string | undefined;
|
|
49
49
|
name: string | undefined;
|
|
50
|
-
subresources: Record<string, Partial<
|
|
51
|
-
methods: Record<string, Partial<
|
|
52
|
-
models: Record<string, Partial<
|
|
50
|
+
subresources: Record<string, Partial<Resource>> | undefined;
|
|
51
|
+
methods: Record<string, Partial<Method>> | undefined;
|
|
52
|
+
models: Record<string, Partial<Model>> | undefined;
|
|
53
53
|
stainlessPath: string | undefined;
|
|
54
54
|
terraform: {
|
|
55
55
|
Name: string;
|
|
@@ -59,7 +59,7 @@ declare function split(spec: SDKJSON.Spec, transforms?: SpecTransforms): {
|
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
|
-
declare function parseSpec(content: string):
|
|
63
|
-
declare function retrieve(apiKey: string, project: string, revision: string): Promise<
|
|
62
|
+
declare function parseSpec(content: string): Spec | undefined;
|
|
63
|
+
declare function retrieve(apiKey: string, project: string, revision: string): Promise<Spec | undefined>;
|
|
64
64
|
//#endregion
|
|
65
65
|
export { SecurityScheme, SpecTransforms, defineTransforms, generateNavigation, generateSpecForResource, parseSpec, retrieve, split, transform };
|
|
@@ -48,7 +48,6 @@ var style_default = {
|
|
|
48
48
|
LiteralBoolean: "stldocs-literal-boolean",
|
|
49
49
|
Snippet: "stldocs-snippet",
|
|
50
50
|
SnippetCode: "stldocs-snippet-code",
|
|
51
|
-
SnippetCodeContent: "stldocs-snippet-code-content",
|
|
52
51
|
SnippetRequest: "stldocs-snippet-request",
|
|
53
52
|
SnippetRequestTitle: "stldocs-snippet-request-title",
|
|
54
53
|
SnippetRequestTitleContent: "stldocs-snippet-request-title-content",
|
package/dist/style.d.ts
CHANGED
|
@@ -48,7 +48,6 @@ declare const _default: {
|
|
|
48
48
|
readonly LiteralBoolean: "stldocs-literal-boolean";
|
|
49
49
|
readonly Snippet: "stldocs-snippet";
|
|
50
50
|
readonly SnippetCode: "stldocs-snippet-code";
|
|
51
|
-
readonly SnippetCodeContent: "stldocs-snippet-code-content";
|
|
52
51
|
readonly SnippetRequest: "stldocs-snippet-request";
|
|
53
52
|
readonly SnippetRequestTitle: "stldocs-snippet-request-title";
|
|
54
53
|
readonly SnippetRequestTitleContent: "stldocs-snippet-request-title-content";
|
package/dist/style.js
CHANGED
package/dist/styles/main.css
CHANGED
|
@@ -617,6 +617,10 @@
|
|
|
617
617
|
&.stldocs-snippet-response-pane-active {
|
|
618
618
|
display: block;
|
|
619
619
|
}
|
|
620
|
+
|
|
621
|
+
.stldocs-snippet-code {
|
|
622
|
+
padding: 0;
|
|
623
|
+
}
|
|
620
624
|
}
|
|
621
625
|
|
|
622
626
|
.stldocs-snippet-response {
|
|
@@ -645,8 +649,12 @@
|
|
|
645
649
|
will-change: height;
|
|
646
650
|
scrollbar-color: var(--stl-color-border) transparent;
|
|
647
651
|
|
|
652
|
+
pre,
|
|
648
653
|
.shiki {
|
|
649
|
-
|
|
654
|
+
margin: 0;
|
|
655
|
+
padding: 0;
|
|
656
|
+
width: max-content;
|
|
657
|
+
min-width: 100%;
|
|
650
658
|
}
|
|
651
659
|
|
|
652
660
|
pre.shiki {
|
package/dist/styles.css
CHANGED
|
@@ -2442,6 +2442,10 @@ a.stl-ui-button {
|
|
|
2442
2442
|
&.stldocs-snippet-response-pane-active {
|
|
2443
2443
|
display: block;
|
|
2444
2444
|
}
|
|
2445
|
+
|
|
2446
|
+
.stldocs-snippet-code {
|
|
2447
|
+
padding: 0;
|
|
2448
|
+
}
|
|
2445
2449
|
}
|
|
2446
2450
|
|
|
2447
2451
|
.stldocs-snippet-response {
|
|
@@ -2470,8 +2474,12 @@ a.stl-ui-button {
|
|
|
2470
2474
|
will-change: height;
|
|
2471
2475
|
scrollbar-color: var(--stl-color-border) transparent;
|
|
2472
2476
|
|
|
2477
|
+
pre,
|
|
2473
2478
|
.shiki {
|
|
2474
|
-
|
|
2479
|
+
margin: 0;
|
|
2480
|
+
padding: 0;
|
|
2481
|
+
width: max-content;
|
|
2482
|
+
min-width: 100%;
|
|
2475
2483
|
}
|
|
2476
2484
|
|
|
2477
2485
|
pre.shiki {
|
|
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./chunk-CAbhIZi1.js";
|
|
|
2
2
|
import { a as useLanguage, l as useSpec, r as useDeclaration } from "./docs-CXqi26jB.js";
|
|
3
3
|
import { n as useLanguageComponents } from "./contexts-CLpvBI91.js";
|
|
4
4
|
import { t as useComponents } from "./use-components-DBx5LZk0.js";
|
|
5
|
-
import { t as style_default } from "./style-
|
|
5
|
+
import { t as style_default } from "./style-WTDMMzqU.js";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { d as Resource, m as Spec } from "./index-BtmA2psc.js";
|
|
2
2
|
|
|
3
3
|
//#region src/utils.d.ts
|
|
4
4
|
declare namespace utils_d_exports {
|
|
5
5
|
export { flatResources, getResourceFromSpec, isResourceEmpty };
|
|
6
6
|
}
|
|
7
|
-
declare function flatResources(resources: Record<string,
|
|
8
|
-
resource:
|
|
9
|
-
parents:
|
|
7
|
+
declare function flatResources(resources: Record<string, Resource> | undefined, parents: Resource[]): {
|
|
8
|
+
resource: Resource;
|
|
9
|
+
parents: Resource[];
|
|
10
10
|
}[];
|
|
11
|
-
declare function getResourceFromSpec(stainlessPath: string | string[], spec:
|
|
12
|
-
declare function isResourceEmpty(resource:
|
|
11
|
+
declare function getResourceFromSpec(stainlessPath: string | string[], spec: Spec): Resource | null;
|
|
12
|
+
declare function isResourceEmpty(resource: Resource): boolean;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { flatResources, getResourceFromSpec, isResourceEmpty, utils_d_exports as t };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stainless-api/docs-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.0-beta.
|
|
4
|
+
"version": "0.1.0-beta.58",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"@stainless-api/ui-primitives": "0.1.0-beta.43"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@types/node": "24.10.
|
|
24
|
+
"@types/node": "24.10.9",
|
|
25
25
|
"@types/react": "19.2.7",
|
|
26
26
|
"@types/react-dom": "^19.2.3",
|
|
27
27
|
"dotenv": "17.2.3",
|
|
28
28
|
"react": "^19.2.3",
|
|
29
29
|
"react-dom": "^19.2.3",
|
|
30
|
-
"tsdown": "^0.
|
|
30
|
+
"tsdown": "^0.20.0-beta.3",
|
|
31
31
|
"typescript": "5.9.3",
|
|
32
32
|
"@stainless/eslint-config": "0.1.0-beta.1",
|
|
33
33
|
"@stainless/sdk-json": "^0.1.0-beta.2"
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
2
|
-
import * as SDKJSON from "@stainless/sdk-json";
|
|
3
|
-
|
|
4
|
-
//#region src/components/breadcrumbs.d.ts
|
|
5
|
-
type Breadcrumb = {
|
|
6
|
-
title: string;
|
|
7
|
-
href: string;
|
|
8
|
-
};
|
|
9
|
-
type BreadcrumbConfig = {
|
|
10
|
-
includeCurrentPage?: boolean;
|
|
11
|
-
};
|
|
12
|
-
declare function generateApiBreadcrumbs(fullPath: string, spec: any, basePath: string): Breadcrumb[] | null;
|
|
13
|
-
declare function SDKBreadcrumbs({
|
|
14
|
-
spec,
|
|
15
|
-
currentPath,
|
|
16
|
-
basePath,
|
|
17
|
-
config
|
|
18
|
-
}: {
|
|
19
|
-
spec: SDKJSON.Spec;
|
|
20
|
-
currentPath: string;
|
|
21
|
-
basePath?: string;
|
|
22
|
-
config?: BreadcrumbConfig | null;
|
|
23
|
-
}): react_jsx_runtime10.JSX.Element | null;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { generateApiBreadcrumbs as n, SDKBreadcrumbs as t };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React$1 from "react";
|
|
2
|
-
import * as react_jsx_runtime34 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/contexts/component-generics.d.ts
|
|
5
|
-
type DeepPartialMap<L> = { [K in keyof L]?: Partial<L[K]> };
|
|
6
|
-
type ComponentsContextType<C, L> = {
|
|
7
|
-
components: C;
|
|
8
|
-
language: L;
|
|
9
|
-
};
|
|
10
|
-
declare const useComponentContext: () => ComponentsContextType<any, any>;
|
|
11
|
-
declare function useComponents<C = unknown>(): C;
|
|
12
|
-
declare function customizeComponents<C, L>(defaults: {
|
|
13
|
-
components: C;
|
|
14
|
-
language: L;
|
|
15
|
-
}, overrides?: {
|
|
16
|
-
components?: Partial<C>;
|
|
17
|
-
language?: DeepPartialMap<L>;
|
|
18
|
-
}): {
|
|
19
|
-
components: C;
|
|
20
|
-
language: L;
|
|
21
|
-
};
|
|
22
|
-
declare function ComponentProvider<C, L>({
|
|
23
|
-
value,
|
|
24
|
-
children
|
|
25
|
-
}: {
|
|
26
|
-
value: ComponentsContextType<C, L>;
|
|
27
|
-
children: React$1.ReactNode;
|
|
28
|
-
}): react_jsx_runtime34.JSX.Element;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { useComponents as a, useComponentContext as i, ComponentsContextType as n, customizeComponents as r, ComponentProvider as t };
|
package/dist/docs-BQbH-a6R.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as React$1 from "react";
|
|
2
|
-
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
|
-
import * as _stainless_sdk_json0 from "@stainless/sdk-json";
|
|
4
|
-
import { LanguageDeclNodes, Spec, SpecLanguage } from "@stainless/sdk-json";
|
|
5
|
-
|
|
6
|
-
//#region src/contexts/docs.d.ts
|
|
7
|
-
type ContentPanelLayout = 'double-pane' | 'single-pane';
|
|
8
|
-
type PropertySettingsType = {
|
|
9
|
-
types?: 'simple' | 'rich';
|
|
10
|
-
includeModelProperties?: boolean;
|
|
11
|
-
collapseDescription?: boolean;
|
|
12
|
-
showTitle?: boolean;
|
|
13
|
-
expandDepth?: number;
|
|
14
|
-
};
|
|
15
|
-
type DocsContextType = {
|
|
16
|
-
language: SpecLanguage;
|
|
17
|
-
spec: Spec | null;
|
|
18
|
-
settings?: {
|
|
19
|
-
properties?: PropertySettingsType;
|
|
20
|
-
contentPanelLayout?: ContentPanelLayout;
|
|
21
|
-
virtualExpanders?: boolean;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
declare function useDocs(): DocsContextType;
|
|
25
|
-
declare function useSpec(): Spec | null;
|
|
26
|
-
declare function useSettings(): {
|
|
27
|
-
properties?: PropertySettingsType;
|
|
28
|
-
contentPanelLayout?: ContentPanelLayout;
|
|
29
|
-
virtualExpanders?: boolean;
|
|
30
|
-
} | undefined;
|
|
31
|
-
declare function useSnippet(stainlessPath: string, language?: SpecLanguage, variant?: string): string | undefined;
|
|
32
|
-
type Declaration = LanguageDeclNodes[SpecLanguage];
|
|
33
|
-
declare function useDeclaration<Required extends boolean>(stainlessPath: string, required: Required, language?: SpecLanguage): (Required extends true ? never : undefined) | Declaration;
|
|
34
|
-
declare function useResource(name: string): _stainless_sdk_json0.Resource | undefined;
|
|
35
|
-
declare function useLanguage(): "http" | "node" | "python" | "go" | "typescript" | "terraform" | "ruby" | "java" | "kotlin" | "csharp" | "php";
|
|
36
|
-
declare function useContentPanelLayout(): ContentPanelLayout;
|
|
37
|
-
type DocsProviderProps = DocsContextType & {
|
|
38
|
-
children: React$1.ReactNode;
|
|
39
|
-
};
|
|
40
|
-
declare function DocsProvider({
|
|
41
|
-
spec,
|
|
42
|
-
language,
|
|
43
|
-
settings,
|
|
44
|
-
children
|
|
45
|
-
}: DocsProviderProps): react_jsx_runtime13.JSX.Element;
|
|
46
|
-
//#endregion
|
|
47
|
-
export { PropertySettingsType as a, useDocs as c, useSettings as d, useSnippet as f, DocsProviderProps as i, useLanguage as l, DocsContextType as n, useContentPanelLayout as o, useSpec as p, DocsProvider as r, useDeclaration as s, ContentPanelLayout as t, useResource as u };
|