@stainless-api/docs-ui 0.1.0-beta.69 → 0.1.0-beta.70
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-BhYwbXkc.d.ts +25 -0
- package/dist/{cli-MlcHZWvQ.js → cli-F3kMmeoJ.js} +1 -1
- package/dist/{component-C7n1bZ-Z.js → component-P9sn5yyG.js} +2 -2
- package/dist/component-generics-ByGsYTc8.d.ts +30 -0
- package/dist/components/MaskedInput.d.ts +3 -3
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/icons.d.ts +12 -12
- package/dist/components/index.d.ts +10 -10
- package/dist/components/index.js +2 -2
- package/dist/components/method.d.ts +1 -1
- package/dist/components/overview.d.ts +1 -1
- package/dist/components/primitives.d.ts +1 -1
- package/dist/components/properties.d.ts +1 -1
- package/dist/components/sdk-sidebar.d.ts +1 -1
- package/dist/components/sdk.d.ts +1 -1
- package/dist/components/sdk.js +1 -1
- package/dist/components/snippets.d.ts +2 -2
- package/dist/components/stl-sidebar.d.ts +1 -1
- package/dist/{components-Bu-V0Ani.js → components-w1JmIrB0.js} +1 -1
- package/dist/contexts/component-generics.d.ts +1 -1
- package/dist/contexts/component-types.d.ts +11 -11
- package/dist/contexts/component.d.ts +14 -14
- package/dist/contexts/component.js +6 -6
- package/dist/contexts/docs.d.ts +1 -1
- package/dist/contexts/index.d.ts +15 -15
- package/dist/contexts/markdown.d.ts +1 -1
- package/dist/contexts/navigation.d.ts +1 -1
- package/dist/contexts/use-components.d.ts +10 -10
- package/dist/docs-g4IPmtZr.d.ts +48 -0
- package/dist/{docs-C1hj7a7l.d.ts → docs-z3fl2eW-.d.ts} +2 -2
- package/dist/{http-Bg6D0bNX.js → http-fOPCX17A.js} +1 -1
- package/dist/{index-CCxFSaje.d.ts → index-B8Zys1C2.d.ts} +39 -39
- package/dist/{index-CaB6Jh8S.d.ts → index-C5Zmb2CI.d.ts} +8 -8
- package/dist/index-D7PkxNgB.d.ts +16 -0
- package/dist/index-DIaM6Ync.d.ts +347 -0
- package/dist/index.d.ts +15 -15
- package/dist/index.js +5 -5
- package/dist/languages/cli.d.ts +11 -11
- package/dist/languages/cli.js +4 -4
- package/dist/languages/csharp.d.ts +11 -11
- package/dist/languages/go.d.ts +11 -11
- package/dist/languages/http.d.ts +11 -11
- package/dist/languages/http.js +3 -3
- package/dist/languages/index.d.ts +11 -11
- package/dist/languages/index.js +5 -5
- package/dist/languages/java.d.ts +11 -11
- package/dist/languages/python.d.ts +11 -11
- package/dist/languages/ruby.d.ts +11 -11
- package/dist/languages/terraform.d.ts +11 -11
- package/dist/languages/typescript.d.ts +11 -11
- package/dist/{languages-kmF_JEqJ.js → languages-B6eap2M6.js} +2 -2
- package/dist/markdown/index.d.ts +1 -1
- package/dist/markdown/index.js +6 -6
- package/dist/markdown/printer.js +6 -6
- package/dist/markdown/utils.d.ts +1 -1
- package/dist/{markdown-Dvsw4Rrr.d.ts → markdown-Cdh0TSHp.d.ts} +2 -2
- package/dist/markdown-Cibv9fDR.d.ts +22 -0
- package/dist/{method-DPnfsySL.d.ts → method-630cPKDl.d.ts} +6 -6
- package/dist/method-BzkPRXGL.d.ts +59 -0
- package/dist/navigation-BW-SBvb4.d.ts +29 -0
- package/dist/{navigation-C7KdkOOQ.d.ts → navigation-DWYqC_HX.d.ts} +2 -2
- package/dist/{overview-CXNo7yhX.d.ts → overview-Cui1XtuC.d.ts} +6 -6
- package/dist/overview-RXc9iPzz.d.ts +39 -0
- package/dist/{primitives-Dt0u9KhI.d.ts → primitives-DhGxFYx6.d.ts} +11 -11
- package/dist/primitives-MsH-h0bU.d.ts +105 -0
- package/dist/{properties-BYmc18KM.d.ts → properties-Bynmj9_H.d.ts} +5 -5
- package/dist/properties-C9W4QJ_F.d.ts +54 -0
- package/dist/routing-utiR5mY3.d.ts +61 -0
- package/dist/{sdk-7I25t5FC.d.ts → sdk-BvZeXpsj.d.ts} +15 -15
- package/dist/{sdk-B69ZT1zY.js → sdk-Bw99eXxA.js} +0 -4
- package/dist/sdk-GMOw94wL.d.ts +122 -0
- package/dist/{sdk-sidebar-JyrSuu5b.d.ts → sdk-sidebar-NCBSWuUW.d.ts} +2 -2
- package/dist/sdk-sidebar-VNY2-O1Y.d.ts +15 -0
- package/dist/{snippets-DZM_ogqa.d.ts → snippets-Bj7Ey56K.d.ts} +8 -8
- package/dist/snippets-CQQSDvg2.d.ts +53 -0
- package/dist/spec.d.ts +2 -2
- package/dist/{stl-sidebar-BR04ktwN.d.ts → stl-sidebar-CXzs_shz.d.ts} +2 -2
- package/dist/stl-sidebar-DSkUHwcU.d.ts +58 -0
- package/package.json +1 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { c as ID, d as Method, f as Model, g as SnippetLanguage, o as HasStainlessPath, t as BaseDeclaration } from "./index-CwjGm9zX.js";
|
|
2
|
+
import { t as DocsLanguage } from "./routing-Cm_9XJiQ.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import * as react_jsx_runtime30 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 SDKSnippetLanguagesType = Record<SnippetLanguage, {
|
|
17
|
+
name: string;
|
|
18
|
+
}>;
|
|
19
|
+
declare const SDKSnippetLanguages: SDKSnippetLanguagesType;
|
|
20
|
+
type TransformRequestSnippetFn = ({
|
|
21
|
+
snippet,
|
|
22
|
+
language
|
|
23
|
+
}: {
|
|
24
|
+
snippet: string;
|
|
25
|
+
language: DocsLanguage;
|
|
26
|
+
}) => string;
|
|
27
|
+
type SDKChildrenProps = {
|
|
28
|
+
paths: ID[];
|
|
29
|
+
expand?: boolean;
|
|
30
|
+
depth?: number;
|
|
31
|
+
};
|
|
32
|
+
declare function SDKChildren({
|
|
33
|
+
paths,
|
|
34
|
+
expand,
|
|
35
|
+
depth
|
|
36
|
+
}: SDKChildrenProps): react_jsx_runtime30.JSX.Element;
|
|
37
|
+
type SDKDeclarationProps = {
|
|
38
|
+
path: string;
|
|
39
|
+
expand?: boolean;
|
|
40
|
+
depth?: number;
|
|
41
|
+
};
|
|
42
|
+
declare function SDKDeclaration({
|
|
43
|
+
path,
|
|
44
|
+
expand,
|
|
45
|
+
depth
|
|
46
|
+
}: SDKDeclarationProps): react_jsx_runtime30.JSX.Element;
|
|
47
|
+
type SDKConstraintsProps = {
|
|
48
|
+
constraints?: Record<string, any>;
|
|
49
|
+
};
|
|
50
|
+
declare function SDKConstraints({
|
|
51
|
+
constraints
|
|
52
|
+
}: SDKConstraintsProps): react_jsx_runtime30.JSX.Element | undefined;
|
|
53
|
+
type SDKIconProps = {
|
|
54
|
+
language: SnippetLanguage;
|
|
55
|
+
size?: number;
|
|
56
|
+
};
|
|
57
|
+
declare function SDKIcon({
|
|
58
|
+
language
|
|
59
|
+
}: SDKIconProps): react_jsx_runtime30.JSX.Element | null;
|
|
60
|
+
type SDKRequestTitleProps = {
|
|
61
|
+
snippetLanguage: SnippetLanguage;
|
|
62
|
+
};
|
|
63
|
+
declare function SDKRequestTitle({
|
|
64
|
+
snippetLanguage
|
|
65
|
+
}: SDKRequestTitleProps): react_jsx_runtime30.JSX.Element;
|
|
66
|
+
type SDKExampleProps = {
|
|
67
|
+
method: Partial<Method> & HasStainlessPath;
|
|
68
|
+
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
69
|
+
};
|
|
70
|
+
declare function SDKExample({
|
|
71
|
+
method,
|
|
72
|
+
transformRequestSnippet
|
|
73
|
+
}: SDKExampleProps): react_jsx_runtime30.JSX.Element;
|
|
74
|
+
type SDKMethodProps = {
|
|
75
|
+
method: Method;
|
|
76
|
+
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
77
|
+
};
|
|
78
|
+
declare function SDKMethodHeader({
|
|
79
|
+
method
|
|
80
|
+
}: SDKMethodProps): react_jsx_runtime30.JSX.Element;
|
|
81
|
+
declare function useStreamingResponse(method: BaseDeclaration): ID | undefined;
|
|
82
|
+
declare function SDKMethodInfo({
|
|
83
|
+
method
|
|
84
|
+
}: SDKMethodProps): react_jsx_runtime30.JSX.Element;
|
|
85
|
+
declare function SDKMethodNotImplemented({
|
|
86
|
+
method
|
|
87
|
+
}: SDKMethodProps): react_jsx_runtime30.JSX.Element;
|
|
88
|
+
declare function SDKMethod({
|
|
89
|
+
method,
|
|
90
|
+
transformRequestSnippet
|
|
91
|
+
}: SDKMethodProps): react_jsx_runtime30.JSX.Element;
|
|
92
|
+
type SDKModelProps = {
|
|
93
|
+
model: Model;
|
|
94
|
+
};
|
|
95
|
+
declare function SDKModel({
|
|
96
|
+
model
|
|
97
|
+
}: SDKModelProps): react_jsx_runtime30.JSX.Element | null;
|
|
98
|
+
type SDKReferenceProps = {
|
|
99
|
+
stainlessPath: string;
|
|
100
|
+
children?: React$1.ReactNode;
|
|
101
|
+
};
|
|
102
|
+
declare function SDKReference({
|
|
103
|
+
stainlessPath,
|
|
104
|
+
children
|
|
105
|
+
}: SDKReferenceProps): string | number | bigint | boolean | react_jsx_runtime30.JSX.Element | 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> | null | undefined;
|
|
106
|
+
type SDKLanguageBlockProps = {
|
|
107
|
+
language: DocsLanguage;
|
|
108
|
+
version: string;
|
|
109
|
+
install: string;
|
|
110
|
+
links: {
|
|
111
|
+
repo: string;
|
|
112
|
+
docs: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
declare function SDKLanguageBlock({
|
|
116
|
+
language,
|
|
117
|
+
version,
|
|
118
|
+
install,
|
|
119
|
+
links
|
|
120
|
+
}: SDKLanguageBlockProps): react_jsx_runtime30.JSX.Element;
|
|
121
|
+
//#endregion
|
|
122
|
+
export { SDKSnippetLanguagesType as C, useStreamingResponse as D, useReferenceNesting as E, SDKSnippetLanguages as S, usePropertyModel as T, SDKModel as _, SDKChildren as a, SDKRequestTitle as b, SDKDeclaration as c, SDKLanguageBlock as d, SDKMethod as f, SDKMethodProps as g, SDKMethodNotImplemented 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, SDKModelProps as v, TransformRequestSnippetFn as w, SDKRequestTitleProps as x, SDKReference as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as Resource } from "./index-CwjGm9zX.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime36 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/sdk-sidebar.d.ts
|
|
5
5
|
type SDKSidebarProps = {
|
|
@@ -10,6 +10,6 @@ type SDKSidebarProps = {
|
|
|
10
10
|
*/
|
|
11
11
|
declare function SDKSidebar({
|
|
12
12
|
resources
|
|
13
|
-
}: SDKSidebarProps):
|
|
13
|
+
}: SDKSidebarProps): react_jsx_runtime36.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { SDKSidebarProps as n, SDKSidebar as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { m as Resource } from "./index-CwjGm9zX.js";
|
|
2
|
+
import * as react_jsx_runtime29 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_runtime29.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { SDKSidebarProps as n, SDKSidebar as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as Method, o as HasStainlessPath } from "./index-CwjGm9zX.js";
|
|
2
|
-
import { w as TransformRequestSnippetFn } from "./sdk-
|
|
2
|
+
import { w as TransformRequestSnippetFn } from "./sdk-BvZeXpsj.js";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime50 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/snippets.d.ts
|
|
7
7
|
type SnippetCodeProps = {
|
|
@@ -12,7 +12,7 @@ type SnippetCodeProps = {
|
|
|
12
12
|
declare function SnippetCode({
|
|
13
13
|
content,
|
|
14
14
|
language
|
|
15
|
-
}: SnippetCodeProps):
|
|
15
|
+
}: SnippetCodeProps): react_jsx_runtime50.JSX.Element;
|
|
16
16
|
type SnippetProps = {
|
|
17
17
|
method: Partial<Method> & HasStainlessPath;
|
|
18
18
|
requestTitle?: React$1.ReactNode;
|
|
@@ -25,29 +25,29 @@ type SnippetContainerProps = {
|
|
|
25
25
|
};
|
|
26
26
|
declare function SnippetContainer({
|
|
27
27
|
children
|
|
28
|
-
}: SnippetContainerProps):
|
|
28
|
+
}: SnippetContainerProps): react_jsx_runtime50.JSX.Element;
|
|
29
29
|
type SnippetRequestContainerProps = {
|
|
30
30
|
children?: React$1.ReactNode;
|
|
31
31
|
signature?: string;
|
|
32
32
|
};
|
|
33
33
|
declare function SnippetRequestContainer({
|
|
34
34
|
children
|
|
35
|
-
}: SnippetRequestContainerProps):
|
|
35
|
+
}: SnippetRequestContainerProps): react_jsx_runtime50.JSX.Element;
|
|
36
36
|
declare function Snippet({
|
|
37
37
|
requestTitle,
|
|
38
38
|
method,
|
|
39
39
|
transformRequestSnippet
|
|
40
|
-
}: SnippetProps):
|
|
40
|
+
}: SnippetProps): react_jsx_runtime50.JSX.Element | null;
|
|
41
41
|
declare function SnippetButtons({
|
|
42
42
|
content
|
|
43
43
|
}: {
|
|
44
44
|
content: string;
|
|
45
|
-
}):
|
|
45
|
+
}): react_jsx_runtime50.JSX.Element;
|
|
46
46
|
declare function SnippetFooter(): React$1.ReactNode;
|
|
47
47
|
declare function SnippetResponse({
|
|
48
48
|
responses
|
|
49
49
|
}: {
|
|
50
50
|
responses: Method['exampleResponses'];
|
|
51
|
-
}):
|
|
51
|
+
}): react_jsx_runtime50.JSX.Element | null;
|
|
52
52
|
//#endregion
|
|
53
53
|
export { SnippetContainer as a, SnippetProps as c, SnippetResponse as d, SnippetCodeProps as i, SnippetRequestContainer as l, SnippetButtons as n, SnippetContainerProps as o, SnippetCode as r, SnippetFooter as s, Snippet as t, SnippetRequestContainerProps as u };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { d as Method, o as HasStainlessPath } from "./index-CwjGm9zX.js";
|
|
2
|
+
import { w as TransformRequestSnippetFn } from "./sdk-GMOw94wL.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/snippets.d.ts
|
|
7
|
+
type SnippetCodeProps = {
|
|
8
|
+
content: string;
|
|
9
|
+
signature?: string;
|
|
10
|
+
language?: string;
|
|
11
|
+
};
|
|
12
|
+
declare function SnippetCode({
|
|
13
|
+
content,
|
|
14
|
+
language
|
|
15
|
+
}: SnippetCodeProps): react_jsx_runtime0.JSX.Element;
|
|
16
|
+
type SnippetProps = {
|
|
17
|
+
method: Partial<Method> & HasStainlessPath;
|
|
18
|
+
requestTitle?: React$1.ReactNode;
|
|
19
|
+
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
20
|
+
};
|
|
21
|
+
type SnippetContainerProps = {
|
|
22
|
+
method: Partial<Method> & HasStainlessPath;
|
|
23
|
+
children: React$1.ReactNode;
|
|
24
|
+
signature?: string;
|
|
25
|
+
};
|
|
26
|
+
declare function SnippetContainer({
|
|
27
|
+
children
|
|
28
|
+
}: SnippetContainerProps): react_jsx_runtime0.JSX.Element;
|
|
29
|
+
type SnippetRequestContainerProps = {
|
|
30
|
+
children?: React$1.ReactNode;
|
|
31
|
+
signature?: string;
|
|
32
|
+
};
|
|
33
|
+
declare function SnippetRequestContainer({
|
|
34
|
+
children
|
|
35
|
+
}: SnippetRequestContainerProps): react_jsx_runtime0.JSX.Element;
|
|
36
|
+
declare function Snippet({
|
|
37
|
+
requestTitle,
|
|
38
|
+
method,
|
|
39
|
+
transformRequestSnippet
|
|
40
|
+
}: SnippetProps): react_jsx_runtime0.JSX.Element | null;
|
|
41
|
+
declare function SnippetButtons({
|
|
42
|
+
content
|
|
43
|
+
}: {
|
|
44
|
+
content: string;
|
|
45
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
46
|
+
declare function SnippetFooter(): React$1.ReactNode;
|
|
47
|
+
declare function SnippetResponse({
|
|
48
|
+
responses
|
|
49
|
+
}: {
|
|
50
|
+
responses: Method['exampleResponses'];
|
|
51
|
+
}): react_jsx_runtime0.JSX.Element | null;
|
|
52
|
+
//#endregion
|
|
53
|
+
export { SnippetContainer as a, SnippetProps as c, SnippetResponse as d, SnippetCodeProps as i, SnippetRequestContainer as l, SnippetButtons as n, SnippetContainerProps as o, SnippetCode as r, SnippetFooter as s, Snippet as t, SnippetRequestContainerProps as u };
|
package/dist/spec.d.ts
CHANGED
|
@@ -36,13 +36,13 @@ declare function generateNavigation(resource: Partial<Resource>): {
|
|
|
36
36
|
declare function generateSpecForResource(spec: Spec, name: string, lang: DocsLanguage, transforms: SpecTransforms): Partial<Spec>;
|
|
37
37
|
declare function transform(spec: Spec, transforms: SpecTransforms): {
|
|
38
38
|
name: string;
|
|
39
|
-
lang: "
|
|
39
|
+
lang: "http" | "node" | "python" | "go" | "typescript" | "terraform" | "ruby" | "java" | "kotlin" | "csharp" | "php" | "cli";
|
|
40
40
|
spec: Partial<Spec>;
|
|
41
41
|
}[];
|
|
42
42
|
declare function split(spec: Spec, transforms?: SpecTransforms): {
|
|
43
43
|
resources: ReturnType<typeof transform>;
|
|
44
44
|
navigation: {
|
|
45
|
-
languages: ("
|
|
45
|
+
languages: ("http" | "node" | "python" | "go" | "typescript" | "terraform" | "ruby" | "java" | "kotlin")[] | undefined;
|
|
46
46
|
resources: {
|
|
47
47
|
[k: string]: {
|
|
48
48
|
title: string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime43 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/stl-sidebar.d.ts
|
|
5
5
|
declare module 'react' {
|
|
@@ -53,6 +53,6 @@ type StlSidebarProps = {
|
|
|
53
53
|
declare function StlSidebar({
|
|
54
54
|
entries,
|
|
55
55
|
withStarlightRestoration
|
|
56
|
-
}: StlSidebarProps):
|
|
56
|
+
}: StlSidebarProps): react_jsx_runtime43.JSX.Element;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { StlSidebarProps as a, StlSidebarLink as i, StlSidebarEntry as n, StlSidebarTarget as o, StlSidebarGroup as r, StlSidebar as t };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as react_jsx_runtime56 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_runtime56.JSX.Element;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { StlSidebarProps as a, StlSidebarLink as i, StlSidebarEntry as n, StlSidebarTarget as o, StlSidebarGroup as r, StlSidebar as t };
|