@stainless-api/docs-ui 0.1.0-beta.73 → 0.1.0-beta.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-BN_g-Awi.js → chunk-BYypO7fO.js} +3 -3
- package/dist/components/MaskedInput.d.ts +3 -3
- package/dist/components/MaskedInput.js +1 -1
- package/dist/components/breadcrumbs.d.ts +24 -1
- package/dist/components/breadcrumbs.js +62 -7
- package/dist/components/icons.d.ts +18 -13
- package/dist/components/icons.js +940 -2
- package/dist/components/index.d.ts +16 -14
- package/dist/components/index.js +72 -18
- package/dist/components/method.d.ts +58 -1
- package/dist/components/method.js +95 -8
- package/dist/components/overview.d.ts +38 -1
- package/dist/components/overview.js +137 -9
- package/dist/components/primitives.d.ts +104 -1
- package/dist/components/primitives.js +250 -6
- package/dist/components/properties.d.ts +53 -1
- package/dist/components/properties.js +138 -7
- package/dist/components/sdk-sidebar.d.ts +14 -1
- package/dist/components/sdk-sidebar.js +50 -8
- package/dist/components/sdk.d.ts +121 -1
- package/dist/components/sdk.js +405 -8
- package/dist/components/snippets.d.ts +70 -13
- package/dist/components/snippets.js +182 -7
- package/dist/components/stl-sidebar.d.ts +57 -1
- package/dist/components/stl-sidebar.js +105 -3
- package/dist/contexts/component-generics.d.ts +29 -1
- package/dist/contexts/component-generics.js +31 -1
- package/dist/contexts/component-types.d.ts +4 -15
- package/dist/contexts/component.d.ts +7 -17
- package/dist/contexts/component.js +22 -28
- package/dist/contexts/docs.d.ts +61 -1
- package/dist/contexts/docs.js +89 -1
- package/dist/contexts/index.d.ts +13 -14
- package/dist/contexts/index.js +44 -6
- package/dist/contexts/markdown.d.ts +21 -1
- package/dist/contexts/markdown.js +47 -2
- package/dist/contexts/navigation.d.ts +28 -1
- package/dist/contexts/navigation.js +22 -1
- package/dist/contexts/use-components.d.ts +1 -13
- package/dist/contexts/use-components.js +6 -2
- package/dist/{index-HDt5wRiR.d.ts → index-Cl6Gny0o.d.ts} +37 -2
- package/dist/index.d.ts +4 -14
- package/dist/index.js +7 -30
- package/dist/languages/cli.d.ts +38 -14
- package/dist/languages/cli.js +166 -20
- package/dist/languages/csharp.d.ts +42 -14
- package/dist/languages/csharp.js +283 -8
- package/dist/languages/go.d.ts +40 -14
- package/dist/languages/go.js +303 -8
- package/dist/languages/http.d.ts +46 -14
- package/dist/languages/http.js +390 -19
- package/dist/languages/index.d.ts +51 -14
- package/dist/languages/index.js +32 -28
- package/dist/languages/java.d.ts +43 -14
- package/dist/languages/java.js +403 -8
- package/dist/languages/php.d.ts +40 -0
- package/dist/languages/php.js +313 -0
- package/dist/languages/python.d.ts +40 -14
- package/dist/languages/python.js +269 -8
- package/dist/languages/ruby.d.ts +40 -14
- package/dist/languages/ruby.js +387 -8
- package/dist/languages/terraform.d.ts +48 -14
- package/dist/languages/terraform.js +243 -8
- package/dist/languages/typescript.d.ts +40 -14
- package/dist/languages/typescript.js +449 -8
- package/dist/markdown/index.d.ts +1 -2
- package/dist/markdown/index.js +1 -28
- package/dist/markdown/printer.d.ts +2 -2
- package/dist/markdown/printer.js +6 -30
- package/dist/markdown/utils.d.ts +3 -3
- package/dist/routing.d.ts +61 -2
- package/dist/routing.js +205 -2
- package/dist/spec.d.ts +2 -2
- package/dist/spec.js +2 -2
- package/dist/style.js +176 -1
- package/dist/use-strict-context-L0c8JKg4.js +16 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +53 -2
- package/package.json +3 -3
- package/dist/breadcrumbs-Dei_5sHd.d.ts +0 -25
- package/dist/breadcrumbs-oUp-6oJK.js +0 -63
- package/dist/cli-BX9ofVCR.js +0 -166
- package/dist/component-Dl5ZEHxB.js +0 -23
- package/dist/component-generics-C9ALAcZI.d.ts +0 -30
- package/dist/component-generics-POFirVVb.js +0 -45
- package/dist/components-DQPlXEwE.js +0 -72
- package/dist/contexts-_NNW5yqC.js +0 -44
- package/dist/csharp-sn5CJu9t.js +0 -283
- package/dist/docs-YgoQ3bzY.js +0 -81
- package/dist/docs-x-kfjRMc.d.ts +0 -66
- package/dist/go-BoaAVmP0.js +0 -303
- package/dist/http-Ccj1dOvE.js +0 -389
- package/dist/icons-BYKn5X8E.js +0 -885
- package/dist/index-OCM-LZIo.d.ts +0 -428
- package/dist/java-BiLRuLuD.js +0 -403
- package/dist/languages-COjc0Nwx.js +0 -30
- package/dist/markdown-BszOPZhh.d.ts +0 -22
- package/dist/markdown-Cq3XEhrR.js +0 -49
- package/dist/method-DjzVBzZe.js +0 -96
- package/dist/method-KkWyhvKa.d.ts +0 -59
- package/dist/navigation-BZjwfN2P.d.ts +0 -29
- package/dist/navigation-aoYZ_tl4.js +0 -24
- package/dist/overview-BNmMeDUE.d.ts +0 -39
- package/dist/overview-Clq5psZe.js +0 -138
- package/dist/primitives-B8OnSXRP.d.ts +0 -105
- package/dist/primitives-BBUs_flm.js +0 -250
- package/dist/properties-BhlRtWo4.d.ts +0 -54
- package/dist/properties-DQU0NBzb.js +0 -138
- package/dist/python-nqOBH7GS.js +0 -269
- package/dist/routing-GvhEMw6E.js +0 -205
- package/dist/routing-qJMPICGo.d.ts +0 -61
- package/dist/ruby-BBc8HdIt.js +0 -387
- package/dist/sdk-C8C6IRQp.d.ts +0 -122
- package/dist/sdk-DzCHhEoX.js +0 -405
- package/dist/sdk-sidebar-CkjSLggl.js +0 -50
- package/dist/sdk-sidebar-lgNmf-ns.d.ts +0 -15
- package/dist/snippets-CLpNVNlA.js +0 -181
- package/dist/stl-sidebar-8jF9cdnn.d.ts +0 -58
- package/dist/stl-sidebar-DC5UOJiT.js +0 -106
- package/dist/style-DJIYkFhO.js +0 -178
- package/dist/terraform-DVx2ea2h.js +0 -243
- package/dist/typescript-Cmk-jBBw.js +0 -449
- package/dist/use-components-BUz3GbO4.js +0 -7
- package/dist/utils-D6zJxUZ9.js +0 -54
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __exportAll = (all,
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
4
|
let target = {};
|
|
5
5
|
for (var name in all) {
|
|
6
6
|
__defProp(target, name, {
|
|
@@ -8,7 +8,7 @@ var __exportAll = (all, symbols) => {
|
|
|
8
8
|
enumerable: true
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
if (
|
|
11
|
+
if (!no_symbols) {
|
|
12
12
|
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
13
|
}
|
|
14
14
|
return target;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
1
|
+
import { InputProps } from "./primitives.js";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/MaskedInput.d.ts
|
|
5
5
|
declare const MaskedInput: ({
|
|
@@ -9,6 +9,6 @@ declare const MaskedInput: ({
|
|
|
9
9
|
value,
|
|
10
10
|
ref,
|
|
11
11
|
...props
|
|
12
|
-
}: InputProps) =>
|
|
12
|
+
}: InputProps) => react_jsx_runtime0.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { MaskedInput };
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v as Spec } from "../index-Cl6Gny0o.js";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
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: Spec;
|
|
20
|
+
currentPath: string;
|
|
21
|
+
basePath?: string;
|
|
22
|
+
config?: BreadcrumbConfig | null;
|
|
23
|
+
}): react_jsx_runtime0.JSX.Element | null;
|
|
24
|
+
//#endregion
|
|
2
25
|
export { SDKBreadcrumbs, generateApiBreadcrumbs };
|
|
@@ -1,9 +1,64 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import "../
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import { n as generateApiBreadcrumbs, t as SDKBreadcrumbs } from "../breadcrumbs-oUp-6oJK.js";
|
|
1
|
+
import "../use-strict-context-L0c8JKg4.js";
|
|
2
|
+
import style_default from "../style.js";
|
|
3
|
+
import { Languages } from "../routing.js";
|
|
4
|
+
import { Join } from "./primitives.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { ChevronRight } from "lucide-react";
|
|
8
7
|
|
|
8
|
+
//#region src/components/breadcrumbs.tsx
|
|
9
|
+
function generateApiBreadcrumbs(fullPath, spec, basePath) {
|
|
10
|
+
const cleanBasePath = basePath.replace(/\/+$/, "");
|
|
11
|
+
const cleanPath = fullPath.replace(/\/+$/, "");
|
|
12
|
+
if (!cleanPath.startsWith(cleanBasePath)) return null;
|
|
13
|
+
const rest = cleanPath.slice(cleanBasePath.length).split("/").filter(Boolean);
|
|
14
|
+
const breadcrumbs = [];
|
|
15
|
+
let href = cleanBasePath;
|
|
16
|
+
let i = 0;
|
|
17
|
+
if (Languages.includes(rest[0])) {
|
|
18
|
+
href += `/${rest[0]}`;
|
|
19
|
+
i++;
|
|
20
|
+
}
|
|
21
|
+
breadcrumbs.push({
|
|
22
|
+
title: "API Reference",
|
|
23
|
+
href
|
|
24
|
+
});
|
|
25
|
+
let currentSpec = spec;
|
|
26
|
+
while (i < rest.length) {
|
|
27
|
+
const idType = rest[i];
|
|
28
|
+
const idValue = rest[i + 1];
|
|
29
|
+
if (!idType || !idValue || !currentSpec?.[idType]?.[idValue]) break;
|
|
30
|
+
currentSpec = currentSpec[idType][idValue];
|
|
31
|
+
href += `/${idType}/${idValue}`;
|
|
32
|
+
const title = (idType === "methods" ? currentSpec.summary : currentSpec.title) ?? idValue;
|
|
33
|
+
breadcrumbs.push({
|
|
34
|
+
title,
|
|
35
|
+
href
|
|
36
|
+
});
|
|
37
|
+
i += 2;
|
|
38
|
+
}
|
|
39
|
+
return breadcrumbs;
|
|
40
|
+
}
|
|
41
|
+
function SDKBreadcrumbs({ spec, currentPath, basePath = "/api", config = { includeCurrentPage: false } }) {
|
|
42
|
+
const breadcrumbs = generateApiBreadcrumbs(currentPath, spec, basePath);
|
|
43
|
+
if (!breadcrumbs || breadcrumbs.length === 0) return null;
|
|
44
|
+
if (!config?.includeCurrentPage && breadcrumbs.length > 1) breadcrumbs.pop();
|
|
45
|
+
const items = breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: style_default.BreadcrumbsItem,
|
|
47
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
48
|
+
href: crumb.href,
|
|
49
|
+
className: style_default.BreadcrumbsLink,
|
|
50
|
+
children: crumb.title
|
|
51
|
+
})
|
|
52
|
+
}, index));
|
|
53
|
+
return /* @__PURE__ */ jsx("div", {
|
|
54
|
+
className: style_default.Breadcrumbs,
|
|
55
|
+
children: /* @__PURE__ */ jsx(Join, {
|
|
56
|
+
limit: breadcrumbs.length,
|
|
57
|
+
items,
|
|
58
|
+
children: /* @__PURE__ */ jsx(ChevronRight, {})
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
9
64
|
export { SDKBreadcrumbs, generateApiBreadcrumbs };
|
|
@@ -1,60 +1,65 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/icons.d.ts
|
|
4
4
|
declare function CSharpIcon({
|
|
5
5
|
className
|
|
6
6
|
}: {
|
|
7
7
|
className?: string;
|
|
8
|
-
}):
|
|
8
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
9
9
|
declare function GoIcon({
|
|
10
10
|
className
|
|
11
11
|
}: {
|
|
12
12
|
className?: string;
|
|
13
|
-
}):
|
|
13
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
14
14
|
declare function JavaIcon({
|
|
15
15
|
className
|
|
16
16
|
}: {
|
|
17
17
|
className?: string;
|
|
18
|
-
}):
|
|
18
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
19
19
|
declare function KotlinIcon({
|
|
20
20
|
className
|
|
21
21
|
}: {
|
|
22
22
|
className?: string;
|
|
23
|
-
}):
|
|
23
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
24
24
|
declare function PythonIcon({
|
|
25
25
|
className
|
|
26
26
|
}: {
|
|
27
27
|
className?: string;
|
|
28
|
-
}):
|
|
28
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
29
29
|
declare function RubyIcon({
|
|
30
30
|
className
|
|
31
31
|
}: {
|
|
32
32
|
className?: string;
|
|
33
|
-
}):
|
|
33
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
34
34
|
declare function TerraformIcon({
|
|
35
35
|
className
|
|
36
36
|
}: {
|
|
37
37
|
className?: string;
|
|
38
|
-
}):
|
|
38
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
39
39
|
declare function TypescriptIcon({
|
|
40
40
|
className
|
|
41
41
|
}: {
|
|
42
42
|
className?: string;
|
|
43
|
-
}):
|
|
43
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
44
44
|
declare function CurlIcon({
|
|
45
45
|
className
|
|
46
46
|
}: {
|
|
47
47
|
className?: string;
|
|
48
|
-
}):
|
|
48
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
49
49
|
declare function PowershellIcon({
|
|
50
50
|
className
|
|
51
51
|
}: {
|
|
52
52
|
className?: string;
|
|
53
|
-
}):
|
|
53
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
54
54
|
declare function CLIIcon({
|
|
55
55
|
className
|
|
56
56
|
}: {
|
|
57
57
|
className?: string;
|
|
58
|
-
}):
|
|
58
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
59
|
+
declare function PHPIcon({
|
|
60
|
+
className
|
|
61
|
+
}: {
|
|
62
|
+
className?: string;
|
|
63
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
59
64
|
//#endregion
|
|
60
|
-
export { CLIIcon, CSharpIcon, CurlIcon, GoIcon, JavaIcon, KotlinIcon, PowershellIcon, PythonIcon, RubyIcon, TerraformIcon, TypescriptIcon };
|
|
65
|
+
export { CLIIcon, CSharpIcon, CurlIcon, GoIcon, JavaIcon, KotlinIcon, PHPIcon, PowershellIcon, PythonIcon, RubyIcon, TerraformIcon, TypescriptIcon };
|