@stainless-api/docs-ui 0.1.0-beta.9 → 0.1.0-beta.91
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-BaNU4WsC.d.ts +25 -0
- package/dist/chunk-pbuEa-1d.js +13 -0
- package/dist/component-generics-D9XaPlr8.d.ts +30 -0
- package/dist/component-generics-DYxBWv1v.js +42 -0
- package/dist/components/MaskedInput.d.ts +14 -0
- package/dist/components/MaskedInput.js +74 -0
- package/dist/components/breadcrumbs.d.ts +2 -0
- package/dist/components/breadcrumbs.js +61 -0
- package/dist/components/icons.d.ts +72 -0
- package/dist/components/icons.js +953 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.js +72 -0
- package/dist/components/method.d.ts +2 -0
- package/dist/components/method.js +94 -0
- package/dist/components/overview.d.ts +2 -0
- package/dist/components/overview.js +139 -0
- package/dist/components/primitives.d.ts +2 -0
- package/dist/components/primitives.js +250 -0
- package/dist/components/properties.d.ts +2 -0
- package/dist/components/properties.js +143 -0
- package/dist/components/sdk-sidebar.d.ts +2 -0
- package/dist/components/sdk-sidebar.js +49 -0
- package/dist/components/sdk.d.ts +2 -0
- package/dist/components/sdk.js +487 -0
- package/dist/components/snippets.d.ts +2 -0
- package/dist/components/snippets.js +183 -0
- package/dist/components/stl-sidebar.d.ts +2 -0
- package/dist/components/stl-sidebar.js +111 -0
- package/dist/contexts/component-generics.d.ts +2 -0
- package/dist/contexts/component-generics.js +2 -0
- package/dist/contexts/component-types.d.ts +7 -0
- package/dist/contexts/component-types.js +0 -0
- package/dist/contexts/component.d.ts +20 -0
- package/dist/contexts/component.js +21 -0
- package/dist/contexts/docs.d.ts +2 -0
- package/dist/contexts/docs.js +89 -0
- package/dist/contexts/index.d.ts +6 -0
- package/dist/contexts/index.js +43 -0
- package/dist/contexts/markdown.d.ts +2 -0
- package/dist/contexts/markdown.js +62 -0
- package/dist/contexts/navigation.d.ts +2 -0
- package/dist/contexts/navigation.js +21 -0
- package/dist/contexts/use-components.d.ts +6 -0
- package/dist/contexts/use-components.js +5 -0
- package/dist/docs-D0qzNoXq.d.ts +62 -0
- package/dist/index-DFr9Mesr.d.ts +1776 -0
- package/dist/index-Dt9uPKZP.d.ts +464 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +7 -7542
- package/dist/languages/cli.d.ts +2 -0
- package/dist/languages/cli.js +164 -0
- package/dist/languages/csharp.d.ts +2 -0
- package/dist/languages/csharp.js +281 -0
- package/dist/languages/go.d.ts +2 -0
- package/dist/languages/go.js +301 -0
- package/dist/languages/http.d.ts +2 -0
- package/dist/languages/http.js +381 -0
- package/dist/languages/index.d.ts +2 -0
- package/dist/languages/index.js +30 -0
- package/dist/languages/java.d.ts +2 -0
- package/dist/languages/java.js +401 -0
- package/dist/languages/php.d.ts +2 -0
- package/dist/languages/php.js +310 -0
- package/dist/languages/python.d.ts +2 -0
- package/dist/languages/python.js +267 -0
- package/dist/languages/ruby.d.ts +2 -0
- package/dist/languages/ruby.js +385 -0
- package/dist/languages/terraform.d.ts +2 -0
- package/dist/languages/terraform.js +258 -0
- package/dist/languages/typescript.d.ts +2 -0
- package/dist/languages/typescript.js +447 -0
- package/dist/markdown/index.d.ts +11 -0
- package/dist/markdown/index.js +86 -0
- package/dist/markdown/md.d.ts +15 -0
- package/dist/markdown/md.js +39 -0
- package/dist/markdown/printer.d.ts +13 -0
- package/dist/markdown/printer.js +73 -0
- package/dist/markdown/utils.d.ts +28 -0
- package/dist/markdown/utils.js +31 -0
- package/dist/markdown-B30HO-Vy.d.ts +33 -0
- package/dist/method-BKJnP-rW.d.ts +59 -0
- package/dist/navigation-DGl8lR6w.d.ts +29 -0
- package/dist/overview-iH1evPEF.d.ts +39 -0
- package/dist/primitives-BHt-BuLf.d.ts +107 -0
- package/dist/properties-CCbMRhSX.d.ts +54 -0
- package/dist/routing-yTSG7nWM.d.ts +61 -0
- package/dist/routing.d.ts +2 -0
- package/dist/routing.js +174 -150
- package/dist/sdk-BengV7mg.d.ts +128 -0
- package/dist/sdk-sidebar-CRqLm3YO.d.ts +15 -0
- package/dist/spec.d.ts +65 -0
- package/dist/spec.js +165 -0
- package/dist/stl-sidebar-Pra9uCYo.d.ts +58 -0
- package/dist/style.d.ts +178 -0
- package/dist/style.js +178 -0
- package/dist/styles/main.css +765 -755
- package/dist/styles/primitives.css +359 -442
- package/dist/styles/resets.css +25 -41
- package/dist/styles/search.css +187 -270
- package/dist/styles/sidebar.css +155 -69
- package/dist/styles/variables.css +23 -89
- package/dist/styles.css +3171 -0
- package/dist/utils.d.ts +20 -0
- package/dist/utils.js +52 -0
- package/package.json +75 -22
- package/dist/mcp.js +0 -16003
- package/dist/styles/snippets.css +0 -132
- package/src/components/breadcrumbs.tsx +0 -94
- package/src/components/chat.tsx +0 -154
- package/src/components/dropdown.tsx +0 -91
- package/src/components/icons.tsx +0 -584
- package/src/components/index.ts +0 -9
- package/src/components/method.tsx +0 -146
- package/src/components/overview.tsx +0 -160
- package/src/components/primitives.tsx +0 -284
- package/src/components/properties.tsx +0 -130
- package/src/components/scripts/dropdown.ts +0 -78
- package/src/components/sdk.tsx +0 -403
- package/src/components/sidebar.tsx +0 -99
- package/src/components/snippets.tsx +0 -180
- package/src/contexts/component-generics.tsx +0 -48
- package/src/contexts/component-types.tsx +0 -5
- package/src/contexts/component.tsx +0 -32
- package/src/contexts/docs.tsx +0 -75
- package/src/contexts/index.tsx +0 -17
- package/src/contexts/markdown.tsx +0 -43
- package/src/contexts/navigation.tsx +0 -44
- package/src/contexts/search.tsx +0 -28
- package/src/contexts/use-components.tsx +0 -4
- package/src/index.ts +0 -6
- package/src/languages/go.tsx +0 -281
- package/src/languages/http.tsx +0 -321
- package/src/languages/index.ts +0 -26
- package/src/languages/java.tsx +0 -358
- package/src/languages/python.tsx +0 -255
- package/src/languages/ruby.tsx +0 -320
- package/src/languages/typescript.tsx +0 -393
- package/src/markdown/index.ts +0 -107
- package/src/markdown/md.ts +0 -45
- package/src/markdown/utils.ts +0 -49
- package/src/routing.ts +0 -238
- package/src/search/form.tsx +0 -127
- package/src/search/index.tsx +0 -1
- package/src/search/indexer.ts +0 -246
- package/src/search/mcp.ts +0 -61
- package/src/search/printer.tsx +0 -86
- package/src/search/providers/algolia.ts +0 -88
- package/src/search/providers/fuse.ts +0 -19
- package/src/search/providers/pagefind.ts +0 -17
- package/src/search/providers/walker.ts +0 -30
- package/src/search/results.tsx +0 -182
- package/src/search/state.ts +0 -64
- package/src/search/types.ts +0 -116
- package/src/style.ts +0 -196
- package/src/styles/main.css +0 -986
- package/src/styles/primitives.css +0 -580
- package/src/styles/resets.css +0 -39
- package/src/styles/search.css +0 -341
- package/src/styles/sidebar.css +0 -85
- package/src/styles/snippets.css +0 -130
- package/src/styles/variables.css +0 -86
- package/src/utils.ts +0 -41
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { u as LanguageDeclNodes, v as Spec, y as SpecLanguage } from "../index-DFr9Mesr.js";
|
|
2
|
+
import { t as DocsLanguage } from "../routing-yTSG7nWM.js";
|
|
3
|
+
import { E as TransformRequestSnippetFn } from "../sdk-BengV7mg.js";
|
|
4
|
+
|
|
5
|
+
//#region src/markdown/utils.d.ts
|
|
6
|
+
type EnvironmentType = {
|
|
7
|
+
spec: Spec;
|
|
8
|
+
language: DocsLanguage;
|
|
9
|
+
transforms?: {
|
|
10
|
+
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
11
|
+
};
|
|
12
|
+
options: {
|
|
13
|
+
renderNestedResources?: boolean;
|
|
14
|
+
includeModelProperties?: boolean | 'method-page';
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
declare function getDecl(env: EnvironmentType, path: string): LanguageDeclNodes[SpecLanguage] | undefined;
|
|
18
|
+
declare const customSnippetPrefix = "custom:";
|
|
19
|
+
declare const getCustomSnippetTitle: (snippetId: string) => string;
|
|
20
|
+
declare function getSnippets(env: EnvironmentType, path: string): {
|
|
21
|
+
[k: string]: {
|
|
22
|
+
snippet: string;
|
|
23
|
+
response: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
declare function stripMarkup(content: string): string;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { EnvironmentType, customSnippetPrefix, getCustomSnippetTitle, getDecl, getSnippets, stripMarkup };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Parser } from "htmlparser2";
|
|
2
|
+
//#region src/markdown/utils.ts
|
|
3
|
+
function getDecl(env, path) {
|
|
4
|
+
const decl = env.spec?.decls?.[env.language]?.[path];
|
|
5
|
+
if (decl?.kind?.endsWith("Reference")) {
|
|
6
|
+
const refId = "type" in decl && typeof decl["type"] === "object" && "$ref" in decl["type"] ? decl["type"]["$ref"] : null;
|
|
7
|
+
if (refId === path) return decl;
|
|
8
|
+
if (refId) return getDecl(env, refId);
|
|
9
|
+
}
|
|
10
|
+
return decl;
|
|
11
|
+
}
|
|
12
|
+
const customSnippetPrefix = "custom:";
|
|
13
|
+
const getCustomSnippetTitle = (snippetId) => snippetId.startsWith("custom:") ? snippetId.slice(7) : snippetId;
|
|
14
|
+
function getSnippets(env, path) {
|
|
15
|
+
const lang = env.language === "http" ? "http.curl" : `${env.language}.default`;
|
|
16
|
+
const snippets = env.spec?.snippets?.[lang]?.[path];
|
|
17
|
+
const responses = env.spec?.snippetResponses?.http?.[path];
|
|
18
|
+
return Object.fromEntries(Object.entries(snippets ?? {}).map(([key, snippet]) => [key, {
|
|
19
|
+
snippet: snippet.content,
|
|
20
|
+
response: responses?.[key]?.[0]?.content
|
|
21
|
+
}]));
|
|
22
|
+
}
|
|
23
|
+
function stripMarkup(content) {
|
|
24
|
+
let output = "";
|
|
25
|
+
new Parser({ ontext(content) {
|
|
26
|
+
output += content;
|
|
27
|
+
} }).parseComplete(content);
|
|
28
|
+
return output;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { customSnippetPrefix, getCustomSnippetTitle, getDecl, getSnippets, stripMarkup };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/contexts/markdown.d.ts
|
|
5
|
+
type MarkdownContextValue = {
|
|
6
|
+
highlight: (content: string, language: string) => string | Promise<string>;
|
|
7
|
+
render: (content: string) => string | Promise<string>;
|
|
8
|
+
};
|
|
9
|
+
declare const MarkdownContext: React.Context<MarkdownContextValue>;
|
|
10
|
+
declare const useMarkdownContext: () => MarkdownContextValue;
|
|
11
|
+
declare function useRenderMarkdown(content?: string): string | undefined;
|
|
12
|
+
declare function useHighlight(content: string, language?: string): string;
|
|
13
|
+
type MarkdownProviderProps = MarkdownContextValue & {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
declare function MarkdownProvider({
|
|
17
|
+
render,
|
|
18
|
+
highlight,
|
|
19
|
+
children
|
|
20
|
+
}: MarkdownProviderProps): _$react_jsx_runtime0.JSX.Element;
|
|
21
|
+
declare function SuspensefulMarkdownProviderInner({
|
|
22
|
+
value,
|
|
23
|
+
children
|
|
24
|
+
}: {
|
|
25
|
+
value: Promise<MarkdownContextValue>;
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
28
|
+
declare function SuspensefulMarkdownProvider({
|
|
29
|
+
value,
|
|
30
|
+
children
|
|
31
|
+
}: React.ComponentProps<typeof SuspensefulMarkdownProviderInner>): _$react_jsx_runtime0.JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { SuspensefulMarkdownProvider as a, useRenderMarkdown as c, MarkdownProviderProps as i, MarkdownContextValue as n, useHighlight as o, MarkdownProvider as r, useMarkdownContext as s, MarkdownContext as t };
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
|
59
|
+
export { MethodHeaderProps as a, MethodProps as c, MethodHeader as i, MethodRoute as l, MethodDescription as n, MethodInfo as o, MethodDescriptionProps as r, MethodInfoProps as s, Method as t, MethodRouteProps as u };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { t as DocsLanguage } from "./routing-yTSG7nWM.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/contexts/navigation.d.ts
|
|
6
|
+
type NavigationHandler = (ev: React$1.MouseEvent | null, opts: {
|
|
7
|
+
href: string;
|
|
8
|
+
language: DocsLanguage;
|
|
9
|
+
stainlessPath: string;
|
|
10
|
+
scroll: boolean;
|
|
11
|
+
}) => void;
|
|
12
|
+
type NavigationContextType = {
|
|
13
|
+
basePath?: string;
|
|
14
|
+
selectedPath?: string;
|
|
15
|
+
navigationPath?: string[];
|
|
16
|
+
onNavigate?: NavigationHandler;
|
|
17
|
+
};
|
|
18
|
+
declare function useNavigation(): NavigationContextType;
|
|
19
|
+
type NavigationProviderProps = NavigationContextType & {
|
|
20
|
+
children: React$1.ReactNode;
|
|
21
|
+
};
|
|
22
|
+
declare function NavigationProvider({
|
|
23
|
+
basePath,
|
|
24
|
+
selectedPath,
|
|
25
|
+
onNavigate,
|
|
26
|
+
children
|
|
27
|
+
}: NavigationProviderProps): _$react_jsx_runtime0.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { useNavigation as a, NavigationProviderProps as i, NavigationHandler as n, NavigationProvider as r, NavigationContextType as t };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { d as Method, h as Resource } from "./index-DFr9Mesr.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
|
|
39
|
+
export { SDKResource as a, SDKRoot as c, SDKOverviewProps as i, SDKRootProps as l, SDKMethodSummaryProps as n, SDKResourceHeader as o, SDKOverview as r, SDKResourceProps as s, SDKMethodSummary as t };
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
style: cssStyle
|
|
42
|
+
}: {
|
|
43
|
+
content: string;
|
|
44
|
+
style?: React.CSSProperties;
|
|
45
|
+
}): "" | _$react_jsx_runtime0.JSX.Element | undefined;
|
|
46
|
+
type BadgeProps = {
|
|
47
|
+
id: string;
|
|
48
|
+
children?: ReactNode;
|
|
49
|
+
};
|
|
50
|
+
declare function Badge({
|
|
51
|
+
id,
|
|
52
|
+
children
|
|
53
|
+
}: BadgeProps): _$react_jsx_runtime0.JSX.Element;
|
|
54
|
+
type TooltipProps = {
|
|
55
|
+
content: ReactNode;
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
};
|
|
58
|
+
declare function Tooltip({
|
|
59
|
+
content,
|
|
60
|
+
children
|
|
61
|
+
}: 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;
|
|
62
|
+
type LinkProps = {
|
|
63
|
+
stainlessPath?: string;
|
|
64
|
+
scroll?: boolean;
|
|
65
|
+
children?: ReactNode;
|
|
66
|
+
} & React.HTMLProps<HTMLAnchorElement>;
|
|
67
|
+
declare function Link({
|
|
68
|
+
stainlessPath,
|
|
69
|
+
scroll,
|
|
70
|
+
children,
|
|
71
|
+
...props
|
|
72
|
+
}: 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;
|
|
73
|
+
type InputProps = {
|
|
74
|
+
left?: ReactNode;
|
|
75
|
+
right?: ReactNode;
|
|
76
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
77
|
+
} & React.InputHTMLAttributes<HTMLInputElement>;
|
|
78
|
+
declare function Input({
|
|
79
|
+
left,
|
|
80
|
+
right,
|
|
81
|
+
ref,
|
|
82
|
+
className,
|
|
83
|
+
...props
|
|
84
|
+
}: InputProps): _$react_jsx_runtime0.JSX.Element;
|
|
85
|
+
type ToggleButtonProps = {
|
|
86
|
+
children?: ReactNode;
|
|
87
|
+
selected?: boolean;
|
|
88
|
+
} & React.ComponentProps<'button'>;
|
|
89
|
+
declare function ToggleButton({
|
|
90
|
+
children,
|
|
91
|
+
selected,
|
|
92
|
+
ref,
|
|
93
|
+
...props
|
|
94
|
+
}: ToggleButtonProps): _$react_jsx_runtime0.JSX.Element;
|
|
95
|
+
type ListViewProps<TItem> = {
|
|
96
|
+
items: Array<TItem>;
|
|
97
|
+
itemDelegate: (item: TItem, selected: boolean) => React.ReactNode;
|
|
98
|
+
onSelectListItem?: (item: TItem) => void;
|
|
99
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|
|
100
|
+
declare function ListView<TItem>({
|
|
101
|
+
items,
|
|
102
|
+
itemDelegate,
|
|
103
|
+
onSelectListItem,
|
|
104
|
+
...rest
|
|
105
|
+
}: ListViewProps<TItem>): _$react_jsx_runtime0.JSX.Element;
|
|
106
|
+
//#endregion
|
|
107
|
+
export { Join as a, ListViewProps as c, ToggleButtonProps as d, Tooltip as f, InputProps as i, Markdown as l, Expander as n, Link as o, VirtualExpander as p, Input as r, ListView as s, Badge as t, ToggleButton as u };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/properties.d.ts
|
|
5
|
+
type PropertyToggleProps = {
|
|
6
|
+
target: string;
|
|
7
|
+
};
|
|
8
|
+
declare function PropertyToggle({
|
|
9
|
+
target
|
|
10
|
+
}: PropertyToggleProps): _$react_jsx_runtime0.JSX.Element;
|
|
11
|
+
type PropertyDescriptionProps = {
|
|
12
|
+
description?: string;
|
|
13
|
+
};
|
|
14
|
+
declare function PropertyDescription({
|
|
15
|
+
description
|
|
16
|
+
}: PropertyDescriptionProps): _$react_jsx_runtime0.JSX.Element | undefined;
|
|
17
|
+
type PropertyTitleProps = {
|
|
18
|
+
title?: string;
|
|
19
|
+
};
|
|
20
|
+
declare function PropertyTitle({
|
|
21
|
+
title
|
|
22
|
+
}: PropertyTitleProps): _$react_jsx_runtime0.JSX.Element | undefined;
|
|
23
|
+
type PropertyProps = {
|
|
24
|
+
id?: string;
|
|
25
|
+
name?: ReactNode;
|
|
26
|
+
typeName?: ReactNode;
|
|
27
|
+
badges?: ReactNode;
|
|
28
|
+
type?: ReactNode;
|
|
29
|
+
description?: string;
|
|
30
|
+
title?: string;
|
|
31
|
+
expand?: boolean;
|
|
32
|
+
deprecated?: boolean | string;
|
|
33
|
+
additional?: ReactNode;
|
|
34
|
+
declaration?: ReactNode;
|
|
35
|
+
constraints?: ReactNode;
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
};
|
|
38
|
+
declare function Property({
|
|
39
|
+
id,
|
|
40
|
+
name,
|
|
41
|
+
typeName,
|
|
42
|
+
badges,
|
|
43
|
+
type,
|
|
44
|
+
declaration,
|
|
45
|
+
description,
|
|
46
|
+
title,
|
|
47
|
+
deprecated,
|
|
48
|
+
expand,
|
|
49
|
+
additional,
|
|
50
|
+
constraints,
|
|
51
|
+
children
|
|
52
|
+
}: PropertyProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { PropertyTitle as a, PropertyToggleProps as c, PropertyProps as i, PropertyDescription as n, PropertyTitleProps as o, PropertyDescriptionProps as r, PropertyToggle as s, Property as t };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { d as Method, f as Model, h as Resource, v as Spec } from "./index-DFr9Mesr.js";
|
|
2
|
+
|
|
3
|
+
//#region src/routing.d.ts
|
|
4
|
+
declare namespace routing_d_exports {
|
|
5
|
+
export { DocsLanguage, LanguageNames, Languages, ParsedStainlessPath, RouteEntry, SpecTreeEntry, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateMissingRouteList, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };
|
|
6
|
+
}
|
|
7
|
+
declare const Languages: readonly ["http", "node", "python", "go", "typescript", "terraform", "ruby", "java", "kotlin", "csharp", "php", "cli"];
|
|
8
|
+
declare const SupportedLanguageSyntaxes: string[];
|
|
9
|
+
type DocsLanguage = (typeof Languages)[number];
|
|
10
|
+
declare const LanguageNames: Record<DocsLanguage, string>;
|
|
11
|
+
declare function getLanguageSnippet(language: DocsLanguage): "http.curl" | "node.default" | "python.default" | "go.default" | "typescript.default" | "terraform.default" | "ruby.default" | "java.default" | "kotlin.default" | "csharp.default" | "php.default" | "cli.default";
|
|
12
|
+
declare function isSupportedLanguage(language: string): language is DocsLanguage;
|
|
13
|
+
type ParsedStainlessPath = ReturnType<typeof parseStainlessPath>;
|
|
14
|
+
declare function parseStainlessPath(stainlessPath: string): {
|
|
15
|
+
resource: string[] | null;
|
|
16
|
+
method: string | null;
|
|
17
|
+
model: string | null;
|
|
18
|
+
routable: string | undefined;
|
|
19
|
+
} | null;
|
|
20
|
+
declare function trimStainlessPath(stainlessPath: string): string;
|
|
21
|
+
declare function getResource(stainlessPath: string): string | undefined;
|
|
22
|
+
declare function parseRoute(basePath: string, route: string): {
|
|
23
|
+
stainlessPath: string;
|
|
24
|
+
language: DocsLanguage;
|
|
25
|
+
};
|
|
26
|
+
declare function generateRoute(basePath: string, language: string, stainlessPath: string): string | null;
|
|
27
|
+
type SpecTreeEntry = {
|
|
28
|
+
data: Method | Resource | Model;
|
|
29
|
+
path: string[];
|
|
30
|
+
};
|
|
31
|
+
declare function walkTree(spec: Spec, includeModels?: boolean): Generator<SpecTreeEntry, void, any>;
|
|
32
|
+
type RouteEntry = {
|
|
33
|
+
title: string;
|
|
34
|
+
kind: SpecTreeEntry['data']['kind'];
|
|
35
|
+
language: DocsLanguage;
|
|
36
|
+
stainlessPath: string;
|
|
37
|
+
slug: string;
|
|
38
|
+
};
|
|
39
|
+
declare function generateRouteList({
|
|
40
|
+
spec,
|
|
41
|
+
languages,
|
|
42
|
+
excludeLanguages
|
|
43
|
+
}: {
|
|
44
|
+
spec: Spec;
|
|
45
|
+
languages?: DocsLanguage[];
|
|
46
|
+
excludeLanguages?: DocsLanguage[];
|
|
47
|
+
}): RouteEntry[];
|
|
48
|
+
declare function generateMissingRouteList({
|
|
49
|
+
spec,
|
|
50
|
+
basePath
|
|
51
|
+
}: {
|
|
52
|
+
spec: Spec;
|
|
53
|
+
basePath: string;
|
|
54
|
+
}): string[];
|
|
55
|
+
type ResourceOrMethod = Resource | Method;
|
|
56
|
+
declare function findNavigationPath(items: ResourceOrMethod[], target: string): string[] | undefined;
|
|
57
|
+
declare function expandToElement(el: HTMLElement | null): void;
|
|
58
|
+
declare function scrollToPath(stainlessPath: string): void;
|
|
59
|
+
declare function updateHistory(basePath: string, language: DocsLanguage, stainlessPath: string): void;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { walkTree as S, parseStainlessPath as _, RouteEntry as a, trimStainlessPath as b, expandToElement as c, generateRoute as d, generateRouteList as f, parseRoute as g, isSupportedLanguage as h, ParsedStainlessPath as i, findNavigationPath as l, getResource as m, LanguageNames as n, SpecTreeEntry as o, getLanguageSnippet as p, Languages as r, SupportedLanguageSyntaxes as s, DocsLanguage as t, generateMissingRouteList as u, routing_d_exports as v, updateHistory as x, scrollToPath as y };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { S as walkTree, _ as parseStainlessPath, a as RouteEntry, b as trimStainlessPath, c as expandToElement, d as generateRoute, f as generateRouteList, g as parseRoute, h as isSupportedLanguage, i as ParsedStainlessPath, l as findNavigationPath, m as getResource, n as LanguageNames, o as SpecTreeEntry, p as getLanguageSnippet, r as Languages, s as SupportedLanguageSyntaxes, t as DocsLanguage, u as generateMissingRouteList, x as updateHistory, y as scrollToPath } from "./routing-yTSG7nWM.js";
|
|
2
|
+
export { DocsLanguage, LanguageNames, Languages, ParsedStainlessPath, RouteEntry, SpecTreeEntry, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateMissingRouteList, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };
|