@stainless-api/docs-ui 0.1.0-beta.85 → 0.1.0-beta.87
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-DC2_z7nh.d.ts +25 -0
- package/dist/chunk-pbuEa-1d.js +13 -0
- package/dist/component-generics-DYxBWv1v.js +42 -0
- package/dist/component-generics-q-ujwX4P.d.ts +30 -0
- package/dist/components/MaskedInput.d.ts +1 -1
- package/dist/components/MaskedInput.js +1 -3
- package/dist/components/breadcrumbs.d.ts +1 -24
- package/dist/components/breadcrumbs.js +2 -4
- package/dist/components/icons.js +4 -6
- package/dist/components/index.d.ts +10 -16
- package/dist/components/index.js +3 -5
- package/dist/components/method.d.ts +1 -58
- package/dist/components/method.js +12 -14
- package/dist/components/overview.d.ts +1 -38
- package/dist/components/overview.js +6 -5
- package/dist/components/primitives.d.ts +1 -106
- package/dist/components/primitives.js +2 -4
- package/dist/components/properties.d.ts +1 -53
- package/dist/components/properties.js +17 -19
- package/dist/components/sdk-sidebar.d.ts +1 -14
- package/dist/components/sdk-sidebar.js +2 -4
- package/dist/components/sdk.d.ts +1 -127
- package/dist/components/sdk.js +3 -5
- package/dist/components/snippets.d.ts +1 -70
- package/dist/components/snippets.js +16 -16
- package/dist/components/stl-sidebar.d.ts +1 -57
- package/dist/components/stl-sidebar.js +2 -4
- package/dist/contexts/component-generics.d.ts +1 -29
- package/dist/contexts/component-generics.js +2 -33
- package/dist/contexts/component-types.d.ts +3 -5
- package/dist/contexts/component.d.ts +4 -5
- package/dist/contexts/component.js +2 -5
- package/dist/contexts/docs.d.ts +1 -61
- package/dist/contexts/docs.js +1 -3
- package/dist/contexts/index.d.ts +6 -13
- package/dist/contexts/index.js +5 -7
- package/dist/contexts/markdown.d.ts +2 -22
- package/dist/contexts/markdown.js +28 -15
- package/dist/contexts/navigation.d.ts +1 -28
- package/dist/contexts/navigation.js +1 -3
- package/dist/contexts/use-components.d.ts +1 -2
- package/dist/contexts/use-components.js +2 -5
- package/dist/docs-BomxNGuD.d.ts +62 -0
- package/dist/docs-DSjdvCh5.d.ts +62 -0
- package/dist/index-gGDaf6FK.d.ts +464 -0
- package/dist/index-uRQlPa4x.d.ts +464 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +2 -3
- package/dist/languages/cli.d.ts +2 -38
- package/dist/languages/cli.js +3 -5
- package/dist/languages/csharp.d.ts +2 -42
- package/dist/languages/csharp.js +3 -5
- package/dist/languages/go.d.ts +2 -40
- package/dist/languages/go.js +3 -5
- package/dist/languages/http.d.ts +2 -46
- package/dist/languages/http.js +5 -7
- package/dist/languages/index.d.ts +2 -51
- package/dist/languages/index.js +3 -5
- package/dist/languages/java.d.ts +2 -43
- package/dist/languages/java.js +3 -5
- package/dist/languages/php.d.ts +2 -40
- package/dist/languages/php.js +3 -5
- package/dist/languages/python.d.ts +2 -40
- package/dist/languages/python.js +3 -5
- package/dist/languages/ruby.d.ts +2 -40
- package/dist/languages/ruby.js +3 -5
- package/dist/languages/terraform.d.ts +2 -48
- package/dist/languages/terraform.js +25 -10
- package/dist/languages/typescript.d.ts +2 -40
- package/dist/languages/typescript.js +5 -7
- package/dist/markdown/index.d.ts +1 -1
- package/dist/markdown/index.js +3 -6
- package/dist/markdown/md.js +1 -3
- package/dist/markdown/printer.d.ts +2 -2
- package/dist/markdown/printer.js +3 -5
- package/dist/markdown/utils.d.ts +3 -3
- package/dist/markdown/utils.js +2 -4
- package/dist/markdown-Cwdboi_V.d.ts +33 -0
- package/dist/method-CNRMOUfn.d.ts +59 -0
- package/dist/navigation-22WDJvRF.d.ts +29 -0
- package/dist/navigation-C9ckAfpV.d.ts +29 -0
- package/dist/overview-CDvh184n.d.ts +39 -0
- package/dist/primitives-DFE_4MvV.d.ts +107 -0
- package/dist/properties-CVwrzWVa.d.ts +54 -0
- package/dist/routing-C_fawH40.d.ts +61 -0
- package/dist/routing-yTSG7nWM.d.ts +61 -0
- package/dist/routing.d.ts +2 -61
- package/dist/routing.js +2 -4
- package/dist/sdk-BkW3MDco.d.ts +128 -0
- package/dist/sdk-Cx2Z7bDk.d.ts +128 -0
- package/dist/sdk-sidebar-BpDlOMat.d.ts +15 -0
- package/dist/spec.d.ts +2 -2
- package/dist/spec.js +1 -3
- package/dist/stl-sidebar-CKrR5ZGs.d.ts +58 -0
- package/dist/style.js +1 -2
- package/dist/styles/main.css +333 -351
- package/dist/styles/primitives.css +133 -185
- package/dist/styles/resets.css +7 -14
- package/dist/styles/search.css +91 -96
- package/dist/styles/sidebar.css +44 -71
- package/dist/styles/variables.css +0 -5
- package/dist/styles.css +1008 -1263
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +2 -4
- package/package.json +9 -8
- package/dist/chunk-BYypO7fO.js +0 -18
- package/dist/styles/main.js +0 -0
- package/dist/styles/primitives.js +0 -0
- package/dist/styles/resets.js +0 -0
- package/dist/styles/search.js +0 -0
- package/dist/styles/sidebar.js +0 -0
- package/dist/styles/variables.js +0 -0
- package/dist/styles.mjs +0 -1
- package/dist/use-strict-context-Clb6Yjly.js +0 -16
- /package/dist/{index-pvh-w1xa.d.ts → index-DFr9Mesr.d.ts} +0 -0
package/dist/routing.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./chunk-
|
|
2
|
-
|
|
1
|
+
import { t as __exportAll } from "./chunk-pbuEa-1d.js";
|
|
3
2
|
//#region src/routing.ts
|
|
4
3
|
var routing_exports = /* @__PURE__ */ __exportAll({
|
|
5
4
|
LanguageNames: () => LanguageNames,
|
|
@@ -201,6 +200,5 @@ function updateHistory(basePath, language, stainlessPath) {
|
|
|
201
200
|
language
|
|
202
201
|
}, "", path);
|
|
203
202
|
}
|
|
204
|
-
|
|
205
203
|
//#endregion
|
|
206
|
-
export { LanguageNames, Languages, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateMissingRouteList, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, routing_exports as t, trimStainlessPath, updateHistory, walkTree };
|
|
204
|
+
export { LanguageNames, Languages, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateMissingRouteList, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, routing_exports as t, trimStainlessPath, updateHistory, walkTree };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { _ as SnippetLanguage, c as ID, d as Method, f as Model, o as HasStainlessPath, t as BaseDeclaration } from "./index-DFr9Mesr.js";
|
|
2
|
+
import { t as DocsLanguage } from "./routing-yTSG7nWM.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
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 DeclarationParentsContextType = ReadonlySet<string>;
|
|
17
|
+
declare function useDeclarationParents(): DeclarationParentsContextType;
|
|
18
|
+
type SDKSnippetLanguagesType = Record<SnippetLanguage, {
|
|
19
|
+
name: string;
|
|
20
|
+
}>;
|
|
21
|
+
declare const SDKSnippetLanguages: SDKSnippetLanguagesType;
|
|
22
|
+
type TransformRequestSnippetFn = ({
|
|
23
|
+
snippet,
|
|
24
|
+
language
|
|
25
|
+
}: {
|
|
26
|
+
snippet: string;
|
|
27
|
+
language: DocsLanguage;
|
|
28
|
+
}) => string;
|
|
29
|
+
type SDKChildrenProps = {
|
|
30
|
+
paths: ID[];
|
|
31
|
+
expand?: boolean;
|
|
32
|
+
depth?: number;
|
|
33
|
+
};
|
|
34
|
+
declare function SDKChildren({
|
|
35
|
+
paths,
|
|
36
|
+
expand,
|
|
37
|
+
depth
|
|
38
|
+
}: SDKChildrenProps): react_jsx_runtime0.JSX.Element;
|
|
39
|
+
type SDKDeclarationProps = {
|
|
40
|
+
path: string;
|
|
41
|
+
expand?: boolean;
|
|
42
|
+
depth?: number;
|
|
43
|
+
};
|
|
44
|
+
declare function SDKDeclaration({
|
|
45
|
+
path,
|
|
46
|
+
expand,
|
|
47
|
+
depth
|
|
48
|
+
}: SDKDeclarationProps): react_jsx_runtime0.JSX.Element;
|
|
49
|
+
type SDKConstraintsProps = {
|
|
50
|
+
constraints?: Record<string, unknown>;
|
|
51
|
+
};
|
|
52
|
+
declare function SDKConstraints({
|
|
53
|
+
constraints
|
|
54
|
+
}: SDKConstraintsProps): react_jsx_runtime0.JSX.Element | undefined;
|
|
55
|
+
type SDKIconProps = {
|
|
56
|
+
language: SnippetLanguage;
|
|
57
|
+
size?: number;
|
|
58
|
+
};
|
|
59
|
+
declare function SDKIcon({
|
|
60
|
+
language
|
|
61
|
+
}: SDKIconProps): react_jsx_runtime0.JSX.Element | null;
|
|
62
|
+
type SDKRequestTitleProps = {
|
|
63
|
+
snippetLanguage: SnippetLanguage;
|
|
64
|
+
};
|
|
65
|
+
declare function SDKRequestTitle({
|
|
66
|
+
snippetLanguage
|
|
67
|
+
}: SDKRequestTitleProps): react_jsx_runtime0.JSX.Element;
|
|
68
|
+
type SDKExampleProps = {
|
|
69
|
+
method: Partial<Method> & HasStainlessPath;
|
|
70
|
+
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
71
|
+
};
|
|
72
|
+
declare function SDKExample({
|
|
73
|
+
method,
|
|
74
|
+
transformRequestSnippet
|
|
75
|
+
}: SDKExampleProps): react_jsx_runtime0.JSX.Element;
|
|
76
|
+
type SDKMethodProps = {
|
|
77
|
+
method: Method;
|
|
78
|
+
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
79
|
+
};
|
|
80
|
+
declare function SDKMethodHeader({
|
|
81
|
+
method
|
|
82
|
+
}: SDKMethodProps): react_jsx_runtime0.JSX.Element;
|
|
83
|
+
declare function useStreamingResponse(method: BaseDeclaration): ID | undefined;
|
|
84
|
+
declare function SDKMethodInfo({
|
|
85
|
+
method,
|
|
86
|
+
children
|
|
87
|
+
}: SDKMethodProps & {
|
|
88
|
+
children?: React$1.ReactNode;
|
|
89
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
90
|
+
declare function SDKMethodNotImplemented({
|
|
91
|
+
method
|
|
92
|
+
}: SDKMethodProps): react_jsx_runtime0.JSX.Element;
|
|
93
|
+
declare function SDKMethodInfoContent(_props: SDKMethodProps): React$1.ReactNode;
|
|
94
|
+
declare function SDKMethod({
|
|
95
|
+
method,
|
|
96
|
+
transformRequestSnippet
|
|
97
|
+
}: SDKMethodProps): react_jsx_runtime0.JSX.Element;
|
|
98
|
+
type SDKModelProps = {
|
|
99
|
+
model: Model;
|
|
100
|
+
};
|
|
101
|
+
declare function SDKModel({
|
|
102
|
+
model
|
|
103
|
+
}: SDKModelProps): react_jsx_runtime0.JSX.Element | null;
|
|
104
|
+
type SDKReferenceProps = {
|
|
105
|
+
stainlessPath: string;
|
|
106
|
+
children?: React$1.ReactNode;
|
|
107
|
+
};
|
|
108
|
+
declare function SDKReference({
|
|
109
|
+
stainlessPath,
|
|
110
|
+
children
|
|
111
|
+
}: 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_runtime0.JSX.Element | null | undefined;
|
|
112
|
+
type SDKLanguageBlockProps = {
|
|
113
|
+
language: DocsLanguage;
|
|
114
|
+
version: string;
|
|
115
|
+
install: string;
|
|
116
|
+
links: {
|
|
117
|
+
repo: string;
|
|
118
|
+
docs: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
declare function SDKLanguageBlock({
|
|
122
|
+
language,
|
|
123
|
+
version,
|
|
124
|
+
install,
|
|
125
|
+
links
|
|
126
|
+
}: SDKLanguageBlockProps): react_jsx_runtime0.JSX.Element;
|
|
127
|
+
//#endregion
|
|
128
|
+
export { useStreamingResponse as A, SDKRequestTitleProps as C, useDeclarationParents as D, TransformRequestSnippetFn as E, usePropertyModel as O, SDKRequestTitle as S, SDKSnippetLanguagesType as T, SDKMethodNotImplemented as _, ReferenceNestingContextType as a, SDKModelProps as b, SDKConstraintsProps as c, SDKIcon as d, SDKLanguageBlock as f, SDKMethodInfoContent as g, SDKMethodInfo as h, ReferenceNestingContext as i, useReferenceNesting as k, SDKDeclaration as l, SDKMethodHeader as m, PropertyModelContext as n, SDKChildren as o, SDKMethod as p, PropertyModelContextType as r, SDKConstraints as s, DeclarationParentsContextType as t, SDKExample as u, SDKMethodProps as v, SDKSnippetLanguages as w, SDKReference as x, SDKModel as y };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { _ as SnippetLanguage, c as ID, d as Method, f as Model, o as HasStainlessPath, t as BaseDeclaration } from "./index-DFr9Mesr.js";
|
|
2
|
+
import { t as DocsLanguage } from "./routing-C_fawH40.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
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 DeclarationParentsContextType = ReadonlySet<string>;
|
|
17
|
+
declare function useDeclarationParents(): DeclarationParentsContextType;
|
|
18
|
+
type SDKSnippetLanguagesType = Record<SnippetLanguage, {
|
|
19
|
+
name: string;
|
|
20
|
+
}>;
|
|
21
|
+
declare const SDKSnippetLanguages: SDKSnippetLanguagesType;
|
|
22
|
+
type TransformRequestSnippetFn = ({
|
|
23
|
+
snippet,
|
|
24
|
+
language
|
|
25
|
+
}: {
|
|
26
|
+
snippet: string;
|
|
27
|
+
language: DocsLanguage;
|
|
28
|
+
}) => string;
|
|
29
|
+
type SDKChildrenProps = {
|
|
30
|
+
paths: ID[];
|
|
31
|
+
expand?: boolean;
|
|
32
|
+
depth?: number;
|
|
33
|
+
};
|
|
34
|
+
declare function SDKChildren({
|
|
35
|
+
paths,
|
|
36
|
+
expand,
|
|
37
|
+
depth
|
|
38
|
+
}: SDKChildrenProps): react_jsx_runtime0.JSX.Element;
|
|
39
|
+
type SDKDeclarationProps = {
|
|
40
|
+
path: string;
|
|
41
|
+
expand?: boolean;
|
|
42
|
+
depth?: number;
|
|
43
|
+
};
|
|
44
|
+
declare function SDKDeclaration({
|
|
45
|
+
path,
|
|
46
|
+
expand,
|
|
47
|
+
depth
|
|
48
|
+
}: SDKDeclarationProps): react_jsx_runtime0.JSX.Element;
|
|
49
|
+
type SDKConstraintsProps = {
|
|
50
|
+
constraints?: Record<string, unknown>;
|
|
51
|
+
};
|
|
52
|
+
declare function SDKConstraints({
|
|
53
|
+
constraints
|
|
54
|
+
}: SDKConstraintsProps): react_jsx_runtime0.JSX.Element | undefined;
|
|
55
|
+
type SDKIconProps = {
|
|
56
|
+
language: SnippetLanguage;
|
|
57
|
+
size?: number;
|
|
58
|
+
};
|
|
59
|
+
declare function SDKIcon({
|
|
60
|
+
language
|
|
61
|
+
}: SDKIconProps): react_jsx_runtime0.JSX.Element | null;
|
|
62
|
+
type SDKRequestTitleProps = {
|
|
63
|
+
snippetLanguage: SnippetLanguage;
|
|
64
|
+
};
|
|
65
|
+
declare function SDKRequestTitle({
|
|
66
|
+
snippetLanguage
|
|
67
|
+
}: SDKRequestTitleProps): react_jsx_runtime0.JSX.Element;
|
|
68
|
+
type SDKExampleProps = {
|
|
69
|
+
method: Partial<Method> & HasStainlessPath;
|
|
70
|
+
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
71
|
+
};
|
|
72
|
+
declare function SDKExample({
|
|
73
|
+
method,
|
|
74
|
+
transformRequestSnippet
|
|
75
|
+
}: SDKExampleProps): react_jsx_runtime0.JSX.Element;
|
|
76
|
+
type SDKMethodProps = {
|
|
77
|
+
method: Method;
|
|
78
|
+
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
79
|
+
};
|
|
80
|
+
declare function SDKMethodHeader({
|
|
81
|
+
method
|
|
82
|
+
}: SDKMethodProps): react_jsx_runtime0.JSX.Element;
|
|
83
|
+
declare function useStreamingResponse(method: BaseDeclaration): ID | undefined;
|
|
84
|
+
declare function SDKMethodInfo({
|
|
85
|
+
method,
|
|
86
|
+
children
|
|
87
|
+
}: SDKMethodProps & {
|
|
88
|
+
children?: React$1.ReactNode;
|
|
89
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
90
|
+
declare function SDKMethodNotImplemented({
|
|
91
|
+
method
|
|
92
|
+
}: SDKMethodProps): react_jsx_runtime0.JSX.Element;
|
|
93
|
+
declare function SDKMethodInfoContent(_props: SDKMethodProps): React$1.ReactNode;
|
|
94
|
+
declare function SDKMethod({
|
|
95
|
+
method,
|
|
96
|
+
transformRequestSnippet
|
|
97
|
+
}: SDKMethodProps): react_jsx_runtime0.JSX.Element;
|
|
98
|
+
type SDKModelProps = {
|
|
99
|
+
model: Model;
|
|
100
|
+
};
|
|
101
|
+
declare function SDKModel({
|
|
102
|
+
model
|
|
103
|
+
}: SDKModelProps): react_jsx_runtime0.JSX.Element | null;
|
|
104
|
+
type SDKReferenceProps = {
|
|
105
|
+
stainlessPath: string;
|
|
106
|
+
children?: React$1.ReactNode;
|
|
107
|
+
};
|
|
108
|
+
declare function SDKReference({
|
|
109
|
+
stainlessPath,
|
|
110
|
+
children
|
|
111
|
+
}: 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_runtime0.JSX.Element | null | undefined;
|
|
112
|
+
type SDKLanguageBlockProps = {
|
|
113
|
+
language: DocsLanguage;
|
|
114
|
+
version: string;
|
|
115
|
+
install: string;
|
|
116
|
+
links: {
|
|
117
|
+
repo: string;
|
|
118
|
+
docs: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
declare function SDKLanguageBlock({
|
|
122
|
+
language,
|
|
123
|
+
version,
|
|
124
|
+
install,
|
|
125
|
+
links
|
|
126
|
+
}: SDKLanguageBlockProps): react_jsx_runtime0.JSX.Element;
|
|
127
|
+
//#endregion
|
|
128
|
+
export { useStreamingResponse as A, SDKRequestTitleProps as C, useDeclarationParents as D, TransformRequestSnippetFn as E, usePropertyModel as O, SDKRequestTitle as S, SDKSnippetLanguagesType as T, SDKMethodNotImplemented as _, ReferenceNestingContextType as a, SDKModelProps as b, SDKConstraintsProps as c, SDKIcon as d, SDKLanguageBlock as f, SDKMethodInfoContent as g, SDKMethodInfo as h, ReferenceNestingContext as i, useReferenceNesting as k, SDKDeclaration as l, SDKMethodHeader as m, PropertyModelContext as n, SDKChildren as o, SDKMethod as p, PropertyModelContextType as r, SDKConstraints as s, DeclarationParentsContextType as t, SDKExample as u, SDKMethodProps as v, SDKSnippetLanguages as w, SDKReference as x, SDKModel as y };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { h as Resource } from "./index-DFr9Mesr.js";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/sdk-sidebar.d.ts
|
|
5
|
+
type SDKSidebarProps = {
|
|
6
|
+
resources: Resource[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Given some SDKJSON.Resources, calls into StlSidebar with the appropriate sidebar entries.
|
|
10
|
+
*/
|
|
11
|
+
declare function SDKSidebar({
|
|
12
|
+
resources
|
|
13
|
+
}: SDKSidebarProps): react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { SDKSidebarProps as n, SDKSidebar as t };
|
package/dist/spec.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as Method, f as Model, h as Resource, i as DeclarationNode, v as Spec, y as SpecLanguage } from "./index-
|
|
2
|
-
import { DocsLanguage } from "./routing.js";
|
|
1
|
+
import { d as Method, f as Model, h as Resource, i as DeclarationNode, v as Spec, y as SpecLanguage } from "./index-DFr9Mesr.js";
|
|
2
|
+
import { t as DocsLanguage } from "./routing-C_fawH40.js";
|
|
3
3
|
|
|
4
4
|
//#region src/spec.d.ts
|
|
5
5
|
type SecurityScheme = Spec['security_schemes'][number];
|
package/dist/spec.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Languages } from "./routing.js";
|
|
2
2
|
import { isResourceEmpty } from "./utils.js";
|
|
3
|
-
|
|
4
3
|
//#region src/spec.ts
|
|
5
4
|
const defaultTransforms = {
|
|
6
5
|
resource: (resource) => resource,
|
|
@@ -162,6 +161,5 @@ async function retrieve(apiKey, project, revision) {
|
|
|
162
161
|
})).json();
|
|
163
162
|
if (typeof data.spec === "string") return parseSpec(data.spec);
|
|
164
163
|
}
|
|
165
|
-
|
|
166
164
|
//#endregion
|
|
167
|
-
export { defineTransforms, generateNavigation, generateSpecForResource, parseSpec, retrieve, split, transform };
|
|
165
|
+
export { defineTransforms, generateNavigation, generateSpecForResource, parseSpec, retrieve, split, transform };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/stl-sidebar.d.ts
|
|
5
|
+
declare module 'react' {
|
|
6
|
+
namespace JSX {
|
|
7
|
+
interface IntrinsicElements {
|
|
8
|
+
/**
|
|
9
|
+
* Custom element defined by Starlight's <SidebarPersister>.
|
|
10
|
+
*/
|
|
11
|
+
'sl-sidebar-restore': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
type StlSidebarTarget = {
|
|
16
|
+
type: 'href';
|
|
17
|
+
href: string;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'stainlessPath';
|
|
20
|
+
stainlessPath: string;
|
|
21
|
+
};
|
|
22
|
+
interface StlSidebarLink {
|
|
23
|
+
type: 'link';
|
|
24
|
+
icon?: ReactNode;
|
|
25
|
+
label: string;
|
|
26
|
+
/** Current sidebar item is highlighted. */
|
|
27
|
+
isCurrent?: boolean;
|
|
28
|
+
target: StlSidebarTarget;
|
|
29
|
+
/** Additional HTML attributes that will be attached to the anchor element. */
|
|
30
|
+
attrs?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
interface StlSidebarGroup {
|
|
33
|
+
type: 'group';
|
|
34
|
+
icon?: ReactNode;
|
|
35
|
+
label: string;
|
|
36
|
+
entries: Array<StlSidebarLink | StlSidebarGroup>;
|
|
37
|
+
/** Defaults to true. */
|
|
38
|
+
collapsible?: boolean;
|
|
39
|
+
collapsed?: boolean;
|
|
40
|
+
/** Current sidebar item is highlighted. */
|
|
41
|
+
isCurrent?: boolean;
|
|
42
|
+
target?: StlSidebarTarget;
|
|
43
|
+
}
|
|
44
|
+
type StlSidebarEntry = StlSidebarLink | StlSidebarGroup;
|
|
45
|
+
type StlSidebarProps = {
|
|
46
|
+
entries: StlSidebarEntry[];
|
|
47
|
+
/**
|
|
48
|
+
* If set, add <sl-sidebar-restore> custom elements (as defined by Starlight's SidebarPersister)
|
|
49
|
+
* which are used to save/restore sidebar state.
|
|
50
|
+
*/
|
|
51
|
+
withStarlightRestoration?: boolean;
|
|
52
|
+
};
|
|
53
|
+
declare function StlSidebar({
|
|
54
|
+
entries,
|
|
55
|
+
withStarlightRestoration
|
|
56
|
+
}: StlSidebarProps): react_jsx_runtime0.JSX.Element;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { StlSidebarProps as a, StlSidebarLink as i, StlSidebarEntry as n, StlSidebarTarget as o, StlSidebarGroup as r, StlSidebar as t };
|
package/dist/style.js
CHANGED